ThePEG  1.8.0
VectorSpinInfo.h
1 // -*- C++ -*-
2 //
3 // VectorSpinInfo.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_VectorSpinInfo_H
10 #define THEPEG_VectorSpinInfo_H
11 // This is the declaration of the VectorSpinInfo class.
12 
13 #include "ThePEG/EventRecord/SpinInfo.h"
14 #include "ThePEG/Helicity/LorentzPolarizationVector.h"
15 #include "VectorSpinInfo.fh"
16 
17 namespace ThePEG {
18 namespace Helicity {
19 
39 class VectorSpinInfo: public SpinInfo {
40 
41 public:
42 
50  _decaycalc(false) {}
51 
57  VectorSpinInfo(const Lorentz5Momentum & p, bool time)
58  : SpinInfo(PDT::Spin1, p, time),
60  _decaycalc(false) {}
62 
63 public:
64 
72  void setBasisState(unsigned int hel,
73  const LorentzPolarizationVector & in) const {
74  assert(hel<3);
75  _productionstates[hel] = in;
76  _currentstates [hel] = in;
77  }
78 
84  void setDecayState(unsigned int hel,
85  const LorentzPolarizationVector & in) const {
86  assert(hel<3);
87  _decaycalc = true;
88  _decaystates[hel] = in;;
89  }
90 
95  const LorentzPolarizationVector & getProductionBasisState(unsigned int hel) const {
96  assert(hel<3);
97  return _productionstates[hel];
98  }
99 
104  const LorentzPolarizationVector & getDecayBasisState(unsigned int hel) const {
105  assert(hel<3);
106  if(!_decaycalc) {
107  for(unsigned int ix=0;ix<3;++ix)
108  _decaystates[ix]=_currentstates[ix].conjugate();
109  _decaycalc=true;
110  }
111  // return the basis function
112  return _decaystates[hel];
113  }
115 
119  virtual void transform(const LorentzMomentum &,const LorentzRotation & );
120 
121 public:
122 
126  static void Init();
127 
131  virtual EIPtr clone() const;
132 
133 private:
134 
139 
144 
145 private:
146 
150  mutable vector<LorentzPolarizationVector> _productionstates;
151 
155  mutable vector<LorentzPolarizationVector> _decaystates;
156 
160  mutable vector<LorentzPolarizationVector> _currentstates;
161 
165  mutable bool _decaycalc;
166 
167 };
168 
169 }
170 }
171 
172 
173 namespace ThePEG {
174 
181 template <>
183  : public ClassTraitsType {
185  typedef ThePEG::SpinInfo NthBase;
186 };
187 
192 template <>
194  : public ClassTraitsBase<ThePEG::Helicity::VectorSpinInfo> {
198  static string className() { return "ThePEG::Helicity::VectorSpinInfo"; }
199 };
200 
203 }
204 
205 #endif /* THEPEG_VectorSpinInfo_H */
virtual void transform(const LorentzMomentum &, const LorentzRotation &)
Perform a Lorentz rotation of the spin information.
static NoPIOClassDescription< VectorSpinInfo > initVectorSpinInfo
Describe a concrete class without persistent data.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
VectorSpinInfo()
Default constructor.
static void Init()
Standard Init function used to initialize the interfaces.
vector< LorentzPolarizationVector > _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...
VectorSpinInfo & operator=(const VectorSpinInfo &)
Private and non-existent assignment operator.
void setDecayState(unsigned int hel, const LorentzPolarizationVector &in) const
Set the basis state for the decay.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
A concreate implementation of ClassDescriptionBase describing a concrete class without persistent dat...
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
The VectorSpinInfo class is the implementation of the spin information for vector particles...
vector< LorentzPolarizationVector > _currentstates
Basis states in the current frame of the particle.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
const LorentzPolarizationVector & getDecayBasisState(unsigned int hel) const
Get the basis state for the decay for the given helicity, hel (0,1,2 as described above...
virtual EIPtr clone() const
Standard clone method.
void setBasisState(unsigned int hel, const LorentzPolarizationVector &in) const
Set the basis state, this is production state.
VectorSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
const LorentzPolarizationVector & getProductionBasisState(unsigned int hel) const
Get the basis state for the production for the given helicity, hel (0,1,2 as described above...
bool _decaycalc
True if the decay state has been set.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
vector< LorentzPolarizationVector > _productionstates
Basis states in the frame in which the particle was produced.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52