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; // Default for fChargeNBins (now set to: 2000 )
|
---|
15 | static const Axis_t fgChargeFirst; // Default for fChargeFirst (now set to: -0.5 )
|
---|
16 | static const Axis_t fgChargeLast; // Default for fChargeLast (now set to: 1999.5)
|
---|
17 | static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins (now set to: 15 )
|
---|
18 | static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst (now set to: -0.5 )
|
---|
19 | static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast (now set to: 14.5 )
|
---|
20 | static const Float_t fgPickupLimit; // Default for fPickupLimit (now set to: 5. )
|
---|
21 |
|
---|
22 | protected:
|
---|
23 |
|
---|
24 | Int_t fPixId; // The pixel ID
|
---|
25 |
|
---|
26 | TH1F fHAbsTime; // Histogram containing the absolute arrival times
|
---|
27 |
|
---|
28 | Int_t fChargeNbins; // Number of bins used for the fHGausHist
|
---|
29 | Axis_t fChargeFirst; // Lower bound bin used for the fHGausHist
|
---|
30 | Axis_t fChargeLast; // Upper bound bin used for the fHGausHist
|
---|
31 |
|
---|
32 | Int_t fAbsTimeNbins; // Number of bins used for the fHAbsTime
|
---|
33 | Axis_t fAbsTimeFirst; // Lower bound bin used for the fHAbsTime
|
---|
34 | Axis_t fAbsTimeLast; // Upper bound bin used for the fHAbsTime
|
---|
35 |
|
---|
36 | Float_t fPickupLimit; // Upper number of sigmas from the fitted mean above which events are considered as pickup
|
---|
37 |
|
---|
38 | Float_t fSaturated; // Number of events classified as saturated
|
---|
39 | Float_t fPickup; // Number of events classified as pick-up
|
---|
40 |
|
---|
41 | Byte_t fFlags; // Bit-field for the flags
|
---|
42 | enum { kExcluded }; // Possible bits to be set
|
---|
43 |
|
---|
44 | public:
|
---|
45 |
|
---|
46 | MHCalibrationChargePix(const char *name=NULL, const char *title=NULL);
|
---|
47 | ~MHCalibrationChargePix() {}
|
---|
48 |
|
---|
49 | virtual void Clear(Option_t *o="");
|
---|
50 | virtual void Reset();
|
---|
51 | virtual void Init();
|
---|
52 | virtual void ChangeHistId(Int_t i);
|
---|
53 |
|
---|
54 | // Setters
|
---|
55 | virtual void SetChargeNbins(const Int_t bins =fgChargeNbins) { fChargeNbins = bins; }
|
---|
56 | virtual void SetChargeFirst(const Axis_t first=fgChargeFirst) { fChargeFirst = first; }
|
---|
57 | virtual void SetChargeLast( const Axis_t last =fgChargeLast) { fChargeLast = last; }
|
---|
58 |
|
---|
59 | virtual void SetAbsTimeNbins(const Int_t bins =fgAbsTimeNbins) { fAbsTimeNbins = bins; }
|
---|
60 | virtual void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst) { fAbsTimeFirst = first; }
|
---|
61 | virtual void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; }
|
---|
62 |
|
---|
63 | virtual void SetPickupLimit( const Float_t lim =fgPickupLimit) { fPickupLimit = lim; }
|
---|
64 |
|
---|
65 | void SetSaturated ( const Float_t f ) { fSaturated += f; }
|
---|
66 | void SetExcluded ( const Bool_t b=kTRUE );
|
---|
67 |
|
---|
68 | // Getters
|
---|
69 | TH1F *GetHAbsTime() { return &fHAbsTime; }
|
---|
70 | const TH1F *GetHAbsTime() const { return &fHAbsTime; }
|
---|
71 |
|
---|
72 | const Float_t GetIntegral() const;
|
---|
73 |
|
---|
74 | const Float_t GetAbsTimeMean( ) const;
|
---|
75 | const Float_t GetAbsTimeRms() const;
|
---|
76 |
|
---|
77 | const Float_t GetSaturated() const { return fSaturated; }
|
---|
78 | const Float_t GetPickup() const { return fPickup; }
|
---|
79 |
|
---|
80 | const Bool_t IsExcluded() const;
|
---|
81 |
|
---|
82 | // Fill histos
|
---|
83 | Bool_t FillAbsTime(const Float_t t);
|
---|
84 |
|
---|
85 | // Fits
|
---|
86 | Bool_t RepeatFit(const Option_t *option="RQ0");
|
---|
87 |
|
---|
88 | // Draws
|
---|
89 | virtual void Draw(Option_t *opt="");
|
---|
90 |
|
---|
91 | // Miscelleaneous
|
---|
92 | void CountPickup();
|
---|
93 |
|
---|
94 | ClassDef(MHCalibrationChargePix, 1) // Base Histogram class for a Charge Calibration Pixel
|
---|
95 | };
|
---|
96 |
|
---|
97 | #endif
|
---|