pyhf is a pure-python implementation of the widely-used HistFactory p.d.f. template described in [CERN-OPEN-2012-016]. It also includes interval estimation is based on the asymptotic formulas of “Asymptotic formulae for likelihood-based tests of new physics” [arxiv:1007.1727]. The aim is also to support modern computational graph libraries such as PyTorch and TensorFlow in order to make use of features such as autodifferentiation and GPU acceleration.

GitHub Project DOI Scikit-HEP

GitHub Actions Status: CI GitHub Actions Status: Publish Docker Automated Code Coverage Language grade: Python CodeFactor Code style: black

Docs Binder

PyPI version Conda Version Supported Python versionss Docker Stars Docker Pulls

Recent Talks and Tutorials

SciPy 2020 talk YouTube

PyHEP 2020 tutorial YouTube

Use in Publications

Updating list of citations and use cases of pyhf:

  • Waleed Abdallah and others. Reinterpretation of LHC Results for New Physics: Status and Recommendations after Run 2. 2020. arXiv:2003.07868.
  • G. Brooijmans and others. Les Houches 2019 Physics at TeV Colliders: New Physics Working Group Report. In 2020. arXiv:2002.12220.
  • J. Alison and others. Higgs boson potential at colliders: status and perspectives. In 2019. arXiv:1910.00012.
  • ATLAS Collaboration. Reproducing searches for new physics with the ATLAS experiment through publication of full statistical likelihoods. Geneva, Aug 2019. URL:
  • Johann Brehmer, Felix Kling, Irina Espejo, and Kyle Cranmer. MadMiner: Machine learning-based inference for particle physics. Comput. Softw. Big Sci., 4(1):3, 2020. arXiv:1907.10621, doi:10.1007/s41781-020-0035-2.
  • Lukas Heinrich, Holger Schulz, Jessica Turner, and Ye-Ling Zhou. Constraining A₄ Leptonic Flavour Model Parameters at Colliders and Beyond. 2018. arXiv:1810.05648.

Published Likelihoods

Updating list of HEPData entries for publications using HistFactory JSON likelihoods:

  • Search for direct production of electroweakinos in final states with one lepton, missing transverse momentum and a Higgs boson decaying into two b-jets in (pp) collisions at s√=13 TeV with the ATLAS detector. 2020. doi:10.17182/hepdata.90607.v2.
  • Search for chargino-neutralino production with mass splittings near the electroweak scale in three-lepton final states in s√ = 13 TeV pp collisions with the ATLAS detector. 2019. doi:10.17182/hepdata.91127.
  • Search for direct stau production in events with two hadronic τ-leptons in s√=13 TeV pp collisions with the ATLAS detector. 2019. doi:10.17182/hepdata.92006.
  • Search for bottom-squark pair production with the ATLAS detector in final states containing Higgs bosons, b-jets and missing transverse momentum. 2019. doi:10.17182/hepdata.89408.