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 from opt. receiver on (now set to: 1.)
|
---|
13 | static const Float_t gkElectronicPedRmsErr; //! Error Electr. component ped. RMS (now set to: 0.35)
|
---|
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 | static const Float_t fgConvFFactorRelErrLimit; //! Default fConvFFactorRelErrLimit (now set to: 0.35)
|
---|
21 |
|
---|
22 | Float_t fAbsTimeMean; // Mean Absolute Arrival Time
|
---|
23 | Float_t fAbsTimeRms; // RMS Mean Absolute Arrival Time
|
---|
24 | Byte_t fCalibFlags; // Bit-field for the class-own bits
|
---|
25 | Float_t fConversionHiLo; // Conversion factor betw. Hi Gain and Lo Gain
|
---|
26 | Float_t fConversionHiLoVar; // Variance Conversion factor betw. Hi and Lo Gain
|
---|
27 | Float_t fConvFFactorRelVarLimit; // Limit for acceptance rel. variance Conversion FADC2Phe
|
---|
28 | Float_t fLoGainPedRmsSquare; // Pedestal RMS square of Low Gain
|
---|
29 | Float_t fLoGainPedRmsSquareVar; // Pedestal RMS square Variance of Low Gain
|
---|
30 | Float_t fMeanConvFADC2Phe; // Conversion factor (F-factor method)
|
---|
31 | Float_t fMeanConvFADC2PheVar; // Variance conversion factor (F-factor method)
|
---|
32 | Float_t fMeanFFactorFADC2Phot; // Total mean F-Factor to photons (F-factor method)
|
---|
33 | Float_t fMeanFFactorFADC2PhotVar; // Variance mean F-Factor photons (F-factor method)
|
---|
34 | Float_t fPed; // Pedestal (from MPedestalPix) times number FADC slices
|
---|
35 | Float_t fPedVar; // Variance of pedestal
|
---|
36 | Float_t fPedRms; // Pedestal RMS (from MPedestalPix) times sqrt nr. FADC slices
|
---|
37 | Float_t fPedRmsVar; // Pedestal RMS (from MPedestalPix) times sqrt nr. FADC slices
|
---|
38 | Float_t fPheFFactorMethod; // Number Phe's calculated (F-factor method)
|
---|
39 | Float_t fPheFFactorMethodVar; // Variance number of Phe's (F-factor method)
|
---|
40 | Float_t fPheFFactorMethodLimit; // Min. number Photo-electrons for pix to be accepted.
|
---|
41 | Float_t fRSigmaSquare; // Square of Reduced sigma
|
---|
42 | Float_t fRSigmaSquareVar; // Variance Reduced sigma
|
---|
43 |
|
---|
44 | Int_t fNumSaturated; // Number of (high-gain) saturated events
|
---|
45 |
|
---|
46 | enum { kFFactorMethodValid }; // Possible bits to be set
|
---|
47 |
|
---|
48 | const Float_t GetElectronicPedRmsRelVar() const;
|
---|
49 | const Float_t GetConversionHiLoRelVar() const;
|
---|
50 | const Float_t GetFFactorRelVar() const;
|
---|
51 |
|
---|
52 | public:
|
---|
53 |
|
---|
54 | MCalibrationChargePix(const char *name=NULL, const char *title=NULL);
|
---|
55 | ~MCalibrationChargePix() {}
|
---|
56 |
|
---|
57 | void Clear(Option_t *o="");
|
---|
58 |
|
---|
59 | // Setter
|
---|
60 | void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
|
---|
61 | void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
|
---|
62 | void SetConversionHiLo ( const Float_t c=fgConversionHiLo ) { fConversionHiLo = c; }
|
---|
63 | void SetConversionHiLoErr ( const Float_t e=fgConversionHiLoErr ) { fConversionHiLoVar = e*e; }
|
---|
64 | void SetConvFFactorRelErrLimit ( const Float_t f=fgConvFFactorRelErrLimit) { fConvFFactorRelVarLimit = f*f;}
|
---|
65 | void SetFFactorMethodValid ( const Bool_t b = kTRUE );
|
---|
66 | void SetMeanConvFADC2Phe ( const Float_t f) { fMeanConvFADC2Phe = f; }
|
---|
67 | void SetMeanConvFADC2PheVar ( const Float_t f) { fMeanConvFADC2PheVar = f; }
|
---|
68 | void SetMeanFFactorFADC2Phot ( const Float_t f) { fMeanFFactorFADC2Phot = f; }
|
---|
69 | void SetPedestal ( const Float_t ped, const Float_t pedrms, const Float_t pederr);
|
---|
70 | void SetPed ( const Float_t ped, const Float_t pederr);
|
---|
71 | void SetPedRMS ( const Float_t pedrms, const Float_t pedrmserr);
|
---|
72 | void SetPheFFactorMethod ( const Float_t f) { fPheFFactorMethod = f; }
|
---|
73 | void SetPheFFactorMethodVar ( const Float_t f) { fPheFFactorMethodVar = f; }
|
---|
74 | void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; }
|
---|
75 | void SetNumSaturated ( const Int_t i) { fNumSaturated = i; }
|
---|
76 |
|
---|
77 | // Getters
|
---|
78 | Float_t GetAbsTimeMean () const { return fAbsTimeMean; }
|
---|
79 | Float_t GetAbsTimeRms () const { return fAbsTimeRms; }
|
---|
80 | Float_t GetConversionHiLo () const { return fConversionHiLo; }
|
---|
81 | Float_t GetConversionHiLoErr () const;
|
---|
82 | Float_t GetConvertedMean () const;
|
---|
83 | Float_t GetConvertedMeanErr () const;
|
---|
84 | Float_t GetConvertedSigma () const;
|
---|
85 | Float_t GetConvertedSigmaErr () const;
|
---|
86 | Float_t GetConvertedRSigma () const;
|
---|
87 | Float_t GetConvertedRSigmaErr () const;
|
---|
88 | Float_t GetConvertedRSigmaSquare () const;
|
---|
89 | Float_t GetMeanConvFADC2Phe () const { return fMeanConvFADC2Phe; }
|
---|
90 | Float_t GetMeanConvFADC2PheErr () const;
|
---|
91 | Float_t GetMeanConvFADC2PheVar () const { return fMeanConvFADC2PheVar; }
|
---|
92 | Float_t GetMeanFFactorFADC2Phot () const { return fMeanFFactorFADC2Phot; }
|
---|
93 | Float_t GetMeanFFactorFADC2PhotErr () const;
|
---|
94 | Float_t GetMeanFFactorFADC2PhotVar () const { return fMeanFFactorFADC2PhotVar; }
|
---|
95 | Int_t GetNumSaturated () const { return fNumSaturated; }
|
---|
96 | Float_t GetPed () const { return fPed; }
|
---|
97 | Float_t GetPedErr () const { return TMath::Sqrt(fPedVar); }
|
---|
98 | Float_t GetPedRms () const;
|
---|
99 | Float_t GetPedRmsErr () const;
|
---|
100 | Float_t GetPheFFactorMethod () const { return fPheFFactorMethod; }
|
---|
101 | Float_t GetPheFFactorMethodErr () const;
|
---|
102 | Float_t GetPheFFactorMethodVar () const { return fPheFFactorMethodVar; }
|
---|
103 | Float_t GetPheFFactorMethodRelVar () const;
|
---|
104 | Float_t GetRSigma () const;
|
---|
105 | Float_t GetRSigmaErr () const;
|
---|
106 | Float_t GetRSigmaRelVar () const;
|
---|
107 | Float_t GetRSigmaPerCharge () const;
|
---|
108 | Float_t GetRSigmaPerChargeErr () const;
|
---|
109 |
|
---|
110 | Bool_t IsFFactorMethodValid () const;
|
---|
111 |
|
---|
112 | // Calculations
|
---|
113 | void CalcLoGainPedestal ( const Float_t logainsamples);
|
---|
114 | Bool_t CalcReducedSigma ( );
|
---|
115 | Bool_t CalcFFactor ( );
|
---|
116 | Bool_t CalcConvFFactor ( );
|
---|
117 | Bool_t CalcMeanFFactor ( const Float_t nphotons, const Float_t nphotonsrelvar );
|
---|
118 |
|
---|
119 | ClassDef(MCalibrationChargePix, 3) // Container Charge Calibration Results Pixel
|
---|
120 | };
|
---|
121 |
|
---|
122 | #endif
|
---|
123 |
|
---|