On Tue, 3 Jul 2007, Rene Brun wrote:
> Please read comments in the doc of TH1::Divide at
> http://root.cern.ch/root/htmldoc/src/TH1.cxx.html#hh46dE
>
> When using the pro release 5.16 the error in bin1 is null.
Hi Rene,
while this makes sense (and simplifies the code) I wonder whether it was
really intended to ignore the factors c1 and c2 in case of dividing
histograms with binomial errors, which 'slipped in' now (not being
mentioned in the commit log of TH1.cxx rev. 1.347!). I think that factors
should be treated as if all histogram entries would have been weighted
with this factor. A useful error for dividing weighted histograms with
binomial errors has been introduced by Lorenzo in rev. 1.303.
I did not check whether the old code after 1.303 and before 1.347 treated the factors c1/2 correctly as weights, though.
Cheers
Gero
> > Hi,
> >
> > In ROOT 5, the binomial error I expect to get with the "B" option in
> > histogram
> > division isn't the "standard" binomial error.
> > What is its precise definition? If it's a bug it should be fixed,
> > if it's not, the documentation should be updated.
> >
> > I attach an example where I expect to see an error of 0, but
> > it's 0.0496 instead.
> >
> > Regards,
> > Suyong
> >
> > ------------------------------------------------------------------------
> >
> > {
> > TH1F *h1 = new TH1F("h1", "Demonimator", 1, 0.0, 1.0);
> > TH1F *h2 = new TH1F("h2", "Numerator", 1, 0.0, 1.0);
> >
> > h1->Sumw2();
> > h2->Sumw2();
> >
> > h1->Fill(0.5,10.0);
> > h2->Fill(0.5,10.0);
> >
> > h1->Divide(h1, h2, 1.0, 1.0, "B");
> > }
-- ----------------------------------------------------------------------- Gero Flucke office: DESY, Bldg. 67b, room 24 Inst. f. Experimentalphysik fon: +49 (0)40 8998 4743 Universitaet Hamburg fax: +49 (0)40 8998 2959 Luruper Chaussee 149 at CERN: Bldg. 32 office 3-B20 22761 Hamburg fon: +41 (0)22 76-77557 Germany -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?Received on Wed Jul 04 2007 - 07:52:54 CEST
This archive was generated by hypermail 2.2.0 : Wed Jul 18 2007 - 17:50:01 CEST