Skip to content

[HS3] Align RooFit HS3 JSON I/O with the current HS3 naming and HistFactory conventions.#22735

Open
Phmonski wants to merge 2 commits into
root-project:masterfrom
Phmonski:fix/hs3-spec-alignment
Open

[HS3] Align RooFit HS3 JSON I/O with the current HS3 naming and HistFactory conventions.#22735
Phmonski wants to merge 2 commits into
root-project:masterfrom
Phmonski:fix/hs3-spec-alignment

Conversation

@Phmonski

@Phmonski Phmonski commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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.
  • 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

[x] Tested locally

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Test Results

    20 files      20 suites   3d 8h 37m 25s ⏱️
 3 876 tests  3 874 ✅ 0 💤  2 ❌
68 505 runs  68 474 ✅ 0 💤 31 ❌

For more details on these failures, see this check.

Results for commit bf36555.

@Phmonski

Phmonski commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

This PR contains a bug that is investigated.

@Phmonski Phmonski force-pushed the fix/hs3-spec-alignment branch from bf36555 to 636e449 Compare July 3, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants