source: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h@ 3615

Last change on this file since 3615 was 3602, checked in by gaug, 21 years ago
*** empty log message ***
File size: 13.2 KB
Line 
1#ifndef MARS_MCalibrationChargePix
2#define MARS_MCalibrationChargePix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MBadPixelsPix;
9class MCalibrationChargePix : public MParContainer
10{
11private:
12
13 static const Float_t gkConversionHiLo; // The default conversion factor HI gain - Lo Gain
14 static const Float_t gkConversionHiLoErr; // The error of the default conversion factor
15
16 static const Float_t gkElectronicPedRms; // The pure electronic component of the RMS
17 static const Float_t gkElectronicPedRmsErr; // The error of the pure electronic component of the RMS
18 static const Float_t gkFFactor; // The laboratory F-factor of the PMTs
19 static const Float_t gkFFactorErr; // The laboratory F-factor Error of the PMTs
20
21
22 static const Float_t fgPheFFactorMethodLimit; // The default minimum number of Photo-electrons for a pixel to be accepted.
23
24 Float_t fElectronicPedRms; // The pure electronic component of the RMS
25 Float_t fElectronicPedRmsVar; // The error of the pure electronic component of the RMS
26
27 Float_t fPheFFactorMethodLimit; // The minimum number of Photo-electrons for a pixel to be accepted.
28
29 Int_t fPixId; // the pixel Id
30
31 UInt_t fFlags; // Flag for the set bits
32
33 Float_t fHiGainMeanCharge; // The mean reduced charge after the fit
34 Float_t fHiGainMeanChargeVar; // The error of reduced mean charge after the fit
35 Float_t fHiGainSigmaCharge; // The sigma of the mean charge after the fit
36 Float_t fHiGainSigmaChargeVar; // The error of the sigma of the mean charge after the fit
37 Float_t fHiGainChargeProb; // The probability of the fit function
38
39 Float_t fLoGainMeanCharge; // The mean reduced charge after the fit
40 Float_t fLoGainMeanChargeVar; // The error of reduced mean charge after the fit
41 Float_t fLoGainSigmaCharge; // The sigma of the mean charge after the fit
42 Float_t fLoGainSigmaChargeVar; // The error of the sigma of the mean charge after the fit
43 Float_t fLoGainChargeProb; // The probability of the fit function
44
45 Float_t fRSigmaCharge; // The reduced squares of sigmas after the fit
46 Float_t fRSigmaChargeVar; // The reduced squares of sigmas after the fit
47
48 Float_t fPed; // The mean pedestal (from MPedestalPix) times number of FADC slices
49 Float_t fPedVar; // The error of the pedestal
50 Float_t fPedRms; // The pedestal RMS (from MPedestalPix) times sqrt of number of FADC slices
51
52 Float_t fLoGainPedRms; // The pedestal RMS of the low gain
53 Float_t fLoGainPedRmsVar; // The pedestal RMS Variance of the low gain
54
55 Float_t fAbsTimeMean; // The mean absolute arrival time
56 Float_t fAbsTimeRms; // The rms of the mean absolute arrival time
57
58 Float_t fPheFFactorMethod; // The number of Phe's calculated (F-factor method)
59 Float_t fPheFFactorMethodVar; // The error on the number of Phe's calculated (F-factor method)
60
61 Float_t fMeanConversionFFactorMethod; // The conversion factor to Phe's (F-factor method)
62 Float_t fMeanConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
63 Float_t fMeanConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
64 Float_t fMeanConversionCombinedMethod; // The conversion factor to Ph's (all methods combined)
65
66 Float_t fConversionFFactorMethodVar; // The error of the conversion factor to Phe's (F-factor method)
67 Float_t fConversionBlindPixelMethodVar; // The error of the conversion factor to Ph's (Blind Pixel method)
68 Float_t fConversionPINDiodeMethodVar; // The error of the conversion factor to Ph's (PIN Diode method)
69 Float_t fConversionCombinedMethodVar; // The error of the conversion factor to Ph's (all methods combined)
70
71 Float_t fSigmaConversionFFactorMethod; // The sigma of conversion factor to Phe's (F-factor method)
72 Float_t fSigmaConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
73 Float_t fSigmaConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
74 Float_t fSigmaConversionCombinedMethod; // The conversion factor to Ph's (all methods combined)
75
76 Float_t fTotalFFactorFFactorMethod; // The total F-Factor to Ph's (F-factor method)
77 Float_t fTotalFFactorBlindPixelMethod; // The total F-Factor to Ph's (Blind Pixel method)
78 Float_t fTotalFFactorPINDiodeMethod; // The total F-Factor to Ph's (PIN Diode method)
79 Float_t fTotalFFactorCombinedMethod; // The total F-Factor to Ph's (all methods combined)
80
81 Float_t fTotalFFactorFFactorMethodVar; // The variance of the total F-Factor to Ph's (F-factor method)
82 Float_t fTotalFFactorBlindPixelMethodVar; // The variance of the total F-Factor to Ph's (Blind Pixel method)
83 Float_t fTotalFFactorPINDiodeMethodVar; // The variance of the total F-Factor to Ph's (PIN Diode method)
84 Float_t fTotalFFactorCombinedMethodVar; // The variance of the total F-Factor to Ph's (all methods combined)
85
86 Float_t fTotalFFactor; // The F-Factor of the total readout system (Sigma(out)/mean(out)*Mean(in)/sigma(in)
87 Float_t fTotalFFactorVar; // The variance on the F-Factor of the total readout system
88
89 Float_t fConversionHiLo; // The conversion factor between Hi Gain and Lo Gain
90 Float_t fConversionHiLoVar; // The error of the conversion factor between Hi Gain and Lo Gain
91
92 Float_t fHiGainNumPickup;
93 Float_t fLoGainNumPickup;
94
95 enum { kHiGainSaturation, kLoGainSaturation,
96 kExcluded,
97 kBlindPixelMethodValid, kFFactorMethodValid,
98 kPINDiodeMethodValid, kCombinedMethodValid };
99
100public:
101
102 MCalibrationChargePix(const char *name=NULL, const char *title=NULL);
103 ~MCalibrationChargePix() {}
104
105 void Clear(Option_t *o="");
106
107 // Setter
108 void SetPixId( const Int_t i ) { fPixId = i; }
109
110 void SetPedestal(const Float_t ped, const Float_t pedrms, const Float_t pederr);
111
112 void SetConversionHiLo( const Float_t c = gkConversionHiLo) { fConversionHiLo = c; }
113 void SetConversionHiLoErr( const Float_t e = gkConversionHiLoErr) { fConversionHiLoVar = e*e; }
114
115 void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; }
116
117 // Charges
118 void SetHiGainMeanCharge ( const Float_t f ) { fHiGainMeanCharge = f; }
119 void SetHiGainMeanChargeErr ( const Float_t f ) { fHiGainMeanChargeVar = f*f; }
120 void SetHiGainChargeProb ( const Float_t f ) { fHiGainChargeProb = f; }
121 void SetHiGainSigmaCharge ( const Float_t f ) { fHiGainSigmaCharge = f; }
122 void SetHiGainSigmaChargeErr ( const Float_t f ) { fHiGainSigmaChargeVar = f*f; }
123
124 void SetLoGainMeanCharge ( const Float_t f ) { fLoGainMeanCharge = f; }
125 void SetLoGainMeanChargeErr ( const Float_t f ) { fLoGainMeanChargeVar = f*f; }
126 void SetLoGainChargeProb ( const Float_t f ) { fLoGainChargeProb = f; }
127 void SetLoGainSigmaCharge ( const Float_t f ) { fLoGainSigmaCharge = f; }
128 void SetLoGainSigmaChargeErr ( const Float_t f ) { fLoGainSigmaChargeVar = f*f; }
129
130 void SetMeanCharge ( const Float_t f );
131 void SetMeanChargeErr ( const Float_t f );
132 void SetSigmaCharge ( const Float_t f );
133 void SetSigmaChargeErr ( const Float_t f );
134
135 void SetHiGainNumPickup ( const Float_t f ) { fHiGainNumPickup = f; }
136 void SetLoGainNumPickup ( const Float_t f ) { fLoGainNumPickup = f; }
137
138 // Times
139 void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
140 void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
141
142 // Conversion Factors
143 void SetConversionFFactorMethod ( Float_t c, Float_t err, Float_t sig );
144 void SetConversionBlindPixelMethod( Float_t c, Float_t err, Float_t sig );
145 void SetConversionPINDiodeMethod ( Float_t c, Float_t err, Float_t sig );
146 void SetConversionCombinedMethod ( Float_t c, Float_t err, Float_t sig );
147
148 void SetTotalFFactorFFactorMethod ( const Float_t f) { fTotalFFactorFFactorMethod = f; }
149 void SetTotalFFactorBlindPixelMethod ( const Float_t f) { fTotalFFactorBlindPixelMethod = f; }
150 void SetTotalFFactorPINDiodeMethod ( const Float_t f) { fTotalFFactorPINDiodeMethod = f; }
151
152 void SetTotalFFactorFFactorMethodErr ( const Float_t f) { fTotalFFactorFFactorMethodVar = f*f; }
153 void SetTotalFFactorBlindPixelMethodErr ( const Float_t f) { fTotalFFactorBlindPixelMethodVar = f*f; }
154 void SetTotalFFactorPINDiodeMethodErr ( const Float_t f) { fTotalFFactorPINDiodeMethodVar = f*f; }
155
156 // Bit Setters
157 void SetHiGainSaturation ( const Bool_t b = kTRUE );
158 void SetLoGainSaturation ( const Bool_t b = kTRUE );
159 void SetExcluded ( const Bool_t b = kTRUE );
160 void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
161 void SetFFactorMethodValid ( const Bool_t b = kTRUE );
162 void SetPINDiodeMethodValid ( const Bool_t b = kTRUE );
163 void SetCombinedMethodValid ( const Bool_t b = kTRUE );
164
165 // Charges
166 Float_t GetHiGainMeanCharge() const { return fHiGainMeanCharge; }
167 Float_t GetHiGainMeanChargeErr() const;
168 Float_t GetHiGainChargeProb() const { return fHiGainChargeProb; }
169 Float_t GetHiGainSigmaCharge() const { return fHiGainSigmaCharge; }
170 Float_t GetHiGainSigmaChargeErr() const;
171
172 Float_t GetLoGainMeanCharge() const;
173 Float_t GetLoGainMeanChargeErr() const;
174 Float_t GetLoGainChargeProb() const { return fLoGainChargeProb; }
175 Float_t GetLoGainSigmaCharge() const;
176 Float_t GetLoGainSigmaChargeErr() const;
177
178 Float_t GetMeanCharge() const;
179 Float_t GetMeanChargeErr() const;
180 Float_t GetChargeProb() const;
181 Float_t GetSigmaCharge() const;
182 Float_t GetSigmaChargeErr() const;
183
184 Float_t GetRSigmaCharge() const;
185 Float_t GetRSigmaChargeErr() const;
186
187 Float_t GetHiGainNumPickup() const { return fHiGainNumPickup; }
188 Float_t GetLoGainNumPickup() const { return fLoGainNumPickup; }
189
190 Float_t GetAbsTimeMean() const { return fAbsTimeMean; }
191 Float_t GetAbsTimeRms() const { return fAbsTimeRms; }
192
193 // Conversion Factors
194 Float_t GetConversionHiLo() const { return fConversionHiLo; }
195 Float_t GetConversionHiLoErr() const;
196
197 Float_t GetMeanConversionBlindPixelMethod() const { return fMeanConversionBlindPixelMethod ; }
198 Float_t GetConversionBlindPixelMethodErr() const;
199 Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
200
201 Float_t GetMeanConversionFFactorMethod() const { return fMeanConversionFFactorMethod; }
202 Float_t GetConversionFFactorMethodErr() const;
203 Float_t GetSigmaConversionFFactorMethod() const { return fSigmaConversionFFactorMethod; }
204
205 Float_t GetMeanConversionPINDiodeMethod() const { return fMeanConversionPINDiodeMethod ; }
206 Float_t GetConversionPINDiodeMethodErr() const;
207 Float_t GetSigmaConversionPINDiodeMethod() const { return fSigmaConversionPINDiodeMethod ; }
208
209 Float_t GetMeanConversionCombinedMethod() const { return fMeanConversionCombinedMethod ; }
210 Float_t GetConversionCombinedMethodErr() const;
211 Float_t GetSigmaConversionCombinedMethod() const { return fSigmaConversionCombinedMethod ; }
212
213 Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }
214 Float_t GetPheFFactorMethodErr() const;
215
216 Int_t GetPixId() const { return fPixId; }
217
218 Float_t GetPed() const { return fPed; }
219 Float_t GetPedErr() const;
220 Float_t GetPedRms() const;
221 Float_t GetPedRmsErr() const;
222
223 Float_t GetTotalFFactorFFactorMethod() const { return fTotalFFactorFFactorMethod; }
224 Float_t GetTotalFFactorFFactorMethodErr() const;
225
226 Float_t GetTotalFFactorBlindPixelMethod() const { return fTotalFFactorBlindPixelMethod; }
227 Float_t GetTotalFFactorBlindPixelMethodErr() const;
228
229 Float_t GetTotalFFactorPINDiodeMethod() const { return fTotalFFactorPINDiodeMethod; }
230 Float_t GetTotalFFactorPINDiodeMethodErr() const;
231
232 Float_t GetTotalFFactorCombinedMethod() const { return fTotalFFactorCombinedMethod; }
233 Float_t GetTotalFFactorCombinedMethodErr() const;
234
235 Bool_t IsExcluded() const;
236 Bool_t IsHiGainSaturation() const;
237 Bool_t IsLoGainSaturation() const;
238 Bool_t IsBlindPixelMethodValid() const;
239 Bool_t IsPINDiodeMethodValid() const;
240 Bool_t IsFFactorMethodValid() const;
241 Bool_t IsCombinedMethodValid() const;
242
243 // Miscellaneous
244 void CalcLoGainPedestal(const Float_t logainsamples);
245 Bool_t CalcReducedSigma();
246 Bool_t CalcFFactorMethod();
247
248 ClassDef(MCalibrationChargePix, 1) // Container for Calibration of one pixel
249};
250
251#endif
252
Note: See TracBrowser for help on using the repository browser.