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

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