1 | // $Id: RecoTruth.hh 3018 2012-03-26 05:26:54Z fenu $ |
---|
2 | // Author: R.Pesce 2005/01/04 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: RecoTruth * |
---|
8 | * Package: <packagename> * |
---|
9 | * Coordinator: <coordinator> * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __RECOTRUTH_HH__ |
---|
14 | #define __RECOTRUTH_HH__ |
---|
15 | |
---|
16 | #include "TObject.h" |
---|
17 | #include "TVector3.h" |
---|
18 | #include "ESystemOfUnits.hh" |
---|
19 | #include "EConst.hh" |
---|
20 | #include <math.h> |
---|
21 | //////////////////////////////////////////////////////////////////////////////// |
---|
22 | // // |
---|
23 | // RecoTruth // |
---|
24 | // // |
---|
25 | // <brief class description> // |
---|
26 | // // |
---|
27 | //////////////////////////////////////////////////////////////////////////////// |
---|
28 | |
---|
29 | class RecoTruth : public TObject { |
---|
30 | public: |
---|
31 | RecoTruth(); |
---|
32 | //ctor |
---|
33 | |
---|
34 | RecoTruth( const RecoTruth& ); |
---|
35 | //copy ctor |
---|
36 | |
---|
37 | virtual ~RecoTruth(); |
---|
38 | //dtor |
---|
39 | |
---|
40 | virtual void Copy( TObject& ) const; |
---|
41 | //copy to a new obj |
---|
42 | |
---|
43 | void Clear(); |
---|
44 | //clear method |
---|
45 | |
---|
46 | //setters |
---|
47 | inline void SetParticleCode(Int_t t) {fTrueParticleCode = t;} |
---|
48 | inline void SetEnergy(Double_t t) {fEnergy = t;} |
---|
49 | inline void SetTheta(Double_t t) {fTheta = t;} |
---|
50 | inline void SetPhi(Double_t t) {fPhi = t;} |
---|
51 | inline void SetX1(Double_t t) {fX1 = t;} |
---|
52 | inline void SetInitPos(TVector3 t) { |
---|
53 | fInitPosX = t.X()/sou::km; |
---|
54 | fInitPosY = t.Y()/sou::km; |
---|
55 | fInitPosZ = t.Z()/sou::km; |
---|
56 | } |
---|
57 | inline void SetDir(TVector3 t) { |
---|
58 | fDirX = t.X()/sou::km; |
---|
59 | fDirY = t.Y()/sou::km; |
---|
60 | fDirZ = t.Z()/sou::km; |
---|
61 | } |
---|
62 | inline void SetTOAImpact(TVector3 t) { |
---|
63 | fTOAImpactX = t.X()/sou::km; |
---|
64 | fTOAImpactY = t.Y()/sou::km; |
---|
65 | fTOAImpactZ = t.Z()/sou::km; |
---|
66 | } |
---|
67 | inline void SetEarthImpact(TVector3 t) { |
---|
68 | fEarthImpactX = t.X()/sou::km; |
---|
69 | fEarthImpactY = t.Y()/sou::km; |
---|
70 | fEarthImpactZ = t.Z()/sou::km; |
---|
71 | } |
---|
72 | inline void SetEarthAge(Double_t t) {fEarthAge = t;} |
---|
73 | inline void SetXMax(Double_t t) {fXMax = t;} |
---|
74 | inline void SetNemax(Double_t t) {fNemax = t;} |
---|
75 | inline void SetMaxPos(TVector3 t) { |
---|
76 | fMaxPosX = t.X()/sou::km; |
---|
77 | fMaxPosY = t.Y()/sou::km; |
---|
78 | fMaxPosZ = t.Z()/sou::km; |
---|
79 | } |
---|
80 | inline void SetHclouds( Double_t h ) { fHclouds = h; } |
---|
81 | inline void SetcloudsThick( Double_t h ) { fTrueCloudsthick=h; } |
---|
82 | inline void SetcloudsOD( Double_t h ) { fTrueCloudsOD=h; } |
---|
83 | inline void SetLatitude( Double_t h ) { fTrueLatitude=h; } |
---|
84 | inline void SetLongitude( Double_t h ) { fTrueLongitude=h; } |
---|
85 | inline void SetDate( Double_t h ) { fTrueDate=h; } |
---|
86 | inline void SetHground( Double_t h ) { fTrueHGround=h; } |
---|
87 | inline void SetGroundAlbedo( Double_t h ) { fTrueGroundAlbedo=h; } |
---|
88 | inline void SetGroundSpecular( Double_t h ) { fTrueGroundSpecular=h; } |
---|
89 | |
---|
90 | |
---|
91 | //getters |
---|
92 | inline Int_t GetParticleCode() const { return fTrueParticleCode; } |
---|
93 | inline Double_t GetEnergy() const { return fEnergy; } |
---|
94 | inline Double_t GetTheta() const { return fTheta; } |
---|
95 | inline Double_t GetPhi() const { return fPhi; } |
---|
96 | inline Double_t GetX1() const { return fX1; } |
---|
97 | inline Double_t GetXmax() const { return fXMax; } |
---|
98 | inline Double_t GetNemax() const { return fNemax; } |
---|
99 | inline Double_t GetHmax() const { return sqrt(pow(fMaxPosX*sou::km,2)+pow(fMaxPosY*sou::km,2)+pow((fMaxPosZ*sou::km)+EConst::EarthRadius(),2))-EConst::EarthRadius(); }//pay attention this is working in ESAF units! Not in km |
---|
100 | inline Double_t GetEarthAge() const { return fEarthAge;} |
---|
101 | inline TVector3 GetInitPos() const {return TVector3(fInitPosX,fInitPosY,fInitPosZ);} |
---|
102 | inline TVector3 GetDir() const {return TVector3(fDirX,fDirY,fDirZ);} |
---|
103 | inline TVector3 GetMaxPos() const {return TVector3(fMaxPosX,fMaxPosY,fMaxPosZ);} |
---|
104 | inline TVector3 GetTOAImpact() const {return TVector3(fTOAImpactX,fTOAImpactY,fTOAImpactZ);} |
---|
105 | inline TVector3 GetEarthImpact() const {return TVector3(fEarthImpactX,fEarthImpactY,fEarthImpactZ);} |
---|
106 | Double_t GetInitPos( Int_t ) const; |
---|
107 | Double_t GetMaxPos( Int_t ) const; |
---|
108 | Double_t GetEarthImpact( Int_t ) const; |
---|
109 | inline Double_t GetHclouds() const { return fHclouds; } |
---|
110 | inline Double_t GetcloudsThick() const { return fTrueCloudsthick; } |
---|
111 | inline Double_t GetcloudsOD() const { return fTrueCloudsOD; } |
---|
112 | inline Double_t GetLatitude() const { return fTrueLatitude; } |
---|
113 | inline Double_t GetLongitude() const { return fTrueLongitude; } |
---|
114 | inline Double_t GetDate() const { return fTrueDate; } |
---|
115 | inline Double_t GetHground() const { return fTrueHGround; } |
---|
116 | inline Double_t GetGroundAlbedo() const { return fTrueGroundAlbedo; } |
---|
117 | inline Double_t GetGroundSpecular() const { return fTrueGroundSpecular; } |
---|
118 | |
---|
119 | private: |
---|
120 | Int_t fTrueParticleCode; |
---|
121 | Double_t fEnergy; |
---|
122 | Double_t fTheta; |
---|
123 | Double_t fPhi; |
---|
124 | Double_t fX1; |
---|
125 | Double_t fInitPosX; |
---|
126 | Double_t fInitPosY; |
---|
127 | Double_t fInitPosZ; |
---|
128 | Double_t fDirX; // in MES |
---|
129 | Double_t fDirY; // in MES |
---|
130 | Double_t fDirZ; // in MES |
---|
131 | Double_t fMaxPosX; |
---|
132 | Double_t fMaxPosY; |
---|
133 | Double_t fMaxPosZ; |
---|
134 | Double_t fXMax; |
---|
135 | Double_t fNemax; |
---|
136 | Double_t fTOAImpactX; |
---|
137 | Double_t fTOAImpactY; |
---|
138 | Double_t fTOAImpactZ; |
---|
139 | Double_t fEarthImpactX; |
---|
140 | Double_t fEarthImpactY; |
---|
141 | Double_t fEarthImpactZ; |
---|
142 | Double_t fEarthAge; |
---|
143 | Double_t fHclouds; |
---|
144 | Double_t fTrueCloudsthick; // clouds thickness |
---|
145 | Double_t fTrueCloudsOD; // clouds OD |
---|
146 | Double_t fTrueLatitude; // geodetic latitude (also used to identify std atmospheres) |
---|
147 | // USStd : 100 |
---|
148 | // Tropical : 101 |
---|
149 | // MidLat Summer : 102 |
---|
150 | // MidLat Winter : 103 |
---|
151 | // LinsleyAtmo : 104 |
---|
152 | Double_t fTrueLongitude; // geodetic longitude |
---|
153 | Double_t fTrueDate; // event date |
---|
154 | Double_t fTrueHGround; // ground altitude |
---|
155 | Double_t fTrueGroundAlbedo; // ground albedo |
---|
156 | Double_t fTrueGroundSpecular; // ground specular component intensity |
---|
157 | |
---|
158 | ClassDef(RecoTruth,2) |
---|
159 | }; |
---|
160 | |
---|
161 | #endif /* __RECOTRUTH_HH__ */ |
---|
162 | |
---|