1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Markus Gaug 02/2004 <mailto:markus@ifae.es>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // MCalibrationQEPix
|
---|
28 | //
|
---|
29 | // Storage container of the calibrated Quantrum Efficiency of one pixel.
|
---|
30 | // This container (like MCalibrationQECam) is designed to persist during
|
---|
31 | // several eventloops over different calibration files, especially those
|
---|
32 | // with different colour LEDs. This class contains all measured Quantum
|
---|
33 | // Efficiencies with the calibration system for each individual pixel.
|
---|
34 | //
|
---|
35 | // At the moment, this calibration works in the following steps:
|
---|
36 | //
|
---|
37 | // 1) MHCalibrationChargeCam extracts mean and sigma (and its errors) of
|
---|
38 | // the summed FADC slices distribution and stores them in MCalibrationCam
|
---|
39 | //
|
---|
40 | // 2) MHCalibrationChargeBlindPix extracts the mean of a Poisson fit to the
|
---|
41 | // single photo-electron spectrum and stores it in MCalibrationChargeBlindPix
|
---|
42 | //
|
---|
43 | // 3) MHCalibrationChargePINDiode extracts the mean of a charge distribution
|
---|
44 | // of the signals collected by the PIN Diode and stores it in
|
---|
45 | // MCalibrationChargePINDiode
|
---|
46 | //
|
---|
47 | // 4) MCalibrationChargeCalc calculates for every pixel the number of
|
---|
48 | // photo-electrons with the F-Factor method and stores them in MCalibrationChargePix
|
---|
49 | //
|
---|
50 | // 5) MCalibrationChargeCalc calculates the (weighted) average number of photo-
|
---|
51 | // electrons from the pixels with the area index 0 (Inner pixels for the MAGIC
|
---|
52 | // camera) and divides this number by gkDefaultQEGreen, gkDefaultQEBlue,
|
---|
53 | // gkDefaultQEUV or gkDefaultQECT1, depending on the used pulser LED colour,
|
---|
54 | // and further by MCalibrationQECam::gkPlexiglassQE. The obtained number is then
|
---|
55 | // divided further by MGeomCam::GetPixRatio(pixel idx) (1. for inner pixels) and
|
---|
56 | // gives the NUMBER OF PHOTONS incident on every pixel light guide OUTSIDE THE PLEXIGLASS
|
---|
57 | // of the camera, obtained with the F-Factor method. (In the case of the MAGIC camera,
|
---|
58 | // this number is thus BY CONSTRUCTION four times bigger for the outer pixels than for
|
---|
59 | // the inner ones.)
|
---|
60 | //
|
---|
61 | // 6) MCalibrationChargeCalc calculates the mean photon flux per mm^2 in the camera
|
---|
62 | // from the MCalibrationChargeBlindPix and multiplies it with the light guides area
|
---|
63 | // of each pixel (MGeomPix::GetA()) and divides it by the quantum efficiency of the
|
---|
64 | // plexi-glass (MCalibrationQECam::gkPlexiglassQE). The obtained number gives the
|
---|
65 | // NUMBER OF PHOTONS incident on every pixel light guide OUTSIDE THE PLEXIGLASS of the camera,
|
---|
66 | // obtained with the Blind Pixel method.
|
---|
67 | //
|
---|
68 | // 7) MCalibrationChargeCalc calculates the mean photon flux per mm^2 in the camera
|
---|
69 | // from the MCalibrationChargePINDiode and multiplies it with the light guides area
|
---|
70 | // of each pixel (MGeomPix::GetA()). The obtained number gives the NUMBER OF PHOTONS
|
---|
71 | // incident on every pixels light guid OUTSIDE THE PLEXIGLASS of the camera,
|
---|
72 | // obtained with the PIN Diode method.
|
---|
73 | //
|
---|
74 | // 8) Each of the three photons numbers is divided by the mean sum of FADC counts
|
---|
75 | // and defined as MEASURED QUANTUM EFFICIENCY AT A GIVEN COLOUR. They are stored
|
---|
76 | // in the variables SetQEBlindPixel(qe, color), SetQEFFactor(qe,color) and
|
---|
77 | // SetQEPINDiode(qe,color)
|
---|
78 | //
|
---|
79 | // 9) Errors are propagated and corresponding variances get stored in
|
---|
80 | // SetQEBlindPixelVar(var,color), SetQEFFactorVar(var,color) and
|
---|
81 | // SetQEPINDiodeVar(var,color).
|
---|
82 | //
|
---|
83 | // 10) After every eventloop, MCalibrationChargeCalc calls the functions UpdateBlindPixelMethod(),
|
---|
84 | // UpdateFFactorMethod() and UpdatePINDiodeMethod() which calculate the ratio
|
---|
85 | // measured QE / gkDefaultQEGreen (or gkDefaultQEBlue or gkDefaultQEUV or gkDefaultQECT1)
|
---|
86 | // and calculates an weighted average of these quantum-efficiency normalizations obtained
|
---|
87 | // by one of the three methods.
|
---|
88 | //
|
---|
89 | // 11) A call to GetQECascadesBlindPixel(zenith), GetQECascadesFFactor(zenith) or
|
---|
90 | // GetQECascadesPINDiode(zenith) returns then the normalization multiplied with an average QE
|
---|
91 | // folded into a cascades spectrum. This number should be dependent on zenith angle, but
|
---|
92 | // this feature is not yet implemented, instead a fixed number gkDefaultAverageQE is used.
|
---|
93 | //
|
---|
94 | // The number gkDefaultAverageQE = 0.18 +- 0.02 can be obtained in the following way:
|
---|
95 | //
|
---|
96 | // * Transmission probability Plexiglass: 0.96
|
---|
97 | //
|
---|
98 | // * Averaged QE coated PMTs: zenith value
|
---|
99 | // 0. 0.237
|
---|
100 | // 20. 0.237
|
---|
101 | // 40. 0.236
|
---|
102 | // 60. 0.234
|
---|
103 | // (from D.Paneque et al., NIM A 504, 2003, 109-115
|
---|
104 | //
|
---|
105 | // * PMT photoelectron collection efficiency: 0.9
|
---|
106 | // (from D.Paneque, email 14.2.2004)
|
---|
107 | //
|
---|
108 | // * Light guides efficiency: 0.94
|
---|
109 | // (from D.Paneque, email 14.2.2004)
|
---|
110 | //
|
---|
111 | // "Concerning the light guides effiency estimation... Daniel Ferenc
|
---|
112 | // is preparing some work (simulations) to estimate it. Yet so far, he has
|
---|
113 | // been busy with other stuff, and this work is still Unfinished.
|
---|
114 | //
|
---|
115 | // The estimation I did comes from:
|
---|
116 | // 1) Reflectivity of light guide walls is 85 % (aluminum)
|
---|
117 | // 2) At ZERO degree light incidence, 37% of the light hits such walls
|
---|
118 | // (0.15X37%= 5.6% of light lost)
|
---|
119 | // 3) When increasing the light incidence angle, more and more light hits
|
---|
120 | // the walls.
|
---|
121 | //
|
---|
122 | // However, the loses due to larger amount of photons hitting the walls is more
|
---|
123 | // or less counteracted by the fact that more and more photon trajectories cross
|
---|
124 | // the PMT photocathode twice, increasing the effective sensitivity of the PMT.
|
---|
125 | //
|
---|
126 | //Begin_Html
|
---|
127 | /*
|
---|
128 | <img src="images/Normalized_Cherenkov_phe_spectrums_20deg_60deg_coatedPMT.png">
|
---|
129 | */
|
---|
130 | //End_Html
|
---|
131 | //
|
---|
132 | // The plot shows the normalized spectrum of photo-electrons preceding from
|
---|
133 | // a typical spectrum of Cherenkov photons produced by an atmospheric shower. The
|
---|
134 | // green line is for observation zenith angles of 20 deg. and the red line for
|
---|
135 | // 60 deg. The overall effective QE drops from about 20.8 to about 19.8.
|
---|
136 | //
|
---|
137 | // Jurgen Gebauer did some quick measurements about this issue. I attach a
|
---|
138 | // plot. You can see that the angular dependence is (more or less) in agreement with a
|
---|
139 | // CosTheta function (below 20-25 degrees), which is the variation of the entrance
|
---|
140 | // window cross section. So, in first approximation, no losses when increasing light
|
---|
141 | // incidence angle; and therefore, the factor 0.94.
|
---|
142 | //
|
---|
143 | //Begin_Html
|
---|
144 | /*
|
---|
145 | <img src="images/JuergensMeasurementWithCosThetaCurve.png">
|
---|
146 | */
|
---|
147 | //End_Html
|
---|
148 | //
|
---|
149 | //
|
---|
150 | // See also: MJCalibration, MCalibrationChargeCalc,
|
---|
151 | // MCalibrationChargeCam, MCalibrationChargePix,
|
---|
152 | // MHCalibrationChargeCam, MHCalibrationChargePix,
|
---|
153 | // MHCalibrationChargePINDiode, MHCalibrationChargeBlindPix
|
---|
154 | //
|
---|
155 | /////////////////////////////////////////////////////////////////////////////
|
---|
156 | #include "MCalibrationQEPix.h"
|
---|
157 | #include "MCalibrationCam.h"
|
---|
158 |
|
---|
159 | #include "MLog.h"
|
---|
160 | #include "MLogManip.h"
|
---|
161 |
|
---|
162 | #include "TArrayF.h"
|
---|
163 | #include "TArrayC.h"
|
---|
164 |
|
---|
165 | ClassImp(MCalibrationQEPix);
|
---|
166 |
|
---|
167 | using namespace std;
|
---|
168 |
|
---|
169 | const Float_t MCalibrationQEPix::gkDefaultQEGreen = 0.192;
|
---|
170 | const Float_t MCalibrationQEPix::gkDefaultQEBlue = 0.27;
|
---|
171 | const Float_t MCalibrationQEPix::gkDefaultQEUV = 0.285;
|
---|
172 | const Float_t MCalibrationQEPix::gkDefaultQECT1 = 0.285;
|
---|
173 | const Float_t MCalibrationQEPix::gkDefaultQEGreenErr = 0.05 ;
|
---|
174 | const Float_t MCalibrationQEPix::gkDefaultQEBlueErr = 0.07 ;
|
---|
175 | const Float_t MCalibrationQEPix::gkDefaultQEUVErr = 0.07 ;
|
---|
176 | const Float_t MCalibrationQEPix::gkDefaultQECT1Err = 0.07 ;
|
---|
177 | const Float_t MCalibrationQEPix::gkDefaultAverageQE = 0.18 ;
|
---|
178 | const Float_t MCalibrationQEPix::gkDefaultAverageQEErr = 0.02 ;
|
---|
179 | const Float_t MCalibrationQEPix::gkPMTCollectionEff = 0.90 ;
|
---|
180 | const Float_t MCalibrationQEPix::gkLightGuidesEff = 0.94 ;
|
---|
181 | const Float_t MCalibrationQEPix::gkPMTCollectionEffErr = 0.01 ;
|
---|
182 | const Float_t MCalibrationQEPix::gkLightGuidesEffErr = 0.03 ;
|
---|
183 | // --------------------------------------------------------------------------
|
---|
184 | //
|
---|
185 | // Default Constructor:
|
---|
186 | //
|
---|
187 | // Initializes all TArrays to MCalibrationCam::gkNumPulserColors
|
---|
188 | //
|
---|
189 | // Calls:
|
---|
190 | // - Clear()
|
---|
191 | //
|
---|
192 | MCalibrationQEPix::MCalibrationQEPix(const char *name, const char *title)
|
---|
193 | : fAverageQE ( gkDefaultAverageQE )
|
---|
194 | {
|
---|
195 |
|
---|
196 | fName = name ? name : "MCalibrationQEPix";
|
---|
197 | fTitle = title ? title : "Container of the calibrated quantum efficiency ";
|
---|
198 |
|
---|
199 | fQEBlindPixel .Set( MCalibrationCam::gkNumPulserColors );
|
---|
200 | fQEBlindPixelVar .Set( MCalibrationCam::gkNumPulserColors );
|
---|
201 | fQECombined .Set( MCalibrationCam::gkNumPulserColors );
|
---|
202 | fQECombinedVar .Set( MCalibrationCam::gkNumPulserColors );
|
---|
203 | fQEFFactor .Set( MCalibrationCam::gkNumPulserColors );
|
---|
204 | fQEFFactorVar .Set( MCalibrationCam::gkNumPulserColors );
|
---|
205 | fQEPINDiode .Set( MCalibrationCam::gkNumPulserColors );
|
---|
206 | fQEPINDiodeVar .Set( MCalibrationCam::gkNumPulserColors );
|
---|
207 | fValidFlags .Set( MCalibrationCam::gkNumPulserColors );
|
---|
208 |
|
---|
209 | Clear();
|
---|
210 |
|
---|
211 | }
|
---|
212 |
|
---|
213 | // ----------------------------------------------------------------------------------------------
|
---|
214 | //
|
---|
215 | // Search all available QE's of a certain colour after the blind pixel method,
|
---|
216 | // compare them to the default QE of that colour and
|
---|
217 | // add up a weighted average (wav) and a sum of weights (sumw)
|
---|
218 | //
|
---|
219 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
---|
220 | //
|
---|
221 | void MCalibrationQEPix::AddAverageBlindPixelQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
---|
222 | {
|
---|
223 |
|
---|
224 | if (IsBlindPixelMethodValid (col))
|
---|
225 | {
|
---|
226 | const Float_t newavqe = GetQEBlindPixel(col) / GetDefaultQE (col) ;
|
---|
227 | const Float_t newavqevar = ( GetQEBlindPixelRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
|
---|
228 | const Float_t weight = 1./newavqevar;
|
---|
229 |
|
---|
230 | wav += newavqe * weight;
|
---|
231 | sumw += weight;
|
---|
232 | }
|
---|
233 | }
|
---|
234 |
|
---|
235 | // ----------------------------------------------------------------------------------------------
|
---|
236 | //
|
---|
237 | // Search all available QE's of a certain colour after the combination of the three methods
|
---|
238 | // compare them to the default QE of that colour and
|
---|
239 | // add up a weighted average (wav) and a sum of weights (sumw)
|
---|
240 | //
|
---|
241 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
---|
242 | //
|
---|
243 | void MCalibrationQEPix::AddAverageCombinedQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
---|
244 | {
|
---|
245 |
|
---|
246 | if (IsCombinedMethodValid (col))
|
---|
247 | {
|
---|
248 | const Float_t newavqe = GetQECombined(col) / GetDefaultQE (col) ;
|
---|
249 | const Float_t newavqevar = ( GetQECombinedRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
|
---|
250 | const Float_t weight = 1./newavqevar;
|
---|
251 | wav += newavqe * weight;
|
---|
252 | sumw += weight;
|
---|
253 |
|
---|
254 | }
|
---|
255 | }
|
---|
256 |
|
---|
257 | // ----------------------------------------------------------------------------------------------
|
---|
258 | //
|
---|
259 | // Search all available QE's of a certain colour after the F-Factor method,
|
---|
260 | // compare them to the default QE of that colour and
|
---|
261 | // add up a weighted average (wav) and a sum of weights (sumw)
|
---|
262 | //
|
---|
263 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
---|
264 | //
|
---|
265 | void MCalibrationQEPix::AddAverageFFactorQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
---|
266 | {
|
---|
267 |
|
---|
268 | if (IsFFactorMethodValid (col))
|
---|
269 | {
|
---|
270 | const Float_t newavqe = GetQEFFactor(col) / GetDefaultQE (col) ;
|
---|
271 | const Float_t newavqevar = ( GetQEFFactorRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
|
---|
272 | const Float_t weight = 1./newavqevar;
|
---|
273 |
|
---|
274 | wav += newavqe *weight;
|
---|
275 | sumw += weight;
|
---|
276 |
|
---|
277 | }
|
---|
278 |
|
---|
279 |
|
---|
280 | }
|
---|
281 |
|
---|
282 | // ----------------------------------------------------------------------------------------------
|
---|
283 | //
|
---|
284 | // Search all available QE's of a certain colour after the PIN Diode method,
|
---|
285 | // compare them to the default QE of that colour and
|
---|
286 | // add up a weighted average (wav) and a sum of weights (sumw)
|
---|
287 | //
|
---|
288 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
---|
289 | //
|
---|
290 | void MCalibrationQEPix::AddAveragePINDiodeQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
---|
291 | {
|
---|
292 |
|
---|
293 | if (IsPINDiodeMethodValid (col))
|
---|
294 | {
|
---|
295 | const Float_t newavqe = GetQEPINDiode(col) / GetDefaultQE (col) ;
|
---|
296 | const Float_t newavqevar = ( GetQEPINDiodeRelVar(col) + GetDefaultQERelVar(col) ) * newavqe * newavqe;
|
---|
297 | const Float_t weight = 1./newavqevar;
|
---|
298 | wav += newavqe *weight;
|
---|
299 | sumw += weight;
|
---|
300 | }
|
---|
301 | }
|
---|
302 |
|
---|
303 |
|
---|
304 |
|
---|
305 | // ------------------------------------------------------------------------
|
---|
306 | //
|
---|
307 | // Sets all quantum efficiencies to the gkDefaultQE*
|
---|
308 | // Sets all Variances to the square root of gkDefaultQE*Err
|
---|
309 | // Sets all flags to kFALSE
|
---|
310 | // Sets all fAvNorm-Variables to 1.;
|
---|
311 | // Sets all fAvNorm-Variances to 0.;
|
---|
312 | //
|
---|
313 | // Calls:
|
---|
314 | // - MCalibrationPix::Clear()
|
---|
315 | //
|
---|
316 | void MCalibrationQEPix::Clear(Option_t *o)
|
---|
317 | {
|
---|
318 |
|
---|
319 | SetAverageQEBlindPixelAvailable ( kFALSE );
|
---|
320 | SetAverageQEFFactorAvailable ( kFALSE );
|
---|
321 | SetAverageQECombinedAvailable ( kFALSE );
|
---|
322 | SetAverageQEPINDiodeAvailable ( kFALSE );
|
---|
323 |
|
---|
324 | fQEBlindPixel [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
---|
325 | fQEBlindPixelVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
---|
326 | fQEFFactor [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
---|
327 | fQEFFactorVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
---|
328 | fQECombined [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
---|
329 | fQECombinedVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
---|
330 | fQEPINDiode [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
---|
331 | fQEPINDiodeVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
---|
332 |
|
---|
333 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
---|
334 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
---|
335 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
---|
336 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
---|
337 |
|
---|
338 | fQEBlindPixel [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
---|
339 | fQEBlindPixelVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
---|
340 | fQEFFactor [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
---|
341 | fQEFFactorVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
---|
342 | fQECombined [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
---|
343 | fQECombinedVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
---|
344 | fQEPINDiode [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
---|
345 | fQEPINDiodeVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
---|
346 |
|
---|
347 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
---|
348 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
---|
349 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
---|
350 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
---|
351 |
|
---|
352 | fQEBlindPixel [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
---|
353 | fQEBlindPixelVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
---|
354 | fQEFFactor [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
---|
355 | fQEFFactorVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
---|
356 | fQECombined [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
---|
357 | fQECombinedVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
---|
358 | fQEPINDiode [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
---|
359 | fQEPINDiodeVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
---|
360 |
|
---|
361 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kUV);
|
---|
362 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kUV);
|
---|
363 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kUV);
|
---|
364 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kUV);
|
---|
365 |
|
---|
366 | fQEBlindPixel [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
---|
367 | fQEBlindPixelVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
---|
368 | fQEFFactor [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
---|
369 | fQEFFactorVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
---|
370 | fQECombined [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
---|
371 | fQECombinedVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
---|
372 | fQEPINDiode [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
---|
373 | fQEPINDiodeVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
---|
374 |
|
---|
375 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
---|
376 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
---|
377 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
---|
378 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
---|
379 |
|
---|
380 | fAvNormBlindPixel = 1.;
|
---|
381 | fAvNormBlindPixelVar = 0.;
|
---|
382 | fAvNormCombined = 1.;
|
---|
383 | fAvNormCombinedVar = 0.;
|
---|
384 | fAvNormFFactor = 1.;
|
---|
385 | fAvNormFFactorVar = 0.;
|
---|
386 | fAvNormPINDiode = 1.;
|
---|
387 | fAvNormPINDiodeVar = 0.;
|
---|
388 |
|
---|
389 | MCalibrationPix::Clear();
|
---|
390 | }
|
---|
391 |
|
---|
392 |
|
---|
393 | // -----------------------------------------------------------------
|
---|
394 | //
|
---|
395 | // Return the average Default QE (depending on zenith angle)
|
---|
396 | //
|
---|
397 | const Float_t MCalibrationQEPix::GetAverageQE( const Float_t zenith ) const
|
---|
398 | {
|
---|
399 | // return gkDefaultAverageQE ;
|
---|
400 | return fAverageQE;
|
---|
401 | }
|
---|
402 |
|
---|
403 | // -----------------------------------------------------------------
|
---|
404 | //
|
---|
405 | // Return the relative variance of the average Default QE (depending on zenith angle)
|
---|
406 | //
|
---|
407 | const Float_t MCalibrationQEPix::GetAverageQERelVar( const Float_t zenith ) const
|
---|
408 | {
|
---|
409 | return gkDefaultAverageQEErr * gkDefaultAverageQEErr / (gkDefaultAverageQE * gkDefaultAverageQE );
|
---|
410 | }
|
---|
411 |
|
---|
412 | // -----------------------------------------------------------------
|
---|
413 | //
|
---|
414 | // Return the relative variance of the average normalization (Blind Pixel Method)
|
---|
415 | //
|
---|
416 | const Float_t MCalibrationQEPix::GetAvNormBlindPixelRelVar( ) const
|
---|
417 | {
|
---|
418 | return fAvNormBlindPixelVar / (fAvNormBlindPixel * fAvNormBlindPixel );
|
---|
419 | }
|
---|
420 |
|
---|
421 | // -----------------------------------------------------------------
|
---|
422 | //
|
---|
423 | // Return the relative variance of the average normalization (Combined Method)
|
---|
424 | //
|
---|
425 | const Float_t MCalibrationQEPix::GetAvNormCombinedRelVar( ) const
|
---|
426 | {
|
---|
427 | return fAvNormCombinedVar / (fAvNormCombined * fAvNormCombined );
|
---|
428 | }
|
---|
429 |
|
---|
430 | // -----------------------------------------------------------------
|
---|
431 | //
|
---|
432 | // Return the relative variance of the average normalization (F-Factor Method)
|
---|
433 | //
|
---|
434 | const Float_t MCalibrationQEPix::GetAvNormFFactorRelVar( ) const
|
---|
435 | {
|
---|
436 | return fAvNormFFactorVar / (fAvNormFFactor * fAvNormFFactor );
|
---|
437 | }
|
---|
438 |
|
---|
439 | // -----------------------------------------------------------------
|
---|
440 | //
|
---|
441 | // Return the relative variance of the average normalization (PIN Diode Method)
|
---|
442 | //
|
---|
443 | const Float_t MCalibrationQEPix::GetAvNormPINDiodeRelVar( ) const
|
---|
444 | {
|
---|
445 | return fAvNormPINDiodeVar / (fAvNormPINDiode * fAvNormPINDiode );
|
---|
446 | }
|
---|
447 |
|
---|
448 | // ------------------------------------------------------------------------------
|
---|
449 | //
|
---|
450 | // Get the default Quantum efficiency for pulser colour "col"
|
---|
451 | //
|
---|
452 | Float_t MCalibrationQEPix::GetDefaultQE( const MCalibrationCam::PulserColor_t col ) const
|
---|
453 | {
|
---|
454 | switch (col)
|
---|
455 | {
|
---|
456 | case MCalibrationCam::kGREEN:
|
---|
457 | return gkDefaultQEGreen * gkPMTCollectionEff * gkLightGuidesEff;
|
---|
458 | break;
|
---|
459 | case MCalibrationCam::kBLUE:
|
---|
460 | return gkDefaultQEBlue * gkPMTCollectionEff * gkLightGuidesEff;
|
---|
461 | break;
|
---|
462 | case MCalibrationCam::kUV:
|
---|
463 | return gkDefaultQEUV * gkPMTCollectionEff * gkLightGuidesEff;
|
---|
464 | break;
|
---|
465 | case MCalibrationCam::kCT1:
|
---|
466 | return gkDefaultQECT1 * gkPMTCollectionEff * gkLightGuidesEff;
|
---|
467 | break;
|
---|
468 | default:
|
---|
469 | return gkDefaultQECT1 * gkPMTCollectionEff * gkLightGuidesEff;
|
---|
470 | break;
|
---|
471 | }
|
---|
472 | return -1.;
|
---|
473 | }
|
---|
474 |
|
---|
475 | // ------------------------------------------------------------------------------
|
---|
476 | //
|
---|
477 | // Get the relative variance of the default Quantum efficiency for pulser colour "col"
|
---|
478 | //
|
---|
479 | Float_t MCalibrationQEPix::GetDefaultQERelVar( const MCalibrationCam::PulserColor_t col ) const
|
---|
480 | {
|
---|
481 |
|
---|
482 | Float_t collpluslgrelvar = gkPMTCollectionEffErr * gkPMTCollectionEffErr
|
---|
483 | / gkPMTCollectionEff / gkPMTCollectionEff;
|
---|
484 |
|
---|
485 | collpluslgrelvar += gkLightGuidesEffErr * gkLightGuidesEffErr
|
---|
486 | / gkLightGuidesEff / gkLightGuidesEffErr;
|
---|
487 |
|
---|
488 | switch (col)
|
---|
489 | {
|
---|
490 | case MCalibrationCam::kGREEN:
|
---|
491 | return collpluslgrelvar + gkDefaultQEGreenErr * gkDefaultQEGreenErr / (gkDefaultQEGreen * gkDefaultQEGreen );
|
---|
492 | break;
|
---|
493 | case MCalibrationCam::kBLUE:
|
---|
494 | return collpluslgrelvar + gkDefaultQEBlueErr * gkDefaultQEBlueErr / (gkDefaultQEBlue * gkDefaultQEBlue );
|
---|
495 | break;
|
---|
496 | case MCalibrationCam::kUV:
|
---|
497 | return collpluslgrelvar + gkDefaultQEUVErr * gkDefaultQEUVErr / (gkDefaultQEUV * gkDefaultQEUV );
|
---|
498 | break;
|
---|
499 | case MCalibrationCam::kCT1:
|
---|
500 | return collpluslgrelvar + gkDefaultQECT1Err * gkDefaultQECT1Err / (gkDefaultQECT1 * gkDefaultQECT1 );
|
---|
501 | break;
|
---|
502 | default:
|
---|
503 | return collpluslgrelvar + gkDefaultQECT1Err * gkDefaultQECT1Err / (gkDefaultQECT1 * gkDefaultQECT1 );
|
---|
504 | break;
|
---|
505 | }
|
---|
506 | return -1.;
|
---|
507 | }
|
---|
508 |
|
---|
509 | // ------------------------------------------------------------------------------
|
---|
510 | //
|
---|
511 | // Get the calculated Quantum efficiency with the blind pixel method,
|
---|
512 | // obtained with pulser colour "col"
|
---|
513 | //
|
---|
514 | Float_t MCalibrationQEPix::GetQEBlindPixel( const MCalibrationCam::PulserColor_t col ) const
|
---|
515 | {
|
---|
516 | return fQEBlindPixel[col];
|
---|
517 | }
|
---|
518 |
|
---|
519 | // ------------------------------------------------------------------------------
|
---|
520 | //
|
---|
521 | // Get the error on the calculated Quantum efficiency with the blind pixel method,
|
---|
522 | // obtained with pulser colour "col"
|
---|
523 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
524 | // and returns -1. in that case
|
---|
525 | //
|
---|
526 | Float_t MCalibrationQEPix::GetQEBlindPixelErr( const MCalibrationCam::PulserColor_t col ) const
|
---|
527 | {
|
---|
528 |
|
---|
529 | if (fQEBlindPixelVar[col] < 0.)
|
---|
530 | return -1.;
|
---|
531 |
|
---|
532 | return TMath::Sqrt(fQEBlindPixelVar[col]);
|
---|
533 |
|
---|
534 | }
|
---|
535 |
|
---|
536 | // ------------------------------------------------------------------------------
|
---|
537 | //
|
---|
538 | // Get the relative variance of the calculated Quantum efficiency with the blind pixel method,
|
---|
539 | // obtained with pulser colour "col"
|
---|
540 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
541 | // and returns -1. in that case
|
---|
542 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
---|
543 | //
|
---|
544 | Float_t MCalibrationQEPix::GetQEBlindPixelRelVar( const MCalibrationCam::PulserColor_t col ) const
|
---|
545 | {
|
---|
546 |
|
---|
547 | if (fQEBlindPixelVar[col] < 0.)
|
---|
548 | return -1.;
|
---|
549 | if (fQEBlindPixel[col] < 0.)
|
---|
550 | return -1.;
|
---|
551 | return fQEBlindPixelVar[col] / ( fQEBlindPixel[col] * fQEBlindPixel[col] );
|
---|
552 |
|
---|
553 | }
|
---|
554 |
|
---|
555 | // ------------------------------------------------------------------------------
|
---|
556 | //
|
---|
557 | // Get the calculated Quantum efficiency with the combination of the three methods
|
---|
558 | // obtained with pulser colour "col"
|
---|
559 | //
|
---|
560 | Float_t MCalibrationQEPix::GetQECombined( const MCalibrationCam::PulserColor_t col ) const
|
---|
561 | {
|
---|
562 | return fQECombined[col];
|
---|
563 | }
|
---|
564 |
|
---|
565 |
|
---|
566 | // ------------------------------------------------------------------------------
|
---|
567 | //
|
---|
568 | // Get the error on the calculated Quantum efficiency with the combination of the three methods
|
---|
569 | // obtained with pulser colour "col"
|
---|
570 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
571 | // and returns -1. in that case
|
---|
572 | //
|
---|
573 | Float_t MCalibrationQEPix::GetQECombinedErr( const MCalibrationCam::PulserColor_t col ) const
|
---|
574 | {
|
---|
575 |
|
---|
576 | if (fQECombinedVar[col] < 0.)
|
---|
577 | return -1.;
|
---|
578 |
|
---|
579 | return TMath::Sqrt(fQECombinedVar[col]);
|
---|
580 |
|
---|
581 | }
|
---|
582 |
|
---|
583 |
|
---|
584 | // ----------------------------------------------------------------------------------------
|
---|
585 | //
|
---|
586 | // Get the relative variance of the calculated Quantum efficiency with the combination of
|
---|
587 | // the three methods,
|
---|
588 | // obtained with pulser colour "col"
|
---|
589 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
590 | // and returns -1. in that case
|
---|
591 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
---|
592 | //
|
---|
593 | Float_t MCalibrationQEPix::GetQECombinedRelVar( const MCalibrationCam::PulserColor_t col ) const
|
---|
594 | {
|
---|
595 |
|
---|
596 | if (fQECombinedVar[col] < 0.)
|
---|
597 | return -1.;
|
---|
598 | if (fQECombined[col] < 0.)
|
---|
599 | return -1.;
|
---|
600 | return fQECombinedVar[col] / ( fQECombined[col] * fQECombined[col] );
|
---|
601 |
|
---|
602 | }
|
---|
603 |
|
---|
604 | // ------------------------------------------------------------------------------
|
---|
605 | //
|
---|
606 | // Get the calculated Quantum efficiency with the F-Factor method
|
---|
607 | // obtained with pulser colour "col"
|
---|
608 | //
|
---|
609 | Float_t MCalibrationQEPix::GetQEFFactor( const MCalibrationCam::PulserColor_t col ) const
|
---|
610 | {
|
---|
611 | return fQEFFactor[col];
|
---|
612 | }
|
---|
613 |
|
---|
614 |
|
---|
615 | // ------------------------------------------------------------------------------
|
---|
616 | //
|
---|
617 | // Get the error on the calculated Quantum efficiency with the F-Factor method,
|
---|
618 | // obtained with pulser colour "col"
|
---|
619 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
620 | // and returns -1. in that case
|
---|
621 | //
|
---|
622 | Float_t MCalibrationQEPix::GetQEFFactorErr( const MCalibrationCam::PulserColor_t col ) const
|
---|
623 | {
|
---|
624 |
|
---|
625 | if (fQEFFactorVar[col] < 0.)
|
---|
626 | return -1.;
|
---|
627 |
|
---|
628 | return TMath::Sqrt(fQEFFactorVar[col]);
|
---|
629 |
|
---|
630 | }
|
---|
631 |
|
---|
632 |
|
---|
633 | // ----------------------------------------------------------------------------------------
|
---|
634 | //
|
---|
635 | // Get the relative variance of the calculated Quantum efficiency with the F-Factor method,
|
---|
636 | // obtained with pulser colour "col"
|
---|
637 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
638 | // and returns -1. in that case
|
---|
639 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
---|
640 | //
|
---|
641 | Float_t MCalibrationQEPix::GetQEFFactorRelVar( const MCalibrationCam::PulserColor_t col ) const
|
---|
642 | {
|
---|
643 |
|
---|
644 | if (fQEFFactorVar[col] < 0.)
|
---|
645 | return -1.;
|
---|
646 | if (fQEFFactor[col] < 0.)
|
---|
647 | return -1.;
|
---|
648 | return fQEFFactorVar[col] / ( fQEFFactor[col] * fQEFFactor[col] );
|
---|
649 |
|
---|
650 | }
|
---|
651 |
|
---|
652 | // ------------------------------------------------------------------------------
|
---|
653 | //
|
---|
654 | // Get the calculated Quantum efficiency with the PIN-Diode method
|
---|
655 | // obtained with pulser colour "col"
|
---|
656 | //
|
---|
657 | Float_t MCalibrationQEPix::GetQEPINDiode( const MCalibrationCam::PulserColor_t col ) const
|
---|
658 | {
|
---|
659 | return fQEPINDiode[col];
|
---|
660 | }
|
---|
661 |
|
---|
662 |
|
---|
663 | // ------------------------------------------------------------------------------
|
---|
664 | //
|
---|
665 | // Get the error on the calculated Quantum efficiency with the PIN Diode method,
|
---|
666 | // obtained with pulser colour "col"
|
---|
667 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
668 | // and returns -1. in that case
|
---|
669 | //
|
---|
670 | Float_t MCalibrationQEPix::GetQEPINDiodeErr( const MCalibrationCam::PulserColor_t col ) const
|
---|
671 | {
|
---|
672 |
|
---|
673 | if (fQEPINDiodeVar[col] < 0.)
|
---|
674 | return -1.;
|
---|
675 |
|
---|
676 | return TMath::Sqrt(fQEPINDiodeVar[col]);
|
---|
677 |
|
---|
678 | }
|
---|
679 |
|
---|
680 | // ----------------------------------------------------------------------------------------
|
---|
681 | //
|
---|
682 | // Get the relative variance of the calculated Quantum efficiency with the PIN Diode method,
|
---|
683 | // obtained with pulser colour "col"
|
---|
684 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
---|
685 | // and returns -1. in that case
|
---|
686 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
---|
687 | //
|
---|
688 | Float_t MCalibrationQEPix::GetQEPINDiodeRelVar( const MCalibrationCam::PulserColor_t col ) const
|
---|
689 | {
|
---|
690 |
|
---|
691 | if (fQEPINDiodeVar[col] < 0.)
|
---|
692 | return -1.;
|
---|
693 | if (fQEPINDiode[col] < 0.)
|
---|
694 | return -1.;
|
---|
695 | return fQEPINDiodeVar[col] / ( fQEPINDiode[col] * fQEPINDiode[col] );
|
---|
696 |
|
---|
697 | }
|
---|
698 |
|
---|
699 | // ------------------------------------------------------------------------------
|
---|
700 | //
|
---|
701 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
---|
702 | // with the blind pixel method and averaged over the results from the different colours.
|
---|
703 | //
|
---|
704 | Float_t MCalibrationQEPix::GetQECascadesBlindPixel( const Float_t zenith ) const
|
---|
705 | {
|
---|
706 | return fAvNormBlindPixel * GetAverageQE ( zenith );
|
---|
707 | }
|
---|
708 |
|
---|
709 | // ------------------------------------------------------------------------------
|
---|
710 | //
|
---|
711 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
712 | // obtained with the blind pixel method and averaged over the results from the
|
---|
713 | // different colours.
|
---|
714 | //
|
---|
715 | Float_t MCalibrationQEPix::GetQECascadesBlindPixelVar( const Float_t zenith ) const
|
---|
716 | {
|
---|
717 | return ( GetAvNormBlindPixelRelVar() + GetAverageQERelVar(zenith))
|
---|
718 | * GetQECascadesBlindPixel(zenith) * GetQECascadesBlindPixel(zenith);
|
---|
719 | }
|
---|
720 |
|
---|
721 | // ------------------------------------------------------------------------------
|
---|
722 | //
|
---|
723 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
724 | // obtained with the blind pixel method and averaged over the results from the
|
---|
725 | // different colours.
|
---|
726 | //
|
---|
727 | Float_t MCalibrationQEPix::GetQECascadesBlindPixelErr( const Float_t zenith ) const
|
---|
728 | {
|
---|
729 | const Float_t var = GetQECascadesBlindPixelVar(zenith);
|
---|
730 |
|
---|
731 | if (var < 0.)
|
---|
732 | return -1.;
|
---|
733 |
|
---|
734 | return TMath::Sqrt(var);
|
---|
735 | }
|
---|
736 |
|
---|
737 | // ------------------------------------------------------------------------------
|
---|
738 | //
|
---|
739 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
---|
740 | // with the combination of the three methods and averaged over the results
|
---|
741 | // from the different colours.
|
---|
742 | //
|
---|
743 | Float_t MCalibrationQEPix::GetQECascadesCombined( const Float_t zenith ) const
|
---|
744 | {
|
---|
745 | return fAvNormCombined * GetAverageQE ( zenith );
|
---|
746 | }
|
---|
747 |
|
---|
748 | // ------------------------------------------------------------------------------
|
---|
749 | //
|
---|
750 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
751 | // obtained with the combined method and averaged over the results from the
|
---|
752 | // different colours.
|
---|
753 | //
|
---|
754 | Float_t MCalibrationQEPix::GetQECascadesCombinedErr( const Float_t zenith ) const
|
---|
755 | {
|
---|
756 | const Float_t var = GetQECascadesCombinedVar(zenith);
|
---|
757 |
|
---|
758 | if (var < 0.)
|
---|
759 | return -1.;
|
---|
760 |
|
---|
761 | return TMath::Sqrt(var);
|
---|
762 | }
|
---|
763 |
|
---|
764 | // ------------------------------------------------------------------------------
|
---|
765 | //
|
---|
766 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
767 | // obtained with the combination of the three methods and averaged over the results from the
|
---|
768 | // different colours.
|
---|
769 | //
|
---|
770 | Float_t MCalibrationQEPix::GetQECascadesCombinedVar( const Float_t zenith ) const
|
---|
771 | {
|
---|
772 | return ( GetAvNormCombinedRelVar() + GetAverageQERelVar(zenith))
|
---|
773 | * GetQECascadesCombined(zenith) * GetQECascadesCombined(zenith);
|
---|
774 | }
|
---|
775 |
|
---|
776 | // ------------------------------------------------------------------------------
|
---|
777 | //
|
---|
778 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
---|
779 | // with the F-Factor method and averaged over the results from the different colours.
|
---|
780 | //
|
---|
781 | Float_t MCalibrationQEPix::GetQECascadesFFactor( const Float_t zenith ) const
|
---|
782 | {
|
---|
783 | return fAvNormFFactor * GetAverageQE ( zenith );
|
---|
784 | }
|
---|
785 |
|
---|
786 | // ------------------------------------------------------------------------------
|
---|
787 | //
|
---|
788 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
789 | // obtained with the F-Factor method and averaged over the results from the
|
---|
790 | // different colours.
|
---|
791 | //
|
---|
792 | Float_t MCalibrationQEPix::GetQECascadesFFactorErr( const Float_t zenith ) const
|
---|
793 | {
|
---|
794 | const Float_t var = GetQECascadesFFactorVar(zenith);
|
---|
795 |
|
---|
796 | if (var < 0.)
|
---|
797 | return -1.;
|
---|
798 |
|
---|
799 | return TMath::Sqrt(var);
|
---|
800 | }
|
---|
801 |
|
---|
802 | // ------------------------------------------------------------------------------
|
---|
803 | //
|
---|
804 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
805 | // obtained with the F-Factor method and averaged over the results from the
|
---|
806 | // different colours.
|
---|
807 | //
|
---|
808 | Float_t MCalibrationQEPix::GetQECascadesFFactorVar( const Float_t zenith ) const
|
---|
809 | {
|
---|
810 | return ( GetAvNormFFactorRelVar() + GetAverageQERelVar(zenith))
|
---|
811 | * GetQECascadesFFactor(zenith) * GetQECascadesFFactor(zenith);
|
---|
812 | }
|
---|
813 |
|
---|
814 | // ------------------------------------------------------------------------------
|
---|
815 | //
|
---|
816 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
---|
817 | // with the PIN Diode method and averaged over the results from the different colours.
|
---|
818 | //
|
---|
819 | Float_t MCalibrationQEPix::GetQECascadesPINDiode( const Float_t zenith ) const
|
---|
820 | {
|
---|
821 | return fAvNormPINDiode * GetAverageQE ( zenith );
|
---|
822 | }
|
---|
823 |
|
---|
824 | // ------------------------------------------------------------------------------
|
---|
825 | //
|
---|
826 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
827 | // obtained with the PIN Diode method and averaged over the results from the
|
---|
828 | // different colours.
|
---|
829 | //
|
---|
830 | Float_t MCalibrationQEPix::GetQECascadesPINDiodeErr( const Float_t zenith ) const
|
---|
831 | {
|
---|
832 | const Float_t var = GetQECascadesPINDiodeVar(zenith);
|
---|
833 |
|
---|
834 | if (var < 0.)
|
---|
835 | return -1.;
|
---|
836 |
|
---|
837 | return TMath::Sqrt(var);
|
---|
838 | }
|
---|
839 |
|
---|
840 | // ------------------------------------------------------------------------------
|
---|
841 | //
|
---|
842 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
---|
843 | // obtained with the PIN Diode method and averaged over the results from the
|
---|
844 | // different colours.
|
---|
845 | //
|
---|
846 | Float_t MCalibrationQEPix::GetQECascadesPINDiodeVar( const Float_t zenith ) const
|
---|
847 | {
|
---|
848 | return ( GetAvNormPINDiodeRelVar() + GetAverageQERelVar(zenith))
|
---|
849 | * GetQECascadesPINDiode(zenith) * GetQECascadesPINDiode(zenith);
|
---|
850 | }
|
---|
851 |
|
---|
852 | // ------------------------------------------------------------------------------
|
---|
853 | //
|
---|
854 | // Test if the average QE can be obtained from the blind pixel method
|
---|
855 | //
|
---|
856 | Bool_t MCalibrationQEPix::IsAverageQEBlindPixelAvailable() const
|
---|
857 | {
|
---|
858 | return TESTBIT(fAvailableFlags,kAverageQEBlindPixelAvailable);
|
---|
859 | }
|
---|
860 |
|
---|
861 | // ------------------------------------------------------------------------------
|
---|
862 | //
|
---|
863 | // Test if the average QE can be obtained from the combination of the three methods
|
---|
864 | //
|
---|
865 | Bool_t MCalibrationQEPix::IsAverageQECombinedAvailable() const
|
---|
866 | {
|
---|
867 | return TESTBIT(fAvailableFlags,kAverageQECombinedAvailable);
|
---|
868 | }
|
---|
869 |
|
---|
870 | // ------------------------------------------------------------------------------
|
---|
871 | //
|
---|
872 | // Test if the average QE can be obtained from the F-Factor method
|
---|
873 | //
|
---|
874 | Bool_t MCalibrationQEPix::IsAverageQEFFactorAvailable() const
|
---|
875 | {
|
---|
876 | return TESTBIT(fAvailableFlags,kAverageQEFFactorAvailable);
|
---|
877 | }
|
---|
878 |
|
---|
879 | // ------------------------------------------------------------------------------
|
---|
880 | //
|
---|
881 | // Test if the average QE can be obtained from the PIN Diode method
|
---|
882 | //
|
---|
883 | Bool_t MCalibrationQEPix::IsAverageQEPINDiodeAvailable() const
|
---|
884 | {
|
---|
885 | return TESTBIT(fAvailableFlags,kAverageQEPINDiodeAvailable);
|
---|
886 | }
|
---|
887 |
|
---|
888 | // ------------------------------------------------------------------------------
|
---|
889 | //
|
---|
890 | // Test if any of the three colours has already been calibrated with the blind pixel method
|
---|
891 | //
|
---|
892 | Bool_t MCalibrationQEPix::IsBlindPixelMethodValid () const
|
---|
893 | {
|
---|
894 |
|
---|
895 | if (IsBlindPixelMethodValid (MCalibrationCam::kGREEN))
|
---|
896 | return kTRUE;
|
---|
897 | if (IsBlindPixelMethodValid (MCalibrationCam::kBLUE ))
|
---|
898 | return kTRUE;
|
---|
899 | if (IsBlindPixelMethodValid (MCalibrationCam::kUV ))
|
---|
900 | return kTRUE;
|
---|
901 | if (IsBlindPixelMethodValid (MCalibrationCam::kCT1 ))
|
---|
902 | return kTRUE;
|
---|
903 |
|
---|
904 | return kFALSE;
|
---|
905 | }
|
---|
906 |
|
---|
907 | // ------------------------------------------------------------------------------
|
---|
908 | //
|
---|
909 | // Test if any of the three colours has already been calibrated with the combination
|
---|
910 | // of the three methods
|
---|
911 | //
|
---|
912 | Bool_t MCalibrationQEPix::IsCombinedMethodValid () const
|
---|
913 | {
|
---|
914 | if (IsCombinedMethodValid (MCalibrationCam::kGREEN))
|
---|
915 | return kTRUE;
|
---|
916 | if (IsCombinedMethodValid (MCalibrationCam::kBLUE ))
|
---|
917 | return kTRUE;
|
---|
918 | if (IsCombinedMethodValid (MCalibrationCam::kUV ))
|
---|
919 | return kTRUE;
|
---|
920 | if (IsCombinedMethodValid (MCalibrationCam::kCT1 ))
|
---|
921 | return kTRUE;
|
---|
922 |
|
---|
923 | return kFALSE;
|
---|
924 | }
|
---|
925 |
|
---|
926 | // ------------------------------------------------------------------------------
|
---|
927 | //
|
---|
928 | // Test if any of the three colours has already been calibrated with the F-Factor method
|
---|
929 | //
|
---|
930 | Bool_t MCalibrationQEPix::IsFFactorMethodValid () const
|
---|
931 | {
|
---|
932 | if (IsFFactorMethodValid (MCalibrationCam::kGREEN))
|
---|
933 | return kTRUE;
|
---|
934 | if (IsFFactorMethodValid (MCalibrationCam::kBLUE ))
|
---|
935 | return kTRUE;
|
---|
936 | if (IsFFactorMethodValid (MCalibrationCam::kUV ))
|
---|
937 | return kTRUE;
|
---|
938 | if (IsFFactorMethodValid (MCalibrationCam::kCT1 ))
|
---|
939 | return kTRUE;
|
---|
940 |
|
---|
941 | return kFALSE;
|
---|
942 | }
|
---|
943 |
|
---|
944 |
|
---|
945 | // ------------------------------------------------------------------------------
|
---|
946 | //
|
---|
947 | // Test if any of the three colours has already been calibrated with the PIN Diode method
|
---|
948 | //
|
---|
949 | Bool_t MCalibrationQEPix::IsPINDiodeMethodValid () const
|
---|
950 | {
|
---|
951 | if (IsPINDiodeMethodValid (MCalibrationCam::kGREEN))
|
---|
952 | return kTRUE;
|
---|
953 | if (IsPINDiodeMethodValid (MCalibrationCam::kBLUE ))
|
---|
954 | return kTRUE;
|
---|
955 | if (IsPINDiodeMethodValid (MCalibrationCam::kUV ))
|
---|
956 | return kTRUE;
|
---|
957 | if (IsPINDiodeMethodValid (MCalibrationCam::kCT1 ))
|
---|
958 | return kTRUE;
|
---|
959 |
|
---|
960 | return kFALSE;
|
---|
961 | }
|
---|
962 |
|
---|
963 | // ------------------------------------------------------------------------------
|
---|
964 | //
|
---|
965 | // Test if the colour "col" has already been calibrated with the Blind Pixel method
|
---|
966 | //
|
---|
967 | Bool_t MCalibrationQEPix::IsBlindPixelMethodValid (MCalibrationCam::PulserColor_t col) const
|
---|
968 | {
|
---|
969 | return TESTBIT(fValidFlags[ col ],kBlindPixelMethodValid);
|
---|
970 | }
|
---|
971 |
|
---|
972 | // ------------------------------------------------------------------------------
|
---|
973 | //
|
---|
974 | // Test if the colour "col" has already been calibrated with the combination of
|
---|
975 | // the three methods
|
---|
976 | //
|
---|
977 | Bool_t MCalibrationQEPix::IsCombinedMethodValid (MCalibrationCam::PulserColor_t col) const
|
---|
978 | {
|
---|
979 | return TESTBIT(fValidFlags[ col ],kCombinedMethodValid);
|
---|
980 | }
|
---|
981 |
|
---|
982 | // ------------------------------------------------------------------------------
|
---|
983 | //
|
---|
984 | // Test if the colour "col" has already been calibrated with the F-Factor method
|
---|
985 | //
|
---|
986 | Bool_t MCalibrationQEPix::IsFFactorMethodValid (MCalibrationCam::PulserColor_t col) const
|
---|
987 | {
|
---|
988 | return TESTBIT(fValidFlags[ col ],kFFactorMethodValid);
|
---|
989 | }
|
---|
990 |
|
---|
991 | // ------------------------------------------------------------------------------
|
---|
992 | //
|
---|
993 | // Test if the colour "col" has already been calibrated with the PIN Diode method
|
---|
994 | //
|
---|
995 | Bool_t MCalibrationQEPix::IsPINDiodeMethodValid (MCalibrationCam::PulserColor_t col) const
|
---|
996 | {
|
---|
997 | return TESTBIT(fValidFlags[ col ],kPINDiodeMethodValid);
|
---|
998 | }
|
---|
999 |
|
---|
1000 | // ------------------------------------------------------------------------------
|
---|
1001 | //
|
---|
1002 | // Set the bit Average QE Blind Pixel method available from outside (only for MC!)
|
---|
1003 | //
|
---|
1004 | void MCalibrationQEPix::SetAverageQEBlindPixelAvailable ( Bool_t b )
|
---|
1005 | {
|
---|
1006 | if (b)
|
---|
1007 | SETBIT(fAvailableFlags,kAverageQEBlindPixelAvailable);
|
---|
1008 | else
|
---|
1009 | CLRBIT(fAvailableFlags,kAverageQEBlindPixelAvailable);
|
---|
1010 | }
|
---|
1011 |
|
---|
1012 | // ------------------------------------------------------------------------------
|
---|
1013 | //
|
---|
1014 | // Set the bit Average QE combination of three methods available from outside (only for MC!)
|
---|
1015 | //
|
---|
1016 | void MCalibrationQEPix::SetAverageQECombinedAvailable ( Bool_t b )
|
---|
1017 | {
|
---|
1018 | if (b)
|
---|
1019 | SETBIT(fAvailableFlags,kAverageQECombinedAvailable);
|
---|
1020 | else
|
---|
1021 | CLRBIT(fAvailableFlags,kAverageQECombinedAvailable);
|
---|
1022 | }
|
---|
1023 |
|
---|
1024 | // ------------------------------------------------------------------------------
|
---|
1025 | //
|
---|
1026 | // Set the bit Average QE F-Factor method available from outside (only for MC!)
|
---|
1027 | //
|
---|
1028 | void MCalibrationQEPix::SetAverageQEFFactorAvailable ( Bool_t b )
|
---|
1029 | {
|
---|
1030 | if (b)
|
---|
1031 | SETBIT(fAvailableFlags,kAverageQEFFactorAvailable);
|
---|
1032 | else
|
---|
1033 | CLRBIT(fAvailableFlags,kAverageQEFFactorAvailable);
|
---|
1034 | }
|
---|
1035 |
|
---|
1036 | // ------------------------------------------------------------------------------
|
---|
1037 | //
|
---|
1038 | // Set the bit Average QE PIN Diode method available from outside (only for MC!)
|
---|
1039 | //
|
---|
1040 | void MCalibrationQEPix::SetAverageQEPINDiodeAvailable ( Bool_t b )
|
---|
1041 | {
|
---|
1042 | if (b)
|
---|
1043 | SETBIT(fAvailableFlags,kAverageQEPINDiodeAvailable);
|
---|
1044 | else
|
---|
1045 | CLRBIT(fAvailableFlags,kAverageQEPINDiodeAvailable);
|
---|
1046 | }
|
---|
1047 |
|
---|
1048 | // ------------------------------------------------------------------------------
|
---|
1049 | //
|
---|
1050 | // Set the bit QE Blind Pixel method available from colour "col"
|
---|
1051 | //
|
---|
1052 | void MCalibrationQEPix::SetBlindPixelMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
---|
1053 | {
|
---|
1054 | if (b)
|
---|
1055 | SETBIT(fValidFlags[ col ],kBlindPixelMethodValid);
|
---|
1056 | else
|
---|
1057 | CLRBIT(fValidFlags[ col ],kBlindPixelMethodValid);
|
---|
1058 | }
|
---|
1059 |
|
---|
1060 | // ------------------------------------------------------------------------------
|
---|
1061 | //
|
---|
1062 | // Set the bit QE Combination of three methods available from colour "col"
|
---|
1063 | //
|
---|
1064 | void MCalibrationQEPix::SetCombinedMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
---|
1065 | {
|
---|
1066 | if (b)
|
---|
1067 | SETBIT(fValidFlags[ col ],kCombinedMethodValid);
|
---|
1068 | else
|
---|
1069 | CLRBIT(fValidFlags[ col ],kCombinedMethodValid);
|
---|
1070 | }
|
---|
1071 |
|
---|
1072 | // ------------------------------------------------------------------------------
|
---|
1073 | //
|
---|
1074 | // Set the bit QE F-Factor method available from colour "col"
|
---|
1075 | //
|
---|
1076 | void MCalibrationQEPix::SetFFactorMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
---|
1077 | {
|
---|
1078 | if (b)
|
---|
1079 | SETBIT(fValidFlags[ col ],kFFactorMethodValid);
|
---|
1080 | else
|
---|
1081 | CLRBIT(fValidFlags[ col ],kFFactorMethodValid);
|
---|
1082 | }
|
---|
1083 |
|
---|
1084 | // ------------------------------------------------------------------------------
|
---|
1085 | //
|
---|
1086 | // Set the bit QE PIN Diode method available from colour "col"
|
---|
1087 | //
|
---|
1088 | void MCalibrationQEPix::SetPINDiodeMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
---|
1089 | {
|
---|
1090 | if (b)
|
---|
1091 | SETBIT(fValidFlags[ col ],kPINDiodeMethodValid);
|
---|
1092 | else
|
---|
1093 | CLRBIT(fValidFlags[ col ],kPINDiodeMethodValid);
|
---|
1094 | }
|
---|
1095 |
|
---|
1096 | // ------------------------------------------------------------------------------
|
---|
1097 | //
|
---|
1098 | // Update the Blind Pixel Method: Calculate new average QE's
|
---|
1099 | //
|
---|
1100 | Bool_t MCalibrationQEPix::UpdateBlindPixelMethod()
|
---|
1101 | {
|
---|
1102 |
|
---|
1103 | Float_t weightedav = 0.;
|
---|
1104 | Float_t sumweights = 0.;
|
---|
1105 |
|
---|
1106 | AddAverageBlindPixelQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
---|
1107 | AddAverageBlindPixelQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
---|
1108 | AddAverageBlindPixelQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
---|
1109 | AddAverageBlindPixelQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
---|
1110 |
|
---|
1111 | if (weightedav == 0. || sumweights == 0.)
|
---|
1112 | return kFALSE;
|
---|
1113 |
|
---|
1114 | fAvNormBlindPixel = weightedav / sumweights;
|
---|
1115 | fAvNormBlindPixelVar = 1./ sumweights ;
|
---|
1116 |
|
---|
1117 | SetAverageQEBlindPixelAvailable();
|
---|
1118 |
|
---|
1119 | return kTRUE;
|
---|
1120 | }
|
---|
1121 |
|
---|
1122 | // ------------------------------------------------------------------------------
|
---|
1123 | //
|
---|
1124 | // Update the Combination of the three Methods: Calculate new average QE's
|
---|
1125 | //
|
---|
1126 | Bool_t MCalibrationQEPix::UpdateCombinedMethod()
|
---|
1127 | {
|
---|
1128 |
|
---|
1129 | Float_t weightedav = 0.;
|
---|
1130 | Float_t sumweights = 0.;
|
---|
1131 |
|
---|
1132 | AddAverageCombinedQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
---|
1133 | AddAverageCombinedQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
---|
1134 | AddAverageCombinedQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
---|
1135 | AddAverageCombinedQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
---|
1136 |
|
---|
1137 | if (weightedav == 0. || sumweights == 0.)
|
---|
1138 | return kFALSE;
|
---|
1139 |
|
---|
1140 | fAvNormCombined = weightedav / sumweights;
|
---|
1141 | fAvNormCombinedVar = 1./ sumweights ;
|
---|
1142 |
|
---|
1143 | SetAverageQECombinedAvailable();
|
---|
1144 |
|
---|
1145 | return kTRUE;
|
---|
1146 |
|
---|
1147 | }
|
---|
1148 |
|
---|
1149 | // ------------------------------------------------------------------------------
|
---|
1150 | //
|
---|
1151 | // Update the F-Factor Method: Calculate new average QE's
|
---|
1152 | //
|
---|
1153 | Bool_t MCalibrationQEPix::UpdateFFactorMethod()
|
---|
1154 | {
|
---|
1155 |
|
---|
1156 | Float_t weightedav = 0.;
|
---|
1157 | Float_t sumweights = 0.;
|
---|
1158 |
|
---|
1159 | AddAverageFFactorQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
---|
1160 | AddAverageFFactorQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
---|
1161 | AddAverageFFactorQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
---|
1162 | AddAverageFFactorQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
---|
1163 |
|
---|
1164 | if (weightedav == 0. || sumweights == 0.)
|
---|
1165 | return kFALSE;
|
---|
1166 |
|
---|
1167 | fAvNormFFactor = weightedav / sumweights;
|
---|
1168 | fAvNormFFactorVar = 1./ sumweights ;
|
---|
1169 |
|
---|
1170 | SetAverageQEFFactorAvailable();
|
---|
1171 |
|
---|
1172 | return kTRUE;
|
---|
1173 |
|
---|
1174 |
|
---|
1175 | }
|
---|
1176 |
|
---|
1177 | // ------------------------------------------------------------------------------
|
---|
1178 | //
|
---|
1179 | // Update the PIN Diode Method: Calculate new average QE's
|
---|
1180 | //
|
---|
1181 | Bool_t MCalibrationQEPix::UpdatePINDiodeMethod()
|
---|
1182 | {
|
---|
1183 |
|
---|
1184 | Float_t weightedav = 0.;
|
---|
1185 | Float_t sumweights = 0.;
|
---|
1186 |
|
---|
1187 | AddAveragePINDiodeQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
---|
1188 | AddAveragePINDiodeQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
---|
1189 | AddAveragePINDiodeQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
---|
1190 | AddAveragePINDiodeQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
---|
1191 |
|
---|
1192 | if (weightedav == 0. || sumweights == 0.)
|
---|
1193 | return kFALSE;
|
---|
1194 |
|
---|
1195 | fAvNormPINDiode = weightedav / sumweights;
|
---|
1196 | fAvNormPINDiodeVar = 1./ sumweights ;
|
---|
1197 |
|
---|
1198 | SetAverageQEPINDiodeAvailable();
|
---|
1199 |
|
---|
1200 | return kTRUE;
|
---|
1201 |
|
---|
1202 |
|
---|
1203 | }
|
---|
1204 |
|
---|