[v640][HS3] Bugfixes to HS3 histfactoy_dist handling and other minor bugs#22767
Merged
Conversation
## 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)
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)
Test Results 22 files 22 suites 3d 9h 41m 45s ⏱️ Results for commit 3a2383e. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of: