TLimit::ComputeLimit in 2D?


I am trying to calculate 95% confidence levels, as described in the documentation for TLimit::ComputeLimit (

TLimitDataSource* mydatasource = new TLimitDataSource(sh,bh,dh);
TConfidenceLevel *myconfidence = TLimit::ComputeLimit(mydatasource,50000);

This works beautifully if sh, bh, dh are TH1F histograms, but I am wondering if it is possible to input TH2 histograms instead, since a TH2 is essentially a linearized TH1. I have increased the statistics to properly fill all bins and increased nmc to 10000000, but all I ever get back is:

CLs : Warning: clb = 0 !
CLsb : 1
CLb : 0
< CLs > : 1
< CLsb > : 1
< CLb > : 1
< 3s prob > : 0.002698
< 5s prob > : 0

Can anyone explain to me why this may not be working? It sounds like something inherent in the implementation of the code, but I cannot see where it would have a problem.

Thank you for any help or clue.



This class is due to a very old development and it is not anymore supported. What is supported now is to compute limits form histograms is using the HistFactory and RooStats.

Best Regards