Constants Module

The spine.constants package is the canonical home for stable SPINE conventions that should not depend on detector configuration, run conditions, or campaign-specific choices. It collects tensor column layouts, enums, label maps, physical constants, and sentinel values.

Dependency-light canonical constants for SPINE.

This package is the canonical home for fixed SPINE conventions: - tensor column layouts - categorical enums - presentation/label maps derived from those enums - campaign-independent physical constants - sentinel and invalid values

Guiding principle

If a value defines a stable SPINE convention, it belongs here. If it depends on detector configuration, run conditions, or production choices, it belongs in YAML/config instead.

Most users should import from focused submodules:

from spine.constants.columns import ClusterLabelCol from spine.constants.enums import ParticleShape, ParticlePID from spine.constants.physics import LAR_DENSITY_G_CM3

The package root re-exports the most common symbols for convenience and for backward-compatible migration from the old spine.utils.globals API.

Submodules

Use focused submodules when you want one category of constants without importing the full convenience namespace.

columns

Canonical SPINE tensor column conventions.

enums

Canonical SPINE categorical enumerations.

factory

Helpers for parsing SPINE enum-like configuration values.

labels

Human-readable labels and categorical mappings for SPINE enums.

physics

Physical constants used by SPINE.

sentinels

Sentinel values and invalid IDs used by SPINE.