TLimit returning inf for CLs


Having problems with TLimit when passing it histograms, I’m finding that when I am passing in very low xsec signal (i.e. slow scaling factor applied to MC signal ), and I turn on statistical fluctuations, I am getting inf for my Cl_s and CL_{s+b} values, as well as expected and average values. CLb always looks fine.

If I turn off the statistical fluctuation, it works.

When I tell the TConfidenceLevel object to Draw, the PDFs it creates look well-formed, although there are 17 outliers. I can’t really access the results directly, so I’m not sure exactly whats in the lrb/lrs arrays. I’m guessing there are infinite values in them.

I don’t see this problem if I just integrate the histograms and get n_sig, n_bg, and n_data, but then my pdfs have discontinuities, so I’d prefer to use the nicer result I would get from passing distributions.

I’m using root version 5.22/00j.

Any ideas about what would cause an infinite result?



I have exactly the same problem…
Did you finally solve it? If so I would be interested knowing the answer.


Sort of solved it. The problem seems to come from inputing numbers that are too small. I’m guessing somehow, despite the protections in the code, the fluctuations still can fluctuate the values below zero.

The way I “solved” it was to re-bin the input histogram so that there were no bins with low values. I define low here as anything less than one. For me, this basically mean taking the tail of my distribution and making it a single bin.

One thing to mention, your overflow bins seem to count for this “low bin problem”. Maybe if they have no error bars it would be fine, not sure, but I found I had to fold those into the other bins. Wasn’t sure if the Rebin() function handled this correctly, so I just added their contents to the highest and lowest bin respectively, adding the errors in quadrature.

I believe all that is valid, although with less bins, you won’t get as nice a result.

I also couldn’t find a good way using TLimit to handle shape uncertainties. I’m going to be moving onto actual mclimit (or maybe RooStats) for the next iteration of this analysis, Mclimit at least is more of a standard, and hopefully one can find better support for it.

Good luck!


TLimit is not anymore maintained. The supported tool in ROOT for this is RooStats


It seems that my inputing numbers have the same issue. I’ll try a different binning!

Thanks for your help :slight_smile: