1 | // $Id: ESimpleDetectorPainter.hh 2845 2010-02-25 05:43:43Z fenu $ |
---|
2 | // Author: Sylvain Moreggia 2006/03/29 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: ESimpleDetectorPainter * |
---|
8 | * Package: <packagename> * |
---|
9 | * Coordinator: <coordinator> * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __ESIMPLEDETECTORPAINTER_HH__ |
---|
14 | #define __ESIMPLEDETECTORPAINTER_HH__ |
---|
15 | |
---|
16 | #include "ESystemOfUnits.hh" |
---|
17 | #include "EAnimator.hh" |
---|
18 | #include "TSeqCollection.h" |
---|
19 | #include <TVector3.h> |
---|
20 | #include <TVector2.h> |
---|
21 | #include <TArrayI.h> |
---|
22 | #include <TArrayF.h> |
---|
23 | |
---|
24 | class ESimpleDetector; |
---|
25 | class EGeometry; |
---|
26 | class ETruth; |
---|
27 | class TH1F; |
---|
28 | class TH2F; |
---|
29 | class TH2I; |
---|
30 | class TTimer; |
---|
31 | |
---|
32 | |
---|
33 | //////////////////////////////////////////////////////////////////////////////// |
---|
34 | // // |
---|
35 | // ESimpleDetectorPainter // |
---|
36 | // // |
---|
37 | // this class plots a set of standard histograms describing the photoelectron // |
---|
38 | // signal generated by SimpleDetector simulation // |
---|
39 | // generation and transmission in atmosphere // |
---|
40 | // // |
---|
41 | //////////////////////////////////////////////////////////////////////////////// |
---|
42 | |
---|
43 | class ESimpleDetectorPainter : public EAnimator { |
---|
44 | public: |
---|
45 | |
---|
46 | ESimpleDetectorPainter( ESimpleDetector* det, const EGeometry* geom, ETruth* truth,Int_t maxscatorder); |
---|
47 | |
---|
48 | virtual ~ESimpleDetectorPainter(); |
---|
49 | |
---|
50 | |
---|
51 | virtual void Draw(Option_t *opt=""); |
---|
52 | |
---|
53 | // preprocess : build histos NBpixels_hit vs/ GTU (as function of SNR) |
---|
54 | void Preprocess(); |
---|
55 | |
---|
56 | // generate all histos |
---|
57 | void BuildAll(); |
---|
58 | |
---|
59 | // generate histos of pe- time spectrum |
---|
60 | void BuildTimeHistos(); |
---|
61 | |
---|
62 | // generate wavelength spectra of photons that gave pe- |
---|
63 | void BuildWlHistos(); |
---|
64 | |
---|
65 | // generate FoV histo : pixel_i vs/ pixel_j |
---|
66 | void BuildFoVHistos(); |
---|
67 | |
---|
68 | inline TVector3 EUSO() const {return fEUSO;} |
---|
69 | inline Float_t DetectorRadius() const {return fRadius;} |
---|
70 | |
---|
71 | |
---|
72 | TH1F* GetTimeHisto(const char*, const char* =0); |
---|
73 | TH1F* GetWlHisto(const char*, const char* =0); |
---|
74 | TH2I* GetFoVHisto(const char*, const char* =0,Int_t nbsigmas=-1000); |
---|
75 | |
---|
76 | TSeqCollection* GetListOfHistos() {return fHistos;} |
---|
77 | |
---|
78 | virtual void NextFrame() {} |
---|
79 | |
---|
80 | private: |
---|
81 | |
---|
82 | TVector3 fEUSO; |
---|
83 | Float_t fRadius; |
---|
84 | Float_t fGTUlength; |
---|
85 | UInt_t fNbPixelOnSide; // nb of pixels on a side of the square FS |
---|
86 | Float_t fFirstGtuTime; // first GTU up-edge time |
---|
87 | UInt_t fNbGTUs; // nb of GTUs containing signal |
---|
88 | Int_t fNumPe; // nb of photoelectrons generated by detector simu |
---|
89 | Int_t fMaxScatOrder; // mutliple scattering max order |
---|
90 | Float_t fMeanBgnd; // mean bgnd in pe-/pixel/GTU |
---|
91 | Int_t fFoV_xmin; // FoV bounds for all pe- --> |
---|
92 | Int_t fFoV_xmax; // |
---|
93 | Int_t fFoV_ymin; // |
---|
94 | Int_t fFoV_ymax; // <-- |
---|
95 | Int_t fFoV_xmin2; // FoV bounds only signal > 2sigmas --> |
---|
96 | Int_t fFoV_xmax2; // |
---|
97 | Int_t fFoV_ymin2; // |
---|
98 | Int_t fFoV_ymax2; // <-- |
---|
99 | Int_t fFoV_xmin_sig; // FoV bounds only signal > 3sigmas --> |
---|
100 | Int_t fFoV_xmax_sig; // |
---|
101 | Int_t fFoV_ymin_sig; // |
---|
102 | Int_t fFoV_ymax_sig; // <-- |
---|
103 | |
---|
104 | TSeqCollection *fHistos; |
---|
105 | |
---|
106 | ESimpleDetector *fDetector; // contains simu detector data |
---|
107 | ETruth *fTruth; // contains the truth (used to get shower impact) |
---|
108 | |
---|
109 | |
---|
110 | ClassDef(ESimpleDetectorPainter,1) |
---|
111 | }; |
---|
112 | |
---|
113 | #endif /* __ESIMPLEDETECTORPAINTER_HH__ */ |
---|
114 | |
---|