00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_LorentzRSSpinorBar_H
00010 #define ThePEG_LorentzRSSpinorBar_H
00011
00012
00013 #include "ThePEG/Config/ThePEG.h"
00014 #include "ThePEG/Vectors/ThreeVector.h"
00015 #include "HelicityDefinitions.h"
00016 #include "LorentzRSSpinor.fh"
00017 #include "LorentzRSSpinorBar.fh"
00018 #include "LorentzSpinorBar.h"
00019 #include "LorentzSpinor.h"
00020 #include "LorentzPolarizationVector.h"
00021
00022 namespace ThePEG {
00023 namespace Helicity {
00024
00037 template <typename Value>
00038 class LorentzRSSpinorBar {
00039
00040 public:
00041
00047 LorentzRSSpinorBar(SpinorType t = unknown_spinortype) : _type(t) {
00048 for(unsigned int ix=0;ix<4;++ix)
00049 for(unsigned int iy=0;iy<4;++iy)
00050 _spin[ix][iy]=Value();
00051 }
00052
00057 LorentzRSSpinorBar(complex<Value> a1,complex<Value> b1,
00058 complex<Value> c1,complex<Value> d1,
00059 complex<Value> a2,complex<Value> b2,
00060 complex<Value> c2,complex<Value> d2,
00061 complex<Value> a3,complex<Value> b3,
00062 complex<Value> c3,complex<Value> d3,
00063 complex<Value> a4,complex<Value> b4,
00064 complex<Value> c4,complex<Value> d4,
00065 SpinorType t=unknown_spinortype)
00066 : _type(t) {
00067 _spin[0][0]=a1;_spin[1][0]=a2;_spin[2][0]=a3;_spin[3][0]=a4;
00068 _spin[0][1]=b1;_spin[1][1]=b2;_spin[2][1]=b3;_spin[3][1]=b4;
00069 _spin[0][2]=c1;_spin[1][2]=c2;_spin[2][2]=c3;_spin[3][2]=c4;
00070 _spin[0][3]=d1;_spin[1][3]=d2;_spin[2][3]=d3;_spin[3][3]=d4;
00071 }
00073
00079 complex<Value> operator()(int i, int j) const {
00080 assert( i >= 0 && i <= 3 && j>=0 && j<=3 );
00081 return _spin[i][j];
00082 }
00083
00087 complex<Value> & operator () (int i, int j) {
00088 assert( i >= 0 && i <= 3 && j>=0 && j<=3 );
00089 return _spin[i][j];
00090 }
00091
00095 complex<Value> xs1() const {return _spin[0][0];}
00096
00100 complex<Value> xs2() const {return _spin[0][1];}
00101
00105 complex<Value> xs3() const {return _spin[0][2];}
00106
00110 complex<Value> xs4() const {return _spin[0][3];}
00111
00115 complex<Value> ys1() const {return _spin[1][0];}
00116
00120 complex<Value> ys2() const {return _spin[1][1];}
00121
00125 complex<Value> ys3() const {return _spin[1][2];}
00126
00130 complex<Value> ys4() const {return _spin[1][3];}
00131
00135 complex<Value> zs1() const {return _spin[2][0];}
00136
00140 complex<Value> zs2() const {return _spin[2][1];}
00141
00145 complex<Value> zs3() const {return _spin[2][2];}
00146
00150 complex<Value> zs4() const {return _spin[2][3];}
00151
00155 complex<Value> ts1() const {return _spin[3][0];}
00156
00160 complex<Value> ts2() const {return _spin[3][1];}
00161
00165 complex<Value> ts3() const {return _spin[3][2];}
00166
00170 complex<Value> ts4() const {return _spin[3][3];}
00171
00175 void setXS1(complex<Value> in) {_spin[0][0]=in;}
00176
00180 void setXS2(complex<Value> in) {_spin[0][1]=in;}
00181
00185 void setXS3(complex<Value> in) {_spin[0][2]=in;}
00186
00190 void setXS4(complex<Value> in) {_spin[0][3]=in;}
00191
00195 void setYS1(complex<Value> in) {_spin[1][0]=in;}
00196
00200 void setYS2(complex<Value> in) {_spin[1][1]=in;}
00201
00205 void setYS3(complex<Value> in) {_spin[1][2]=in;}
00206
00210 void setYS4(complex<Value> in) {_spin[1][3]=in;}
00211
00215 void setZS1(complex<Value> in) {_spin[2][0]=in;}
00216
00220 void setZS2(complex<Value> in) {_spin[2][1]=in;}
00221
00225 void setZS3(complex<Value> in) {_spin[2][2]=in;}
00226
00230 void setZS4(complex<Value> in) {_spin[2][3]=in;}
00231
00235 void setTS1(complex<Value> in) {_spin[3][0]=in;}
00236
00240 void setTS2(complex<Value> in) {_spin[3][1]=in;}
00241
00245 void setTS3(complex<Value> in) {_spin[3][2]=in;}
00246
00250 void setTS4(complex<Value> in ) {_spin[3][3]=in;}
00252
00258 LorentzSpinorBar<Value> dot(const LorentzPolarizationVector & vec) const {
00259 LorentzSpinorBar<Value> output(_type);
00260 for(unsigned int ix=0;ix<4;++ix) {
00261 output[ix]=_spin[3][ix]*vec.t()-_spin[0][ix]*vec.x()
00262 -_spin[1][ix]*vec.y()-_spin[2][ix]*vec.z();
00263 }
00264 return output;
00265 }
00266
00270 LorentzSpinorBar<Value> dot(const LorentzMomentum & invec) const {
00271 LorentzSpinorBar<Value> output(_type);
00272 LorentzVector<double> vec = UnitRemoval::InvE * invec;
00273 unsigned int ix;
00274 for(ix=0;ix<4;++ix) {
00275 output[ix]=_spin[3][ix]*vec.t()-_spin[0][ix]*vec.x()
00276 -_spin[1][ix]*vec.y()-_spin[2][ix]*vec.z();
00277 }
00278 return output;
00279 }
00281
00287 LorentzRSSpinor<Value> bar() const;
00288
00292 LorentzRSSpinorBar & boost(double,double,double);
00293
00297 LorentzRSSpinorBar & boost(const Boost &);
00298
00302 LorentzRSSpinorBar & transform(const LorentzRotation &);
00304
00310 SpinorType Type() const {return _type;}
00312
00319 template <typename ValueB>
00320 LorentzVector<complex<
00321 typename BinaryOpTraits<Value,ValueB>::MulT> >
00322 generalCurrent(LorentzSpinor<ValueB>& f, Complex left, Complex right) {
00323 typedef complex<typename BinaryOpTraits<Value,ValueB>::MulT> ResultT;
00324 ResultT output[4];
00325 unsigned int iz;
00326 for(iz=0;iz<4;++iz){
00327 output[iz]= left*(_spin[iz][0]*f.s1()+_spin[iz][1]*f.s2())
00328 +right*(_spin[iz][2]*f.s3()+_spin[iz][3]*f.s4());
00329 }
00330 return LorentzVector<ResultT>(output[0],output[1],
00331 output[2],output[3]);
00332 }
00333
00334 private:
00338 SpinorType _type;
00339
00343 complex<Value> _spin[4][4];
00344 };
00345 }
00346 }
00347 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
00348 #include "LorentzRSSpinorBar.tcc"
00349 #endif
00350
00351 #endif