00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef THEPEG_VectorSpinInfo_H
00010 #define THEPEG_VectorSpinInfo_H
00011
00012
00013 #include "SpinInfo.h"
00014 #include "ThePEG/Helicity/LorentzPolarizationVector.h"
00015 #include "VectorSpinInfo.fh"
00016
00017 namespace ThePEG {
00018 namespace Helicity {
00019
00039 class VectorSpinInfo: public SpinInfo {
00040
00041 public:
00042
00048 VectorSpinInfo() : SpinInfo(PDT::Spin1), _productionstates(3),
00049 _decaystates(3), _currentstates(3),
00050 _decaycalc(false) {}
00051
00057 VectorSpinInfo(const Lorentz5Momentum & p, bool time)
00058 : SpinInfo(PDT::Spin1, p, time),
00059 _productionstates(3), _decaystates(3), _currentstates(3),
00060 _decaycalc(false) {}
00062
00063 public:
00064
00072 void setBasisState(unsigned int hel,
00073 const LorentzPolarizationVector & in) const {
00074 assert(hel<3);
00075 _productionstates[hel] = in;
00076 _currentstates [hel] = in;
00077 }
00078
00084 void setDecayState(unsigned int hel,
00085 const LorentzPolarizationVector & in) const {
00086 assert(hel<3);
00087 _decaycalc = true;
00088 _decaystates[hel] = in;;
00089 }
00090
00095 const LorentzPolarizationVector & getProductionBasisState(unsigned int hel) const {
00096 assert(hel<3);
00097 return _productionstates[hel];
00098 }
00099
00104 const LorentzPolarizationVector & getDecayBasisState(unsigned int hel) const {
00105 assert(hel<3);
00106 if(!_decaycalc) {
00107 for(unsigned int ix=0;ix<3;++ix)
00108 _decaystates[ix]=_currentstates[ix].conjugate();
00109 _decaycalc=true;
00110 }
00111
00112 return _decaystates[hel];
00113 }
00115
00119 virtual void transform(const LorentzMomentum &,const LorentzRotation & );
00120
00121 public:
00122
00126 static void Init();
00127
00131 virtual EIPtr clone() const;
00132
00133 private:
00134
00138 static NoPIOClassDescription<VectorSpinInfo> initVectorSpinInfo;
00139
00143 VectorSpinInfo & operator=(const VectorSpinInfo &);
00144
00145 private:
00146
00150 mutable vector<LorentzPolarizationVector> _productionstates;
00151
00155 mutable vector<LorentzPolarizationVector> _decaystates;
00156
00160 mutable vector<LorentzPolarizationVector> _currentstates;
00161
00165 mutable bool _decaycalc;
00166
00167 };
00168
00169 }
00170 }
00171
00172
00173 namespace ThePEG {
00174
00181 template <>
00182 struct BaseClassTrait<ThePEG::Helicity::VectorSpinInfo,1>
00183 : public ClassTraitsType {
00185 typedef ThePEG::Helicity::SpinInfo NthBase;
00186 };
00187
00192 template <>
00193 struct ClassTraits<ThePEG::Helicity::VectorSpinInfo>
00194 : public ClassTraitsBase<ThePEG::Helicity::VectorSpinInfo> {
00198 static string className() { return "ThePEG::Helicity::VectorSpinInfo"; }
00199 };
00200
00203 }
00204
00205 #endif