TMinuit -> Contour

I am trying to make a contour plot using TMinuit. After the function minimization.
where gMinuit is my TMinuit object, and par1 and par2 are the parameters for which I draw the contour plot. However, I always get at most 4 points in the contour plot , with the warning:

MINUIT WARNING IN MNContour ============== Cannot find midpoint, try closer. Warning in TMinuit::Contour: Returning a TGraph with 4 points only

What should I do to get a reasonable number of points?

Thank you


For finding a contour point a minimisation in the N-2 parameters is performed. For some reason
these minimisations fail. One would need tp see the full log, that you should be able to obtain by increasing the Print level, to understand the reason.
It could be a numerical issue with the function to minimise, so a more numerically robust evaluation could fix the problem


1 Like

TCanvas*c=new TCanvas(β€œc”,"",600,600);

[TMinuit]( *[gMinuit]( = new [TMinuit](
   (5); [Double_t]( arglist[10];
[Int_t]( ierflg = 0;
arglist[0] = 1;

 [gMinuit](>[mnexcm]("SET ERR", arglist ,1,ierflg);

gMinuit->mnparm (0, β€œa1”, vstart[0], step[0], 0,0,ierflg);
gMinuit->mnparm (1, β€œa2”, vstart[1], step[1], 0,0,ierflg);
arglist[0] = 500;
arglist[1] = 1.;
gMinuit->mnexcm(β€œMIGRAD”, arglist ,2,ierflg);

TGraph gr1 = (TGraph)gMinuit->Contour(80,0,1);


Warning in TMinuit::Contour: Cannot find more than 4 points, no TGraph returned
How can I manage to draw the right contour in this case?
Thanks in advance!

Here follows part of my code:

void fit(){TGraph gr2 = (TGraph)gMinuit->Contour(80,0,1);

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.