#ifndef ROOT_TPhoton #define ROOT_TPhoton #include "TFourVectorComplex.h" #include "TPauliMatrix.h" const Double_t alphaQED=1/137.036; const Double_t hbarcSqr=389.37966; // in GeV*GeV*ub class TPhoton { protected: TFourVectorReal fMomentum; // four-momentum of photon TPauliMatrix fSpinDensity; // spin density matrix in helicity basis public: TPhoton() { } TPhoton(const TFourVectorReal &p); TPhoton(const TThreeVectorReal &p); virtual ~TPhoton() { } TFourVectorReal Mom() const; TThreeVectorReal Pol() const; TPauliMatrix &SDM() const; TFourVectorComplex Eps(const Int_t mode) const; TFourVectorComplex EpsStar(const Int_t mode) const; TPhoton &SetMom(const TFourVectorReal &p); TPhoton &SetMom(const TThreeVectorReal &p); TPhoton &SetPol(const TThreeVectorReal &polar); TPhoton &AllPol(); friend TBuffer &operator>>(TBuffer &buf, TPhoton *&obj); friend TBuffer &operator<<(TBuffer &buf, const TPhoton *obj); void Print(Option_t *option=""); ClassDef(TPhoton,1) // Photon state description class }; class TGhoston : public TPhoton { public: TGhoston() { } TGhoston(const TFourVectorReal &p) : TPhoton(p) { } TGhoston(const TThreeVectorReal &p) : TPhoton(p) { } TGhoston(const TPhoton &obj) : TPhoton(obj) { } ~TGhoston() { } TFourVectorComplex Eps(const Int_t mode) const; TFourVectorComplex EpsStar(const Int_t mode) const; void Print(Option_t *option=""); ClassDef(TGhoston,1) // Ghost photon for checking gauge invariance }; inline TPhoton::TPhoton(const TFourVectorReal &p) { fMomentum = p; fSpinDensity = 0.5; } inline TPhoton::TPhoton(const TThreeVectorReal &p) { TFourVectorReal p4(p.Length(),p); fMomentum = p4; fSpinDensity = 0.5; } inline TFourVectorReal TPhoton::Mom() const { return fMomentum; } inline TPauliMatrix &TPhoton::SDM() const { return (TPauliMatrix &)fSpinDensity; } inline TPhoton &TPhoton::SetMom(const TFourVectorReal &p) { fMomentum = p; return *this; } inline TPhoton &TPhoton::SetMom(const TThreeVectorReal &p) { TFourVectorReal p4(p.Length(),p); return SetMom(p4); } inline TFourVectorComplex TPhoton::EpsStar(const Int_t mode) const { return Eps(mode).Conj(); } inline TPhoton &TPhoton::AllPol() { fSpinDensity = 1.0; return *this; } inline TBuffer &operator>>(TBuffer &buf, TPhoton *&obj) { TFourVectorReal *mom=(TFourVectorReal *)&obj->fMomentum; TPauliMatrix *sdm=(TPauliMatrix *)&obj->fSpinDensity; buf >> mom; buf >> sdm; return buf; } inline TBuffer &operator<<(TBuffer &buf, const TPhoton *obj) { TFourVectorReal *mom=(TFourVectorReal *)&obj->fMomentum; TPauliMatrix *sdm=(TPauliMatrix *)&obj->fSpinDensity; buf << mom; buf << sdm; return buf; } inline TFourVectorComplex TGhoston::EpsStar(const Int_t mode) const { return Eps(mode).Conj(); } #endif