Skip to content

[Math] Avoid using std::map in Math::FitResult and fix logic#20722

Merged
guitargeek merged 2 commits into
root-project:masterfrom
guitargeek:issue-20703
Dec 16, 2025
Merged

[Math] Avoid using std::map in Math::FitResult and fix logic#20722
guitargeek merged 2 commits into
root-project:masterfrom
guitargeek:issue-20703

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

Avoid using std::map in Math::FitResult and fix the logic to set whether a parameter is fixed or bound. Before, these flags were only changed from false to true, but not the other way around, which can also happen if the user releases a parameter in the configuration object.

A unit test that covers this case was also implemented.

A second commit in this PR does some code modernization and cleanup, to keep the net number of added lines of code in this PR below zero.

Closes #20703.

Avoid using `std::map` in Math::FitResult and fix the logic to set
whether a parameter is fixed or bound. Before, these flags were only
changed from `false` to `true`, but not the other way around, which can
also happen if the user releases a parameter in the configuration
object.

A unit test that covers this case was also implemented.

Closes root-project#20703.
This is to keep the net number of added lines of code below zero, when
combining with the previous commit.
@github-actions
Copy link
Copy Markdown

Test Results

    21 files      21 suites   3d 20h 41m 54s ⏱️
 3 789 tests  3 788 ✅ 0 💤 1 ❌
77 620 runs  77 619 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 919a780.

Copy link
Copy Markdown
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thank you Jonas for fixing this issue.
I guess it is anyway better not using the std::map for efficiency, considering that in RooFit all the parameters are bounded.

@guitargeek guitargeek merged commit e7af715 into root-project:master Dec 16, 2025
26 of 29 checks passed
@guitargeek guitargeek deleted the issue-20703 branch December 16, 2025 10:22
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.

ROOT::Fit::FitResult fixed / bound parameter states not updated

2 participants