TGraph->Fit() with a TF1 gives 2 sets of errors

Dear all,

i am fitting a function to a TGraph, using the code given below. after the fit i get the fit results printed to the command line. I am confused since the values for the errors on the fit parameters given there differ from the errors that i get back from ->GetParameter(0);

which is the right set of errors, or what is the difference on these?

[code] TGraph *graph=new TGraph(occ_arr.size(), &(vcal_arr[0]), &(occ_arr[0]));

  TF1 tot_fit_function("tot_fit_function", "[0]*(x+[1])/(x+[2])", vcal_arr[0], vcal_arr[vcal_arr.size()] );

  graph->Fit("tot_fit_function", "","", vcal_arr[0], vcal_arr[vcal_arr.size()] );

  TF1* tot_fit = graph->GetFunction("tot_fit_function"); 
  float chi2 = tot_fit->GetChisquare();
  float par0 = tot_fit->GetParameter(0); 
  float err0 = tot_fit->GetParError(0);  
  float par1 = tot_fit->GetParameter(1); 
  float err1 = tot_fit->GetParError(1);  
  float par2 = tot_fit->GetParameter(2); 
  float err2 = tot_fit->GetParError(2);  
  std::cout << chi2 << "   " << par0 << "    " << err0 << "\n";
  std::cout << chi2 << "   " << par1 << "    " << err1 << "\n";
  std::cout << chi2 << "   " << par2 << "    " << err2 << "\n";[/code]

this is the output that i get:

[quote]**********
** 5 **MIGRAD 5000 1e-05


MIGRAD MINIMIZATION HAS CONVERGED.
MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
FCN=3.26459 FROM MIGRAD STATUS=CONVERGED 291 CALLS 292 TOTAL
EDM=4.67985e-13 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 2.05401e+02 4.36445e+01 2.01461e-03 2.62789e-07
2 p1 -6.07292e+01 1.13385e+01 4.76932e-03 5.88874e-09
3 p2 2.60048e+03 7.49180e+02 3.26124e-02 -1.47736e-08
FCN=3.26459 FROM MIGRAD STATUS=CONVERGED 291 CALLS 292 TOTAL
EDM=4.67985e-13 STRATEGY= 1 ERROR MATRIX ACCURATE
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 2.05401e+02 4.36445e+01 2.01461e-03 2.62789e-07
2 p1 -6.07292e+01 1.13385e+01 4.76932e-03 5.88874e-09
3 p2 2.60048e+03 7.49180e+02 3.26124e-02 -1.47736e-08
3.26459 205.401 32.1935
3.26459 -60.7292 8.36361
3.26459 2600.48 552.617[/quote]

root.cern.ch/phpBB2/viewtopic.php?t=2952

Jan

ok, problem solved.
thank you for your help!

Klemens