Ignore:
Timestamp:
11/27/04 15:40:08 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHPedestalCam.cc

    r5485 r5486  
    454454      MCalibrationPix &pix   = (*fCam)[i];
    455455     
     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
    456465      if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow())
    457466        continue;
     
    481490      pix.SetHiGainNumBlackout( hist.GetBlackout()  );
    482491      pix.SetHiGainNumPickup  ( hist.GetPickup()    );
    483       //
    484       // 6) Store calculated means and variances in the low-gain slices
    485       //
    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. );
    491492    }
    492493
     
    624625      //
    625626      pix.SetHiGainSigmaVar ( pix.GetHiGainSigmaVar() / fExtractHiGainSlices );
    626       pix.SetLoGainSigmaVar ( pix.GetLoGainSigmaVar() / fExtractLoGainSlices );
     627      pix.SetLoGainSigmaVar ( pix.GetLoGainSigmaVar() / fExtractHiGainSlices );
    627628    }
    628629
Note: See TracChangeset for help on using the changeset viewer.