| 1 | #ifndef MARS_MHCalibrationPixel
|
|---|
| 2 | #define MARS_MHCalibrationPixel
|
|---|
| 3 |
|
|---|
| 4 | #ifndef ROOT_TH1
|
|---|
| 5 | #include "TH1.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef ROOT_TH1
|
|---|
| 9 | #include "TH1F.h"
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | #ifndef MARS_MH
|
|---|
| 13 | #include "MH.h"
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | #ifndef ROOT_TF1
|
|---|
| 17 | #include "TF1.h"
|
|---|
| 18 | #endif
|
|---|
| 19 |
|
|---|
| 20 | class TPaveText;
|
|---|
| 21 | class TMath;
|
|---|
| 22 | class MParList;
|
|---|
| 23 |
|
|---|
| 24 | class MHCalibrationPixel : public MH
|
|---|
| 25 | {
|
|---|
| 26 |
|
|---|
| 27 | private:
|
|---|
| 28 |
|
|---|
| 29 | Int_t fPixId; //-> Pixel Nr
|
|---|
| 30 |
|
|---|
| 31 | protected:
|
|---|
| 32 |
|
|---|
| 33 | TH1I* fHCharge; //-> Summed FADC slices
|
|---|
| 34 | TH1I* fHTime; //-> Mean arrival time in number of FADC sice
|
|---|
| 35 | TH1I* fHChargevsN; //-> Summed Charge vs. Event Nr.
|
|---|
| 36 |
|
|---|
| 37 | TF1* fChargeGausFit;
|
|---|
| 38 | TF1* fTimeGausFit;
|
|---|
| 39 |
|
|---|
| 40 | TPaveText *fFitLegend;
|
|---|
| 41 |
|
|---|
| 42 | Axis_t fLowerFitRange;
|
|---|
| 43 | Axis_t fChargeFirst;
|
|---|
| 44 | Axis_t fChargeLast;
|
|---|
| 45 | Int_t fChargeNbins;
|
|---|
| 46 |
|
|---|
| 47 | Bool_t fFitOK;
|
|---|
| 48 |
|
|---|
| 49 | Double_t fChargeChisquare;
|
|---|
| 50 | Double_t fChargeProb;
|
|---|
| 51 | Int_t fChargeNdf;
|
|---|
| 52 |
|
|---|
| 53 | Double_t fChargeMean;
|
|---|
| 54 | Double_t fChargeMeanErr;
|
|---|
| 55 | Double_t fChargeSigma;
|
|---|
| 56 | Double_t fChargeSigmaErr;
|
|---|
| 57 |
|
|---|
| 58 | Double_t fTimeChisquare;
|
|---|
| 59 | Double_t fTimeProb;
|
|---|
| 60 | Int_t fTimeNdf;
|
|---|
| 61 |
|
|---|
| 62 | Double_t fTimeMean;
|
|---|
| 63 | Double_t fTimeSigma;
|
|---|
| 64 |
|
|---|
| 65 | virtual void DrawLegend();
|
|---|
| 66 |
|
|---|
| 67 | public:
|
|---|
| 68 |
|
|---|
| 69 | MHCalibrationPixel(const char *name=NULL, const char *title=NULL);
|
|---|
| 70 | ~MHCalibrationPixel();
|
|---|
| 71 |
|
|---|
| 72 | void ChangeHistId(Int_t i);
|
|---|
| 73 |
|
|---|
| 74 | Bool_t SetupFill(const MParList *pList);
|
|---|
| 75 | Bool_t Fill(const MParContainer *, const Stat_t w=1) { return kTRUE; }
|
|---|
| 76 |
|
|---|
| 77 | Bool_t FillCharge(Int_t q) { return fHCharge->Fill(q) > -1; }
|
|---|
| 78 | Bool_t FillTime(Int_t t) { return fHTime->Fill(t) > -1; }
|
|---|
| 79 | Bool_t FillChargevsN(Float_t q, Int_t n) { return fHChargevsN->Fill(n,q) > -1; }
|
|---|
| 80 |
|
|---|
| 81 | const TH1I *GetHCharge() { return fHCharge; }
|
|---|
| 82 | const TH1I *GetHCharge() const { return fHCharge; }
|
|---|
| 83 |
|
|---|
| 84 | const Double_t GetChargeMean() const { return fChargeMean; }
|
|---|
| 85 | const Double_t GetChargeMeanErr() const { return fChargeMeanErr; }
|
|---|
| 86 | const Double_t GetChargeSigma() const { return fChargeSigma; }
|
|---|
| 87 | const Double_t GetChargeSigmaErr() const { return fChargeSigmaErr; }
|
|---|
| 88 | const Double_t GetArea() const { return fChargeGausFit->GetParameter(0); }
|
|---|
| 89 | const Double_t GetAreaErr() const { return fChargeGausFit->GetParError(0); }
|
|---|
| 90 |
|
|---|
| 91 | const Double_t GetChargeChiSquare() const { return fChargeChisquare; }
|
|---|
| 92 | const Double_t GetChargeProb() const { return fChargeProb; }
|
|---|
| 93 | const Int_t GetChargeNdf() const { return fChargeNdf; }
|
|---|
| 94 |
|
|---|
| 95 | const Double_t GetTimeMean() const { return fTimeMean; }
|
|---|
| 96 | const Double_t GetTimeSigma() const { return fTimeSigma; }
|
|---|
| 97 |
|
|---|
| 98 | const Double_t GetTimeChiSquare() const { return fTimeChisquare; }
|
|---|
| 99 | const Double_t GetTimeProb() const { return fTimeProb; }
|
|---|
| 100 | const Int_t GetTimeNdf() const { return fTimeNdf; }
|
|---|
| 101 |
|
|---|
| 102 | const TH1I *GetHTime() { return fHTime; }
|
|---|
| 103 | const TH1I *GetHTime() const { return fHTime; }
|
|---|
| 104 |
|
|---|
| 105 | const TH1I *GetHChargevsN() { return fHChargevsN; }
|
|---|
| 106 | const TH1I *GetHChargevsN() const { return fHChargevsN; }
|
|---|
| 107 |
|
|---|
| 108 | Bool_t FitCharge(Option_t *option="RQ0");
|
|---|
| 109 | Bool_t FitTime(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0");
|
|---|
| 110 |
|
|---|
| 111 | virtual void Draw(Option_t *option="");
|
|---|
| 112 | virtual void CutAllEdges();
|
|---|
| 113 | virtual void Reset();
|
|---|
| 114 |
|
|---|
| 115 | void SetLowerFitRange(Axis_t min) { fLowerFitRange = min; }
|
|---|
| 116 |
|
|---|
| 117 | void PrintChargeFitResult();
|
|---|
| 118 | void PrintTimeFitResult();
|
|---|
| 119 |
|
|---|
| 120 | Bool_t IsFitOK() { return fFitOK; }
|
|---|
| 121 |
|
|---|
| 122 | ClassDef(MHCalibrationPixel, 1)
|
|---|
| 123 | };
|
|---|
| 124 |
|
|---|
| 125 | #endif
|
|---|