Setting tolerance for TMultiGraph->Fit()

I would like to set the tolerance for the errors when fitting to a multigraph with Fit(), the same way that is done with gMinuit->mnexcm(“SET ERR”,arglist,1,ierflg).

However not ROOT::Math::MinimizerOptions::SetDefaultTolerance(tol), nor TVirtualFitter::SetPrecision(tol) seem to work, since they’re ignored (even setting tol to 1000 does nothing).

How can I make this work?

Hi,

It should work (I have just tested in case of an histogram and the code is the same) by doing before fitting
ROOT::Math::MinimizerOptions::SetDefaultTolerance(tol).

If it does not work for you, please send me a running macro.

Lorenzo

I think I probably didn’t ask the right question.

I managed to do:

Which seems to work.

Hi,

This is a different thing. It is the likelihood value to use when computing the confidence interval. For example to compute the 1-sigma or 2-sigma intervals.
For this you can also use

ROOT::Math::MinimizerOptions::SetDefaultErrorDef(2)

Lorenzo

Is it not?

I thought that ROOT::Math::MinimizerOptions::SetDefaultErrorDef(4) (or TVirtualFitter::SetErrorDef(4)) means that instead of looking at the countour given by a difference of chi square of 1, we’re looking at the contour in phase space where the chi square is increased by 2.

In the literature I found this is called tolerance (the value of the delta chi square that we use to define contours, by definition that should be 1), but maybe I’m getting things mixed up?

[quote]I thought that ROOT::Math::MinimizerOptions::SetDefaultErrorDef(4) (or TVirtualFitter::SetErrorDef(4)) means that instead of looking at the countour given by a difference of chi square of 1, we’re looking at the contour in phase space where the chi square is increased by 2.
[/quote]

Yes, this is correct.

The tolerance value that you can set in ROOT::Math::MinimizerOptions::SetDefaultTolerance(tolerance) is the convergence tolerance of the minimisation algorithm. The MINUIT minimisation will stop when the expected distance from the minimum (EDM) is less than 0.001*[tolerance]*UP where UP is the Error definition value (the one defined in ROOT::Math::MinimizerOptions::SetDefaultErrorDef), which by default is 1.

Lorenzo

Now I understand, thank you very much!