JetObsMC is a unified scientific Python library for jet observables in the HEPSIM / ML4SCI context. The project is built for reproducible Monte Carlo validation workflows with one API, one metadata schema, and one testing strategy.
- Main page:
docs/index.md - Observable catalog:
docs/observables.md - Expected URL (Pages source =
docs/):https://atharva12081.github.io/JetObsMC/
- Pip-installable package via
setup.py - 30 observables implemented across kinematic, shape, substructure, and groomed-proxy categories
- Metadata registry with IRC safety, category, dependencies, and complexity
- CI + pytest validation, including loop-based reference implementation checks
- Multiple notebooks for Monte Carlo validation workflows
- Canonical import path:
jetobsmc
Use standard (non-editable) installation:
python3.13 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
pip install .If your environment is offline or has restricted network access, use:
pip install . --no-build-isolationOr install directly from GitHub:
pip install "git+https://github.com/Atharva12081/JetObsMC.git#egg=jetobsmc"Run tests locally:
pytest -qRun the HEPSIM evaluation notebook end-to-end:
jupyter nbconvert --to notebook --execute --inplace examples/hepsim_evaluation_submission.ipynbSmoke-test the installed package:
python -c "import jetobsmc; print(jetobsmc.__version__)"import numpy as np
from jetobsmc.jet import Jet
from jetobsmc.observables import (
pt,
mass,
jet_width,
nsubjettiness_tau21,
energy_correlation_d2,
)
particles = np.array([
[40.0, 20.0, 5.0, 34.0],
[25.0, 7.0, 4.0, 23.0],
[18.0, -5.0, 2.0, 16.0],
])
jet = Jet(particles)
features = {
"pt": pt(jet),
"mass": mass(jet),
"width": jet_width(jet),
"tau21": nsubjettiness_tau21(jet),
"d2": energy_correlation_d2(jet),
}pt,mass,eta,phi,delta_r
multiplicity,constituent_pt_sum,leading_constituent_pt,leading_pt_fractionjet_width,girth,radial_moment_2,radial_moment_3lha,thrust_angularity,ptd_angularity,ptd(pt_dispersion)
tau1,tau2,tau3,tau21,tau32(proxy N-subjettiness family)e2,e3,c2,d2(energy correlator family)
soft_drop_zg_proxy,soft_drop_rg_proxysoft_drop_pass_fraction_proxy,groomed_pair_mass_proxy
Notes:
- Entries marked as proxy are intentionally lightweight baselines and are documented as such.
- Full definitions and references:
docs/observables.md.
Run tests:
pytest -qWhat is validated:
- 4-vector correctness (Minkowski dot, invariant mass behaviors, symmetry)
- Edge-case robustness (empty jets, near-lightlike boosts, finite outputs)
- Zero-padding contract for HEPSIM-style constituent arrays
- Reference implementation checks: vectorized observables cross-checked against explicit loop-based baseline implementations
examples/hepsim_evaluation_submission.ipynbexamples/hepsim_evaluation_colab.ipynbexamples/mc_validation_workflow.ipynbexamples/evaluation_template.ipynbexamples/benchmark_e2_scaling.ipynb
- JetObsMC is fully open source under the MIT License (
LICENSE). - Anyone can use, modify, and redistribute the code under the license terms.
- Community contributions are welcome through issues and pull requests.
- See
CONTRIBUTING.mdfor contribution workflow details.
- 4-vector convention:
(E, px, py, pz) - HEPSIM-style conversion from
(pT, y, phi, pdgid)currently assumes massless constituents yis used for reconstruction (pz = pT*sinh(y),E = pT*cosh(y))etais computed from reconstructed momentum; for massless constituentsy ≈ eta