Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EvtDiracSpinor Class Reference

#include <EvtDiracSpinor.hh>

List of all members.

Public Member Functions

EvtDiracSpinor adjoint () const
void applyBoostTo (const EvtVector3R &boost)
void applyBoostTo (const EvtVector4R &p4)
void applyRotateEuler (double alpha, double beta, double gamma)
EvtDiracSpinor conj () const
 EvtDiracSpinor (const EvtDiracSpinor &dspinor)
 EvtDiracSpinor (const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
 EvtDiracSpinor ()
const EvtComplexget_spinor (int i) const
EvtDiracSpinoroperator+= (const EvtDiracSpinor &u2)
EvtDiracSpinoroperator-= (const EvtDiracSpinor &u2)
EvtDiracSpinoroperator= (const EvtDiracSpinor &dspinor)
void set (const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
void set_spinor (int i, const EvtComplex &sp)
virtual ~EvtDiracSpinor ()

Private Attributes

EvtComplex spinor [4]

Friends

EvtDiracSpinor boostTo (const EvtDiracSpinor &sp, const EvtVector3R boost)
EvtDiracSpinor boostTo (const EvtDiracSpinor &sp, const EvtVector4R p4)
EvtVector4C EvtLeptonACurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtComplex EvtLeptonPCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtComplex EvtLeptonSCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtTensor4C EvtLeptonTCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtVector4C EvtLeptonVACurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtVector4C EvtLeptonVCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtDiracSpinor operator * (const EvtComplex &c, const EvtDiracSpinor &d)
EvtDiracSpinor operator+ (const EvtDiracSpinor &u1, const EvtDiracSpinor &u2)
EvtDiracSpinor operator- (const EvtDiracSpinor &u1, const EvtDiracSpinor &u2)
std::ostreamoperator<< (std::ostream &s, const EvtDiracSpinor &c)
EvtDiracSpinor rotateEuler (const EvtDiracSpinor &sp, double alpha, double beta, double gamma)


Constructor & Destructor Documentation

EvtDiracSpinor::EvtDiracSpinor  )  [inline]
 

00108                               {
00109 
00110   spinor[0]=EvtComplex(); spinor[1]=EvtComplex();
00111   spinor[2]=EvtComplex(); spinor[3]=EvtComplex();
00112 
00113 }

EvtDiracSpinor::EvtDiracSpinor const EvtComplex sp0,
const EvtComplex sp1,
const EvtComplex sp2,
const EvtComplex sp3
 

00036                                                                                 {
00037   set(sp0,sp1,sp2,sp3);
00038 }

EvtDiracSpinor::~EvtDiracSpinor  )  [virtual]
 

00033 {}

EvtDiracSpinor::EvtDiracSpinor const EvtDiracSpinor dspinor  )  [inline]
 

00115                                                            {
00116 
00117   spinor[0]=dspinor.spinor[0];
00118   spinor[1]=dspinor.spinor[1];
00119   spinor[2]=dspinor.spinor[2];
00120   spinor[3]=dspinor.spinor[3];
00121 
00122 }


Member Function Documentation

EvtDiracSpinor EvtDiracSpinor::adjoint  )  const
 

00342 {
00343     EvtDiracSpinor d = this->conj(); // first conjugate, then multiply with gamma0
00344     EvtGammaMatrix g0 = EvtGammaMatrix::g0();
00345     EvtDiracSpinor result; // automatically initialized to 0
00346 
00347     for (int i=0; i<4; ++i)
00348         for (int j=0; j<4; ++j)
00349             result.spinor[i] += d.spinor[j] * g0.gamma[i][j];
00350 
00351     return result;
00352 }

void EvtDiracSpinor::applyBoostTo const EvtVector3R boost  ) 
 

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  ) 
 

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
 

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
 

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
 

00060                                                         { 
00061    
00062   return spinor[i];
00063 
00064 }

EvtDiracSpinor & EvtDiracSpinor::operator+= const EvtDiracSpinor u2  )  [inline]
 

00135                                                                          {
00136 
00137   spinor[0]+=u2.spinor[0];
00138   spinor[1]+=u2.spinor[1];
00139   spinor[2]+=u2.spinor[2];
00140   spinor[3]+=u2.spinor[3];
00141   
00142   return *this; 
00143 }

EvtDiracSpinor & EvtDiracSpinor::operator-= const EvtDiracSpinor u2  )  [inline]
 

00152                                                                          {
00153 
00154   spinor[0]-=u2.spinor[0];
00155   spinor[1]-=u2.spinor[1];
00156   spinor[2]-=u2.spinor[2];
00157   spinor[3]-=u2.spinor[3];
00158   
00159   return *this; 
00160 }

EvtDiracSpinor & EvtDiracSpinor::operator= const EvtDiracSpinor dspinor  )  [inline]
 

00124                                                                       {
00125 
00126   spinor[0]=dspinor.spinor[0];
00127   spinor[1]=dspinor.spinor[1];
00128   spinor[2]=dspinor.spinor[2];
00129   spinor[3]=dspinor.spinor[3];
00130 
00131   return *this;
00132 
00133 }

void EvtDiracSpinor::set const EvtComplex sp0,
const EvtComplex sp1,
const EvtComplex sp2,
const EvtComplex sp3
 

00041                                                                      {
00042 
00043   spinor[0]=sp0;spinor[1]=sp1;spinor[2]=sp2;spinor[3]=sp3;
00044 }

void EvtDiracSpinor::set_spinor int  i,
const EvtComplex sp
 

00046                                                          {
00047 
00048   spinor[i]=sp;
00049 }


Friends And Related Function Documentation

EvtDiracSpinor boostTo const EvtDiracSpinor sp,
const EvtVector3R  boost
[friend]
 

00085                                                {
00086 
00087   EvtDiracSpinor tmp(sp);
00088   tmp.applyBoostTo(boost);
00089   return tmp;
00090 
00091 }

EvtDiracSpinor boostTo const EvtDiracSpinor sp,
const EvtVector4R  p4
[friend]
 

00076                                             {
00077 
00078   EvtDiracSpinor tmp(sp);
00079   tmp.applyBoostTo(p4);
00080   return tmp;
00081 
00082 }

EvtVector4C EvtLeptonACurrent const EvtDiracSpinor d,
const EvtDiracSpinor dp
[friend]
 

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]
 

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]
 

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]
 

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 }

EvtVector4C EvtLeptonVACurrent const EvtDiracSpinor d,
const EvtDiracSpinor dp
[friend]
 

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]
 

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]
 

00332                                                                        {
00333      EvtDiracSpinor result;
00334      result.spinor[0] = c*d.spinor[0];
00335      result.spinor[1] = c*d.spinor[1];
00336      result.spinor[2] = c*d.spinor[2];
00337      result.spinor[3] = c*d.spinor[3];
00338      return result;
00339  }

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]
 

00067                                                                  {
00068 
00069   EvtDiracSpinor tmp(sp);
00070   tmp.applyRotateEuler(alpha,beta,gamma);
00071   return tmp;
00072 
00073 }


Member Data Documentation

EvtComplex EvtDiracSpinor::spinor[4] [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:05:08 2011 for BOSS6.5.5 by  doxygen 1.3.9.1