Dear Lorenzo,
Thanks a lot for offering to look into this! There was of course the obvious confidentiality issues with providing a real example workspace, so the problem went a bit around ATLAS first, and the solution was found. I post it here for your information and to make the thread a useful reference.
In fact, it seems to be possible in this context to tell RooStats to use the “real” binned likelihood, and this was simply achieved by adding these lines after creating the workspace, here called “ws”:
RooFIter iter = ws->components().fwdIterator();
RooAbsArg* arg;
while ((arg = iter.next())) {
if (arg->IsA() == RooRealSumPdf::Class()) {
arg->setAttribute("BinnedLikelihood");
cout << "Activating binned likelihood attribute for " << arg->GetName() << endl;
}
}
This has been validated for one test case, and RooStats is in this case able to reproduce the results of the independent code. Also, the log-likelihood values are found to be of an order of magnitude which fits with the proper binned Poisson likelihood.
Cheers,
Magnar