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

Last change on this file since 4693 was 4333, checked in by gaug, 20 years ago
*** empty log message ***
File size: 6.0 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; // Software PixId (needed to get Id in calls to Next())
13 UInt_t fFlags; // Flag for the set bits
14 Float_t fHiGainMean; // Mean from fit to high gain values
15 Float_t fHiGainMeanVar; // Error of mean from fit to high gain values
16 Float_t fHiGainNumBlackout; // Number blackout events in high-gain
17 Float_t fHiGainNumPickup; // Number pickup events in high-gain
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 fLoGainMean; // Mean from fit to high gain values
22 Float_t fLoGainMeanVar; // Error of mean from fit to low gain values
23 Float_t fLoGainNumBlackout; // Number blackout events in low-gain
24 Float_t fLoGainNumPickup; // Number pickup events in low-gain
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
29 enum { kHiGainSaturation, kExcluded, kValid, kDebug }; // Possible bits to be sets
30
31public:
32
33 MCalibrationPix(const char *name=NULL, const char *title=NULL);
34 ~MCalibrationPix() {}
35
36 virtual void Clear(Option_t *o="");
37
38 // Setter
39 void SetPixId( const Int_t i ) { fPixId = i; }
40
41 void SetHiGainMean ( const Float_t f ) { fHiGainMean = f; }
42 void SetHiGainMeanVar ( const Float_t f ) { fHiGainMeanVar = f; }
43 void SetHiGainNumBlackout ( const Float_t f ) { fHiGainNumBlackout = f; }
44 void SetHiGainNumPickup ( const Float_t f ) { fHiGainNumPickup = f; }
45 void SetHiGainProb ( const Float_t f ) { fHiGainProb = f; }
46 void SetHiGainSigma ( const Float_t f ) { fHiGainSigma = f; }
47 void SetHiGainSigmaVar ( const Float_t f ) { fHiGainSigmaVar = f; }
48 void SetLoGainMean ( const Float_t f ) { fLoGainMean = f; }
49 void SetLoGainMeanVar ( const Float_t f ) { fLoGainMeanVar = f; }
50 void SetLoGainNumBlackout ( const Float_t f ) { fLoGainNumBlackout = f; }
51 void SetLoGainNumPickup ( const Float_t f ) { fLoGainNumPickup = f; }
52 void SetLoGainProb ( const Float_t f ) { fLoGainProb = f; }
53 void SetLoGainSigma ( const Float_t f ) { fLoGainSigma = f; }
54 void SetLoGainSigmaVar ( const Float_t f ) { fLoGainSigmaVar = f; }
55 void SetMean ( const Float_t f ) { IsHiGainSaturation() ? fLoGainMean = f : fHiGainMean = f ; }
56 void SetMeanVar ( const Float_t f ) { IsHiGainSaturation() ? fLoGainMeanVar = f : fHiGainMeanVar = f ; }
57 void SetNumBlackout( const Float_t f ) { IsHiGainSaturation() ? fLoGainNumBlackout = f : fHiGainNumBlackout = f ; }
58 void SetNumPickup ( const Float_t f ) { IsHiGainSaturation() ? fLoGainNumPickup = f : fHiGainNumPickup = f ; }
59 void SetProb ( const Float_t f ) { IsHiGainSaturation() ? fLoGainProb = f : fHiGainProb = f ; }
60 void SetSigma ( const Float_t f ) { IsHiGainSaturation() ? fLoGainSigma = f : fHiGainSigma = f ; }
61 void SetSigmaVar ( const Float_t f ) { IsHiGainSaturation() ? fLoGainSigmaVar = f : fHiGainSigmaVar = f ; }
62
63 void SetDebug ( const Bool_t b = kTRUE );
64 void SetExcluded ( const Bool_t b = kTRUE );
65 void SetHiGainSaturation( const Bool_t b = kTRUE );
66 void SetValid ( const Bool_t b = kTRUE );
67
68 // Getters
69 Float_t GetHiGainMean () const { return fHiGainMean ; }
70 Float_t GetHiGainMeanErr () const;
71 Float_t GetHiGainProb () const { return fHiGainProb ; }
72 Float_t GetHiGainSigma () const { return fHiGainSigma ; }
73 Float_t GetHiGainSigmaErr () const;
74 Float_t GetHiGainNumPickup () const { return fHiGainNumPickup; }
75 Float_t GetHiGainNumBlackout() const { return fHiGainNumBlackout; }
76 Float_t GetHiLoMeansDivided () const;
77 Float_t GetHiLoMeansDividedErr () const;
78 Float_t GetHiLoSigmasDivided () const;
79 Float_t GetHiLoSigmasDividedErr () const;
80
81 virtual Float_t GetLoGainMean () const { return fLoGainMean; }
82 virtual Float_t GetLoGainMeanErr () const;
83 virtual Float_t GetLoGainMeanRelVar () const;
84 virtual Float_t GetLoGainProb () const { return fLoGainProb; }
85 virtual Float_t GetLoGainSigma () const { return fLoGainSigma; }
86 virtual Float_t GetLoGainSigmaErr () const;
87 virtual Float_t GetLoGainNumPickup () const { return fLoGainNumPickup; }
88 virtual Float_t GetLoGainNumBlackout() const { return fLoGainNumBlackout; }
89
90 Float_t GetMean () const { return IsHiGainSaturation() ? GetLoGainMean() : GetHiGainMean() ; }
91 Float_t GetMeanErr () const { return IsHiGainSaturation() ? GetLoGainMeanErr() : GetHiGainMeanErr() ; }
92 Float_t GetMeanRelVar () const;
93 Float_t GetMeanSquare () const;
94 Float_t GetProb () const { return IsHiGainSaturation() ? GetLoGainProb() : GetHiGainProb() ; }
95 Float_t GetSigma () const { return IsHiGainSaturation() ? GetLoGainSigma() : GetHiGainSigma() ; }
96 Float_t GetSigmaErr () const { return IsHiGainSaturation() ? GetLoGainSigmaErr() : GetHiGainSigmaErr() ; }
97 Float_t GetSigmaRelVar() const;
98 Float_t GetNumPickup () const { return IsHiGainSaturation() ? GetLoGainNumPickup() : GetHiGainNumPickup(); }
99 Float_t GetNumBlackout() const { return IsHiGainSaturation() ? GetLoGainNumBlackout() : GetHiGainNumBlackout(); }
100 Int_t GetPixId () const { return fPixId ; }
101
102 Bool_t IsHiGainSaturation() const;
103 Bool_t IsDebug () const;
104 Bool_t IsExcluded() const;
105 Bool_t IsValid () const;
106
107 ClassDef(MCalibrationPix, 1) // Base Container for Calibration Results Pixel
108};
109
110#endif
111
Note: See TracBrowser for help on using the repository browser.