Skip to main content

PyEDM4hep

codecov

PyEDM4hep is a Pythonic interface for EDM4hep event data, combining the power of Pandas DataFrames with an intuitive object-oriented API. It enables fast, flexible analysis of HEP event data stored in ROOT files, with seamless navigation between particles, hits, and decay trees.


Features

  • Object-oriented access to particles, hits, and calorimeter data
  • Bulk operations via Pandas DataFrames for high performance
  • ROOT file support using uproot
  • Relationship navigation (parents, daughters, hits, decay trees)
  • Built-in plotting for event overviews, decay trees, and kinematics
  • Detector geometry awareness for realistic analysis
  • Easy integration with Jupyter and scientific Python stack

Installation

PyEDM4hep requires Python 3.8+ and can be installed via pip:

pip install pyedm4hep

Or from source:

git clone https://github.com/murnanedaniel/pyEDM4hep.git
cd pyEDM4hep
pip install .

Quickstart

from pyedm4hep import EDM4hepEvent

# Define detector parameters (example values)
detector_params = {
    'tracking_radius': 1100.0,
    'tracking_z_max': 2500.0,
    'energy_threshold': 0.05
}

# Load an event from a ROOT file
file_path = 'path/to/events.root'
event = EDM4hepEvent(file_path, event_index=0, detector_params=detector_params)

# Access particles as a DataFrame
particles_df = event.get_particles_df()

# Work with a single particle
particle = event.get_particle(0)
print(particle.pdg, particle.pt, particle.vertex)

# Plot event overview
fig = event.plot.event_overview()
fig.suptitle("Event Overview")

Documentation


Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  • Run tests with pytest.
  • Ensure code coverage remains high.
  • Document new features and update the changelog.

License

This project is licensed under the MIT License. See LICENSE for details.


Acknowledgments

  • Built on top of EDM4hep and uproot.
  • Inspired by the needs of the HEP analysis community.

Metadata

Release files for pyedm4hep 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyedm4hep 0.1.2
File Size Uploaded Provenance Actions
pyedm4hep-0.1.2.tar.gz 51.7 kB Without provenance Details for pyedm4hep-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyedm4hep 0.1.2
File Interpreter ABI Platform Actions
pyedm4hep-0.1.2-py3-none-any.whl Python 3 none any Details for pyedm4hep-0.1.2-py3-none-any.whl

Total release size: 97.5 kB

Release files / pyedm4hep-0.1.2.tar.gz

Download URL pyedm4hep-0.1.2.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a2efd7a5bc91f6e61fc4f579e9570acf134a38e236a2f538b4e98a3e49c3e9a5
BLAKE2b-256 checksum
How to use checksums
52be4677e4e575e127c61286a499cda2b5688cb1a65d067b8cce9c3f91fd203e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.32.4 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.61.2 importlib-metadata/8.5.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Release files / pyedm4hep-0.1.2-py3-none-any.whl

Download URL pyedm4hep-0.1.2-py3-none-any.whl
Size 45.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7b9dbd50009cdeffaddf789ca35c8398ef50f35db9b9c5881ba837acc37f9b8
BLAKE2b-256 checksum
How to use checksums
4164799cd51f85ee6797587634caee15ea0b1de0c75f709ea825379806db644a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.32.4 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.61.2 importlib-metadata/8.5.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Security for pyedm4hep 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page