Another possibility would be in addition to TH1::GetMean to have functions like TH1::GetBinMean and TH1::GetBinRMS which return the statistically correct values, and keep the current implementation of TH1::GetMean and TH1::GetRMS returning the values calculated from non-binned data.
This way no changes will be necessary to existing codes.
Stefan.
On Tue, 1 Mar 2011, Lorenzo Moneta wrote:
> Hi,
> On Mar 1, 2011, at 6:25 PM, Holger Meyer wrote:
>
>> If you only have the binned moments, you can't go the other way. The
>> only possible change might be to add a function to the histogram classes
>> that does the work for you. Something like
>> TH1::SetMomentsFromBinCenters().
>
> we have such a function already, TH1::ResetStats(). By calling it, all the statistics is computed from the bin centers,
>
> Lorenzo
>
*---------------------------------------------------------------------* Stefan Piperov Mail: FNAL P.O.Box 500, MS 205, Batavia, IL-60510 Phone: (630) 840-5176 E-Mail: piperov_at_fnal.gov *---------------------------------------------------------------------*"Give a skeptic an inch... and he'll measure it." Received on Tue Mar 01 2011 - 21:46:37 CET
This archive was generated by hypermail 2.2.0 : Tue Mar 01 2011 - 23:50:01 CET