thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
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
19namespace ThePEG {
20namespace Helicity {
21
43class TensorSpinInfo: public SpinInfo {
44
45public:
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
63public:
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();
142 }
143
144public:
145
149 static void Init();
150
154 virtual EIPtr clone() const;
155
156private:
157
162
163private:
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#endif /* THEPEG_TensorSpinInfo_H */
The LorentzTensor class is designed to implement the storage of a complex tensor to be used to repres...
Definition: LorentzTensor.h:37
The TensorSpinInfo class is the implementation of the spin information for tensor particles.
TensorSpinInfo()
Default constructor.
TensorSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
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 &)=delete
Private and non-existent assignment operator.
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....
std::array< LorentzTensor< double >, 5 > _decaystates
Basis states in the frame in which the particle decays.
std::array< LorentzTensor< double >, 5 > _currentstates
Basis states in the current frame of the particle.
virtual void undecay() const
Undecay.
void setDecayState(unsigned int hel, LorentzTensor< double > in) const
Set the basis state for the decay.
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....
void setBasisState(unsigned int hel, LorentzTensor< double > in) const
Set the basis state, this is production state.
bool _decaycalc
True if the decay state has been set.
std::array< LorentzTensor< double >, 5 > _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.
static void Init()
Standard Init function.
virtual EIPtr clone() const
Standard clone method.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
PDT is a helper class implementing enumerations for charge, colour and spin to be used by the Particl...
Definition: PDT.h:24
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
The SpinInfo is the base class for the spin information for the spin correlation algorithm.
Definition: SpinInfo.h:58
virtual void reset()
Reset - Undoes any transformations and calls undecay.
Definition: SpinInfo.h:159
virtual void undecay() const
Calculate the rho matrix for the decay if not already done.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28