How to get the variable index in a p.d.f

Dear Experts,
I would like to know how to get the variable index in a p.d.f.

My problem is that I need to use the covariance matrix obtained by
fitResult->covarianceMatrix()
( where fitResult is of type : RooFitResult )

In particular I need a specific element of the covariance matrix.
I know the two variable names for which I need the covariance term,
but I don’t know how to translate their names into the matrix indexes !

Many thanks for your support.

  • Mauro.

I think the index of the correlation matrix is the same index used for the parameter in the RooArgList returned by RooFitResult::floatParsFinal(). You can use RooArgList::Index(name) to get th index corresponding to a given name

Lorenzo