1 | #ifndef MARS_MCalibrationPix
|
---|
2 | #define MARS_MCalibrationPix
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MCalibrationPix : public MParContainer
|
---|
9 | {
|
---|
10 | protected:
|
---|
11 |
|
---|
12 | Int_t fPixId; // the pixel Id
|
---|
13 |
|
---|
14 | UInt_t fFlags; // Flag for the set bits
|
---|
15 |
|
---|
16 | Float_t fHiGainMean; // Mean from fit to high gain values
|
---|
17 | Float_t fHiGainMeanVar; // Error of mean from fit to high gain values
|
---|
18 | Float_t fHiGainSigma; // Sigma from fit to high gain values
|
---|
19 | Float_t fHiGainSigmaVar; // Error of sigma from fit to high gain values
|
---|
20 | Float_t fHiGainProb; // Probability of fit to high gain values
|
---|
21 | Float_t fHiGainNumPickup; // Number of pickup events in high-gain
|
---|
22 |
|
---|
23 | Float_t fLoGainMean; // Mean from fit to high gain values
|
---|
24 | Float_t fLoGainMeanVar; // Error of mean from fit to low gain values
|
---|
25 | Float_t fLoGainSigma; // Sigma of from fit to low gain values
|
---|
26 | Float_t fLoGainSigmaVar; // Error of sigma from fit to low gain values
|
---|
27 | Float_t fLoGainProb; // Probability of fit to low gain values
|
---|
28 | Float_t fLoGainNumPickup; // Number of pickup events in low-gain
|
---|
29 |
|
---|
30 | enum { kHiGainSaturation, kExcluded, kValid };
|
---|
31 |
|
---|
32 | public:
|
---|
33 |
|
---|
34 | MCalibrationPix(const char *name=NULL, const char *title=NULL);
|
---|
35 | ~MCalibrationPix() {}
|
---|
36 |
|
---|
37 | virtual void Clear(Option_t *o="");
|
---|
38 |
|
---|
39 | // Setter
|
---|
40 | void SetPixId( const Int_t i ) { fPixId = i; }
|
---|
41 |
|
---|
42 | void SetHiGainMean ( const Float_t f ) { fHiGainMean = f; }
|
---|
43 | void SetHiGainMeanErr ( const Float_t f ) { fHiGainMeanVar = f*f; }
|
---|
44 | void SetHiGainProb ( const Float_t f ) { fHiGainProb = f; }
|
---|
45 | void SetHiGainSigma ( const Float_t f ) { fHiGainSigma = f; }
|
---|
46 | void SetHiGainSigmaErr ( const Float_t f ) { fHiGainSigmaVar = f*f; }
|
---|
47 | void SetHiGainNumPickup ( const Float_t f ) { fHiGainNumPickup = f; }
|
---|
48 |
|
---|
49 | void SetLoGainMean ( const Float_t f ) { fLoGainMean = f; }
|
---|
50 | void SetLoGainMeanErr ( const Float_t f ) { fLoGainMeanVar = f*f; }
|
---|
51 | void SetLoGainProb ( const Float_t f ) { fLoGainProb = f; }
|
---|
52 | void SetLoGainSigma ( const Float_t f ) { fLoGainSigma = f; }
|
---|
53 | void SetLoGainSigmaErr ( const Float_t f ) { fLoGainSigmaVar = f*f; }
|
---|
54 | void SetLoGainNumPickup ( const Float_t f ) { fLoGainNumPickup = f; }
|
---|
55 |
|
---|
56 | void SetMean ( const Float_t f ) { IsHiGainSaturation() ? fLoGainMean = f : fHiGainMean = f ; }
|
---|
57 | void SetMeanErr ( const Float_t f ) { IsHiGainSaturation() ? fLoGainMeanVar = f*f : fHiGainMeanVar = f*f ; }
|
---|
58 | void SetProb ( const Float_t f ) { IsHiGainSaturation() ? fLoGainProb = f : fHiGainProb = f ; }
|
---|
59 | void SetSigma ( const Float_t f ) { IsHiGainSaturation() ? fLoGainSigma = f : fHiGainSigma = f ; }
|
---|
60 | void SetSigmaErr ( const Float_t f ) { IsHiGainSaturation() ? fLoGainSigmaVar = f*f : fHiGainSigmaVar = f*f; }
|
---|
61 | void SetNumPickup ( const Float_t f ) { IsHiGainSaturation() ? fLoGainNumPickup = f : fHiGainNumPickup = f ; }
|
---|
62 |
|
---|
63 | void SetExcluded ( const Bool_t b = kTRUE );
|
---|
64 | void SetHiGainSaturation( const Bool_t b = kTRUE );
|
---|
65 | void SetValid ( const Bool_t b = kTRUE );
|
---|
66 |
|
---|
67 | // Getters
|
---|
68 | Float_t GetHiGainMean () const { return fHiGainMean ; }
|
---|
69 | Float_t GetHiGainMeanErr () const;
|
---|
70 | Float_t GetHiGainProb () const { return fHiGainProb ; }
|
---|
71 | Float_t GetHiGainSigma () const { return fHiGainSigma ; }
|
---|
72 | Float_t GetHiGainSigmaErr () const;
|
---|
73 | Float_t GetHiGainNumPickup() const { return fHiGainNumPickup; }
|
---|
74 |
|
---|
75 | virtual Float_t GetLoGainMean () const { return fLoGainMean ; }
|
---|
76 | virtual Float_t GetLoGainMeanErr () const;
|
---|
77 | virtual Float_t GetLoGainProb () const { return fLoGainProb ; }
|
---|
78 | virtual Float_t GetLoGainSigma () const { return fLoGainSigma ; }
|
---|
79 | virtual Float_t GetLoGainSigmaErr () const;
|
---|
80 | virtual Float_t GetLoGainNumPickup() const { return fLoGainNumPickup; }
|
---|
81 |
|
---|
82 | Float_t GetMean () const { return IsHiGainSaturation() ? GetLoGainMean() : GetHiGainMean() ; }
|
---|
83 | Float_t GetMeanErr () const { return IsHiGainSaturation() ? GetLoGainMeanErr() : GetHiGainMeanErr() ; }
|
---|
84 | Float_t GetProb () const { return IsHiGainSaturation() ? GetLoGainProb() : GetHiGainProb() ; }
|
---|
85 | Float_t GetSigma () const { return IsHiGainSaturation() ? GetLoGainSigma() : GetHiGainSigma() ; }
|
---|
86 | Float_t GetSigmaErr () const { return IsHiGainSaturation() ? GetLoGainSigmaErr() : GetHiGainSigmaErr() ; }
|
---|
87 | Float_t GetNumPickup () const { return IsHiGainSaturation() ? GetLoGainNumPickup() : GetHiGainNumPickup(); }
|
---|
88 |
|
---|
89 | Int_t GetPixId () const { return fPixId ; }
|
---|
90 |
|
---|
91 | Bool_t IsHiGainSaturation() const;
|
---|
92 | Bool_t IsExcluded() const;
|
---|
93 | Bool_t IsValid () const;
|
---|
94 |
|
---|
95 | ClassDef(MCalibrationPix, 1) // Base Container for Calibration Results Pixel
|
---|
96 | };
|
---|
97 |
|
---|
98 | #endif
|
---|
99 |
|
---|