Stopping the minimizer

I’m minimizing a large multidimensional problem using the same basic script as $ROOTSYS/tutorials/fit/NumericalMinimization.C. Using a relatively small number of MaxFunctionCalls (because otherwise it crashes due to memory usage or a segmentation error), I get the error “call limit exceeded” and “FunctionMinimum is invalid, reached the function call limit.” Obviously this is because I don’t have a sufficently high MaxFunctionCalls. My question is, how can I get it the minimization to terminate gracefully so I can see the parameters it came up with when it stopped? I tried adjusting SetTolerance so that it would terminate farther away from the minimum, but there doesn’t appear to be a difference between using a tolerance of 100 and 0.001. How does the tolerance work?


the tolerance works normally on the expected distance from the minimum, which is estimated from a Taylor expansion of the function around the minimum.
However, by setting a lower MaxFunctionCalls should work, just ignore the error message and just use the obtained result.