Dear ROOTers,
I send this mail just to have a clear idea how exactly
the errors are treated when adding etc.... several histograms.
I have two 1-D histograms (TH1F *h1, *h2) for which I have set
the error for each bin by hand via the SetBinError() facility.
This I had to do because h1 and h2 are particle spectra which have
been corrected for reconstruction efficiencies and obviously these
rec. eff. factors have also an uncertainty.
Now I have to sum these h1 and h2 into a new histogram :
TH1F *h3->Add(h1,h2)
Now my question is whether the error of each bin in h3 is correctly
set to the sum of the errors of h1 and h2 bins or not.
Or is the error of the h3 bin just set to the sqrt() of the bin
content ?
Note that I did NOT specify h3->Sumw2() since from the docs I
understand that in that case the error of each h3 bin is just
the sqrt() of the sum of the squared errors of the h1 and h2 bins.
The latter is correct for multiplication and division of independent
histos, but not for additions and subtractions.
Or do I misunderstand something here ?
Of course I could calculate and set all the errors by hand, but
it is convenient if TH1::Add() would treat the errors correctly.
It would make sense to me if h3->Sumw2() would trigger the
correct error handling in case of TH1::Add(), whereas without the
h3->Sumw2() the error would become just the sqrt() of the bin content.
--
Cheers,
_/_/ _/ _/ _/_/_/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/_/
_/ _/_/ _/ _/ _/ _/
_/ _/ _/ _/_/_/_/ _/ _/
*----------------------------------------------------------------------*
Dr. Nick van Eijndhoven Department of Subatomic Physics
email : nick@phys.uu.nl Utrecht University / NIKHEF
tel. +31-30-2532331 (direct) P.O. Box 80.000
tel. +31-30-2531492 (secr.) NL-3508 TA Utrecht
fax. +31-30-2518689 The Netherlands
WWW : http://www.phys.uu.nl/~nick Office : Ornstein lab. 172
----------------------------------------------------------------------
tel. +41-22-7679751 (direct) CERN PPE Division / ALICE exp.
tel. +41-22-7675857 (secr.) CH-1211 Geneva 23
fax. +41-22-7679480 Switzerland
CERN beep : 13+7294 Office : B 160 1-012
*----------------------------------------------------------------------*
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:33 MET