/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtGammaMatrix.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtGen/EvtGammaMatrix.hh
00012 //
00013 // Description: Class to manipulate gamma matrices. The reperesentation
00014 //              used is the "standard" Dirac representation.
00015 //
00016 // Modification history:
00017 //
00018 //    DJL/RYD     September 25, 1998         Module created
00019 //
00020 //------------------------------------------------------------------------
00021 
00022 #ifndef EVTGAMMAMATRIX_HH
00023 #define EVTGAMMAMATRIX_HH
00024 
00025 #include "EvtGenBase/EvtComplex.hh"
00026 #include "EvtGenBase/EvtDiracSpinor.hh" // needed for adjoint
00027 //#include <iostream.h>
00028 #include <iosfwd>
00029 class EvtGammaMatrix;
00030 class EvtVector4C;
00031 
00032 EvtGammaMatrix operator*(const EvtComplex& c,const EvtGammaMatrix& g);
00033 EvtGammaMatrix operator*(const EvtGammaMatrix& g, const EvtComplex& c);
00034 EvtGammaMatrix operator/(const EvtGammaMatrix& g, const double d);
00035 EvtDiracSpinor operator*(const EvtGammaMatrix& g,const EvtDiracSpinor& d);
00036 EvtComplex operator*(const EvtDiracSpinor& d,const EvtDiracSpinor& dp);
00037 inline EvtGammaMatrix operator+(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2);
00038 inline EvtGammaMatrix operator-(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2);
00039 inline EvtGammaMatrix operator*(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2);
00040 std::ostream& operator<<(std::ostream& s, const EvtGammaMatrix& v);  
00041 
00042 //=====================
00043 class EvtGammaMatrix {
00044 
00045         friend EvtGammaMatrix operator*(const EvtComplex& c,const EvtGammaMatrix& g);
00046         friend EvtGammaMatrix operator*(const EvtGammaMatrix& g, const EvtComplex& c);
00047         friend EvtGammaMatrix operator/(const EvtGammaMatrix& g, const double d);
00048         friend EvtDiracSpinor operator*(const EvtGammaMatrix& g,const EvtDiracSpinor& d);
00049         friend EvtComplex operator*(const EvtDiracSpinor& d,const EvtDiracSpinor& dp);
00050         friend EvtGammaMatrix operator+(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2);
00051         friend EvtGammaMatrix operator-(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2);
00052         friend EvtGammaMatrix operator*(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2);
00053         friend std::ostream& operator<<(std::ostream& s, const EvtGammaMatrix& v);
00054         friend EvtDiracSpinor EvtDiracSpinor::adjoint() const;
00055         
00056     public:
00057 
00058         EvtGammaMatrix();
00059         virtual ~EvtGammaMatrix();
00060         EvtGammaMatrix(const EvtGammaMatrix& gm);  
00061         EvtGammaMatrix& operator=(const EvtGammaMatrix& gm);  
00062 
00063         void init();
00064         //void dump();   
00065         static const EvtGammaMatrix& g0();
00066         static const EvtGammaMatrix& g1();
00067         static const EvtGammaMatrix& g2();
00068         static const EvtGammaMatrix& g3();
00069         static const EvtGammaMatrix& g5();
00070         static const EvtGammaMatrix& id();
00071         static const EvtGammaMatrix& va0();
00072         static const EvtGammaMatrix& va1();
00073         static const EvtGammaMatrix& va2();
00074         static const EvtGammaMatrix& va3();
00075         static const EvtGammaMatrix& v0();
00076         static const EvtGammaMatrix& v1();
00077         static const EvtGammaMatrix& v2();
00078         static const EvtGammaMatrix& v3();
00079         // Dirac sigma matrix with upper or lower indices (only one element)
00080         static const EvtGammaMatrix& sigmaUpper(unsigned int mu, unsigned int nu);
00081         static const EvtGammaMatrix& sigmaLower(unsigned int mu, unsigned int nu);
00082         
00083         EvtGammaMatrix& operator+=(const EvtGammaMatrix &g);
00084         EvtGammaMatrix& operator-=(const EvtGammaMatrix &g);
00085         EvtGammaMatrix& operator*=(const EvtGammaMatrix &g);
00086   
00087     private:
00088         EvtComplex gamma[4][4];
00089 };
00090 
00091 
00092 inline EvtGammaMatrix operator+(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2){
00093     return EvtGammaMatrix(g1)+=g2;
00094 }
00095 
00096 inline EvtGammaMatrix operator-(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2){
00097   return EvtGammaMatrix(g1)-=g2;
00098 }
00099 
00100 inline EvtGammaMatrix operator*(const EvtGammaMatrix& g1,const EvtGammaMatrix& g2){
00101   return EvtGammaMatrix(g1)*=g2;
00102 }
00103 
00104 inline EvtGammaMatrix operator/(const EvtGammaMatrix& g, const double d)
00105 {
00106     return g * EvtComplex(1/d,0);
00107 }
00108 
00109 
00110 
00111 // slash or Feynman dagger a 4-vector
00112 EvtGammaMatrix slash(const EvtVector4C& p);
00113 
00114 #endif

Generated on Tue Nov 29 23:12:13 2016 for BOSS_7.0.2 by  doxygen 1.4.7