TH1 Efficiency histograms kIsAverage

Hi,

I have used the kIsAverage bit for some efficiency-histograms, which works nicely. But as far as I can see, there is no way to get the average of this histogram - in a similar way that one can do GetSum() it would be great to do GetAverage() for these histograms. Does something like this exist, and I have just not found it? It would need to handle variable bin-sizes and empty bins, of course.

Thanks,
Maiken

Hi,

I think using kIsAverage with efficiency histogram is a good thing to do. If you want to add to efficiencies histograms, you should use the
TEfficiency class, see root.cern.ch/root/html/TEfficiency.html

Then, if I have understood you well, you want to compute the average of the bin contents of an histograms, but on what, on all the bins. I am not sure it makes much sense, if you need to compute just do h1->GetSum()/Nbins. Are maybe you are interested in something like a TProfile, where the average values of y are displayed bin by bin.

Best Regards

Lorenzo