thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
RSSpinorBarWaveFunction.h
1 // -*- C++ -*-
2 //
3 // RSSpinorBarWaveFunction.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_RSSpinorBarWaveFunction_H
10 #define ThePEG_RSSpinorBarWaveFunction_H
11 //
12 // This is the declaration of the RSSpinorBarWaveFunction class.
13 //
14 #include "WaveFunctionBase.h"
15 #include <ThePEG/Helicity/LorentzRSSpinorBar.h>
16 #include <ThePEG/Helicity/RSFermionSpinInfo.h>
17 #include <ThePEG/EventRecord/Particle.h>
18 #include <ThePEG/EventRecord/RhoDMatrix.h>
19 
20 namespace ThePEG {
21 
22 namespace Helicity {
23 
61 
62 public:
63 
88  complex<double> xs1, complex<double> xs2,
89  complex<double> xs3, complex<double> xs4,
90  complex<double> ys1, complex<double> ys2,
91  complex<double> ys3, complex<double> ys4,
92  complex<double> zs1, complex<double> zs2,
93  complex<double> zs3, complex<double> zs4,
94  complex<double> ts1, complex<double> ts2,
95  complex<double> ts3, complex<double> ts4)
96  : WaveFunctionBase(p,part), _wf(xs1,xs2,xs3,xs4,
97  ys1,ys2,ys3,ys4,
98  zs1,zs2,zs3,zs4,
99  ts1,ts2,ts3,ts4)
100  {
101  assert(iSpin()==4);
102  }
103 
112  Direction dir=intermediate)
113  : WaveFunctionBase(p,part,dir), _wf(wave)
114  {
115  assert(iSpin()==4);
116  }
117 
126  Direction dir=intermediate)
127  : WaveFunctionBase(p->momentum(),p->dataPtr(),dir), _wf(wave.Type())
128  {
129  assert(iSpin()==4);
130  for (unsigned int i=0; i<4; ++i)
131  for(unsigned int j=0; j<4; ++j)
132  _wf(i,j)=Complex(wave(i,j)*UnitRemoval::InvSqrtE);
133  }
134 
143  unsigned int ihel,Direction dir)
144  : WaveFunctionBase(p,part,dir)
145  {
146  assert(iSpin()==4);
147  calculateWaveFunction(ihel);
148  }
149 
158  : WaveFunctionBase(p,part,dir), _wf()
159  {
160  assert(iSpin()==4);
161  }
162 
167  : WaveFunctionBase(), _wf()
168  {}
169 
173  RSSpinorBarWaveFunction(vector<RSSpinorBarWaveFunction> & wave,
174  tPPtr part,Direction dir,bool time,bool=true) {
175  calculateWaveFunctions(wave,part,dir);
176  constructSpinInfo(wave,part,dir,time);
177  }
179 
188  complex<double> operator ()(int i, int j) const {
189  assert( i>=0 && i<=3 && j>=0 && j<=3 );
190  return _wf(i,j);
191  }
192 
196  const LorentzRSSpinorBar<double> & wave() const {return _wf;}
197 
201  for (unsigned int i=0; i<4; ++i)
202  for (unsigned int j=0; j<4; ++j)
203  temp(i,j) = _wf(i,j)*UnitRemoval::SqrtE;
204  return temp;
205  }
206 
210  complex<double> xs1() const {return _wf.xs1();}
211 
215  complex<double> xs2() const {return _wf.xs2();}
216 
220  complex<double> xs3() const {return _wf.xs3();}
221 
225  complex<double> xs4() const {return _wf.xs4();}
226 
230  complex<double> ys1() const {return _wf.ys1();}
231 
235  complex<double> ys2() const {return _wf.ys2();}
236 
240  complex<double> ys3() const {return _wf.ys3();}
241 
245  complex<double> ys4() const {return _wf.ys4();}
246 
250  complex<double> zs1() const {return _wf.zs1();}
251 
255  complex<double> zs2() const {return _wf.zs2();}
256 
260  complex<double> zs3() const {return _wf.zs3();}
261 
265  complex<double> zs4() const {return _wf.zs4();}
266 
270  complex<double> ts1() const {return _wf.ts1();}
271 
275  complex<double> ts2() const {return _wf.ts2();}
276 
280  complex<double> ts3() const {return _wf.ts3();}
281 
285  complex<double> ts4() const {return _wf.ts4();}
287 
296  void reset(unsigned int ihel) {
297  calculateWaveFunction(ihel);
298  }
300 
301 public:
302 
306  void transform(const LorentzRotation & r) {
307  _wf.transform(r);
309  }
310 
311 public:
312 
316  static void calculateWaveFunctions(vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
318 
322  static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
323  tPPtr particle,Direction);
324 
328  static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
329  const Lorentz5Momentum & momentum,
330  tcPDPtr parton,Direction);
331 
335  static void calculateWaveFunctions(vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
336  RhoDMatrix & rho,
337  tPPtr particle,Direction);
338 
342  static void calculateWaveFunctions(vector<RSSpinorBarWaveFunction> & waves,
343  RhoDMatrix & rho,
344  tPPtr particle,Direction);
345 
349  static void constructSpinInfo(const vector<LorentzRSSpinorBar<SqrtEnergy> > & waves,
350  tPPtr part,Direction dir, bool time);
351 
355  static void constructSpinInfo(const vector<RSSpinorBarWaveFunction> & waves,
356  tPPtr part,Direction dir, bool time);
357 
358 private:
359 
364  void calculateWaveFunction(unsigned int ihel);
365 
366  private:
367 
372 };
373 
374 }
375 }
376 
377 #endif /* ThePEG_RSSpinorBarWaveFunction_H */
378 
RSSpinorBarWaveFunction(vector< RSSpinorBarWaveFunction > &wave, tPPtr part, Direction dir, bool time, bool=true)
Special for spin correlations.
complex< Value > ys2() const
Get second spinor component for the y vector.
void calculateWaveFunction(unsigned int ihel)
Calcuate the wavefunction.
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
RSSpinorBarWaveFunction(Lorentz5Momentum p, tcPDPtr part, Direction dir)
Constructor, set the momentum, direction, zero the wavefunction.
complex< Value > ys3() const
Get third spinor component for the y vector.
LorentzRSSpinorBar< double > _wf
storage of the Lorentz RSSpinorBar
complex< Value > ts1() const
Get first spinor component for the t vector.
complex< double > xs1() const
Get first spinor component for the x vector.
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
complex< double > ts3() const
Get third spinor component for the t vector.
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< double > zs1() const
Get first spinor component for the z vector.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
complex< double > xs4() const
Get fourth spinor component for the x vector.
const LorentzRSSpinorBar< double > & wave() const
return wavefunction as LorentzRSSpinorBar
complex< Value > xs4() const
Get fourth spinor component for the x vector.
An intermediate particle.
static void calculateWaveFunctions(vector< LorentzRSSpinorBar< SqrtEnergy > > &waves, tPPtr particle, Direction)
Calculate the wavefunctions.
complex< Value > ys4() const
Get fourth spinor component for the y vector.
complex< double > ys3() const
Get third spinor component for the y vector.
complex< double > ys4() const
Get fourth spinor component for the y vector.
complex< Value > zs1() const
Get first spinor component for the z vector.
complex< double > zs2() const
Get second spinor component for the z vector.
RSSpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, complex< double > xs1, complex< double > xs2, complex< double > xs3, complex< double > xs4, complex< double > ys1, complex< double > ys2, complex< double > ys3, complex< double > ys4, complex< double > zs1, complex< double > zs2, complex< double > zs3, complex< double > zs4, complex< double > ts1, complex< double > ts2, complex< double > ts3, complex< double > ts4)
Constructor, set the momentum and the components of the spinor.
complex< Value > ts3() const
Get third spinor component for the t vector.
void reset(unsigned int ihel)
reset functions
complex< Value > ys1() const
Get first spinor component for the y vector.
complex< Value > zs4() const
Get fourth spinor component for the z vector.
complex< Value > xs1() const
Get first spinor component for the x vector.
RSSpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, const LorentzRSSpinorBar< double > &wave, Direction dir=intermediate)
Constructor, set the momentum and the wavefunction.
complex< Value > ts4() const
Get fourth spinor component for the t vector.
complex< Value > ts2() const
Get second spinor component for the t vector.
complex< double > xs3() const
Get third spinor component for the x vector.
SpinorType Type() const
Return the type of the spinor.
complex< double > ys1() const
Get first spinor component for the y vector.
complex< Value > xs2() const
Get second spinor component for the x vector.
static void constructSpinInfo(const vector< LorentzRSSpinorBar< SqrtEnergy > > &waves, tPPtr part, Direction dir, bool time)
Construct the SpinInfo object.
PDT::Spin iSpin() const
Get 2s+1 for the particle.
LorentzRSSpinorBar & transform(const LorentzRotation &)
General transform.
LorentzRSSpinorBar< SqrtEnergy > dimensionedWf() const
Return wavefunction as LorentzRSSpinorBar<SqrtEnergy>
complex< double > ys2() const
Get second spinor component for the y vector.
complex< Value > zs3() const
Get third spinor component for the z vector.
The RSSpinorBarWaveFunction class is designed to store the wavefunction of a spin- particle in a for...
complex< Value > zs2() const
Get second spinor component for the z vector.
complex< double > zs4() const
Get fourth spinor component for the z vector.
complex< double > operator()(int i, int j) const
Access to the wavefunction and its components.
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
complex< double > zs3() const
Get third spinor component for the z vector.
RSSpinorBarWaveFunction(const tPPtr &p, const LorentzRSSpinorBar< SqrtEnergy > &wave, Direction dir=intermediate)
Constructor, set the particle and the wavefunction.
tcPDPtr particle() const
Get the particle pointer.
void transform(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.
The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are require...
Definition: RhoDMatrix.h:28
complex< double > ts4() const
Get fourth spinor component for the t vector.
RSSpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, unsigned int ihel, Direction dir)
Constructor, set the momentum, helicity, direction.
complex< double > ts1() const
Get first spinor component for the t vector.
complex< Value > xs3() const
Get third spinor component for the x vector.
complex< double > ts2() const
Get second spinor component for the t vector.
complex< double > xs2() const
Get second spinor component for the x vector.
void transformMomentum(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.