thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
SpinorBarWaveFunction.h
1 // -*- C++ -*-
2 //
3 // SpinorBarWaveFunction.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 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]=Complex(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,
251  tPPtr particle,Direction);
252 
256  static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
257  const Lorentz5Momentum & momentum,
258  tcPDPtr parton,Direction);
259 
263  static void calculateWaveFunctions(vector<LorentzSpinorBar<SqrtEnergy> > & waves,
264  RhoDMatrix & rho,
265  tPPtr particle,Direction);
266 
270  static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
271  RhoDMatrix & rho,
272  tPPtr particle,Direction);
273 
277  static void constructSpinInfo(const vector<LorentzSpinorBar<SqrtEnergy> > & waves,
278  tPPtr part,Direction dir, bool time);
279 
283  static void constructSpinInfo(const vector<SpinorBarWaveFunction> & waves,
284  tPPtr part,Direction dir, bool time);
285 
286 private:
287 
292 
296  for (unsigned int i=0; i<4; ++i)
297  temp(i) = _wf(i)*UnitRemoval::SqrtE;
298  return temp;
299  }
300 };
301 }
302 }
303 
304 #endif
305 
306 
307 
308 
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
SpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, unsigned int ihel, Direction dir)
Constructor, set the momentum, helicity, direction.
complex< double > s1() const
Get the first spin component component.
void transform(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.
void reset(unsigned int ihel)
Reset functions.
LorentzSpinorBar & transform(const SpinHalfLorentzRotation &)
General Lorentz transformation.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
complex< double > s2() const
Get the second spin component component.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
complex< Value > s3() const
Get third component.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
const LorentzSpinorBar< double > & wave() const
Return wavefunction as LorentzSpinorBar<double>.
static void calculateWaveFunctions(vector< LorentzSpinorBar< SqrtEnergy > > &waves, tPPtr particle, Direction)
Calculate the wavefunctions.
An intermediate particle.
complex< double > s3() const
Get the third spin component component.
void conjugate()
Take the conjugate of the spinor .
complex< double > operator()(int i) const
Access to the wavefunction and its components.
complex< Value > s1() const
Get first component.
void calculateWaveFunction(unsigned int ihel)
Calcuate the wavefunction.
complex< Value > s2() const
Get second component.
SpinorType Type() const
Return the type of the spinor.
SpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, complex< double > s1, complex< double > s2, complex< double > s3, complex< double > s4)
Constructor, set the momentum and the components of the spinor.
complex< double > s4() const
Get the fourth spin component component.
SpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, const LorentzSpinorBar< double > &wave, Direction dir=intermediate)
Constructor, set the momentum and the wavefunction.
static void constructSpinInfo(const vector< LorentzSpinorBar< SqrtEnergy > > &waves, tPPtr part, Direction dir, bool time)
Construct the SpinInfo object.
PDT::Spin iSpin() const
Get 2s+1 for the particle.
complex< Value > s4() const
Get fourth component.
LorentzSpinorBar< SqrtEnergy > dimensionedWave() const
Return wavefunction as LorentzSpinorBar<SqrtEnergy>
LorentzSpinorBar< SqrtEnergy > dimensionedWf() const
Return wavefunction as LorentzSpinorBar<SqrtEnergy>
const Lorentz5Momentum & momentum() const
Access to the 5-momentum.
A Direction object can be used to specify that some following operations should be assumed to be perf...
Definition: Direction.h:41
SpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, Direction dir)
Constructor, set the momentum, direction, zero the wavefunction.
tcPDPtr particle() const
Get the particle pointer.
LorentzSpinorBar< double > _wf
Storage of the Lorentz SpinorBar wavefunction.
The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are require...
Definition: RhoDMatrix.h:28
SpinorWaveFunction bar()
Return the barred spinor.
SpinorBarWaveFunction(vector< SpinorBarWaveFunction > &wave, tPPtr part, Direction dir, bool time, bool=true)
Special for spin correlations.
void transformMomentum(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.