# Efficiency calculation using TGraphAsymmErrors from histograms with negative weights

Hello all,
I would like some clarification on an evaluation of the efficiency using TGraphAsymmErrors in presence of histograms with negative weights. I had look at old posts about it but at the end it is not clear to me yet.

If I have a histogram denominator with a bin having the entries and respective weights (1,-1), (1, +1) and (1,+1) and the histogram denominator (1,+1). In this case, the bin error is given by the sumw2(), right? the Method BayesDivide can be used for the TGraphAsymmErrors once the weights are integer even having negative weights? And using this method, the error bars are correctly calculated due to the presence of negative weights or another procedure should be taken instead? In other words, how is the better way to handle with the uncertainties on the ratio in this case with negative weights?

Cheers,
Fábio.

Hi,

I would not be very confident in using the BayesDivide method for negative weights, which are a special case. I think one should verify, maybe with MC studies that the obtained uncertainties are correct for this case.
I would switch to the normal approximation in this case, which gives as you mention an histogram bin error equal to sumw2()

Lorenzo

Hello Lorenzo,

by ‘‘switch to the normal approximation’’ you mean you use in this case the Divide Method? If so, the options available are these ones: cl=x and b(a,b)?

And just to confirm, in case of negative weights, the bin error is given by the sqrt(sum of the weights squared)?

Thanks a lot,
Fábio.

Thank you for the that, @couet!

Hi,

The bin error of an histogram filled with positive and negative weights is computed as sqrt(sum of the weights squared).

For the efficiency, I would use TGraphAsymmErrors(h1,h2,“cl=0.68 n”), but this is also equivalent to
TH1::Divide(h1,h2,1,1,“b”)

Lorenzo

Hi @moneta,

thank you very much for the help!
Cheers,
Fábio.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.