Repository navigation
Add Poisson unit tests for NonUniformMuInteractionSampler - #16167
Merged
Merged
Conversation
This adds two unit tests for the non-uniform interaction sampler that need no GRID access. - With uniform scales, the fraction of occupied crossings with two or more collisions must match Poisson. - With alternating scales, each colliding BC must follow Poisson at its own mu. - Both tests fail without the BC jump fix from AliceO2Group#16158, with 26 % instead of 9.7 % multi-collision crossings at mu = 0.2. https://its.cern.ch/jira/browse/O2-7330 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes NonUniformMuInteractionSampler::setBCIntensityScales and adds a unit test. - It returned false also on success. - On a size mismatch it overwrote the scales before reporting that it did nothing. - It now checks the size first and returns true on success. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This PR adds unit tests for the non-uniform interaction sampler, as a follow-up to #16158.
The existing test needs AliEn and only compares the mean BC position, so it could not see that the sampler put several batches of collisions into the same BC. The new tests need no GRID access and check per-crossing Poisson statistics, for uniform and for alternating intensity scales. Both fail without #16158 (26 % instead of 9.7 % multi-collision crossings at mu = 0.2).
A second commit fixes
setBCIntensityScales, which returned false on success and overwrote the scales before rejecting a vector of the wrong size.Related: https://its.cern.ch/jira/browse/O2-7330
Assisted by Claude Code.