Skip to content

[RF] Compute global correlations for external covariance matrices - #23245

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:issue-12935
Open

[RF] Compute global correlations for external covariance matrices#23245
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:issue-12935

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

When the covariance matrix of a fit result is set via RooFitResult::setCovarianceMatrix(), as happens for weighted fits with the SumW2Error or AsymptoticError corrections, the global correlation coefficients were left unset. RooFitResult::globalCorr() then silently returned zero for every parameter, and Print("v") showed "".

Compute the global correlation coefficients directly from the provided matrix, using rho_k^2 = 1 - 1/[V_kk * (V^-1)_kk] = 1 - 1/(C^-1)_kk. For a matrix coming out of a regular fit this reproduces the values reported by Minuit exactly, as checked by the new test.

Also fill the legacy global-correlation list in printMultiline() when possible, so that verbose printing shows the global correlations without requiring a prior call to one of the globalCorr() accessors.

Closes #12935.

🤖 Done with the help of AI

When the covariance matrix of a fit result is set via
RooFitResult::setCovarianceMatrix(), as happens for weighted fits with
the SumW2Error or AsymptoticError corrections, the global correlation
coefficients were left unset. RooFitResult::globalCorr() then silently
returned zero for every parameter, and Print("v") showed "<none>".

Compute the global correlation coefficients directly from the provided
matrix, using rho_k^2 = 1 - 1/[V_kk * (V^-1)_kk] = 1 - 1/(C^-1)_kk. For
a matrix coming out of a regular fit this reproduces the values reported
by Minuit exactly, as checked by the new test.

Also fill the legacy global-correlation list in printMultiline() when
possible, so that verbose printing shows the global correlations without
requiring a prior call to one of the globalCorr() accessors.

Closes root-project#12935.

🤖 Done with the help of AI
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 21m 54s ⏱️
 3 865 tests  3 864 ✅ 0 💤 1 ❌
78 756 runs  78 754 ✅ 1 💤 1 ❌

For more details on these failures, see this check.

Results for commit 204dcef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RF] Global correlation coefficients after SumW2Error

1 participant