ThePEG  1.8.0
RSFermionSpinInfo.h
1 // -*- C++ -*-
2 //
3 // RSFermionSpinInfo.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_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 
17 namespace ThePEG {
18 namespace Helicity {
19 
42 class RSFermionSpinInfo: public SpinInfo {
43 
44 public:
45 
53  _decaycalc(false) {}
54 
60  RSFermionSpinInfo(const Lorentz5Momentum & p,bool time)
61  : SpinInfo(PDT::Spin3Half, p, time),
63  _decaycalc(false) {}
65 
66 public:
67 
75  void setBasisState(unsigned int hel,
76  const LorentzRSSpinor<SqrtEnergy> & in) const {
77  assert(hel<4);
78  _productionstates[hel] = in;
79  _currentstates [hel] = in;
80  }
81 
87  void setDecayState(unsigned int hel,
88  const LorentzRSSpinor<SqrtEnergy> & in) const {
89  assert(hel<4);
90  _decaycalc = true;
91  _decaystates[hel] = in;
92  }
93 
98  const LorentzRSSpinor<SqrtEnergy> & getProductionBasisState(unsigned int hel) const {
99  assert(hel<4);
100  return _productionstates[hel];
101  }
102 
107  const LorentzRSSpinor<SqrtEnergy> & getDecayBasisState(unsigned int hel) const {
108  assert(hel<4);
109  if(!_decaycalc) {
110  for(unsigned int ix=0;ix<4;++ix) _decaystates[ix]=_currentstates[ix];
111  _decaycalc=true;
112  }
113  return _decaystates[hel];
114  }
115 
119  virtual void transform(const LorentzMomentum &,const LorentzRotation &);
121 
122 public:
123 
127  static void Init();
128 
132  virtual EIPtr clone() const;
133 
134 private:
135 
140 
145 
146 private:
147 
151  mutable vector<LorentzRSSpinor<SqrtEnergy> > _productionstates;
152 
156  mutable vector<LorentzRSSpinor<SqrtEnergy> > _decaystates;
157 
161  mutable vector<LorentzRSSpinor<SqrtEnergy> > _currentstates;
162 
166  mutable bool _decaycalc;
167 
168 };
169 
170 }
171 }
172 
173 
174 #include "ThePEG/Utilities/ClassTraits.h"
175 
176 namespace ThePEG {
177 
184 template <>
185 struct BaseClassTrait<ThePEG::Helicity::RSFermionSpinInfo,1> {
187  typedef ThePEG::SpinInfo NthBase;
188 };
189 
194 template <>
195 struct ClassTraits<ThePEG::Helicity::RSFermionSpinInfo>
196  : public ClassTraitsBase<ThePEG::Helicity::RSFermionSpinInfo> {
200  static string className() { return "ThePEG::Helicity::RSFermionSpinInfo"; }
201 };
202 
205 }
206 
207 #endif /* THEPEG_RSFermionSpinInfo_H */