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

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