I am trying to port some code from Minuit1 to Minuit2. Some times I do get the exact same result, but some others I don’t. I believe this is because I have not set everything in Minuit2 to be exactly the same as Minuit1.
These are some things I don’t know how to set equally in Minuit2 (or I am not 100% sure)
Once this are set equally in Minuit1 and Minuit2. Should I always get the exact same result from both? As I said, I do get the same result now in some cases. Some others (mostly when it fails) I don’t get the same.
I assume it is because I haven’t set up the same number of calls, etc.
Here in F77Minuit we are calling the FCN function passing the special flag=6. There is no such funcitonality in Minuit2. The user defines the FCN function and he can call directly as he prefers.
This is calling MIGRAD with Maxfunction calls = 500 and tolerance = 0.1. In Minuit2 they are passed directly when you call Minimize (see ROOT: ROOT::Minuit2::ModularFunctionMinimizer Class Reference) or set again as options in the MinimizerOptions class when using the ROOT::Math::Minimizer interface.
You should get same result, but not exactly identical. There are some small differences, for example I think a slightly different definition of the tolerance, and in some cases a couple of fixes applied in Minuit2. If you observe a large difference, for example a different minimum and incorrect in Minuit2, please let me know. I will be interested in that case to get the reproducible code so I can investigate it