I am trying to use Minuit2 by setting it as a default fitter and later I fit some histogram with some function:
How can I retrieve ‘ROOT::Minuit2::Minuit2Minimizer’ -object in order to have access to its methods (like Contour() and etc.) ? Many thanks in advance.
there is no public method to retrieve the Minuit2Minimizer,
but for doing scan or contours you can work via the TVirtualFitter
(or TBackCompFitter class) and from there you can also retrieve the FitResult.
For example for contours you can do (after having fit an histogram)
TGraph * graph = new TGraph(npoints);
TBackCompFitter * fitter = (TBackCompFitter*) TVirtualFitter::GetFitter();
fitter->Contour(ipar, jpar, graph, confLevel);
I should maybe consider to add in the TBackCompFitter also a method to retrieve the Minimizer