// ESAF : Euso Simulation and Analysis Framework // $Id: ESinglePhoton.hh,v 1.8 2005/04/14 15:51:23 moreggia Exp $ // A.Thea created Jun, 9 2004 #ifndef __ESINGLEPHOTON_HH_ #define __ESINGLEPHOTON_HH_ #include "TObject.h" #include "TVector3.h" class ESinglePhoton : public TObject { public: ESinglePhoton(); virtual ~ESinglePhoton(); virtual void Clear( Option_t* ="" ); //getters inline UChar_t GetType() const {return fType;} inline UInt_t GetBunchId() const {return fBunchId;} inline UChar_t GetHistory() const {return fHistory;} inline Bool_t IsAbsorbed() const {return fAbsorbed;} inline Float_t GetDate() const {return fDate;} inline Float_t GetTof() const {return fTof;} inline Float_t GetWl() const {return fWl;} inline Int_t GetNbinter() const {return fNbinter;} inline TVector3 GetShowerPos() const; inline TVector3 GetPos() const; //setters inline void SetType ( UInt_t type ) { fType = type; } inline void SetHistory( UInt_t hist ) { fHistory = hist; } inline void SetAbsorbed(Bool_t f = true) {fAbsorbed = f;} inline void SetDate(Float_t d) {fDate = d;} inline void SetTof( Float_t tof ) {fTof = tof; } inline void SetWl( Float_t wl ) {fWl = wl; } inline void SetNbinter ( Int_t nb ) { fNbinter = nb; } inline void SetShowerPos( const TVector3& v ); inline void SetPos( const TVector3& v ); inline void SetBunchId(UInt_t id) {fBunchId = id;} private: UChar_t fType; // photon type UInt_t fBunchId; // id of the bunch that has given this photon UChar_t fHistory; // how photon has been created // 0 : direct // 1 : reflected // 2 : rayleigh scattered // 3 : clouds scattered Bool_t fAbsorbed; // true if photon has been absorbed during its final transfer to pupil Float_t fDate; // date of creation Float_t fTof; // time of flight since creation UNTIL PUPIL Float_t fWl; // wavelength Int_t fNbinter; // number of interactions undergone Float_t fShowerPosX; // X.position of creation Float_t fShowerPosY; // Y.position of creation Float_t fShowerPosZ; // Z.position of creation Float_t fPosX; // last position.X before reaching pupil Float_t fPosY; // last position.Y before reaching pupil Float_t fPosZ; // last position.Z before reaching pupil ClassDef(ESinglePhoton,1) }; inline TVector3 ESinglePhoton::GetShowerPos() const { TVector3 rtn(fShowerPosX,fShowerPosY,fShowerPosZ); return rtn; } inline void ESinglePhoton::SetShowerPos( const TVector3& v ){ fShowerPosX = v.X(); fShowerPosY = v.Y(); fShowerPosZ = v.Z(); } inline TVector3 ESinglePhoton::GetPos() const { TVector3 rtn(fPosX,fPosY,fPosZ); return rtn; } inline void ESinglePhoton::SetPos( const TVector3& v ){ fPosX = v.X(); fPosY = v.Y(); fPosZ = v.Z(); } #endif /* __ESINGLEPHOTON_HH_ */