Skip to content

[hist][math] Allow multiple ranges in HFitInterface::FillData#22861

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:multiple_ranges
Open

[hist][math] Allow multiple ranges in HFitInterface::FillData#22861
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:multiple_ranges

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

ROOT::Fit::FillData only honoured the first range interval of each coordinate and warned that "support only one range interval" for any further one. Fitting a single function over several disjoint regions (e.g. a background with the peak region excluded) was therefore not possible.

Collect the bins by looping over every combination of the per-coordinate ranges. A coordinate without any range contributes a single iteration spanning the full axis, so the behaviour without ranges is unchanged.

DataRange::CleanRangeSet() now also merges partially overlapping ranges instead of only dropping fully contained ones, so that AddRange() keeps the range set a collection of disjoint intervals. It takes xmin and xmax by reference to widen them to the merged interval.

Adds unit tests for the overlapping-range handling in DataRange and for the range handling of FillData itself.

Successor PR of #10101

ROOT::Fit::FillData only honoured the first range interval of each
coordinate and warned that "support only one range interval" for any
further one. Fitting a single function over several disjoint regions
(e.g. a background with the peak region excluded) was therefore not
possible.

Collect the bins by looping over every combination of the per-coordinate
ranges. A coordinate without any range contributes a single iteration
spanning the full axis, so the behaviour without ranges is unchanged.

DataRange::CleanRangeSet() now also merges partially overlapping ranges
instead of only dropping fully contained ones, so that AddRange() keeps
the range set a collection of disjoint intervals. It takes xmin and xmax
by reference to widen them to the merged interval.

Adds unit tests for the overlapping-range handling in DataRange and for
the range handling of FillData itself.
@guitargeek

Copy link
Copy Markdown
Contributor Author

FYI @belmakier.

@github-actions

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 7h 22m 50s ⏱️
 3 877 tests  3 877 ✅ 0 💤 0 ❌
72 567 runs  72 567 ✅ 0 💤 0 ❌

Results for commit c01e078.

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.

2 participants