ThePEG  1.8.0
FermionSpinInfo.h
1 // -*- C++ -*-
2 //
3 // FermionSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 2003-2011 Peter Richardson, Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 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 
17 namespace ThePEG {
18 namespace Helicity {
19 
39 class FermionSpinInfo: public SpinInfo {
40 
41 public:
42 
50  _decaycalc(false) {}
51 
57  FermionSpinInfo(const Lorentz5Momentum & p, bool time)
58  : SpinInfo(PDT::Spin1Half, p, time),
60  _decaycalc(false) {}
62 
63 public:
64 
72  void setBasisState(unsigned int hel,
73  const LorentzSpinor<SqrtEnergy> & in) const {
74  assert(hel<2);
75  _productionstates[hel] = in;
76  _currentstates [hel] = in;
77  }
78 
84  void setDecayState(unsigned int hel,
85  const LorentzSpinor<SqrtEnergy> & in) const {
86  assert(hel<2);
87  _decaycalc = true;
88  _decaystates[hel] = in;
89  }
90 
95  const LorentzSpinor<SqrtEnergy> & getProductionBasisState(unsigned int hel) const {
96  assert(hel<2);
97  return _productionstates[hel];
98  }
99 
104  const LorentzSpinor<SqrtEnergy> & getCurrentBasisState(unsigned int hel) const {
105  assert(hel<2);
106  return _currentstates[hel];
107  }
108 
113  const LorentzSpinor<SqrtEnergy> & getDecayBasisState(unsigned int hel) const {
114  assert(hel<2);
115  if(!_decaycalc) {
116  for(unsigned int ix=0;ix<2;++ix) _decaystates[ix]=_currentstates[ix];
117  _decaycalc=true;
118  }
119  return _decaystates[hel];
120  }
122 
126  virtual void transform(const LorentzMomentum &,const LorentzRotation &);
127 
128 public:
129 
133  static void Init();
134 
138  virtual EIPtr clone() const;
139 
140 private:
141 
146 
151 
152 private:
153 
157  mutable vector<LorentzSpinor<SqrtEnergy> > _productionstates;
158 
162  mutable vector<LorentzSpinor<SqrtEnergy> > _currentstates;
163 
167  mutable vector<LorentzSpinor<SqrtEnergy> > _decaystates;
168 
172  mutable bool _decaycalc;
173 
174 };
175 
176 }
177 }
178 
179 namespace ThePEG {
180 
187 template <>
189  : public ClassTraitsType {
191  typedef ThePEG::SpinInfo NthBase;
192 };
193 
198 template <>
200  : public ClassTraitsBase<ThePEG::Helicity::FermionSpinInfo> {
204  static string className() { return "ThePEG::Helicity::FermionSpinInfo"; }
205 };
206 
209 }
210 
211 #endif /* ThePEG_FermionSpinInfo_H */
vector< LorentzSpinor< SqrtEnergy > > _productionstates
basis states in the frame in which the particle was produced
virtual void transform(const LorentzMomentum &, const LorentzRotation &)
Perform a lorentz rotation of the spin information.
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...
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
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...
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...
FermionSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
virtual EIPtr clone() const
Standard clone method.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
The LorentzSpinor class is designed to store a spinor.
Definition: LorentzSpinor.h:69
A concreate implementation of ClassDescriptionBase describing a concrete class without persistent dat...
FermionSpinInfo()
Default constructor.
static NoPIOClassDescription< FermionSpinInfo > initFermionSpinInfo
Describe a concrete class without persistent data.
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
bool _decaycalc
True if the decay state has been set.
static void Init()
Standard Init function.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
FermionSpinInfo & operator=(const FermionSpinInfo &)
Private and non-existent assignment operator.
void setBasisState(unsigned int hel, const LorentzSpinor< SqrtEnergy > &in) const
Set the basis state, this is production state.
void setDecayState(unsigned int hel, const LorentzSpinor< SqrtEnergy > &in) const
Set the basis state for the decay.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
vector< LorentzSpinor< SqrtEnergy > > _currentstates
basis states in the current frame of the particle
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
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...
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
vector< LorentzSpinor< SqrtEnergy > > _decaystates
basis states in the frame in which the particle decays
The FermionSpinInfo class inherits from the SpinInfo class and implements the storage of the basis ve...