00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_SpinorWaveFunction_H
00010 #define ThePEG_SpinorWaveFunction_H
00011
00012
00013
00014 #include "WaveFunctionBase.h"
00015 #include <ThePEG/Helicity/LorentzSpinor.h>
00016 #include <ThePEG/Helicity/FermionSpinInfo.h>
00017 #include <ThePEG/EventRecord/Particle.h>
00018 #include <ThePEG/Helicity/RhoDMatrix.h>
00019
00020 namespace ThePEG {
00021
00022 namespace Helicity {
00023
00027 class SpinorBarWaveFunction;
00028
00056 class SpinorWaveFunction : public WaveFunctionBase {
00057
00058 public:
00059
00071 SpinorWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,complex<double> s1,
00072 complex<double> s2,complex<double> s3,complex<double> s4)
00073 : WaveFunctionBase(p,part), _wf(s1,s2,s3,s4)
00074 {
00075 assert(iSpin()==2);
00076 }
00077
00085 SpinorWaveFunction(const Lorentz5Momentum & p, tcPDPtr part,
00086 const LorentzSpinor<double> & wave,
00087 Direction dir=intermediate)
00088 : WaveFunctionBase(p,part,dir), _wf(wave)
00089 {
00090 assert(iSpin()==2);
00091 }
00092
00099 SpinorWaveFunction(const tPPtr & p, const LorentzSpinor<SqrtEnergy> & wave,
00100 Direction dir=intermediate)
00101 : WaveFunctionBase(p->momentum(), p->dataPtr(), dir), _wf(wave.Type())
00102 {
00103 assert(iSpin()==2);
00104 for (unsigned int i=0; i<4; ++i)
00105 _wf[i]=wave[i]*UnitRemoval::InvSqrtE;
00106 }
00107
00115 SpinorWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,
00116 unsigned int ihel,
00117 Direction dir)
00118 : WaveFunctionBase(p,part,dir)
00119 {
00120 assert(iSpin()==2);
00121 calculateWaveFunction(ihel);
00122 }
00123
00131 SpinorWaveFunction(const Lorentz5Momentum & p,
00132 tcPDPtr part,Direction dir)
00133 : WaveFunctionBase(p,part,dir), _wf()
00134 {
00135 assert(iSpin()==2);
00136 }
00137
00141 SpinorWaveFunction()
00142 : WaveFunctionBase(), _wf()
00143 {}
00144
00148 SpinorWaveFunction(vector<SpinorWaveFunction> & wave,
00149 tPPtr part,Direction dir,bool time,bool=true) {
00150 calculateWaveFunctions(wave,part,dir);
00151 constructSpinInfo(wave,part,dir,time);
00152 }
00154
00162 complex<double> operator ()(int i) const {
00163 assert(i>=0 &&i<=3);
00164 return _wf(i);
00165 }
00166
00170 const LorentzSpinor<double> & wave() const {return _wf;}
00171
00175 LorentzSpinor<SqrtEnergy> dimensionedWave() const {return dimensionedWf();}
00176
00180 complex<double> s1() const {return _wf.s1();}
00181
00185 complex<double> s2() const {return _wf.s2();}
00186
00190 complex<double> s3() const {return _wf.s3();}
00191
00195 complex<double> s4() const {return _wf.s4();}
00197
00203 void conjugate() {
00204 _wf=_wf.conjugate();
00205 }
00206
00210 SpinorBarWaveFunction bar();
00211
00220 void reset(unsigned int ihel) {
00221 calculateWaveFunction(ihel);
00222 }
00224
00225 public:
00226
00230 void transform(const LorentzRotation & r) {
00231 _wf.transform(r);
00232 transformMomentum(r);
00233 }
00234
00235 public:
00236
00240 static void calculateWaveFunctions(vector<LorentzSpinor<SqrtEnergy> > & waves,
00241 tPPtr particle,Direction);
00242
00246 static void calculateWaveFunctions(vector<SpinorWaveFunction> & waves,
00247 tPPtr particle,Direction);
00248
00252 static void calculateWaveFunctions(vector<LorentzSpinor<SqrtEnergy> > & waves,
00253 RhoDMatrix & rho,
00254 tPPtr particle,Direction);
00255
00259 static void calculateWaveFunctions(vector<SpinorWaveFunction> & waves,
00260 RhoDMatrix & rho,
00261 tPPtr particle,Direction);
00262
00266 static void constructSpinInfo(const vector<LorentzSpinor<SqrtEnergy> > & waves,
00267 tPPtr part,Direction dir, bool time);
00268
00272 static void constructSpinInfo(const vector<SpinorWaveFunction> & waves,
00273 tPPtr part,Direction dir, bool time);
00274
00275
00276 private:
00277
00282 void calculateWaveFunction(unsigned int ihel);
00283
00284 private:
00285
00289 LorentzSpinor<double> _wf;
00290
00292 LorentzSpinor<SqrtEnergy> dimensionedWf() const {
00293 LorentzSpinor<SqrtEnergy> temp(_wf.Type());
00294 for (unsigned int i=0; i<4; ++i)
00295 temp(i) = _wf(i)*UnitRemoval::SqrtE;
00296 return temp;
00297 }
00298
00299 };
00300
00301 }
00302
00303 }
00304 #endif
00305
00306
00307
00308