Cannot use Offset() with RooAbsPdf::fitTo()

Dear experts,

I’m trying to update my workflow from root v6.24/02 to 6.32/16, but it seems the Offset() option is ignored by the fitTo() function. This is quite important for me as I’m running an unbinned simultaneous fit where one category has orders of magnitude more events than the other, and I keep seeing MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT if I don’t use it (together with the fact that the fit fails to find sensible results). I’ve attached a minimal example where Offset() is ignored, but it’s really nothing special. I have tried with both Offset(true) and Offset(“initial“).

Thank you in advance.

test_fit2.cpp (1.2 KB)

Thank you very much! This was indeed a bug. I have opened a pull request to fix it:

In the meantime before a release that includes this fix, you can use the offsetting by creating the likelihood and then the RooMinimizer separately. Like this, the offset flag won’t be overridden:

   std::unique_ptr<RooAbsReal> nll{model.createNLL(*dataset, Offset(true))};

   RooMinimizer minim{*nll};
   minim.setStrategy(2);
   minim.minimize("Minuit", "");

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.