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