I am trying to upgrade code presently using MnMigrad, MnUserParameters, and an Fcn class inheriting from FCNBase to use Minuit2Minimizer. My FCN is somewhat complicated depending on constructors
both to import data and to do calculations with an embedded function class. I suspect the FCNAdapter class is written to facilitate this upgrade but can’t find its use in a tutorial or documentation. Does anyone have a simple example of its use? Or possibly do I have to modify my FCN to inherit from IMultiGenFunction class instead of FCNBase?
I’d really appreciate some pointers
To use the Minuit2Minimizer interface, the simplest solution is to write the FCN as a functor class (you can also use a lambda function or a std::function), implementing the operator(const double *).
A simple example (using a free function) is this tutorial: https://root.cern.ch/doc/master/NumericalMinimization_8C.html