| 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 | // For the moment, only a fixed average QE is stored:
|
|---|
| 31 | //
|
|---|
| 32 | // - Average QE: (email David Paneque, 14.2.04):
|
|---|
| 33 | //
|
|---|
| 34 | // The conversion factor that comes purely from QE folded to a Cherenkov
|
|---|
| 35 | // spectrum has to be multiplied by:
|
|---|
| 36 | // * Plexiglass window -->> 0.96 X 0.96
|
|---|
| 37 | // * PMT photoelectron collection efficiency -->> 0.9
|
|---|
| 38 | // * Light guides efficiency -->> 0.94
|
|---|
| 39 | //
|
|---|
| 40 | // Concerning the light guides effiency estimation... Daniel Ferenc
|
|---|
| 41 | // is preparing some work (simulations) to estimate it. Yet so far, he has
|
|---|
| 42 | // been busy with other stuff, and this work is still UNfinished.
|
|---|
| 43 | //
|
|---|
| 44 | // The estimation I did comes from:
|
|---|
| 45 | // 1) Reflectivity of light guide walls is 85 % (aluminum)
|
|---|
| 46 | // 2) At ZERO degree light incidence, 37% of the light hits such walls
|
|---|
| 47 | // (0.15X37%= 5.6% of light lost)
|
|---|
| 48 | // 3) When increasing the light incidence angle, more and more light hits
|
|---|
| 49 | // the walls.
|
|---|
| 50 | //
|
|---|
| 51 | // However, the loses due to larger amount of photons hitting the walls is more
|
|---|
| 52 | // or less counteracted by the fact that more and more photon trajectories cross
|
|---|
| 53 | // the PMT photocathode twice, increasing the effective sensitivity of the PMT.
|
|---|
| 54 | //
|
|---|
| 55 | // Jurgen Gebauer did some quick measurements about this issue. I attach a
|
|---|
| 56 | // plot. You can see that the angular dependence is (more or less) in agreement
|
|---|
| 57 | // with a CosTheta function (below 20-25 degrees),
|
|---|
| 58 | // which is the variation of teh entrance window cross section. So, in
|
|---|
| 59 | // first approximation, no loses when increasing light incidence angle;
|
|---|
| 60 | // and therefore, the factor 0.94.
|
|---|
| 61 | //
|
|---|
| 62 | // So, summarizing... I would propose the following conversion factors
|
|---|
| 63 | // (while working with CT1 cal box) in order to get the final number of photons
|
|---|
| 64 | // from the detected measured size in ADC counts.
|
|---|
| 65 | //
|
|---|
| 66 | // Nph = ADC * FmethodConversionFactor / ConvPhe-PhFactor
|
|---|
| 67 | //
|
|---|
| 68 | // FmethodConversionFactor ; measured for individual pmts
|
|---|
| 69 | //
|
|---|
| 70 | // ConvPhe-PhFactor = 0.98 * 0.23 * 0.90 * 0.94 * 0.96 * 0.96 = 0.18
|
|---|
| 71 | //
|
|---|
| 72 | // I would not apply any smearing of this factor (which we have in nature),
|
|---|
| 73 | // since we might be applying it to PMTs in the totally wrong direction.
|
|---|
| 74 | //
|
|---|
| 75 | //
|
|---|
| 76 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 77 | #include "MCalibrationQEPix.h"
|
|---|
| 78 |
|
|---|
| 79 | #include "MLog.h"
|
|---|
| 80 | #include "MLogManip.h"
|
|---|
| 81 |
|
|---|
| 82 | ClassImp(MCalibrationQEPix);
|
|---|
| 83 |
|
|---|
| 84 | using namespace std;
|
|---|
| 85 |
|
|---|
| 86 | // --------------------------------------------------------------------------
|
|---|
| 87 | //
|
|---|
| 88 | // Default Constructor:
|
|---|
| 89 | //
|
|---|
| 90 | MCalibrationQEPix::MCalibrationQEPix(const char *name, const char *title)
|
|---|
| 91 | {
|
|---|
| 92 |
|
|---|
| 93 | fName = name ? name : "MCalibrationQEPix";
|
|---|
| 94 | fTitle = title ? title : "Container of the calibrated quantum efficiency ";
|
|---|
| 95 |
|
|---|
| 96 | Clear();
|
|---|
| 97 |
|
|---|
| 98 | }
|
|---|
| 99 |
|
|---|
| 100 | // ------------------------------------------------------------------------
|
|---|
| 101 | //
|
|---|
| 102 | // Invalidate values
|
|---|
| 103 | //
|
|---|
| 104 | void MCalibrationQEPix::Clear(Option_t *o)
|
|---|
| 105 | {
|
|---|
| 106 |
|
|---|
| 107 | fQEGreen = -1.;
|
|---|
| 108 | fQEBlue = -1.;
|
|---|
| 109 | fQEUV = -1.;
|
|---|
| 110 | fQECT1 = -1.;
|
|---|
| 111 |
|
|---|
| 112 | fQEGreenErr = -1.;
|
|---|
| 113 | fQEBlueErr = -1.;
|
|---|
| 114 | fQEUVErr = -1.;
|
|---|
| 115 | fQECT1Err = -1.;
|
|---|
| 116 |
|
|---|
| 117 | MCalibrationPix::Clear();
|
|---|
| 118 |
|
|---|
| 119 | }
|
|---|
| 120 |
|
|---|
| 121 |
|
|---|
| 122 | void MCalibrationQEPix::SetQE( const Float_t qe, const PulserColor_t col )
|
|---|
| 123 | {
|
|---|
| 124 |
|
|---|
| 125 | switch (col)
|
|---|
| 126 | {
|
|---|
| 127 | case kGREEN:
|
|---|
| 128 | fQEGreen = qe;
|
|---|
| 129 | break;
|
|---|
| 130 | case kBLUE:
|
|---|
| 131 | fQEBlue = qe;
|
|---|
| 132 | break;
|
|---|
| 133 | case kUV:
|
|---|
| 134 | fQEUV = qe;
|
|---|
| 135 | break;
|
|---|
| 136 | case kCT1:
|
|---|
| 137 | fQECT1 = qe;
|
|---|
| 138 | break;
|
|---|
| 139 | default:
|
|---|
| 140 | fQECT1 = qe;
|
|---|
| 141 | break;
|
|---|
| 142 | }
|
|---|
| 143 | }
|
|---|
| 144 |
|
|---|
| 145 | void MCalibrationQEPix::SetQEErr( const Float_t qeerr, const PulserColor_t col )
|
|---|
| 146 | {
|
|---|
| 147 |
|
|---|
| 148 | switch (col)
|
|---|
| 149 | {
|
|---|
| 150 | case kGREEN:
|
|---|
| 151 | fQEGreenErr = qeerr;
|
|---|
| 152 | break;
|
|---|
| 153 | case kBLUE:
|
|---|
| 154 | fQEBlueErr = qeerr;
|
|---|
| 155 | break;
|
|---|
| 156 | case kUV:
|
|---|
| 157 | fQEUVErr = qeerr;
|
|---|
| 158 | break;
|
|---|
| 159 | case kCT1:
|
|---|
| 160 | fQECT1Err = qeerr;
|
|---|
| 161 | break;
|
|---|
| 162 | default:
|
|---|
| 163 | fQECT1Err = qeerr;
|
|---|
| 164 | break;
|
|---|
| 165 | }
|
|---|
| 166 | }
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 | Float_t MCalibrationQEPix::GetQE(const PulserColor_t col ) const
|
|---|
| 170 | {
|
|---|
| 171 |
|
|---|
| 172 | switch (col)
|
|---|
| 173 | {
|
|---|
| 174 | case kGREEN:
|
|---|
| 175 | return fQEGreen;
|
|---|
| 176 | break;
|
|---|
| 177 | case kBLUE:
|
|---|
| 178 | return fQEBlue;
|
|---|
| 179 | break;
|
|---|
| 180 | case kUV:
|
|---|
| 181 | return fQEUV;
|
|---|
| 182 | break;
|
|---|
| 183 | case kCT1:
|
|---|
| 184 | return fQECT1;
|
|---|
| 185 | break;
|
|---|
| 186 | default:
|
|---|
| 187 | return fQECT1;
|
|---|
| 188 | break;
|
|---|
| 189 | }
|
|---|
| 190 | }
|
|---|
| 191 |
|
|---|
| 192 | Float_t MCalibrationQEPix::GetQEErr(const PulserColor_t col ) const
|
|---|
| 193 | {
|
|---|
| 194 |
|
|---|
| 195 | switch (col)
|
|---|
| 196 | {
|
|---|
| 197 | case kGREEN:
|
|---|
| 198 | return fQEGreenErr;
|
|---|
| 199 | break;
|
|---|
| 200 | case kBLUE:
|
|---|
| 201 | return fQEBlueErr;
|
|---|
| 202 | break;
|
|---|
| 203 | case kUV:
|
|---|
| 204 | return fQEUVErr;
|
|---|
| 205 | break;
|
|---|
| 206 | case kCT1:
|
|---|
| 207 | return fQECT1Err;
|
|---|
| 208 | break;
|
|---|
| 209 | default:
|
|---|
| 210 | return fQECT1Err;
|
|---|
| 211 | break;
|
|---|
| 212 | }
|
|---|
| 213 | }
|
|---|
| 214 |
|
|---|
| 215 | // --------------------------------------------------------------
|
|---|
| 216 | //
|
|---|
| 217 | // The check return kTRUE if:
|
|---|
| 218 | //
|
|---|
| 219 | // Not yet implemented!
|
|---|
| 220 | //
|
|---|
| 221 | Bool_t MCalibrationQEPix::CheckQEValidity()
|
|---|
| 222 | {
|
|---|
| 223 |
|
|---|
| 224 | SetValid();
|
|---|
| 225 | return kTRUE;
|
|---|
| 226 | }
|
|---|