Getting correlation coefficients from TMinuit

I am doing a fit with several parameters using TMinuit, and I’m interested in retrieving the correlation coefficients of the parameters (not only the global correlation coefficient, but the whole correlation matrix). I know that TMinuit::mnmatu() prints the correlation matrix, but I need to use these values in my code so I need to retrieve them. I checked this previous post in the forum Outputting the correlation coefficients from TMinuit but the links with (I guess) answers are not working anymore. Is there any straightforward way of getting the coefficients or do I need to compute them by hand?
Thank you

Dear @miagarci ,

Maybe @moneta knows how to do this.



If you want to use directly TMinuit you need to use this function to get the covariance matrix,
TMinuit::mnemat, and then you get the correlation matrix by normalising the covariance: Corr(i,j) = Cov(i,j)/sqrt(Cov(i,i)*Cov(j,j)).

You need to be careful if you have fixed parameters, in that case they are skipped in the returned matrix by TMinuit. If you use Minuit with the Minimizer interface, the case of fixed parameters is automatically handled and you can get also the correlation coefficients.


Hi Lorenzo,
got it! thank you very much for your answer

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.