Skip to content

[v640][HS3] Bugfixes to HS3 histfactoy_dist handling and other minor bugs#22767

Merged
guitargeek merged 3 commits into
root-project:v6-40-00-patchesfrom
guitargeek:bp_1
Jul 7, 2026
Merged

[v640][HS3] Bugfixes to HS3 histfactoy_dist handling and other minor bugs#22767
guitargeek merged 3 commits into
root-project:v6-40-00-patchesfrom
guitargeek:bp_1

Conversation

@guitargeek

@guitargeek guitargeek commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

## Summary

This PR fixes several HS3 import/export round-tripping issues in RooFit, covering HistFactory modifier export, RooConstVar handling, and HS3 domain / parameter serialization.

## Main Changes

### HistFactory export fixes

- Fix MC statistical uncertainty export for Poisson gamma constraints by deriving the relative uncertainty from the `tau` factor in the Poisson mean, instead of from the current observable value.
- Initialize unconstrained `normfactor` parameter errors to `0.0`.

### RooConstVar round-tripping

- Named `RooConstVar`s are exported as HS3 parameters without a domain entry.
- Literal `RooConstVar`s continue to be exported as numeric literals.
- All `RooRealVar`s get domain entries, including constant and unbounded variables.
- On import, parameters without a domain entry can be reconstructed as `RooConstVar`s via `RooJSONFactoryWSTool::importNoDomainParametersAsRooConstVars`.

### HS3 domain and parameter serialization

- `parameter_points` no longer export `min` / `max`.
- `product_domain` axes always export explicit `min` and `max`; unbounded sides are written as JSON `null`.
- Data axes no longer carry a `value` field.
- `polynomial_dist` implicit default coefficients are exported as JSON numbers, not strings.
- Domain entries preserve explicit binning metadata:
  - uniform binning: `nbins`
  - non-uniform binning: `edges`

(cherry picked from commit 31720d2)
@guitargeek guitargeek self-assigned this Jul 7, 2026
bellenot and others added 2 commits July 7, 2026 09:51
Fix the following linker error on Windows:
testRooFitHS3.obj : error LNK2001: unresolved external symbol "public: static bool RooJSONFactoryWSTool::importNoDomainParametersAsRooConstVars" (?importNoDomainParametersAsRooConstVars@RooJSONFactoryWSTool@@2_NA)

(cherry picked from commit b841c8e)
This avoids bolerplate code with getters and setters for each static
configuration variable.

(cherry picked from commit 7e39bbf)
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 9h 41m 45s ⏱️
 3 858 tests  3 858 ✅ 0 💤 0 ❌
76 202 runs  76 202 ✅ 0 💤 0 ❌

Results for commit 3a2383e.

@guitargeek guitargeek merged commit 68ad517 into root-project:v6-40-00-patches Jul 7, 2026
33 checks passed
@guitargeek guitargeek deleted the bp_1 branch July 7, 2026 17:30
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.

3 participants