thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
VectorSpinInfo.h
1// -*- C++ -*-
2//
3// VectorSpinInfo.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_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
17namespace ThePEG {
18namespace Helicity {
19
39class VectorSpinInfo: public SpinInfo {
40
41public:
42
48 VectorSpinInfo() : SpinInfo(PDT::Spin1), _decaycalc(false) {}
49
55 VectorSpinInfo(const Lorentz5Momentum & p, bool time)
56 : SpinInfo(PDT::Spin1, p, time), _decaycalc(false) {}
58
59public:
60
68 void setBasisState(unsigned int hel,
69 const LorentzPolarizationVector & in) const {
70 assert(hel<3);
71 _productionstates[hel] = in;
72 _currentstates [hel] = in;
73 }
74
80 void setDecayState(unsigned int hel,
81 const LorentzPolarizationVector & in) const {
82 assert(hel<3);
83 _decaycalc = true;
84 _decaystates[hel] = in;;
85 }
86
91 const LorentzPolarizationVector & getProductionBasisState(unsigned int hel) const {
92 assert(hel<3);
93 return _productionstates[hel];
94 }
95
100 const LorentzPolarizationVector & getCurrentBasisState(unsigned int hel) const {
101 assert(hel<3);
102 return _currentstates[hel];
103 }
104
109 const LorentzPolarizationVector & getDecayBasisState(unsigned int hel) const {
110 assert(hel<3);
111 if(!_decaycalc) {
112 for(unsigned int ix=0;ix<3;++ix)
113 _decaystates[ix]=_currentstates[ix].conjugate();
114 _decaycalc=true;
115 }
116 // return the basis function
117 return _decaystates[hel];
118 }
120
124 virtual void transform(const LorentzMomentum &,const LorentzRotation & );
125
129 virtual void undecay() const {
130 _decaycalc=false;
132 }
133
137 virtual void reset() {
138 undecay();
141 }
142
143public:
144
148 static void Init();
149
153 virtual EIPtr clone() const;
154
155private:
156
161
162private:
163
167 mutable std::array<LorentzPolarizationVector,3> _productionstates;
168
172 mutable std::array<LorentzPolarizationVector,3> _decaystates;
173
177 mutable std::array<LorentzPolarizationVector,3> _currentstates;
178
182 mutable bool _decaycalc;
183
184};
185
186}
187}
188
189
190namespace ThePEG {
191
192}
193#endif /* THEPEG_VectorSpinInfo_H */
The VectorSpinInfo class is the implementation of the spin information for vector particles.
bool _decaycalc
True if the decay state has been set.
VectorSpinInfo & operator=(const VectorSpinInfo &)=delete
Private and non-existent assignment operator.
std::array< LorentzPolarizationVector, 3 > _decaystates
Basis states in the frame in which the particle decays.
VectorSpinInfo(const Lorentz5Momentum &p, bool time)
Standard Constructor.
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....
std::array< LorentzPolarizationVector, 3 > _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.
virtual EIPtr clone() const
Standard clone method.
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....
const LorentzPolarizationVector & getCurrentBasisState(unsigned int hel) const
Get the basis state for the current for the given helicity, hel (0,1,2 as described above....
virtual void undecay() const
Undecay.
VectorSpinInfo()
Default constructor.
std::array< LorentzPolarizationVector, 3 > _currentstates
Basis states in the current frame of the particle.
void setBasisState(unsigned int hel, const LorentzPolarizationVector &in) const
Set the basis state, this is production state.
void setDecayState(unsigned int hel, const LorentzPolarizationVector &in) const
Set the basis state for the decay.
static void Init()
Standard Init function used to initialize the interfaces.
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