Metadata-Version: 2.4
Name: dd4bench
Version: 0.0.12
Summary: Performance benchmarking for DD4hep-based simulations and reconstruction in Key4hep
Author-email: Joshua Falco Beirer <jbeirer@cern.ch>
Project-URL: Repository, https://github.com/jbeirer/DD4bench
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: plotly
Provides-Extra: test
Requires-Dist: pytest-cov; extra == "test"
Dynamic: license-file

<p align="center">
  <a href="https://dd4bench-dashboard.app.cern.ch/">
    <img src="https://capsule-render.vercel.app/api?type=waving&color=0:1E90FF,100:00C9A7&height=130&section=header&text=DD4bench&fontSize=48&fontAlignY=40&fontColor=ffffff" />
    </a><br>
  <b>Explore runs, metrics, and performance at a glance</b><br>
  👉 <a href="https://dd4bench-dashboard.app.cern.ch/">Open Dashboard</a>
</p>

<br>

[![Release](https://img.shields.io/github/v/release/jbeirer/DD4bench?include_prereleases)](https://github.com/jbeirer/DD4bench/releases)
[![Build status](https://img.shields.io/github/actions/workflow/status/jbeirer/DD4bench/ci.yml?branch=main)](https://github.com/jbeirer/DD4bench/actions/workflows/ci.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/jbeirer/DD4bench/graph/badge.svg?token=oYOxyHkHuP)](https://codecov.io/gh/jbeirer/DD4bench)
[![DOI](https://zenodo.org/badge/1229933191.svg)](https://doi.org/10.5281/zenodo.20268042)


Performance benchmarking for DD4hep-based simulations and reconstruction in Key4hep.

## Installation inside key4hep environment

```bash
source /cvmfs/sw.hsf.org/key4hep/setup.sh -r 2026-04-08

# Create a local virtualenv that inherits Key4hep packages
python -m venv ~/.venvs/dd4bench --system-site-packages

# Activate it
source ~/.venvs/dd4bench/bin/activate

# Install dd4bench
pip install dd4bench --no-deps
```

## Basic Usage

```python
from dd4bench import benchmark

result = benchmark.ddsim(
    compact_file="ALLEGRO_o1_v03.xml",
    ddsim_args={
        "numberOfEvents": 100,
        "gun.particle": "e-",
        "gun.distribution": "uniform",
    },
    scan=True,
)
```
