00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_LorentzRSSpinor_H
00010 #define ThePEG_LorentzRSSpinor_H
00011
00012 #include "ThePEG/Config/ThePEG.h"
00013 #include "ThePEG/Vectors/ThreeVector.h"
00014 #include "HelicityDefinitions.h"
00015 #include "LorentzRSSpinor.fh"
00016 #include "LorentzRSSpinorBar.h"
00017 #include "LorentzSpinorBar.h"
00018 #include "LorentzSpinor.h"
00019 #include "LorentzPolarizationVector.h"
00020
00021 namespace ThePEG{
00022 namespace Helicity{
00023
00072 template<typename Value>
00073 class LorentzRSSpinor {
00074
00075 public:
00076
00082 LorentzRSSpinor(SpinorType t = unknown_spinortype) : _type(t) {
00083 for(unsigned int ix=0;ix<4;++ix)
00084 for(unsigned int iy=0;iy<4;++iy)
00085 _spin[ix][iy]=Value();
00086 }
00087
00092 LorentzRSSpinor(complex<Value> a1, complex<Value> b1,
00093 complex<Value> c1, complex<Value> d1,
00094 complex<Value> a2, complex<Value> b2,
00095 complex<Value> c2, complex<Value> d2,
00096 complex<Value> a3, complex<Value> b3,
00097 complex<Value> c3, complex<Value> d3,
00098 complex<Value> a4, complex<Value> b4,
00099 complex<Value> c4, complex<Value> d4,
00100 SpinorType t=unknown_spinortype)
00101 : _type(t) {
00102 _spin[0][0]=a1;_spin[1][0]=a2;_spin[2][0]=a3;_spin[3][0]=a4;
00103 _spin[0][1]=b1;_spin[1][1]=b2;_spin[2][1]=b3;_spin[3][1]=b4;
00104 _spin[0][2]=c1;_spin[1][2]=c2;_spin[2][2]=c3;_spin[3][2]=c4;
00105 _spin[0][3]=d1;_spin[1][3]=d2;_spin[2][3]=d3;_spin[3][3]=d4;
00106 }
00108
00114 complex<Value> operator()(int i, int j) const {
00115 assert( i >= 0 && i <= 3 && j>=0 && j<=3);
00116 return _spin[i][j];
00117 }
00118
00122 complex<Value> & operator () (int i, int j) {
00123 assert( i >= 0 && i <= 3 && j>=0 && j<=3);
00124 return _spin[i][j];
00125 }
00126
00130 complex<Value> xs1() const {return _spin[0][0];}
00131
00135 complex<Value> xs2() const {return _spin[0][0];}
00136
00140 complex<Value> xs3() const {return _spin[0][1];}
00141
00145 complex<Value> xs4() const {return _spin[0][3];}
00146
00150 complex<Value> ys1() const {return _spin[1][0];}
00151
00155 complex<Value> ys2() const {return _spin[1][1];}
00156
00160 complex<Value> ys3() const {return _spin[1][2];}
00161
00165 complex<Value> ys4() const {return _spin[1][3];}
00166
00170 complex<Value> zs1() const {return _spin[2][0];}
00171
00175 complex<Value> zs2() const {return _spin[2][1];}
00176
00180 complex<Value> zs3() const {return _spin[2][2];}
00181
00185 complex<Value> zs4() const {return _spin[2][3];}
00186
00190 complex<Value> ts1() const {return _spin[3][0];}
00191
00195 complex<Value> ts2() const {return _spin[3][1];}
00196
00200 complex<Value> ts3() const {return _spin[3][2];}
00201
00205 complex<Value> ts4() const {return _spin[3][3];}
00206
00210 void setXS1(complex<Value> in) {_spin[0][0]=in;}
00211
00215 void setXS2(complex<Value> in) {_spin[0][1]=in;}
00216
00220 void setXS3(complex<Value> in) {_spin[0][2]=in;}
00221
00225 void setXS4(complex<Value> in) {_spin[0][3]=in;}
00226
00230 void setYS1(complex<Value> in) {_spin[1][0]=in;}
00231
00235 void setYS2(complex<Value> in) {_spin[1][1]=in;}
00236
00240 void setYS3(complex<Value> in) {_spin[1][2]=in;}
00241
00245 void setYS4(complex<Value> in) {_spin[1][3]=in;}
00246
00250 void setZS1(complex<Value> in) {_spin[2][0]=in;}
00251
00255 void setZS2(complex<Value> in) {_spin[2][1]=in;}
00256
00260 void setZS3(complex<Value> in) {_spin[2][2]=in;}
00261
00265 void setZS4(complex<Value> in) {_spin[2][3]=in;}
00266
00270 void setTS1(complex<Value> in) {_spin[3][0]=in;}
00271
00275 void setTS2(complex<Value> in) {_spin[3][1]=in;}
00276
00280 void setTS3(complex<Value> in) {_spin[3][2]=in;}
00281
00285 void setTS4(complex<Value> in) {_spin[3][3]=in;}
00287
00293 LorentzSpinor<Value> dot(const LorentzPolarizationVector & vec) const {
00294 LorentzSpinor<Value> output(_type);
00295 complex<Value> temp;
00296 unsigned int ix;
00297 for(ix=0;ix<4;++ix) {
00298 temp = _spin[3][ix]*vec.t();
00299 temp -= _spin[0][ix]*vec.x();
00300 temp -= _spin[1][ix]*vec.y();
00301 temp -= _spin[2][ix]*vec.z();
00302 output[ix]=temp;
00303 }
00304 return output;
00305 }
00306
00310 LorentzSpinor<Value> dot(const LorentzMomentum & invec) const {
00311 LorentzSpinor<Value> output(_type);
00312 complex<Value> temp;
00313 LorentzVector<double> vec = UnitRemoval::InvE * invec;
00314 unsigned int ix;
00315 for(ix=0;ix<4;++ix) {
00316 temp = - ( _spin[0][ix]*vec.x() + _spin[1][ix]*vec.y()+
00317 _spin[2][ix]*vec.z() ) + _spin[3][ix]*vec.t();
00318 output[ix]=temp;
00319 }
00320 return output;
00321 }
00323
00329 LorentzRSSpinorBar<Value> bar() const;
00330
00334 LorentzRSSpinor & boost(double,double,double);
00335
00339 LorentzRSSpinor & boost(const Boost &);
00340
00344 LorentzRSSpinor & transform(const LorentzRotation &);
00346
00349
00353 SpinorType Type() const {return _type;}
00355
00362 template <typename ValueB>
00363 complex<typename BinaryOpTraits<Value,ValueB>::MulT>
00364 generalScalar(LorentzRSSpinorBar<ValueB>& fbar, Complex left, Complex right) {
00365 complex<typename BinaryOpTraits<Value,ValueB>::MulT> output;
00366 unsigned int iz;
00367 output =
00368 left*(fbar(3,0)*_spin[3][0]+fbar(3,1)*_spin[3][1])
00369 +right*(fbar(3,2)*_spin[3][2]+fbar(3,3)*_spin[3][3]);
00370 for(iz=0;iz<3;++iz) {
00371 output -=
00372 left*(fbar(iz,0)*_spin[iz][0]+fbar(iz,1)*_spin[iz][1])
00373 +right*(fbar(iz,2)*_spin[iz][2]+fbar(iz,3)*_spin[iz][3]);
00374 }
00375 return output;
00376 }
00377
00384 template <typename ValueB>
00385 LorentzVector<complex<typename BinaryOpTraits<Value,ValueB>::MulT> >
00386 generalCurrent(LorentzSpinorBar<ValueB>& fbar, Complex left, Complex right) {
00387 typedef complex<typename BinaryOpTraits<Value,ValueB>::MulT> ResultT;
00388 ResultT output[4];
00389 for(size_t iz=0;iz<4;++iz)
00390 output[iz]= left*(fbar.s1()*_spin[iz][0]+fbar.s2()*_spin[iz][1])
00391 +right*(fbar.s3()*_spin[iz][2]+fbar.s4()*_spin[iz][3]);
00392 return LorentzVector<ResultT>(output[0],output[1],output[2],output[3]);
00393 }
00394
00395 private:
00396
00400 SpinorType _type;
00401
00405 complex<Value> _spin[4][4];
00406 };
00407
00408 }
00409 }
00410 #ifndef ThePEG_TEMPLATES_IN_CC_FILE
00411 #include "LorentzRSSpinor.tcc"
00412 #endif
00413
00414 #endif