I would like to access the covariance matrix produced via a TMinuit fit.
I am able to view it with the MINUIT command “SHOW COV” but this
does not allow me to use the entries within the code (i.e. for further error
Is there a function to retrieve the covariance matrix of the fitted parameters?
Have a look at the RootTalk Digest and querry for “minuit covariance” .
I have listed below the method TFitter::GetCovarianceMatrix() .
You can see that in case you do not use TFitter, you should do
Int_t npars = gMinuit->GetNumPars();
Double_t covar = new Double_t[nparsnpars];
Double_t *TFitter::GetCovarianceMatrix() const
// return a pointer to the covariance matrix
if (fCovar) return fCovar;
Int_t npars = fMinuit->GetNumPars();
((TFitter*)this)->fCovar = new Double_t[npars*npars];