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 *----------------------------------------------------------------------*