1 | // $Id: ParentPhoton.hh 2770 2006-11-16 16:07:10Z moreggia $ |
---|
2 | // Author: M. Pallavicini 2002/07/03 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: ParentPhoton * |
---|
8 | * Package: RadiativeTransfer * |
---|
9 | * Coordinator: Sylvain.Moreggia * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __PARENTPHOTON_HH__ |
---|
14 | #define __PARENTPHOTON_HH__ |
---|
15 | |
---|
16 | #include "euso.hh" |
---|
17 | #include "EVector.hh" |
---|
18 | #include "Photon.hh" |
---|
19 | #include "EsafMsgSource.hh" |
---|
20 | |
---|
21 | class SinglePhoton; |
---|
22 | |
---|
23 | enum ParentPhotonType { Fluorescence=1, CerenkovReflected=2, CerenkovScattered=3}; |
---|
24 | |
---|
25 | //////////////////////////////////////////////////////////////////////////////// |
---|
26 | // // |
---|
27 | // ParentPhoton // |
---|
28 | // // |
---|
29 | // Description of a photon entering the detector pupil // |
---|
30 | // // |
---|
31 | //////////////////////////////////////////////////////////////////////////////// |
---|
32 | |
---|
33 | class ParentPhoton : public EsafMsgSource { |
---|
34 | public: |
---|
35 | |
---|
36 | // empty ctor |
---|
37 | ParentPhoton(); |
---|
38 | |
---|
39 | // ctor |
---|
40 | ParentPhoton(Int_t i, Double_t* x, Double_t* y , Double_t th, |
---|
41 | Double_t ph, Double_t wl, Double_t t, ParentPhotonType type); |
---|
42 | |
---|
43 | ParentPhoton(Int_t i, Double_t* x, Double_t* y , Double_t* d, |
---|
44 | Double_t wl, Double_t t, ParentPhotonType type); |
---|
45 | |
---|
46 | // ctor |
---|
47 | ParentPhoton(Int_t i, const TVector3 spos, const TVector3 pos, Double_t th, |
---|
48 | Double_t phi, Double_t wl, Double_t t, ParentPhotonType type); |
---|
49 | |
---|
50 | ParentPhoton(Int_t i, const TVector3 spos, const TVector3 pos, const TVector3 dir, |
---|
51 | Double_t wl, Double_t t, ParentPhotonType type); |
---|
52 | |
---|
53 | // associate a SinglePhoton (in atmosphere) with a ParentPhoton |
---|
54 | ParentPhoton( const SinglePhoton&, const TVector3&, const TVector3& ); |
---|
55 | |
---|
56 | // build this parent photon from variables |
---|
57 | // see ctor for variable meaning |
---|
58 | void Build(Int_t id, Double_t* spos, Double_t* pos, Double_t th, |
---|
59 | Double_t ph, Double_t w, Double_t t, ParentPhotonType typ); |
---|
60 | |
---|
61 | void Build(Int_t id, const TVector3 spos, const TVector3 pos, Double_t th, |
---|
62 | Double_t ph, Double_t w, Double_t t, ParentPhotonType typ); |
---|
63 | |
---|
64 | void Build(Int_t id, Double_t* spos, Double_t* pos, Double_t* dir, |
---|
65 | Double_t w, Double_t t, ParentPhotonType typ); |
---|
66 | |
---|
67 | void Build(Int_t id, const TVector3 spos, const TVector3 pos, const TVector3 dir, |
---|
68 | Double_t w, Double_t t, ParentPhotonType typ); |
---|
69 | |
---|
70 | // create a photon for Euso optics from this parent photon |
---|
71 | void CreatePhoton(); |
---|
72 | |
---|
73 | // return the child photon |
---|
74 | inline Photon& GetPhoton() { return fChild; } |
---|
75 | |
---|
76 | // dtor |
---|
77 | virtual ~ParentPhoton(); |
---|
78 | |
---|
79 | // inline functions with parameters (read only) |
---|
80 | inline Int_t Id() const {return fId;} |
---|
81 | inline Double_t T() const {return fTime;} |
---|
82 | inline Double_t W() const {return fWl;} |
---|
83 | |
---|
84 | inline const EVector& ShowerPos() const {return fShowerPos;} |
---|
85 | inline Double_t GetShowerAge() const {return fShowerAge;} |
---|
86 | inline const EVector& PupilPos() const {return fPupilPos;} |
---|
87 | inline const EVector& Dir() const {return fDir;} |
---|
88 | inline ParentPhotonType Type() const {return fType;} |
---|
89 | inline Double_t Theta() const {return fTheta;} |
---|
90 | inline Double_t Phi() const {return fPhi;} |
---|
91 | inline Int_t AtmoHistory() const {return fAtmoHistory;} |
---|
92 | inline Int_t AtmoNbinter() const {return fAtmoNbinter;} |
---|
93 | inline Bool_t IsCloudAbsorbed() const {return fCloudAbsorbed;} |
---|
94 | inline void SetAtmoHistory(Int_t i) {fAtmoHistory = i;} |
---|
95 | inline void SetAtmoNbinter(Int_t i) {fAtmoNbinter = i;} |
---|
96 | inline void SetType(ParentPhotonType t) {fType = t;} |
---|
97 | |
---|
98 | private: |
---|
99 | Int_t fId; // photon fId (number 1..N) |
---|
100 | Double_t fTime; // fTime |
---|
101 | Double_t fWl; // wave length |
---|
102 | ParentPhotonType fType; // type of the photon |
---|
103 | Int_t fAtmoHistory; // last interaction in atmosphere (0: direct, 1: reflected, 2: rayleigh, 3: cloud, 4: aerosol) |
---|
104 | Bool_t fCloudAbsorbed; // to handle with/without cloud case in a same run |
---|
105 | Int_t fAtmoNbinter; // nb of interaction in atmosphere |
---|
106 | EVector fShowerPos; // position of emission along shower |
---|
107 | Double_t fShowerAge; // shower age at photon creation |
---|
108 | EVector fPupilPos; // position on pupil |
---|
109 | EVector fDir; // direction |
---|
110 | Double_t fTheta,fPhi; // direction angles (redundant but useful) |
---|
111 | Photon fChild; // child photon |
---|
112 | |
---|
113 | ClassDef(ParentPhoton,0) |
---|
114 | }; |
---|
115 | |
---|
116 | #endif /* __PARENTPHOTON_HH__ */ |
---|
117 | |
---|