thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
RSFermionSpinInfo.h
1 // -*- C++ -*-
2 //
3 // RSFermionSpinInfo.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_RSFermionSpinInfo_H
10 #define THEPEG_RSFermionSpinInfo_H
11 // This is the declaration of the RSFermionSpinInfo class.
12 
13 #include "ThePEG/EventRecord/SpinInfo.h"
14 #include "ThePEG/Helicity/LorentzRSSpinor.h"
15 #include "RSFermionSpinInfo.fh"
16 #include <array>
17 
18 namespace ThePEG {
19 namespace Helicity {
20 
43 class RSFermionSpinInfo: public SpinInfo {
44 
45 public:
46 
52  RSFermionSpinInfo() : SpinInfo(PDT::Spin3Half), _decaycalc(false) {}
53 
59  RSFermionSpinInfo(const Lorentz5Momentum & p,bool time)
60  : SpinInfo(PDT::Spin3Half, p, time), _decaycalc(false) {}
62 
63 public:
64 
72  void setBasisState(unsigned int hel,
73  const LorentzRSSpinor<SqrtEnergy> & in) const {
74  assert(hel<4);
75  _productionstates[hel] = in;
76  _currentstates [hel] = in;
77  }
78 
84  void setDecayState(unsigned int hel,
85  const LorentzRSSpinor<SqrtEnergy> & in) const {
86  assert(hel<4);
87  _decaycalc = true;
88  _decaystates[hel] = in;
89  }
90 
95  const LorentzRSSpinor<SqrtEnergy> & getProductionBasisState(unsigned int hel) const {
96  assert(hel<4);
97  return _productionstates[hel];
98  }
99 
104  const LorentzRSSpinor<SqrtEnergy> & getCurrentBasisState(unsigned int hel) const {
105  assert(hel<4);
106  return _currentstates[hel];
107  }
108 
113  const LorentzRSSpinor<SqrtEnergy> & getDecayBasisState(unsigned int hel) const {
114  assert(hel<4);
115  if(!_decaycalc) {
116  for(unsigned int ix=0;ix<4;++ix) _decaystates[ix]=_currentstates[ix];
117  _decaycalc=true;
118  }
119  return _decaystates[hel];
120  }
121 
125  virtual void transform(const LorentzMomentum &,const LorentzRotation &);
127 
131  virtual void undecay() const {
132  _decaycalc=false;
134  }
135 
139  virtual void reset() {
140  undecay();
142  SpinInfo::reset();
143  }
144 
145 public:
146 
150  static void Init();
151 
155  virtual EIPtr clone() const;
156 
157 private:
158 
162  RSFermionSpinInfo & operator=(const RSFermionSpinInfo &) = delete;
163 
164 private:
165 
169  mutable std::array<LorentzRSSpinor<SqrtEnergy>,4> _productionstates;
170 
174  mutable std::array<LorentzRSSpinor<SqrtEnergy>,4> _decaystates;
175 
179  mutable std::array<LorentzRSSpinor<SqrtEnergy>,4> _currentstates;
180 
184  mutable bool _decaycalc;
185 
186 };
187 
188 }
189 }
190 
191 
192 
193 namespace ThePEG {
194 
195 }
196 #endif /* THEPEG_RSFermionSpinInfo_H */
const LorentzRSSpinor< SqrtEnergy > & getCurrentBasisState(unsigned int hel) const
Get the basis state for the current for the given helicity, hel (0,1,2,3 as described above...
static void Init()
Standard Init function used to initialize the interfaces.
std::array< LorentzRSSpinor< SqrtEnergy >, 4 > _decaystates
Basis states in the frame in which the particle decays.
PDT is a helper class implementing enumerations for charge, colour and spin to be used by the Particl...
Definition: PDT.h:24
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
bool _decaycalc
True if the decay state has been set.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual void undecay() const
Undecay.
void setDecayState(unsigned int hel, const LorentzRSSpinor< SqrtEnergy > &in) const
Set the basis state for the decay.
The LorentzRSSpinor class is designed to store a Rarita-Schwinger spinor for a spin-3/2 particle...
virtual void reset()
Reset - Undoes any transformations and calls undecay.
Definition: SpinInfo.h:159
std::array< LorentzRSSpinor< SqrtEnergy >, 4 > _currentstates
Basis states in the current frame of the particle.
virtual EIPtr clone() const
Standard clone method.
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
The RSFermionSpinInfo class inherits from the SpinInfo class and implements the storage of the basis ...
RSFermionSpinInfo()
Default constructor.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
std::array< LorentzRSSpinor< SqrtEnergy >, 4 > _productionstates
Basis states in the frame in which the particle was produced.
void setBasisState(unsigned int hel, const LorentzRSSpinor< SqrtEnergy > &in) const
Set the basis state, this is production state.
RSFermionSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
RSFermionSpinInfo & operator=(const RSFermionSpinInfo &)=delete
Private and non-existent assignment operator.
virtual void transform(const LorentzMomentum &, const LorentzRotation &)
Perform a lorentz rotation of the spin information.
const LorentzRSSpinor< SqrtEnergy > & getProductionBasisState(unsigned int hel) const
Get the basis state for the production for the given helicity, hel (0,1,2,3 as described above...
virtual void undecay() const
Calculate the rho matrix for the decay if not already done.
const LorentzRSSpinor< SqrtEnergy > & getDecayBasisState(unsigned int hel) const
Get the basis state for the decay for the given helicity, hel (0,1,2,3 as described above...