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

Last change on this file since 3839 was 3768, checked in by moralejo, 21 years ago
*** empty log message ***
File size: 10.3 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
33 TArrayF fQEBlindPixel; // Calibrated QEs (Blind Pixel Method)
34 TArrayF fQEBlindPixelVar; // Variance cal. QEs (Blind Pixel Method)
35 TArrayF fQECombined; // Calibrated QEs (Combined Method)
36 TArrayF fQECombinedVar; // Variance cal. QEs (Combined Method)
37 TArrayF fQEFFactor; // Calibrated QEs (F-Factor Method)
38 TArrayF fQEFFactorVar; // Variance cal. QEs (F-Factor Method)
39 TArrayF fQEPINDiode; // Calibrated QEs (PIN Diode Method)
40 TArrayF fQEPINDiodeVar; // Variance cal. QEs (PIN Diode Method)
41
42 Float_t fAvNormBlindPixel; // Normalization w.r.t. default QE (Blind Pixel Method)
43 Float_t fAvNormBlindPixelVar; // Variance norm. w.r.t. def. QE (Blind Pixel Method)
44 Float_t fAvNormCombined; // Normalization w.r.t. default QE (Combined Method)
45 Float_t fAvNormCombinedVar; // Variance norm. w.r.t. def. QE (Combined Method)
46 Float_t fAvNormFFactor; // Normalization w.r.t. default QE (F-Factor Method)
47 Float_t fAvNormFFactorVar; // Variance norm. w.r.t. def. QE (F-Factor Method)
48 Float_t fAvNormPINDiode; // Normalization w.r.t. default QE (PIN Diode Method)
49 Float_t fAvNormPINDiodeVar; // Variance norm. w.r.t. def. QE (PIN Diode Method)
50 Float_t fAverageQE; // Average QE for Cascade spectrum (default 0.18)
51
52 TArrayC fValidFlags; // Bit-field for valid flags, one array entry for each color
53 Byte_t fAvailableFlags; // Bit-field for available flags
54
55 enum { kBlindPixelMethodValid, kFFactorMethodValid,
56 kPINDiodeMethodValid, kCombinedMethodValid,
57 kAverageQEBlindPixelAvailable, kAverageQEFFactorAvailable,
58 kAverageQEPINDiodeAvailable, kAverageQECombinedAvailable };
59
60 void AddAverageBlindPixelQEs( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
61 void AddAverageCombinedQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
62 void AddAverageFFactorQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
63 void AddAveragePINDiodeQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw );
64
65 const Float_t GetAvNormBlindPixelRelVar() const;
66 const Float_t GetAvNormCombinedRelVar() const;
67 const Float_t GetAvNormFFactorRelVar() const;
68 const Float_t GetAvNormPINDiodeRelVar() const;
69
70public:
71
72 static const Float_t gkDefaultAverageQE; //! Default QE folded into Cascade spectrum (now set to: 0.18)
73 static const Float_t gkDefaultAverageQEErr; //! Uncertainty Def. QE Cascade spectrum (now set to: 0.02)
74
75 MCalibrationQEPix(const char *name=NULL, const char *title=NULL);
76 ~MCalibrationQEPix() {}
77
78 void Clear(Option_t *o="");
79
80 // Getters
81
82 const Float_t GetAverageQE ( const Float_t zenith=0. ) const;
83 const Float_t GetAverageQERelVar( const Float_t zenith=0. ) const;
84
85 Float_t GetDefaultQE ( const MCalibrationCam::PulserColor_t col ) const;
86 Float_t GetDefaultQERelVar ( const MCalibrationCam::PulserColor_t col ) const;
87 Float_t GetQEBlindPixel ( const MCalibrationCam::PulserColor_t col ) const;
88 Float_t GetQEBlindPixelErr ( const MCalibrationCam::PulserColor_t col ) const;
89 Float_t GetQEBlindPixelRelVar ( const MCalibrationCam::PulserColor_t col ) const;
90 Float_t GetQECascadesBlindPixel ( const Float_t zenith=0.) const;
91 Float_t GetQECascadesBlindPixelErr ( const Float_t zenith=0.) const;
92 Float_t GetQECascadesBlindPixelVar ( const Float_t zenith=0.) const;
93 Float_t GetQECascadesCombined ( const Float_t zenith=0.) const;
94 Float_t GetQECascadesCombinedErr ( const Float_t zenith=0.) const;
95 Float_t GetQECascadesCombinedVar ( const Float_t zenith=0.) const;
96 Float_t GetQECascadesFFactor ( const Float_t zenith=0.) const;
97 Float_t GetQECascadesFFactorErr ( const Float_t zenith=0 ) const;
98 Float_t GetQECascadesFFactorVar ( const Float_t zenith=0 ) const;
99 Float_t GetQECascadesPINDiode ( const Float_t zenith=0.) const;
100 Float_t GetQECascadesPINDiodeErr ( const Float_t zenith=0.) const;
101 Float_t GetQECascadesPINDiodeVar ( const Float_t zenith=0.) const;
102 Float_t GetQECombined ( const MCalibrationCam::PulserColor_t col ) const;
103 Float_t GetQECombinedErr ( const MCalibrationCam::PulserColor_t col ) const;
104 Float_t GetQECombinedRelVar ( const MCalibrationCam::PulserColor_t col ) const;
105 Float_t GetQEFFactor ( const MCalibrationCam::PulserColor_t col ) const;
106 Float_t GetQEFFactorErr ( const MCalibrationCam::PulserColor_t col ) const;
107 Float_t GetQEFFactorRelVar ( const MCalibrationCam::PulserColor_t col ) const;
108 Float_t GetQEPINDiode ( const MCalibrationCam::PulserColor_t col ) const;
109 Float_t GetQEPINDiodeErr ( const MCalibrationCam::PulserColor_t col ) const;
110 Float_t GetQEPINDiodeRelVar ( const MCalibrationCam::PulserColor_t col ) const;
111
112 Bool_t IsAverageQEBlindPixelAvailable () const;
113 Bool_t IsAverageQECombinedAvailable () const;
114 Bool_t IsAverageQEFFactorAvailable () const;
115 Bool_t IsAverageQEPINDiodeAvailable () const;
116 Bool_t IsBlindPixelMethodValid () const;
117 Bool_t IsBlindPixelMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
118 Bool_t IsCombinedMethodValid () const;
119 Bool_t IsCombinedMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
120 Bool_t IsFFactorMethodValid () const;
121 Bool_t IsFFactorMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
122 Bool_t IsPINDiodeMethodValid () const;
123 Bool_t IsPINDiodeMethodValid ( const MCalibrationCam::PulserColor_t col ) const;
124
125 // Setters
126 void SetAverageQE ( const Float_t f ) { fAverageQE = f; }
127 void SetAvNormBlindPixel ( const Float_t f ) { fAvNormBlindPixel = f; }
128 void SetAvNormBlindPixelVar ( const Float_t f ) { fAvNormBlindPixelVar = f; }
129 void SetAvNormCombined ( const Float_t f ) { fAvNormCombined = f; }
130 void SetAvNormCombinedVar ( const Float_t f ) { fAvNormCombinedVar = f; }
131 void SetAvNormFFactor ( const Float_t f ) { fAvNormFFactor = f; }
132 void SetAvNormFFactorVar ( const Float_t f ) { fAvNormFFactorVar = f; }
133 void SetAvNormPINDiode ( const Float_t f ) { fAvNormPINDiode = f; }
134 void SetAvNormPINDiodeVar ( const Float_t f ) { fAvNormPINDiodeVar = f; }
135 void SetAverageQEBlindPixelAvailable ( const Bool_t b=kTRUE );
136 void SetAverageQECombinedAvailable ( const Bool_t b=kTRUE );
137 void SetAverageQEFFactorAvailable ( const Bool_t b=kTRUE );
138 void SetAverageQEPINDiodeAvailable ( const Bool_t b=kTRUE );
139 void SetBlindPixelMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
140 void SetCombinedMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
141 void SetFFactorMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
142 void SetPINDiodeMethodValid ( const Bool_t b, const MCalibrationCam::PulserColor_t col);
143 void SetQEBlindPixel ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEBlindPixel [col] = f; }
144 void SetQEBlindPixelVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEBlindPixelVar[col] = f; }
145 void SetQECombined ( Float_t f, MCalibrationCam::PulserColor_t col) { fQECombined [col] = f; }
146 void SetQECombinedVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQECombinedVar [col] = f; }
147 void SetQEFFactor ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEFFactor [col] = f; }
148 void SetQEFFactorVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEFFactorVar [col] = f; }
149 void SetQEPINDiode ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEPINDiode [col] = f; }
150 void SetQEPINDiodeVar ( Float_t f, MCalibrationCam::PulserColor_t col) { fQEPINDiodeVar [col] = f; }
151
152 // Updates
153 Bool_t UpdateBlindPixelMethod();
154 Bool_t UpdateCombinedMethod ();
155 Bool_t UpdateFFactorMethod ();
156 Bool_t UpdatePINDiodeMethod ();
157
158 ClassDef(MCalibrationQEPix, 1) // Container Quantum Efficieny Calibration Results Pixel
159};
160
161#endif
162
Note: See TracBrowser for help on using the repository browser.