00001 // -*- C++ -*- 00002 // 00003 // LorentzSpinorBar.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 2003-2007 Peter Richardson, Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef ThePEG_LorentzSpinorBar_H 00010 #define ThePEG_LorentzSpinorBar_H 00011 // This is the declaration of the LorentzSpinorBar class. 00012 00013 #include "ThePEG/Config/ThePEG.h" 00014 #include "ThePEG/Vectors/LorentzRotation.h" 00015 #include "ThePEG/Vectors/ThreeVector.h" 00016 #include "HelicityDefinitions.h" 00017 #include "LorentzSpinor.fh" 00018 #include "LorentzSpinorBar.fh" 00019 00020 namespace ThePEG { 00021 namespace Helicity { 00022 00034 template<typename Value> 00035 class LorentzSpinorBar { 00036 public: 00037 00043 LorentzSpinorBar(SpinorType t = unknown_spinortype) : _type(t) { 00044 for(unsigned int ix=0;ix<4;++ix) _spin[ix]=Value(); 00045 } 00046 00051 LorentzSpinorBar(complex<Value> a, complex<Value> b, 00052 complex<Value> c, complex<Value> d, 00053 SpinorType t = unknown_spinortype) 00054 : _type(t) { 00055 _spin[0]=a; 00056 _spin[1]=b; 00057 _spin[2]=c; 00058 _spin[3]=d; 00059 } 00061 00067 complex<Value> operator[](int i) const { 00068 assert( i>= 0 && i <= 3 ); 00069 return _spin[i]; 00070 } 00071 00075 complex<Value> operator()(int i) const { 00076 assert( i>= 0 && i <= 3 ); 00077 return _spin[i]; 00078 } 00079 00083 complex<Value> & operator()(int i) { 00084 assert( i>= 0 && i <= 3 ); 00085 return _spin[i]; 00086 } 00087 00091 complex<Value> & operator[](int i) { 00092 assert( i>= 0 && i <= 3 ); 00093 return _spin[i]; 00094 } 00095 00099 complex<Value> s1() const {return _spin[0];} 00100 00104 complex<Value> s2() const {return _spin[1];} 00105 00109 complex<Value> s3() const {return _spin[2];} 00110 00114 complex<Value> s4() const {return _spin[3];} 00115 00119 void setS1(complex<Value> in) {_spin[0]=in;} 00120 00124 void setS2(complex<Value> in) {_spin[1]=in;} 00125 00129 void setS3(complex<Value> in) {_spin[2]=in;} 00130 00134 void setS4(complex<Value> in) {_spin[3]=in;} 00136 00142 LorentzSpinor<Value> bar() const; 00143 00149 LorentzSpinorBar conjugate() const; 00150 00154 LorentzSpinorBar & boost(double,double,double); 00155 00159 LorentzSpinorBar & boost(const Boost &); 00160 00164 LorentzSpinorBar & transform(const SpinHalfLorentzRotation &) ; 00165 00169 LorentzSpinorBar & transform(const LorentzRotation & r) { 00170 transform(r.half()); 00171 return *this; 00172 } 00174 00180 SpinorType Type() const {return _type;} 00182 00183 private: 00187 SpinorType _type; 00188 00192 complex<Value> _spin[4]; 00193 }; 00194 00195 } 00196 } 00197 00198 #ifndef ThePEG_TEMPLATES_IN_CC_FILE 00199 #include "LorentzSpinorBar.tcc" 00200 #endif 00201 00202 #endif