#include <EvtDiracSpinor.hh>
Definition at line 52 of file EvtDiracSpinor.hh.
EvtDiracSpinor::EvtDiracSpinor | ( | ) | [inline] |
Definition at line 111 of file EvtDiracSpinor.hh.
References spinor.
00111 { 00112 00113 spinor[0]=EvtComplex(); spinor[1]=EvtComplex(); 00114 spinor[2]=EvtComplex(); spinor[3]=EvtComplex(); 00115 00116 }
EvtDiracSpinor::EvtDiracSpinor | ( | const EvtComplex & | sp0, | |
const EvtComplex & | sp1, | |||
const EvtComplex & | sp2, | |||
const EvtComplex & | sp3 | |||
) |
Definition at line 35 of file EvtDiracSpinor.cc.
References set().
00036 { 00037 set(sp0,sp1,sp2,sp3); 00038 }
EvtDiracSpinor::~EvtDiracSpinor | ( | ) | [virtual] |
EvtDiracSpinor::EvtDiracSpinor | ( | const EvtDiracSpinor & | dspinor | ) | [inline] |
EvtDiracSpinor EvtDiracSpinor::adjoint | ( | ) | const |
Definition at line 387 of file EvtDiracSpinor.cc.
References conj(), EvtGammaMatrix::g0(), EvtGammaMatrix::gamma, genRecEmupikp::i, ganga-rec::j, and spinor.
00388 { 00389 EvtDiracSpinor d = this->conj(); // first conjugate, then multiply with gamma0 00390 EvtGammaMatrix g0 = EvtGammaMatrix::g0(); 00391 EvtDiracSpinor result; // automatically initialized to 0 00392 00393 for (int i=0; i<4; ++i) 00394 for (int j=0; j<4; ++j) 00395 result.spinor[i] += d.spinor[j] * g0.gamma[i][j]; 00396 00397 return result; 00398 }
void EvtDiracSpinor::applyBoostTo | ( | const EvtVector3R & | boost | ) |
Definition at line 107 of file EvtDiracSpinor.cc.
References f1, f2, EvtVector3R::get(), and spinor.
00107 { 00108 00109 double bx,by,bz,gamma,b2,f1,f2; 00110 EvtComplex spinorp[4]; 00111 00112 bx=boost.get(0); 00113 by=boost.get(1); 00114 bz=boost.get(2); 00115 b2=bx*bx+by*by+bz*bz; 00116 00117 if (b2==0.0){ 00118 return; 00119 } 00120 00121 assert(b2<1.0); 00122 00123 gamma=1.0/sqrt(1-b2); 00124 00125 f1=sqrt((gamma+1.0)/2.0); 00126 f2=f1*gamma/(gamma+1.0); 00127 00128 spinorp[0]=f1*spinor[0]+f2*bz*spinor[2]+ 00129 f2*EvtComplex(bx,-by)*spinor[3]; 00130 spinorp[1]=f1*spinor[1]+f2*EvtComplex(bx,by)*spinor[2]- 00131 f2*bz*spinor[3]; 00132 spinorp[2]=f2*bz*spinor[0]+f2*EvtComplex(bx,-by)*spinor[1]+ 00133 f1*spinor[2]; 00134 spinorp[3]=f2*EvtComplex(bx,by)*spinor[0]- 00135 f2*bz*spinor[1]+f1*spinor[3]; 00136 00137 spinor[0]=spinorp[0]; 00138 spinor[1]=spinorp[1]; 00139 spinor[2]=spinorp[2]; 00140 spinor[3]=spinorp[3]; 00141 00142 return; 00143 }
void EvtDiracSpinor::applyBoostTo | ( | const EvtVector4R & | p4 | ) |
Definition at line 93 of file EvtDiracSpinor.cc.
References EvtVector4R::get().
Referenced by EvtRaritaSchwinger::applyBoostTo(), and boostTo().
00093 { 00094 00095 double e=p4.get(0); 00096 00097 EvtVector3R boost(p4.get(1)/e,p4.get(2)/e,p4.get(3)/e); 00098 00099 applyBoostTo(boost); 00100 00101 return; 00102 00103 }
void EvtDiracSpinor::applyRotateEuler | ( | double | alpha, | |
double | beta, | |||
double | gamma | |||
) |
Definition at line 145 of file EvtDiracSpinor.cc.
References cos(), sin(), and spinor.
Referenced by EvtRaritaSchwinger::applyRotateEuler(), rotateEuler(), and EvtDiracParticle::rotateToHelicityBasis().
00146 { 00147 00148 EvtComplex retVal[4]; 00149 00150 double cb2=cos(0.5*beta); 00151 double sb2=sin(0.5*beta); 00152 double capg2=cos(0.5*(alpha+gamma)); 00153 double camg2=cos(0.5*(alpha-gamma)); 00154 double sapg2=sin(0.5*(alpha+gamma)); 00155 double samg2=sin(0.5*(alpha-gamma)); 00156 00157 EvtComplex m11(cb2*capg2,-cb2*sapg2); 00158 EvtComplex m12(-sb2*camg2,sb2*samg2); 00159 EvtComplex m21(sb2*camg2,sb2*samg2); 00160 EvtComplex m22(cb2*capg2,cb2*sapg2); 00161 00162 retVal[0]=m11*spinor[0]+m12*spinor[1]; 00163 retVal[1]=m21*spinor[0]+m22*spinor[1]; 00164 retVal[2]=m11*spinor[2]+m12*spinor[3]; 00165 retVal[3]=m21*spinor[2]+m22*spinor[3]; 00166 00167 spinor[0]=retVal[0]; 00168 spinor[1]=retVal[1]; 00169 spinor[2]=retVal[2]; 00170 spinor[3]=retVal[3]; 00171 00172 return; 00173 }
EvtDiracSpinor EvtDiracSpinor::conj | ( | ) | const |
Definition at line 177 of file EvtDiracSpinor.cc.
References genRecEmupikp::i, set_spinor(), and spinor.
Referenced by adjoint().
00177 { 00178 00179 EvtDiracSpinor sp; 00180 00181 for ( int i=0; i<4; i++) 00182 sp.set_spinor(i,::conj(spinor[i])); 00183 00184 return sp; 00185 }
const EvtComplex & EvtDiracSpinor::get_spinor | ( | int | i | ) | const |
Definition at line 60 of file EvtDiracSpinor.cc.
References spinor.
Referenced by dirProd(), operator *(), and EvtRaritaSchwinger::setSpinor().
EvtDiracSpinor & EvtDiracSpinor::operator+= | ( | const EvtDiracSpinor & | u2 | ) | [inline] |
EvtDiracSpinor & EvtDiracSpinor::operator-= | ( | const EvtDiracSpinor & | u2 | ) | [inline] |
EvtDiracSpinor & EvtDiracSpinor::operator= | ( | const EvtDiracSpinor & | dspinor | ) | [inline] |
void EvtDiracSpinor::set | ( | const EvtComplex & | sp0, | |
const EvtComplex & | sp1, | |||
const EvtComplex & | sp2, | |||
const EvtComplex & | sp3 | |||
) |
Definition at line 40 of file EvtDiracSpinor.cc.
References spinor.
Referenced by EvtDiracSpinor(), EvtRaritaSchwinger::getSpinor(), EvtRaritaSchwingerParticle::init(), EvtNeutrinoParticle::init(), EvtDiracParticle::init(), EvtRaritaSchwingerParticle::rotateToHelicityBasis(), and EvtDiracParticle::rotateToHelicityBasis().
void EvtDiracSpinor::set_spinor | ( | int | i, | |
const EvtComplex & | sp | |||
) |
EvtDiracSpinor boostTo | ( | const EvtDiracSpinor & | sp, | |
const EvtVector3R | boost | |||
) | [friend] |
Definition at line 84 of file EvtDiracSpinor.cc.
00085 { 00086 00087 EvtDiracSpinor tmp(sp); 00088 tmp.applyBoostTo(boost); 00089 return tmp; 00090 00091 }
EvtDiracSpinor boostTo | ( | const EvtDiracSpinor & | sp, | |
const EvtVector4R | p4 | |||
) | [friend] |
Definition at line 75 of file EvtDiracSpinor.cc.
00076 { 00077 00078 EvtDiracSpinor tmp(sp); 00079 tmp.applyBoostTo(p4); 00080 return tmp; 00081 00082 }
EvtVector4C EvtLeptonACurrent | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 236 of file EvtDiracSpinor.cc.
00236 { 00237 00238 EvtVector4C temp; 00239 00240 EvtGammaMatrix mat; 00241 00242 // no conjugate here; done in the multiplication 00243 // yes this is stupid and fooled me to for a long time (ryd) 00244 00245 mat = EvtGammaMatrix::v0()-EvtGammaMatrix::va0(); 00246 temp.set(0,d*(mat*dp)); 00247 00248 mat = EvtGammaMatrix::v1()-EvtGammaMatrix::va1(); 00249 temp.set(1,d*(mat*dp)); 00250 00251 mat = EvtGammaMatrix::v2()-EvtGammaMatrix::va2(); 00252 temp.set(2,d*(mat*dp)); 00253 00254 mat = EvtGammaMatrix::v3()-EvtGammaMatrix::va3(); 00255 temp.set(3,d*(mat*dp)); 00256 00257 return temp; 00258 }
EvtComplex EvtLeptonPCurrent | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 272 of file EvtDiracSpinor.cc.
00272 { 00273 00274 EvtComplex temp; 00275 00276 // no conjugate here; done in the multiplication 00277 // yes this is stupid and fooled me to for a long time (ryd) 00278 static EvtGammaMatrix m=EvtGammaMatrix::g0()*EvtGammaMatrix::g5(); 00279 temp=d*(m*dp); 00280 00281 return temp; 00282 }
EvtComplex EvtLeptonSCurrent | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 260 of file EvtDiracSpinor.cc.
00260 { 00261 00262 EvtComplex temp; 00263 00264 // no conjugate here; done in the multiplication 00265 // yes this is stupid and fooled me to for a long time (ryd) 00266 00267 temp=d*(EvtGammaMatrix::g0()*dp); 00268 00269 return temp; 00270 }
EvtTensor4C EvtLeptonTCurrent | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 284 of file EvtDiracSpinor.cc.
00284 { 00285 00286 EvtTensor4C temp; 00287 temp.zero(); 00288 EvtComplex i2(0,0.5); 00289 00290 static EvtGammaMatrix mat01=EvtGammaMatrix::g0()* 00291 (EvtGammaMatrix::g0()*EvtGammaMatrix::g1()- 00292 EvtGammaMatrix::g1()*EvtGammaMatrix::g0()); 00293 static EvtGammaMatrix mat02=EvtGammaMatrix::g0()* 00294 (EvtGammaMatrix::g0()*EvtGammaMatrix::g2()- 00295 EvtGammaMatrix::g2()*EvtGammaMatrix::g0()); 00296 static EvtGammaMatrix mat03=EvtGammaMatrix::g0()* 00297 (EvtGammaMatrix::g0()*EvtGammaMatrix::g3()- 00298 EvtGammaMatrix::g3()*EvtGammaMatrix::g0()); 00299 static EvtGammaMatrix mat12=EvtGammaMatrix::g0()* 00300 (EvtGammaMatrix::g1()*EvtGammaMatrix::g2()- 00301 EvtGammaMatrix::g2()*EvtGammaMatrix::g1()); 00302 static EvtGammaMatrix mat13=EvtGammaMatrix::g0()* 00303 (EvtGammaMatrix::g1()*EvtGammaMatrix::g3()- 00304 EvtGammaMatrix::g3()*EvtGammaMatrix::g1()); 00305 static EvtGammaMatrix mat23=EvtGammaMatrix::g0()* 00306 (EvtGammaMatrix::g2()*EvtGammaMatrix::g3()- 00307 EvtGammaMatrix::g3()*EvtGammaMatrix::g2()); 00308 00309 00310 temp.set(0,1,i2*(d*(mat01*dp))); 00311 temp.set(1,0,-temp.get(0,1)); 00312 00313 temp.set(0,2,i2*(d*(mat02*dp))); 00314 temp.set(2,0,-temp.get(0,2)); 00315 00316 temp.set(0,3,i2*(d*(mat03*dp))); 00317 temp.set(3,0,-temp.get(0,3)); 00318 00319 temp.set(1,2,i2*(d*(mat12*dp))); 00320 temp.set(2,1,-temp.get(1,2)); 00321 00322 temp.set(1,3,i2*(d*(mat13*dp))); 00323 temp.set(3,1,-temp.get(1,3)); 00324 00325 temp.set(2,3,i2*(d*(mat23*dp))); 00326 temp.set(3,2,-temp.get(2,3)); 00327 00328 return temp; 00329 }
EvtTensor4C EvtLeptonTg5Current | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 331 of file EvtDiracSpinor.cc.
00331 {//sigma^{mu,nu} gamma_5 00332 00333 EvtTensor4C temp; 00334 temp.zero(); 00335 EvtComplex i2(0,0.5); 00336 00337 static EvtGammaMatrix mat01=EvtGammaMatrix::g0()* 00338 (EvtGammaMatrix::g0()*EvtGammaMatrix::g1()- 00339 EvtGammaMatrix::g1()*EvtGammaMatrix::g0())*EvtGammaMatrix::g5(); 00340 static EvtGammaMatrix mat02=EvtGammaMatrix::g0()* 00341 (EvtGammaMatrix::g0()*EvtGammaMatrix::g2()- 00342 EvtGammaMatrix::g2()*EvtGammaMatrix::g0())*EvtGammaMatrix::g5(); 00343 static EvtGammaMatrix mat03=EvtGammaMatrix::g0()* 00344 (EvtGammaMatrix::g0()*EvtGammaMatrix::g3()- 00345 EvtGammaMatrix::g3()*EvtGammaMatrix::g0())*EvtGammaMatrix::g5(); 00346 static EvtGammaMatrix mat12=EvtGammaMatrix::g0()* 00347 (EvtGammaMatrix::g1()*EvtGammaMatrix::g2()- 00348 EvtGammaMatrix::g2()*EvtGammaMatrix::g1())*EvtGammaMatrix::g5(); 00349 static EvtGammaMatrix mat13=EvtGammaMatrix::g0()* 00350 (EvtGammaMatrix::g1()*EvtGammaMatrix::g3()- 00351 EvtGammaMatrix::g3()*EvtGammaMatrix::g1())*EvtGammaMatrix::g5(); 00352 static EvtGammaMatrix mat23=EvtGammaMatrix::g0()* 00353 (EvtGammaMatrix::g2()*EvtGammaMatrix::g3()- 00354 EvtGammaMatrix::g3()*EvtGammaMatrix::g2())*EvtGammaMatrix::g5(); 00355 00356 00357 temp.set(0,1,i2*(d*(mat01*dp))); 00358 temp.set(1,0,-temp.get(0,1)); 00359 00360 temp.set(0,2,i2*(d*(mat02*dp))); 00361 temp.set(2,0,-temp.get(0,2)); 00362 00363 temp.set(0,3,i2*(d*(mat03*dp))); 00364 temp.set(3,0,-temp.get(0,3)); 00365 00366 temp.set(1,2,i2*(d*(mat12*dp))); 00367 temp.set(2,1,-temp.get(1,2)); 00368 00369 temp.set(1,3,i2*(d*(mat13*dp))); 00370 temp.set(3,1,-temp.get(1,3)); 00371 00372 temp.set(2,3,i2*(d*(mat23*dp))); 00373 temp.set(3,2,-temp.get(2,3)); 00374 00375 return temp; 00376 }
EvtVector4C EvtLeptonVACurrent | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 187 of file EvtDiracSpinor.cc.
00187 { 00188 00189 //Old code; below is a new specialized code that does it more efficiently. 00190 //EvtGammaMatrix mat; 00191 //EvtVector4C temp; 00192 //mat.va0(); 00193 //temp.set(0,d*(mat*dp)); 00194 //mat.va1(); 00195 //temp.set(1,d*(mat*dp)); 00196 //mat.va2(); 00197 //temp.set(2,d*(mat*dp)); 00198 //mat.va3(); 00199 //temp.set(3,d*(mat*dp)); 00200 //return temp; 00201 00202 00203 EvtComplex u02=::conj(d.spinor[0]-d.spinor[2]); 00204 EvtComplex u13=::conj(d.spinor[1]-d.spinor[3]); 00205 00206 EvtComplex v02=dp.spinor[0]-dp.spinor[2]; 00207 EvtComplex v13=dp.spinor[1]-dp.spinor[3]; 00208 00209 EvtComplex a=u02*v02; 00210 EvtComplex b=u13*v13; 00211 00212 EvtComplex c=u02*v13; 00213 EvtComplex e=u13*v02; 00214 00215 return EvtVector4C(a+b,-(c+e),EvtComplex(0,1)*(c-e),b-a); 00216 00217 00218 }
EvtVector4C EvtLeptonVCurrent | ( | const EvtDiracSpinor & | d, | |
const EvtDiracSpinor & | dp | |||
) | [friend] |
Definition at line 220 of file EvtDiracSpinor.cc.
00220 { 00221 00222 EvtVector4C temp; 00223 00224 // no conjugate here; done in the multiplication 00225 // yes this is stupid and fooled me to for a long time (ryd) 00226 00227 temp.set(0,d*(EvtGammaMatrix::v0()*dp)); 00228 temp.set(1,d*(EvtGammaMatrix::v1()*dp)); 00229 temp.set(2,d*(EvtGammaMatrix::v2()*dp)); 00230 temp.set(3,d*(EvtGammaMatrix::v3()*dp)); 00231 00232 return temp; 00233 }
EvtDiracSpinor operator * | ( | const EvtComplex & | c, | |
const EvtDiracSpinor & | d | |||
) | [friend] |
EvtDiracSpinor operator+ | ( | const EvtDiracSpinor & | u1, | |
const EvtDiracSpinor & | u2 | |||
) | [friend] |
EvtDiracSpinor operator- | ( | const EvtDiracSpinor & | u1, | |
const EvtDiracSpinor & | u2 | |||
) | [friend] |
std::ostream& operator<< | ( | std::ostream & | s, | |
const EvtDiracSpinor & | c | |||
) | [friend] |
EvtDiracSpinor rotateEuler | ( | const EvtDiracSpinor & | sp, | |
double | alpha, | |||
double | beta, | |||
double | gamma | |||
) | [friend] |
Definition at line 66 of file EvtDiracSpinor.cc.
00067 { 00068 00069 EvtDiracSpinor tmp(sp); 00070 tmp.applyRotateEuler(alpha,beta,gamma); 00071 return tmp; 00072 00073 }
EvtComplex EvtDiracSpinor::spinor[4] [private] |
Definition at line 107 of file EvtDiracSpinor.hh.
Referenced by adjoint(), applyBoostTo(), applyRotateEuler(), conj(), EvtDiracSpinor(), EvtLeptonVACurrent(), get_spinor(), operator *(), operator+=(), operator-=(), operator<<(), operator=(), set(), and set_spinor().