Get ready for physics benchmarks - #37
Open
mattleblanc wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new reconstruction benchmarking utility under analysis/benchmarks that extracts a compact, machine-readable JSON summary from EDM4hep RECO ROOT files, intended for automated comparisons (e.g., CI artifacts and release-to-release validation).
Changes:
- Added
extract_metrics.py, a ROOT-based extractor that summarizes truth, PFO matching, track occupancy, and calorimeter hit/energy metrics into a compact JSON schema. - Added ROOT-independent unit tests for helper functions used by the extractor.
- Added documentation for running the extractor and positioned the benchmarks tooling within the analysis directory structure.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| analysis/README.md | Mentions the new benchmarks/ directory and its purpose. |
| analysis/benchmarks/README.md | Documents extractor behavior, matching definition, and how to run tests. |
| analysis/benchmarks/extract_metrics.py | Implements JSON metrics extraction from EDM4hep RECO files using PyROOT/RDataFrame + JIT helpers. |
| analysis/benchmarks/test_extract_metrics.py | Adds ROOT-independent unit tests for parsing and stats/provenance helper functions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
This is an example output of running this on a pion gun sample with 100 events: |
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 a compact JSON metrics extractor for automated reconstruction validation.
The extractor reads one or more EDM4hep RECO files and records:
This PR intentionally does not define pass/fail tolerances. The initial metrics are report-only so that their statistical viability can be reviewed in the context of the CI worker limits.
Testing
Follow-up
A subsequent
mucoll-spackPR will run this code as part of a small GitHub Actions validation test, but that PR won't work until this one is merged. I can open it in advance if it's easier to review them together...