1 | #ifndef MARS_MCalibrationChargePix
|
---|
2 | #define MARS_MCalibrationChargePix
|
---|
3 |
|
---|
4 | #ifndef MARS_MCalibrationPix
|
---|
5 | #include "MCalibrationPix.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MBadPixelsPix;
|
---|
9 | class MCalibrationChargePix : public MCalibrationPix
|
---|
10 | {
|
---|
11 | private:
|
---|
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 | Float_t fRSigma; // The reduced squares of sigmas after the fit
|
---|
30 | Float_t fRSigmaVar; // The reduced squares of sigmas after the fit
|
---|
31 |
|
---|
32 | Float_t fPed; // The mean pedestal (from MPedestalPix) times number of FADC slices
|
---|
33 | Float_t fPedVar; // The error of the pedestal
|
---|
34 | Float_t fPedRms; // The pedestal RMS (from MPedestalPix) times sqrt of number of FADC slices
|
---|
35 |
|
---|
36 | Float_t fLoGainPedRms; // The pedestal RMS of the low gain
|
---|
37 | Float_t fLoGainPedRmsVar; // The pedestal RMS Variance of the low gain
|
---|
38 |
|
---|
39 | Float_t fAbsTimeMean; // The mean absolute arrival time
|
---|
40 | Float_t fAbsTimeRms; // The rms of the mean absolute arrival time
|
---|
41 |
|
---|
42 | Float_t fPheFFactorMethod; // The number of Phe's calculated (F-factor method)
|
---|
43 | Float_t fPheFFactorMethodVar; // The error on the number of Phe's calculated (F-factor method)
|
---|
44 |
|
---|
45 | Float_t fMeanConversionFFactorMethod; // The conversion factor to Phe's (F-factor method)
|
---|
46 | Float_t fMeanConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
|
---|
47 | Float_t fMeanConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
|
---|
48 | Float_t fMeanConversionCombinedMethod; // The conversion factor to Ph's (all methods combined)
|
---|
49 |
|
---|
50 | Float_t fConversionFFactorMethodVar; // The error of the conversion factor to Phe's (F-factor method)
|
---|
51 | Float_t fConversionBlindPixelMethodVar; // The error of the conversion factor to Ph's (Blind Pixel method)
|
---|
52 | Float_t fConversionPINDiodeMethodVar; // The error of the conversion factor to Ph's (PIN Diode method)
|
---|
53 | Float_t fConversionCombinedMethodVar; // The error of the conversion factor to Ph's (all methods combined)
|
---|
54 |
|
---|
55 | Float_t fSigmaConversionFFactorMethod; // The sigma of conversion factor to Phe's (F-factor method)
|
---|
56 | Float_t fSigmaConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
|
---|
57 | Float_t fSigmaConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
|
---|
58 | Float_t fSigmaConversionCombinedMethod; // The conversion factor to Ph's (all methods combined)
|
---|
59 |
|
---|
60 | Float_t fTotalFFactorFFactorMethod; // The total F-Factor to Ph's (F-factor method)
|
---|
61 | Float_t fTotalFFactorBlindPixelMethod; // The total F-Factor to Ph's (Blind Pixel method)
|
---|
62 | Float_t fTotalFFactorPINDiodeMethod; // The total F-Factor to Ph's (PIN Diode method)
|
---|
63 | Float_t fTotalFFactorCombinedMethod; // The total F-Factor to Ph's (all methods combined)
|
---|
64 |
|
---|
65 | Float_t fTotalFFactorFFactorMethodVar; // The variance of the total F-Factor to Ph's (F-factor method)
|
---|
66 | Float_t fTotalFFactorBlindPixelMethodVar; // The variance of the total F-Factor to Ph's (Blind Pixel method)
|
---|
67 | Float_t fTotalFFactorPINDiodeMethodVar; // The variance of the total F-Factor to Ph's (PIN Diode method)
|
---|
68 | Float_t fTotalFFactorCombinedMethodVar; // The variance of the total F-Factor to Ph's (all methods combined)
|
---|
69 |
|
---|
70 | Float_t fTotalFFactor; // The F-Factor of the total readout system (Sigma(out)/mean(out)*Mean(in)/sigma(in)
|
---|
71 | Float_t fTotalFFactorVar; // The variance on the F-Factor of the total readout system
|
---|
72 |
|
---|
73 | Float_t fConversionHiLo; // The conversion factor between Hi Gain and Lo Gain
|
---|
74 | Float_t fConversionHiLoVar; // The error of the conversion factor between Hi Gain and Lo Gain
|
---|
75 |
|
---|
76 | Byte_t fCalibFlags; // The bit-field for the class-own bits
|
---|
77 |
|
---|
78 | enum { kBlindPixelMethodValid, kFFactorMethodValid,
|
---|
79 | kPINDiodeMethodValid, kCombinedMethodValid }; // The possible bits to be set
|
---|
80 |
|
---|
81 | public:
|
---|
82 |
|
---|
83 | MCalibrationChargePix(const char *name=NULL, const char *title=NULL);
|
---|
84 | ~MCalibrationChargePix() {}
|
---|
85 |
|
---|
86 | void Clear(Option_t *o="");
|
---|
87 |
|
---|
88 | // Setter
|
---|
89 | void SetPedestal(const Float_t ped, const Float_t pedrms, const Float_t pederr);
|
---|
90 |
|
---|
91 | void SetConversionHiLo( const Float_t c = gkConversionHiLo) { fConversionHiLo = c; }
|
---|
92 | void SetConversionHiLoErr( const Float_t e = gkConversionHiLoErr) { fConversionHiLoVar = e*e; }
|
---|
93 |
|
---|
94 | void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; }
|
---|
95 |
|
---|
96 | // Times
|
---|
97 | void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
|
---|
98 | void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
|
---|
99 |
|
---|
100 | // Conversion Factors
|
---|
101 | void SetConversionFFactorMethod ( Float_t c, Float_t err, Float_t sig );
|
---|
102 | void SetConversionBlindPixelMethod( Float_t c, Float_t err, Float_t sig );
|
---|
103 | void SetConversionPINDiodeMethod ( Float_t c, Float_t err, Float_t sig );
|
---|
104 | void SetConversionCombinedMethod ( Float_t c, Float_t err, Float_t sig );
|
---|
105 |
|
---|
106 | void SetTotalFFactorFFactorMethod ( const Float_t f) { fTotalFFactorFFactorMethod = f; }
|
---|
107 | void SetTotalFFactorBlindPixelMethod ( const Float_t f) { fTotalFFactorBlindPixelMethod = f; }
|
---|
108 | void SetTotalFFactorPINDiodeMethod ( const Float_t f) { fTotalFFactorPINDiodeMethod = f; }
|
---|
109 |
|
---|
110 | void SetTotalFFactorFFactorMethodErr ( const Float_t f) { fTotalFFactorFFactorMethodVar = f*f; }
|
---|
111 | void SetTotalFFactorBlindPixelMethodErr ( const Float_t f) { fTotalFFactorBlindPixelMethodVar = f*f; }
|
---|
112 | void SetTotalFFactorPINDiodeMethodErr ( const Float_t f) { fTotalFFactorPINDiodeMethodVar = f*f; }
|
---|
113 |
|
---|
114 | // Bit Setters
|
---|
115 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
116 | void SetFFactorMethodValid ( const Bool_t b = kTRUE );
|
---|
117 | void SetPINDiodeMethodValid ( const Bool_t b = kTRUE );
|
---|
118 | void SetCombinedMethodValid ( const Bool_t b = kTRUE );
|
---|
119 |
|
---|
120 | Float_t GetLoGainMean () const;
|
---|
121 | Float_t GetLoGainMeanErr () const;
|
---|
122 | Float_t GetLoGainSigma () const;
|
---|
123 | Float_t GetLoGainSigmaErr () const;
|
---|
124 |
|
---|
125 | Float_t GetRSigma() const;
|
---|
126 | Float_t GetRSigmaErr() const;
|
---|
127 |
|
---|
128 | Float_t GetAbsTimeMean() const { return fAbsTimeMean; }
|
---|
129 | Float_t GetAbsTimeRms() const { return fAbsTimeRms; }
|
---|
130 |
|
---|
131 | // Conversion Factors
|
---|
132 | Float_t GetConversionHiLo() const { return fConversionHiLo; }
|
---|
133 | Float_t GetConversionHiLoErr() const;
|
---|
134 |
|
---|
135 | Float_t GetMeanConversionBlindPixelMethod() const { return fMeanConversionBlindPixelMethod ; }
|
---|
136 | Float_t GetConversionBlindPixelMethodErr() const;
|
---|
137 | Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
|
---|
138 |
|
---|
139 | Float_t GetMeanConversionFFactorMethod() const { return fMeanConversionFFactorMethod; }
|
---|
140 | Float_t GetConversionFFactorMethodErr() const;
|
---|
141 | Float_t GetSigmaConversionFFactorMethod() const { return fSigmaConversionFFactorMethod; }
|
---|
142 |
|
---|
143 | Float_t GetMeanConversionPINDiodeMethod() const { return fMeanConversionPINDiodeMethod ; }
|
---|
144 | Float_t GetConversionPINDiodeMethodErr() const;
|
---|
145 | Float_t GetSigmaConversionPINDiodeMethod() const { return fSigmaConversionPINDiodeMethod ; }
|
---|
146 |
|
---|
147 | Float_t GetMeanConversionCombinedMethod() const { return fMeanConversionCombinedMethod ; }
|
---|
148 | Float_t GetConversionCombinedMethodErr() const;
|
---|
149 | Float_t GetSigmaConversionCombinedMethod() const { return fSigmaConversionCombinedMethod ; }
|
---|
150 |
|
---|
151 | Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }
|
---|
152 | Float_t GetPheFFactorMethodErr() const;
|
---|
153 |
|
---|
154 | Float_t GetPed() const { return fPed; }
|
---|
155 | Float_t GetPedErr() const;
|
---|
156 | Float_t GetPedRms() const;
|
---|
157 | Float_t GetPedRmsErr() const;
|
---|
158 |
|
---|
159 | Float_t GetTotalFFactorFFactorMethod() const { return fTotalFFactorFFactorMethod; }
|
---|
160 | Float_t GetTotalFFactorFFactorMethodErr() const;
|
---|
161 |
|
---|
162 | Float_t GetTotalFFactorBlindPixelMethod() const { return fTotalFFactorBlindPixelMethod; }
|
---|
163 | Float_t GetTotalFFactorBlindPixelMethodErr() const;
|
---|
164 |
|
---|
165 | Float_t GetTotalFFactorPINDiodeMethod() const { return fTotalFFactorPINDiodeMethod; }
|
---|
166 | Float_t GetTotalFFactorPINDiodeMethodErr() const;
|
---|
167 |
|
---|
168 | Float_t GetTotalFFactorCombinedMethod() const { return fTotalFFactorCombinedMethod; }
|
---|
169 | Float_t GetTotalFFactorCombinedMethodErr() const;
|
---|
170 |
|
---|
171 | Bool_t IsBlindPixelMethodValid() const;
|
---|
172 | Bool_t IsPINDiodeMethodValid() const;
|
---|
173 | Bool_t IsFFactorMethodValid() const;
|
---|
174 | Bool_t IsCombinedMethodValid() const;
|
---|
175 |
|
---|
176 | // Miscellaneous
|
---|
177 | void CalcLoGainPedestal(const Float_t logainsamples);
|
---|
178 | Bool_t CalcReducedSigma();
|
---|
179 | Bool_t CalcFFactorMethod();
|
---|
180 |
|
---|
181 | ClassDef(MCalibrationChargePix, 1) // Container for Calibration of one pixel
|
---|
182 | };
|
---|
183 |
|
---|
184 | #endif
|
---|
185 |
|
---|