// $Id: ParentPhoton.hh,v 1.18 2005/10/13 13:27:31 moreggia Exp $ // Author: M. Pallavicini 2002/07/03 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: ParentPhoton * * Package: RadiativeTransfer * * Coordinator: Sylvain.Moreggia * * * *****************************************************************************/ #ifndef __PARENTPHOTON_HH__ #define __PARENTPHOTON_HH__ #include "euso.hh" #include "EVector.hh" #include "Photon.hh" #include "EsafMsgSource.hh" class SinglePhoton; enum ParentPhotonType { Fluorescence=1, CerenkovReflected=2, CerenkovScattered=3}; //////////////////////////////////////////////////////////////////////////////// // // // ParentPhoton // // // // Description of a photon entering the detector pupil // // // //////////////////////////////////////////////////////////////////////////////// class ParentPhoton : public EsafMsgSource { public: // empty ctor ParentPhoton(); // ctor ParentPhoton(Int_t i, Double_t* x, Double_t* y , Double_t th, Double_t ph, Double_t wl, Double_t t, ParentPhotonType type); ParentPhoton(Int_t i, Double_t* x, Double_t* y , Double_t* d, Double_t wl, Double_t t, ParentPhotonType type); // ctor ParentPhoton(Int_t i, const TVector3 spos, const TVector3 pos, Double_t th, Double_t phi, Double_t wl, Double_t t, ParentPhotonType type); ParentPhoton(Int_t i, const TVector3 spos, const TVector3 pos, const TVector3 dir, Double_t wl, Double_t t, ParentPhotonType type); // associate a SinglePhoton (in atmosphere) with a ParentPhoton ParentPhoton( const SinglePhoton&, const TVector3&, const TVector3& ); // build this parent photon from variables // see ctor for variable meaning void Build(Int_t id, Double_t* spos, Double_t* pos, Double_t th, Double_t ph, Double_t w, Double_t t, ParentPhotonType typ); void Build(Int_t id, const TVector3 spos, const TVector3 pos, Double_t th, Double_t ph, Double_t w, Double_t t, ParentPhotonType typ); void Build(Int_t id, Double_t* spos, Double_t* pos, Double_t* dir, Double_t w, Double_t t, ParentPhotonType typ); void Build(Int_t id, const TVector3 spos, const TVector3 pos, const TVector3 dir, Double_t w, Double_t t, ParentPhotonType typ); // create a photon for Euso optics from this parent photon void CreatePhoton(); // return the child photon inline Photon& GetPhoton() { return fChild; } // dtor virtual ~ParentPhoton(); // inline functions with parameters (read only) inline Int_t Id() const {return fId;} inline Double_t T() const {return fTime;} inline Double_t W() const {return fWl;} inline const EVector& ShowerPos() const {return fShowerPos;} inline const EVector& PupilPos() const {return fPupilPos;} inline const EVector& Dir() const {return fDir;} inline ParentPhotonType Type() const {return fType;} inline Double_t Theta() const {return fTheta;} inline Double_t Phi() const {return fPhi;} private: Int_t fId; // photon fId (number 1..N) Double_t fTime; // fTime Double_t fWl; // wave length ParentPhotonType fType; // type of the photon EVector fShowerPos; // position of emission along shower EVector fPupilPos; // position on pupil EVector fDir; // direction Double_t fTheta,fPhi; // direction angles (redundant but useful) Photon fChild; // child photon ClassDef(ParentPhoton,0) }; #endif /* __PARENTPHOTON_HH__ */