- Timestamp:
- 01/09/04 15:02:11 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2759 r2760 5 5 -*-*- END OF LINE -*-*- 6 6 2004/01/09: Markus Gaug 7 8 * mcalib/MCalibrationCalc.cc 9 - catch the possibility of a calibration file, 10 unintendedly being a pedestal or cosmic file. 11 Program now exits with an error before doing the fits 7 12 8 13 * mcalib/MCalibrationPix.[h,cc] -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r2734 r2760 92 92 93 93 #include "MRawRunHeader.h" 94 #include "MRawEvtData.h" // MRawEvtData::GetNumPixels94 #include "MRawEvtData.h" 95 95 #include "MRawEvtPixelIter.h" 96 96 … … 106 106 // -------------------------------------------------------------------------- 107 107 // 108 // Default constructor. b is the number of slices before the maximum slice, 109 // a the number of slices behind the maximum slice which is taken as signal. 108 // Default constructor. 110 109 // 111 110 MCalibrationCalc::MCalibrationCalc(const char *name, const char *title) … … 234 233 fNumHiGainSamples = fSignals->GetNumUsedHiGainFADCSlices(); 235 234 fNumLoGainSamples = fSignals->GetNumUsedLoGainFADCSlices(); 235 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 236 236 237 237 fCalibrations->InitSize(cam->GetNumPixels()); … … 280 280 MExtractedSignalPix &sig = (*fSignals)[pixid]; 281 281 MPedestalPix &ped = (*fPedestals)[pixid]; 282 Float_t pedrms = ped.GetPedestalRms();283 Float_t sumhi = sig.GetExtractedSignalHiGain();282 Float_t pedrms = ped.GetPedestalRms()*fSqrtHiGainSamples; 283 Float_t sumhi = sig.GetExtractedSignalHiGain(); 284 284 285 if (sumhi < 15.*pedrms ) // cut at 3.5 sigma 285 // 286 // We consider a pixel as presumably due to cosmics 287 // if its sum of FADC slices is lower than 3 pedestal RMS 288 // 289 if (sumhi < 3.*pedrms ) 286 290 cosmicpix++; 287 291 } 288 292 289 if (cosmicpix > 100.) 293 // 294 // If the camera contains more than 230 295 // (this is the number of outer pixels plus about 50 inner ones) 296 // presumed pixels due to cosmics, then the event is discarted. 297 // This procedure is more or less equivalent to keeping only events 298 // with at least 350 pixels with high signals. 299 // 300 if (cosmicpix > 230.) 290 301 { 291 302 fCosmics++; … … 391 402 392 403 *fLog << inf << endl; 404 405 if (fEvents == 0) 406 { 407 408 *fLog << err << GetDescriptor() 409 << ": This run contains only cosmics or pedestals, " 410 << "cannot find events with more than 350 illuminated pixels. " << endl; 411 return kFALSE; 412 } 413 414 if (fEvents < fCosmics) 415 *fLog << warn << GetDescriptor() 416 << ": WARNING: Run contains more cosmics or pedestals than calibration events " << endl; 417 418 393 419 *fLog << GetDescriptor() << " Cut Histogram Edges" << endl; 394 420 -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h
r2734 r2760 43 43 Byte_t fNumHiGainSamples; 44 44 Byte_t fNumLoGainSamples; 45 45 Float_t fSqrtHiGainSamples; 46 46 47 Byte_t fFlags; // Flag for the fits used 47 48
Note:
See TracChangeset
for help on using the changeset viewer.