Dear Lorenzo, thanks a lot for you suggestions.
But I don’t use to fit my data
h1->Fit(…)
I have my FCN function here my piece of code:
TFitter *gMinuit = new TFitter(9);
gMinuit->SetFCN(fcn);
//Background from the fit in the entire mass range
gMinuit->SetParameter(0.,“slope1”,-2.30544e+03,1e-01,-100000.,10000.);
gMinuit->SetParameter(1.,“slope2”,1.17373e+03,0.001,-1000000.,80000.);
gMinuit->SetParameter(2.,“slope3”,-1.29492e+02,0.001,-300.,50.);
gMinuit->SetParameter(3.,“mv”,4.24318e+00,1e-03,4.2,4.3);
gMinuit->SetParameter(4.,“gv”, 1.21355e-01,1e-03,0.02,0.22);
gMinuit->SetParameter(5.,“Ns”,9.45499e+00,1e-03,0.001,100.);
gMinuit->SetParameter(6.,“beta”,20.44,0.1,10.,50.); //Very good result
gMinuit->SetParameter(7.,“alpha”, 4.,0.1,1.,10.); //Very good result
gMinuit->SetParameter(8.,“c2”,10.,0.1,1.,1000.);//Very good result
gMinuit->ExecuteCommand(“MIGRAD”, 0,0);
gMinuit->ExecuteCommand(“HESSE”, 0,0);
gMinuit->ExecuteCommand(“MINOS”, 0,0);
Is still possible in this way using the TFitResultPtr?
Thanks again
Valentina