[v640][RF][HS3] Align RooFit HS3 JSON I/O with the current HS3 naming and HistFactory conventions#22804
Merged
Merged
Conversation
Align RooFit HS3 JSON I/O with the current HS3 naming and HistFactory conventions. **Summary** Align RooFit HS3 JSON I/O with the current HS3 naming and HistFactory conventions. - Replace `RooBinWidthFunction` HS3 type `binwidth` with: - `binvolume` for `divideByBinWidth == false` - `inverse_binvolume` for `divideByBinWidth == true` - Stop exporting `divideByBinWidth` and remove legacy `binwidth` import support. - Extend generic expression cleanup for `floor`, `ceil`, `abs`, `tan`, `asin`, `acos`, `atan`, `PI`, and `EULER`. - Treat `PI` and `EULER` as reserved expression constants on import. - Migrate HistFactory modifier export from `constraint_name` to `constraint`, and omit `constraint_type`. - Instead of exporting `constraint_type`, `shapesys` modifiers now export the actual per-bin constraint pdf names via a new `constraints` list. This list is parallel to the `parameters` list, so each gamma parameter has a corresponding constraint entry. Entries can also be `null` for parameters without a constraint. - Keep HistFactory import compatibility for `constraint`, `constraint_name`, and legacy `constraint_type`. - Export `const: true` for parameters whose `min >= max`. - Export both `RooHistFunc` and `ParamHistFunc` as `step`. - Add a `step` importer dispatcher that selects `RooHistFunc` for `data` and `ParamHistFunc` for `parameters`. - Keep legacy `histogram` import support for old `RooHistFunc` HS3 files. - Rename the following exporter keys: - generic_function -> generic - gauss_model_function -> gauss_resolution_model - truth_model_function -> delta_resolution_model - mixture_model -> mixture_resolution_model - fft_conv_pdf -> fft_convolution_dist **Tests** Added focused coverage in `testRooFitHS3.cxx` for: - `binvolume` / `inverse_binvolume` export and import - fixed-range parameter export as `const: true` - `step` export/import dispatch for `RooHistFunc` and `ParamHistFunc` - HistFactory `constraint` export with legacy `constraint_name` import - generic expression cleanup for new function names and constants (cherry picked from commit e6d966a)
The `testHS3SimultaneousFit` was pretty small anyway, and having only a single executable saves linking time. (cherry picked from commit 9a11185)
Fix math expression replacements to not corrup expressions that are containing other replaced substriongs as replaced tokens, like `TMath::Log10` that contains `TMath::Log`. (cherry picked from commit 51dfa58)
(cherry picked from commit 040d579)
The YAML parser (for the `ryml` backend for RooFit JSON interface) is dead code for over two years, as it was commented out from the build in commit 643a73d. It's better to remove the dead code at this point, and it can always be brought back or re-implemented if really needed. (cherry picked from commit ddc6c6f)
This is just a refactor to reduce the code footprint. (cherry picked from commit 6732eba)
Test Results 22 files 22 suites 3d 10h 7m 50s ⏱️ Results for commit e985da3. |
a900cad
into
root-project:v6-40-00-patches
36 of 37 checks passed
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: