I am trying to find the error on the on the intersection coordinates of two linear fits. I am able to access the gradient and constants of both fits along with their corresponding errors. How do i access the correlation coefficient between the error on the gradient and the error on the constant?
to get the correlation coefficient you need to get the covariance matrix from the fit from the TVirtualFitter.
After fitting you can do :
TVirtualFitter * fitter = TVirtualFitter::GetFitter();
// for i and j
double corr_ij = fitter->GetCovarianceMatrixElement(i,j) / sqrt( fitter->GetCovarianceMatrixElement(i,i) *
fitter->GetCovarianceMatrixElement(j,j) ) ;