Skip to content

feat: Python bindings for SimHit/SimHitContainer + UprootReader#5330

Open
benjaminhuth wants to merge 13 commits intoacts-project:mainfrom
benjaminhuth:feature/bind-particles-hits-python-uproot-reader
Open

feat: Python bindings for SimHit/SimHitContainer + UprootReader#5330
benjaminhuth wants to merge 13 commits intoacts-project:mainfrom
benjaminhuth:feature/bind-particles-hits-python-uproot-reader

Conversation

@benjaminhuth
Copy link
Copy Markdown
Member

@benjaminhuth benjaminhuth commented Apr 10, 2026

Implement uproot-based particle and simhit readers for the PyPI distribution of acts.

--- END COMMIT MESSAGE ---

Any further description goes here, @-mentions are ok here!

  • Use a conventional commits prefix: quick summary
    • We mostly use feat, fix, refactor, docs, chore and build types.
  • A milestone will be assigned by one of the maintainers

… reader

- Bind SimHit and SimHitContainer (with WhiteBoard registration) in Generators.cpp
- Add setter methods to SimParticle binding for construction from Python
- Add PyIReader trampoline so Python classes can subclass IReader
- Update IReader binding to inherit from SequenceElement (fixes cast at runtime)
- Implement UprootReader: single Python-only reader for particles + sim hits
  via uproot, usable without the ROOT plugin (for PyPI distribution)
- Add test that simulates with Fatras + ROOT writers, reads back with UprootReader

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added this to the next milestone Apr 10, 2026
benjaminhuth and others added 3 commits April 10, 2026 16:33
…hs in UprootReader

- Convert process/pdg/charge/mass/particleId SimParticle bindings from
  def_property_readonly + def("setXxx") to def_property (read-write)
- Hardcode particle/hit tree names in UprootReader ("particles", "hits")
- Make particleFilePath and simHitFilePath optional (default None);
  each handle is only initialized when its file is supplied
- Add particles-only and hits-only test variants

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

📊: Physics performance monitoring for f748dee

Full contents

physmon summary

@benjaminhuth benjaminhuth marked this pull request as ready for review April 13, 2026 12:03
andiwand
andiwand previously approved these changes Apr 13, 2026
Copy link
Copy Markdown
Contributor

@andiwand andiwand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - just left a few minor comments

@sonarqubecloud
Copy link
Copy Markdown

Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
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.

2 participants