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

Last change on this file since 6242 was 5412, checked in by gaug, 20 years ago
*** empty log message ***
File size: 11.7 KB
Line 
1#ifndef MARS_MCalibrationQEPix
2#define MARS_MCalibrationQEPix
3
4#ifndef MARS_MCalibrationPix
5#include "MCalibrationPix.h"
6#endif
7
8#ifndef MARS_MArrayF
9#include "MArrayF.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 MArrayF fQEBlindPixel; // Calibrated QEs (Blind Pixel Method)
44 MArrayF fQEBlindPixelVar; // Variance cal. QEs (Blind Pixel Method)
45 MArrayF fQECombined; // Calibrated QEs (Combined Method)
46 MArrayF fQECombinedVar; // Variance cal. QEs (Combined Method)
47 MArrayF fQEFFactor; // Calibrated QEs (F-Factor Method)
48 MArrayF fQEFFactorVar; // Variance cal. QEs (F-Factor Method)
49 MArrayF fQEPINDiode; // Calibrated QEs (PIN Diode Method)
50 MArrayF 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 AddAverageFFactorQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
72 void AddAveragePINDiodeQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
73
74 const Float_t GetAvNormBlindPixelRelVar() const;
75 const Float_t GetAvNormCombinedRelVar() const;
76 const Float_t GetAvNormFFactorRelVar() const;
77 const Float_t GetAvNormPINDiodeRelVar() const;
78
79public:
80
81 static const Float_t gkDefaultAverageQE; //! Default QE folded into Cascade spectrum (now set to: 0.18)
82 static const Float_t gkDefaultAverageQEErr; //! Uncertainty Def. QE Cascade spectrum (now set to: 0.02)
83
84 MCalibrationQEPix(const char *name=NULL, const char *title=NULL);
85 ~MCalibrationQEPix() {}
86
87 void Clear(Option_t *o="");
88 void Copy (TObject& object) const;
89
90 // Getters
91 const Float_t GetAverageQE ( const Float_t zenith=0. ) const;
92 const Float_t GetAverageQERelVar( const Float_t zenith=0. ) const;
93
94 Float_t GetDefaultQE ( const MCalibrationCam::PulserColor_t col ) const;
95 Float_t GetDefaultQERelVar ( const MCalibrationCam::PulserColor_t col ) const;
96 Float_t GetLightGuidesEff ( const MCalibrationCam::PulserColor_t col ) const;
97 Float_t GetLightGuidesEffRelVar ( const MCalibrationCam::PulserColor_t col ) const;
98 Float_t GetLightGuidesEff ( const Float_t zenith=0.) const;
99 Float_t GetLightGuidesEffRelVar ( const Float_t zenith=0.) const;
100 Float_t GetQEBlindPixel ( const MCalibrationCam::PulserColor_t col ) const;
101 Float_t GetQEBlindPixelErr ( const MCalibrationCam::PulserColor_t col ) const;
102 Float_t GetQEBlindPixelRelVar ( const MCalibrationCam::PulserColor_t col ) const;
103 Float_t GetQECascadesBlindPixel ( const Float_t zenith=0.) const;
104 Float_t GetQECascadesBlindPixelErr ( const Float_t zenith=0.) const;
105 Float_t GetQECascadesBlindPixelVar ( const Float_t zenith=0.) const;
106 Float_t GetQECascadesCombined ( const Float_t zenith=0.) const;
107 Float_t GetQECascadesCombinedErr ( const Float_t zenith=0.) const;
108 Float_t GetQECascadesCombinedVar ( const Float_t zenith=0.) const;
109 Float_t GetQECascadesFFactor ( const Float_t zenith=0.) const;
110 Float_t GetQECascadesFFactorErr ( const Float_t zenith=0 ) const;
111 Float_t GetQECascadesFFactorVar ( const Float_t zenith=0 ) const;
112 Float_t GetQECascadesPINDiode ( const Float_t zenith=0.) const;
113 Float_t GetQECascadesPINDiodeErr ( const Float_t zenith=0.) const;
114 Float_t GetQECascadesPINDiodeVar ( const Float_t zenith=0.) const;
115 Float_t GetQECombined ( const MCalibrationCam::PulserColor_t col ) const;
116 Float_t GetQECombinedErr ( const MCalibrationCam::PulserColor_t col ) const;
117 Float_t GetQECombinedRelVar ( const MCalibrationCam::PulserColor_t col ) const;
118 Float_t GetQEFFactor ( const MCalibrationCam::PulserColor_t col ) const;
119 Float_t GetQEFFactorErr ( const MCalibrationCam::PulserColor_t col ) const;
120 Float_t GetQEFFactorRelVar ( const MCalibrationCam::PulserColor_t col ) const;
121 Float_t GetQEPINDiode ( const MCalibrationCam::PulserColor_t col ) const;
122 Float_t GetQEPINDiodeErr ( const MCalibrationCam::PulserColor_t col ) const;
123 Float_t GetQEPINDiodeRelVar ( const MCalibrationCam::PulserColor_t col ) const;
124 Float_t GetPMTCollectionEff() const;
125 Float_t GetPMTCollectionEffRelVar() const;
126
127 Bool_t IsAverageQEBlindPixelAvailable () const;
128 Bool_t IsAverageQECombinedAvailable () const;
129 Bool_t IsAverageQEFFactorAvailable () const;
130 Bool_t IsAverageQEPINDiodeAvailable () const;
131 Bool_t IsBlindPixelMethodValid () const;
132 Bool_t IsBlindPixelMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
133 Bool_t IsCombinedMethodValid () const;
134 Bool_t IsCombinedMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
135 Bool_t IsFFactorMethodValid () const;
136 Bool_t IsFFactorMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
137 Bool_t IsPINDiodeMethodValid () const;
138 Bool_t IsPINDiodeMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
139
140 // Setters
141 void SetAverageQE ( const Float_t f ) { fAverageQE = f; }
142 void SetAvNormBlindPixel ( const Float_t f ) { fAvNormBlindPixel = f; }
143 void SetAvNormBlindPixelVar ( const Float_t f ) { fAvNormBlindPixelVar = f; }
144 void SetAvNormCombined ( const Float_t f ) { fAvNormCombined = f; }
145 void SetAvNormCombinedVar ( const Float_t f ) { fAvNormCombinedVar = f; }
146 void SetAvNormFFactor ( const Float_t f ) { fAvNormFFactor = f; }
147 void SetAvNormFFactorVar ( const Float_t f ) { fAvNormFFactorVar = f; }
148 void SetAvNormPINDiode ( const Float_t f ) { fAvNormPINDiode = f; }
149 void SetAvNormPINDiodeVar ( const Float_t f ) { fAvNormPINDiodeVar = f; }
150 void SetAverageQEBlindPixelAvailable ( const Bool_t b=kTRUE );
151 void SetAverageQECombinedAvailable ( const Bool_t b=kTRUE );
152 void SetAverageQEFFactorAvailable ( const Bool_t b=kTRUE );
153 void SetAverageQEPINDiodeAvailable ( const Bool_t b=kTRUE );
154 void SetBlindPixelMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
155 void SetCombinedMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
156 void SetFFactorMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
157 void SetPINDiodeMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
158 void SetQEBlindPixel ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEBlindPixel [col] = f; }
159 void SetQEBlindPixelVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEBlindPixelVar[col] = f; }
160 void SetQECombined ( Float_t f, MCalibrationCam::PulserColor_t col) { fQECombined [col] = f; }
161 void SetQECombinedVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQECombinedVar [col] = f; }
162 void SetQEFFactor ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEFFactor [col] = f; }
163 void SetQEFFactorVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEFFactorVar [col] = f; }
164 void SetQEPINDiode ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEPINDiode [col] = f; }
165 void SetQEPINDiodeVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEPINDiodeVar [col] = f; }
166
167 // Updates
168 Bool_t UpdateBlindPixelMethod( const Float_t plex );
169 Bool_t UpdateCombinedMethod ();
170 Bool_t UpdateFFactorMethod ( const Float_t plex );
171 Bool_t UpdatePINDiodeMethod ();
172
173 ClassDef(MCalibrationQEPix, 3) // Container Quantum Efficieny Calibration Results Pixel
174};
175
176#endif
177
Note: See TracBrowser for help on using the repository browser.