← Back to Pull requests

[RF][HS3] Parameters with a fixed value as domain axes (HS3 #131) #24099

Closed
unknown closed this pull request without merging on Nov 12, 2026 11:42 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 10:04 UTC
Author

[!NOTE]

Implements HS3 PR #131, merged on 2026-11-12: fixed domain axes with the key value.

This Pull request:

Writes and reads parameters that only take a single value, e.g. a named constant like the Z mass, as a fixed domain axis with that value (HS3 #131). It replaces the implicit rule that a parameter without a domain is constant.

"domains": [{"name": "default_domain", "type": "product_domain", "axes": [
   {"name": "x", "min": 80.0, "max": 100.0},
   {"name": "mZ", "value": 91.188}
]}]

Background

Since #22283 (July 2026, not released), RooFit has written a named RooConstVar as a parameter without a domain, and read every parameter without a domain back as a RooConstVar (config().importNoDomainParametersAsRooConstVars). HS3 #131 originally proposed to make this the standard: a parameter not listed in any domain is constant. In the review, the HS3 maintainers preferred an explicit construction, which is what #131 was merged with: a parameter that only takes one value says so in its domain with a fixed axis, and leaving out a domain doesn't make a parameter constant. Since no ROOT release has the implicit rule, no compatibility with it is kept.

Changes or fixes:

| What | How |
|---|---|
| Export | A named RooConstVar is written as a fixed domain axis {"name": ..., "value": <value>} in the default domain, and no longer to the parameter points. Constant RooRealVars are unchanged: a range in the domain, "const": true in the parameter points. Literal RooConstVars are still written as numbers. |
| Import | A fixed axis gives a RooConstVar, whichever domain has it. It needs no entry in a parameter point. |
| Errors | The axis also has min, max, nbins, edges or categories; the value is not a number; two domains give the parameter different single values, or one a single value and another a range; a parameter point gives the parameter a different value. The same value in a parameter point is accepted, and "const": false stays the same as no "const". |
| Parameters without domain | Read as RooRealVar, as before #22283: constant with "const": true, otherwise free, with a warning that HS3 requires a domain or "const": true. config().importNoDomainParametersAsRooConstVars is removed. |
| Older files | ROOT versions before #22283 marked named RooConstVars with the attribute is_const_var in misc.ROOT_internal. Such parameters are read as RooConstVar again (#22283 had dropped this). |

Tests

  • New FixedDomainAxis: import as RooConstVar, export and stable round trip, the same value in a parameter point, every error above, a parameter without domain (constant, or free with a warning), and the legacy attribute.

  • RooGaussianConstVarSigmaExport, RooConstVarCollectionProxyExport and ConstRooRealVarStaysDistinctFromRooConstVar expect the fixed axis instead of a missing domain.

  • ParametersOnlyInParameterPoints expects parameters without domain and without "const": true to be free, with the warning, instead of constant.

  • The tests that switched importNoDomainParametersAsRooConstVars off now run with the default behaviour.
  • Behaviour changes users may notice

  • Named RooConstVars appear as fixed domain axes instead of "const": true entries in the parameter points.

  • A parameter without domain is read as a RooRealVar, not as a RooConstVar. Documents written by ROOT master since #22283 rely on the implicit rule; their RooConstVars come back as constant RooRealVars.

  • RooJSONFactoryWSTool::config().importNoDomainParametersAsRooConstVars no longer exists.
  • Checklist:

  • tested changes locally

  • updated the docs (if necessary)
  • Tests run (Linux, Ubuntu 26.04, GCC 15.2, RelWithDebInfo, -Droofit=ON -Dtesting=ON): testRooFitHS3 113 → 114 tests (1 new), testHistFactory 60, all passing. clang-format clean.

    AI assistance: Claude Code (claude-opus-5-5) implemented the changes, the tests and this description under review of the author. The commit carries Assisted-by: claude-code:claude-opus-5-5.

    🤖 Generated with Claude Code

    Diff: 563 lines (+422 / -141) across 7 files Reviewer: guitargeek Review duration: 1538m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 563 lines diff across 7 files
    0.50
    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.379
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #24099"
    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: 49.7% (MEDIUM) · Higher = larger blast radius
    49.7%
    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: 19.6% · Safe to merge
    19.6%