Changeset 5486 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 11/27/04 15:40:08 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.cc
r5485 r5486 454 454 MCalibrationPix &pix = (*fCam)[i]; 455 455 456 // 457 // 1) Store calculated means and variances in the low-gain slices 458 // 459 pix.SetLoGainMean ( fSum[i] / fNumEvents ); 460 const Double_t diff = fSum2[i] - fSum[i]*fSum[i]/fNumEvents; 461 pix.SetLoGainSigma ( diff > 0. ? TMath::Sqrt( diff / (fNumEvents-1) ) : 0.); 462 pix.SetLoGainMeanVar ( pix.GetLoGainSigma() * pix.GetLoGainSigma() / fNumEvents ); 463 pix.SetLoGainSigmaVar( pix.GetLoGainMeanVar() / 4. ); 464 456 465 if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow()) 457 466 continue; … … 481 490 pix.SetHiGainNumBlackout( hist.GetBlackout() ); 482 491 pix.SetHiGainNumPickup ( hist.GetPickup() ); 483 //484 // 6) Store calculated means and variances in the low-gain slices485 //486 pix.SetLoGainMean ( fSum[i] / fNumEvents );487 const Double_t diff = fSum2[i] - fSum[i]*fSum[i]/fNumEvents;488 pix.SetLoGainSigma ( diff > 0. ? TMath::Sqrt( diff / (fNumEvents-1) ) : 0.);489 pix.SetLoGainMeanVar ( pix.GetLoGainSigma() * pix.GetLoGainSigma() / fNumEvents );490 pix.SetLoGainSigmaVar( pix.GetLoGainMeanVar() / 4. );491 492 } 492 493 … … 624 625 // 625 626 pix.SetHiGainSigmaVar ( pix.GetHiGainSigmaVar() / fExtractHiGainSlices ); 626 pix.SetLoGainSigmaVar ( pix.GetLoGainSigmaVar() / fExtract LoGainSlices );627 pix.SetLoGainSigmaVar ( pix.GetLoGainSigmaVar() / fExtractHiGainSlices ); 627 628 } 628 629
Note:
See TracChangeset
for help on using the changeset viewer.