source: trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h@ 3671

Last change on this file since 3671 was 3671, checked in by gaug, 21 years ago
*** empty log message ***
File size: 4.7 KB
Line 
1#ifndef MARS_MCalibrationPix
2#define MARS_MCalibrationPix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MCalibrationPix : public MParContainer
9{
10protected:
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
32public:
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 SetHiGainMeanVar ( const Float_t f ) { fHiGainMeanVar = f; }
44 void SetHiGainProb ( const Float_t f ) { fHiGainProb = f; }
45 void SetHiGainSigma ( const Float_t f ) { fHiGainSigma = f; }
46 void SetHiGainSigmaVar ( const Float_t f ) { fHiGainSigmaVar = f; }
47 void SetHiGainNumPickup ( const Float_t f ) { fHiGainNumPickup = f; }
48
49 void SetLoGainMean ( const Float_t f ) { fLoGainMean = f; }
50 void SetLoGainMeanVar ( const Float_t f ) { fLoGainMeanVar = f; }
51 void SetLoGainProb ( const Float_t f ) { fLoGainProb = f; }
52 void SetLoGainSigma ( const Float_t f ) { fLoGainSigma = f; }
53 void SetLoGainSigmaVar ( const Float_t f ) { fLoGainSigmaVar = 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 SetMeanVar ( const Float_t f ) { IsHiGainSaturation() ? fLoGainMeanVar = f : fHiGainMeanVar = 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 SetSigmaVar ( const Float_t f ) { IsHiGainSaturation() ? fLoGainSigmaVar = f : fHiGainSigmaVar = 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 GetMeanRelVar () const;
85 Float_t GetProb () const { return IsHiGainSaturation() ? GetLoGainProb() : GetHiGainProb() ; }
86 Float_t GetSigma () const { return IsHiGainSaturation() ? GetLoGainSigma() : GetHiGainSigma() ; }
87 Float_t GetSigmaErr () const { return IsHiGainSaturation() ? GetLoGainSigmaErr() : GetHiGainSigmaErr() ; }
88 Float_t GetSigmaRelVar() const;
89 Float_t GetNumPickup () const { return IsHiGainSaturation() ? GetLoGainNumPickup() : GetHiGainNumPickup(); }
90
91 Int_t GetPixId () const { return fPixId ; }
92
93 Bool_t IsHiGainSaturation() const;
94 Bool_t IsExcluded() const;
95 Bool_t IsValid () const;
96
97 ClassDef(MCalibrationPix, 1) // Base Container for Calibration Results Pixel
98};
99
100#endif
101
Note: See TracBrowser for help on using the repository browser.