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 | Int_t fPixId; // the pixel Id
|
---|
15 |
|
---|
16 | const Float_t fElectronicPedRms; // The pure electronic component of the RMS
|
---|
17 | const Float_t fErrElectronicPedRms; // The error of the pure electronic component of the RMS
|
---|
18 |
|
---|
19 | const Float_t fFactor; // The laboratory F-factor
|
---|
20 | const Float_t fFactorError; // The laboratory F-factor Error
|
---|
21 |
|
---|
22 | const Float_t fChargeLimit; // The limit (in units of PedRMS) for acceptance of the fitted mean charge
|
---|
23 | const Float_t fChargeErrLimit; // The limit (in units of PedRMS) for acceptance of the fitted charge sigma
|
---|
24 | const Float_t fChargeRelErrLimit; // The limit (in units of Error of fitted charge) for acceptance of the fitted mean
|
---|
25 | Byte_t fFlags; // Flag for the set Bits
|
---|
26 |
|
---|
27 | Float_t fCharge; // The mean reduced charge after the fit
|
---|
28 | Float_t fErrCharge; // The error of reduced mean charge after the fit
|
---|
29 | Float_t fSigmaCharge; // The sigma of the mean charge after the fit
|
---|
30 | Float_t fErrSigmaCharge; // The error of the sigma of the mean charge after the fit
|
---|
31 | Float_t fRSigmaSquare; // The reduced squares of sigmas after the fit
|
---|
32 | Float_t fChargeProb; // The probability of the fit function
|
---|
33 |
|
---|
34 | Float_t fPed; // The mean pedestal (from MPedestalPix)
|
---|
35 | Float_t fPedRms; // The pedestal RMS (from MPedestalPix)
|
---|
36 | Float_t fErrPedRms; // The error of the pedestal RMS (from MPedestalPix)
|
---|
37 |
|
---|
38 | Float_t fTime; // The mean arrival time after the fit
|
---|
39 | Float_t fSigmaTime; // The error of the mean arrival time after the fit
|
---|
40 | Float_t fTimeChiSquare; // The Chi Square of the fit function
|
---|
41 | Float_t fTimeProb; // The probability of the fit function
|
---|
42 |
|
---|
43 | Float_t fPheFFactorMethod; // The number of Phe's calculated (F-factor method)
|
---|
44 | Float_t fPheFFactorMethodError; // The error on the number of Phe's calculated (F-factor method)
|
---|
45 |
|
---|
46 | Float_t fConversionFFactorMethod; // The conversion factor to Phe's (F-factor method)
|
---|
47 | Float_t fConversionBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
|
---|
48 | Float_t fConversionPINDiodeMethod; // The conversion factor to Ph's (PIN Diode method)
|
---|
49 |
|
---|
50 | Float_t fConversionErrorFFactorMethod; // The error of the conversion factor to Phe's (F-factor method)
|
---|
51 | Float_t fConversionErrorBlindPixelMethod; // The error of the conversion factor to Ph's (Blind Pixel method)
|
---|
52 | Float_t fConversionErrorPINDiodeMethod; // The error of the conversion factor to Ph's (PIN Diode method)
|
---|
53 |
|
---|
54 | Float_t fConversionSigmaFFactorMethod; // The sigma of conversion factor to Ph's (F-factor method)
|
---|
55 | Float_t fConversionSigmaBlindPixelMethod; // The conversion factor to Ph's (Blind Pixel method)
|
---|
56 | Float_t fConversionSigmaPINDiodeMethod; // The conversion factor to Phd's (PIN Diode method)
|
---|
57 |
|
---|
58 | Float_t fConversionHiLo; // The conversion factor between Hi Gain and Lo Gain
|
---|
59 | Float_t fConversionHiLoError; // The error of the conversion factor between Hi Gain and Lo Gain
|
---|
60 |
|
---|
61 | enum { kHiGainSaturation,
|
---|
62 | kExcluded, kExcludeQualityCheck,
|
---|
63 | kFitValid, kFitted,
|
---|
64 | kBlindPixelMethodValid, kFFactorMethodValid, kPINDiodeMethodValid };
|
---|
65 |
|
---|
66 | MHCalibrationPixel *fHist; // Pointer to the histograms performing the fits, etc.
|
---|
67 |
|
---|
68 | Bool_t CheckChargeFitValidity();
|
---|
69 | Bool_t CheckTimeFitValidity();
|
---|
70 | Bool_t CheckOscillations();
|
---|
71 |
|
---|
72 | public:
|
---|
73 |
|
---|
74 | MCalibrationPix(const char *name=NULL, const char *title=NULL);
|
---|
75 | ~MCalibrationPix();
|
---|
76 |
|
---|
77 | void Clear(Option_t *o="");
|
---|
78 |
|
---|
79 | // Getter
|
---|
80 | MHCalibrationPixel *GetHist() const { return fHist; }
|
---|
81 |
|
---|
82 | // Charges
|
---|
83 | Float_t GetCharge() const { return fCharge; }
|
---|
84 | Float_t GetErrCharge() const { return fErrCharge; }
|
---|
85 | Float_t GetChargeProb() const { return fChargeProb; }
|
---|
86 | Float_t GetSigmaCharge() const { return fSigmaCharge; }
|
---|
87 | Float_t GetErrSigmaCharge() const { return fErrSigmaCharge; }
|
---|
88 | Float_t GetRSigmaSquare() const { return fRSigmaSquare; }
|
---|
89 |
|
---|
90 | // Times
|
---|
91 | Float_t GetTime() const { return fTime; }
|
---|
92 | Float_t GetSigmaTime() const { return fSigmaTime; }
|
---|
93 | Float_t GetTimeChiSquare() const { return fTimeChiSquare; }
|
---|
94 | Float_t GetTimeProb() const { return fTimeProb; }
|
---|
95 |
|
---|
96 | Float_t GetConversionHiLo() const { return fConversionHiLo; }
|
---|
97 | Float_t GetConversionHiLoError() const { return fConversionHiLoError; }
|
---|
98 |
|
---|
99 | Float_t GetMeanConversionBlindPixelMethod() const { return fConversionBlindPixelMethod ; }
|
---|
100 | Float_t GetErrorConversionBlindPixelMethod() const { return fConversionErrorBlindPixelMethod ; }
|
---|
101 | Float_t GetSigmaConversionBlindPixelMethod() const { return fConversionSigmaBlindPixelMethod ; }
|
---|
102 |
|
---|
103 | Float_t GetMeanConversionFFactorMethod() const { return fConversionFFactorMethod ; }
|
---|
104 | Float_t GetErrorConversionFFactorMethod() const { return fConversionErrorFFactorMethod ; }
|
---|
105 | Float_t GetSigmaConversionFFactorMethod() const { return fConversionSigmaFFactorMethod ; }
|
---|
106 |
|
---|
107 | Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }
|
---|
108 | Float_t GetPheFFactorMethodError() const { return fPheFFactorMethodError; }
|
---|
109 |
|
---|
110 | Float_t GetMeanConversionPINDiodeMethod() const { return fConversionPINDiodeMethod ; }
|
---|
111 | Float_t GetErrorConversionPINDiodeMethod() const { return fConversionErrorPINDiodeMethod ; }
|
---|
112 | Float_t GetSigmaConversionPINDiodeMethod() const { return fConversionSigmaPINDiodeMethod ; }
|
---|
113 |
|
---|
114 | Int_t GetPixId() const { return fPixId; }
|
---|
115 |
|
---|
116 | Float_t GetPed() const { return fPed; }
|
---|
117 | Float_t GetPedRms() const { return fPedRms; }
|
---|
118 |
|
---|
119 | Bool_t IsExcluded() const;
|
---|
120 | Bool_t IsFitValid() const;
|
---|
121 | Bool_t IsFitted() const;
|
---|
122 | Bool_t IsBlindPixelMethodValid() const;
|
---|
123 | Bool_t IsFFactorMethodValid() const;
|
---|
124 | Bool_t IsPINDiodeMethodValid() const;
|
---|
125 |
|
---|
126 | // Setter
|
---|
127 | void SetPedestal(Float_t ped, Float_t pedrms);
|
---|
128 | void SetConversionHiLo(Float_t c) { fConversionHiLo = c; }
|
---|
129 | void SetConversionHiLoError(Float_t e) { fConversionHiLoError = e; }
|
---|
130 |
|
---|
131 | // Setters for MC
|
---|
132 | void SetConversionFFactorMethod(Float_t c, Float_t err, Float_t sig);
|
---|
133 | void SetConversionBlindPixelMethod(Float_t c, Float_t err, Float_t sig);
|
---|
134 | void SetConversionPINDiodeMethod(Float_t c, Float_t err, Float_t sig);
|
---|
135 |
|
---|
136 | // Bit Setters
|
---|
137 | void SetHiGainSaturation(Bool_t b = kTRUE);
|
---|
138 | void SetExcluded(Bool_t b = kTRUE);
|
---|
139 | void SetExcludeQualityCheck(Bool_t b = kTRUE);
|
---|
140 | void SetFitValid(Bool_t b = kTRUE);
|
---|
141 | void SetFitted(Bool_t b = kTRUE);
|
---|
142 | void SetBlindPixelMethodValid(Bool_t b = kTRUE);
|
---|
143 | void SetFFactorMethodValid(Bool_t b = kTRUE);
|
---|
144 | void SetPINDiodeMethodValid(Bool_t b = kTRUE);
|
---|
145 |
|
---|
146 | // Fill histos
|
---|
147 | Bool_t FillChargeHiGain(Float_t q) const { return fHist->FillChargeHiGain(q); }
|
---|
148 | Bool_t FillTimeHiGain(Float_t t) const { return fHist->FillTimeHiGain(t); }
|
---|
149 | Bool_t FillRChargevsTimeHiGain(Float_t rq, Int_t t) const { return fHist->FillChargevsNHiGain(rq,t); }
|
---|
150 |
|
---|
151 | Bool_t FillChargeLoGain(Float_t q) const { return fHist->FillChargeLoGain(q); }
|
---|
152 | Bool_t FillTimeLoGain(Float_t t) const { return fHist->FillTimeLoGain(t); }
|
---|
153 | Bool_t FillRChargevsTimeLoGain(Float_t rq, Int_t t) const { return fHist->FillChargevsNLoGain(rq,t); }
|
---|
154 |
|
---|
155 | Bool_t FillChargesInGraph(Float_t qhi,Float_t qlo) const { return fHist->FillPointInGraph(qhi,qlo); }
|
---|
156 |
|
---|
157 | void DefinePixId(Int_t i);
|
---|
158 |
|
---|
159 | // Fits
|
---|
160 | Bool_t FitCharge();
|
---|
161 | Bool_t FitTime();
|
---|
162 |
|
---|
163 | // Draws
|
---|
164 | void Draw(Option_t *opt="") { fHist->Draw(opt); }
|
---|
165 | TObject *DrawClone(Option_t *opt="") const { return fHist->DrawClone(opt); }
|
---|
166 |
|
---|
167 | // Miscellaneous
|
---|
168 | void ApplyLoGainConversion();
|
---|
169 |
|
---|
170 | ClassDef(MCalibrationPix, 1) // Storage Container for Calibration information of one pixel
|
---|
171 | };
|
---|
172 |
|
---|
173 | #endif
|
---|
174 |
|
---|