1 | #ifndef MARS_MHCalibrationChargePix
|
---|
2 | #define MARS_MHCalibrationChargePix
|
---|
3 |
|
---|
4 | #ifndef MARS_MHGausEvents
|
---|
5 | #include "MHGausEvents.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TH1F;
|
---|
9 | class MHCalibrationChargePix : public MHGausEvents
|
---|
10 | {
|
---|
11 |
|
---|
12 | private:
|
---|
13 |
|
---|
14 | static const Int_t fgChargeNbins;
|
---|
15 | static const Axis_t fgChargeFirst;
|
---|
16 | static const Axis_t fgChargeLast;
|
---|
17 |
|
---|
18 | static const Int_t fgAbsTimeNbins;
|
---|
19 | static const Axis_t fgAbsTimeFirst;
|
---|
20 | static const Axis_t fgAbsTimeLast;
|
---|
21 |
|
---|
22 | static const Int_t fgPickupLimit;
|
---|
23 |
|
---|
24 | protected:
|
---|
25 |
|
---|
26 | static const Int_t fgPulserFrequency;
|
---|
27 |
|
---|
28 | Int_t fPixId;
|
---|
29 |
|
---|
30 | TH1F fHAbsTime; // Histogram to hold the absolute arrival times in number of FADC slices
|
---|
31 |
|
---|
32 | Int_t fChargeNbins;
|
---|
33 | Axis_t fChargeFirst;
|
---|
34 | Axis_t fChargeLast;
|
---|
35 |
|
---|
36 | Int_t fAbsTimeNbins;
|
---|
37 | Axis_t fAbsTimeFirst;
|
---|
38 | Axis_t fAbsTimeLast;
|
---|
39 |
|
---|
40 | Int_t fPickupLimit; // The limit in number of sigmas from the fitted mean above which events are considered as pickup
|
---|
41 |
|
---|
42 | Int_t fSaturated;
|
---|
43 | Int_t fPickup;
|
---|
44 |
|
---|
45 | public:
|
---|
46 |
|
---|
47 | MHCalibrationChargePix(const char *name=NULL, const char *title=NULL);
|
---|
48 | ~MHCalibrationChargePix() {}
|
---|
49 |
|
---|
50 | virtual void Clear(Option_t *o="");
|
---|
51 | virtual void Reset();
|
---|
52 | virtual void Init();
|
---|
53 | virtual void ChangeHistId(Int_t i);
|
---|
54 |
|
---|
55 | // Setters
|
---|
56 | virtual void SetChargeNbins(const Int_t bins =fgChargeNbins) { fChargeNbins = bins; }
|
---|
57 | virtual void SetChargeFirst(const Axis_t first=fgChargeFirst) { fChargeFirst = first; }
|
---|
58 | virtual void SetChargeLast( const Axis_t last =fgChargeLast) { fChargeLast = last; }
|
---|
59 |
|
---|
60 | virtual void SetAbsTimeNbins(const Int_t bins =fgAbsTimeNbins) { fAbsTimeNbins = bins; }
|
---|
61 | virtual void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst) { fAbsTimeFirst = first; }
|
---|
62 | virtual void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; }
|
---|
63 |
|
---|
64 | virtual void SetPickupLimit( const Int_t lim =fgPickupLimit) { fPickupLimit = lim; }
|
---|
65 |
|
---|
66 | void SetPulserFrequency(Float_t f=fgPulserFrequency);
|
---|
67 |
|
---|
68 | void SetSaturated (const Int_t i) { fSaturated += i; }
|
---|
69 |
|
---|
70 | // Getters
|
---|
71 | TH1F *GetHAbsTime() { return &fHAbsTime; }
|
---|
72 | const TH1F *GetHAbsTime() const { return &fHAbsTime; }
|
---|
73 |
|
---|
74 | const Float_t GetIntegral() const;
|
---|
75 |
|
---|
76 | const Float_t GetAbsTimeMean() const;
|
---|
77 | const Float_t GetAbsTimeRms() const;
|
---|
78 |
|
---|
79 | const Int_t GetSaturated() const { return fSaturated; }
|
---|
80 | const Int_t GetPickup() const { return fPickup; }
|
---|
81 |
|
---|
82 | // Fill histos
|
---|
83 | Bool_t FillAbsTime(const Float_t t);
|
---|
84 |
|
---|
85 | // Fits
|
---|
86 | void BypassFit();
|
---|
87 | Bool_t RepeatFit(const Option_t *option="RQ0");
|
---|
88 |
|
---|
89 | // Draws
|
---|
90 | virtual void Draw(Option_t *opt="");
|
---|
91 |
|
---|
92 | // Miscelleaneous
|
---|
93 | void CountPickup();
|
---|
94 |
|
---|
95 | ClassDef(MHCalibrationChargePix, 1) // Base class for charge calibrated pixel
|
---|
96 | };
|
---|
97 |
|
---|
98 | #endif
|
---|