The cabinetry library provides a Python-based solution for building and steering binned template fits. It implements a declarative approach to construct statistical models. The instructions for building all template histograms required for a statistical model are executed using other libraries in the pythonic HEP ecosystem. Instructions can additionally be injected via custom code, which is automatically executed when applicable at key steps of the workflow. A seamless integration with the pyhf library enables cabinetry to provide interfaces for all common statistical inference tasks. The cabinetry library furthermore contains utilities to study and visualize statistical models and fit results.
This tutorial provides an overview of cabinetry and shows its use in the creation and operation of statistical models. It also demonstrates how to use cabinetry for common tasks required during the design of a statistical analysis model.