Changeset 3660 for trunk/MagicSoft/Mars
- Timestamp:
- 04/05/04 21:48:56 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MGeomApply.cc
r3659 r3660 127 127 if (!cam) 128 128 { 129 129 *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl; 130 130 return kFALSE; 131 131 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r3658 r3660 1038 1038 { 1039 1039 1040 Float_t flux = pindiode.Get MeanFluxOutsidePlexiglass();1041 Float_t fluxerr = pindiode.Get MeanFluxOutsidePlexiglassErr();1040 Float_t flux = pindiode.GetFluxOutsidePlexiglass(); 1041 Float_t fluxerr = pindiode.GetFluxOutsidePlexiglassErr(); 1042 1042 1043 1043 TIter Next(fPixels); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.cc
r3658 r3660 31 31 // is the documentation for the moment. 32 32 // 33 // Currently, the following numbers are implemented: 34 // 35 // Area of Inner Pixel Ai: 779.423 +- 0 mm^2 36 // Area of PIN Diode Ap: 100.000 +- 10 mm^2 37 // 38 // Ratio of areas: 39 // 40 // Distance of PIN Diode to pulser D1: 1.5 +- 0.3 m 41 // Distance of Inner Pixel to pulser D2: 18.0 +- 0.5 m 42 // 43 // Ai*D1*D1 44 // gkSolidAngleRatio = -------- = 0.054 45 // Ap*D2*D2 46 // 47 // gkSolidAngleRatioErr = 0.01 48 // 49 // 33 50 ///////////////////////////////////////////////////////////////////////////// 34 51 #include "MCalibrationChargePINDiode.h" … … 44 61 const Float_t MCalibrationChargePINDiode::fgChargeToPhotons = -1.; 45 62 const Float_t MCalibrationChargePINDiode::fgChargeToPhotonsErr = -1.; 46 // 47 // Area of Inner Pixel w.r.t. PIN Diode (which is 1 cm2) 48 // 49 // Distance of PIN Diode to pulser D1: 1.5 +- 0.3 m 50 // Distance of Inner Pixel to pulser D2: 18.0 +- 0.5 m 51 // 52 // 53 // D1*D1 54 // conversion C = ------ = 0.0069 55 // D2*D2 56 // 57 // Delta C / C = 2 * Sqrt( (Delta D1/D1)2 + (Delta D2/D2)2 ) 58 // Delta C / C = 0.4 59 // 60 // C = 0.007 +- 0.003 61 // 62 const Float_t MCalibrationChargePINDiode::gkFluxCameravsPINDiode = 0.007; 63 const Float_t MCalibrationChargePINDiode::gkFluxCameravsPINDiodeErr = 0.003; 63 const Float_t MCalibrationChargePINDiode::gkSolidAngleRatio = 0.055; 64 const Float_t MCalibrationChargePINDiode::gkSolidAngleRatioErr = 0.01; 64 65 // 65 66 // Average QE of the PIN Diode … … 120 121 SetTimeFitValid ( kFALSE ); 121 122 122 fPed = -1.; 123 fPedRms = -1.; 124 125 fRmsChargeMean = -1.; 126 fRmsChargeMeanErr = -1.; 127 fRmsChargeSigma = -1.; 128 fRmsChargeSigmaErr = -1.; 129 130 fAbsTimeMean = -1.; 131 fAbsTimeRms = -1.; 132 133 fConvPhotons = -1.; 134 fConvPhotonsVar = -1.; 135 136 fMeanFluxOutsidePlexiglass = -1.; 137 fMeanFluxOutsidePlexiglassVar = -1.; 123 fAbsTimeMean = -1.; 124 fAbsTimeRms = -1.; 125 fFluxOutsidePlexiglass = -1.; 126 fFluxOutsidePlexiglassVar = -1.; 127 fNumPhotons = -1.; 128 fNumPhotonsVar = -1.; 129 fPed = -1.; 130 fPedRms = -1.; 131 fRmsChargeMean = -1.; 132 fRmsChargeMeanErr = -1.; 133 fRmsChargeSigma = -1.; 134 fRmsChargeSigmaErr = -1.; 138 135 139 136 MCalibrationPix::Clear(); … … 193 190 // -------------------------------------------------------------------------- 194 191 // 195 // Return -1 if f MeanFluxOutsidePlexiglassVar is smaller than 0.196 // Return square root of f MeanFluxOutsidePlexiglassVar192 // Return -1 if fFluxOutsidePlexiglassVar is smaller than 0. 193 // Return square root of fFluxOutsidePlexiglassVar 197 194 // 198 Float_t MCalibrationChargePINDiode::Get MeanFluxOutsidePlexiglassErr() const199 { 200 if (f MeanFluxOutsidePlexiglassVar < 0.)195 Float_t MCalibrationChargePINDiode::GetFluxOutsidePlexiglassErr() const 196 { 197 if (fFluxOutsidePlexiglassVar < 0.) 201 198 return -1.; 202 199 203 return TMath::Sqrt(f MeanFluxOutsidePlexiglassVar);200 return TMath::Sqrt(fFluxOutsidePlexiglassVar); 204 201 } 205 202 … … 227 224 // Return kFALSE if IsChargeFitValid() is kFALSE 228 225 // 229 // Calculate fMeanFluxOutsidePlexiglass with the formula: 230 // - fMeanFluxOutsidePlexiglass = fConvPhotons*gkPINDiodeArea*gkFluxCameravsPINDiode 231 // / gkPINDiodeQE (of the corr. colour) 232 // - fMeanFluxOutsidePlexiglass = fConvPhotons*gkPINDiodeArea*gkFluxCameravsPINDiode 226 // Calculate fFluxOutsidePlexiglass with the formula: 227 // - fFluxOutsidePlexiglass = fNumPhotons*gkSolidAngleRatio / gkPINDiodeQE (of the corr. colour) 228 // - fFluxOutsidePlexiglassVar = sqrt( fNumPhotonsVar / ( fNumPhotons * fNumPhotons ) 229 // + ( gkSolidAngleRatioErr * gkSolidAngleRatioErr / gkSolidAngleRatio / gkSolidAngleRatio ) 230 // + ( gkPINDiodeQEErr * gkPINDiodeQEErr / gkPINDiodeQE / gkPINDiodeQE ) 231 // ) * fFluxOutsidePlexiglass * * fFluxOutsidePlexiglass 232 // 233 // If the fFluxOutsidePlexiglass is smaller than 0., return kFALSE 234 // If the Variance is smaller than 0., return kFALSE 235 // 236 // SetFluxOutsidePlexiglassAvailable() and return kTRUE 233 237 // 234 238 Bool_t MCalibrationChargePINDiode::CalcFluxOutsidePlexiglass() … … 238 242 return kFALSE; 239 243 240 // Start calculation of number of photons per mm^2 on the camera241 fMeanFluxOutsidePlexiglass = fConvPhotons * gkPINDiodeArea;244 // 245 // Start calculation of number of photons per mm^2 on an inner pixel: 242 246 // Correct for the distance between camera and PIN Diode and for different areas. 243 fMeanFluxOutsidePlexiglass *= gkFluxCameravsPINDiode; 244 247 // 248 fFluxOutsidePlexiglass = fNumPhotons * gkSolidAngleRatio; 249 250 // 245 251 // Start calculation of number of photons relative Variance (!!) 246 fMeanFluxOutsidePlexiglassVar = fConvPhotonsVar 247 / ( fConvPhotons * fConvPhotons ) ; 248 fMeanFluxOutsidePlexiglassVar += gkFluxCameravsPINDiodeErr*gkFluxCameravsPINDiodeErr 249 / gkFluxCameravsPINDiode/gkFluxCameravsPINDiode; 250 252 // 253 const Float_t numphotRelVar = fNumPhotonsVar / ( fNumPhotons * fNumPhotons ) ; 254 const Float_t solidangleRelVar = gkSolidAngleRatioErr* gkSolidAngleRatioErr 255 / ( gkSolidAngleRatio * gkSolidAngleRatio ); 256 Float_t fluxRelVar = numphotRelVar + solidangleRelVar ; 257 251 258 switch (fColor) 252 259 { 253 260 case kGREEN: 254 f MeanFluxOutsidePlexiglass /=gkPINDiodeQEGreen;255 f MeanFluxOutsidePlexiglassVar += gkPINDiodeQEGreenErr*gkPINDiodeQEGreenErr256 / gkPINDiodeQEGreen/gkPINDiodeQEGreen;261 fFluxOutsidePlexiglass /= gkPINDiodeQEGreen; 262 fluxRelVar += gkPINDiodeQEGreenErr* gkPINDiodeQEGreenErr 263 / ( gkPINDiodeQEGreen * gkPINDiodeQEGreen ); 257 264 break; 258 265 case kBLUE: 259 f MeanFluxOutsidePlexiglass /=gkPINDiodeQEBlue;260 f MeanFluxOutsidePlexiglassVar += gkPINDiodeQEBlueErr*gkPINDiodeQEBlueErr261 / gkPINDiodeQEBlue/gkPINDiodeQEBlue;266 fFluxOutsidePlexiglass /= gkPINDiodeQEBlue; 267 fluxRelVar += gkPINDiodeQEBlueErr* gkPINDiodeQEBlueErr 268 / ( gkPINDiodeQEBlue * gkPINDiodeQEBlue ); 262 269 break; 263 270 case kUV: 264 f MeanFluxOutsidePlexiglass /=gkPINDiodeQEUV;265 f MeanFluxOutsidePlexiglassVar += gkPINDiodeQEUVErr*gkPINDiodeQEUVErr266 / gkPINDiodeQEUV/gkPINDiodeQEUV;271 fFluxOutsidePlexiglass /= gkPINDiodeQEUV; 272 fluxRelVar += gkPINDiodeQEUVErr* gkPINDiodeQEUVErr 273 / ( gkPINDiodeQEUV * gkPINDiodeQEUV ); 267 274 break; 268 275 case kCT1: 269 276 default: 270 f MeanFluxOutsidePlexiglass /=gkPINDiodeQECT1;271 f MeanFluxOutsidePlexiglassVar += gkPINDiodeQECT1Err*gkPINDiodeQECT1Err272 / gkPINDiodeQECT1/gkPINDiodeQECT1;277 fFluxOutsidePlexiglass /= gkPINDiodeQECT1; 278 fluxRelVar += gkPINDiodeQECT1Err* gkPINDiodeQECT1Err 279 / ( gkPINDiodeQECT1 * gkPINDiodeQECT1 ); 273 280 break; 274 281 } … … 277 284 *fLog << inf << endl; 278 285 *fLog << inf << " Mean Photon flux [ph/mm^2] outside Plexiglass: " 279 << f MeanFluxOutsidePlexiglass << endl;280 281 if (f MeanFluxOutsidePlexiglass < 0.)286 << fFluxOutsidePlexiglass << endl; 287 288 if (fFluxOutsidePlexiglass < 0.) 282 289 return kFALSE; 283 290 284 if (f MeanFluxOutsidePlexiglassVar < 0.)291 if (fluxRelVar < 0.) 285 292 return kFALSE; 286 293 … … 290 297 // Finish calculation of errors -> convert from relative variance to absolute variance 291 298 // 292 f MeanFluxOutsidePlexiglassVar *= fMeanFluxOutsidePlexiglass*fMeanFluxOutsidePlexiglass;299 fFluxOutsidePlexiglassVar *= fluxRelVar * fFluxOutsidePlexiglass * fFluxOutsidePlexiglass; 293 300 294 301 *fLog << inf << " Error on Photon flux [ph/mm^2] outside Plexiglass: " 295 << Get MeanFluxOutsidePlexiglassErr() << endl;302 << GetFluxOutsidePlexiglassErr() << endl; 296 303 *fLog << inf << endl; 297 304 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h
r3658 r3660 13 13 static const Float_t fgChargeToPhotonsErr; //! Default for fChargeToPhotonsVar 14 14 static const Float_t gkPINDiodeArea; //! PIN Diode Effective Area in mm^2 15 static const Float_t gkFluxCameravsPINDiode; //! Flux Conversion PIN Diode - inner pixel16 static const Float_t gkFluxCameravsPINDiodeErr; //! Error of flux conv. PIN Diode - inner pixel17 15 static const Float_t gkPINDiodeQEGreen; //! Quantum Efficiency at 520 nm 18 16 static const Float_t gkPINDiodeQEBlue; //! Quantum Efficiency at 460 nm … … 20 18 static const Float_t gkPINDiodeQECT1; //! Quantum Efficiency at 370 nm 21 19 static const Float_t gkPINDiodeQEGreenErr; //! Uncertainty QE at 520 nm 22 static const Float_t gkPINDiodeQEBlueErr ; //! Uncertainty QE at 460 nm 23 static const Float_t gkPINDiodeQEUVErr ; //! Uncertainty QE at 370 nm 24 static const Float_t gkPINDiodeQECT1Err ; //! Uncertainty QE at 370 nmu 25 20 static const Float_t gkPINDiodeQEBlueErr; //! Uncertainty QE at 460 nm 21 static const Float_t gkPINDiodeQEUVErr; //! Uncertainty QE at 370 nm 22 static const Float_t gkPINDiodeQECT1Err; //! Uncertainty QE at 370 nmu 23 static const Float_t gkSolidAngleRatio; //! Solid angles ratio PIN Diode - inner pixel 24 static const Float_t gkSolidAngleRatioErr; //! Error solid angle ratio PIN Diode - inn. pix. 26 25 27 26 Float_t fAbsTimeMean; // Mean Absolute Arrival Time … … 33 32 Float_t fChargeToPhotons; // Mean conv. PIN Diode charge to number of incident photons 34 33 Float_t fChargeToPhotonsVar; // Variance of mean conv. PIN Diode charge to nr. incident photons 35 Float_t f ConvPhotons;// Number photons incidident on PIN Diode36 Float_t f ConvPhotonsVar; // Error onnr. photons incid. on PIN Diode37 Float_t f MeanFluxOutsidePlexiglass;// Mean number photons in INNER PIXEL outside plexiglass38 Float_t f MeanFluxOutsidePlexiglassVar;// Error on nr. photons in INNER PIXEL outside plexiglass34 Float_t fNumPhotons; // Number photons incidident on PIN Diode 35 Float_t fNumPhotonsVar; // Variance nr. photons incid. on PIN Diode 36 Float_t fFluxOutsidePlexiglass; // Mean number photons in INNER PIXEL outside plexiglass 37 Float_t fFluxOutsidePlexiglassVar; // Error on nr. photons in INNER PIXEL outside plexiglass 39 38 Float_t fPed; // Mean pedestal (from MPedestalPix) 40 39 Float_t fPedRms; // Pedestal RMS (from MPedestalPix) … … 73 72 74 73 // Getters 75 Float_t Get MeanFluxOutsidePlexiglass() const { return fMeanFluxOutsidePlexiglass; }76 Float_t Get MeanFluxOutsidePlexiglassErr() const;74 Float_t GetFluxOutsidePlexiglass() const { return fFluxOutsidePlexiglass; } 75 Float_t GetFluxOutsidePlexiglassErr() const; 77 76 78 77 // Pedestals
Note:
See TracChangeset
for help on using the changeset viewer.