source: trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h@ 2930

Last change on this file since 2930 was 2904, checked in by gaug, 21 years ago
*** empty log message ***
File size: 8.0 KB
Line 
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
10class MCalibrationPix : public MParContainer
11{
12private:
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 Byte_t fFlags; // Flag for the set Bits
55
56 enum { kHiGainSaturation,
57 kExcluded, kExcludeQualityCheck,
58 kFitValid, kFitted,
59 kBlindPixelMethodValid, kFFactorMethodValid, kPINDiodeMethodValid };
60
61 MHCalibrationPixel *fHist; //! Pointer to the histograms performing the fits, etc.
62
63 Float_t fChargeLimit;
64 Float_t fChargeErrLimit;
65 Float_t fChargeRelErrLimit;
66
67 Bool_t CheckChargeFitValidity();
68 Bool_t CheckTimeFitValidity();
69 Bool_t CheckOscillations();
70
71public:
72
73 MCalibrationPix(const char *name=NULL, const char *title=NULL);
74 ~MCalibrationPix();
75
76 void Clear(Option_t *o="");
77
78 // Getter
79 MHCalibrationPixel *GetHist() const { return fHist; }
80
81 // Charges
82 Float_t GetCharge() const { return fCharge; }
83 Float_t GetErrCharge() const { return fErrCharge; }
84 Float_t GetChargeProb() const { return fChargeProb; }
85 Float_t GetSigmaCharge() const { return fSigmaCharge; }
86 Float_t GetErrSigmaCharge() const { return fErrSigmaCharge; }
87 Float_t GetRSigmaSquare() const { return fRSigmaSquare; }
88
89 // Times
90 Float_t GetTime() const { return fTime; }
91 Float_t GetSigmaTime() const { return fSigmaTime; }
92 Float_t GetTimeChiSquare() const { return fTimeChiSquare; }
93 Float_t GetTimeProb() const { return fTimeProb; }
94
95 Float_t GetConversionHiLo() const { return fConversionHiLo; }
96 Float_t GetConversionHiLoError() const { return fConversionHiLoError; }
97
98 Float_t GetMeanConversionBlindPixelMethod() const { return fConversionBlindPixelMethod ; }
99 Float_t GetErrorConversionBlindPixelMethod() const { return fConversionErrorBlindPixelMethod ; }
100 Float_t GetSigmaConversionBlindPixelMethod() const { return fConversionSigmaBlindPixelMethod ; }
101
102 Float_t GetMeanConversionFFactorMethod() const { return fConversionFFactorMethod ; }
103 Float_t GetErrorConversionFFactorMethod() const { return fConversionErrorFFactorMethod ; }
104 Float_t GetSigmaConversionFFactorMethod() const { return fConversionSigmaFFactorMethod ; }
105
106 Float_t GetPheFFactorMethod() const { return fPheFFactorMethod; }
107 Float_t GetPheFFactorMethodError() const { return fPheFFactorMethodError; }
108
109 Float_t GetMeanConversionPINDiodeMethod() const { return fConversionPINDiodeMethod ; }
110 Float_t GetErrorConversionPINDiodeMethod() const { return fConversionErrorPINDiodeMethod ; }
111 Float_t GetSigmaConversionPINDiodeMethod() const { return fConversionSigmaPINDiodeMethod ; }
112
113 Int_t GetPixId() const { return fPixId; }
114
115 Float_t GetPed() const { return fPed; }
116 Float_t GetPedRms() const { return fPedRms; }
117
118 Bool_t IsExcluded() const;
119 Bool_t IsFitValid() const;
120 Bool_t IsFitted() const;
121 Bool_t IsBlindPixelMethodValid() const;
122 Bool_t IsFFactorMethodValid() const;
123 Bool_t IsPINDiodeMethodValid() const;
124
125 // Setter
126 void SetPedestal(Float_t ped, Float_t pedrms);
127 void SetConversionHiLo(Float_t c) { fConversionHiLo = c; }
128 void SetConversionHiLoError(Float_t e) { fConversionHiLoError = e; }
129
130 // Setters for MC
131 void SetConversionFFactorMethod(Float_t c, Float_t err, Float_t sig);
132 void SetConversionBlindPixelMethod(Float_t c, Float_t err, Float_t sig);
133 void SetConversionPINDiodeMethod(Float_t c, Float_t err, Float_t sig);
134
135 // Bit Setters
136 void SetHiGainSaturation(Bool_t b = kTRUE);
137 void SetExcluded(Bool_t b = kTRUE);
138 void SetExcludeQualityCheck(Bool_t b = kTRUE);
139 void SetFitValid(Bool_t b = kTRUE);
140 void SetFitted(Bool_t b = kTRUE);
141 void SetBlindPixelMethodValid(Bool_t b = kTRUE);
142 void SetFFactorMethodValid(Bool_t b = kTRUE);
143 void SetPINDiodeMethodValid(Bool_t b = kTRUE);
144
145 // Fill histos
146 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); }
147 Bool_t FillTimeHiGain(Float_t t) { return fHist->FillTimeHiGain(t); }
148 Bool_t FillRChargevsTimeHiGain(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); }
149
150 Bool_t FillChargeLoGain(Float_t q) { return fHist->FillChargeLoGain(q); }
151 Bool_t FillTimeLoGain(Float_t t) { return fHist->FillTimeLoGain(t); }
152 Bool_t FillRChargevsTimeLoGain(Float_t rq, Int_t t) { return fHist->FillChargevsNLoGain(rq,t); }
153
154 Bool_t FillChargesInGraph(Float_t qhi,Float_t qlo) { return fHist->FillPointInGraph(qhi,qlo); }
155
156 void DefinePixId(Int_t i);
157
158 // Fits
159 Bool_t FitCharge();
160 Bool_t FitTime();
161
162 // Draws
163 void Draw(Option_t *opt="") { fHist->Draw(opt); }
164 TObject *DrawClone(Option_t *opt="") const { return fHist->DrawClone(opt); }
165
166 // Miscellaneous
167 void ApplyLoGainConversion();
168
169 ClassDef(MCalibrationPix, 1) // Storage Container for Calibration information of one pixel
170};
171
172#endif
173
Note: See TracBrowser for help on using the repository browser.