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 | protected:
|
---|
23 |
|
---|
24 | static const Int_t fgPulserFrequency;
|
---|
25 |
|
---|
26 | Int_t fPixId;
|
---|
27 |
|
---|
28 | TH1F fHAbsTime; // Histogram to hold the absolute arrival times in number of FADC slices
|
---|
29 |
|
---|
30 | Int_t fChargeNbins;
|
---|
31 | Axis_t fChargeFirst;
|
---|
32 | Axis_t fChargeLast;
|
---|
33 |
|
---|
34 | Int_t fAbsTimeNbins;
|
---|
35 | Axis_t fAbsTimeFirst;
|
---|
36 | Axis_t fAbsTimeLast;
|
---|
37 |
|
---|
38 | enum { kMeanTimeInFirstBin, kMeanTimeInLastBin }; // Bits to hold information about arrival time results
|
---|
39 |
|
---|
40 | Byte_t fFlags; // Byte to hold the arrival time results
|
---|
41 |
|
---|
42 | public:
|
---|
43 |
|
---|
44 | MHCalibrationChargePix(const char *name=NULL, const char *title=NULL);
|
---|
45 | ~MHCalibrationChargePix() {}
|
---|
46 |
|
---|
47 | virtual void Clear(Option_t *o="");
|
---|
48 | virtual void Reset();
|
---|
49 | virtual void Init();
|
---|
50 |
|
---|
51 | // Setters
|
---|
52 | virtual void SetChargeNbins(const Int_t bins =fgChargeNbins) { fChargeNbins = bins; }
|
---|
53 | virtual void SetChargeFirst(const Axis_t first=fgChargeFirst) { fChargeFirst = first; }
|
---|
54 | virtual void SetChargeLast( const Axis_t last =fgChargeLast) { fChargeLast = last; }
|
---|
55 |
|
---|
56 | virtual void SetAbsTimeNbins(const Int_t bins =fgAbsTimeNbins) { fAbsTimeNbins = bins; }
|
---|
57 | virtual void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst) { fAbsTimeFirst = first; }
|
---|
58 | virtual void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; }
|
---|
59 |
|
---|
60 | void SetPulserFrequency(Float_t f=fgPulserFrequency);
|
---|
61 |
|
---|
62 | // Setters ONLY for MC:
|
---|
63 | void SetMeanTimeInFirstBin(const Bool_t b);
|
---|
64 | void SetMeanTimeInLastBin( const Bool_t b);
|
---|
65 |
|
---|
66 | // Getters
|
---|
67 | TH1F *GetHAbsTime() { return &fHAbsTime; }
|
---|
68 | const TH1F *GetHAbsTime() const { return &fHAbsTime; }
|
---|
69 |
|
---|
70 | const Float_t GetIntegral() const;
|
---|
71 |
|
---|
72 | const Float_t GetAbsTimeMean() const;
|
---|
73 | const Float_t GetAbsTimeRms() const;
|
---|
74 |
|
---|
75 | const Bool_t IsMeanTimeInFirstBin() const;
|
---|
76 | const Bool_t IsMeanTimeInLastBin() const;
|
---|
77 |
|
---|
78 | void ChangeHistId(Int_t i);
|
---|
79 |
|
---|
80 | // Fill histos
|
---|
81 | Bool_t FillAbsTime(const Float_t t);
|
---|
82 |
|
---|
83 | // Fits
|
---|
84 | void BypassFit();
|
---|
85 |
|
---|
86 | // Draws
|
---|
87 | virtual void Draw(Option_t *opt="");
|
---|
88 |
|
---|
89 | ClassDef(MHCalibrationChargePix, 1) // Base class for charge calibrated pixel
|
---|
90 | };
|
---|
91 |
|
---|
92 | #endif
|
---|