-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
In the current development cycle leading up to ROOT 6.28, there was some performance regression in RooStats tutorials like HybridInstructional.C, which can be seen for example in this CI bot comment:
For some reason, there are now numeric integrals in the log that don't pop up in ROOT 6.26:
[#1] INFO:NumericIntegration -- RooRealIntegral::init(py_Int[b]) using numeric integrator RooIntegrator1D to calculate Int(b)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(px_Int[b]) using numeric integrator RooIntegrator1D to calculate Int(b)
[#1] INFO:NumericIntegration -- RooRealIntegral::init([py_X_prior_b_X_px]_Norm[b]_denominator_Int[b]) using numeric integrator RooIntegrator1D to calculate Int(b)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(py_Int[b]) using numeric integrator RooIntegrator1D to calculate Int(b)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(px_Int[b]) using numeric integrator RooIntegrator1D to calculate Int(b)
RooFit in ROOT master needs to be fixed again such that these integrals don't happen.
Since this is a performance regression, the priority to fix this is high.
A simpler script to reproduce the performance regression outside of RooStats is this one:
void repro()
{
RooWorkspace w;
w.factory("Poisson::px(x[150,0,500],b[100,0,300])");
w.factory("Poisson::py(y[100,0,500],prod::taub(tau[1.],b))");
w.factory("Uniform::prior_b(b)");
w.factory("PROD::foo(px|b,py,prior_b)");
RooRealVar& x = *w.var("x");
RooRealVar& b = *w.var("b");
RooAbsPdf& foo = *w.pdf("foo");
std::unique_ptr<RooAbsReal> integ{foo.createIntegral({b}, {b, x})};
for(int i = 0; i < 10; ++i) {
x.setVal(i % 500);
std::cout << integ->getVal() << std::endl;
}
}