Using GetParErrors to get MINOS errors

Greetings all,

Could you please clarify the syntax for using GetParErrors to retrieve the positive and negative Minos errors for a fit.

What I am trying currently is as follows

hAll->Fit(FAll,"EV0"); // <--where hAll is defined as TGraphErrors and FAll is defined as a two parameter TF1 double *epar = FAll->GetParErrors(); double e_par[6]; for (i=0;i<6;i++) { e_par[i]=*(epar+i); cout << endl; cout << e_par[i] << endl; cout << endl; }
The output of this code snippet gives me the parabolic errors for i=0 and i==1 and zeros for the rest of the values.

From the verbose output I can see that positive and negative MINOS errors are being calculated but I can’t seem to find a way to access these values.

Any guidance you can give on where I am going wrong will be greatly appreciated.

Regards

Hi,
you can get the asymm errors via the TFitResult class. Do :

TFitResultPtr r = hAll->Fit(FAll,"SEV0"); // use option S to return a TFitResultPtr object
for (i=0;i<6;i++) {
   double lower = r->LowerError(i);
   double upper = r->UpperError(i);
   
}

Best Regards

Lorenzo

Thank you Lorenzo, this works perfectly