Changeset 8073 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 10/16/06 19:43:37 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH.cc
r8047 r8073 1322 1322 // 1323 1323 // see http://root.cern.ch/phpBB2/viewtopic.php?p=14818 1324 // see http://savannah.cern.ch/bugs/?20722 1324 1325 // 1325 1326 void MH::SetBinomialErrors(TH1 &hres, const TH1 &h1, const TH1 &h2, Double_t c1, Double_t c2) … … 1329 1330 const Double_t b1 = h1.GetBinContent(binx); 1330 1331 const Double_t b2 = h2.GetBinContent(binx); 1331 const Double_t w = c2*b2 ? (c1*b1)/(c2*b2) : 0;1332 1332 const Double_t e1 = h2.GetBinError(binx); 1333 1333 const Double_t e2 = h1.GetBinError(binx); 1334 1334 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); 1336 1342 1337 1343 hres.SetBinError(binx, TMath::Sqrt(TMath::Abs(rc)));
Note:
See TracChangeset
for help on using the changeset viewer.