Skip to content

[RF][RS] Store fit results in the AsymptoticCalculator - #23107

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:roostats-asymptotic-fit-results
Aug 22, 2026
Merged

[RF][RS] Store fit results in the AsymptoticCalculator#23107
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:roostats-asymptotic-fit-results

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

The AsymptoticCalculator performed all its fits in a local helper that saved a RooFitResult only to read off the minimum NLL value and then discarded it. Users therefore had no way to check programmatically whether the underlying fits actually converged, even though the calculator happily reports a significance also when they did not.

Keep the RooFitResult objects of the four fits (unconditional and conditional, on observed and Asimov data) as members of the calculator and expose them with the new getters GetFitResultUncondObs(), GetFitResultCondObs(), GetFitResultUncondAsimov() and GetFitResultCondAsimov(). The results are now saved also when the minimization failed, so that the minimizer status and EDM of a non-converged fit can be inspected. The stored unconditional results are updated when GetHypoTest() finds a better minimum in its refit fallback.

Also document in the class description that the fits can already be steered via the ROOT::Math::MinimizerOptions defaults for strategy and tolerance, which was the second request in the ticket.

Closes JIRA ROOT-10066.

🤖 Done with the help of AI

@guitargeek guitargeek self-assigned this Aug 19, 2026
@guitargeek
guitargeek requested a review from bellenot as a code owner August 19, 2026 11:49
@guitargeek
guitargeek requested a review from hageboeck as a code owner August 19, 2026 11:49
@guitargeek guitargeek changed the title [RooStats] Store fit results in the AsymptoticCalculator [RF][RS] Store fit results in the AsymptoticCalculator Aug 19, 2026
@guitargeek
guitargeek force-pushed the roostats-asymptotic-fit-results branch from 89be29b to 66a3875 Compare August 19, 2026 12:05
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 6m 13s ⏱️
 3 857 tests  3 857 ✅ 0 💤 0 ❌
79 495 runs  79 495 ✅ 0 💤 0 ❌

Results for commit 449dc19.

♻️ This comment has been updated with latest results.

@lmoneta lmoneta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you Jonas for this nice improvement!

@guitargeek
guitargeek force-pushed the roostats-asymptotic-fit-results branch from 66a3875 to e1d20a3 Compare August 21, 2026 21:20
The AsymptoticCalculator performed all its fits in a local helper that
saved a RooFitResult only to read off the minimum NLL value and then
discarded it. Users therefore had no way to check programmatically
whether the underlying fits actually converged, even though the
calculator happily reports a significance also when they did not.

Keep the RooFitResult objects of the four fits (unconditional and
conditional, on observed and Asimov data) as members of the calculator
and expose them with the new getters GetFitResultUncondObs(),
GetFitResultCondObs(), GetFitResultUncondAsimov() and
GetFitResultCondAsimov(). The results are now saved also when the
minimization failed, so that the minimizer status and EDM of a
non-converged fit can be inspected. The stored unconditional results are
updated when GetHypoTest() finds a better minimum in its refit fallback.

Also document in the class description that the fits can already be
steered via the ROOT::Math::MinimizerOptions defaults for strategy and
tolerance, which was the second request in the ticket.

Closes JIRA [ROOT-10066](https://its.cern.ch/jira/browse/ROOT-10066).

🤖 Done with the help of AI
@guitargeek
guitargeek force-pushed the roostats-asymptotic-fit-results branch from e1d20a3 to 449dc19 Compare August 21, 2026 22:07
@guitargeek
guitargeek merged commit 6cfe829 into root-project:master Aug 22, 2026
34 checks passed
@guitargeek
guitargeek deleted the roostats-asymptotic-fit-results branch August 22, 2026 04: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.

2 participants