| 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 | !
|
|---|
| 19 | ! Author(s): Markus Gaug 02/2004 <mailto:markus@ifae.es>
|
|---|
| 20 | !
|
|---|
| 21 | ! Copyright: MAGIC Software Development, 2000-2004
|
|---|
| 22 | !
|
|---|
| 23 | !
|
|---|
| 24 | \* ======================================================================== */
|
|---|
| 25 |
|
|---|
| 26 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 27 | //
|
|---|
| 28 | // MCalibrationQECam
|
|---|
| 29 | //
|
|---|
| 30 | // Storage container for the calibrated Quantum Efficiency of the whole camera.
|
|---|
| 31 | //
|
|---|
| 32 | // For a complete description of the quantum efficiency calibration process,
|
|---|
| 33 | // see MCalibrationQEPix.
|
|---|
| 34 | //
|
|---|
| 35 | // Individual pixels have to be cast when retrieved e.g.:
|
|---|
| 36 | // MCalibrationQEPix &avpix = (MCalibrationQEPix&)(*fQECam)[i]
|
|---|
| 37 | //
|
|---|
| 38 | // Averaged values over one whole area index (e.g. inner or outer pixels for
|
|---|
| 39 | // the MAGIC camera), can be retrieved via:
|
|---|
| 40 | // MCalibrationQEPix &avpix = (MCalibrationQEPix&)fQECam->GetAverageArea(i)
|
|---|
| 41 | //
|
|---|
| 42 | // Averaged values over one whole camera sector can be retrieved via:
|
|---|
| 43 | // MCalibrationQEPix &avpix = (MCalibrationQEPix&)fQECam->GetAverageSector(i)
|
|---|
| 44 | //
|
|---|
| 45 | // The following "calibration" constants are used for the calibration of each pixel:
|
|---|
| 46 | //
|
|---|
| 47 | // - MCalibrationQEPix::GetQECascadesBlindPixel(): The mean quantum efficiency folded
|
|---|
| 48 | // into a cascades spectrum obtained with the Blind Pixel Method.
|
|---|
| 49 | // - MCalibrationQEPix::GetQECascadesFFactor(): The mean quantum efficiency folded
|
|---|
| 50 | // into a cascades spectrum obtained with the F-Factor Method
|
|---|
| 51 | // - MCalibrationQEPix::GetQECascadesPINDiode(): The mean quantum efficiency folded
|
|---|
| 52 | // into a cascades spectrum obtained with the PIN Diode Method
|
|---|
| 53 | // - MCalibrationQEPix::GetQECascadesCombined(): The mean quantum efficiency folded
|
|---|
| 54 | // into a cascades spectrum obtained with the combination of the three methods
|
|---|
| 55 | //
|
|---|
| 56 | // The following "calibration" constants have been measured to obtain the above values:
|
|---|
| 57 | //
|
|---|
| 58 | // - MCalibrationQEPix::GetQEBlindPixel( MCalibrationCam::PulserColor_t color ):
|
|---|
| 59 | // The mean quantum efficiency obtained with the calibration pulser color
|
|---|
| 60 | // (e.g. kGREEN, kBLUE, kUV, kCT1) after the Blind Pixel Method
|
|---|
| 61 | // - MCalibrationQEPix::GetQEFFactor( MCalibrationCam::PulserColor_t color ):
|
|---|
| 62 | // The mean quantum efficiency obtained with the calibration pulser color
|
|---|
| 63 | // (e.g. kGREEN, kBLUE, kUV, kCT1) after the F-Factor Method
|
|---|
| 64 | // - MCalibrationQEPix::GetQEPINDiode( MCalibrationCam::PulserColor_t color ):
|
|---|
| 65 | // The mean quantum efficiency obtained with the calibration pulser color
|
|---|
| 66 | // (e.g. kGREEN, kBLUE, kUV, kCT1) after the PIN Diode Method
|
|---|
| 67 | // - MCalibrationQEPix::GetQECombined( MCalibrationCam::PulserColor_t color ):
|
|---|
| 68 | // The mean quantum efficiency obtained with the calibration pulser color
|
|---|
| 69 | // (e.g. kGREEN, kBLUE, kUV, kCT1) after the combination of the three methods
|
|---|
| 70 | //
|
|---|
| 71 | // See also: MCalibrationQEPix, MCalibrationChargeCam, MCalibrationChargeCalc
|
|---|
| 72 | // MCalibrationChargeBlindPix, MCalibrationChargePINDiode, MCalibrationChargePix
|
|---|
| 73 | //
|
|---|
| 74 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 75 | #include "MCalibrationQECam.h"
|
|---|
| 76 | #include "MCalibrationCam.h"
|
|---|
| 77 |
|
|---|
| 78 | #include <TClonesArray.h>
|
|---|
| 79 |
|
|---|
| 80 | #include "MLog.h"
|
|---|
| 81 | #include "MLogManip.h"
|
|---|
| 82 |
|
|---|
| 83 | #include "MCalibrationQEPix.h"
|
|---|
| 84 |
|
|---|
| 85 | ClassImp(MCalibrationQECam);
|
|---|
| 86 |
|
|---|
| 87 | using namespace std;
|
|---|
| 88 |
|
|---|
| 89 | const Float_t MCalibrationQECam::gkPlexiglassQE = 0.96;
|
|---|
| 90 | const Float_t MCalibrationQECam::gkPlexiglassQEErr = 0.01;
|
|---|
| 91 | // --------------------------------------------------------------------------
|
|---|
| 92 | //
|
|---|
| 93 | // Default constructor.
|
|---|
| 94 | //
|
|---|
| 95 | // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated
|
|---|
| 96 | // to hold one container per pixel. Later, a call to MCalibrationQECam::InitSize()
|
|---|
| 97 | // has to be performed (in MGeomApply).
|
|---|
| 98 | //
|
|---|
| 99 | // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated
|
|---|
| 100 | // to hold one container per pixel AREA. Later, a call to MCalibrationQECam::InitAreas()
|
|---|
| 101 | // has to be performed (in MGeomApply).
|
|---|
| 102 | //
|
|---|
| 103 | // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated
|
|---|
| 104 | // to hold one container per camera SECTOR. Later, a call to MCalibrationQECam::InitSectors()
|
|---|
| 105 | // has to be performed (in MGeomApply).
|
|---|
| 106 | //
|
|---|
| 107 | MCalibrationQECam::MCalibrationQECam(const char *name, const char *title)
|
|---|
| 108 | : fFlags(MCalibrationCam::gkNumPulserColors)
|
|---|
| 109 | {
|
|---|
| 110 | fName = name ? name : "MCalibrationQECam";
|
|---|
| 111 | fTitle = title ? title : "Storage container for the calibrated Quantrum Efficiency of the camera";
|
|---|
| 112 |
|
|---|
| 113 | fPixels = new TClonesArray("MCalibrationQEPix",1);
|
|---|
| 114 | fAverageAreas = new TClonesArray("MCalibrationQEPix",1);
|
|---|
| 115 | fAverageSectors = new TClonesArray("MCalibrationQEPix",1);
|
|---|
| 116 |
|
|---|
| 117 | Clear();
|
|---|
| 118 | }
|
|---|
| 119 |
|
|---|
| 120 | // ------------------------------------------------------------------------
|
|---|
| 121 | //
|
|---|
| 122 | // Sets all bits to kFALSE
|
|---|
| 123 | //
|
|---|
| 124 | // Calls:
|
|---|
| 125 | // - MCalibrationCam::Clear()
|
|---|
| 126 | //
|
|---|
| 127 | void MCalibrationQECam::Clear(Option_t *o)
|
|---|
| 128 | {
|
|---|
| 129 |
|
|---|
| 130 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 131 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 132 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 133 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kGREEN);
|
|---|
| 134 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 135 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 136 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 137 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kBLUE);
|
|---|
| 138 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 139 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 140 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 141 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kUV);
|
|---|
| 142 | SetBlindPixelMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 143 | SetFFactorMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 144 | SetCombinedMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 145 | SetPINDiodeMethodValid ( kFALSE, MCalibrationCam::kCT1);
|
|---|
| 146 |
|
|---|
| 147 | MCalibrationCam::Clear();
|
|---|
| 148 | }
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 | // --------------------------------------------------------------------------
|
|---|
| 152 | //
|
|---|
| 153 | // Not yet implemented
|
|---|
| 154 | //
|
|---|
| 155 | void MCalibrationQECam::DrawPixelContent(Int_t idx) const
|
|---|
| 156 | {
|
|---|
| 157 | return;
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 | // --------------------------------------------------------------------
|
|---|
| 161 | //
|
|---|
| 162 | // Types used by MCalibrate and MCalibrateData:
|
|---|
| 163 | // ============================================
|
|---|
| 164 | //
|
|---|
| 165 | // 0: Mean Quantum Efficiency for cascades, obtained with the F-Factor method
|
|---|
| 166 | // 1: Error of the Mean QE for cascades, obtained with the F-Factor method
|
|---|
| 167 | // 2: Mean Quantum Efficiency for cascades, obtained with the Blind Pixel method
|
|---|
| 168 | // 3: Error of the Mean QE for cascades, obtained with the Blind Pixel method
|
|---|
| 169 | // 4: Mean Quantum Efficiency for cascades, obtained with the PIN Diode method
|
|---|
| 170 | // 5: Error of the Mean QE for cascades, obtained with the PIN Diode method
|
|---|
| 171 | // 6: Mean Quantum Efficiency for cascades, obtained with combination of the 3 methods
|
|---|
| 172 | // 7: Error of the Mean QE for cascades, obtained with combination of the 3 methods
|
|---|
| 173 | // 8: Availabiliy of Quantum Efficiency for cascades, F-Factor method
|
|---|
| 174 | // 9: Availabiliy of Quantum Efficiency for cascades, F-Factor method
|
|---|
| 175 | // 10: Availabiliy of Quantum Efficiency for cascades, F-Factor method
|
|---|
| 176 | // 11: Availabiliy of Quantum Efficiency for cascades, F-Factor method
|
|---|
| 177 | //
|
|---|
| 178 | // Types filled by MCalibrationChargeCalc in combination of MCalibrationChargePix:
|
|---|
| 179 | // ===============================================================================
|
|---|
| 180 | //
|
|---|
| 181 | // 12: Mean Quantum Efficiency obtained with F-Factor Method ( color: kCT1)
|
|---|
| 182 | // 13: Error of the Mean QE obtained with F-Factor Method ( color: kCT1)
|
|---|
| 183 | // 14: Mean Quantum Efficiency obtained with F-Factor Method ( color: kGREEN)
|
|---|
| 184 | // 15: Error of the Mean QE obtained with F-Factor Method ( color: kGREEN)
|
|---|
| 185 | // 16: Mean Quantum Efficiency obtained with F-Factor Method ( color: kBLUE)
|
|---|
| 186 | // 17: Error of the Mean QE obtained with F-Factor Method ( color: kBLUE)
|
|---|
| 187 | // 18: Mean Quantum Efficiency obtained with F-Factor Method ( color: kUV)
|
|---|
| 188 | // 19: Error of the Mean QE obtained with F-Factor Method ( color: kUV)
|
|---|
| 189 | //
|
|---|
| 190 | // Types filled by MCalibrationChargeCalc in combination of MCalibrationChargeBlindPix:
|
|---|
| 191 | // ====================================================================================
|
|---|
| 192 | //
|
|---|
| 193 | // 20: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kCT1)
|
|---|
| 194 | // 21: Error of the Mean QE obtained with Blind Pixel Method ( color: kCT1)
|
|---|
| 195 | // 22: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kGREEN)
|
|---|
| 196 | // 23: Error of the Mean QE obtained with Blind Pixel Method ( color: kGREEN)
|
|---|
| 197 | // 24: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kBLUE)
|
|---|
| 198 | // 25: Error of the Mean QE obtained with Blind Pixel Method ( color: kBLUE)
|
|---|
| 199 | // 26: Mean Quantum Efficiency obtained with Blind Pixel Method ( color: kUV)
|
|---|
| 200 | // 27: Error of the Mean QE obtained with Blind Pixel Method ( color: kUV)
|
|---|
| 201 | //
|
|---|
| 202 | // Types filled by MCalibrationChargeCalc in combination of MCalibrationChargePINDiode:
|
|---|
| 203 | // ====================================================================================
|
|---|
| 204 | //
|
|---|
| 205 | // 28: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kCT1)
|
|---|
| 206 | // 29: Error of the Mean QE obtained with PIN Diode Method ( color: kCT1)
|
|---|
| 207 | // 30: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kGREEN)
|
|---|
| 208 | // 31: Error of the Mean QE obtained with PIN Diode Method ( color: kGREEN)
|
|---|
| 209 | // 32: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kBLUE)
|
|---|
| 210 | // 33: Error of the Mean QE obtained with PIN Diode Method ( color: kBLUE)
|
|---|
| 211 | // 34: Mean Quantum Efficiency obtained with PIN Diode Method ( color: kUV)
|
|---|
| 212 | // 35: Error of the Mean QE obtained with PIN Diode Method ( color: kUV)
|
|---|
| 213 | //
|
|---|
| 214 | // Types filled by MCalibrationChargeCalc in combination of MCalibrationQEPix:
|
|---|
| 215 | // ===========================================================================
|
|---|
| 216 | //
|
|---|
| 217 | // 36: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kCT1)
|
|---|
| 218 | // 37: Error of the Mean QE obtained with combination of 3 methods ( color: kCT1)
|
|---|
| 219 | // 38: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kGREEN)
|
|---|
| 220 | // 39: Error of the Mean QE obtained with combination of 3 methods ( color: kGREEN)
|
|---|
| 221 | // 40: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kBLUE)
|
|---|
| 222 | // 41: Error of the Mean QE obtained with combination of 3 methods ( color: kBLUE)
|
|---|
| 223 | // 42: Mean Quantum Efficiency obtained with combination of 3 methods ( color: kUV)
|
|---|
| 224 | // 43: Error of the Mean QE obtained with combination of 3 methods ( color: kUV)
|
|---|
| 225 | //
|
|---|
| 226 | Bool_t MCalibrationQECam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
|
|---|
| 227 | {
|
|---|
| 228 |
|
|---|
| 229 | if (idx > GetSize())
|
|---|
| 230 | return kFALSE;
|
|---|
| 231 |
|
|---|
| 232 | MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[idx];
|
|---|
| 233 |
|
|---|
| 234 | if (pix.IsExcluded())
|
|---|
| 235 | return kFALSE;
|
|---|
| 236 |
|
|---|
| 237 | switch (type)
|
|---|
| 238 | {
|
|---|
| 239 | case 0:
|
|---|
| 240 | val = pix.GetQECascadesFFactor();
|
|---|
| 241 | break;
|
|---|
| 242 | case 1:
|
|---|
| 243 | val = pix.GetQECascadesFFactorErr();
|
|---|
| 244 | break;
|
|---|
| 245 | case 2:
|
|---|
| 246 | val = pix.GetQECascadesBlindPixel();
|
|---|
| 247 | break;
|
|---|
| 248 | case 3:
|
|---|
| 249 | val = pix.GetQECascadesBlindPixelErr();
|
|---|
| 250 | break;
|
|---|
| 251 | case 4:
|
|---|
| 252 | val = pix.GetQECascadesPINDiode();
|
|---|
| 253 | break;
|
|---|
| 254 | case 5:
|
|---|
| 255 | val = pix.GetQECascadesPINDiodeErr();
|
|---|
| 256 | break;
|
|---|
| 257 | case 6:
|
|---|
| 258 | val = pix.GetQECascadesCombined();
|
|---|
| 259 | break;
|
|---|
| 260 | case 7:
|
|---|
| 261 | val = pix.GetQECascadesCombinedErr();
|
|---|
| 262 | break;
|
|---|
| 263 | case 8:
|
|---|
| 264 | if (pix.IsAverageQEFFactorAvailable())
|
|---|
| 265 | val = 1;
|
|---|
| 266 | else
|
|---|
| 267 | return kFALSE;
|
|---|
| 268 | break;
|
|---|
| 269 | case 9:
|
|---|
| 270 | if (pix.IsAverageQEBlindPixelAvailable())
|
|---|
| 271 | val = 1;
|
|---|
| 272 | else
|
|---|
| 273 | return kFALSE;
|
|---|
| 274 | break;
|
|---|
| 275 | case 10:
|
|---|
| 276 | if (pix.IsAverageQEPINDiodeAvailable())
|
|---|
| 277 | val = 1;
|
|---|
| 278 | else
|
|---|
| 279 | return kFALSE;
|
|---|
| 280 | break;
|
|---|
| 281 | case 11:
|
|---|
| 282 | if (pix.IsAverageQECombinedAvailable())
|
|---|
| 283 | val = 1;
|
|---|
| 284 | else
|
|---|
| 285 | return kFALSE;
|
|---|
| 286 | break;
|
|---|
| 287 | case 12:
|
|---|
| 288 | val = pix.GetQEFFactor(kCT1);
|
|---|
| 289 | break;
|
|---|
| 290 | case 13:
|
|---|
| 291 | val = pix.GetQEFFactorErr(kCT1);
|
|---|
| 292 | break;
|
|---|
| 293 | case 14:
|
|---|
| 294 | val = pix.GetQEFFactor(kGREEN);
|
|---|
| 295 | break;
|
|---|
| 296 | case 15:
|
|---|
| 297 | val = pix.GetQEFFactorErr(kGREEN);
|
|---|
| 298 | break;
|
|---|
| 299 | case 16:
|
|---|
| 300 | val = pix.GetQEFFactor(kBLUE);
|
|---|
| 301 | break;
|
|---|
| 302 | case 17:
|
|---|
| 303 | val = pix.GetQEFFactorErr(kBLUE);
|
|---|
| 304 | break;
|
|---|
| 305 | case 18:
|
|---|
| 306 | val = pix.GetQEFFactor(kUV);
|
|---|
| 307 | break;
|
|---|
| 308 | case 19:
|
|---|
| 309 | val = pix.GetQEFFactorErr(kUV);
|
|---|
| 310 | break;
|
|---|
| 311 | case 20:
|
|---|
| 312 | val = pix.GetQEBlindPixel(kCT1);
|
|---|
| 313 | break;
|
|---|
| 314 | case 21:
|
|---|
| 315 | val = pix.GetQEBlindPixelErr(kCT1);
|
|---|
| 316 | break;
|
|---|
| 317 | case 22:
|
|---|
| 318 | val = pix.GetQEBlindPixel(kGREEN);
|
|---|
| 319 | break;
|
|---|
| 320 | case 23:
|
|---|
| 321 | val = pix.GetQEBlindPixelErr(kGREEN);
|
|---|
| 322 | break;
|
|---|
| 323 | case 24:
|
|---|
| 324 | val = pix.GetQEBlindPixel(kBLUE);
|
|---|
| 325 | break;
|
|---|
| 326 | case 25:
|
|---|
| 327 | val = pix.GetQEBlindPixelErr(kBLUE);
|
|---|
| 328 | break;
|
|---|
| 329 | case 26:
|
|---|
| 330 | val = pix.GetQEBlindPixel(kUV);
|
|---|
| 331 | break;
|
|---|
| 332 | case 27:
|
|---|
| 333 | val = pix.GetQEBlindPixelErr(kUV);
|
|---|
| 334 | break;
|
|---|
| 335 | case 28:
|
|---|
| 336 | val = pix.GetQEPINDiode(kCT1);
|
|---|
| 337 | break;
|
|---|
| 338 | case 29:
|
|---|
| 339 | val = pix.GetQEPINDiodeErr(kCT1);
|
|---|
| 340 | break;
|
|---|
| 341 | case 30:
|
|---|
| 342 | val = pix.GetQEPINDiode(kGREEN);
|
|---|
| 343 | break;
|
|---|
| 344 | case 31:
|
|---|
| 345 | val = pix.GetQEPINDiodeErr(kGREEN);
|
|---|
| 346 | break;
|
|---|
| 347 | case 32:
|
|---|
| 348 | val = pix.GetQEPINDiode(kBLUE);
|
|---|
| 349 | break;
|
|---|
| 350 | case 33:
|
|---|
| 351 | val = pix.GetQEPINDiodeErr(kBLUE);
|
|---|
| 352 | break;
|
|---|
| 353 | case 34:
|
|---|
| 354 | val = pix.GetQEPINDiode(kUV);
|
|---|
| 355 | break;
|
|---|
| 356 | case 35:
|
|---|
| 357 | val = pix.GetQEPINDiodeErr(kUV);
|
|---|
| 358 | break;
|
|---|
| 359 | case 36:
|
|---|
| 360 | val = pix.GetQECombined(kCT1);
|
|---|
| 361 | break;
|
|---|
| 362 | case 37:
|
|---|
| 363 | val = pix.GetQECombinedErr(kCT1);
|
|---|
| 364 | break;
|
|---|
| 365 | case 38:
|
|---|
| 366 | val = pix.GetQECombined(kGREEN);
|
|---|
| 367 | break;
|
|---|
| 368 | case 39:
|
|---|
| 369 | val = pix.GetQECombinedErr(kGREEN);
|
|---|
| 370 | break;
|
|---|
| 371 | case 40:
|
|---|
| 372 | val = pix.GetQECombined(kBLUE);
|
|---|
| 373 | break;
|
|---|
| 374 | case 41:
|
|---|
| 375 | val = pix.GetQECombinedErr(kBLUE);
|
|---|
| 376 | break;
|
|---|
| 377 | case 42:
|
|---|
| 378 | val = pix.GetQECombined(kUV);
|
|---|
| 379 | break;
|
|---|
| 380 | case 43:
|
|---|
| 381 | val = pix.GetQECombinedErr(kUV);
|
|---|
| 382 | break;
|
|---|
| 383 | default:
|
|---|
| 384 | return kFALSE;
|
|---|
| 385 | }
|
|---|
| 386 | return val!=-1.;
|
|---|
| 387 | }
|
|---|
| 388 |
|
|---|
| 389 | // --------------------------------------------------------------------------
|
|---|
| 390 | //
|
|---|
| 391 | // Return -1 if gkPlexiglassQEErr is smaller than 0.
|
|---|
| 392 | // Return -1 if gkPlexiglassQE is 0.
|
|---|
| 393 | // Return gkPlexiglassQEErr^2 / gkPlexiglassQE^2
|
|---|
| 394 | //
|
|---|
| 395 | Float_t MCalibrationQECam::GetPlexiglassQERelVar() const
|
|---|
| 396 | {
|
|---|
| 397 | if (gkPlexiglassQEErr < 0.)
|
|---|
| 398 | return -1.;
|
|---|
| 399 |
|
|---|
| 400 | if (gkPlexiglassQE == 0.)
|
|---|
| 401 | return -1.;
|
|---|
| 402 |
|
|---|
| 403 | return gkPlexiglassQEErr * gkPlexiglassQEErr / gkPlexiglassQE / gkPlexiglassQE ;
|
|---|
| 404 | }
|
|---|
| 405 |
|
|---|
| 406 |
|
|---|
| 407 | // --------------------------------------------------------------------------------
|
|---|
| 408 | //
|
|---|
| 409 | // Returns kTRUE if ANY of the four colours have the bit kBlindPixelMethodValid set,
|
|---|
| 410 | // otherwise kFALSE
|
|---|
| 411 | //
|
|---|
| 412 | Bool_t MCalibrationQECam::IsBlindPixelMethodValid () const
|
|---|
| 413 | {
|
|---|
| 414 | if (IsBlindPixelMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 415 | return kTRUE;
|
|---|
| 416 | if (IsBlindPixelMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 417 | return kTRUE;
|
|---|
| 418 | if (IsBlindPixelMethodValid (MCalibrationCam::kUV ))
|
|---|
| 419 | return kTRUE;
|
|---|
| 420 | if (IsBlindPixelMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 421 | return kTRUE;
|
|---|
| 422 |
|
|---|
| 423 | return kFALSE;
|
|---|
| 424 | }
|
|---|
| 425 |
|
|---|
| 426 | // --------------------------------------------------------------------------------
|
|---|
| 427 | //
|
|---|
| 428 | // Returns kTRUE if ANY of the four colours have the bit kCombinedMethodValid set,
|
|---|
| 429 | // otherwise kFALSE
|
|---|
| 430 | //
|
|---|
| 431 | Bool_t MCalibrationQECam::IsCombinedMethodValid () const
|
|---|
| 432 | {
|
|---|
| 433 | if (IsCombinedMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 434 | return kTRUE;
|
|---|
| 435 | if (IsCombinedMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 436 | return kTRUE;
|
|---|
| 437 | if (IsCombinedMethodValid (MCalibrationCam::kUV ))
|
|---|
| 438 | return kTRUE;
|
|---|
| 439 | if (IsCombinedMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 440 | return kTRUE;
|
|---|
| 441 |
|
|---|
| 442 | return kFALSE;
|
|---|
| 443 | }
|
|---|
| 444 |
|
|---|
| 445 | // --------------------------------------------------------------------------------
|
|---|
| 446 | //
|
|---|
| 447 | // Returns kTRUE if ANY of the four colours have the bit kFFactorMethodValid set,
|
|---|
| 448 | // otherwise kFALSE
|
|---|
| 449 | //
|
|---|
| 450 | Bool_t MCalibrationQECam::IsFFactorMethodValid () const
|
|---|
| 451 | {
|
|---|
| 452 | if (IsFFactorMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 453 | return kTRUE;
|
|---|
| 454 | if (IsFFactorMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 455 | return kTRUE;
|
|---|
| 456 | if (IsFFactorMethodValid (MCalibrationCam::kUV ))
|
|---|
| 457 | return kTRUE;
|
|---|
| 458 | if (IsFFactorMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 459 | return kTRUE;
|
|---|
| 460 |
|
|---|
| 461 | return kFALSE;
|
|---|
| 462 | }
|
|---|
| 463 |
|
|---|
| 464 |
|
|---|
| 465 | // --------------------------------------------------------------------------------
|
|---|
| 466 | //
|
|---|
| 467 | // Returns kTRUE if ANY of the four colours have the bit kPINDiodeMethodValid set,
|
|---|
| 468 | // otherwise kFALSE
|
|---|
| 469 | //
|
|---|
| 470 | Bool_t MCalibrationQECam::IsPINDiodeMethodValid () const
|
|---|
| 471 | {
|
|---|
| 472 | if (IsPINDiodeMethodValid (MCalibrationCam::kGREEN))
|
|---|
| 473 | return kTRUE;
|
|---|
| 474 | if (IsPINDiodeMethodValid (MCalibrationCam::kBLUE ))
|
|---|
| 475 | return kTRUE;
|
|---|
| 476 | if (IsPINDiodeMethodValid (MCalibrationCam::kUV ))
|
|---|
| 477 | return kTRUE;
|
|---|
| 478 | if (IsPINDiodeMethodValid (MCalibrationCam::kCT1 ))
|
|---|
| 479 | return kTRUE;
|
|---|
| 480 |
|
|---|
| 481 | return kFALSE;
|
|---|
| 482 | }
|
|---|
| 483 |
|
|---|
| 484 | // --------------------------------------------------------------------------------
|
|---|
| 485 | //
|
|---|
| 486 | // Returns kTRUE if ANY of the bit kBlindPixelMethodValid is set for colour "col"
|
|---|
| 487 | // otherwise kFALSE
|
|---|
| 488 | //
|
|---|
| 489 | Bool_t MCalibrationQECam::IsBlindPixelMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 490 | {
|
|---|
| 491 | return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
|
|---|
| 492 | }
|
|---|
| 493 |
|
|---|
| 494 | // --------------------------------------------------------------------------------
|
|---|
| 495 | //
|
|---|
| 496 | // Returns kTRUE if ANY of the bit kCombinedMethodValid is set for colour "col"
|
|---|
| 497 | // otherwise kFALSE
|
|---|
| 498 | //
|
|---|
| 499 | Bool_t MCalibrationQECam::IsCombinedMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 500 | {
|
|---|
| 501 | return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
|
|---|
| 502 | }
|
|---|
| 503 |
|
|---|
| 504 | // --------------------------------------------------------------------------------
|
|---|
| 505 | //
|
|---|
| 506 | // Returns kTRUE if ANY of the bit kFFactorMethodValid is set for colour "col"
|
|---|
| 507 | // otherwise kFALSE
|
|---|
| 508 | //
|
|---|
| 509 | Bool_t MCalibrationQECam::IsFFactorMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 510 | {
|
|---|
| 511 | return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
|
|---|
| 512 | }
|
|---|
| 513 |
|
|---|
| 514 | // --------------------------------------------------------------------------------
|
|---|
| 515 | //
|
|---|
| 516 | // Returns kTRUE if ANY of the bit kPINDiodeMethodValid is set for colour "col"
|
|---|
| 517 | // otherwise kFALSE
|
|---|
| 518 | //
|
|---|
| 519 | Bool_t MCalibrationQECam::IsPINDiodeMethodValid (MCalibrationCam::PulserColor_t col) const
|
|---|
| 520 | {
|
|---|
| 521 | return TESTBIT(fFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
|
|---|
| 522 | }
|
|---|
| 523 |
|
|---|
| 524 | // --------------------------------------------------------------------------
|
|---|
| 525 | //
|
|---|
| 526 | // Print the
|
|---|
| 527 | // - MCalibrationQEPix::GetQECascadesFFactor()
|
|---|
| 528 | // - MCalibrationQEPix::GetQECascadesBlindPixel()
|
|---|
| 529 | // - MCalibrationQEPix::GetQECascadesPINDiode()
|
|---|
| 530 | // - MCalibrationQEPix::GetQECascadesCombined()
|
|---|
| 531 | // for all pixels
|
|---|
| 532 | //
|
|---|
| 533 | void MCalibrationQECam::Print(Option_t *o) const
|
|---|
| 534 | {
|
|---|
| 535 |
|
|---|
| 536 | *fLog << all << GetDescriptor() << ":" << endl;
|
|---|
| 537 | int id = 0;
|
|---|
| 538 |
|
|---|
| 539 | *fLog << all << endl;
|
|---|
| 540 | *fLog << all << "Quantum Efficiencies averaged over cascades spectra, measured with F-Factor method:" << endl;
|
|---|
| 541 | *fLog << all << endl;
|
|---|
| 542 |
|
|---|
| 543 | TIter Next(fPixels);
|
|---|
| 544 | MCalibrationQEPix *pix;
|
|---|
| 545 | while ((pix=(MCalibrationQEPix*)Next()))
|
|---|
| 546 | {
|
|---|
| 547 |
|
|---|
| 548 | if (!pix->IsExcluded() && pix->IsAverageQEFFactorAvailable())
|
|---|
| 549 | {
|
|---|
| 550 | *fLog << all
|
|---|
| 551 | << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
|
|---|
| 552 | ": QE: ",pix->GetQECascadesFFactor()," +- ",pix->GetQECascadesFFactorErr())
|
|---|
| 553 | << endl;
|
|---|
| 554 | id++;
|
|---|
| 555 | }
|
|---|
| 556 | }
|
|---|
| 557 |
|
|---|
| 558 | *fLog << all << id << " succesful pixels :-))" << endl;
|
|---|
| 559 | id = 0;
|
|---|
| 560 |
|
|---|
| 561 | *fLog << all << endl;
|
|---|
| 562 | *fLog << all << "Quantum Efficiencies averaged over cascades spectra, "
|
|---|
| 563 | << "measured with Blind Pixel method:" << endl;
|
|---|
| 564 | *fLog << all << endl;
|
|---|
| 565 |
|
|---|
| 566 | TIter Next2(fPixels);
|
|---|
| 567 | while ((pix=(MCalibrationQEPix*)Next2()))
|
|---|
| 568 | {
|
|---|
| 569 |
|
|---|
| 570 | if (!pix->IsExcluded() && pix->IsAverageQEBlindPixelAvailable())
|
|---|
| 571 | {
|
|---|
| 572 | *fLog << all
|
|---|
| 573 | << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
|
|---|
| 574 | ": QE: ",pix->GetQECascadesBlindPixel()," +- ",pix->GetQECascadesBlindPixelErr())
|
|---|
| 575 | << endl;
|
|---|
| 576 | id++;
|
|---|
| 577 | }
|
|---|
| 578 | }
|
|---|
| 579 |
|
|---|
| 580 | *fLog << all << id << " succesful pixels :-))" << endl;
|
|---|
| 581 | id = 0;
|
|---|
| 582 |
|
|---|
| 583 | *fLog << all << endl;
|
|---|
| 584 | *fLog << all << "Quantum Efficiencies averaged over cascades spectra, "
|
|---|
| 585 | << "measured with PIN Diode method:" << endl;
|
|---|
| 586 | *fLog << all << endl;
|
|---|
| 587 |
|
|---|
| 588 | TIter Next3(fPixels);
|
|---|
| 589 | while ((pix=(MCalibrationQEPix*)Next3()))
|
|---|
| 590 | {
|
|---|
| 591 |
|
|---|
| 592 | if (!pix->IsExcluded() && pix->IsAverageQEPINDiodeAvailable())
|
|---|
| 593 | {
|
|---|
| 594 | *fLog << all
|
|---|
| 595 | << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
|
|---|
| 596 | ": QE: ",pix->GetQECascadesPINDiode()," +- ",pix->GetQECascadesPINDiodeErr())
|
|---|
| 597 | << endl;
|
|---|
| 598 | id++;
|
|---|
| 599 | }
|
|---|
| 600 | }
|
|---|
| 601 |
|
|---|
| 602 | *fLog << all << id << " succesful pixels :-))" << endl;
|
|---|
| 603 | id = 0;
|
|---|
| 604 |
|
|---|
| 605 |
|
|---|
| 606 | *fLog << all << endl;
|
|---|
| 607 | *fLog << all << "Quantum Efficiencies averaged over cascades spectra, "
|
|---|
| 608 | << "measured with combination of the 3 methods:" << endl;
|
|---|
| 609 | *fLog << all << endl;
|
|---|
| 610 |
|
|---|
| 611 | TIter Next4(fPixels);
|
|---|
| 612 | while ((pix=(MCalibrationQEPix*)Next4()))
|
|---|
| 613 | {
|
|---|
| 614 |
|
|---|
| 615 | if (!pix->IsExcluded() && pix->IsAverageQECombinedAvailable())
|
|---|
| 616 | {
|
|---|
| 617 | *fLog << all
|
|---|
| 618 | << Form("%s%4i%s%4.2f%s%4.2f","Pix ",pix->GetPixId(),
|
|---|
| 619 | ": QE: ",pix->GetQECascadesCombined()," +- ",pix->GetQECascadesCombinedErr())
|
|---|
| 620 | << endl;
|
|---|
| 621 | id++;
|
|---|
| 622 | }
|
|---|
| 623 | }
|
|---|
| 624 |
|
|---|
| 625 | *fLog << all << id << " succesful pixels :-))" << endl;
|
|---|
| 626 | id = 0;
|
|---|
| 627 |
|
|---|
| 628 | *fLog << all << endl;
|
|---|
| 629 | *fLog << all << "Excluded pixels:" << endl;
|
|---|
| 630 | *fLog << all << endl;
|
|---|
| 631 |
|
|---|
| 632 | TIter Next5(fPixels);
|
|---|
| 633 | while ((pix=(MCalibrationQEPix*)Next5()))
|
|---|
| 634 | {
|
|---|
| 635 | if (pix->IsExcluded())
|
|---|
| 636 | {
|
|---|
| 637 | *fLog << all << pix->GetPixId() << endl;
|
|---|
| 638 | id++;
|
|---|
| 639 | }
|
|---|
| 640 | }
|
|---|
| 641 | *fLog << all << id << " Excluded pixels " << endl;
|
|---|
| 642 | }
|
|---|
| 643 |
|
|---|
| 644 |
|
|---|
| 645 | // --------------------------------------------------------------------------
|
|---|
| 646 | //
|
|---|
| 647 | // Sets the validity flag (according to b) for the Blind Pixel Method,
|
|---|
| 648 | // for all colours (kGREEN, kBLUE, kUV, kCT1)
|
|---|
| 649 | //
|
|---|
| 650 | void MCalibrationQECam::SetBlindPixelMethodValid ( const Bool_t b )
|
|---|
| 651 | {
|
|---|
| 652 | SetBlindPixelMethodValid ( b, MCalibrationCam::kGREEN);
|
|---|
| 653 | SetBlindPixelMethodValid ( b, MCalibrationCam::kBLUE );
|
|---|
| 654 | SetBlindPixelMethodValid ( b, MCalibrationCam::kUV );
|
|---|
| 655 | SetBlindPixelMethodValid ( b, MCalibrationCam::kCT1 );
|
|---|
| 656 | }
|
|---|
| 657 |
|
|---|
| 658 | // ----------------------------------------------------------------------------
|
|---|
| 659 | //
|
|---|
| 660 | // Sets the validity flag (according to b) for the combination of the 3 methods
|
|---|
| 661 | // for all colours (kGREEN, kBLUE, kUV, kCT1)
|
|---|
| 662 | //
|
|---|
| 663 | void MCalibrationQECam::SetCombinedMethodValid ( const Bool_t b )
|
|---|
| 664 | {
|
|---|
| 665 | SetCombinedMethodValid ( b, MCalibrationCam::kGREEN);
|
|---|
| 666 | SetCombinedMethodValid ( b, MCalibrationCam::kBLUE );
|
|---|
| 667 | SetCombinedMethodValid ( b, MCalibrationCam::kUV );
|
|---|
| 668 | SetCombinedMethodValid ( b, MCalibrationCam::kCT1 );
|
|---|
| 669 | }
|
|---|
| 670 |
|
|---|
| 671 | // --------------------------------------------------------------------------
|
|---|
| 672 | //
|
|---|
| 673 | // Sets the validity flag (according to b) for the F-Factor Method
|
|---|
| 674 | // for all colours (kGREEN, kBLUE, kUV, kCT1)
|
|---|
| 675 | //
|
|---|
| 676 | void MCalibrationQECam::SetFFactorMethodValid ( const Bool_t b )
|
|---|
| 677 | {
|
|---|
| 678 | SetFFactorMethodValid ( b, MCalibrationCam::kGREEN);
|
|---|
| 679 | SetFFactorMethodValid ( b, MCalibrationCam::kBLUE );
|
|---|
| 680 | SetFFactorMethodValid ( b, MCalibrationCam::kUV );
|
|---|
| 681 | SetFFactorMethodValid ( b, MCalibrationCam::kCT1 );
|
|---|
| 682 | }
|
|---|
| 683 |
|
|---|
| 684 | // --------------------------------------------------------------------------
|
|---|
| 685 | //
|
|---|
| 686 | // Sets the validity flag (according to b) for the PIN Diode Method,
|
|---|
| 687 | // for all colours (kGREEN, kBLUE, kUV, kCT1)
|
|---|
| 688 | //
|
|---|
| 689 | void MCalibrationQECam::SetPINDiodeMethodValid ( const Bool_t b )
|
|---|
| 690 | {
|
|---|
| 691 | SetPINDiodeMethodValid ( b, MCalibrationCam::kGREEN);
|
|---|
| 692 | SetPINDiodeMethodValid ( b, MCalibrationCam::kBLUE );
|
|---|
| 693 | SetPINDiodeMethodValid ( b, MCalibrationCam::kUV );
|
|---|
| 694 | SetPINDiodeMethodValid ( b, MCalibrationCam::kCT1 );
|
|---|
| 695 | }
|
|---|
| 696 |
|
|---|
| 697 | // --------------------------------------------------------------------------
|
|---|
| 698 | //
|
|---|
| 699 | // Sets the validity flag (according to b) for the Blind Pixel Method,
|
|---|
| 700 | // for colour "col"
|
|---|
| 701 | //
|
|---|
| 702 | void MCalibrationQECam::SetBlindPixelMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 703 | {
|
|---|
| 704 | if (b)
|
|---|
| 705 | SETBIT(fFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
|
|---|
| 706 | else
|
|---|
| 707 | CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kBlindPixelMethodValid);
|
|---|
| 708 | }
|
|---|
| 709 |
|
|---|
| 710 | // --------------------------------------------------------------------------
|
|---|
| 711 | //
|
|---|
| 712 | // Sets the validity flag (according to b) for the combination of 3 methods
|
|---|
| 713 | // for colour "col"
|
|---|
| 714 | //
|
|---|
| 715 | void MCalibrationQECam::SetCombinedMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 716 | {
|
|---|
| 717 | if (b)
|
|---|
| 718 | SETBIT(fFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
|
|---|
| 719 | else
|
|---|
| 720 | CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kCombinedMethodValid);
|
|---|
| 721 | }
|
|---|
| 722 |
|
|---|
| 723 | // --------------------------------------------------------------------------
|
|---|
| 724 | //
|
|---|
| 725 | // Sets the validity flag (according to b) for the F-Factor Method,
|
|---|
| 726 | // for colour "col"
|
|---|
| 727 | //
|
|---|
| 728 | void MCalibrationQECam::SetFFactorMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 729 | {
|
|---|
| 730 | if (b)
|
|---|
| 731 | SETBIT(fFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
|
|---|
| 732 | else
|
|---|
| 733 | CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kFFactorMethodValid);
|
|---|
| 734 | }
|
|---|
| 735 |
|
|---|
| 736 | // --------------------------------------------------------------------------
|
|---|
| 737 | //
|
|---|
| 738 | // Sets the validity flag (according to b) for the PIN Diode Method,
|
|---|
| 739 | // for colour "col"
|
|---|
| 740 | //
|
|---|
| 741 | void MCalibrationQECam::SetPINDiodeMethodValid ( const Bool_t b, MCalibrationCam::PulserColor_t col )
|
|---|
| 742 | {
|
|---|
| 743 | if (b)
|
|---|
| 744 | SETBIT(fFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
|
|---|
| 745 | else
|
|---|
| 746 | CLRBIT(fFlags[ MCalibrationCam::kGREEN ],kPINDiodeMethodValid);
|
|---|
| 747 | }
|
|---|
| 748 |
|
|---|
| 749 |
|
|---|
| 750 |
|
|---|
| 751 |
|
|---|
| 752 |
|
|---|
| 753 |
|
|---|
| 754 |
|
|---|
| 755 |
|
|---|