TEfficiency error

Hi,

I have a set of rootfiles containing TH1’s. I have a script dividing these TH1’s using TEfficiency to obtain efficiency plots:

h_ptEff = ROOT.TEfficiency(h1_pt,h2_pt)

When I “hadd” these files, and calculate the efficiency with the hadd-ed TH1’s, I get a long list of this error:

" Error in ROOT::Math::Cephes::incbi: Wrong domain for parameter b (must be > 0)"

Any idea what this could mean? (I thought about uncertainty calculation in TEfficiency?)

Thanks!

Hi,

This can happen only if the number of passed events (the numerator of the efficiency ratio) is larger than the total number of events (the denominator). This cannot happen for histogram for which you need to compute efficiency. You need to check that this condition is verified for all the histograms that are added using hadd

Lorenzo

Hi,

I don’t have this problem when I run the script for the individual rootfiles (all of them), so this is always satisfied:

h2_pt.GetBinContent(i) < h1_pt.GetBinContent(i), for all i

But when I hadd them together, I got this error. To me, it doesn’t seem to be a ratio of events problem. As a matter of fact, I can plot the efficiency curve regardless the error and I can see that no bin is having a value exceeding 1.

Hi,
Which method are you using for estimating the uncertainties ?

Also are your histogram TH1F ? Maybe adding them could cause a numerical error

Lorenzo

Hi,

I am using the standard option of TEfficiency (I don’t know where to look for the method?)
My TH1’s are TH1D. What do you mean by numerical error?

Cheers!

The only possiblity to have that error is that the bin content of the numerator histogram is larger than the one at the denominator.
Maybe something gets wrong in the merge in hand. I would need in this case a macro reproducing the problem together with the histogram data files

Lorenzo