However, all other aspects of the fit appear to be successful (chi2/ndf ~ 1, reasonable parameter values and errors). I tried increasing the maximum number of functin calls, but this has no effect.
The reason of the failure could be that the required tolerance is not reached. If you increase the print level
(e.g. ROOT::Math::MinimizerOptions::SetDefaultPrintLevel(1); or higher value) you might get the reason.
Normally this is caused by numerical problems given by the function provided by the user. It is better to try to fix this.
Another potential problem is that you are using parameters which are very correlated. You can try to look at the correlation matrix.
Before changing the precision, it is better eventually to increase the tolerance using ROOT::Math::MinimizerOptions::SetDefaultTolerance or to try to change the strategy to zero
ROOT::Math::MinimizerOptions::SetDefaultStrategy(0). With default strategy the covariance matrix is not computed at the end of the minimization, but an approximation is used.
to bad this forum doesn’t have upvotes. I never knew about these features (the tutorials seem to only mention them in the RooStats part), but I think they are extremely useful for everyday use cases.
I know that writing blog posts takes a lot of time with an uncertain return, but at least I would love to see more small bits about the hidden gems in ROOT::Math. There is so much useful (nicely decoupled) functionality in there that without some guidance even more documentation in the source wouldn’t help much (at least me).