Changeset 2886 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 01/22/04 20:54:16 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r2876 r2886 37 37 // MMcFadcHeader 38 38 // MRawRunHeader 39 // [MCalibrationCam] (if it existed previously) 39 40 // 40 41 // Output Containers: 41 // MCalibrationCam42 42 // MPedPhotCam 43 // [MCalibrationCam] (if it did not exist previously) 43 44 // 44 45 ///////////////////////////////////////////////////////////////////////////// … … 95 96 } 96 97 97 98 //---------------------------------------------------------------------------99 //100 // Set ADC to photon conversion factors.101 //102 void MMcCalibrationUpdate::SetADC2PhInner(Float_t x)103 {104 fADC2PhInner = x;105 106 return;107 }108 109 98 // -------------------------------------------------------------------------- 110 99 // … … 123 112 if ( !fCalCam ) 124 113 { 125 *fLog << warn<< dbginf << AddSerialNumber("MCalibrationCam") << " does not exist... Creating." << endl;114 *fLog << inf << dbginf << AddSerialNumber("MCalibrationCam") << " does not exist... Creating." << endl; 126 115 127 116 fCalCam = (MCalibrationCam*) pList->FindCreateObj(AddSerialNumber("MCalibrationCam")); … … 135 124 { 136 125 fFillCalibrationCam = kFALSE; 137 *fLog << warn << dbginf << AddSerialNumber("MCalibrationCam") << " already exists... " << endl;126 *fLog << inf << AddSerialNumber("MCalibrationCam") << " already exists... " << endl; 138 127 } 139 128 … … 189 178 190 179 // 191 // Set the ADC to photons conversion factor for outer pixels:192 //193 fADC2PhOuter = fADC2PhInner *194 (fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter());195 196 //197 // Set the conversion factor between high and low gain:198 //199 fConversionHiLo = fHeaderFadc->GetLow2HighGain();200 201 //202 180 // If MCalibrationCam already existed in the parameter list before 203 181 // MMcCalibrationUpdate::PreProcess was executed (from a … … 208 186 return kTRUE; 209 187 188 // 189 // Set the ADC to photons conversion factor for outer pixels: 190 // 191 fADC2PhOuter = fADC2PhInner * 192 (fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter()); 193 194 // 195 // Set the conversion factor between high and low gain: 196 // 197 fConversionHiLo = fHeaderFadc->GetLow2HighGain(); 210 198 211 199 const int num = fCalCam->GetSize(); … … 264 252 // counts for the RMS per slice: 265 253 // 266 267 254 268 255 const Float_t pedestrms = sigpix.IsLoGainUsed()? … … 279 266 MPedPhotPix &pedpix = (*fPedPhotCam)[i]; 280 267 281 Float_t adc2phot = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))? 282 fADC2PhOuter : fADC2PhInner; 268 MCalibrationPix &calpix = (*fCalCam)[i]; 269 Float_t adc2phot = calpix.GetMeanConversionBlindPixelMethod(); 270 Float_t hi2lo = calpix.GetConversionHiLo(); 283 271 284 272 if (sigpix.IsLoGainUsed()) 285 pedpix.Set(adc2phot* fConversionHiLo*pedestmean,286 adc2phot* fConversionHiLo*pedestrms);273 pedpix.Set(adc2phot*hi2lo*pedestmean, 274 adc2phot*hi2lo*pedestrms); 287 275 else 288 276 pedpix.Set(adc2phot*pedestmean, adc2phot*pedestrms); -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h
r2876 r2886 35 35 MMcCalibrationUpdate(const char *name=NULL, const char *title=NULL); 36 36 37 void SetADC2PhInner(Float_t x);38 39 37 ClassDef(MMcCalibrationUpdate, 0) // Task which obtains, for MC files, the pedestal mean and rms, and the calibration factor from ADC counts to photons. 40 38 };
Note:
See TracChangeset
for help on using the changeset viewer.