// ESAF : Euso Simulation and Analysis Framework // $Id: SinglePhoton.hh,v 1.18 2005/04/14 15:52:44 moreggia Exp $ // S. Moreggia created 27 October 2003 // Single photon description in atmosphere #ifndef __SINGLEPHOTON_HH__ #define __SINGLEPHOTON_HH__ #include "EarthVector.hh" #include "BunchOfPhotons.hh" enum PhotonStatus {Direct,Reflected,RaylScat,CloudScat}; class SinglePhoton { public: // ctors SinglePhoton(); SinglePhoton(Double_t,Double_t,const EarthVector&,const EarthVector&,PhotonType, PhotonStatus status = Direct, UInt_t bid = 0); SinglePhoton(PhotonType,Double_t,Double_t,Double_t,const EarthVector&,const EarthVector&,const EarthVector&,PhotonStatus status = Direct, UInt_t bid = 0); SinglePhoton(const BunchOfPhotons&,Double_t,const EarthVector&,PhotonStatus = Direct); // dtor virtual ~SinglePhoton(); // GetMembers methods inline UInt_t BunchId() const {return fBunchId;} inline PhotonType Type() const {return fType;} inline PhotonStatus Status() const {return fStatus;} inline Double_t Date() const {return fDate;} inline Double_t Tof() const {return fTof;} inline Double_t Wl() const {return fWl;} inline const EarthVector& Pos() const {return fPos;} inline const EarthVector& ShowerPos() const {return fShowerPos;} inline const EarthVector& Dir() const {return fDir;} inline Bool_t IsAbsorbed() const {return fAbsorbed;} // SetMember methods inline void Absorbed() {fAbsorbed = true;} inline void AddToPos(const EarthVector& v) {fPos += v;} inline void AddToTof(Double_t t) {fTof += t;} void AddToPosTof(const EarthVector&); protected: UInt_t fBunchId; // identity of the bunch giving this single photon PhotonType fType; // type of photon PhotonStatus fStatus; // SinglePhoton origin Double_t fDate; // date of creation mutable Double_t fTof; // tof between creation and pupil Double_t fWl; // wavelength EarthVector fShowerPos; // position in the shower mutable EarthVector fPos;// position anywhere else EarthVector fDir; // direction Bool_t fAbsorbed; // true if photon absorbed in atmosphere ClassDef(SinglePhoton,0) }; #endif /* __SINGLEPHOTON_HH__ */