thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
TensorSpinInfo.h
1 // -*- C++ -*-
2 //
3 // TensorSpinInfo.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_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 #include <array>
18 
19 namespace ThePEG {
20 namespace Helicity {
21 
43 class TensorSpinInfo: public SpinInfo {
44 
45 public:
46 
52  TensorSpinInfo() : SpinInfo(PDT::Spin2), _decaycalc(false) {}
53 
59  TensorSpinInfo(const Lorentz5Momentum & p, bool time)
60  : SpinInfo(PDT::Spin2, p, time), _decaycalc(false) {}
62 
63 public:
64 
72  void setBasisState(unsigned int hel, LorentzTensor<double> in) const {
73  assert(hel<5);
74  _productionstates[hel]=in;
75  _currentstates [hel]=in;
76  }
77 
83  void setDecayState(unsigned int hel, LorentzTensor<double> in) const {
84  assert(hel<5);
85  _decaycalc = true;
86  _decaystates[hel] = in;
87  }
88 
93  const LorentzTensor<double> & getProductionBasisState(unsigned int hel) const {
94  assert(hel<5);
95  return _productionstates[hel];
96  }
97 
102  const LorentzTensor<double> & getCurrentBasisState(unsigned int hel) const {
103  assert(hel<5);
104  return _currentstates[hel];
105  }
106 
111  const LorentzTensor<double> & getDecayBasisState(unsigned int hel) const {
112  assert(hel<5);
113  if(!_decaycalc) {
114  for(unsigned int ix=0;ix<5;++ix)
115  _decaystates[ix]=_currentstates[ix].conjugate();
116  _decaycalc=true;
117  }
118  return _decaystates[hel];
119  }
121 
125  virtual void transform(const LorentzMomentum &,const LorentzRotation &);
126 
130  virtual void undecay() const {
131  _decaycalc=false;
133  }
134 
138  virtual void reset() {
139  undecay();
141  SpinInfo::reset();
142  }
143 
144 public:
145 
149  static void Init();
150 
154  virtual EIPtr clone() const;
155 
156 private:
157 
161  TensorSpinInfo & operator=(const TensorSpinInfo &) = delete;
162 
163 private:
164 
168  mutable std::array<LorentzTensor<double>,5> _productionstates;
169 
173  mutable std::array<LorentzTensor<double>,5> _decaystates;
174 
178  mutable std::array<LorentzTensor<double>,5> _currentstates;
179 
183  mutable bool _decaycalc;
184 
185 };
186 
187 }
188 }
189 
190 
191 namespace ThePEG {
192 
193 }
194 #endif /* THEPEG_TensorSpinInfo_H */
std::array< LorentzTensor< double >, 5 > _decaystates
Basis states in the frame in which the particle decays.
static void Init()
Standard Init function.
const LorentzTensor< double > & getCurrentBasisState(unsigned int hel) const
Get the basis state for the current for the given helicity, hel (0,1,2,3,4 as described above...
PDT is a helper class implementing enumerations for charge, colour and spin to be used by the Particl...
Definition: PDT.h:24
virtual EIPtr clone() const
Standard clone method.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
std::array< LorentzTensor< double >, 5 > _currentstates
Basis states in the current frame of the particle.
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.
void setBasisState(unsigned int hel, LorentzTensor< double > in) const
Set the basis state, this is production state.
virtual void undecay() const
Undecay.
virtual void reset()
Reset - Undoes any transformations and calls undecay.
Definition: SpinInfo.h:159
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
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...
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...
std::array< LorentzTensor< double >, 5 > _productionstates
Basis states in the frame in which the particle was produced.
The TensorSpinInfo class is the implementation of the spin information for tensor particles...
TensorSpinInfo()
Default constructor.
void setDecayState(unsigned int hel, LorentzTensor< double > in) const
Set the basis state for the decay.
bool _decaycalc
True if the decay state has been set.
TensorSpinInfo & operator=(const TensorSpinInfo &)=delete
Private and non-existent assignment operator.
virtual void undecay() const
Calculate the rho matrix for the decay if not already done.
virtual void transform(const LorentzMomentum &, const LorentzRotation &)
Perform a lorentz rotation of the spin information.