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

Last change on this file since 3630 was 3626, checked in by gaug, 21 years ago
*** empty log message ***
File size: 13.1 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, kExcluded,
96 kBlindPixelMethodValid, kFFactorMethodValid,
97 kPINDiodeMethodValid, kCombinedMethodValid };
98
99public:
100
101 MCalibrationChargePix(const char *name=NULL, const char *title=NULL);
102 ~MCalibrationChargePix() {}
103
104 void Clear(Option_t *o="");
105
106 // Setter
107 void SetPixId( const Int_t i ) { fPixId = i; }
108
109 void SetPedestal(const Float_t ped, const Float_t pedrms, const Float_t pederr);
110
111 void SetConversionHiLo( const Float_t c = gkConversionHiLo) { fConversionHiLo = c; }
112 void SetConversionHiLoErr( const Float_t e = gkConversionHiLoErr) { fConversionHiLoVar = e*e; }
113
114 void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; }
115
116 // Charges
117 void SetHiGainMeanCharge ( const Float_t f ) { fHiGainMeanCharge = f; }
118 void SetHiGainMeanChargeErr ( const Float_t f ) { fHiGainMeanChargeVar = f*f; }
119 void SetHiGainChargeProb ( const Float_t f ) { fHiGainChargeProb = f; }
120 void SetHiGainSigmaCharge ( const Float_t f ) { fHiGainSigmaCharge = f; }
121 void SetHiGainSigmaChargeErr ( const Float_t f ) { fHiGainSigmaChargeVar = f*f; }
122
123 void SetLoGainMeanCharge ( const Float_t f ) { fLoGainMeanCharge = f; }
124 void SetLoGainMeanChargeErr ( const Float_t f ) { fLoGainMeanChargeVar = f*f; }
125 void SetLoGainChargeProb ( const Float_t f ) { fLoGainChargeProb = f; }
126 void SetLoGainSigmaCharge ( const Float_t f ) { fLoGainSigmaCharge = f; }
127 void SetLoGainSigmaChargeErr ( const Float_t f ) { fLoGainSigmaChargeVar = f*f; }
128
129 void SetMeanCharge ( const Float_t f );
130 void SetMeanChargeErr ( const Float_t f );
131 void SetSigmaCharge ( const Float_t f );
132 void SetSigmaChargeErr ( const Float_t f );
133
134 void SetHiGainNumPickup ( const Float_t f ) { fHiGainNumPickup = f; }
135 void SetLoGainNumPickup ( const Float_t f ) { fLoGainNumPickup = f; }
136
137 // Times
138 void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
139 void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
140
141 // Conversion Factors
142 void SetConversionFFactorMethod ( Float_t c, Float_t err, Float_t sig );
143 void SetConversionBlindPixelMethod( Float_t c, Float_t err, Float_t sig );
144 void SetConversionPINDiodeMethod ( Float_t c, Float_t err, Float_t sig );
145 void SetConversionCombinedMethod ( Float_t c, Float_t err, Float_t sig );
146
147 void SetTotalFFactorFFactorMethod ( const Float_t f) { fTotalFFactorFFactorMethod = f; }
148 void SetTotalFFactorBlindPixelMethod ( const Float_t f) { fTotalFFactorBlindPixelMethod = f; }
149 void SetTotalFFactorPINDiodeMethod ( const Float_t f) { fTotalFFactorPINDiodeMethod = f; }
150
151 void SetTotalFFactorFFactorMethodErr ( const Float_t f) { fTotalFFactorFFactorMethodVar = f*f; }
152 void SetTotalFFactorBlindPixelMethodErr ( const Float_t f) { fTotalFFactorBlindPixelMethodVar = f*f; }
153 void SetTotalFFactorPINDiodeMethodErr ( const Float_t f) { fTotalFFactorPINDiodeMethodVar = f*f; }
154
155 // Bit Setters
156 void SetHiGainSaturation ( const Bool_t b = kTRUE );
157 void SetExcluded ( const Bool_t b = kTRUE );
158 void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
159 void SetFFactorMethodValid ( const Bool_t b = kTRUE );
160 void SetPINDiodeMethodValid ( const Bool_t b = kTRUE );
161 void SetCombinedMethodValid ( const Bool_t b = kTRUE );
162
163 // Charges
164 Float_t GetHiGainMeanCharge() const { return fHiGainMeanCharge; }
165 Float_t GetHiGainMeanChargeErr() const;
166 Float_t GetHiGainChargeProb() const { return fHiGainChargeProb; }
167 Float_t GetHiGainSigmaCharge() const { return fHiGainSigmaCharge; }
168 Float_t GetHiGainSigmaChargeErr() const;
169
170 Float_t GetLoGainMeanCharge() const;
171 Float_t GetLoGainMeanChargeErr() const;
172 Float_t GetLoGainChargeProb() const { return fLoGainChargeProb; }
173 Float_t GetLoGainSigmaCharge() const;
174 Float_t GetLoGainSigmaChargeErr() const;
175
176 Float_t GetMeanCharge() const;
177 Float_t GetMeanChargeErr() const;
178 Float_t GetChargeProb() const;
179 Float_t GetSigmaCharge() const;
180 Float_t GetSigmaChargeErr() const;
181
182 Float_t GetRSigmaCharge() const;
183 Float_t GetRSigmaChargeErr() const;
184
185 Float_t GetHiGainNumPickup() const { return fHiGainNumPickup; }
186 Float_t GetLoGainNumPickup() const { return fLoGainNumPickup; }
187
188 Float_t GetAbsTimeMean() const { return fAbsTimeMean; }
189 Float_t GetAbsTimeRms() const { return fAbsTimeRms; }
190
191 // Conversion Factors
192 Float_t GetConversionHiLo() const { return fConversionHiLo; }
193 Float_t GetConversionHiLoErr() const;
194
195 Float_t GetMeanConversionBlindPixelMethod() const { return fMeanConversionBlindPixelMethod ; }
196 Float_t GetConversionBlindPixelMethodErr() const;
197 Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
198
199 Float_t GetMeanConversionFFactorMethod() const { return fMeanConversionFFactorMethod; }
200 Float_t GetConversionFFactorMethodErr() const;
201 Float_t GetSigmaConversionFFactorMethod() const { return fSigmaConversionFFactorMethod; }
202
203 Float_t GetMeanConversionPINDiodeMethod() const { return fMeanConversionPINDiodeMethod ; }
204 Float_t GetConversionPINDiodeMethodErr() const;
205 Float_t GetSigmaConversionPINDiodeMethod() const { return fSigmaConversionPINDiodeMethod ; }
206
207 Float_t GetMeanConversionCombinedMethod() const { return fMeanConversionCombinedMethod ; }
208 Float_t GetConversionCombinedMethodErr() const;
209 Float_t GetSigmaConversionCombinedMethod() const { return fSigmaConversionCombinedMethod ; }
210
211 Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }
212 Float_t GetPheFFactorMethodErr() const;
213
214 Int_t GetPixId() const { return fPixId; }
215
216 Float_t GetPed() const { return fPed; }
217 Float_t GetPedErr() const;
218 Float_t GetPedRms() const;
219 Float_t GetPedRmsErr() const;
220
221 Float_t GetTotalFFactorFFactorMethod() const { return fTotalFFactorFFactorMethod; }
222 Float_t GetTotalFFactorFFactorMethodErr() const;
223
224 Float_t GetTotalFFactorBlindPixelMethod() const { return fTotalFFactorBlindPixelMethod; }
225 Float_t GetTotalFFactorBlindPixelMethodErr() const;
226
227 Float_t GetTotalFFactorPINDiodeMethod() const { return fTotalFFactorPINDiodeMethod; }
228 Float_t GetTotalFFactorPINDiodeMethodErr() const;
229
230 Float_t GetTotalFFactorCombinedMethod() const { return fTotalFFactorCombinedMethod; }
231 Float_t GetTotalFFactorCombinedMethodErr() const;
232
233 Bool_t IsExcluded() const;
234 Bool_t IsHiGainSaturation() const;
235 Bool_t IsBlindPixelMethodValid() const;
236 Bool_t IsPINDiodeMethodValid() const;
237 Bool_t IsFFactorMethodValid() const;
238 Bool_t IsCombinedMethodValid() const;
239
240 // Miscellaneous
241 void CalcLoGainPedestal(const Float_t logainsamples);
242 Bool_t CalcReducedSigma();
243 Bool_t CalcFFactorMethod();
244
245 ClassDef(MCalibrationChargePix, 1) // Container for Calibration of one pixel
246};
247
248#endif
249
Note: See TracBrowser for help on using the repository browser.