Skip to content

analysis_helpers

Utilities for HEP analysis workflows, including optional PyROOT-based helpers.

Installation

pip install git+ssh://github.com/cpviolation/analysis_helpers.git

To install with documentation dependencies:

pip install git+ssh://github.com/cpviolation/analysis_helpers.git[docs]"

Checking ROOT availability

ROOT (PyROOT) is an optional dependency. You can check whether it is available before calling ROOT-dependent functions:

from analysis_helpers import is_root_available

if is_root_available():
    # Safe to use ROOT-dependent helpers
    pass
else:
    print("PyROOT is not available in this environment")

To fail fast with a clear error message:

from analysis_helpers import require_root

require_root()  # Raises ImportError when ROOT is missing

Modules

Module Description
asymmetry Asymmetry computations
dalitz Dalitz plot utilities
efficiency Efficiency estimation
fit RooFit-based fitting helpers
io Input-Output helpers
kinematics Kinematic calculations
plotting Plotting utilities
root_helpers PyROOT convenience wrappers
utils General utilities