1 | #ifndef MARS_MHCalibrationPixel
|
---|
2 | #define MARS_MHCalibrationPixel
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TArrayF;
|
---|
9 | class TH1F;
|
---|
10 | class TH1I;
|
---|
11 | class TF1;
|
---|
12 | class TProfile;
|
---|
13 | class TPaveText;
|
---|
14 |
|
---|
15 | class MHCalibrationPixel : public MH
|
---|
16 | {
|
---|
17 |
|
---|
18 | private:
|
---|
19 |
|
---|
20 | static const Int_t fChargeNbinsHiGain;
|
---|
21 | static const Int_t fChargeNbinsLoGain;
|
---|
22 | static const Int_t fChargevsNbins;
|
---|
23 | static const Int_t fAbsTimeNbins;
|
---|
24 | static const Axis_t fAbsTimeFirst;
|
---|
25 | static const Axis_t fAbsTimeLast;
|
---|
26 | static const Int_t fRelTimeNbins;
|
---|
27 | static const Axis_t fRelTimeFirst;
|
---|
28 | static const Axis_t fRelTimeLast;
|
---|
29 | static const Float_t fProbLimit;
|
---|
30 | static const Int_t fNDFLimit;
|
---|
31 |
|
---|
32 | Int_t fPixId; // Pixel Nr
|
---|
33 |
|
---|
34 | TArrayF *fHiGains; //->
|
---|
35 | TArrayF *fLoGains; //->
|
---|
36 |
|
---|
37 | TProfile* fHivsLoGain;
|
---|
38 |
|
---|
39 | Double_t fOffset;
|
---|
40 | Double_t fSlope;
|
---|
41 |
|
---|
42 | protected:
|
---|
43 |
|
---|
44 | TH1F* fHChargeHiGain; //-> Summed FADC slices High Gain
|
---|
45 | TH1F* fHAbsTimeHiGain; //-> Mean arrival time in number of FADC sice
|
---|
46 | TH1F* fHRelTimeHiGain; //-> Mean arrival time in number of FADC sice
|
---|
47 | TH1I* fHChargevsNHiGain; //-> Summed Charge vs. Event Nr.
|
---|
48 |
|
---|
49 | TH1F* fHChargeLoGain; //-> Summed FADC slices Low Gain
|
---|
50 | TH1F* fHAbsTimeLoGain; //-> Mean arrival time in number of FADC sice
|
---|
51 | TH1F* fHRelTimeLoGain; //-> Mean arrival time in number of FADC sice
|
---|
52 | TH1I* fHChargevsNLoGain; //-> Summed Charge vs. Event Nr.
|
---|
53 |
|
---|
54 | TH1F* fHPSD; // Power spectrum density of fHBlindPixelChargevsN
|
---|
55 |
|
---|
56 | TF1* fChargeGausFit;
|
---|
57 | TF1* fRelTimeGausFit;
|
---|
58 |
|
---|
59 | TPaveText *fFitLegend;
|
---|
60 |
|
---|
61 | Int_t fTotalEntries; // Number of entries
|
---|
62 |
|
---|
63 | Axis_t fChargeFirstHiGain;
|
---|
64 | Axis_t fChargeLastHiGain;
|
---|
65 | Axis_t fChargeFirstLoGain;
|
---|
66 | Axis_t fChargeLastLoGain;
|
---|
67 |
|
---|
68 | Double_t fChargeChisquare;
|
---|
69 | Double_t fChargeProb;
|
---|
70 | Int_t fChargeNdf;
|
---|
71 |
|
---|
72 | Double_t fChargeMean;
|
---|
73 | Double_t fChargeMeanErr;
|
---|
74 | Double_t fChargeSigma;
|
---|
75 | Double_t fChargeSigmaErr;
|
---|
76 |
|
---|
77 | Double_t fRelTimeChisquare;
|
---|
78 | Double_t fRelTimeProb;
|
---|
79 | Int_t fRelTimeNdf;
|
---|
80 | Double_t fRelTimeMean;
|
---|
81 | Double_t fRelTimeMeanErr;
|
---|
82 | Double_t fRelTimeSigma;
|
---|
83 |
|
---|
84 | Float_t fAbsTimeMean;
|
---|
85 | Float_t fAbsTimeMeanErr;
|
---|
86 | Float_t fAbsTimeRms;
|
---|
87 |
|
---|
88 | Float_t fRelTimeLowerFitRangeHiGain;
|
---|
89 | Float_t fRelTimeUpperFitRangeHiGain;
|
---|
90 | Float_t fRelTimeLowerFitRangeLoGain;
|
---|
91 | Float_t fRelTimeUpperFitRangeLoGain;
|
---|
92 |
|
---|
93 | Float_t fAbsTimeFirstHiGain;
|
---|
94 | Float_t fAbsTimeFirstLoGain;
|
---|
95 | Float_t fAbsTimeLastHiGain;
|
---|
96 | Float_t fAbsTimeLastLoGain;
|
---|
97 |
|
---|
98 | Byte_t fFlags;
|
---|
99 |
|
---|
100 | enum { kUseLoGain, kChargeFitOK, kTimeFitOK };
|
---|
101 |
|
---|
102 | virtual void DrawLegend();
|
---|
103 |
|
---|
104 | public:
|
---|
105 |
|
---|
106 | MHCalibrationPixel(const char *name=NULL, const char *title=NULL);
|
---|
107 | ~MHCalibrationPixel();
|
---|
108 |
|
---|
109 | void Clear(Option_t *o="");
|
---|
110 | void Reset();
|
---|
111 |
|
---|
112 | void ChangeHistId(Int_t i);
|
---|
113 |
|
---|
114 | // Setters
|
---|
115 | void SetUseLoGain(Bool_t b = kTRUE);
|
---|
116 |
|
---|
117 | // Getters
|
---|
118 | const Double_t GetChargeMean() const { return fChargeMean; }
|
---|
119 | const Double_t GetChargeMeanErr() const { return fChargeMeanErr; }
|
---|
120 | const Double_t GetChargeSigma() const { return fChargeSigma; }
|
---|
121 | const Double_t GetChargeSigmaErr() const { return fChargeSigmaErr; }
|
---|
122 | const Double_t GetChargeChiSquare() const { return fChargeChisquare; }
|
---|
123 | const Double_t GetChargeProb() const { return fChargeProb; }
|
---|
124 | const Int_t GetChargeNdf() const { return fChargeNdf; }
|
---|
125 |
|
---|
126 | const Float_t GetAbsTimeFirstHiGain() const { return fAbsTimeFirstHiGain; }
|
---|
127 | const Float_t GetAbsTimeFirstLoGain() const { return fAbsTimeFirstLoGain; }
|
---|
128 | const Float_t GetAbsTimeLastHiGain() const { return fAbsTimeLastHiGain; }
|
---|
129 | const Float_t GetAbsTimeLastLoGain() const { return fAbsTimeLastLoGain; }
|
---|
130 |
|
---|
131 | const Double_t GetRelTimeMean() const { return fRelTimeMean; }
|
---|
132 | const Double_t GetRelTimeMeanErr() const { return fRelTimeMeanErr; }
|
---|
133 | const Double_t GetRelTimeSigma() const { return fRelTimeSigma; }
|
---|
134 | const Double_t GetRelTimeChiSquare() const { return fRelTimeChisquare;}
|
---|
135 | const Double_t GetRelTimeProb() const { return fRelTimeProb; }
|
---|
136 | const Int_t GetRelTimeNdf() const { return fRelTimeNdf; }
|
---|
137 |
|
---|
138 |
|
---|
139 | const Float_t GetAbsTimeMean() const { return fAbsTimeMean; }
|
---|
140 | const Float_t GetAbsTimeMeanErr() const { return fAbsTimeMeanErr; }
|
---|
141 | const Float_t GetAbsTimeRms() const { return fAbsTimeRms; }
|
---|
142 |
|
---|
143 | const TH1F *GetHCharge() { return fHChargeHiGain; }
|
---|
144 | const TH1F *GetHCharge() const { return fHChargeHiGain; }
|
---|
145 |
|
---|
146 | const TH1F *GetHAbsTime() { return fHAbsTimeHiGain; }
|
---|
147 | const TH1F *GetHAbsTime() const { return fHAbsTimeHiGain; }
|
---|
148 |
|
---|
149 | const TH1F *GetHRelTime() { return fHRelTimeHiGain; }
|
---|
150 | const TH1F *GetHRelTime() const { return fHRelTimeHiGain; }
|
---|
151 |
|
---|
152 | const TH1I *GetHChargevsN() { return fHChargevsNHiGain;}
|
---|
153 | const TH1I *GetHChargevsN() const { return fHChargevsNHiGain;}
|
---|
154 |
|
---|
155 | Double_t GetOffset() const { return fOffset; }
|
---|
156 | Double_t GetSlope() const { return fSlope; }
|
---|
157 |
|
---|
158 | Bool_t UseLoGain();
|
---|
159 |
|
---|
160 | Bool_t IsChargeFitOK() const;
|
---|
161 | Bool_t IsTimeFitOK() const;
|
---|
162 | Bool_t IsUseLoGain() const;
|
---|
163 | Bool_t IsEmpty() const;
|
---|
164 |
|
---|
165 | // Fill histos
|
---|
166 | Bool_t FillChargeLoGain(Float_t q);
|
---|
167 | Bool_t FillAbsTimeLoGain(Float_t t);
|
---|
168 | Bool_t FillRelTimeLoGain(Float_t t);
|
---|
169 | Bool_t FillChargevsNLoGain(Float_t q, Int_t n);
|
---|
170 |
|
---|
171 | Bool_t FillChargeHiGain(Float_t q);
|
---|
172 | Bool_t FillAbsTimeHiGain(Float_t t);
|
---|
173 | Bool_t FillRelTimeHiGain(Float_t t);
|
---|
174 | Bool_t FillChargevsNHiGain(Float_t q, Int_t n);
|
---|
175 |
|
---|
176 | Bool_t FillPointInGraph(Float_t qhi, Float_t qlo);
|
---|
177 |
|
---|
178 | Bool_t SetupFill(const MParList *pList);
|
---|
179 | Bool_t Fill(const MParContainer *, const Stat_t w=1) { return kTRUE; }
|
---|
180 |
|
---|
181 | // Fits
|
---|
182 | Bool_t FitCharge(Option_t *option="RQ0");
|
---|
183 | Bool_t FitTime(Option_t *option="RQ0");
|
---|
184 |
|
---|
185 | void FitHiGainvsLoGain();
|
---|
186 |
|
---|
187 | // Draws
|
---|
188 | virtual void Draw(Option_t *option="");
|
---|
189 | TObject *DrawClone(Option_t *option="") const;
|
---|
190 |
|
---|
191 | // Prints
|
---|
192 | void PrintChargeFitResult();
|
---|
193 | void PrintTimeFitResult();
|
---|
194 |
|
---|
195 | // Others
|
---|
196 | virtual void CutAllEdges();
|
---|
197 |
|
---|
198 | ClassDef(MHCalibrationPixel, 1) // Histograms for each calibrated pixel
|
---|
199 | };
|
---|
200 |
|
---|
201 | #endif
|
---|