1 | #ifndef MARS_MCalibrationChargePix
|
---|
2 | #define MARS_MCalibrationChargePix
|
---|
3 |
|
---|
4 | #ifndef MARS_MCalibrationPix
|
---|
5 | #include "MCalibrationPix.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MCalibrationChargePix : public MCalibrationPix
|
---|
9 | {
|
---|
10 | private:
|
---|
11 |
|
---|
12 | static const Float_t gkElectronicPedRms; //! Electronic component of ped. RMS (now set to: 1.5)
|
---|
13 | static const Float_t gkElectronicPedRmsErr; //! Error Electr. component ped. RMS (now set to: 0.3)
|
---|
14 | static const Float_t gkFFactor; //! Laboratory F-factor PMTs (now set to: 1.15)
|
---|
15 | static const Float_t gkFFactorErr; //! Laboratory F-factor Error PMTs (now set to: 0.02)
|
---|
16 |
|
---|
17 | static const Float_t fgConversionHiLo; //! Default fConversionHiLo (now set to: 10.)
|
---|
18 | static const Float_t fgConversionHiLoErr; //! Default fConversionHiLoVar (now set to: 2.5)
|
---|
19 | static const Float_t fgPheFFactorMethodLimit; //! Default fPheFFactorMethodLimit (now set to: 5.)
|
---|
20 |
|
---|
21 | Float_t fAbsTimeMean; // Mean Absolute Arrival Time
|
---|
22 | Float_t fAbsTimeRms; // RMS Mean Absolute Arrival Time
|
---|
23 | Byte_t fCalibFlags; // Bit-field for the class-own bits
|
---|
24 | Float_t fConversionFFactorMethodVar; // Variance conversion factor (F-factor method)
|
---|
25 | Float_t fConversionBlindPixelMethodVar; // Variance conversion factor (Blind Pixel method)
|
---|
26 | Float_t fConversionPINDiodeMethodVar; // Variance conversion factor (PIN Diode method)
|
---|
27 | Float_t fConversionCombinedMethodVar; // Variance conversion factor (all methods combined)
|
---|
28 | Float_t fConversionHiLo; // Conversion factor betw. Hi Gain and Lo Gain
|
---|
29 | Float_t fConversionHiLoVar; // Variance Conversion factor betw. Hi and Lo Gain
|
---|
30 | Float_t fLoGainPedRmsSquare; // Pedestal RMS square of Low Gain
|
---|
31 | Float_t fLoGainPedRmsSquareVar; // Pedestal RMS square Variance of Low Gain
|
---|
32 | Float_t fMeanConversionFFactorMethod; // Conversion factor (F-factor method)
|
---|
33 | Float_t fMeanConversionBlindPixelMethod; // Conversion factor (Blind Pixel method)
|
---|
34 | Float_t fMeanConversionPINDiodeMethod; // Conversion factor (PIN Diode method)
|
---|
35 | Float_t fMeanConversionCombinedMethod; // Conversion factor (all methods combined)
|
---|
36 | Float_t fPed; // Pedestal (from MPedestalPix) times number FADC slices
|
---|
37 | Float_t fPedVar; // Variance of pedestal
|
---|
38 | Float_t fPedRms; // Pedestal RMS (from MPedestalPix) times sqrt nr. FADC slices
|
---|
39 | Float_t fPheFFactorMethod; // Number Phe's calculated (F-factor method)
|
---|
40 | Float_t fPheFFactorMethodVar; // Variance number of Phe's (F-factor method)
|
---|
41 | Float_t fPheFFactorMethodLimit; // Min. number Photo-electrons for pix to be accepted.
|
---|
42 | Float_t fRSigmaSquare; // Square of Reduced sigma
|
---|
43 | Float_t fRSigmaSquareVar; // Variance Reduced sigma
|
---|
44 | Float_t fSigmaConversionFFactorMethod; // Sigma Conversion factor (F-factor method)
|
---|
45 | Float_t fSigmaConversionBlindPixelMethod; // Sigma Conversion factor (Blind Pixel method)
|
---|
46 | Float_t fSigmaConversionPINDiodeMethod; // Sigma Conversion factor (PIN Diode method)
|
---|
47 | Float_t fSigmaConversionCombinedMethod; // Sigma Conversion factor (all methods combined)
|
---|
48 | Float_t fTotalFFactorFFactorMethod; // Total F-Factor to Ph's (F-factor method)
|
---|
49 | Float_t fTotalFFactorBlindPixelMethod; // Total F-Factor to Ph's (Blind Pixel method)
|
---|
50 | Float_t fTotalFFactorPINDiodeMethod; // Total F-Factor to Ph's (PIN Diode method)
|
---|
51 | Float_t fTotalFFactorCombinedMethod; // Total F-Factor to Ph's (all methods combined)
|
---|
52 | Float_t fTotalFFactorFFactorMethodVar; // Variance total F-Factor (F-factor method)
|
---|
53 | Float_t fTotalFFactorBlindPixelMethodVar; // Variance total F-Factor (Blind Pixel method)
|
---|
54 | Float_t fTotalFFactorPINDiodeMethodVar; // Variance total F-Factor (PIN Diode method)
|
---|
55 | Float_t fTotalFFactorCombinedMethodVar; // Variance total F-Factor (all methods combined)
|
---|
56 |
|
---|
57 | enum { kBlindPixelMethodValid, kFFactorMethodValid,
|
---|
58 | kPINDiodeMethodValid, kCombinedMethodValid }; // Possible bits to be set
|
---|
59 |
|
---|
60 | const Float_t GetConversionHiLoRelVar() const;
|
---|
61 | const Float_t GetFFactorRelVar() const;
|
---|
62 |
|
---|
63 | public:
|
---|
64 |
|
---|
65 | MCalibrationChargePix(const char *name=NULL, const char *title=NULL);
|
---|
66 | ~MCalibrationChargePix() {}
|
---|
67 |
|
---|
68 | void Clear(Option_t *o="");
|
---|
69 |
|
---|
70 | // Setter
|
---|
71 | void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
|
---|
72 | void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
|
---|
73 | void SetConversionHiLo ( const Float_t c=fgConversionHiLo ) { fConversionHiLo = c; }
|
---|
74 | void SetConversionHiLoErr ( const Float_t e=fgConversionHiLoErr ) { fConversionHiLoVar = e*e; }
|
---|
75 | void SetConversionFFactorMethod ( Float_t c, Float_t err, Float_t sig );
|
---|
76 | void SetConversionBlindPixelMethod( Float_t c, Float_t err, Float_t sig );
|
---|
77 | void SetConversionPINDiodeMethod ( Float_t c, Float_t err, Float_t sig );
|
---|
78 | void SetConversionCombinedMethod ( Float_t c, Float_t err, Float_t sig );
|
---|
79 |
|
---|
80 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
81 | void SetFFactorMethodValid ( const Bool_t b = kTRUE );
|
---|
82 | void SetPINDiodeMethodValid ( const Bool_t b = kTRUE );
|
---|
83 | void SetCombinedMethodValid ( const Bool_t b = kTRUE );
|
---|
84 |
|
---|
85 | void SetPedestal ( const Float_t ped, const Float_t pedrms, const Float_t pederr);
|
---|
86 | void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; }
|
---|
87 | void SetTotalFFactorFFactorMethod ( const Float_t f) { fTotalFFactorFFactorMethod = f; }
|
---|
88 | void SetTotalFFactorBlindPixelMethod ( const Float_t f) { fTotalFFactorBlindPixelMethod = f; }
|
---|
89 | void SetTotalFFactorPINDiodeMethod ( const Float_t f) { fTotalFFactorPINDiodeMethod = f; }
|
---|
90 | void SetTotalFFactorFFactorMethodErr ( const Float_t f) { fTotalFFactorFFactorMethodVar = f*f; }
|
---|
91 | void SetTotalFFactorBlindPixelMethodErr ( const Float_t f) { fTotalFFactorBlindPixelMethodVar = f*f; }
|
---|
92 | void SetTotalFFactorPINDiodeMethodErr ( const Float_t f) { fTotalFFactorPINDiodeMethodVar = f*f; }
|
---|
93 |
|
---|
94 | // Getters
|
---|
95 | Float_t GetAbsTimeMean () const { return fAbsTimeMean; }
|
---|
96 | Float_t GetAbsTimeRms () const { return fAbsTimeRms; }
|
---|
97 | Float_t GetConversionHiLo () const { return fConversionHiLo; }
|
---|
98 | Float_t GetConversionHiLoErr () const;
|
---|
99 | Float_t GetConversionBlindPixelMethodErr() const;
|
---|
100 | Float_t GetConversionFFactorMethodErr () const;
|
---|
101 | Float_t GetConversionPINDiodeMethodErr() const;
|
---|
102 | Float_t GetConversionCombinedMethodErr() const;
|
---|
103 | Float_t GetConvertedLoGainMean () const;
|
---|
104 | Float_t GetConvertedLoGainMeanErr () const;
|
---|
105 | Float_t GetConvertedLoGainSigma () const;
|
---|
106 | Float_t GetConvertedLoGainSigmaErr () const;
|
---|
107 | Float_t GetMeanConversionBlindPixelMethod() const { return fMeanConversionBlindPixelMethod ; }
|
---|
108 | Float_t GetMeanConversionCombinedMethod() const { return fMeanConversionCombinedMethod ; }
|
---|
109 | Float_t GetMeanConversionFFactorMethod() const { return fMeanConversionFFactorMethod; }
|
---|
110 | Float_t GetMeanConversionPINDiodeMethod() const { return fMeanConversionPINDiodeMethod ; }
|
---|
111 | Float_t GetSigmaConversionBlindPixelMethod() const { return fSigmaConversionBlindPixelMethod ; }
|
---|
112 | Float_t GetSigmaConversionCombinedMethod() const { return fSigmaConversionCombinedMethod ; }
|
---|
113 | Float_t GetSigmaConversionFFactorMethod() const { return fSigmaConversionFFactorMethod; }
|
---|
114 | Float_t GetSigmaConversionPINDiodeMethod() const { return fSigmaConversionPINDiodeMethod ; }
|
---|
115 | Float_t GetPed () const { return fPed; }
|
---|
116 | Float_t GetPedErr () const;
|
---|
117 | Float_t GetPedRms () const;
|
---|
118 | Float_t GetPedRmsErr () const;
|
---|
119 | Float_t GetPheFFactorMethod () const { return fPheFFactorMethod; }
|
---|
120 | Float_t GetPheFFactorMethodErr() const;
|
---|
121 | Float_t GetRSigma () const;
|
---|
122 | Float_t GetRSigmaErr () const;
|
---|
123 | Float_t GetRSigmaRelVar () const;
|
---|
124 | Float_t GetTotalFFactorBlindPixelMethod() const { return fTotalFFactorBlindPixelMethod; }
|
---|
125 | Float_t GetTotalFFactorBlindPixelMethodErr() const;
|
---|
126 | Float_t GetTotalFFactorCombinedMethod() const { return fTotalFFactorCombinedMethod; }
|
---|
127 | Float_t GetTotalFFactorCombinedMethodErr() const;
|
---|
128 | Float_t GetTotalFFactorFFactorMethod() const { return fTotalFFactorFFactorMethod; }
|
---|
129 | Float_t GetTotalFFactorFFactorMethodErr() const;
|
---|
130 | Float_t GetTotalFFactorPINDiodeMethod() const { return fTotalFFactorPINDiodeMethod; }
|
---|
131 | Float_t GetTotalFFactorPINDiodeMethodErr() const;
|
---|
132 |
|
---|
133 | Bool_t IsBlindPixelMethodValid() const;
|
---|
134 | Bool_t IsPINDiodeMethodValid() const;
|
---|
135 | Bool_t IsFFactorMethodValid() const;
|
---|
136 | Bool_t IsCombinedMethodValid() const;
|
---|
137 |
|
---|
138 | // Miscellaneous
|
---|
139 | void CalcLoGainPedestal(const Float_t logainsamples);
|
---|
140 | Bool_t CalcReducedSigma();
|
---|
141 | Bool_t CalcFFactorMethod();
|
---|
142 |
|
---|
143 | ClassDef(MCalibrationChargePix, 1) // Container Charge Calibration Results Pixel
|
---|
144 | };
|
---|
145 |
|
---|
146 | #endif
|
---|
147 |
|
---|