Changeset 6318 for trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
- Timestamp:
- 02/09/05 19:37:19 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r5977 r6318 30 30 // MMcFadcHeader and translates it to the pedestal mean and rms (in adc counts). 31 31 // If not already existing in the parameter list, an MCalibrationCam object 32 // is created, with the conversion factor between photons and ADC counts is 33 // set to 1 to allow the analysis to proceed. 32 // is created, with the conversion factor between ADC counts and photons or 33 // photoelectrons (depending on fSignalType) is set to 1 to allow the analysis 34 // to proceed. 34 35 // 35 36 // Then it creates and fills also the MPedPhotCam object containing the pedestal 36 // mean and rms in units of photons .37 // mean and rms in units of photons or photoelectrons. 37 38 // 38 39 // Input Containers: … … 71 72 #include "MMcFadcHeader.hxx" 72 73 #include "MMcConfigRunHeader.h" 74 #include "MCalibrateData.h" 73 75 74 76 ClassImp(MMcCalibrationUpdate); … … 85 87 fAmplitudeOuter = -1.; 86 88 fConversionHiLo = -1.; 89 90 fSignalType = MCalibrateData::kPhe; 87 91 88 92 fFillCalibrationCam = kTRUE; … … 221 225 // If MCalibrationChargeCam and MCalibrationQECam already existed 222 226 // in the parameter list before MMcCalibrationUpdate::PreProcess was 223 // executed (from a previous calibration loop) we must not fill it,227 // executed (from a previous calibration loop) we must not fill them, 224 228 // hence nothing else has to be done in ReInit: 225 229 // … … 233 237 // perpendicular to the camera plane. 234 238 // 235 // FIXME! We shouldlook for AddSerialNumber("MMcConfigRunHeader") but239 // FIXME! We look for AddSerialNumber("MMcConfigRunHeader") but 236 240 // for the moment the stereo version of camera does not write one such 237 241 // header per telescope (it should!) … … 254 258 // (at angle = 90 deg) 255 259 256 // Set now the default conversion from ADC counts to "photoelectrons"260 // Set now the default conversion from ADC counts to photoelectrons 257 261 // (in case no previous calibration existed in the parameter list). 258 // As default we want 1 photon = 1 inner pixel ADC count 259 // (this will make Size to be in ADC counts, which is what we want for 260 // the MC calibration loop). To achieve this we set the ADC to 261 // photoelectron conversion equal to the QE, which will later make the 262 // ADC to photon conversion factor (= ADC2PhotEl/QE) to be = 1. 263 // 264 fADC2PhElInner = MCalibrationQEPix::gkDefaultAverageQE; 262 // 263 // As default we want to have SIZE in ADC counts, or rather, in "inner pixel 264 // equivalent ADC counts". 265 // 266 // To achieve this: 267 // - In the case fSignalType==kPhot: we set the ADC to photoelectron conversion 268 // equal to the QE, which will later make the ADC to photon conversion factor 269 // (= ADC2PhotEl/QE) to be = 1, 270 // 271 // - In the case fSignalType==kPhe: we set the ADC to photoelectron conversion 272 // equal to 1, since this will be applied directly to the signals... 273 274 if (fSignalType == MCalibrateData::kPhot) 275 fADC2PhElInner = MCalibrationQEPix::gkDefaultAverageQE; 276 else 277 fADC2PhElInner = 1.; 265 278 266 279 // … … 281 294 282 295 if (fOuterPixelsGainScaling) 283 fADC2PhElOuter = MCalibrationQEPix::gkDefaultAverageQE296 fADC2PhElOuter = fADC2PhElInner 284 297 * (fAmplitude / fAmplitudeOuter); 285 298 else … … 397 410 398 411 Float_t qe = qepix.GetAverageQE(); 399 Float_t adc2phot = calpix.GetMeanConvFADC2Phe() / qe; 412 413 414 Float_t conv = (fSignalType == MCalibrateData::kPhot? 415 calpix.GetMeanConvFADC2Phe() / qe : 416 calpix.GetMeanConvFADC2Phe()); 417 400 418 Float_t hi2lo = calpix.GetConversionHiLo(); 401 419 402 420 if (sigpix.IsLoGainUsed()) 403 pedpix.Set( adc2phot*hi2lo*pedestmean, adc2phot*hi2lo*pedestrms);421 pedpix.Set(conv*hi2lo*pedestmean, conv*hi2lo*pedestrms); 404 422 else 405 pedpix.Set( adc2phot*pedestmean, adc2phot*pedestrms);423 pedpix.Set(conv*pedestmean, conv*pedestrms); 406 424 407 425 } … … 409 427 return kTRUE; 410 428 } 429
Note:
See TracChangeset
for help on using the changeset viewer.