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

Last change on this file since 3492 was 3428, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.9 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 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 Float_t fPickupLimit; // The limit in number of sigmas from the fitted mean above which events are considered as pickup
41
42 Float_t fSaturated;
43 Float_t fPickup;
44
45 Byte_t fFlags;
46 enum { kExcluded };
47
48public:
49
50 MHCalibrationChargePix(const char *name=NULL, const char *title=NULL);
51 ~MHCalibrationChargePix() {}
52
53 virtual void Clear(Option_t *o="");
54 virtual void Reset();
55 virtual void Init();
56 virtual void ChangeHistId(Int_t i);
57
58 // Setters
59 virtual void SetChargeNbins(const Int_t bins =fgChargeNbins) { fChargeNbins = bins; }
60 virtual void SetChargeFirst(const Axis_t first=fgChargeFirst) { fChargeFirst = first; }
61 virtual void SetChargeLast( const Axis_t last =fgChargeLast) { fChargeLast = last; }
62
63 virtual void SetAbsTimeNbins(const Int_t bins =fgAbsTimeNbins) { fAbsTimeNbins = bins; }
64 virtual void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst) { fAbsTimeFirst = first; }
65 virtual void SetAbsTimeLast( const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; }
66
67 virtual void SetPickupLimit( const Float_t lim =fgPickupLimit) { fPickupLimit = lim; }
68
69 void SetPulserFrequency(Float_t f=fgPulserFrequency);
70
71 void SetSaturated ( const Float_t f ) { fSaturated += f; }
72 void SetExcluded ( const Bool_t b=kTRUE );
73
74 // Getters
75 TH1F *GetHAbsTime() { return &fHAbsTime; }
76 const TH1F *GetHAbsTime() const { return &fHAbsTime; }
77
78 const Float_t GetIntegral() const;
79
80 const Float_t GetAbsTimeMean() const;
81 const Float_t GetAbsTimeRms() const;
82
83 const Float_t GetSaturated() const { return fSaturated; }
84 const Float_t GetPickup() const { return fPickup; }
85
86 Bool_t IsExcluded() const;
87
88 // Fill histos
89 Bool_t FillAbsTime(const Float_t t);
90
91 // Fits
92 void BypassFit();
93 Bool_t RepeatFit(const Option_t *option="RQ0");
94
95 // Draws
96 virtual void Draw(Option_t *opt="");
97
98 // Miscelleaneous
99 void CountPickup();
100
101 ClassDef(MHCalibrationChargePix, 1) // Base class for charge calibrated pixel
102};
103
104#endif
Note: See TracBrowser for help on using the repository browser.