thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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
20namespace ThePEG {
21
22namespace Helicity {
23
27class SpinorWaveFunction;
28
58
59public:
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
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);
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) {
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) {
217 }
219
220private:
221
226 void calculateWaveFunction(unsigned int ihel);
227
228
229public:
230
234 void transform(const LorentzRotation & r) {
235 _wf.transform(r);
237 }
238
239public:
240
246
250 static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
252
256 static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
258 tcPDPtr parton,Direction);
259
264 RhoDMatrix & rho,
266
270 static void calculateWaveFunctions(vector<SpinorBarWaveFunction> & waves,
271 RhoDMatrix & rho,
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
286private:
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
A Direction object can be used to specify that some following operations should be assumed to be perf...
Definition: Direction.h:41
The LorentzSpinorBar class implements the storage of a barred LorentzSpinor.
complex< Value > s4() const
Get fourth component.
SpinorType Type() const
Return the type of the spinor.
LorentzSpinorBar & transform(const SpinHalfLorentzRotation &)
General Lorentz transformation.
complex< Value > s3() const
Get third component.
complex< Value > s2() const
Get second component.
complex< Value > s1() const
Get first component.
static void calculateWaveFunctions(vector< SpinorBarWaveFunction > &waves, const Lorentz5Momentum &momentum, tcPDPtr parton, Direction)
Calculate the wavefunctions.
complex< double > s4() const
Get the fourth spin component component.
complex< double > operator()(int i) const
Access to the wavefunction and its components.
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.
LorentzSpinorBar< double > _wf
Storage of the Lorentz SpinorBar wavefunction.
static void calculateWaveFunctions(vector< SpinorBarWaveFunction > &waves, tPPtr particle, Direction)
Calculate the wavefunctions.
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.
LorentzSpinorBar< SqrtEnergy > dimensionedWf() const
Return wavefunction as LorentzSpinorBar<SqrtEnergy>
complex< double > s2() const
Get the second spin component component.
const LorentzSpinorBar< double > & wave() const
Return wavefunction as LorentzSpinorBar<double>.
void reset(unsigned int ihel)
Reset functions.
static void constructSpinInfo(const vector< SpinorBarWaveFunction > &waves, tPPtr part, Direction dir, bool time)
Construct the SpinInfo object.
SpinorWaveFunction bar()
Return the barred spinor.
static void constructSpinInfo(const vector< LorentzSpinorBar< SqrtEnergy > > &waves, tPPtr part, Direction dir, bool time)
Construct the SpinInfo object.
void transform(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.
SpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, const LorentzSpinorBar< double > &wave, Direction dir=intermediate)
Constructor, set the momentum and the wavefunction.
SpinorBarWaveFunction(vector< SpinorBarWaveFunction > &wave, tPPtr part, Direction dir, bool time, bool=true)
Special for spin correlations.
SpinorBarWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, Direction dir)
Constructor, set the momentum, direction, zero the wavefunction.
complex< double > s3() const
Get the third spin component component.
static void calculateWaveFunctions(vector< LorentzSpinorBar< SqrtEnergy > > &waves, RhoDMatrix &rho, tPPtr particle, Direction)
Calculate the wavefunctions.
void conjugate()
Take the conjugate of the spinor .
static void calculateWaveFunctions(vector< SpinorBarWaveFunction > &waves, RhoDMatrix &rho, tPPtr particle, Direction)
Calculate the wavefunctions.
static void calculateWaveFunctions(vector< LorentzSpinorBar< SqrtEnergy > > &waves, tPPtr particle, Direction)
Calculate the wavefunctions.
LorentzSpinorBar< SqrtEnergy > dimensionedWave() const
Return wavefunction as LorentzSpinorBar<SqrtEnergy>
void calculateWaveFunction(unsigned int ihel)
Calcuate the wavefunction.
PDT::Spin iSpin() const
Get 2s+1 for the particle.
tcPDPtr particle() const
Get the particle pointer.
void transformMomentum(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.
const Lorentz5Momentum & momentum() const
Access to the 5-momentum.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:696
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
The RhoDMatrix class is designed to implement the storage of the rho and D matrices which are require...
Definition: RhoDMatrix.h:28
@ intermediate
An intermediate particle.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23