Uh oh!
There was an error while loading. Please reload this page.
Cosmic Ray Veto ML training code - #6
Conversation
sam-grant
commented
Apr 30, 2026
@oksuzian@AndrewEdmonds11 would you mind taking a look? I'm not able to add reviewers :) |
oksuzian
commented
May 16, 2026
PR #6 Review: Cosmic Ray Veto ML training codeSummary
Issues found🔴 Bugs
🟡 Reproducibility / hygiene
🟢 Nits
Merge readinessNot ready as-is. The two Suggested next steps
Want me to (1) open issues for the blocker bugs, (2) draft a PR with the import/package cleanup, or (3) walk through a specific module (e.g. |
Cosmic Ray Veto ML training code
Adds
CrvCosmic/, an XGBoost-based classifier for vetoing cosmic-ray-induced backgrounds, ported fromsam-grant/mu2e-cosmic. The model takes per-coincidence CRV and tracker features and outputs a probability that the coincidence matched with the track is cosmic-induced. Trained onCosmicCRYSignalAllOnSpillTriggered(pure cosmics) vs.CeEndpointMix2BBTriggered(beam + pileup).Only the cuts and helpers actually used by the ML preselection are ported across from
sam-grant/mu2e-cosmic, the non-ML parts of the upstream cosmic-background framework are excluded.Pipeline
.ubj.Layout
config/cuts.yaml: Cutset definitions;MLPreprocessis the only one defined heresrc/core/: Cut flow & feature helpers, postprocessing combinerssrc/ml/:MLProcessor,LoadML,AssembleDataset,Train,Validate,Optimisesrc/utils/: IO, histogram booking, plotting,mu2e.mplstylerun/run_ml_prep.py: Entry point for processing ROOT files into parquet/pkl for trainingnotebooks/:assemble, feature engineering, optimise, train, validateDependencies
Requires
Mu2e/pyutils(provided bypyenv ana) forpyutils.pycut.CutManager, plusxgboost,scikit-learn,awkward,pandas,hist,pyarrow,h5py,joblib,pyyaml.Testing
Ran end-to-end on the gpvms (commit
b78cf8f)