| 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, see following figure with the
|
|---|
| 104 | // photon spectra at 2200 m altitude:)
|
|---|
| 105 | //
|
|---|
| 106 | //Begin_Html
|
|---|
| 107 | /*
|
|---|
| 108 | <img src="images/Photon_spectrum.png">
|
|---|
| 109 | */
|
|---|
| 110 | //End_Html
|
|---|
| 111 | //
|
|---|
| 112 | // * PMT photoelectron collection efficiency: 0.9
|
|---|
| 113 | // (from D.Paneque, email 14.2.2004)
|
|---|
| 114 | //
|
|---|
| 115 | // * Light guides efficiency: 0.94
|
|---|
| 116 | // (from D.Paneque, email 14.2.2004)
|
|---|
| 117 | //
|
|---|
| 118 | // "Concerning the light guides effiency estimation... Daniel Ferenc
|
|---|
| 119 | // is preparing some work (simulations) to estimate it. Yet so far, he has
|
|---|
| 120 | // been busy with other stuff, and this work is still Unfinished.
|
|---|
| 121 | //
|
|---|
| 122 | // The estimation I did comes from:
|
|---|
| 123 | // 1) Reflectivity of light guide walls is 85 % (aluminum)
|
|---|
| 124 | // 2) At ZERO degree light incidence, 37% of the light hits such walls
|
|---|
| 125 | // (0.15X37%= 5.6% of light lost)
|
|---|
| 126 | // 3) When increasing the light incidence angle, more and more light hits
|
|---|
| 127 | // the walls.
|
|---|
| 128 | //
|
|---|
| 129 | // However, the loses due to larger amount of photons hitting the walls is more
|
|---|
| 130 | // or less counteracted by the fact that more and more photon trajectories cross
|
|---|
| 131 | // the PMT photocathode twice, increasing the effective sensitivity of the PMT.
|
|---|
| 132 | //
|
|---|
| 133 | //Begin_Html
|
|---|
| 134 | /*
|
|---|
| 135 | <img src="images/Normalized_Cherenkov_phe_spectrums_20deg_60deg_coatedPMT.png">
|
|---|
| 136 | */
|
|---|
| 137 | //End_Html
|
|---|
| 138 | //
|
|---|
| 139 | // The plot shows the normalized spectrum of photo-electrons preceding from
|
|---|
| 140 | // a typical spectrum of Cherenkov photons produced by an atmospheric shower. The
|
|---|
| 141 | // green line is for observation zenith angles of 20 deg. and the red line for
|
|---|
| 142 | // 60 deg. The overall effective QE drops from about 20.8 to about 19.8.
|
|---|
| 143 | //
|
|---|
| 144 | // Jurgen Gebauer did some quick measurements about this issue. I attach a
|
|---|
| 145 | // plot. You can see that the angular dependence is (more or less) in agreement with a
|
|---|
| 146 | // CosTheta function (below 20-25 degrees), which is the variation of the entrance
|
|---|
| 147 | // window cross section. So, in first approximation, no losses when increasing light
|
|---|
| 148 | // incidence angle; and therefore, the factor 0.94.
|
|---|
| 149 | //
|
|---|
| 150 | //Begin_Html
|
|---|
| 151 | /*
|
|---|
| 152 | <img src="images/JuergensMeasurementWithCosThetaCurve.png">
|
|---|
| 153 | */
|
|---|
| 154 | //End_Html
|
|---|
| 155 | //
|
|---|
| 156 | // The Quantum efficiencies for individual colours have been taken from:
|
|---|
| 157 | // D. Paneque et al., A Method to enhance the sensitivity of photomultipliers
|
|---|
| 158 | // of air Cherenkov Telescopes, NIM A 504, 2003, 109-115
|
|---|
| 159 | // (see following figure)
|
|---|
| 160 | //
|
|---|
| 161 | //Begin_Html
|
|---|
| 162 | /*
|
|---|
| 163 | <img src="images/QE_Paneque.png">
|
|---|
| 164 | */
|
|---|
| 165 | //End_Html
|
|---|
| 166 | //
|
|---|
| 167 | // The Transmission of the Plexiglass window has been provided by Eckart and is
|
|---|
| 168 | // displayed in the next plot. The above red curve has to be taken since it corresponds
|
|---|
| 169 | // to the glass type set on the camera.
|
|---|
| 170 | //
|
|---|
| 171 | //Begin_Html
|
|---|
| 172 | /*
|
|---|
| 173 | <img src="images/Transmission_Plexiglass.jpg">
|
|---|
| 174 | */
|
|---|
| 175 | //End_Html
|
|---|
| 176 | //
|
|---|
| 177 | // See also: MJCalibration, MCalibrationChargeCalc,
|
|---|
| 178 | // MCalibrationChargeCam, MCalibrationChargePix,
|
|---|
| 179 | // MHCalibrationChargeCam, MHCalibrationChargePix,
|
|---|
| 180 | // MHCalibrationChargePINDiode, MHCalibrationChargeBlindPix
|
|---|
| 181 | //
|
|---|
| 182 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 183 | #include "MCalibrationQEPix.h"
|
|---|
| 184 | #include "MCalibrationCam.h"
|
|---|
| 185 |
|
|---|
| 186 | #include "MLog.h"
|
|---|
| 187 | #include "MLogManip.h"
|
|---|
| 188 |
|
|---|
| 189 | #include "TArrayF.h"
|
|---|
| 190 | #include "TArrayC.h"
|
|---|
| 191 |
|
|---|
| 192 | ClassImp(MCalibrationQEPix);
|
|---|
| 193 |
|
|---|
| 194 | using namespace std;
|
|---|
| 195 |
|
|---|
| 196 | const Float_t MCalibrationQEPix::gkDefaultQEGreen = 0.192;
|
|---|
| 197 | const Float_t MCalibrationQEPix::gkDefaultQEBlue = 0.27;
|
|---|
| 198 | const Float_t MCalibrationQEPix::gkDefaultQEUV = 0.285;
|
|---|
| 199 | const Float_t MCalibrationQEPix::gkDefaultQECT1 = 0.285;
|
|---|
| 200 | const Float_t MCalibrationQEPix::gkDefaultQEGreenErr = 0.007;
|
|---|
| 201 | const Float_t MCalibrationQEPix::gkDefaultQEBlueErr = 0.01 ;
|
|---|
| 202 | const Float_t MCalibrationQEPix::gkDefaultQEUVErr = 0.012;
|
|---|
| 203 | const Float_t MCalibrationQEPix::gkDefaultQECT1Err = 0.012;
|
|---|
| 204 | const Float_t MCalibrationQEPix::gkDefaultAverageQE = 0.18 ;
|
|---|
| 205 | const Float_t MCalibrationQEPix::gkDefaultAverageQEErr = 0.02 ;
|
|---|
| 206 | const Float_t MCalibrationQEPix::gkPMTCollectionEff = 0.90 ;
|
|---|
| 207 | const Float_t MCalibrationQEPix::gkPMTCollectionEffErr = 0.01 ;
|
|---|
| 208 | const Float_t MCalibrationQEPix::gkLightGuidesEffGreen = 0.94 ;
|
|---|
| 209 | const Float_t MCalibrationQEPix::gkLightGuidesEffGreenErr = 0.03 ;
|
|---|
| 210 | const Float_t MCalibrationQEPix::gkLightGuidesEffBlue = 0.94 ;
|
|---|
| 211 | const Float_t MCalibrationQEPix::gkLightGuidesEffBlueErr = 0.03 ;
|
|---|
| 212 | const Float_t MCalibrationQEPix::gkLightGuidesEffUV = 0.94 ;
|
|---|
| 213 | const Float_t MCalibrationQEPix::gkLightGuidesEffUVErr = 0.03 ;
|
|---|
| 214 | const Float_t MCalibrationQEPix::gkLightGuidesEffCT1 = 0.94 ;
|
|---|
| 215 | const Float_t MCalibrationQEPix::gkLightGuidesEffCT1Err = 0.03 ;
|
|---|
| 216 | // --------------------------------------------------------------------------
|
|---|
| 217 | //
|
|---|
| 218 | // Default Constructor:
|
|---|
| 219 | //
|
|---|
| 220 | // Initializes all TArrays to MCalibrationCam::gkNumPulserColors
|
|---|
| 221 | //
|
|---|
| 222 | // Calls:
|
|---|
| 223 | // - Clear()
|
|---|
| 224 | //
|
|---|
| 225 | MCalibrationQEPix::MCalibrationQEPix(const char *name, const char *title)
|
|---|
| 226 | : fAverageQE ( gkDefaultAverageQE )
|
|---|
| 227 | {
|
|---|
| 228 |
|
|---|
| 229 | fName = name ? name : "MCalibrationQEPix";
|
|---|
| 230 | fTitle = title ? title : "Container of the calibrated quantum efficiency ";
|
|---|
| 231 |
|
|---|
| 232 | fQEBlindPixel .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 233 | fQEBlindPixelVar .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 234 | fQECombined .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 235 | fQECombinedVar .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 236 | fQEFFactor .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 237 | fQEFFactorVar .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 238 | fQEPINDiode .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 239 | fQEPINDiodeVar .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 240 | fValidFlags .Set( MCalibrationCam::gkNumPulserColors );
|
|---|
| 241 |
|
|---|
| 242 | Clear();
|
|---|
| 243 |
|
|---|
| 244 | }
|
|---|
| 245 |
|
|---|
| 246 | // ----------------------------------------------------------------------------------------------
|
|---|
| 247 | //
|
|---|
| 248 | // Search all available QE's of a certain colour after the blind pixel method,
|
|---|
| 249 | // compare them to the default QE of that colour and
|
|---|
| 250 | // add up a weighted average (wav) and a sum of weights (sumw)
|
|---|
| 251 | //
|
|---|
| 252 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
|---|
| 253 | //
|
|---|
| 254 | void MCalibrationQEPix::AddAverageBlindPixelQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
|---|
| 255 | {
|
|---|
| 256 |
|
|---|
| 257 | if (IsBlindPixelMethodValid (col))
|
|---|
| 258 | {
|
|---|
| 259 | const Float_t newavqe = GetQEBlindPixel (col) / GetDefaultQE (col)
|
|---|
| 260 | / GetLightGuidesEff (col) / GetPMTCollectionEff();
|
|---|
| 261 | const Float_t newavqevar = ( GetQEBlindPixelRelVar(col) + GetDefaultQERelVar(col)
|
|---|
| 262 | + GetLightGuidesEffRelVar(col) + GetPMTCollectionEffRelVar() )
|
|---|
| 263 | * newavqe * newavqe;
|
|---|
| 264 | const Float_t weight = 1./newavqevar;
|
|---|
| 265 |
|
|---|
| 266 | wav += newavqe * weight;
|
|---|
| 267 | sumw += weight;
|
|---|
| 268 | }
|
|---|
| 269 | }
|
|---|
| 270 |
|
|---|
| 271 | // ----------------------------------------------------------------------------------------------
|
|---|
| 272 | //
|
|---|
| 273 | // Search all available QE's of a certain colour after the combination of the three methods
|
|---|
| 274 | // compare them to the default QE of that colour and
|
|---|
| 275 | // add up a weighted average (wav) and a sum of weights (sumw)
|
|---|
| 276 | //
|
|---|
| 277 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
|---|
| 278 | //
|
|---|
| 279 | void MCalibrationQEPix::AddAverageCombinedQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
|---|
| 280 | {
|
|---|
| 281 |
|
|---|
| 282 | if (IsCombinedMethodValid (col))
|
|---|
| 283 | {
|
|---|
| 284 | const Float_t newavqe = GetQECombined(col) / GetDefaultQE (col)
|
|---|
| 285 | / GetLightGuidesEff (col) / GetPMTCollectionEff();
|
|---|
| 286 | const Float_t newavqevar = ( GetQECombinedRelVar(col) + GetDefaultQERelVar(col)
|
|---|
| 287 | + GetLightGuidesEffRelVar(col) + GetPMTCollectionEffRelVar() )
|
|---|
| 288 | * newavqe * newavqe;
|
|---|
| 289 | const Float_t weight = 1./newavqevar;
|
|---|
| 290 | wav += newavqe * weight;
|
|---|
| 291 | sumw += weight;
|
|---|
| 292 |
|
|---|
| 293 | }
|
|---|
| 294 | }
|
|---|
| 295 |
|
|---|
| 296 | // ----------------------------------------------------------------------------------------------
|
|---|
| 297 | //
|
|---|
| 298 | // Search all available QE's of a certain colour after the F-Factor method,
|
|---|
| 299 | // compare them to the default QE of that colour and
|
|---|
| 300 | // add up a weighted average (wav) and a sum of weights (sumw)
|
|---|
| 301 | //
|
|---|
| 302 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
|---|
| 303 | //
|
|---|
| 304 | void MCalibrationQEPix::AddAverageFFactorQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
|---|
| 305 | {
|
|---|
| 306 |
|
|---|
| 307 | if (IsFFactorMethodValid (col))
|
|---|
| 308 | {
|
|---|
| 309 | const Float_t newavqe = GetQEFFactor(col) / GetDefaultQE (col)
|
|---|
| 310 | / GetLightGuidesEff (col) / GetPMTCollectionEff();
|
|---|
| 311 | const Float_t newavqevar = ( GetQEFFactorRelVar(col) + GetDefaultQERelVar(col)
|
|---|
| 312 | + GetLightGuidesEffRelVar(col) + GetPMTCollectionEffRelVar() )
|
|---|
| 313 | * newavqe * newavqe;
|
|---|
| 314 | const Float_t weight = 1./newavqevar;
|
|---|
| 315 |
|
|---|
| 316 | wav += newavqe *weight;
|
|---|
| 317 | sumw += weight;
|
|---|
| 318 |
|
|---|
| 319 | }
|
|---|
| 320 |
|
|---|
| 321 |
|
|---|
| 322 | }
|
|---|
| 323 |
|
|---|
| 324 | // ----------------------------------------------------------------------------------------------
|
|---|
| 325 | //
|
|---|
| 326 | // Search all available QE's of a certain colour after the PIN Diode method,
|
|---|
| 327 | // compare them to the default QE of that colour and
|
|---|
| 328 | // add up a weighted average (wav) and a sum of weights (sumw)
|
|---|
| 329 | //
|
|---|
| 330 | // FIXME: This has to be replaced by a decent fit the QE-spectrum!
|
|---|
| 331 | //
|
|---|
| 332 | void MCalibrationQEPix::AddAveragePINDiodeQEs(const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw )
|
|---|
| 333 | {
|
|---|
| 334 |
|
|---|
| 335 | if (IsPINDiodeMethodValid (col))
|
|---|
| 336 | {
|
|---|
| 337 | const Float_t newavqe = GetQEPINDiode(col) / GetDefaultQE (col)
|
|---|
| 338 | / GetLightGuidesEff (col) / GetPMTCollectionEff();
|
|---|
| 339 | const Float_t newavqevar = ( GetQEPINDiodeRelVar(col) + GetDefaultQERelVar(col)
|
|---|
| 340 | + GetLightGuidesEffRelVar(col) + GetPMTCollectionEffRelVar() )
|
|---|
| 341 | * newavqe * newavqe;
|
|---|
| 342 | const Float_t weight = 1./newavqevar;
|
|---|
| 343 | wav += newavqe *weight;
|
|---|
| 344 | sumw += weight;
|
|---|
| 345 | }
|
|---|
| 346 | }
|
|---|
| 347 |
|
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 | // ------------------------------------------------------------------------
|
|---|
| 351 | //
|
|---|
| 352 | // Sets all quantum efficiencies to the gkDefaultQE*
|
|---|
| 353 | // Sets all Variances to the square root of gkDefaultQE*Err
|
|---|
| 354 | // Sets all flags to kFALSE
|
|---|
| 355 | // Sets all fAvNorm-Variables to 1.;
|
|---|
| 356 | // Sets all fAvNorm-Variances to 0.;
|
|---|
| 357 | //
|
|---|
| 358 | // Calls:
|
|---|
| 359 | // - MCalibrationPix::Clear()
|
|---|
| 360 | //
|
|---|
| 361 | void MCalibrationQEPix::Clear(Option_t *o)
|
|---|
| 362 | {
|
|---|
| 363 |
|
|---|
| 364 | SetAverageQEBlindPixelAvailable ( kFALSE );
|
|---|
| 365 | SetAverageQEFFactorAvailable ( kFALSE );
|
|---|
| 366 | SetAverageQECombinedAvailable ( kFALSE );
|
|---|
| 367 | SetAverageQEPINDiodeAvailable ( kFALSE );
|
|---|
| 368 |
|
|---|
| 369 | fQEBlindPixel [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
|---|
| 370 | fQEBlindPixelVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
|---|
| 371 | fQEFFactor [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
|---|
| 372 | fQEFFactorVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
|---|
| 373 | fQECombined [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
|---|
| 374 | fQECombinedVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
|---|
| 375 | fQEPINDiode [ MCalibrationCam::kGREEN ] = gkDefaultQEGreen;
|
|---|
| 376 | fQEPINDiodeVar [ MCalibrationCam::kGREEN ] = gkDefaultQEGreenErr*gkDefaultQEGreenErr;
|
|---|
| 377 |
|
|---|
| 378 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 379 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 380 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 381 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 382 |
|
|---|
| 383 | fQEBlindPixel [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
|---|
| 384 | fQEBlindPixelVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
|---|
| 385 | fQEFFactor [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
|---|
| 386 | fQEFFactorVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
|---|
| 387 | fQECombined [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
|---|
| 388 | fQECombinedVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
|---|
| 389 | fQEPINDiode [ MCalibrationCam::kBLUE ] = gkDefaultQEBlue;
|
|---|
| 390 | fQEPINDiodeVar [ MCalibrationCam::kBLUE ] = gkDefaultQEBlueErr*gkDefaultQEBlueErr;
|
|---|
| 391 |
|
|---|
| 392 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 393 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 394 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 395 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 396 |
|
|---|
| 397 | fQEBlindPixel [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
|---|
| 398 | fQEBlindPixelVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
|---|
| 399 | fQEFFactor [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
|---|
| 400 | fQEFFactorVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
|---|
| 401 | fQECombined [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
|---|
| 402 | fQECombinedVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
|---|
| 403 | fQEPINDiode [ MCalibrationCam::kUV ] = gkDefaultQEUV;
|
|---|
| 404 | fQEPINDiodeVar [ MCalibrationCam::kUV ] = gkDefaultQEUVErr*gkDefaultQEUVErr;
|
|---|
| 405 |
|
|---|
| 406 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 407 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 408 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 409 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 410 |
|
|---|
| 411 | fQEBlindPixel [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
|---|
| 412 | fQEBlindPixelVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
|---|
| 413 | fQEFFactor [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
|---|
| 414 | fQEFFactorVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
|---|
| 415 | fQECombined [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
|---|
| 416 | fQECombinedVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
|---|
| 417 | fQEPINDiode [ MCalibrationCam::kCT1 ] = gkDefaultQECT1;
|
|---|
| 418 | fQEPINDiodeVar [ MCalibrationCam::kCT1 ] = gkDefaultQECT1Err*gkDefaultQECT1Err;
|
|---|
| 419 |
|
|---|
| 420 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 421 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 422 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 423 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 424 |
|
|---|
| 425 | fAvNormBlindPixel = 1.;
|
|---|
| 426 | fAvNormBlindPixelVar = 0.;
|
|---|
| 427 | fAvNormCombined = 1.;
|
|---|
| 428 | fAvNormCombinedVar = 0.;
|
|---|
| 429 | fAvNormFFactor = 1.;
|
|---|
| 430 | fAvNormFFactorVar = 0.;
|
|---|
| 431 | fAvNormPINDiode = 1.;
|
|---|
| 432 | fAvNormPINDiodeVar = 0.;
|
|---|
| 433 |
|
|---|
| 434 | MCalibrationPix::Clear();
|
|---|
| 435 | }
|
|---|
| 436 |
|
|---|
| 437 |
|
|---|
| 438 | // -----------------------------------------------------------------
|
|---|
| 439 | //
|
|---|
| 440 | // Return the average Default QE (depending on zenith angle)
|
|---|
| 441 | // FIXME: The zenith angle dependency is not yet implemented
|
|---|
| 442 | //
|
|---|
| 443 | const Float_t MCalibrationQEPix::GetAverageQE( const Float_t zenith ) const
|
|---|
| 444 | {
|
|---|
| 445 | // return gkDefaultAverageQE ;
|
|---|
| 446 | return fAverageQE;
|
|---|
| 447 | }
|
|---|
| 448 |
|
|---|
| 449 | // -----------------------------------------------------------------
|
|---|
| 450 | //
|
|---|
| 451 | // Return the relative variance of the average Default QE (depending on zenith angle)
|
|---|
| 452 | // FIXME: The zenith angle dependency is not yet implemented
|
|---|
| 453 | //
|
|---|
| 454 | const Float_t MCalibrationQEPix::GetAverageQERelVar( const Float_t zenith ) const
|
|---|
| 455 | {
|
|---|
| 456 | return gkDefaultAverageQEErr * gkDefaultAverageQEErr / (gkDefaultAverageQE * gkDefaultAverageQE );
|
|---|
| 457 | }
|
|---|
| 458 |
|
|---|
| 459 | // -----------------------------------------------------------------
|
|---|
| 460 | //
|
|---|
| 461 | // Return the relative variance of the average normalization (Blind Pixel Method)
|
|---|
| 462 | // FIXME: The zenith angle dependency is not yet implemented
|
|---|
| 463 | //
|
|---|
| 464 | const Float_t MCalibrationQEPix::GetAvNormBlindPixelRelVar( ) const
|
|---|
| 465 | {
|
|---|
| 466 | return fAvNormBlindPixelVar / (fAvNormBlindPixel * fAvNormBlindPixel );
|
|---|
| 467 | }
|
|---|
| 468 |
|
|---|
| 469 | // -----------------------------------------------------------------
|
|---|
| 470 | //
|
|---|
| 471 | // Return the relative variance of the average normalization (Combined Method)
|
|---|
| 472 | // FIXME: The zenith angle dependency is not yet implemented
|
|---|
| 473 | //
|
|---|
| 474 | const Float_t MCalibrationQEPix::GetAvNormCombinedRelVar( ) const
|
|---|
| 475 | {
|
|---|
| 476 | return fAvNormCombinedVar / (fAvNormCombined * fAvNormCombined );
|
|---|
| 477 | }
|
|---|
| 478 |
|
|---|
| 479 | // -----------------------------------------------------------------
|
|---|
| 480 | //
|
|---|
| 481 | // Return the relative variance of the average normalization (F-Factor Method)
|
|---|
| 482 | //
|
|---|
| 483 | const Float_t MCalibrationQEPix::GetAvNormFFactorRelVar( ) const
|
|---|
| 484 | {
|
|---|
| 485 | return fAvNormFFactorVar / (fAvNormFFactor * fAvNormFFactor );
|
|---|
| 486 | }
|
|---|
| 487 |
|
|---|
| 488 | // -----------------------------------------------------------------
|
|---|
| 489 | //
|
|---|
| 490 | // Return the relative variance of the average normalization (PIN Diode Method)
|
|---|
| 491 | // FIXME: The zenith angle dependency is not yet implemented
|
|---|
| 492 | //
|
|---|
| 493 | const Float_t MCalibrationQEPix::GetAvNormPINDiodeRelVar( ) const
|
|---|
| 494 | {
|
|---|
| 495 | return fAvNormPINDiodeVar / (fAvNormPINDiode * fAvNormPINDiode );
|
|---|
| 496 | }
|
|---|
| 497 |
|
|---|
| 498 | // ------------------------------------------------------------------------------
|
|---|
| 499 | //
|
|---|
| 500 | // Get the default Quantum efficiency for pulser colour "col"
|
|---|
| 501 | //
|
|---|
| 502 | Float_t MCalibrationQEPix::GetDefaultQE( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 503 | {
|
|---|
| 504 | switch (col)
|
|---|
| 505 | {
|
|---|
| 506 | case MCalibrationCam::kGREEN:
|
|---|
| 507 | return gkDefaultQEGreen;
|
|---|
| 508 | break;
|
|---|
| 509 | case MCalibrationCam::kBLUE:
|
|---|
| 510 | return gkDefaultQEBlue;
|
|---|
| 511 | break;
|
|---|
| 512 | case MCalibrationCam::kUV:
|
|---|
| 513 | return gkDefaultQEUV;
|
|---|
| 514 | break;
|
|---|
| 515 | case MCalibrationCam::kCT1:
|
|---|
| 516 | return gkDefaultQECT1;
|
|---|
| 517 | break;
|
|---|
| 518 | default:
|
|---|
| 519 | return gkDefaultQECT1;
|
|---|
| 520 | break;
|
|---|
| 521 | }
|
|---|
| 522 | return -1.;
|
|---|
| 523 | }
|
|---|
| 524 |
|
|---|
| 525 | // ------------------------------------------------------------------------------
|
|---|
| 526 | //
|
|---|
| 527 | // Get the relative variance of the default Quantum efficiency for pulser colour "col"
|
|---|
| 528 | //
|
|---|
| 529 | Float_t MCalibrationQEPix::GetDefaultQERelVar( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 530 | {
|
|---|
| 531 |
|
|---|
| 532 | switch (col)
|
|---|
| 533 | {
|
|---|
| 534 | case MCalibrationCam::kGREEN:
|
|---|
| 535 | return gkDefaultQEGreenErr * gkDefaultQEGreenErr / (gkDefaultQEGreen * gkDefaultQEGreen );
|
|---|
| 536 | break;
|
|---|
| 537 | case MCalibrationCam::kBLUE:
|
|---|
| 538 | return gkDefaultQEBlueErr * gkDefaultQEBlueErr / (gkDefaultQEBlue * gkDefaultQEBlue );
|
|---|
| 539 | break;
|
|---|
| 540 | case MCalibrationCam::kUV:
|
|---|
| 541 | return gkDefaultQEUVErr * gkDefaultQEUVErr / (gkDefaultQEUV * gkDefaultQEUV );
|
|---|
| 542 | break;
|
|---|
| 543 | case MCalibrationCam::kCT1:
|
|---|
| 544 | return gkDefaultQECT1Err * gkDefaultQECT1Err / (gkDefaultQECT1 * gkDefaultQECT1 );
|
|---|
| 545 | break;
|
|---|
| 546 | default:
|
|---|
| 547 | return gkDefaultQECT1Err * gkDefaultQECT1Err / (gkDefaultQECT1 * gkDefaultQECT1 );
|
|---|
| 548 | break;
|
|---|
| 549 | }
|
|---|
| 550 | return -1.;
|
|---|
| 551 | }
|
|---|
| 552 |
|
|---|
| 553 | // ------------------------------------------------------------------------------
|
|---|
| 554 | //
|
|---|
| 555 | // Get the light guides efficiency depending on the pulser colour "col"
|
|---|
| 556 | // FIXME: Lacking detailed measurement, these number are not yet available
|
|---|
| 557 | // for the individual colours and therefore, only one same number is
|
|---|
| 558 | // returned, namely gkLightGuidesEff
|
|---|
| 559 | //
|
|---|
| 560 | Float_t MCalibrationQEPix::GetLightGuidesEff( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 561 | {
|
|---|
| 562 | switch (col)
|
|---|
| 563 | {
|
|---|
| 564 | case MCalibrationCam::kGREEN:
|
|---|
| 565 | return gkLightGuidesEffGreen;
|
|---|
| 566 | break;
|
|---|
| 567 | case MCalibrationCam::kBLUE:
|
|---|
| 568 | return gkLightGuidesEffBlue;
|
|---|
| 569 | break;
|
|---|
| 570 | case MCalibrationCam::kUV:
|
|---|
| 571 | return gkLightGuidesEffUV;
|
|---|
| 572 | break;
|
|---|
| 573 | case MCalibrationCam::kCT1:
|
|---|
| 574 | return gkLightGuidesEffCT1;
|
|---|
| 575 | break;
|
|---|
| 576 | default:
|
|---|
| 577 | return gkLightGuidesEffCT1;
|
|---|
| 578 | break;
|
|---|
| 579 | }
|
|---|
| 580 | return -1.;
|
|---|
| 581 | }
|
|---|
| 582 |
|
|---|
| 583 | // ------------------------------------------------------------------------------
|
|---|
| 584 | //
|
|---|
| 585 | // Get the relative variance of the light guides efficiency depending on the
|
|---|
| 586 | // pulser colour "col"
|
|---|
| 587 | // FIXME: Lacking detailed measurement, these number are not yet available
|
|---|
| 588 | // for the individual colours and therefore, only one same number is
|
|---|
| 589 | // returned, namely gkLightGuidesEffErr^2 / gkLightGuidesEff^2
|
|---|
| 590 | //
|
|---|
| 591 | Float_t MCalibrationQEPix::GetLightGuidesEffRelVar( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 592 | {
|
|---|
| 593 |
|
|---|
| 594 | switch (col)
|
|---|
| 595 | {
|
|---|
| 596 | case MCalibrationCam::kGREEN:
|
|---|
| 597 | return gkLightGuidesEffGreenErr * gkLightGuidesEffGreenErr / gkLightGuidesEffGreen / gkLightGuidesEffGreen;
|
|---|
| 598 | break;
|
|---|
| 599 | case MCalibrationCam::kBLUE:
|
|---|
| 600 | return gkLightGuidesEffBlueErr * gkLightGuidesEffBlueErr / gkLightGuidesEffBlue / gkLightGuidesEffBlue;
|
|---|
| 601 | break;
|
|---|
| 602 | case MCalibrationCam::kUV:
|
|---|
| 603 | return gkLightGuidesEffUVErr * gkLightGuidesEffUVErr / gkLightGuidesEffUV / gkLightGuidesEffUV;
|
|---|
| 604 | break;
|
|---|
| 605 | case MCalibrationCam::kCT1:
|
|---|
| 606 | return gkLightGuidesEffCT1Err * gkLightGuidesEffCT1Err / gkLightGuidesEffCT1 / gkLightGuidesEffCT1;
|
|---|
| 607 | break;
|
|---|
| 608 | default:
|
|---|
| 609 | return gkLightGuidesEffCT1Err * gkLightGuidesEffCT1Err / gkLightGuidesEffCT1 / gkLightGuidesEffCT1;
|
|---|
| 610 | break;
|
|---|
| 611 | }
|
|---|
| 612 | return -1.;
|
|---|
| 613 | }
|
|---|
| 614 |
|
|---|
| 615 | // ------------------------------------------------------------------------------
|
|---|
| 616 | //
|
|---|
| 617 | // Get the light guides efficiency for Cherenkov spectra,
|
|---|
| 618 | // depending on the zenith angle of the telescope
|
|---|
| 619 | // FIXME: Lacking detailed measurement, these number are not yet available
|
|---|
| 620 | // for the individual colours and therefore, only one same number is
|
|---|
| 621 | // returned, namely gkLightGuidesEffBlue
|
|---|
| 622 | //
|
|---|
| 623 | Float_t MCalibrationQEPix::GetLightGuidesEff( const Float_t zenith ) const
|
|---|
| 624 | {
|
|---|
| 625 | return gkLightGuidesEffBlue;
|
|---|
| 626 | }
|
|---|
| 627 |
|
|---|
| 628 |
|
|---|
| 629 | // ------------------------------------------------------------------------------
|
|---|
| 630 | //
|
|---|
| 631 | // Get the relative variance of the light guides efficiency for Cherenkov spectra
|
|---|
| 632 | // depending on the zenith angle of the telescope
|
|---|
| 633 | // FIXME: Lacking detailed measurement, these number are not yet available
|
|---|
| 634 | // for the individual colours and therefore, only one same number is
|
|---|
| 635 | // returned, namely gkLightGuidesEffBlueErr^2 / gkLightGuidesBlueEff^2
|
|---|
| 636 | //
|
|---|
| 637 | Float_t MCalibrationQEPix::GetLightGuidesEffRelVar( const Float_t zenith ) const
|
|---|
| 638 | {
|
|---|
| 639 | return gkLightGuidesEffBlueErr * gkLightGuidesEffBlueErr / gkLightGuidesEffBlue / gkLightGuidesEffBlue;
|
|---|
| 640 | }
|
|---|
| 641 |
|
|---|
| 642 |
|
|---|
| 643 |
|
|---|
| 644 | // ------------------------------------------------------------------------------
|
|---|
| 645 | //
|
|---|
| 646 | // Get the calculated Quantum efficiency with the blind pixel method,
|
|---|
| 647 | // obtained with pulser colour "col"
|
|---|
| 648 | //
|
|---|
| 649 | Float_t MCalibrationQEPix::GetQEBlindPixel( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 650 | {
|
|---|
| 651 | return fQEBlindPixel[col];
|
|---|
| 652 | }
|
|---|
| 653 |
|
|---|
| 654 | // ------------------------------------------------------------------------------
|
|---|
| 655 | //
|
|---|
| 656 | // Get the error on the calculated Quantum efficiency with the blind pixel method,
|
|---|
| 657 | // obtained with pulser colour "col"
|
|---|
| 658 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 659 | // and returns -1. in that case
|
|---|
| 660 | //
|
|---|
| 661 | Float_t MCalibrationQEPix::GetQEBlindPixelErr( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 662 | {
|
|---|
| 663 |
|
|---|
| 664 | if (fQEBlindPixelVar[col] < 0.)
|
|---|
| 665 | return -1.;
|
|---|
| 666 |
|
|---|
| 667 | return TMath::Sqrt(fQEBlindPixelVar[col]);
|
|---|
| 668 |
|
|---|
| 669 | }
|
|---|
| 670 |
|
|---|
| 671 | // ------------------------------------------------------------------------------
|
|---|
| 672 | //
|
|---|
| 673 | // Get the relative variance of the calculated Quantum efficiency with the blind pixel method,
|
|---|
| 674 | // obtained with pulser colour "col"
|
|---|
| 675 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 676 | // and returns -1. in that case
|
|---|
| 677 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
|---|
| 678 | //
|
|---|
| 679 | Float_t MCalibrationQEPix::GetQEBlindPixelRelVar( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 680 | {
|
|---|
| 681 |
|
|---|
| 682 | if (fQEBlindPixelVar[col] < 0.)
|
|---|
| 683 | return -1.;
|
|---|
| 684 | if (fQEBlindPixel[col] < 0.)
|
|---|
| 685 | return -1.;
|
|---|
| 686 | return fQEBlindPixelVar[col] / ( fQEBlindPixel[col] * fQEBlindPixel[col] );
|
|---|
| 687 |
|
|---|
| 688 | }
|
|---|
| 689 |
|
|---|
| 690 | // ------------------------------------------------------------------------------
|
|---|
| 691 | //
|
|---|
| 692 | // Get the calculated Quantum efficiency with the combination of the three methods
|
|---|
| 693 | // obtained with pulser colour "col"
|
|---|
| 694 | //
|
|---|
| 695 | Float_t MCalibrationQEPix::GetQECombined( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 696 | {
|
|---|
| 697 | return fQECombined[col];
|
|---|
| 698 | }
|
|---|
| 699 |
|
|---|
| 700 |
|
|---|
| 701 | // ------------------------------------------------------------------------------
|
|---|
| 702 | //
|
|---|
| 703 | // Get the error on the calculated Quantum efficiency with the combination of the three methods
|
|---|
| 704 | // obtained with pulser colour "col"
|
|---|
| 705 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 706 | // and returns -1. in that case
|
|---|
| 707 | //
|
|---|
| 708 | Float_t MCalibrationQEPix::GetQECombinedErr( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 709 | {
|
|---|
| 710 |
|
|---|
| 711 | if (fQECombinedVar[col] < 0.)
|
|---|
| 712 | return -1.;
|
|---|
| 713 |
|
|---|
| 714 | return TMath::Sqrt(fQECombinedVar[col]);
|
|---|
| 715 |
|
|---|
| 716 | }
|
|---|
| 717 |
|
|---|
| 718 |
|
|---|
| 719 | // ----------------------------------------------------------------------------------------
|
|---|
| 720 | //
|
|---|
| 721 | // Get the relative variance of the calculated Quantum efficiency with the combination of
|
|---|
| 722 | // the three methods,
|
|---|
| 723 | // obtained with pulser colour "col"
|
|---|
| 724 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 725 | // and returns -1. in that case
|
|---|
| 726 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
|---|
| 727 | //
|
|---|
| 728 | Float_t MCalibrationQEPix::GetQECombinedRelVar( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 729 | {
|
|---|
| 730 |
|
|---|
| 731 | if (fQECombinedVar[col] < 0.)
|
|---|
| 732 | return -1.;
|
|---|
| 733 | if (fQECombined[col] < 0.)
|
|---|
| 734 | return -1.;
|
|---|
| 735 | return fQECombinedVar[col] / ( fQECombined[col] * fQECombined[col] );
|
|---|
| 736 |
|
|---|
| 737 | }
|
|---|
| 738 |
|
|---|
| 739 | // ------------------------------------------------------------------------------
|
|---|
| 740 | //
|
|---|
| 741 | // Get the calculated Quantum efficiency with the F-Factor method
|
|---|
| 742 | // obtained with pulser colour "col"
|
|---|
| 743 | //
|
|---|
| 744 | Float_t MCalibrationQEPix::GetQEFFactor( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 745 | {
|
|---|
| 746 | return fQEFFactor[col];
|
|---|
| 747 | }
|
|---|
| 748 |
|
|---|
| 749 |
|
|---|
| 750 | // ------------------------------------------------------------------------------
|
|---|
| 751 | //
|
|---|
| 752 | // Get the error on the calculated Quantum efficiency with the F-Factor method,
|
|---|
| 753 | // obtained with pulser colour "col"
|
|---|
| 754 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 755 | // and returns -1. in that case
|
|---|
| 756 | //
|
|---|
| 757 | Float_t MCalibrationQEPix::GetQEFFactorErr( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 758 | {
|
|---|
| 759 |
|
|---|
| 760 | if (fQEFFactorVar[col] < 0.)
|
|---|
| 761 | return -1.;
|
|---|
| 762 |
|
|---|
| 763 | return TMath::Sqrt(fQEFFactorVar[col]);
|
|---|
| 764 |
|
|---|
| 765 | }
|
|---|
| 766 |
|
|---|
| 767 |
|
|---|
| 768 | // ----------------------------------------------------------------------------------------
|
|---|
| 769 | //
|
|---|
| 770 | // Get the relative variance of the calculated Quantum efficiency with the F-Factor method,
|
|---|
| 771 | // obtained with pulser colour "col"
|
|---|
| 772 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 773 | // and returns -1. in that case
|
|---|
| 774 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
|---|
| 775 | //
|
|---|
| 776 | Float_t MCalibrationQEPix::GetQEFFactorRelVar( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 777 | {
|
|---|
| 778 |
|
|---|
| 779 | if (fQEFFactorVar[col] < 0.)
|
|---|
| 780 | return -1.;
|
|---|
| 781 | if (fQEFFactor[col] < 0.)
|
|---|
| 782 | return -1.;
|
|---|
| 783 | return fQEFFactorVar[col] / ( fQEFFactor[col] * fQEFFactor[col] );
|
|---|
| 784 |
|
|---|
| 785 | }
|
|---|
| 786 |
|
|---|
| 787 | // ------------------------------------------------------------------------------
|
|---|
| 788 | //
|
|---|
| 789 | // Get the calculated Quantum efficiency with the PIN-Diode method
|
|---|
| 790 | // obtained with pulser colour "col"
|
|---|
| 791 | //
|
|---|
| 792 | Float_t MCalibrationQEPix::GetQEPINDiode( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 793 | {
|
|---|
| 794 | return fQEPINDiode[col];
|
|---|
| 795 | }
|
|---|
| 796 |
|
|---|
| 797 |
|
|---|
| 798 | // ------------------------------------------------------------------------------
|
|---|
| 799 | //
|
|---|
| 800 | // Get the error on the calculated Quantum efficiency with the PIN Diode method,
|
|---|
| 801 | // obtained with pulser colour "col"
|
|---|
| 802 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 803 | // and returns -1. in that case
|
|---|
| 804 | //
|
|---|
| 805 | Float_t MCalibrationQEPix::GetQEPINDiodeErr( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 806 | {
|
|---|
| 807 |
|
|---|
| 808 | if (fQEPINDiodeVar[col] < 0.)
|
|---|
| 809 | return -1.;
|
|---|
| 810 |
|
|---|
| 811 | return TMath::Sqrt(fQEPINDiodeVar[col]);
|
|---|
| 812 |
|
|---|
| 813 | }
|
|---|
| 814 |
|
|---|
| 815 | // ----------------------------------------------------------------------------------------
|
|---|
| 816 | //
|
|---|
| 817 | // Get the relative variance of the calculated Quantum efficiency with the PIN Diode method,
|
|---|
| 818 | // obtained with pulser colour "col"
|
|---|
| 819 | // Tests for variances smaller than 0. (e.g. if it has not yet been set)
|
|---|
| 820 | // and returns -1. in that case
|
|---|
| 821 | // Tests for quantum efficiency equal to 0. and returns -1. in that case
|
|---|
| 822 | //
|
|---|
| 823 | Float_t MCalibrationQEPix::GetQEPINDiodeRelVar( const MCalibrationCam::PulserColor_t col ) const
|
|---|
| 824 | {
|
|---|
| 825 |
|
|---|
| 826 | if (fQEPINDiodeVar[col] < 0.)
|
|---|
| 827 | return -1.;
|
|---|
| 828 | if (fQEPINDiode[col] < 0.)
|
|---|
| 829 | return -1.;
|
|---|
| 830 | return fQEPINDiodeVar[col] / ( fQEPINDiode[col] * fQEPINDiode[col] );
|
|---|
| 831 |
|
|---|
| 832 | }
|
|---|
| 833 |
|
|---|
| 834 | // ------------------------------------------------------------------------------
|
|---|
| 835 | //
|
|---|
| 836 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
|---|
| 837 | // with the blind pixel method and averaged over the results from the different colours.
|
|---|
| 838 | //
|
|---|
| 839 | Float_t MCalibrationQEPix::GetQECascadesBlindPixel( const Float_t zenith ) const
|
|---|
| 840 | {
|
|---|
| 841 | return fAvNormBlindPixel * GetAverageQE ( zenith );
|
|---|
| 842 | }
|
|---|
| 843 |
|
|---|
| 844 | // ------------------------------------------------------------------------------
|
|---|
| 845 | //
|
|---|
| 846 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 847 | // obtained with the blind pixel method and averaged over the results from the
|
|---|
| 848 | // different colours.
|
|---|
| 849 | //
|
|---|
| 850 | Float_t MCalibrationQEPix::GetQECascadesBlindPixelVar( const Float_t zenith ) const
|
|---|
| 851 | {
|
|---|
| 852 | return ( GetAvNormBlindPixelRelVar() + GetAverageQERelVar(zenith))
|
|---|
| 853 | * GetQECascadesBlindPixel(zenith) * GetQECascadesBlindPixel(zenith);
|
|---|
| 854 | }
|
|---|
| 855 |
|
|---|
| 856 | // ------------------------------------------------------------------------------
|
|---|
| 857 | //
|
|---|
| 858 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 859 | // obtained with the blind pixel method and averaged over the results from the
|
|---|
| 860 | // different colours.
|
|---|
| 861 | //
|
|---|
| 862 | Float_t MCalibrationQEPix::GetQECascadesBlindPixelErr( const Float_t zenith ) const
|
|---|
| 863 | {
|
|---|
| 864 | const Float_t var = GetQECascadesBlindPixelVar(zenith);
|
|---|
| 865 |
|
|---|
| 866 | if (var < 0.)
|
|---|
| 867 | return -1.;
|
|---|
| 868 |
|
|---|
| 869 | return TMath::Sqrt(var);
|
|---|
| 870 | }
|
|---|
| 871 |
|
|---|
| 872 | // ------------------------------------------------------------------------------
|
|---|
| 873 | //
|
|---|
| 874 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
|---|
| 875 | // with the combination of the three methods and averaged over the results
|
|---|
| 876 | // from the different colours.
|
|---|
| 877 | //
|
|---|
| 878 | Float_t MCalibrationQEPix::GetQECascadesCombined( const Float_t zenith ) const
|
|---|
| 879 | {
|
|---|
| 880 | return fAvNormCombined * GetAverageQE ( zenith );
|
|---|
| 881 | }
|
|---|
| 882 |
|
|---|
| 883 | // ------------------------------------------------------------------------------
|
|---|
| 884 | //
|
|---|
| 885 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 886 | // obtained with the combined method and averaged over the results from the
|
|---|
| 887 | // different colours.
|
|---|
| 888 | //
|
|---|
| 889 | Float_t MCalibrationQEPix::GetQECascadesCombinedErr( const Float_t zenith ) const
|
|---|
| 890 | {
|
|---|
| 891 | const Float_t var = GetQECascadesCombinedVar(zenith);
|
|---|
| 892 |
|
|---|
| 893 | if (var < 0.)
|
|---|
| 894 | return -1.;
|
|---|
| 895 |
|
|---|
| 896 | return TMath::Sqrt(var);
|
|---|
| 897 | }
|
|---|
| 898 |
|
|---|
| 899 | // ------------------------------------------------------------------------------
|
|---|
| 900 | //
|
|---|
| 901 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 902 | // obtained with the combination of the three methods and averaged over the results from the
|
|---|
| 903 | // different colours.
|
|---|
| 904 | //
|
|---|
| 905 | Float_t MCalibrationQEPix::GetQECascadesCombinedVar( const Float_t zenith ) const
|
|---|
| 906 | {
|
|---|
| 907 | return ( GetAvNormCombinedRelVar() + GetAverageQERelVar(zenith))
|
|---|
| 908 | * GetQECascadesCombined(zenith) * GetQECascadesCombined(zenith);
|
|---|
| 909 | }
|
|---|
| 910 |
|
|---|
| 911 | // ------------------------------------------------------------------------------
|
|---|
| 912 | //
|
|---|
| 913 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
|---|
| 914 | // with the F-Factor method and averaged over the results from the different colours.
|
|---|
| 915 | //
|
|---|
| 916 | Float_t MCalibrationQEPix::GetQECascadesFFactor( const Float_t zenith ) const
|
|---|
| 917 | {
|
|---|
| 918 | return fAvNormFFactor * GetAverageQE ( zenith );
|
|---|
| 919 | }
|
|---|
| 920 |
|
|---|
| 921 | // ------------------------------------------------------------------------------
|
|---|
| 922 | //
|
|---|
| 923 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 924 | // obtained with the F-Factor method and averaged over the results from the
|
|---|
| 925 | // different colours.
|
|---|
| 926 | //
|
|---|
| 927 | Float_t MCalibrationQEPix::GetQECascadesFFactorErr( const Float_t zenith ) const
|
|---|
| 928 | {
|
|---|
| 929 | const Float_t var = GetQECascadesFFactorVar(zenith);
|
|---|
| 930 |
|
|---|
| 931 | if (var < 0.)
|
|---|
| 932 | return -1.;
|
|---|
| 933 |
|
|---|
| 934 | return TMath::Sqrt(var);
|
|---|
| 935 | }
|
|---|
| 936 |
|
|---|
| 937 | // ------------------------------------------------------------------------------
|
|---|
| 938 | //
|
|---|
| 939 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 940 | // obtained with the F-Factor method and averaged over the results from the
|
|---|
| 941 | // different colours.
|
|---|
| 942 | //
|
|---|
| 943 | Float_t MCalibrationQEPix::GetQECascadesFFactorVar( const Float_t zenith ) const
|
|---|
| 944 | {
|
|---|
| 945 | return ( GetAvNormFFactorRelVar() + GetAverageQERelVar(zenith))
|
|---|
| 946 | * GetQECascadesFFactor(zenith) * GetQECascadesFFactor(zenith);
|
|---|
| 947 | }
|
|---|
| 948 |
|
|---|
| 949 | // ------------------------------------------------------------------------------
|
|---|
| 950 | //
|
|---|
| 951 | // Get the averaged Quantum efficiency folded over the cascade spectrum, obtained
|
|---|
| 952 | // with the PIN Diode method and averaged over the results from the different colours.
|
|---|
| 953 | //
|
|---|
| 954 | Float_t MCalibrationQEPix::GetQECascadesPINDiode( const Float_t zenith ) const
|
|---|
| 955 | {
|
|---|
| 956 | return fAvNormPINDiode * GetAverageQE ( zenith );
|
|---|
| 957 | }
|
|---|
| 958 |
|
|---|
| 959 | // ------------------------------------------------------------------------------
|
|---|
| 960 | //
|
|---|
| 961 | // Get the error on the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 962 | // obtained with the PIN Diode method and averaged over the results from the
|
|---|
| 963 | // different colours.
|
|---|
| 964 | //
|
|---|
| 965 | Float_t MCalibrationQEPix::GetQECascadesPINDiodeErr( const Float_t zenith ) const
|
|---|
| 966 | {
|
|---|
| 967 | const Float_t var = GetQECascadesPINDiodeVar(zenith);
|
|---|
| 968 |
|
|---|
| 969 | if (var < 0.)
|
|---|
| 970 | return -1.;
|
|---|
| 971 |
|
|---|
| 972 | return TMath::Sqrt(var);
|
|---|
| 973 | }
|
|---|
| 974 |
|
|---|
| 975 | // ------------------------------------------------------------------------------
|
|---|
| 976 | //
|
|---|
| 977 | // Get the variance of the averaged Quantum efficiency folded over the cascade spectrum,
|
|---|
| 978 | // obtained with the PIN Diode method and averaged over the results from the
|
|---|
| 979 | // different colours.
|
|---|
| 980 | //
|
|---|
| 981 | Float_t MCalibrationQEPix::GetQECascadesPINDiodeVar( const Float_t zenith ) const
|
|---|
| 982 | {
|
|---|
| 983 | return ( GetAvNormPINDiodeRelVar() + GetAverageQERelVar(zenith))
|
|---|
| 984 | * GetQECascadesPINDiode(zenith) * GetQECascadesPINDiode(zenith);
|
|---|
| 985 | }
|
|---|
| 986 |
|
|---|
| 987 | // -----------------------------------------------------------------
|
|---|
| 988 | //
|
|---|
| 989 | // Return the overall collection efficiency of the PMT
|
|---|
| 990 | //
|
|---|
| 991 | Float_t MCalibrationQEPix::GetPMTCollectionEff() const
|
|---|
| 992 | {
|
|---|
| 993 | return gkPMTCollectionEff;
|
|---|
| 994 | }
|
|---|
| 995 |
|
|---|
| 996 | // -----------------------------------------------------------------
|
|---|
| 997 | //
|
|---|
| 998 | // Return the relative variance of the collection efficiency of the PMT
|
|---|
| 999 | //
|
|---|
| 1000 | Float_t MCalibrationQEPix::GetPMTCollectionEffRelVar() const
|
|---|
| 1001 | {
|
|---|
| 1002 | return gkPMTCollectionEffErr * gkPMTCollectionEffErr / gkPMTCollectionEff / gkPMTCollectionEff;
|
|---|
| 1003 | }
|
|---|
| 1004 |
|
|---|
| 1005 | // ------------------------------------------------------------------------------
|
|---|
| 1006 | //
|
|---|
| 1007 | // Test if the average QE can be obtained from the blind pixel method
|
|---|
| 1008 | //
|
|---|
| 1009 | Bool_t MCalibrationQEPix::IsAverageQEBlindPixelAvailable() const
|
|---|
| 1010 | {
|
|---|
| 1011 | return TESTBIT(fAvailableFlags,kAverageQEBlindPixelAvailable);
|
|---|
| 1012 | }
|
|---|
| 1013 |
|
|---|
| 1014 | // ------------------------------------------------------------------------------
|
|---|
| 1015 | //
|
|---|
| 1016 | // Test if the average QE can be obtained from the combination of the three methods
|
|---|
| 1017 | //
|
|---|
| 1018 | Bool_t MCalibrationQEPix::IsAverageQECombinedAvailable() const
|
|---|
| 1019 | {
|
|---|
| 1020 | return TESTBIT(fAvailableFlags,kAverageQECombinedAvailable);
|
|---|
| 1021 | }
|
|---|
| 1022 |
|
|---|
| 1023 | // ------------------------------------------------------------------------------
|
|---|
| 1024 | //
|
|---|
| 1025 | // Test if the average QE can be obtained from the F-Factor method
|
|---|
| 1026 | //
|
|---|
| 1027 | Bool_t MCalibrationQEPix::IsAverageQEFFactorAvailable() const
|
|---|
| 1028 | {
|
|---|
| 1029 | return TESTBIT(fAvailableFlags,kAverageQEFFactorAvailable);
|
|---|
| 1030 | }
|
|---|
| 1031 |
|
|---|
| 1032 | // ------------------------------------------------------------------------------
|
|---|
| 1033 | //
|
|---|
| 1034 | // Test if the average QE can be obtained from the PIN Diode method
|
|---|
| 1035 | //
|
|---|
| 1036 | Bool_t MCalibrationQEPix::IsAverageQEPINDiodeAvailable() const
|
|---|
| 1037 | {
|
|---|
| 1038 | return TESTBIT(fAvailableFlags,kAverageQEPINDiodeAvailable);
|
|---|
| 1039 | }
|
|---|
| 1040 |
|
|---|
| 1041 | // ------------------------------------------------------------------------------
|
|---|
| 1042 | //
|
|---|
| 1043 | // Test if any of the three colours has already been calibrated with the blind pixel method
|
|---|
| 1044 | //
|
|---|
| 1045 | Bool_t MCalibrationQEPix::IsBlindPixelMethodValid () const
|
|---|
| 1046 | {
|
|---|
| 1047 |
|
|---|
| 1048 | if (IsBlindPixelMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 1049 | return kTRUE;
|
|---|
| 1050 | if (IsBlindPixelMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 1051 | return kTRUE;
|
|---|
| 1052 | if (IsBlindPixelMethodValid (MCalibrationCam::kUV ))
|
|---|
| 1053 | return kTRUE;
|
|---|
| 1054 | if (IsBlindPixelMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 1055 | return kTRUE;
|
|---|
| 1056 |
|
|---|
| 1057 | return kFALSE;
|
|---|
| 1058 | }
|
|---|
| 1059 |
|
|---|
| 1060 | // ------------------------------------------------------------------------------
|
|---|
| 1061 | //
|
|---|
| 1062 | // Test if any of the three colours has already been calibrated with the combination
|
|---|
| 1063 | // of the three methods
|
|---|
| 1064 | //
|
|---|
| 1065 | Bool_t MCalibrationQEPix::IsCombinedMethodValid () const
|
|---|
| 1066 | {
|
|---|
| 1067 | if (IsCombinedMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 1068 | return kTRUE;
|
|---|
| 1069 | if (IsCombinedMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 1070 | return kTRUE;
|
|---|
| 1071 | if (IsCombinedMethodValid (MCalibrationCam::kUV ))
|
|---|
| 1072 | return kTRUE;
|
|---|
| 1073 | if (IsCombinedMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 1074 | return kTRUE;
|
|---|
| 1075 |
|
|---|
| 1076 | return kFALSE;
|
|---|
| 1077 | }
|
|---|
| 1078 |
|
|---|
| 1079 | // ------------------------------------------------------------------------------
|
|---|
| 1080 | //
|
|---|
| 1081 | // Test if any of the three colours has already been calibrated with the F-Factor method
|
|---|
| 1082 | //
|
|---|
| 1083 | Bool_t MCalibrationQEPix::IsFFactorMethodValid () const
|
|---|
| 1084 | {
|
|---|
| 1085 | if (IsFFactorMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 1086 | return kTRUE;
|
|---|
| 1087 | if (IsFFactorMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 1088 | return kTRUE;
|
|---|
| 1089 | if (IsFFactorMethodValid (MCalibrationCam::kUV ))
|
|---|
| 1090 | return kTRUE;
|
|---|
| 1091 | if (IsFFactorMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 1092 | return kTRUE;
|
|---|
| 1093 |
|
|---|
| 1094 | return kFALSE;
|
|---|
| 1095 | }
|
|---|
| 1096 |
|
|---|
| 1097 |
|
|---|
| 1098 | // ------------------------------------------------------------------------------
|
|---|
| 1099 | //
|
|---|
| 1100 | // Test if any of the three colours has already been calibrated with the PIN Diode method
|
|---|
| 1101 | //
|
|---|
| 1102 | Bool_t MCalibrationQEPix::IsPINDiodeMethodValid () const
|
|---|
| 1103 | {
|
|---|
| 1104 | if (IsPINDiodeMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 1105 | return kTRUE;
|
|---|
| 1106 | if (IsPINDiodeMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 1107 | return kTRUE;
|
|---|
| 1108 | if (IsPINDiodeMethodValid (MCalibrationCam::kUV ))
|
|---|
| 1109 | return kTRUE;
|
|---|
| 1110 | if (IsPINDiodeMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 1111 | return kTRUE;
|
|---|
| 1112 |
|
|---|
| 1113 | return kFALSE;
|
|---|
| 1114 | }
|
|---|
| 1115 |
|
|---|
| 1116 | // ------------------------------------------------------------------------------
|
|---|
| 1117 | //
|
|---|
| 1118 | // Test if the colour "col" has already been calibrated with the Blind Pixel method
|
|---|
| 1119 | //
|
|---|
| 1120 | Bool_t MCalibrationQEPix::IsBlindPixelMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 1121 | {
|
|---|
| 1122 | return TESTBIT(fValidFlags[ col ],kBlindPixelMethodValid);
|
|---|
| 1123 | }
|
|---|
| 1124 |
|
|---|
| 1125 | // ------------------------------------------------------------------------------
|
|---|
| 1126 | //
|
|---|
| 1127 | // Test if the colour "col" has already been calibrated with the combination of
|
|---|
| 1128 | // the three methods
|
|---|
| 1129 | //
|
|---|
| 1130 | Bool_t MCalibrationQEPix::IsCombinedMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 1131 | {
|
|---|
| 1132 | return TESTBIT(fValidFlags[ col ],kCombinedMethodValid);
|
|---|
| 1133 | }
|
|---|
| 1134 |
|
|---|
| 1135 | // ------------------------------------------------------------------------------
|
|---|
| 1136 | //
|
|---|
| 1137 | // Test if the colour "col" has already been calibrated with the F-Factor method
|
|---|
| 1138 | //
|
|---|
| 1139 | Bool_t MCalibrationQEPix::IsFFactorMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 1140 | {
|
|---|
| 1141 | return TESTBIT(fValidFlags[ col ],kFFactorMethodValid);
|
|---|
| 1142 | }
|
|---|
| 1143 |
|
|---|
| 1144 | // ------------------------------------------------------------------------------
|
|---|
| 1145 | //
|
|---|
| 1146 | // Test if the colour "col" has already been calibrated with the PIN Diode method
|
|---|
| 1147 | //
|
|---|
| 1148 | Bool_t MCalibrationQEPix::IsPINDiodeMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 1149 | {
|
|---|
| 1150 | return TESTBIT(fValidFlags[ col ],kPINDiodeMethodValid);
|
|---|
| 1151 | }
|
|---|
| 1152 |
|
|---|
| 1153 | // ------------------------------------------------------------------------------
|
|---|
| 1154 | //
|
|---|
| 1155 | // Set the bit Average QE Blind Pixel method available from outside (only for MC!)
|
|---|
| 1156 | //
|
|---|
| 1157 | void MCalibrationQEPix::SetAverageQEBlindPixelAvailable ( Bool_t b )
|
|---|
| 1158 | {
|
|---|
| 1159 | if (b)
|
|---|
| 1160 | SETBIT(fAvailableFlags,kAverageQEBlindPixelAvailable);
|
|---|
| 1161 | else
|
|---|
| 1162 | CLRBIT(fAvailableFlags,kAverageQEBlindPixelAvailable);
|
|---|
| 1163 | }
|
|---|
| 1164 |
|
|---|
| 1165 | // ------------------------------------------------------------------------------
|
|---|
| 1166 | //
|
|---|
| 1167 | // Set the bit Average QE combination of three methods available from outside (only for MC!)
|
|---|
| 1168 | //
|
|---|
| 1169 | void MCalibrationQEPix::SetAverageQECombinedAvailable ( Bool_t b )
|
|---|
| 1170 | {
|
|---|
| 1171 | if (b)
|
|---|
| 1172 | SETBIT(fAvailableFlags,kAverageQECombinedAvailable);
|
|---|
| 1173 | else
|
|---|
| 1174 | CLRBIT(fAvailableFlags,kAverageQECombinedAvailable);
|
|---|
| 1175 | }
|
|---|
| 1176 |
|
|---|
| 1177 | // ------------------------------------------------------------------------------
|
|---|
| 1178 | //
|
|---|
| 1179 | // Set the bit Average QE F-Factor method available from outside (only for MC!)
|
|---|
| 1180 | //
|
|---|
| 1181 | void MCalibrationQEPix::SetAverageQEFFactorAvailable ( Bool_t b )
|
|---|
| 1182 | {
|
|---|
| 1183 | if (b)
|
|---|
| 1184 | SETBIT(fAvailableFlags,kAverageQEFFactorAvailable);
|
|---|
| 1185 | else
|
|---|
| 1186 | CLRBIT(fAvailableFlags,kAverageQEFFactorAvailable);
|
|---|
| 1187 | }
|
|---|
| 1188 |
|
|---|
| 1189 | // ------------------------------------------------------------------------------
|
|---|
| 1190 | //
|
|---|
| 1191 | // Set the bit Average QE PIN Diode method available from outside (only for MC!)
|
|---|
| 1192 | //
|
|---|
| 1193 | void MCalibrationQEPix::SetAverageQEPINDiodeAvailable ( Bool_t b )
|
|---|
| 1194 | {
|
|---|
| 1195 | if (b)
|
|---|
| 1196 | SETBIT(fAvailableFlags,kAverageQEPINDiodeAvailable);
|
|---|
| 1197 | else
|
|---|
| 1198 | CLRBIT(fAvailableFlags,kAverageQEPINDiodeAvailable);
|
|---|
| 1199 | }
|
|---|
| 1200 |
|
|---|
| 1201 | // ------------------------------------------------------------------------------
|
|---|
| 1202 | //
|
|---|
| 1203 | // Set the bit QE Blind Pixel method available from colour "col"
|
|---|
| 1204 | //
|
|---|
| 1205 | void MCalibrationQEPix::SetBlindPixelMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 1206 | {
|
|---|
| 1207 | if (b)
|
|---|
| 1208 | SETBIT(fValidFlags[ col ],kBlindPixelMethodValid);
|
|---|
| 1209 | else
|
|---|
| 1210 | CLRBIT(fValidFlags[ col ],kBlindPixelMethodValid);
|
|---|
| 1211 | }
|
|---|
| 1212 |
|
|---|
| 1213 | // ------------------------------------------------------------------------------
|
|---|
| 1214 | //
|
|---|
| 1215 | // Set the bit QE Combination of three methods available from colour "col"
|
|---|
| 1216 | //
|
|---|
| 1217 | void MCalibrationQEPix::SetCombinedMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 1218 | {
|
|---|
| 1219 | if (b)
|
|---|
| 1220 | SETBIT(fValidFlags[ col ],kCombinedMethodValid);
|
|---|
| 1221 | else
|
|---|
| 1222 | CLRBIT(fValidFlags[ col ],kCombinedMethodValid);
|
|---|
| 1223 | }
|
|---|
| 1224 |
|
|---|
| 1225 | // ------------------------------------------------------------------------------
|
|---|
| 1226 | //
|
|---|
| 1227 | // Set the bit QE F-Factor method available from colour "col"
|
|---|
| 1228 | //
|
|---|
| 1229 | void MCalibrationQEPix::SetFFactorMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 1230 | {
|
|---|
| 1231 | if (b)
|
|---|
| 1232 | SETBIT(fValidFlags[ col ],kFFactorMethodValid);
|
|---|
| 1233 | else
|
|---|
| 1234 | CLRBIT(fValidFlags[ col ],kFFactorMethodValid);
|
|---|
| 1235 | }
|
|---|
| 1236 |
|
|---|
| 1237 | // ------------------------------------------------------------------------------
|
|---|
| 1238 | //
|
|---|
| 1239 | // Set the bit QE PIN Diode method available from colour "col"
|
|---|
| 1240 | //
|
|---|
| 1241 | void MCalibrationQEPix::SetPINDiodeMethodValid ( Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 1242 | {
|
|---|
| 1243 | if (b)
|
|---|
| 1244 | SETBIT(fValidFlags[ col ],kPINDiodeMethodValid);
|
|---|
| 1245 | else
|
|---|
| 1246 | CLRBIT(fValidFlags[ col ],kPINDiodeMethodValid);
|
|---|
| 1247 | }
|
|---|
| 1248 |
|
|---|
| 1249 | // ------------------------------------------------------------------------------
|
|---|
| 1250 | //
|
|---|
| 1251 | // Update the Blind Pixel Method: Calculate new average QE's
|
|---|
| 1252 | //
|
|---|
| 1253 | Bool_t MCalibrationQEPix::UpdateBlindPixelMethod()
|
|---|
| 1254 | {
|
|---|
| 1255 |
|
|---|
| 1256 | Float_t weightedav = 0.;
|
|---|
| 1257 | Float_t sumweights = 0.;
|
|---|
| 1258 |
|
|---|
| 1259 | AddAverageBlindPixelQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
|---|
| 1260 | AddAverageBlindPixelQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
|---|
| 1261 | AddAverageBlindPixelQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
|---|
| 1262 | AddAverageBlindPixelQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
|---|
| 1263 |
|
|---|
| 1264 | if (weightedav == 0. || sumweights == 0.)
|
|---|
| 1265 | return kFALSE;
|
|---|
| 1266 |
|
|---|
| 1267 | fAvNormBlindPixel = weightedav / sumweights;
|
|---|
| 1268 | fAvNormBlindPixelVar = 1./ sumweights ;
|
|---|
| 1269 |
|
|---|
| 1270 | SetAverageQEBlindPixelAvailable();
|
|---|
| 1271 |
|
|---|
| 1272 | return kTRUE;
|
|---|
| 1273 | }
|
|---|
| 1274 |
|
|---|
| 1275 | // ------------------------------------------------------------------------------
|
|---|
| 1276 | //
|
|---|
| 1277 | // Update the Combination of the three Methods: Calculate new average QE's
|
|---|
| 1278 | //
|
|---|
| 1279 | Bool_t MCalibrationQEPix::UpdateCombinedMethod()
|
|---|
| 1280 | {
|
|---|
| 1281 |
|
|---|
| 1282 | Float_t weightedav = 0.;
|
|---|
| 1283 | Float_t sumweights = 0.;
|
|---|
| 1284 |
|
|---|
| 1285 | AddAverageCombinedQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
|---|
| 1286 | AddAverageCombinedQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
|---|
| 1287 | AddAverageCombinedQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
|---|
| 1288 | AddAverageCombinedQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
|---|
| 1289 |
|
|---|
| 1290 | if (weightedav == 0. || sumweights == 0.)
|
|---|
| 1291 | return kFALSE;
|
|---|
| 1292 |
|
|---|
| 1293 | fAvNormCombined = weightedav / sumweights;
|
|---|
| 1294 | fAvNormCombinedVar = 1./ sumweights ;
|
|---|
| 1295 |
|
|---|
| 1296 | SetAverageQECombinedAvailable();
|
|---|
| 1297 |
|
|---|
| 1298 | return kTRUE;
|
|---|
| 1299 |
|
|---|
| 1300 | }
|
|---|
| 1301 |
|
|---|
| 1302 | // ------------------------------------------------------------------------------
|
|---|
| 1303 | //
|
|---|
| 1304 | // Update the F-Factor Method: Calculate new average QE's
|
|---|
| 1305 | //
|
|---|
| 1306 | Bool_t MCalibrationQEPix::UpdateFFactorMethod()
|
|---|
| 1307 | {
|
|---|
| 1308 |
|
|---|
| 1309 | Float_t weightedav = 0.;
|
|---|
| 1310 | Float_t sumweights = 0.;
|
|---|
| 1311 |
|
|---|
| 1312 | AddAverageFFactorQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
|---|
| 1313 | AddAverageFFactorQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
|---|
| 1314 | AddAverageFFactorQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
|---|
| 1315 | AddAverageFFactorQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
|---|
| 1316 |
|
|---|
| 1317 | if (weightedav == 0. || sumweights == 0.)
|
|---|
| 1318 | return kFALSE;
|
|---|
| 1319 |
|
|---|
| 1320 | fAvNormFFactor = weightedav / sumweights;
|
|---|
| 1321 | fAvNormFFactorVar = 1./ sumweights ;
|
|---|
| 1322 |
|
|---|
| 1323 | SetAverageQEFFactorAvailable();
|
|---|
| 1324 |
|
|---|
| 1325 | return kTRUE;
|
|---|
| 1326 |
|
|---|
| 1327 |
|
|---|
| 1328 | }
|
|---|
| 1329 |
|
|---|
| 1330 | // ------------------------------------------------------------------------------
|
|---|
| 1331 | //
|
|---|
| 1332 | // Update the PIN Diode Method: Calculate new average QE's
|
|---|
| 1333 | //
|
|---|
| 1334 | Bool_t MCalibrationQEPix::UpdatePINDiodeMethod()
|
|---|
| 1335 | {
|
|---|
| 1336 |
|
|---|
| 1337 | Float_t weightedav = 0.;
|
|---|
| 1338 | Float_t sumweights = 0.;
|
|---|
| 1339 |
|
|---|
| 1340 | AddAveragePINDiodeQEs(MCalibrationCam::kGREEN, weightedav, sumweights);
|
|---|
| 1341 | AddAveragePINDiodeQEs(MCalibrationCam::kBLUE , weightedav, sumweights);
|
|---|
| 1342 | AddAveragePINDiodeQEs(MCalibrationCam::kUV , weightedav, sumweights);
|
|---|
| 1343 | AddAveragePINDiodeQEs(MCalibrationCam::kCT1 , weightedav, sumweights);
|
|---|
| 1344 |
|
|---|
| 1345 | if (weightedav == 0. || sumweights == 0.)
|
|---|
| 1346 | return kFALSE;
|
|---|
| 1347 |
|
|---|
| 1348 | fAvNormPINDiode = weightedav / sumweights;
|
|---|
| 1349 | fAvNormPINDiodeVar = 1./ sumweights ;
|
|---|
| 1350 |
|
|---|
| 1351 | SetAverageQEPINDiodeAvailable();
|
|---|
| 1352 |
|
|---|
| 1353 | return kTRUE;
|
|---|
| 1354 |
|
|---|
| 1355 |
|
|---|
| 1356 | }
|
|---|
| 1357 |
|
|---|