00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EVTGAMMAMATRIX_HH
00023 #define EVTGAMMAMATRIX_HH
00024
00025 #include "EvtGenBase/EvtComplex.hh"
00026 #include "EvtGenBase/EvtDiracSpinor.hh"
00027
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
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
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
00112 EvtGammaMatrix slash(const EvtVector4C& p);
00113
00114 #endif