Skip to content

[6.40] [RF][HS3] Add structured interpolation support for HistFactory modifiers - #22961

Merged
guitargeek merged 6 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22844
Jul 29, 2026
Merged

guitargeek merged 6 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22844

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #22844, requested by @guitargeek. For your information @Phmonski

Phmonski and others added 6 commits July 29, 2026 17:44
…able

The mapping between the structured HS3 interpolation descriptors and the
RooFit integer codes was spread across four functions (two per direction,
one pair per interpolation class) plus a pair of dispatchers. They all
encoded the same table and had to be kept mutually consistent by hand.

Replace them with a single static table that mirrors the documented
mapping, plus two generic lookups. The class-specific quirks (legacy code
3 aliasing code 2, and FlexibleInterpVar treating code 4 and 5
identically) are now captured by two explicit normalization lines rather
than being scattered across switch cases.

No behavioural change; all HS3 interpolation tests still pass.

(cherry picked from commit 00afc54)
The analytical-integral routines carried several large commented-out
blocks (old dirty-inhibit experiments, an abandoned numeric integral
attempt, and two obsolete per-code interpolation loops), and the file
ended with a fully commented-out printMetaArgs implementation. None of it
is compiled; remove it. The git history preserves the old code for anyone
who wants to revisit those ideas.

No behavioural change.

(cherry picked from commit 32846b3)
FlexibleInterpVar and PiecewiseInterpolation had an almost identical
setInterpCodeForParam(): the same range check, the same code-3 -> code-2
aliasing (with the same explanatory comment), and the same error
messages, differing only in the highest supported code and the class name
in the log output. Keeping the code-3 rule correct meant editing it in two
places in lockstep.

Extract the shared logic into a small internal helper,
Detail::setInterpolationCode(), used by both classes. Each override now
just forwards its parameter list and maximum code and flags itself
value-dirty when a code was stored.

No behavioural change; the error messages are preserved verbatim.

(cherry picked from commit 73f2d6e)
@guitargeek
guitargeek merged commit 1ac9754 into root-project:v6-40-00-patches Jul 29, 2026
37 of 38 checks passed
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.

4 participants