| 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 | Byte_t fFlags; // Flag for the set Bits
|
|---|
| 29 |
|
|---|
| 30 | enum { kExcluded, kExcludeQualityCheck,
|
|---|
| 31 | kChargeFitValid, kTimeFitValid, kFitted };
|
|---|
| 32 |
|
|---|
| 33 | Bool_t CheckChargeFitValidity();
|
|---|
| 34 | Bool_t CheckTimeFitValidity();
|
|---|
| 35 | Bool_t CheckOscillations();
|
|---|
| 36 |
|
|---|
| 37 | public:
|
|---|
| 38 |
|
|---|
| 39 | MCalibrationPINDiode(const char *name=NULL, const char *title=NULL);
|
|---|
| 40 | ~MCalibrationPINDiode();
|
|---|
| 41 |
|
|---|
| 42 | void Clear(Option_t *o="");
|
|---|
| 43 |
|
|---|
| 44 | // Getter
|
|---|
| 45 | MHCalibrationPINDiode *GetHist() const { return fHist; }
|
|---|
| 46 |
|
|---|
| 47 | // Charges
|
|---|
| 48 | Float_t GetCharge() const { return fCharge; }
|
|---|
| 49 | Float_t GetErrCharge() const { return fErrCharge; }
|
|---|
| 50 | Float_t GetChargeProb() const { return fChargeProb; }
|
|---|
| 51 | Float_t GetSigmaCharge() const { return fSigmaCharge; }
|
|---|
| 52 | Float_t GetErrSigmaCharge() const { return fErrSigmaCharge; }
|
|---|
| 53 | Float_t GetRSigmaSquare() const { return fRSigmaSquare; }
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 | // Pedestals
|
|---|
| 57 | Float_t GetPed() const { return fPed; }
|
|---|
| 58 | Float_t GetPedRms() const { return fPedRms; }
|
|---|
| 59 |
|
|---|
| 60 | Bool_t IsExcluded() const;
|
|---|
| 61 | Bool_t IsChargeFitValid() const;
|
|---|
| 62 | Bool_t IsTimeFitValid() const;
|
|---|
| 63 | Bool_t IsFitted() const;
|
|---|
| 64 |
|
|---|
| 65 | // Setters
|
|---|
| 66 | void SetPedestal(Float_t ped, Float_t pedrms);
|
|---|
| 67 | void SetExcluded(Bool_t b = kTRUE);
|
|---|
| 68 | void SetExcludeQualityCheck(Bool_t b = kTRUE);
|
|---|
| 69 | void SetChargeFitValid(Bool_t b = kTRUE);
|
|---|
| 70 | void SetTimeFitValid(Bool_t b = kTRUE);
|
|---|
| 71 | void SetFitted(Bool_t b = kTRUE);
|
|---|
| 72 |
|
|---|
| 73 | // Fill histos
|
|---|
| 74 | Bool_t FillCharge(Float_t q) { return fHist->FillChargeHiGain(q); }
|
|---|
| 75 | Bool_t FillAbsTime(Float_t t) { return fHist->FillAbsTimeHiGain(t); }
|
|---|
| 76 |
|
|---|
| 77 | Bool_t FillGraphs(Float_t qhi,Float_t qlo) const { return fHist->FillGraphs(qhi,qlo); }
|
|---|
| 78 |
|
|---|
| 79 | // Fits
|
|---|
| 80 | Bool_t FitCharge();
|
|---|
| 81 |
|
|---|
| 82 | // Draws
|
|---|
| 83 | void Draw(Option_t *opt="") { fHist->Draw(opt); }
|
|---|
| 84 | TObject *DrawClone(Option_t *opt="") const { return fHist->DrawClone(opt); }
|
|---|
| 85 |
|
|---|
| 86 | ClassDef(MCalibrationPINDiode, 1) // Container for Calibration PIN Diode
|
|---|
| 87 | };
|
|---|
| 88 |
|
|---|
| 89 | #endif /* MARS_MCalibrationPINDiode */
|
|---|
| 90 |
|
|---|