1 | #ifndef MARS_MCalibrationPINDiode
|
---|
2 | #define MARS_MCalibrationPINDiode
|
---|
3 |
|
---|
4 | #ifndef MARS_MHCalibrationPINDiode
|
---|
5 | #include "MHCalibrationPINDiode.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MCalibrationPINDiode : public MParContainer
|
---|
9 | {
|
---|
10 | private:
|
---|
11 |
|
---|
12 | MHCalibrationPINDiode *fHist; // Pointer to the histograms performing the fits, etc.
|
---|
13 |
|
---|
14 | const Float_t fChargeLimit; // The limit (in units of PedRMS) for acceptance of the fitted mean charge
|
---|
15 | const Float_t fChargeErrLimit; // The limit (in units of PedRMS) for acceptance of the fitted charge sigma
|
---|
16 | const Float_t fChargeRelErrLimit; // The limit (in units of Error of fitted charge) for acceptance of the fitted mean
|
---|
17 |
|
---|
18 | Float_t fPed; // The mean pedestal (from MPedestalPix)
|
---|
19 | Float_t fPedRms; // The pedestal RMS (from MPedestalPix)
|
---|
20 |
|
---|
21 | Float_t fCharge; // The mean charge after the fit
|
---|
22 | Float_t fErrCharge; // The error of mean charge after the fit
|
---|
23 | Float_t fSigmaCharge; // The sigma of the mean charge after the fit
|
---|
24 | Float_t fErrSigmaCharge; // The error of the sigma of the mean charge after the fit
|
---|
25 | Float_t fRSigmaSquare; // The reduced squares of sigmas after the fit
|
---|
26 | Float_t fChargeProb; // The probability of the fit function
|
---|
27 |
|
---|
28 | Float_t fTime; // The mean arrival time after the fit
|
---|
29 | Float_t fSigmaTime; // The error of the mean arrival time after the fit
|
---|
30 | Float_t fTimeChiSquare; // The Chi Square of the fit function
|
---|
31 | Float_t fTimeProb; // The probability of the fit function
|
---|
32 |
|
---|
33 | Byte_t fFlags; // Flag for the set Bits
|
---|
34 |
|
---|
35 | enum { kExcluded, kExcludeQualityCheck,
|
---|
36 | kFitValid, kFitted };
|
---|
37 |
|
---|
38 | Bool_t CheckChargeFitValidity();
|
---|
39 | Bool_t CheckTimeFitValidity();
|
---|
40 | Bool_t CheckOscillations();
|
---|
41 |
|
---|
42 | public:
|
---|
43 |
|
---|
44 | MCalibrationPINDiode(const char *name=NULL, const char *title=NULL);
|
---|
45 | ~MCalibrationPINDiode();
|
---|
46 |
|
---|
47 | void Clear(Option_t *o="");
|
---|
48 |
|
---|
49 | // Getter
|
---|
50 | MHCalibrationPINDiode *GetHist() const { return fHist; }
|
---|
51 |
|
---|
52 | // Charges
|
---|
53 | Float_t GetCharge() const { return fCharge; }
|
---|
54 | Float_t GetErrCharge() const { return fErrCharge; }
|
---|
55 | Float_t GetChargeProb() const { return fChargeProb; }
|
---|
56 | Float_t GetSigmaCharge() const { return fSigmaCharge; }
|
---|
57 | Float_t GetErrSigmaCharge() const { return fErrSigmaCharge; }
|
---|
58 | Float_t GetRSigmaSquare() const { return fRSigmaSquare; }
|
---|
59 |
|
---|
60 | // Times
|
---|
61 | Float_t GetTime() const { return fTime; }
|
---|
62 | Float_t GetSigmaTime() const { return fSigmaTime; }
|
---|
63 | Float_t GetTimeChiSquare() const { return fTimeChiSquare; }
|
---|
64 | Float_t GetTimeProb() const { return fTimeProb; }
|
---|
65 |
|
---|
66 | // Pedestals
|
---|
67 | Float_t GetPed() const { return fPed; }
|
---|
68 | Float_t GetPedRms() const { return fPedRms; }
|
---|
69 |
|
---|
70 | Bool_t IsExcluded() const;
|
---|
71 | Bool_t IsFitValid() const;
|
---|
72 | Bool_t IsFitted() const;
|
---|
73 |
|
---|
74 | // Setters
|
---|
75 | void SetPedestal(Float_t ped, Float_t pedrms);
|
---|
76 | void SetExcluded(Bool_t b = kTRUE);
|
---|
77 | void SetExcludeQualityCheck(Bool_t b = kTRUE);
|
---|
78 | void SetFitValid(Bool_t b = kTRUE);
|
---|
79 | void SetFitted(Bool_t b = kTRUE);
|
---|
80 |
|
---|
81 | // Fill histos
|
---|
82 | Bool_t FillCharge(Float_t q) { return fHist->FillChargeHiGain(q); }
|
---|
83 | Bool_t FillTime(Float_t t) { return fHist->FillTimeHiGain(t); }
|
---|
84 | Bool_t FillRChargevsTime(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); }
|
---|
85 |
|
---|
86 | // Fits
|
---|
87 | Bool_t FitCharge();
|
---|
88 | Bool_t FitTime();
|
---|
89 |
|
---|
90 | // Draws
|
---|
91 | void Draw(Option_t *opt="") { fHist->Draw(opt); }
|
---|
92 | TObject *DrawClone(Option_t *opt="") const { return fHist->DrawClone(opt); }
|
---|
93 |
|
---|
94 | ClassDef(MCalibrationPINDiode, 1) // Storage Container for Calibration information of the PIN Diode
|
---|
95 | };
|
---|
96 |
|
---|
97 | #endif /* MARS_MCalibrationPINDiode */
|
---|
98 |
|
---|