source: trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h@ 4692

Last change on this file since 4692 was 4241, checked in by gaug, 20 years ago
*** empty log message ***
File size: 11.8 KB
Line 
1#ifndef MARS_MCalibrationQEPix
2#define MARS_MCalibrationQEPix
3
4#ifndef MARS_MCalibrationPix
5#include "MCalibrationPix.h"
6#endif
7
8#ifndef ROOT_TArrayF
9#include "TArrayF.h"
10#endif
11
12#ifndef ROOT_TArrayC
13#include "TArrayC.h"
14#endif
15
16#ifndef MARS_MCalibrationCam
17#include "MCalibrationCam.h"
18#endif
19
20class MCalibrationQEPix : public MCalibrationPix
21{
22private:
23
24 static const Float_t gkDefaultQEGreen; //! Default QE at 520 nm (now set to: 0.192)
25 static const Float_t gkDefaultQEBlue; //! Default QE at 460 nm (now set to: 0.27 )
26 static const Float_t gkDefaultQEUV; //! Default QE at 370 nm (now set to: 0.285)
27 static const Float_t gkDefaultQECT1; //! Default QE at 370 nm (now set to: 0.285)
28 static const Float_t gkDefaultQEGreenErr; //! Uncertainty Def. QE at 520 nm (now set to: 0.05)
29 static const Float_t gkDefaultQEBlueErr; //! Uncertainty Def. QE at 460 nm (now set to: 0.07)
30 static const Float_t gkDefaultQEUVErr; //! Uncertainty Def. QE at 370 nm (now set to: 0.07)
31 static const Float_t gkDefaultQECT1Err; //! Uncertainty Def. QE at 370 nm (now set to: 0.07)
32 static const Float_t gkLightGuidesEffGreen; //! Default Light guides efficiency at 520 nm
33 static const Float_t gkLightGuidesEffGreenErr; //! Uncertainty Def. Light guides efficiency at 520 nm
34 static const Float_t gkLightGuidesEffBlue; //! Default Light guides efficiency at 460 nm
35 static const Float_t gkLightGuidesEffBlueErr; //! Uncertainty Def. Light guides efficiency at 460 nm
36 static const Float_t gkLightGuidesEffUV; //! Default Light guides efficiency at 370 nm
37 static const Float_t gkLightGuidesEffUVErr; //! Uncertainty Def. Light guides efficiency at 370 nm
38 static const Float_t gkLightGuidesEffCT1; //! Default Light guides efficiency at 370 nm
39 static const Float_t gkLightGuidesEffCT1Err; //! Uncertainty Def. Light guides efficiency at 370 nm
40 static const Float_t gkPMTCollectionEff; //! Default Collection efficiency of the PMTs
41 static const Float_t gkPMTCollectionEffErr; //! Uncertainty Def. Collection efficiency of the PMTs (0.01)
42
43 TArrayF fQEBlindPixel; // Calibrated QEs (Blind Pixel Method)
44 TArrayF fQEBlindPixelVar; // Variance cal. QEs (Blind Pixel Method)
45 TArrayF fQECombined; // Calibrated QEs (Combined Method)
46 TArrayF fQECombinedVar; // Variance cal. QEs (Combined Method)
47 TArrayF fQEFFactor; // Calibrated QEs (F-Factor Method)
48 TArrayF fQEFFactorVar; // Variance cal. QEs (F-Factor Method)
49 TArrayF fQEPINDiode; // Calibrated QEs (PIN Diode Method)
50 TArrayF fQEPINDiodeVar; // Variance cal. QEs (PIN Diode Method)
51
52 Float_t fAvNormBlindPixel; // Normalization w.r.t. default QE (Blind Pixel Method)
53 Float_t fAvNormBlindPixelVar; // Variance norm. w.r.t. def. QE (Blind Pixel Method)
54 Float_t fAvNormCombined; // Normalization w.r.t. default QE (Combined Method)
55 Float_t fAvNormCombinedVar; // Variance norm. w.r.t. def. QE (Combined Method)
56 Float_t fAvNormFFactor; // Normalization w.r.t. default QE (F-Factor Method)
57 Float_t fAvNormFFactorVar; // Variance norm. w.r.t. def. QE (F-Factor Method)
58 Float_t fAvNormPINDiode; // Normalization w.r.t. default QE (PIN Diode Method)
59 Float_t fAvNormPINDiodeVar; // Variance norm. w.r.t. def. QE (PIN Diode Method)
60 Float_t fAverageQE; // Average QE for Cascade spectrum (default 0.18)
61
62 TArrayC fValidFlags; // Bit-field for valid flags, one array entry for each color
63 Byte_t fAvailableFlags; // Bit-field for available flags
64
65 enum { kBlindPixelMethodValid, kFFactorMethodValid,
66 kPINDiodeMethodValid, kCombinedMethodValid,
67 kAverageQEBlindPixelAvailable, kAverageQEFFactorAvailable,
68 kAverageQEPINDiodeAvailable, kAverageQECombinedAvailable };
69
70 void AddAverageBlindPixelQEs( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
71 void AddAverageCombinedQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
72 void AddAverageFFactorQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
73 void AddAveragePINDiodeQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
74
75 const Float_t GetAvNormBlindPixelRelVar() const;
76 const Float_t GetAvNormCombinedRelVar() const;
77 const Float_t GetAvNormFFactorRelVar() const;
78 const Float_t GetAvNormPINDiodeRelVar() const;
79
80public:
81
82 static const Float_t gkDefaultAverageQE; //! Default QE folded into Cascade spectrum (now set to: 0.18)
83 static const Float_t gkDefaultAverageQEErr; //! Uncertainty Def. QE Cascade spectrum (now set to: 0.02)
84
85 MCalibrationQEPix(const char *name=NULL, const char *title=NULL);
86 ~MCalibrationQEPix() {}
87
88 void Clear(Option_t *o="");
89
90 // Getters
91
92 const Float_t GetAverageQE ( const Float_t zenith=0. ) const;
93 const Float_t GetAverageQERelVar( const Float_t zenith=0. ) const;
94
95 Float_t GetDefaultQE ( const MCalibrationCam::PulserColor_t col ) const;
96 Float_t GetDefaultQERelVar ( const MCalibrationCam::PulserColor_t col ) const;
97 Float_t GetLightGuidesEff ( const MCalibrationCam::PulserColor_t col ) const;
98 Float_t GetLightGuidesEffRelVar ( const MCalibrationCam::PulserColor_t col ) const;
99 Float_t GetLightGuidesEff ( const Float_t zenith=0.) const;
100 Float_t GetLightGuidesEffRelVar ( const Float_t zenith=0.) const;
101 Float_t GetQEBlindPixel ( const MCalibrationCam::PulserColor_t col ) const;
102 Float_t GetQEBlindPixelErr ( const MCalibrationCam::PulserColor_t col ) const;
103 Float_t GetQEBlindPixelRelVar ( const MCalibrationCam::PulserColor_t col ) const;
104 Float_t GetQECascadesBlindPixel ( const Float_t zenith=0.) const;
105 Float_t GetQECascadesBlindPixelErr ( const Float_t zenith=0.) const;
106 Float_t GetQECascadesBlindPixelVar ( const Float_t zenith=0.) const;
107 Float_t GetQECascadesCombined ( const Float_t zenith=0.) const;
108 Float_t GetQECascadesCombinedErr ( const Float_t zenith=0.) const;
109 Float_t GetQECascadesCombinedVar ( const Float_t zenith=0.) const;
110 Float_t GetQECascadesFFactor ( const Float_t zenith=0.) const;
111 Float_t GetQECascadesFFactorErr ( const Float_t zenith=0 ) const;
112 Float_t GetQECascadesFFactorVar ( const Float_t zenith=0 ) const;
113 Float_t GetQECascadesPINDiode ( const Float_t zenith=0.) const;
114 Float_t GetQECascadesPINDiodeErr ( const Float_t zenith=0.) const;
115 Float_t GetQECascadesPINDiodeVar ( const Float_t zenith=0.) const;
116 Float_t GetQECombined ( const MCalibrationCam::PulserColor_t col ) const;
117 Float_t GetQECombinedErr ( const MCalibrationCam::PulserColor_t col ) const;
118 Float_t GetQECombinedRelVar ( const MCalibrationCam::PulserColor_t col ) const;
119 Float_t GetQEFFactor ( const MCalibrationCam::PulserColor_t col ) const;
120 Float_t GetQEFFactorErr ( const MCalibrationCam::PulserColor_t col ) const;
121 Float_t GetQEFFactorRelVar ( const MCalibrationCam::PulserColor_t col ) const;
122 Float_t GetQEPINDiode ( const MCalibrationCam::PulserColor_t col ) const;
123 Float_t GetQEPINDiodeErr ( const MCalibrationCam::PulserColor_t col ) const;
124 Float_t GetQEPINDiodeRelVar ( const MCalibrationCam::PulserColor_t col ) const;
125 Float_t GetPMTCollectionEff() const;
126 Float_t GetPMTCollectionEffRelVar() const;
127
128 Bool_t IsAverageQEBlindPixelAvailable () const;
129 Bool_t IsAverageQECombinedAvailable () const;
130 Bool_t IsAverageQEFFactorAvailable () const;
131 Bool_t IsAverageQEPINDiodeAvailable () const;
132 Bool_t IsBlindPixelMethodValid () const;
133 Bool_t IsBlindPixelMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
134 Bool_t IsCombinedMethodValid () const;
135 Bool_t IsCombinedMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
136 Bool_t IsFFactorMethodValid () const;
137 Bool_t IsFFactorMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
138 Bool_t IsPINDiodeMethodValid () const;
139 Bool_t IsPINDiodeMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
140
141 // Setters
142 void SetAverageQE ( const Float_t f ) { fAverageQE = f; }
143 void SetAvNormBlindPixel ( const Float_t f ) { fAvNormBlindPixel = f; }
144 void SetAvNormBlindPixelVar ( const Float_t f ) { fAvNormBlindPixelVar = f; }
145 void SetAvNormCombined ( const Float_t f ) { fAvNormCombined = f; }
146 void SetAvNormCombinedVar ( const Float_t f ) { fAvNormCombinedVar = f; }
147 void SetAvNormFFactor ( const Float_t f ) { fAvNormFFactor = f; }
148 void SetAvNormFFactorVar ( const Float_t f ) { fAvNormFFactorVar = f; }
149 void SetAvNormPINDiode ( const Float_t f ) { fAvNormPINDiode = f; }
150 void SetAvNormPINDiodeVar ( const Float_t f ) { fAvNormPINDiodeVar = f; }
151 void SetAverageQEBlindPixelAvailable ( const Bool_t b=kTRUE );
152 void SetAverageQECombinedAvailable ( const Bool_t b=kTRUE );
153 void SetAverageQEFFactorAvailable ( const Bool_t b=kTRUE );
154 void SetAverageQEPINDiodeAvailable ( const Bool_t b=kTRUE );
155 void SetBlindPixelMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
156 void SetCombinedMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
157 void SetFFactorMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
158 void SetPINDiodeMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
159 void SetQEBlindPixel ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEBlindPixel [col] = f; }
160 void SetQEBlindPixelVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEBlindPixelVar[col] = f; }
161 void SetQECombined ( Float_t f, MCalibrationCam::PulserColor_t col) { fQECombined [col] = f; }
162 void SetQECombinedVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQECombinedVar [col] = f; }
163 void SetQEFFactor ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEFFactor [col] = f; }
164 void SetQEFFactorVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEFFactorVar [col] = f; }
165 void SetQEPINDiode ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEPINDiode [col] = f; }
166 void SetQEPINDiodeVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEPINDiodeVar [col] = f; }
167
168 // Updates
169 Bool_t UpdateBlindPixelMethod();
170 Bool_t UpdateCombinedMethod ();
171 Bool_t UpdateFFactorMethod ();
172 Bool_t UpdatePINDiodeMethod ();
173
174 ClassDef(MCalibrationQEPix, 3) // Container Quantum Efficieny Calibration Results Pixel
175};
176
177#endif
178
Note: See TracBrowser for help on using the repository browser.