source: trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.h@ 3609

Last change on this file since 3609 was 3609, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.8 KB
Line 
1#ifndef MARS_MHCalibrationChargePix
2#define MARS_MHCalibrationChargePix
3
4#ifndef MARS_MHGausEvents
5#include "MHGausEvents.h"
6#endif
7
8class TH1F;
9class MHCalibrationChargePix : public MHGausEvents
10{
11
12private:
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 Float_t fgPickupLimit;
23
24protected:
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 Float_t fPickupLimit; // The limit in number of sigmas from the fitted mean above which events are considered as pickup
39
40 Float_t fSaturated;
41 Float_t fPickup;
42
43 Byte_t fFlags;
44 enum { kExcluded };
45
46public:
47
48 MHCalibrationChargePix(const char *name=NULL, const char *title=NULL);
49 ~MHCalibrationChargePix() {}
50
51 virtual void Clear(Option_t *o="");
52 virtual void Reset();
53 virtual void Init();
54 virtual void ChangeHistId(Int_t i);
55
56 // Setters
57 virtual void SetChargeNbins(const Int_t bins =fgChargeNbins) { fChargeNbins = bins; }
58 virtual void SetChargeFirst(const Axis_t first=fgChargeFirst) { fChargeFirst = first; }
59 virtual void SetChargeLast( const Axis_t last =fgChargeLast) { fChargeLast = last; }
60
61 virtual void SetAbsTimeNbins(const Int_t bins =fgAbsTimeNbins) { fAbsTimeNbins = bins; }
62 virtual void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst) { fAbsTimeFirst = first; }
63 virtual void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; }
64
65 virtual void SetPickupLimit( const Float_t lim =fgPickupLimit) { fPickupLimit = lim; }
66
67 void SetSaturated ( const Float_t f ) { fSaturated += f; }
68 void SetExcluded ( const Bool_t b=kTRUE );
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 Float_t GetSaturated() const { return fSaturated; }
80 const Float_t GetPickup() const { return fPickup; }
81
82 Bool_t IsExcluded() const;
83
84 // Fill histos
85 Bool_t FillAbsTime(const Float_t t);
86
87 // Fits
88 void BypassFit();
89 Bool_t RepeatFit(const Option_t *option="RQ0");
90
91 // Draws
92 virtual void Draw(Option_t *opt="");
93
94 // Miscelleaneous
95 void CountPickup();
96
97 ClassDef(MHCalibrationChargePix, 1) // Base class for charge calibrated pixel
98};
99
100#endif
Note: See TracBrowser for help on using the repository browser.