thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
SpinorWaveFunction.h
1// -*- C++ -*-
2//
3// SpinorWaveFunction.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_SpinorWaveFunction_H
10#define ThePEG_SpinorWaveFunction_H
11//
12// This is the declaration of the SpinorWaveFunction class.
13//
14#include "WaveFunctionBase.h"
15#include <ThePEG/Helicity/LorentzSpinor.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 SpinorBarWaveFunction;
28
57
58public:
59
71 SpinorWaveFunction(const Lorentz5Momentum & p,tcPDPtr part,complex<double> s1,
72 complex<double> s2,complex<double> s3,complex<double> s4)
73 : WaveFunctionBase(p,part), _wf(s1,s2,s3,s4)
74 {
75 assert(iSpin()==2);
76 }
77
88 : WaveFunctionBase(p,part,dir), _wf(wave)
89 {
90 assert(iSpin()==2);
91 }
92
101 : WaveFunctionBase(p->momentum(), p->dataPtr(), dir), _wf(wave.Type())
102 {
103 assert(iSpin()==2);
104 for (unsigned int i=0; i<4; ++i)
105 _wf[i]=Complex(wave[i]*UnitRemoval::InvSqrtE);
106 }
107
116 unsigned int ihel,
117 Direction dir)
118 : WaveFunctionBase(p,part,dir)
119 {
120 assert(iSpin()==2);
122 }
123
132 tcPDPtr part,Direction dir)
133 : WaveFunctionBase(p,part,dir), _wf()
134 {
135 assert(iSpin()==2);
136 }
137
142 : WaveFunctionBase(), _wf()
143 {}
144
148 SpinorWaveFunction(vector<SpinorWaveFunction> & wave,
149 tPPtr part,Direction dir,bool time,bool=true) {
151 constructSpinInfo(wave,part,dir,time);
152 }
154
162 complex<double> operator ()(int i) const {
163 assert(i>=0 &&i<=3);
164 return _wf(i);
165 }
166
170 const LorentzSpinor<double> & wave() const {return _wf;}
171
176
180 complex<double> s1() const {return _wf.s1();}
181
185 complex<double> s2() const {return _wf.s2();}
186
190 complex<double> s3() const {return _wf.s3();}
191
195 complex<double> s4() const {return _wf.s4();}
197
203 void conjugate() {
204 _wf=_wf.conjugate();
205 }
206
211
220 void reset(unsigned int ihel) {
222 }
224
225public:
226
230 void transform(const LorentzRotation & r) {
231 _wf.transform(r);
233 }
234
235public:
236
242
246 static void calculateWaveFunctions(vector<SpinorWaveFunction> & waves,
248
252 static void calculateWaveFunctions(vector<SpinorWaveFunction> & waves,
254 tcPDPtr parton,Direction);
255
260 RhoDMatrix & rho,
262
266 static void calculateWaveFunctions(vector<SpinorWaveFunction> & waves,
267 RhoDMatrix & rho,
269
273 static void constructSpinInfo(const vector<LorentzSpinor<SqrtEnergy> > & waves,
274 tPPtr part,Direction dir, bool time);
275
279 static void constructSpinInfo(const vector<SpinorWaveFunction> & waves,
280 tPPtr part,Direction dir, bool time);
281
282
283private:
284
289 void calculateWaveFunction(unsigned int ihel);
290
291private:
292
297
301 for (unsigned int i=0; i<4; ++i)
302 temp(i) = _wf(i)*UnitRemoval::SqrtE;
303 return temp;
304 }
305
306};
307
308}
309
310}
311#endif
312
313
314
315
A Direction object can be used to specify that some following operations should be assumed to be perf...
Definition: Direction.h:41
The LorentzSpinor class is designed to store a spinor.
Definition: LorentzSpinor.h:71
LorentzSpinor conjugate() const
Return the conjugated spinor .
complex< Value > s2() const
Get second component.
SpinorType Type() const
Return the type of the spinor.
complex< Value > s3() const
Get third component.
complex< Value > s1() const
Get first component.
LorentzSpinor & transform(const SpinHalfLorentzRotation &)
General Lorentz transformation.
complex< Value > s4() const
Get fourth component.
complex< double > operator()(int i) const
Access to the wavefunction and its components.
SpinorWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, Direction dir)
Constructor, set the momentum, direction, zero the wavefunction.
SpinorWaveFunction(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.
const LorentzSpinor< double > & wave() const
Return wavefunction as LorentzSpinor<double>.
SpinorWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, const LorentzSpinor< double > &wave, Direction dir=intermediate)
Constructor, set the momentum and the wavefunction.
SpinorBarWaveFunction bar()
Return the barred spinor.
complex< double > s3() const
Get the third spin component component.
LorentzSpinor< SqrtEnergy > dimensionedWf() const
Return wavefunction as LorentzSpinor<SqrtEnergy>
static void calculateWaveFunctions(vector< SpinorWaveFunction > &waves, tPPtr particle, Direction)
Calculate the wavefunctions.
complex< double > s2() const
Get the second spin component component.
void calculateWaveFunction(unsigned int ihel)
Calcuate the wavefunction.
void transform(const LorentzRotation &r)
Perform the Lorentz transformation of the wave function.
LorentzSpinor< double > _wf
Storage of the Lorentz Spinor.
SpinorWaveFunction(const tPPtr &p, const LorentzSpinor< SqrtEnergy > &wave, Direction dir=intermediate)
Constructor, set the momentum and the wavefunction.
LorentzSpinor< SqrtEnergy > dimensionedWave() const
Return wavefunction as LorentzSpinor<SqrtEnergy>.
void conjugate()
Take the conjugate of the spinor .
SpinorWaveFunction(vector< SpinorWaveFunction > &wave, tPPtr part, Direction dir, bool time, bool=true)
Special for spin correlations.
static void calculateWaveFunctions(vector< LorentzSpinor< SqrtEnergy > > &waves, RhoDMatrix &rho, tPPtr particle, Direction)
Calculate the wavefunctions.
void reset(unsigned int ihel)
Reset functions.
complex< double > s4() const
Get the fourth spin component component.
static void constructSpinInfo(const vector< SpinorWaveFunction > &waves, tPPtr part, Direction dir, bool time)
Construct the SpinInfo object.
static void calculateWaveFunctions(vector< LorentzSpinor< SqrtEnergy > > &waves, tPPtr particle, Direction)
Calculate the wavefunctions.
complex< double > s1() const
Get the first spin component component.
static void constructSpinInfo(const vector< LorentzSpinor< SqrtEnergy > > &waves, tPPtr part, Direction dir, bool time)
Construct the SpinInfo object.
SpinorWaveFunction(const Lorentz5Momentum &p, tcPDPtr part, unsigned int ihel, Direction dir)
Constructor, set the momentum, helicity, direction.
static void calculateWaveFunctions(vector< SpinorWaveFunction > &waves, RhoDMatrix &rho, tPPtr particle, Direction)
Calculate the wavefunctions.
static void calculateWaveFunctions(vector< SpinorWaveFunction > &waves, const Lorentz5Momentum &momentum, tcPDPtr parton, Direction)
Calculate the wavefunctions.
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