ThePEG  1.8.0
SpinorBarWaveFunction.h
1 // -*- C++ -*-
2 //
3 // SpinorBarWaveFunction.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 2003-2011 Peter Richardson, Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_SpinorBarWaveFunction_H
10 #define ThePEG_SpinorBarWaveFunction_H
11 //
12 // This is the declaration of the SpinorBarWaveFunction class.
13 
14 #include "WaveFunctionBase.h"
15 #include <ThePEG/Helicity/LorentzSpinorBar.h>
16 #include <ThePEG/Helicity/FermionSpinInfo.h>
17 #include <ThePEG/EventRecord/Particle.h>
18 #include <ThePEG/EventRecord/RhoDMatrix.h>
19 
20 namespace ThePEG {
21 
22 namespace Helicity {
23 
27 class SpinorWaveFunction;
28 
58 
59 public:
60 
73  complex<double> s1,complex<double> s2,
74  complex<double> s3,complex<double> s4)
75  : WaveFunctionBase(p,part), _wf(s1,s2,s3,s4)
76  {
77  assert(iSpin()==2);
78  }
79 
80 
91  : WaveFunctionBase(p,part,dir), _wf(wave)
92  {
93  assert(iSpin()==2);
94  }
95 
96  SpinorBarWaveFunction(const tPPtr & p,
99  : WaveFunctionBase(p->momentum(),p->dataPtr(),dir),
100  _wf(wave.Type())
101  {
102  assert(iSpin()==2);
103  for (unsigned int i=0; i<4; ++i)
104  _wf[i]=wave[i]*UnitRemoval::InvSqrtE;
105  }
106 
115  unsigned int ihel,Direction dir)
116  : WaveFunctionBase(p,part,dir)
117  {
118  assert(iSpin()==2);
119  calculateWaveFunction(ihel);
120  }
121 
130  Direction dir)
131  : WaveFunctionBase(p,part,dir), _wf()
132  {
133  assert(iSpin()==2);
134  }
135 
140  : WaveFunctionBase(), _wf()
141  {}
142 
146  SpinorBarWaveFunction(vector<SpinorBarWaveFunction> & wave,
147  tPPtr part,Direction dir,bool time,bool=true) {
148  calculateWaveFunctions(wave,part,dir);
149  constructSpinInfo(wave,part,dir,time);
150  }
152 
160  complex<double> operator ()(int i) const {
161  assert(i>=0 &&i<=3);
162  return _wf(i);
163  }
164 
168  const LorentzSpinorBar<double> & wave() const {return _wf;}
169 
172  return dimensionedWf();
173  }
174 
178  complex<double> s1() const {return _wf.s1();}
179 
183  complex<double> s2() const {return _wf.s2();}
184 
188  complex<double> s3() const {return _wf.s3();}
189 
193  complex<double> s4() const {return _wf.s4();}
194 
200  void conjugate();
201 
206 
215  void reset(unsigned int ihel) {
216  calculateWaveFunction(ihel);
217  }
219 
220 private:
221 
226  void calculateWaveFunction(unsigned int ihel);
227 
228 
229 public:
230 
234  void transform(const LorentzRotation & r) {
235  _wf.transform(r);
237  }
238 
239 public:
240 
244  static void calculateWaveFunctions(vector<LorentzSpinorBar<SqrtEnergy> > & waves,
246 
250  static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
252 
256  static void calculateWaveFunctions(vector<LorentzSpinorBar<SqrtEnergy> > & waves,
257  RhoDMatrix & rho,
259 
263  static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
264  RhoDMatrix & rho,
266 
270  static void constructSpinInfo(const vector<LorentzSpinorBar<SqrtEnergy> > & waves,
271  tPPtr part,Direction dir, bool time);
272 
276  static void constructSpinInfo(const vector<SpinorBarWaveFunction> & waves,
277  tPPtr part,Direction dir, bool time);
278 
279 private:
280 
285 
289  for (unsigned int i=0; i<4; ++i)
290  temp(i) = _wf(i)*UnitRemoval::SqrtE;
291  return temp;
292  }
293 };
294 }
295 }
296 
297 #endif
298 
299 
300 
301