source: JEM-EUSO/esaf_cc_at_lal/packages/common/eventviewer/include/ETreePainter.hh @ 114

Last change on this file since 114 was 114, checked in by moretto, 11 years ago

actual version of ESAF at CCin2p3

File size: 11.2 KB
Line 
1// $Id: ETreePainter.hh 2399 2005-12-07 16:28:09Z moreggia $
2// Author: Anne Stutz   2005/03/03
3
4/*****************************************************************************
5 * ESAF: Euso Simulation and Analysis Framework                              *
6 *                                                                           *
7 *  Id: ETreePainter                                                         *
8 *  Package: <packagename>                                                   *
9 *  Coordinator: <coordinator>                                               *
10 *                                                                           *
11 *****************************************************************************/
12
13#ifndef __ETREEPAINTER_HH__
14#define __ETREEPAINTER_HH__
15
16//#include "euso.hh"
17#include <TObject.h>
18#include <TSeqCollection.h>
19#include <TVector3.h>
20
21class TGeoManager;
22class TGeoVolume;
23class TGeoMedium;
24class TTree;
25class TChain;
26class EAtmosphere;
27class ETruth;
28class EShower;
29class EAtmosphereHistoPainter;
30class EEvent;
31class TH1F;
32class TCut;
33
34////////////////////////////////////////////////////////////////////////////////
35//                                                                           
36// ETreePainter                                                               
37//                                                                             
38// <brief class description>                                                   
39// * This class is responsible for reading events from the euso simulation tree
40// * and doing its graphycal representation.
41// * It can draw the EUSO Field of View, displays 3D tracks,
42// *        draw histos from Truth with Energy,Theta, Phi, X1
43// *        draw histograms for photons in atmosphere
44// *        draw histograms for photons on pupil
45// *        fill a simple tree with fundamental parameters                                                   
46////////////////////////////////////////////////////////////////////////////////
47
48
49
50class ETreePainter : public TObject {
51public:
52    ETreePainter( TTree* );
53    ETreePainter( TChain* );
54    virtual ~ETreePainter();
55
56    void Build();
57    void SetBranchesStatus( TTree* );
58    void BuildTree();                                            // Build fStree
59    // methods getting some info generated from simu data histos
60    TH1F* BuildAltHisto( Option_t *opt );
61    TH1F* BuildLongitudinalHisto( Option_t *opt );
62    TH1F* BuildTofHisto( Option_t *opt );
63    TH1F* BuildWlHisto( Option_t *opt );
64   
65    void FillTrack();                                            // Fill fTrack Data Member
66    void FillTree();                                             // Fills the simple tree
67   
68    // Prepare and draw the histogramms
69    void PrepareHistos(Option_t *,Float_t min,Float_t max,UInt_t Nbins);
70    void DrawHistos(Option_t *, const TCut& drawcut,Option_t * opt="",Float_t min=0.,Float_t max=0.,UInt_t Nbins=0);
71   
72    inline TVector3 EUSO() const {return fEUSO;}
73    inline Double_t DetectorRadius() const {return fRadius;}
74   
75   
76    // for shower drawings
77    //void AddShower();                               // Adds new shower read from the file
78    //void BuildWorld();                                      // Build the geometry
79   // virtual void Draw( Option_t * ="");     
80    //inline Bool_t IsWorldBuilt() {return fWorldBuild;}      // Checks if the geometry is built
81   
82
83private:
84       
85    TVector3 fEUSO;                   // detector position
86    Double_t fRadius;                 // pupil radius
87    Double_t fGTU;                    // GTU length
88    TChain      *fChain;              // Pointer for the euso tree chain to read from
89    TTree       *fTree;               // Pointer for the euso tree to read from
90    EEvent      *fEv;                 // Current Euso Event
91    EShower     *fShower;             // shower simu data
92    EAtmosphere *fAtmo;               // atmosphere simu data
93    ETruth      *fTruth;              // simu truth
94
95    Int_t        fEvTot;              // Total number of events in the fTree
96    TTree       *fStree;              // resulting tree
97
98   
99    // define a stucture to fill fStree
100    typedef struct {
101       
102        // flags to check the present analysis
103        Int_t fGood_fit;           // 1 if all fits ok, 0 otherwise
104        Int_t fH_max_last_bin;     // electrons Hmax, distce from maxbin to lastbin : to know if crashed shower
105        Int_t fX_max_last_bin;     // idem but for Xmax (longi profile)
106        Int_t fL_max_last_bin;     // idem but for Lmax (longi profile in km)
107        Int_t fW_max_last_bin;     // idem but for Width right side search (longi profile in km)
108        Int_t fH_fluomax_last_bin; // fluo Hmax, distce from maxbin to lastbin : to know if crashed shower
109        Int_t fX_fluomax_last_bin; // idem but for Xmax (longi profile)
110        Int_t fL_fluomax_last_bin; // idem but for Lmax (longi profile in km)
111        Int_t fW_fluomax_last_bin; // idem but for Width right side search (longi profile in km)
112        Int_t fH_ckovmax_last_bin; // idem for ckov
113        Int_t fX_ckovmax_last_bin; // idem for ckov
114       
115        // atmosphere conditions
116        Float_t fLatitude;       // geodetic latitude   [from -90 (south) to 90 (north)]
117        Float_t fLongitude;      // geodetic longitude  [from 0 to 360 (east)]
118        Float_t fDate;           // event date          [in sec UT, from 1st Jan 00:00:00] (year not taken into account)
119        Float_t fHclouds;        // clouds top altitude (km)
120        Float_t fCloudsThick;    // vertical thickness  (km)
121        Float_t fCloudsOD;       // vertical Optical Depth
122     
123        // Truth
124        Float_t fEnergy;
125        Float_t fTheta;
126        Float_t fPhi;
127       
128        Float_t fH1;             // first interaction point
129        Float_t fInitPosX;
130        Float_t fInitPosY;
131        Float_t fInitPosZ;
132        Float_t fX1;
133       
134        Float_t fTrueImpactX;    // shower impact and maximum
135        Float_t fTrueImpactY;
136        Float_t fTrueImpactZ;
137        Float_t fTrueMaxPosX;
138        Float_t fTrueMaxPosY;
139        Float_t fTrueMaxPosZ;
140        Float_t fTrueHmax;
141        Float_t fTrueXmax;
142        Float_t fTrueDmax;       // (km) shower max distance from detector
143
144
145      // Electrons from shower
146        Float_t fNe;           // longitudinal profile integration (in g/cm2)
147        Float_t fNe2;          // integrated until max only (in g/cm2)
148        Float_t fNemax;        // max of electrons longitudinal profile
149        Float_t fWidthshow;    // width (at half max) of electrons profile  (in km)
150        Float_t fWidth2show;   // width (at half max) of _the first half_ of electrons profile  (in km)
151       
152        Float_t fXmaxshow;     // Xmax from electrons profile fit  (in g/cm2)
153        Float_t fHmaxshow;     // Hmax from electrons profile fit  (in g/cm2)
154        Float_t fLmaxshow;     // shower max -> along track coordinate (from X1)
155     
156     
157      // Photons at creation
158      /******** FLUO ********/
159        Float_t fNph_f_L;      // total fluo created  (longitudinal histo in km)
160        Float_t fNph2_f_L;     // integrated until maximum only  (longitudinal histo in km)
161        Float_t fNmax_f_L;     // in 1/km  (i.e. per track binlength)
162        Float_t fWidth_f;      // width (at half max) of longitudinal fluo profile (in km)
163        Float_t fWidth2_f;     // width (at half max) of _the first half_ of longitudinal fluo profile (in km)
164       
165        Float_t fHmax_f;       // fluo max local height (km)
166        Float_t fxmax_f;       // fluo max -> x coordinate
167        Float_t fymax_f;       // fluo max -> y coordinate
168        Float_t fLmax_f;       // fluo max -> along track coordinate (from X1)
169        Float_t fXmaxph_f;     // Xmax for fluo (g/cm2)
170        Float_t fYieldmean;    // (per meter, per electron) mean fluo yield, averaged along the track
171        Float_t fYieldHmax;    // (per meter, per electron) fluo yield at shower max
172       
173        //Float_t fNph_f;        // total fluo created  (longitudinal histo in g/cm2)
174        //Float_t fNph2_f;       // integrated until maximum only  (longitudinal histo in g/cm2)
175        //Float_t fNmax_f;       // in cm2/g (i.e. per grammage binlength)
176       
177       
178      /******** CKOV ********/      // do not have : Lmax, Xmax, Ymax, Nph_L
179        Float_t fNph_c_L;        // total ckov created
180        Float_t fNph2_c_L;       // integrated until max only
181        Float_t fHmax_c;         // ckov max local height (km)
182        Float_t fYieldHmax_c;    // (per meter, per electron) ckov yield at shower max
183       
184        //Float_t fNmax_c;         // in cm2/g (i.e. per grammage binlength)
185        //Float_t fXmaxph_c;       // Xmax for ckov (g/cm2)
186        //Float_t fNph_c;        // total ckov created
187        //Float_t fNph2_c;       // integrated until max only
188       
189        //Float_t fWlmean_f;     // in nm
190        //Float_t fWlmean_c;     // ...
191        //Float_t fWlmean_tot;   // ...  // pbic for filling + not really usefull so far
192     
193     
194      // Photons on pupil
195            // Nph
196        Float_t fCkovInOmega;     // ckov within solid angle
197        Float_t fFluoInOmega;     // fluo within solid angle
198        Float_t fNph_f_p;         // total fluo on pupil
199        Float_t fNph_cdirect_p;   // total direct ckov on pupil
200        Float_t fNph2_f_p;        // fluo on pupil integrated until Tmax
201        Float_t fNph_airscat_p;   // air scattered ckov on pupil
202        Float_t fNph_cloudscat_p; // clouds scattered ckov on pupil
203        Float_t fNph_cr_p;        // reflected ckov on pupil
204           
205            // Nmax
206        Float_t fNmax_f_p_raw;    // per GTU - fluo, without any fit
207        Float_t fNmax_f_p;        // per GTU - fluo, with fit
208        Float_t fNmax_f2_p;       // per GTU : after ckov "substraction", i.e. with two fits
209        Float_t fNmax_tot_p_raw;  // per GTU -- with air scat ckov, without any fit
210        Float_t fNmax_tot_p;      // per GTU -- with air scat ckov, with fit
211        Float_t fNmax_cr_p;       // per GTU - reflected ckov
212        Float_t fNmax_crtot_p;    // per GTU - reflected + scattered ckov IN THE BIN
213        Float_t fWidth_f2_p;      // (in GTU) SIGMA of gaussian fit : HALF Width of fluo profile on pupil, after ckov "substraction"
214        Float_t fWidth_f_p;       // (in GTU) SIGMA of gaussian fit : HALF Width of fluo profile on pupil
215        Float_t fWidth_tot_p;     // (in GTU) SIGMA of gaussian fit : HALF Width of (fluo+scattered photons) profile on pupil
216           
217            // miscellaneous
218        Float_t fYieldGTUmax;  // (per meter, per electron) fluo yield (averaged if sev. bunches (fNbBunches) contribute to GTUmax)
219        Int_t fNbBunches;      // associated with above data (nb of bunches within GTUmax)
220        Float_t fXGTUmax;      // (g/cm2) GTU max corresponding position along track (averaged if sev. bunches (fNbBunches) contribute to GTUmax)
221        Float_t fXGTUmax_tot;  // (g/cm2) same as here above, but on (FLUO + CKOV backscattering) profile
222        Float_t fTransGTUmax;  // ratio (photons_on_pupil / photons_in_omega) #FLUO# bunch at XGTUmax
223        Float_t fTransMax;     // ratio (photons_on_pupil / photons_in_omega) #FLUO# bunch at Xmax_fluo
224        Float_t fWlmean_f_p;   // in nm
225        Float_t fWlmean_cb_p;  // ...
226        Float_t fWlmean_cr_p;  // ...
227        Float_t fWlmean_tot_p; // ...
228   
229    } Track;
230   
231    Track fTrack;
232   
233    // for shower drawings
234    //Bool_t       fWorldBuild;         // true if the geometry is build, false othewise
235    //TGeoVolume  *fTop;                // TOP Volume of the global geometry
236    //TGeoVolume  *fFoVVolume;          // Geometry realization of the Field of View of EUSO
237    //TGeoMedium  *fVacuum;             // Geometry Medium
238    //Int_t        fCurrentTrack;       // index of the current track read from fTree
239
240
241    ClassDef(ETreePainter,0)
242};
243
244#endif  /* __ETREEPAINTER_HH__ */
245
Note: See TracBrowser for help on using the repository browser.