Re: Mean of BinContent

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 13 Oct 2010 12:37:22 +0200


double ymean = h->Integral()/h->GetNbinsX();

Rene Brun

Hovhannes Khandanyan wrote:
>
> Dear ROOTers,
>
> A naive question: I have a histo with 100 filled bins. I need to get
> the mean of those 100 numbers (i.e. 100 bin contents). Is there a
> better way to do this other than summing the GetBinContent(ii) in a
> for loop?
>
> Thank you,
> Hovhannes
>
>
Received on Wed Oct 13 2010 - 12:37:29 CEST

This archive was generated by hypermail 2.2.0 : Wed Oct 13 2010 - 17:50:01 CEST