thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
FermionSpinInfo.h
1// -*- C++ -*-
2//
3// FermionSpinInfo.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_FermionSpinInfo_H
10#define ThePEG_FermionSpinInfo_H
11// This is the declaration of the FermionSpinInfo class.
12
13#include "ThePEG/EventRecord/SpinInfo.h"
14#include "ThePEG/Helicity/LorentzSpinor.h"
15#include "FermionSpinInfo.fh"
16#include <array>
17
18namespace ThePEG {
19namespace Helicity {
20
41
42public:
43
50 : SpinInfo(PDT::Spin1Half), _decaycalc(false) {}
51
57 FermionSpinInfo(const Lorentz5Momentum & p, bool time)
58 : SpinInfo(PDT::Spin1Half, p, time), _decaycalc(false) {}
60
61public:
62
70 void setBasisState(unsigned int hel,
71 const LorentzSpinor<SqrtEnergy> & in) const {
72 assert(hel<2);
73 _productionstates[hel] = in;
74 _currentstates [hel] = in;
75 }
76
82 void setDecayState(unsigned int hel,
83 const LorentzSpinor<SqrtEnergy> & in) const {
84 assert(hel<2);
85 _decaycalc = true;
86 _decaystates[hel] = in;
87 }
88
93 const LorentzSpinor<SqrtEnergy> & getProductionBasisState(unsigned int hel) const {
94 assert(hel<2);
95 return _productionstates[hel];
96 }
97
102 const LorentzSpinor<SqrtEnergy> & getCurrentBasisState(unsigned int hel) const {
103 assert(hel<2);
104 return _currentstates[hel];
105 }
106
111 const LorentzSpinor<SqrtEnergy> & getDecayBasisState(unsigned int hel) const {
112 assert(hel<2);
113 if(!_decaycalc) {
114 for(unsigned int ix=0;ix<2;++ix) _decaystates[ix]=_currentstates[ix];
115 _decaycalc=true;
116 }
117 return _decaystates[hel];
118 }
120
124 virtual void transform(const LorentzMomentum &,const LorentzRotation &);
125
129 virtual void undecay() const {
130 _decaycalc=false;
132 }
133
137 virtual void reset() {
138 undecay();
141 }
142
143public:
144
148 static void Init();
149
153 virtual EIPtr clone() const;
154
155private:
156
161
162private:
163
167 mutable std::array<LorentzSpinor<SqrtEnergy>,2> _productionstates;
168
172 mutable std::array<LorentzSpinor<SqrtEnergy>,2> _currentstates;
173
177 mutable std::array<LorentzSpinor<SqrtEnergy>,2> _decaystates;
178
182 mutable bool _decaycalc;
183
184};
185
186}
187}
188
189namespace ThePEG {
190
191}
192#endif /* ThePEG_FermionSpinInfo_H */
The FermionSpinInfo class inherits from the SpinInfo class and implements the storage of the basis ve...
std::array< LorentzSpinor< SqrtEnergy >, 2 > _productionstates
basis states in the frame in which the particle was produced
FermionSpinInfo & operator=(const FermionSpinInfo &)=delete
Private and non-existent assignment operator.
virtual void transform(const LorentzMomentum &, const LorentzRotation &)
Perform a lorentz rotation of the spin information.
const LorentzSpinor< SqrtEnergy > & getCurrentBasisState(unsigned int hel) const
Get the current basis state for the given helicity, hel (which is 0 or 1 as described above....
static void Init()
Standard Init function.
const LorentzSpinor< SqrtEnergy > & getProductionBasisState(unsigned int hel) const
Get the basis state for the production for the given helicity, hel (which is 0 or 1 as described abov...
const LorentzSpinor< SqrtEnergy > & getDecayBasisState(unsigned int hel) const
Get the basis state for the decay for the given helicity, hel (which is 0 or 1 as described above....
virtual void undecay() const
Undecay.
virtual EIPtr clone() const
Standard clone method.
void setDecayState(unsigned int hel, const LorentzSpinor< SqrtEnergy > &in) const
Set the basis state for the decay.
bool _decaycalc
True if the decay state has been set.
FermionSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
std::array< LorentzSpinor< SqrtEnergy >, 2 > _decaystates
basis states in the frame in which the particle decays
std::array< LorentzSpinor< SqrtEnergy >, 2 > _currentstates
basis states in the current frame of the particle
void setBasisState(unsigned int hel, const LorentzSpinor< SqrtEnergy > &in) const
Set the basis state, this is production state.
FermionSpinInfo()
Default constructor.
The LorentzSpinor class is designed to store a spinor.
Definition: LorentzSpinor.h:71
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
PDT is a helper class implementing enumerations for charge, colour and spin to be used by the Particl...
Definition: PDT.h:24
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
virtual void reset()
Reset - Undoes any transformations and calls undecay.
Definition: SpinInfo.h:159
virtual void undecay() const
Calculate the rho matrix for the decay if not already done.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28