Mean of histogram when using Draw vs. DrawNormalized

Hello,

I have a histogram that has the number of tracks in an event. The numbers of entries in bins with low-edge 2, 3, 4, and 5 are 428, 51, 8 and 1 respectively.

When I use the Draw() option for this histogram, I see that the mean in the stat box (upper right corner) is 2.143, and RMS is 0.4098

If I do,

root [17] NumTrksSV_Flag_FidTruth->GetMean()
(const Double_t)2.14344262295081966e+00

If, however, I use the DrawNormalized() option, the mean in the stat box is 2.643 (with the same RMS).

It appears in the former, the mean calculation is using the low-edge as the x-value, whereas in the latter case, it is using the bin-center as the x-value.

I am using version 5.18.00d. Is this expected behaviour?

Vivek

Hi,

This should not be the expected behavior. However, I think this is fixed in the latest version 5.22. Can you please try with that version if you can and
let me know in case there is still this problem,

Best Regards

Lorenzo

Hi Lorenzo,

It appears to be fixed in 5.21.02; that’s the most recent one I have access to.

thanks.

vivek