Skip to content

[Minuit2] Document why covariance transform omits 2nd-derivative term#22720

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

[Minuit2] Document why covariance transform omits 2nd-derivative term#22720
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:minuit2_fixup

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

Int2extCovariance/Ext2intCovariance transform the error matrix between internal and external coordinates using only the first-order Jacobian (dPext/dPint), even on the diagonal. This is intentional and contrasts with the Hessian/G2 transformation in
AnalyticalGradientCalculator, which carries an extra diagonal term d^2Pext/dPint^2 * gradient.

The Hessian needs that non-tensorial term because it is evaluated at arbitrary, non-stationary points where the external gradient is nonzero. The covariance matrix is the inverse Hessian evaluated at the minimum, where the gradient vanishes; the term is then identically zero and the covariance transforms as a genuine (2,0) tensor with the Jacobian alone. Adding it would also break the exact round-trip between Int2extCovariance and Ext2intCovariance.

FYI @lmoneta, this is to preempt questions like you had in #22700 (review)

Int2extCovariance/Ext2intCovariance transform the error matrix
between internal and external coordinates using only the first-order
Jacobian (dPext/dPint), even on the diagonal. This is intentional and
contrasts with the Hessian/G2 transformation in
AnalyticalGradientCalculator, which carries an extra diagonal term
d^2Pext/dPint^2 * gradient.

The Hessian needs that non-tensorial term because it is evaluated at
arbitrary, non-stationary points where the external gradient is
nonzero. The covariance matrix is the inverse Hessian evaluated at the
minimum, where the gradient vanishes; the term is then identically
zero and the covariance transforms as a genuine (2,0) tensor with the
Jacobian alone. Adding it would also break the exact round-trip
between Int2extCovariance and Ext2intCovariance.
@guitargeek guitargeek requested a review from hageboeck as a code owner June 28, 2026 12:54
@guitargeek guitargeek self-assigned this Jun 28, 2026
@guitargeek guitargeek requested a review from lmoneta June 28, 2026 12:54
@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 17h 20m 53s ⏱️
 3 873 tests  3 822 ✅   1 💤 50 ❌
79 415 runs  78 977 ✅ 382 💤 56 ❌

For more details on these failures, see this check.

Results for commit 3ae4b52.

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.

1 participant