How to extract a graph in TMinuit?

Hi Rooters,

I was trying to extract the graph (result) of the fit when calling TMinuit. Here what I have tried:

TMinuit *gmin =new TMinuit(6);
double arglist[6];
int ierflg = 0.;
arglist[0] = 1;
gmin->mnexcm(“SET ERR”,arglist, 1, ierflg);

gmin->mnparm(0,“Nsig”,vstart[0], step[0],0.01,1000000,ierflg);
gmin->mnparm(1,“m”,vstart[1], step[1],3.7,3.97,ierflg);
gmin->mnparm(2,“G”,vstart[2], step[2],0.0,0.15,ierflg);
gmin->mnparm(3,“Nbkg”,vstart[3], step[3],0.,10000.,ierflg);
gmin->mnparm(4,“mu”,vstart[4], step[4],4.1,4.4,ierflg);
gmin->mnparm(5,“sig”,vstart[5], step[5],0.01,0.5,ierflg);

const int n=50;
double xpt[n], ypt[n];
char ch[n];
gmin->mnexcm(“SCAN”,arglist, 1, ierflg);
gmin->mnplot(xpt, ypt, ch, nxypt, 120, 50);

TGraph grr=(TGraph) gmin->GetPlot();

and this does not give me any graph with points that describe the right curve. Would anyone have any idea why? What is wrong I am doing here?


Hi Arafat,

I have moved your post from Documentation to the ROOT Support.

Cheers, Ilka