[hist][math] Allow multiple ranges in HFitInterface::FillData#22861
Open
guitargeek wants to merge 1 commit into
Open
[hist][math] Allow multiple ranges in HFitInterface::FillData#22861guitargeek wants to merge 1 commit into
guitargeek wants to merge 1 commit into
Conversation
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.
2 tasks
Contributor
Author
|
FYI @belmakier. |
Test Results 22 files 22 suites 3d 7h 22m 50s ⏱️ Results for commit c01e078. |
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.
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