TGraph::Fit <-> TF1::GetParError Problem

Hi,

if I let run the following script in cint:

void GetPedestal() {
  Double_t x[27]={19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45};
  Double_t y[27]={7,19,113,272,530,1238,2279,3715,7166,12882,19949,19515,16501,10911,5811,3132,1793,1074,834,511,309,167,98,33,19,7,2};    
  
  TGraph *gr;
  gr=new TGraph(27,x,y);
  gr->SetName("mg");
  gr->Draw("A*");
    
  TF1 *fits;
  fits=new TF1("fit","gaus");
  printf("Now fitting\n");
  gr->Fit(fits); 
  printf("fitted\n");
  for (int ii=0;ii<3;ii++) {
    printf("%g  %g\n",fits->GetParameter(ii),fits->GetParError(ii));
  }
   
}

I get the following output:

Now fitting
 **********
 **    5 **MIGRAD        5000     2.7e-05
 **********
 MIGRAD MINIMIZATION HAS CONVERGED.
 FCN=8.61125e+06 FROM MIGRAD    STATUS=CONVERGED      76 CALLS          77 TOTAL
                     EDM=6.87997e-10    STRATEGY= 1  ERROR MATRIX UNCERTAINTY   1.4 per cent
  EXT PARAMETER                                   STEP         FIRST
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE
   1  Constant     1.98856e+04   6.58659e-01   1.18616e-03   1.73540e-05
   2  Mean         2.97947e+01   7.68383e-05  -1.32796e-07  -4.13936e-01
   3  Sigma        2.06701e+00   8.31673e-05  -2.34445e-08  -2.54022e+00
 FCN=8.61125e+06 FROM MIGRAD    STATUS=CONVERGED      76 CALLS          77 TOTAL
                     EDM=6.87997e-10    STRATEGY= 1  ERROR MATRIX UNCERTAINTY   1.4 per cent
  EXT PARAMETER                                   STEP         FIRST
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE
   1  Constant     1.98856e+04   6.58659e-01   1.18616e-03   1.73540e-05
   2  Mean         2.97947e+01   7.68383e-05  -1.32796e-07  -4.13936e-01
   3  Sigma        2.06701e+00   8.31673e-05  -2.34445e-08  -2.54022e+00
fitted
19885.6  403.023
29.7947  0.0470161
2.06701  0.0508887

Obviously, the parameter-errors reported by the Fit-method and the ones I retrieve via GetParError don’t match. Is this designed behaviour? If yes, which one is the “real” error and if it should be the one in the table, how do I access it? If no, what’s the workaround?

The error shows up in cint of ROOT version 4.02 and 4.04/2.

Thank you for your help!

Bye,
Christian

After the Minuit error calculation, we multiply the errors by
sqrt(chisquare/(ndf-1));

This provides much better errors in case of a large chisquare (typically
when errors are not specified in input for the graph)

Rene