1 | #ifndef MARS_MHPedestalPixel
|
---|
2 | #define MARS_MHPedestalPixel
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TH1F;
|
---|
9 | class TH1I;
|
---|
10 | class TF1;
|
---|
11 | class MHPedestalPixel : public MH
|
---|
12 | {
|
---|
13 |
|
---|
14 | private:
|
---|
15 |
|
---|
16 | static const Int_t gkChargeNbins;
|
---|
17 | static const Int_t gkChargevsNbins;
|
---|
18 | static const Axis_t gkChargevsNFirst;
|
---|
19 | static const Axis_t gkChargevsNLast;
|
---|
20 | static const Axis_t gkChargeFirst;
|
---|
21 | static const Axis_t gkChargeLast;
|
---|
22 |
|
---|
23 | Int_t fPixId; // Pixel Nr
|
---|
24 |
|
---|
25 | Axis_t fChargeFirst;
|
---|
26 | Axis_t fChargeLast;
|
---|
27 |
|
---|
28 | const Int_t fChargevsNbins;
|
---|
29 | const Axis_t fChargevsNFirst;
|
---|
30 | const Axis_t fChargevsNLast;
|
---|
31 |
|
---|
32 | TH1F* fHPedestalCharge; //-> Summed FADC slices
|
---|
33 | TH1I* fHPedestalChargevsN; //-> Summed FADC slices vs Event nr.
|
---|
34 | TF1* fGausFit; // Fit the the Summed FADC slices
|
---|
35 |
|
---|
36 | Int_t fTotalEntries; // Number of entries
|
---|
37 |
|
---|
38 | Double_t fChargeChisquare;
|
---|
39 | Double_t fChargeProb;
|
---|
40 | Int_t fChargeNdf;
|
---|
41 |
|
---|
42 | Double_t fChargeMean;
|
---|
43 | Double_t fChargeMeanErr;
|
---|
44 | Double_t fChargeSigma;
|
---|
45 | Double_t fChargeSigmaErr;
|
---|
46 |
|
---|
47 | Byte_t fFlags;
|
---|
48 |
|
---|
49 | enum { kFitted, kFitOK, kOscillating };
|
---|
50 |
|
---|
51 | public:
|
---|
52 |
|
---|
53 | MHPedestalPixel();
|
---|
54 | ~MHPedestalPixel();
|
---|
55 |
|
---|
56 | void Clear(Option_t *o="");
|
---|
57 | void Reset();
|
---|
58 |
|
---|
59 | void ChangeHistId(Int_t i);
|
---|
60 |
|
---|
61 | // Getters
|
---|
62 | const TH1F *GetHPedestalCharge() const { return fHPedestalCharge; }
|
---|
63 |
|
---|
64 | Double_t GetChargeMean() const { return fChargeMean; }
|
---|
65 | Double_t GetChargeMeanErr() const { return fChargeMeanErr; }
|
---|
66 | Double_t GetChargeSigma() const { return fChargeSigma; }
|
---|
67 | Double_t GetChargeSigmaErr() const { return fChargeSigmaErr; }
|
---|
68 | Double_t GetChargeChiSquare() const { return fChargeChisquare; }
|
---|
69 | Double_t GetChargeProb() const { return fChargeProb; }
|
---|
70 | Int_t GetChargeNdf() const { return fChargeNdf; }
|
---|
71 |
|
---|
72 | Int_t GetTotalEntries() const { return fTotalEntries; }
|
---|
73 |
|
---|
74 | Bool_t IsFitOK() const;
|
---|
75 | Bool_t IsEmpty() const;
|
---|
76 |
|
---|
77 | // Fill histos
|
---|
78 | Bool_t FillCharge(Float_t q);
|
---|
79 | Bool_t FillChargevsN(Float_t q);
|
---|
80 |
|
---|
81 | // Fits
|
---|
82 | Bool_t FitCharge(Option_t *option="RQ0");
|
---|
83 | void Renorm(const Float_t nslices);
|
---|
84 |
|
---|
85 | // Draws
|
---|
86 | void Draw(Option_t *option="");
|
---|
87 | TObject *DrawClone(Option_t *option="") const;
|
---|
88 |
|
---|
89 | // Prints
|
---|
90 | void Print(const Option_t *o="") const;
|
---|
91 |
|
---|
92 | // Others
|
---|
93 | void CutAllEdges();
|
---|
94 |
|
---|
95 | ClassDef(MHPedestalPixel, 1) // Histograms for each calibrated pixel
|
---|
96 | };
|
---|
97 |
|
---|
98 | #endif
|
---|