[ROOT] Mean calculation in TH1

From: Andrei Kuznetsov (Andrei.Kouznetsov@cern.ch)
Date: Wed Sep 15 2004 - 15:56:20 MEST


Hello,

it looks like ROOT calculates fTsumwx (and hence Mean of a histogram) in 
TH1 incorrectly. 

But if you perform 
your_histogram->GetXaxis()->SetRange(a,b);
after the filling (or "zoom" by hands) it works correctly.

It looks likes in the first case it is not used the center of bin when  
fTsumwx is calculated.

Best regards,
Andrei.

I am sorry I forgot to say I use ROOT 3.10/02 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET