TH Fit with fitter options

Dear rooters,

i want to fit a histogram with custom fitter options ( tolerance and stepsize ).
How can I do this?

Thanks in advance,


You can use TH1::Fit, but you need to to call before:

  • ROOT::Math::MinimizerOptions::SetDefaultTolerance(tol) to set the tolerance. Keep in mind that the actual tolerance used inside Minuit is 0.002 * tol

  • TF1::SetParError(parameter) to set the step size for the parameters. So the initial parameter errors if they are not zero’s are used as step sizes.