Hi,
I am trying to fit some points using the function “pol1”. In the fitting, in order to get better error estimate, I used “E”. After fitting, I try to get fitting parameters and their errors. The errors gotten by, for example, fun->GetParError(0), are the one without using the option “E”. My question is: how to get correct errors and parameters with “E”? My 2nd question: I also try to plot confidence intervals, the errors are likewise the ones without “E”, how to plot correct confidence intervals of fitting with “E”?

I attached an example code and input ROOT file to run the code.

The confidence intervals of the fitted functions are calculated using error propagation. This is fully correct only in the linear approximation (i.e. for linear fits). Asymmetric errors are also not taken into accounts.
You should then use a MC method or a Bayesian calculation.

Actually, I do not really care about asymmetry of errors. I just care about the confidence band correctly reflects errors. I read all code related with calculation of a confidence band, it seems to me that covariance matrix is crucial:

Double_t* fVhmat [fMaxpar5] (Internal) error matrix stored as Half MATrix, since it is symmetric
in TMinuit. If fVhmat stores correct error matrix by minos, then I believe the returned confidence band is correct.

My example above is linear fitting. However, error returned by default fitting algo does not make sense. Hence its confident band is very narrow, which does not make sense either.