Add pixi-build config, CI and fix references#77
Merged
Conversation
CMake 4.x removed support for cmake_minimum_required values below 3.5. Bumping the minimum from 2.6 to 3.5 keeps the project buildable with modern CMake without changing any CMake policy behaviour.
Add a pixi workspace that provides ROOT, EvtGen and the compiler
toolchain in a self-contained environment, so contributors can build
and validate RapidSim on Linux and macOS (incl. Apple Silicon) with a
single 'pixi run test' — no LCG / cvmfs / Docker required.
The same pixi.toml doubles as a pixi-build conda-package definition
('pixi build' / 'pkg' environment), aligning the in-tree build with
the conda-forge feedstock and paving the way to simplify the recipe.
CI moves from CERN GitLab to GitHub Actions and runs the same
validation suite (eight decay modes from the former GitLab pipeline)
under pixi on ubuntu-latest and macos-14, plus a separate job
exercising 'pixi build' for the conda package.
The README setup section is replaced with pixi-only instructions and
the EvtGen subsection is trimmed (pixi provides EvtGen with all
externals, no manual setupEvtGen.sh step needed).
Removed the GitLab-specific scaffolding (.gitlab-ci.yml, Dockerfile,
krb5.conf, run.sh).
Temporary so the CI runs on the fork while the branch is in flight; will be reverted before merging.
… gRandom->TRandom::GetSeed() / gRandom->TRandom::SetSeed()
Tighten compareHistograms.C so it returns 1 (and the pixi task fails) when any histogram has p < 0.001, in addition to the existing mean-p < 0.1 check. Continue iterating through every histogram before returning so the full report is generated. Aggregate every per-histogram comparison into a single multi-page PDF per mode (plots/<mode>_summary.pdf) so it can be flipped through visually instead of opening N individual files. The existing per-histogram PDFs are kept for backwards compatibility. Print a summary block at the end of each run with the total comparisons, warning/fail counts, mean p-value, the list of failing histograms with their p-values, and a clear PASS/FAIL line — so the CI log alone is enough to triage without downloading artifacts.
actions/upload-artifact@v4 skips paths beginning with '.' unless include-hidden-files is set. Our .build/ directory was being silently omitted, leaving the validation artifact empty.
Previously the 'test' task used pixi's depends-on chain over each per-mode task, which aborts on the first failure. With the strict gate that means a stale reference for B2Kee hides every other mode's output, and the artifact only contains B2Kee_summary.pdf. Switch the task to a bash loop that invokes each mode in sequence and continues past individual failures, accumulating an exit status. Now the artifact contains a summary PDF for every mode that runs compareHistograms.C, so a reviewer can see the full picture from a single CI run.
Each summary page now carries a small legend mapping the line colours: black = reference (validation/rootfiles/), red = this build's output. Move <mode>_summary.pdf out of .build/plots/ to .build/, so it lands at the top of the CI artifact next to the *_hists.root files instead of being buried alongside the ~100 per-histogram PDFs. The artifact upload glob is extended to pick it up.
Replace the seven mode reference files in validation/rootfiles/ with freshly generated outputs from the current build. The previous references dated from March 2019 (commit 9f498e9). In September 2020 the LHCbGenericIP smearing constants and particles.dat distances were changed from micrometers to millimeters (b5c08ba) but the references were never refreshed, so all IP/MINIP/SIGMAIP/FD histograms diverged from the smear configuration by a factor of ~1000. With the new strict per-histogram gate every IP-family histogram was failing. The replacements were taken from the validation-ubuntu-latest artifact of CI run 25019391601, which generated them with the same ROOT/EvtGen versions pixi pins. Only the seven modes covered by the current 'pixi run test' suite are replaced; D02Kpi-redecay, Ds2KKpi, Bs2DKpi_DP and B2Kee_tree references are left untouched.
These two modes were running with 10k events, which left them sensitive to cross-runner CPU/FMA drift in the validation Chi2 test (handful of histograms below p=0.001). Bumping to 100k makes the distributions smooth enough that the drift is statistically invisible under the strict per-histogram gate. References will be regenerated in a follow-up commit from the ubuntu-latest CI artifact.
Companion to the previous commit's event-count bump. References taken from the validation-ubuntu-latest artifact of CI run 25039000675.
RapidSim.exe writes its histogram output to <decay>_hists.root, so when run-B2Kee-tree (1000 events with save-tree) ran AFTER run-B2Kee (100000 events) it overwrote B2Kee_hists.root with a 342-entry file right before the artifact upload. Every B2Kee reference committed so far is the 1k-event version, not 100k. Reordering the test loop so run-B2Kee-tree runs first lets the 100k run overwrite back, leaving a correct 33494-entry hist file in the artifact. The tree task's B2Kee_tree.root output is preserved either way. Also dual-stats-box on each summary page so this kind of mismatch is visible at a glance: each histogram now carries a black stats box (reference) and a red one (this build) showing entries/mean/RMS.
Previous B2Kee reference had only 342 entries because run-B2Kee-tree was clobbering the 100k output before the artifact was uploaded. The preceding commit reordered the test loop so the 100k run wins. Reference taken from validation-ubuntu-latest of CI run 25040229179.
… histograms ROOT's Chi2Test 'UU' returns p=0 when both histograms have all their entries in a single bin, even when the histograms are bit-identical. This affects truth-level vertex / FD / SIGMAIP histograms for intermediate particles, where the value is always exactly zero (or the PDG mass) and 100k entries land in one bin. When fewer than two bins are non-empty, fall back to a direct bin-content comparison: identical => p=1, otherwise p=0. The non-degenerate path is unchanged.
Histograms with all entries concentrated in 1-2 bins are not really distributions and the Chi2Test isn't meaningful for them. Single-bin cases (truth-level vertex coordinates always at 0) returned p=0 even for bit-identical histograms; two-bin cases (truth-level mass peaks pinned at the PDG mass) flag float-precision noise — the only 'difference' is which side of the bin boundary a 5.279310 GeV float lands on, which differs between Linux and Mac CPUs. Skip these histograms entirely with an INFO log and add a 'Skipped (narrow)' line to the summary block. Distribution-shaped histograms remain under the strict p<0.001 gate.
Reverts the temporary branch entry added so the workflow ran on the fork while iterating. The workflow now triggers on master pushes and pull requests only, as originally designed.
This was referenced May 19, 2026
Closed
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.
No description provided.