Ignore:
Timestamp:
10/16/06 19:43:37 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhbase/MH.cc

    r8047 r8073  
    13221322//
    13231323// see http://root.cern.ch/phpBB2/viewtopic.php?p=14818
     1324// see http://savannah.cern.ch/bugs/?20722
    13241325//
    13251326void MH::SetBinomialErrors(TH1 &hres, const TH1 &h1, const TH1 &h2, Double_t c1, Double_t c2)
     
    13291330        const Double_t b1 = h1.GetBinContent(binx);
    13301331        const Double_t b2 = h2.GetBinContent(binx);
    1331         const Double_t w  = c2*b2 ? (c1*b1)/(c2*b2) : 0;
    13321332        const Double_t e1 = h2.GetBinError(binx);
    13331333        const Double_t e2 = h1.GetBinError(binx);
    13341334
    1335         const Double_t rc = ((1-2*w)*e1*e1+w*w*e2*e2)/(b2*b2);
     1335        //const Double_t w  = c2*b2 ? (c1*b1)/(c2*b2) : 0;
     1336        //const Double_t rc = ((1-2*w)*e1*e1+w*w*e2*e2)/(b2*b2);
     1337
     1338        const Double_t c = c2==0 ? 1 : c1/c2;
     1339        const Double_t u = b2==0 ? 0 : b1/b2;
     1340
     1341        const Double_t rc = c*((1-2*u)*e1*e1+u*u*e2*e2)/(b2*b2);
    13361342
    13371343        hres.SetBinError(binx, TMath::Sqrt(TMath::Abs(rc)));
Note: See TracChangeset for help on using the changeset viewer.