I’ve just recently discovered, that there is an object called TEfficiency.
Until now, I have been using histogram pairs and converted them into a single TGraphAsymmerrorrs object to depict efficiencies, so thank you for this feature!
My question is: is it possible to easily calculate mean efficiency using this object?
Is this the most compact code to achieve this functionality?
Note that getting the mean among the “value-axis” seems broken.
I have not understood your problem. Which Mean do you want, the mean computed by weighting by the efficiency value in each bin or the mean of the efficiency value ?
TEfficiency returns the efficiency value in every bin. You can then compute their weighted mean by for example by filling an additional histogram given as input values the efficiency in each bin and their weight.
Yes, but it’s quite complicated (in terms of both code length and efficiency), especially the error calculation. There “should” be a default function to calculate them while filling the efficiency histograms, shouldn’t it?