← Back to Pull requests

[math] Fix rotations and boosts of GenVector coordinate systems #24109

Closed
unknown closed this pull request without merging on Nov 16, 2026 18:03 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 18:31 UTC
Author

This Pull request:

Changes or fixes:

A rotation or Lorentz transformation applied directly to a GenVector coordinate system returns a wrong result. It rebuilds the result with the (x, y, z) or (x, y, z, t) constructor of the argument's type, and the non-Cartesian coordinate systems take their own coordinates there:

ROOT::Math::XYZVector v(0.3, -0.2, 0.5);
ROOT::Math::Polar3D<double> p(v.R(), v.Theta(), v.Phi());
auto r = ROOT::Math::RotationZ(0.7)(p); // (0.0127, 0.0069, 0.3580) instead of (0.3583, 0.0403, 0.5)

This affects every rotation class with Polar3D, Cylindrical3D and CylindricalEta3D, and every boost and LorentzRotation with PxPyPzM4D, PtEtaPhiE4D and PtEtaPhiM4D. Those six are now set through SetXYZ() or SetPxPyPzE(). Every other type is still built with its constructor, so foreign vector types keep their behaviour, which was the concern raised in the issue. The new tests in rotationApplication.cxx and testBoost.cxx apply each class to the raw coordinate systems and fail without the change.

@hageboeck, the issue is assigned to you. The experimental GenVectorX copy has the same pattern and is not changed here.

Checklist:

  • tested changes locally

  • updated the docs (if necessary)
  • This PR fixes #19635

    Claude Code (claude-opus-5-5) implemented the fix and the tests, and Codex (gpt-6.1-sol) reviewed them.

    Diff: 174 lines (+130 / -44) across 2 files Reviewer: guitargeek Review duration: 7171m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 174 lines diff across 2 files
    0.35
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.309
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #24109"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.4% (MEDIUM) · Higher = larger blast radius
    35.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.0% · Safe to merge
    14.0%