1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: ProfileModule.hh 2759 2006-09-07 08:10:49Z moreggia $ |
---|
3 | // Author: Anne Stutz Jun, 6 2005 |
---|
4 | |
---|
5 | /***************************************************************************** |
---|
6 | * ESAF: Euso Simulation and Analysis Framework * |
---|
7 | * * |
---|
8 | * Id: ProfileModule * |
---|
9 | * Package: <packagename> * |
---|
10 | * Coordinator: <coordinator> * |
---|
11 | * * |
---|
12 | *****************************************************************************/ |
---|
13 | |
---|
14 | #ifndef __PROFILEMODULE_HH_ |
---|
15 | #define __PROFILEMODULE_HH_ |
---|
16 | |
---|
17 | #include "euso.hh" |
---|
18 | #include "RecoModule.hh" |
---|
19 | #include "EarthVector.hh" |
---|
20 | #include "TArrayD.h" |
---|
21 | #include "TAxis.h" |
---|
22 | #include <TH1F.h> |
---|
23 | |
---|
24 | class RecoEvent; |
---|
25 | class RecoRootEvent; |
---|
26 | |
---|
27 | enum ProfileAnalysis {Xmaxshift_airdensity,EShift_airDensity}; |
---|
28 | |
---|
29 | //////////////////////////////////////////////////////////////////////////////// |
---|
30 | // // |
---|
31 | // ProfileModule // |
---|
32 | // // |
---|
33 | // <brief class description> // |
---|
34 | // // |
---|
35 | //////////////////////////////////////////////////////////////////////////////// |
---|
36 | |
---|
37 | class ProfileModule : public RecoModule { |
---|
38 | public: |
---|
39 | // ctor |
---|
40 | ProfileModule(); |
---|
41 | // dtor |
---|
42 | virtual ~ProfileModule(); |
---|
43 | |
---|
44 | // Init method: called at the beginning of a run |
---|
45 | Bool_t Init(); |
---|
46 | |
---|
47 | // called before each event process |
---|
48 | Bool_t PreProcess(); |
---|
49 | |
---|
50 | // event processing |
---|
51 | Bool_t Process( RecoEvent* ); |
---|
52 | |
---|
53 | // called after processing an event |
---|
54 | Bool_t PostProcess(); |
---|
55 | |
---|
56 | // save root output |
---|
57 | virtual Bool_t SaveRootData( RecoRootEvent* ); |
---|
58 | |
---|
59 | // called at the end of each run |
---|
60 | Bool_t Done(); |
---|
61 | |
---|
62 | // memory clean |
---|
63 | void UserMemoryClean(); |
---|
64 | |
---|
65 | // load previous modules |
---|
66 | void LoadModules(); |
---|
67 | |
---|
68 | // study Xmax shift due to realistic air density profiles, or unprecise reco of shower geometry |
---|
69 | // Profile is NOT entirely reconstructed |
---|
70 | void XmaxShift_AirDensity(); |
---|
71 | |
---|
72 | // study Energy shift due to realistic air density profiles, or unprecise reco of shower geometry |
---|
73 | // Track is used, NO FITS !! |
---|
74 | void EShift_AirDensity(); |
---|
75 | |
---|
76 | // introduce an error in Z-cordinate, then applied to XmaxShift_AirDensity() reco part |
---|
77 | // gaussian distribution (fMeanZerror,fSigmaZerror) |
---|
78 | Double_t IntroduceZerror(); |
---|
79 | |
---|
80 | // introduce an error in Theta-cordinate, then applied to XmaxShift_AirDensity() reco part |
---|
81 | // gaussian distribution (fMeanThetaerror,fSigmaThetaerror) |
---|
82 | Double_t IntroduceThetaerror(); |
---|
83 | |
---|
84 | EsafConfigClass(Reco,ProfileModule) |
---|
85 | |
---|
86 | |
---|
87 | private: |
---|
88 | |
---|
89 | RecoEvent *fEvent; // event being analysed |
---|
90 | ProfileAnalysis fAnalysisType; // type of analysis to carry out |
---|
91 | Double_t fSigmaZerror; // config used in IntroduceZerror() method |
---|
92 | Double_t fMeanZerror; // config used in IntroduceZerror() method |
---|
93 | Double_t fSigmaThetaerror; // config used in IntroduceThetaerror() method |
---|
94 | Double_t fMeanThetaerror; // config used in IntroduceThetaerror() method |
---|
95 | string fThetaMode; // tell if refce pos is ShowerMax or EarthImpact |
---|
96 | |
---|
97 | // data to describe simu and reco electron profile |
---|
98 | void ResetArrays(Int_t n =0); |
---|
99 | Int_t fNbsteps_simu; |
---|
100 | Int_t fNbsteps_crash; // handle crash of simu and reco shower : the quicker crash is stored here |
---|
101 | TArrayD fx_simu; |
---|
102 | TArrayD fy_simu; |
---|
103 | TArrayD fz_simu; |
---|
104 | TArrayD fx_reco; |
---|
105 | TArrayD fy_reco; |
---|
106 | TArrayD fz_reco; |
---|
107 | TArrayD fX_simu; |
---|
108 | TArrayD fX_reco; |
---|
109 | TArrayD fNe_simu; |
---|
110 | TH1F* fElecProfile_simu; |
---|
111 | TH1F* fElecProfile_reco; |
---|
112 | |
---|
113 | |
---|
114 | |
---|
115 | ////// results |
---|
116 | Double_t fXmax; // reco depth of maximum |
---|
117 | Double_t fRecoProfIntegral; // reco integrate profile |
---|
118 | Double_t fSimuProfIntegral; // simu integrate profile |
---|
119 | Double_t fZshift; |
---|
120 | Double_t fThetashift; |
---|
121 | Double_t fQuality; // tell if reco is ok |
---|
122 | |
---|
123 | ////// simu inputs + profile truth |
---|
124 | Double_t fTheta; // local zenith angle (not in MES) |
---|
125 | Double_t fPhi; // azimuth zenith angle (not in MES) |
---|
126 | EarthVector fTrackDir; // shower track 3D-direction (in MES) |
---|
127 | EarthVector fEarthImpact; // |
---|
128 | EarthVector fTOAImpact; // |
---|
129 | EarthVector fShowerMaxPos; // true shower max position |
---|
130 | Double_t fTrueXmax; // true depth of maximum |
---|
131 | |
---|
132 | |
---|
133 | ClassDef(ProfileModule,0) |
---|
134 | }; |
---|
135 | |
---|
136 | |
---|
137 | |
---|
138 | #endif /* __PROFILEMODULE_HH_ */ |
---|
139 | |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | |
---|