source: trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.h@ 3007

Last change on this file since 3007 was 3007, checked in by gaug, 21 years ago
*** empty log message ***
File size: 4.0 KB
Line 
1#ifndef MARS_MCalibrationPINDiode
2#define MARS_MCalibrationPINDiode
3
4#ifndef MARS_MHCalibrationPINDiode
5#include "MHCalibrationPINDiode.h"
6#endif
7
8class MCalibrationPINDiode : public MParContainer
9{
10private:
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 kChargeFitValid, kTimeFitValid, kFitted };
37
38 Bool_t CheckChargeFitValidity();
39 Bool_t CheckTimeFitValidity();
40 Bool_t CheckOscillations();
41
42public:
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 IsChargeFitValid() const;
72 Bool_t IsTimeFitValid() const;
73 Bool_t IsFitted() const;
74
75 // Setters
76 void SetPedestal(Float_t ped, Float_t pedrms);
77 void SetExcluded(Bool_t b = kTRUE);
78 void SetExcludeQualityCheck(Bool_t b = kTRUE);
79 void SetChargeFitValid(Bool_t b = kTRUE);
80 void SetTimeFitValid(Bool_t b = kTRUE);
81 void SetFitted(Bool_t b = kTRUE);
82
83 // Fill histos
84 Bool_t FillCharge(Float_t q) { return fHist->FillChargeHiGain(q); }
85 Bool_t FillAbsTime(Float_t t) { return fHist->FillAbsTimeHiGain(t); }
86 Bool_t FillRelTime(Float_t t) { return fHist->FillRelTimeHiGain(t); }
87 Bool_t FillRChargevsTime(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); }
88
89 // Fits
90 Bool_t FitCharge();
91 Bool_t FitTime();
92
93 // Draws
94 void Draw(Option_t *opt="") { fHist->Draw(opt); }
95 TObject *DrawClone(Option_t *opt="") const { return fHist->DrawClone(opt); }
96
97 ClassDef(MCalibrationPINDiode, 1) // Storage Container for Calibration information of the PIN Diode
98};
99
100#endif /* MARS_MCalibrationPINDiode */
101
Note: See TracBrowser for help on using the repository browser.