Changeset 3768 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 04/16/04 19:17:36 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r3689 r3768 39 39 // MMcFadcHeader 40 40 // MRawRunHeader 41 // [MCalibrationCam] (if it existed previously) 41 // [MCalibrationChargeCam] (if it existed previously) 42 // [MCalibrationQECam] (if it existed previously) 42 43 // 43 44 // Output Containers: 44 45 // MPedPhotCam 45 // [MCalibrationCam] (if it did not exist previously) 46 // [MCalibrationChargeCam] (if it did not exist previously) 47 // [MCalibrationQECam] (if it did not exist previously) 46 48 // 47 49 ///////////////////////////////////////////////////////////////////////////// … … 78 80 fTitle = title ? title : "Write MC pedestals and conversion factors into MCalibration Container"; 79 81 80 fADC2PhInner = 1.; 81 fADC2PhOuter = 1.; 82 // 83 // As default we set 1 photon = 1 ADC count. 84 // (this will make Size to be in ADC counts if no previous calibration has been made) 85 // Hence: 86 // 87 fADC2PhElInner = MCalibrationQEPix::gkDefaultAverageQE; 88 fADC2PhElOuter = MCalibrationQEPix::gkDefaultAverageQE; 82 89 83 90 fAmplitude = -1.; … … 114 121 { 115 122 fCalCam = (MCalibrationChargeCam*) pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); 116 if (!fCalCam) 123 fQECam = (MCalibrationQECam*) pList->FindObject(AddSerialNumber("MCalibrationQECam")); 124 125 if (!fCalCam || !fQECam) 117 126 { 118 127 fCalCam = (MCalibrationChargeCam*) pList->FindCreateObj(AddSerialNumber("MCalibrationChargeCam")); 119 if (!fCalCam) 128 fQECam = (MCalibrationQECam*) pList->FindCreateObj(AddSerialNumber("MCalibrationQECam")); 129 if (!fCalCam || !fQECam) 120 130 return kFALSE; 121 131 } … … 123 133 { 124 134 fFillCalibrationCam = kFALSE; 125 *fLog << inf << AddSerialNumber("MCalibrationChargeCam") << " already exists... " << endl; 126 } 127 128 fQECam = (MCalibrationQECam*) pList->FindObject(AddSerialNumber("MCalibrationQECam")); 129 if (!fQECam) 130 { 131 fQECam = (MCalibrationQECam*) pList->FindCreateObj(AddSerialNumber("MCalibrationQECam")); 132 if (!fQECam) 133 return kFALSE; 134 } 135 else 136 { 137 fFillQECam = kFALSE; 138 *fLog << inf << AddSerialNumber("MCalibrationQECam") << " already exists... " << endl; 139 } 140 135 *fLog << inf << AddSerialNumber("MCalibrationChargeCam") << " and " << 136 AddSerialNumber("MCalibrationQECam") << " already exist... " << endl; 137 } 141 138 142 139 fPedPhotCam = (MPedPhotCam*) pList->FindCreateObj(AddSerialNumber("MPedPhotCam")); … … 246 243 247 244 if (fOuterPixelsGainScaling) 248 fADC2Ph Outer = fADC2PhInner * (fAmplitude / fAmplitudeOuter);245 fADC2PhElOuter = fADC2PhElInner * (fAmplitude / fAmplitudeOuter); 249 246 else 250 fADC2Ph Outer = fADC2PhInner;247 fADC2PhElOuter = fADC2PhElInner; 251 248 252 249 … … 272 269 // and outer pixels). 273 270 // 274 Float_t adc2phot = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))? 275 fADC2PhOuter : fADC2PhInner; 276 277 // 278 // FIXME: This has now to be split into a adc2phe part and a phe2phot (==QE) part 279 // 280 const Float_t qe = MCalibrationQEPix::gkDefaultAverageQE; 281 calpix.SetMeanConvFADC2Phe(adc2phot*qe); // here, the FADC to phe part should go. 271 Float_t adc2photel = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))? 272 fADC2PhElOuter : fADC2PhElInner; 273 274 calpix.SetMeanConvFADC2Phe(adc2photel); 282 275 calpix.SetMeanConvFADC2PheVar(0.); 283 276 calpix.SetMeanFFactorFADC2Phot(0.); … … 334 327 335 328 MCalibrationChargePix &calpix = (MCalibrationChargePix&)(*fCalCam)[i]; 336 // MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam) [i]; 337 338 Float_t qe = MCalibrationQEPix::gkDefaultAverageQE; 329 MCalibrationQEPix &qepix = (MCalibrationQEPix&)(*fQECam)[i]; 330 331 qepix.SetAvNormFFactor(1.); 332 // This factor should convert the default average QE to average QE for a spectrum 333 // like that of Cherenkov light. See the documentration of MCalibrationQEPix. 334 335 Float_t qe = qepix.GetAverageQE(); 339 336 Float_t adc2phot = calpix.GetMeanConvFADC2Phe() / qe; 340 337 Float_t hi2lo = calpix.GetConversionHiLo(); -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h
r3689 r3768 28 28 MExtractedSignalCam *fSignalCam; 29 29 30 Float_t fADC2Ph Inner; // Conversion factor from ADC counts to photo-electrons31 Float_t fADC2Ph Outer; // for inner and outer pixels.30 Float_t fADC2PhElInner; // Conversion factor from ADC counts to photo-electrons 31 Float_t fADC2PhElOuter; // for inner and outer pixels. 32 32 33 33 Bool_t fFillCalibrationCam; 34 Bool_t fFillQECam;35 34 Bool_t fOuterPixelsGainScaling; 36 35
Note:
See TracChangeset
for help on using the changeset viewer.