New fitting class to consider beside RooMinuit

During an internship at the LHCb experiment at CERN I implemented a Metropolis algorithm as a minimizer for negative log likelihood (nnl) fits into ROOT. The metropolis algorithm is based on a Monte Carlo Markov Chain (MCMC) which wrt. previous broadly used algorithm called Minuit can easily be scaled to multidimensional parameter space.
It is called RooMinuitMCMC and can be used exactly like the RooMinuit class. The class together with my report which can also be used as a documentation and an example can be downloaded here:

I did some testing and it turns out that RooMinuitMCMC is as fast as RooMinuit but much more robust, since the starting value can be anything and it does not require borders for the parameters to fit. The reason is that RooMinuitMCMC does not use the gradient to find the minimum.

I just want to know what you guys think about it, and I would be proud if it could be added to Roofit or ROOT in general in the next update.

1 Like


Thank you for this interesting new developments. It would be really nice to have it in ROOT.

The optimal way to integrate would be to implement it the ROOT::Math::Minimizer interface,
which provides a common interface for all minimisation algorithm. Both version of Minuit implement this interface and also other algorithms existing in ROOT, such as the genetic algorithms or those based on GSL.
RooFit uses this class via the RooMinimizer, and different algorithms, can just be used by calling the command option RooFit::Minimizer(" ").
If you are here at CERN, we could discuss this here briefly. Otherwise we can continue by email

Thank you and Best Regards


1 Like

Hi @moneta

I am very glad that you like my project and I never heard of the Minimizer interface before, but it really sounds like the best place to implement the RooMinuitMCMC class. The name can of course be changed, so that it fits into the framework.
I am not at CERN at the moment, because I am stationed at my home institute at Zurich. But if necessary I could drive to Geneva in the morning and drive back in the evening for one day or we could use skype.
Sorry for the naive question but what would be the next steps anyway?

The next step for contributing code to ROOT, would be to make a pull request on GitHub,

We could do a PR now, but maybe would it be better doing it when we will have implemented using the Minimizer interface.
I suggest we continue the discussion by email and maybe Skype. Please send me an email and I can also send you back my Skype username

Best Regards


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