1 | #ifndef MARS_MCalibrationPix
|
---|
2 | #define MARS_MCalibrationPix
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #include "MHCalibrationPixel.h"
|
---|
9 |
|
---|
10 | class MCalibrationPix : public MParContainer
|
---|
11 | {
|
---|
12 | private:
|
---|
13 |
|
---|
14 | static const Float_t gkAverageQE; // The average quantum efficieny agreed on for the first analysis
|
---|
15 | static const Float_t gkAverageQEErr; // The error of average quantum efficieny
|
---|
16 |
|
---|
17 | static const Float_t gkConversionHiLo; // The default conversion factor HI gain - Lo Gain
|
---|
18 | static const Float_t gkConversionHiLoErr; // The error of the default conversion factor
|
---|
19 |
|
---|
20 | static const Float_t gkElectronicPedRms; // The pure electronic component of the RMS
|
---|
21 | static const Float_t gkElectronicPedRmsErr; // The error of the pure electronic component of the RMS
|
---|
22 | static const Float_t gkFFactor; // The laboratory F-factor of the PMTs
|
---|
23 | static const Float_t gkFFactorErr; // The laboratory F-factor Error of the PMTs
|
---|
24 | static const Float_t gkChargeLimit; // The limit (in units of PedRMS) for acceptance of the fitted mean charge
|
---|
25 | static const Float_t gkChargeErrLimit; // The limit (in units of PedRMS) for acceptance of the fitted charge sigma
|
---|
26 | static const Float_t gkChargeRelErrLimit; // The limit (in units of Error of fitted charge) for acceptance of the fitted mean
|
---|
27 | static const Float_t gkTimeLimit; // The limit (in units of FADC slices) for acceptance of the fitted time
|
---|
28 | static const Float_t gkTimeErrLimit; // The limit (in units of FADC slices) for acceptance of the fitted time sigma
|
---|
29 | static const Float_t gkConvFFactorRelErrLimit; // The limit for acceptance of the rel. error of the conversion factor with the FFactor method
|
---|
30 |
|
---|
31 | Int_t fPixId; // the pixel Id
|
---|
32 |
|
---|
33 | UInt_t fFlags; // Flag for the set bits
|
---|
34 |
|
---|
35 | Float_t fAverageQE; // The average quantum efficieny (see Class description)
|
---|
36 | Float_t fAverageQEErr; // The error of the average quantum efficieny (see Class description)
|
---|
37 |
|
---|
38 | Float_t fCharge; // The mean reduced charge after the fit
|
---|
39 | Float_t fChargeErr; // The error of reduced mean charge after the fit
|
---|
40 | Float_t fSigmaCharge; // The sigma of the mean charge after the fit
|
---|
41 | Float_t fSigmaChargeErr; // The error of the sigma of the mean charge after the fit
|
---|
42 | Float_t fRSigmaCharge; // The reduced squares of sigmas after the fit
|
---|
43 | Float_t fRSigmaChargeErr; // The reduced squares of sigmas after the fit
|
---|
44 | Float_t fChargeProb; // The probability of the fit function
|
---|
45 |
|
---|
46 | Float_t fPed; // The mean pedestal (from MPedestalPix)
|
---|
47 | Float_t fPedRms; // The pedestal RMS (from MPedestalPix)
|
---|
48 | Float_t fPedRmsErr; // The error of the pedestal RMS (from MPedestalPix)
|
---|
49 |
|
---|
50 | Float_t fAbsTimeMean; // The mean absolute arrival time
|
---|
51 | Float_t fAbsTimeMeanErr; // The error of the absolute mean arrival time
|
---|
52 | Float_t fAbsTimeRms; // The rms of the mean absolute arrival time
|
---|
53 |
|
---|
54 | Byte_t fTimeFirstHiGain; // The first used FADC slice
|
---|
55 | Byte_t fTimeLastHiGain; // The last used FADC slice
|
---|
56 |
|
---|
57 | Byte_t fTimeFirstLoGain; // The first used FADC slice
|
---|
58 | Byte_t fTimeLastLoGain; // The last used FADC slice
|
---|
59 |
|
---|
60 | Float_t fPheFFactorMethod; // The number of Phe's calculated (F-factor method)
|
---|
61 | Float_t fPheFFactorMethodErr; // The error on the number of Phe's calculated (F-factor method)
|
---|
62 |
|
---|
63 | Float_t fMeanConversionFFactorMethod; // The conversion factor to Phe's (F-factor method)
|
---|
64 | Float_t fMeanConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
|
---|
65 | Float_t fMeanConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
|
---|
66 | Float_t fMeanConversionCombinedMethod; // The conversion factor to Ph's (all methods combined)
|
---|
67 |
|
---|
68 | Float_t fConversionFFactorMethodErr; // The error of the conversion factor to Phe's (F-factor method)
|
---|
69 | Float_t fConversionBlindPixelMethodErr; // The error of the conversion factor to Ph's (Blind Pixel method)
|
---|
70 | Float_t fConversionPINDiodeMethodErr; // The error of the conversion factor to Ph's (PIN Diode method)
|
---|
71 | Float_t fConversionCombinedMethodErr; // The error of the conversion factor to Ph's (all methods combined)
|
---|
72 |
|
---|
73 | Float_t fSigmaConversionFFactorMethod; // The sigma of conversion factor to Phe's (F-factor method)
|
---|
74 | Float_t fSigmaConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
|
---|
75 | Float_t fSigmaConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
|
---|
76 | Float_t fSigmaConversionCombinedMethod; // The conversion factor to Ph's (all methods combined)
|
---|
77 |
|
---|
78 | Float_t fTotalFFactorFFactorMethod; // The total F-Factor to Ph's (F-factor method)
|
---|
79 | Float_t fTotalFFactorBlindPixelMethod; // The total F-Factor to Ph's (Blind Pixel method)
|
---|
80 | Float_t fTotalFFactorPINDiodeMethod; // The total F-Factor to Ph's (PIN Diode method)
|
---|
81 | Float_t fTotalFFactorCombinedMethod; // The total F-Factor to Ph's (all methods combined)
|
---|
82 |
|
---|
83 | Float_t fTotalFFactorErrFFactorMethod; // The error of the total F-Factor to Ph's (F-factor method)
|
---|
84 | Float_t fTotalFFactorErrBlindPixelMethod; // The error of the total F-Factor to Ph's (Blind Pixel method)
|
---|
85 | Float_t fTotalFFactorErrPINDiodeMethod; // The error of the total F-Factor to Ph's (PIN Diode method)
|
---|
86 | Float_t fTotalFFactorErrCombinedMethod; // The error of the total F-Factor to Ph's (all methods combined)
|
---|
87 |
|
---|
88 | Float_t fTotalFFactor; // The F-Factor of the total readout system (Sigma(out)/mean(out)*Mean(in)/sigma(in)
|
---|
89 | Float_t fTotalFFactorErr; // The error on the F-Factor of the total readout system
|
---|
90 |
|
---|
91 | Float_t fConversionHiLo; // The conversion factor between Hi Gain and Lo Gain
|
---|
92 | Float_t fConversionHiLoErr; // The error of the conversion factor between Hi Gain and Lo Gain
|
---|
93 |
|
---|
94 | Float_t fNumHiGainSamples; // The number of hi-gain samples used for the signal extraction
|
---|
95 | Float_t fNumLoGainSamples; // The number of hi-gain samples used for the signal extraction
|
---|
96 |
|
---|
97 | enum { kHiGainSaturation,
|
---|
98 | kExcluded, kExcludeQualityCheck,
|
---|
99 | kChargeValid, kTimeFitValid,
|
---|
100 | kFitted, kOscillating,
|
---|
101 | kBlindPixelMethodValid, kFFactorMethodValid,
|
---|
102 | kPINDiodeMethodValid, kCombinedMethodValid };
|
---|
103 |
|
---|
104 | MHCalibrationPixel *fHist; // Pointer to the histograms performing the fits, etc.
|
---|
105 |
|
---|
106 | Bool_t CheckChargeValidity();
|
---|
107 | Bool_t CheckTimeFitValidity();
|
---|
108 |
|
---|
109 | public:
|
---|
110 |
|
---|
111 | MCalibrationPix(const char *name=NULL, const char *title=NULL);
|
---|
112 | ~MCalibrationPix();
|
---|
113 |
|
---|
114 | void Clear(Option_t *o="");
|
---|
115 |
|
---|
116 | // Getter
|
---|
117 | MHCalibrationPixel *GetHist() const { return fHist; }
|
---|
118 |
|
---|
119 | // Setter
|
---|
120 | void SetPedestal(const Float_t ped, const Float_t pedrms,
|
---|
121 | const Float_t higainsamp, const Float_t logainsamp);
|
---|
122 | void SetConversionHiLo( const Float_t c = gkConversionHiLo) { fConversionHiLo = c; }
|
---|
123 | void SetConversionHiLoErr( const Float_t e = gkConversionHiLoErr) { fConversionHiLoErr = e; }
|
---|
124 | void SetAverageQE( const Float_t qe= gkAverageQE,
|
---|
125 | const Float_t err=gkAverageQEErr) { fAverageQE = qe;
|
---|
126 | fAverageQEErr = err; }
|
---|
127 |
|
---|
128 | // Setters for MC
|
---|
129 | void SetConversionFFactorMethod( Float_t c, Float_t err, Float_t sig );
|
---|
130 | void SetConversionBlindPixelMethod( Float_t c, Float_t err, Float_t sig );
|
---|
131 | void SetConversionPINDiodeMethod( Float_t c, Float_t err, Float_t sig );
|
---|
132 | void SetConversionCombinedMethod( Float_t c, Float_t err, Float_t sig );
|
---|
133 |
|
---|
134 | // Bit Setters
|
---|
135 | void SetHiGainSaturation( Bool_t b = kTRUE );
|
---|
136 | void SetExcluded( Bool_t b = kTRUE );
|
---|
137 | void SetExcludeQualityCheck( Bool_t b = kTRUE );
|
---|
138 | void SetChargeValid( Bool_t b = kTRUE );
|
---|
139 | void SetFitted( Bool_t b = kTRUE );
|
---|
140 | void SetOscillating( Bool_t b = kTRUE );
|
---|
141 | void SetBlindPixelMethodValid( Bool_t b = kTRUE );
|
---|
142 | void SetFFactorMethodValid( Bool_t b = kTRUE );
|
---|
143 | void SetPINDiodeMethodValid( Bool_t b = kTRUE );
|
---|
144 |
|
---|
145 | void SetAbsTimeBordersHiGain( Byte_t f, Byte_t l );
|
---|
146 | void SetAbsTimeBordersLoGain( Byte_t f, Byte_t l );
|
---|
147 |
|
---|
148 | // Charges
|
---|
149 | Float_t GetCharge() const { return fCharge; }
|
---|
150 | Float_t GetChargeErr() const { return fChargeErr; }
|
---|
151 | Float_t GetChargeProb() const { return fChargeProb; }
|
---|
152 | Float_t GetSigmaCharge() const { return fSigmaCharge; }
|
---|
153 | Float_t GetSigmaChargeErr() const { return fSigmaChargeErr; }
|
---|
154 | Float_t GetRSigmaCharge() const { return fRSigmaCharge; }
|
---|
155 | Float_t GetRSigmaChargeErr() const { return fRSigmaChargeErr; }
|
---|
156 |
|
---|
157 |
|
---|
158 | Float_t GetAbsTimeMean() const { return fAbsTimeMean; }
|
---|
159 | Float_t GetAbsTimeMeanErr() const { return fAbsTimeMeanErr; }
|
---|
160 | Float_t GetAbsTimeRms() const { return fAbsTimeRms; }
|
---|
161 |
|
---|
162 | // Conversion Factors
|
---|
163 | Float_t GetConversionHiLo() const { return fConversionHiLo; }
|
---|
164 | Float_t GetConversionHiLoErr() const { return fConversionHiLoErr; }
|
---|
165 |
|
---|
166 | Float_t GetMeanConversionBlindPixelMethod() const { return fMeanConversionBlindPixelMethod ; }
|
---|
167 | Float_t GetConversionBlindPixelMethodErr() const { return fConversionBlindPixelMethodErr ; }
|
---|
168 | Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
|
---|
169 |
|
---|
170 | Float_t GetMeanConversionFFactorMethod() const { return fMeanConversionFFactorMethod; }
|
---|
171 | Float_t GetConversionFFactorMethodErr() const { return fConversionFFactorMethodErr; }
|
---|
172 | Float_t GetSigmaConversionFFactorMethod() const { return fSigmaConversionFFactorMethod; }
|
---|
173 |
|
---|
174 | Float_t GetMeanConversionPINDiodeMethod() const { return fMeanConversionPINDiodeMethod ; }
|
---|
175 | Float_t GetConversionPINDiodeMethodErr() const { return fConversionPINDiodeMethodErr ; }
|
---|
176 | Float_t GetSigmaConversionPINDiodeMethod() const { return fSigmaConversionPINDiodeMethod ; }
|
---|
177 |
|
---|
178 | Float_t GetMeanConversionCombinedMethod() const { return fMeanConversionCombinedMethod ; }
|
---|
179 | Float_t GetConversionCombinedMethodErr() const { return fConversionCombinedMethodErr ; }
|
---|
180 | Float_t GetSigmaConversionCombinedMethod() const { return fSigmaConversionCombinedMethod ; }
|
---|
181 |
|
---|
182 | Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }
|
---|
183 | Float_t GetPheFFactorMethodErr() const { return fPheFFactorMethodErr; }
|
---|
184 |
|
---|
185 | Int_t GetPixId() const { return fPixId; }
|
---|
186 |
|
---|
187 | Float_t GetPed() const { return fPed; }
|
---|
188 | Float_t GetPedRms() const { return fPedRms; }
|
---|
189 |
|
---|
190 | Float_t GetTotalFFactorFFactorMethod() const { return fTotalFFactorFFactorMethod; }
|
---|
191 | Float_t GetTotalFFactorErrFFactorMethod() const { return fTotalFFactorErrFFactorMethod; }
|
---|
192 |
|
---|
193 | Float_t GetTotalFFactorBlindPixelMethod() const { return fTotalFFactorBlindPixelMethod; }
|
---|
194 | Float_t GetTotalFFactorErrBlindPixelMethod() const { return fTotalFFactorErrBlindPixelMethod; }
|
---|
195 |
|
---|
196 | Float_t GetTotalFFactorPINDiodeMethod() const { return fTotalFFactorPINDiodeMethod; }
|
---|
197 | Float_t GetTotalFFactorErrPINDiodeMethod() const { return fTotalFFactorErrPINDiodeMethod; }
|
---|
198 |
|
---|
199 | Float_t GetTotalFFactorCombinedMethod() const { return fTotalFFactorCombinedMethod; }
|
---|
200 | Float_t GetTotalFFactorErrCombinedMethod() const { return fTotalFFactorErrCombinedMethod; }
|
---|
201 |
|
---|
202 | Bool_t IsExcluded() const;
|
---|
203 | Bool_t IsExcludeQualityCheck() const;
|
---|
204 | Bool_t IsHiGainSaturation() const;
|
---|
205 | Bool_t IsChargeValid() const;
|
---|
206 | Bool_t IsFitted() const;
|
---|
207 | Bool_t IsOscillating() const;
|
---|
208 | Bool_t IsBlindPixelMethodValid() const;
|
---|
209 | Bool_t IsPINDiodeMethodValid() const;
|
---|
210 | Bool_t IsFFactorMethodValid() const;
|
---|
211 | Bool_t IsCombinedMethodValid() const;
|
---|
212 |
|
---|
213 | // Fill histos
|
---|
214 | Bool_t FillChargeHiGain(Float_t q) const { return fHist->FillChargeHiGain(q); }
|
---|
215 | Bool_t FillAbsTimeHiGain(Float_t t) const { return fHist->FillAbsTimeHiGain(t); }
|
---|
216 |
|
---|
217 | Bool_t FillChargeLoGain(Float_t q) const { return fHist->FillChargeLoGain(q); }
|
---|
218 | Bool_t FillAbsTimeLoGain(Float_t t) const { return fHist->FillAbsTimeLoGain(t); }
|
---|
219 |
|
---|
220 | Bool_t FillGraphs(Float_t qhi,Float_t qlo) const { return fHist->FillGraphs(qhi,qlo); }
|
---|
221 |
|
---|
222 | void DefinePixId(Int_t i);
|
---|
223 |
|
---|
224 | // Fits
|
---|
225 | Bool_t FitCharge();
|
---|
226 |
|
---|
227 | // Draws
|
---|
228 | void Draw(Option_t *opt="") { fHist->Draw(opt); }
|
---|
229 | TObject *DrawClone(Option_t *opt="") const { return fHist->DrawClone(opt); }
|
---|
230 |
|
---|
231 | // Miscellaneous
|
---|
232 | void ApplyLoGainConversion();
|
---|
233 | void CheckOscillations();
|
---|
234 | Bool_t CalcFFactorMethod();
|
---|
235 |
|
---|
236 | ClassDef(MCalibrationPix, 1) // Container for Calibration of one pixel
|
---|
237 | };
|
---|
238 |
|
---|
239 | #endif
|
---|
240 |
|
---|