ThePEG  1.8.0
TensorSpinInfo.h
1 // -*- C++ -*-
2 //
3 // TensorSpinInfo.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_TensorSpinInfo_H
10 #define THEPEG_TensorSpinInfo_H
11 // This is the declaration of the TensorSpinInfo class.
12 
13 #include "ThePEG/EventRecord/SpinInfo.h"
14 #include "ThePEG/Helicity/LorentzTensor.h"
15 #include "TensorSpinInfo.fh"
16 // #include "TensorSpinInfo.xh"
17 
18 namespace ThePEG {
19 namespace Helicity {
20 
42 class TensorSpinInfo: public SpinInfo {
43 
44 public:
45 
53  _decaycalc(false) {}
54 
60  TensorSpinInfo(const Lorentz5Momentum & p,bool time)
61  : SpinInfo(PDT::Spin2, p, time),
63  _decaycalc(false) {}
65 
66 public:
67 
75  void setBasisState(unsigned int hel, LorentzTensor<double> in) const {
76  assert(hel<5);
77  _productionstates[hel]=in;
78  _currentstates [hel]=in;
79  }
80 
86  void setDecayState(unsigned int hel, LorentzTensor<double> in) const {
87  assert(hel<5);
88  _decaycalc = true;
89  _decaystates[hel] = in;
90  }
91 
96  const LorentzTensor<double> & getProductionBasisState(unsigned int hel) const {
97  assert(hel<5);
98  return _productionstates[hel];
99  }
100 
105  const LorentzTensor<double> & getDecayBasisState(unsigned int hel) const {
106  assert(hel<5);
107  if(!_decaycalc) {
108  for(unsigned int ix=0;ix<5;++ix)
109  _decaystates[ix]=_currentstates[ix].conjugate();
110  _decaycalc=true;
111  }
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<LorentzTensor<double> > _productionstates;
151 
155  mutable vector<LorentzTensor<double> > _decaystates;
156 
160  mutable vector<LorentzTensor<double> > _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::TensorSpinInfo> {
198  static string className() { return "ThePEG::Helicity::TensorSpinInfo"; }
199 };
200 
203 }
204 
205 #endif /* THEPEG_TensorSpinInfo_H */
vector< LorentzTensor< double > > _currentstates
Basis states in the current frame of the particle.
virtual EIPtr clone() const
Standard clone method.
static void Init()
Standard Init function.
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
void setDecayState(unsigned int hel, LorentzTensor< double > in) const
Set the basis state for the decay.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
vector< LorentzTensor< double > > _productionstates
Basis states in the frame in which the particle was produced.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
TensorSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
A concreate implementation of ClassDescriptionBase describing a concrete class without persistent dat...
static NoPIOClassDescription< TensorSpinInfo > initTensorSpinInfo
Describe a concrete class without persistent data.
const LorentzTensor< double > & getProductionBasisState(unsigned int hel) const
Get the basis state for the production for the given helicity, hel (0,1,2,3,4 as described above...
TensorSpinInfo & operator=(const TensorSpinInfo &)
Private and non-existent assignment operator.
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
void setBasisState(unsigned int hel, LorentzTensor< double > in) const
Set the basis state, this is production state.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
vector< LorentzTensor< double > > _decaystates
Basis states in the frame in which the particle decays.
const LorentzTensor< double > & getDecayBasisState(unsigned int hel) const
Get the basis state for the decay for the given helicity, hel (0,1,2,3,4 as described above...
The TensorSpinInfo class is the implementation of the spin information for tensor particles...
TensorSpinInfo()
Default constructor.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
bool _decaycalc
True if the decay state has been set.
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
virtual void transform(const LorentzMomentum &, const LorentzRotation &)
Perform a lorentz rotation of the spin information.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52