Skip to content

[RF] Fix data span alignment in batch-mode RooUnbinnedL - #23267

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:fix-unbinnedl-span-alignment
Open

[RF] Fix data span alignment in batch-mode RooUnbinnedL#23267
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:fix-unbinnedl-span-alignment

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

The probabilities returned by the RooFit::Evaluator are indexed by the original event indices, aligned with the weights that are obtained from RooAbsData::getWeightBatch(). Skipping zero-weight events when creating the data spans misaligns the two arrays, resulting in NaNs when evaluating the likelihood of a binned dataset with empty bins.

Zero-weight events are already skipped in the summation loop, so don't skip them when creating the data spans.

This commit also adds a unit test that evaluates a batch-mode RooUnbinnedL on a binned dataset with empty bins, which catches the problem.

🤖 Done with the help of AI

The probabilities returned by the RooFit::Evaluator are indexed by the
original event indices, aligned with the weights that are obtained from
RooAbsData::getWeightBatch(). Skipping zero-weight events when creating
the data spans misaligns the two arrays, resulting in NaNs when
evaluating the likelihood of a binned dataset with empty bins.

Zero-weight events are already skipped in the summation loop, so don't
skip them when creating the data spans.

This commit also adds a unit test that evaluates a batch-mode
RooUnbinnedL on a binned dataset with empty bins, which catches the
problem.

🤖 Done with the help of AI
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 28m 32s ⏱️
 3 872 tests  3 872 ✅ 0 💤 0 ❌
78 826 runs  78 826 ✅ 0 💤 0 ❌

Results for commit 7551317.

♻️ This comment has been updated with latest results.

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.

1 participant