Construct Module
The spine.construct module converts model outputs and intermediate reconstruction products into the high-level object hierarchy used throughout SPINE analysis. Although configuration files still use the build: key for backward compatibility, the Python package name is spine.construct.
Data structure construction and analysis object building.
This module handles the construction of high-level analysis data classes from ML reconstruction outputs and provides I/O capabilities for analysis workflows.
Note:
Configuration files still use the
build:key for backward compatibility, while the Python module is namedconstruct.
Core construction management:
BuildManagercoordinates object construction, truth matching, and validation.
Constructed object hierarchy:
RecoFragmentandTruthFragmentfor fragment-level objects.RecoParticleandTruthParticlefor particle-level objects.RecoInteractionandTruthInteractionfor event-level hierarchies.
Example
from spine.construct import BuildManager
builder = BuildManager(fragments=True, particles=True, interactions=True)
builder(data)
interaction = data["reco_interactions"][0]
particles = interaction.particles
fragments = particles[0].fragments
This module provides the foundation for all downstream physics analysis by creating well-structured, validated analysis objects with full provenance.
Note
This module was formerly named build and configuration files still use build: for backward compatibility.
Overview
Construction is where sparse predictions become physics objects with relationships and provenance:
BuildManager coordinates object construction, truth matching, and validation
FragmentBuilder groups low-level outputs into fragment objects
ParticleBuilder assembles fragment-level information into particle candidates
InteractionBuilder builds event-level interaction hierarchies
This stage sits between model execution and post-processing, and defines the reconstructed and truth object model consumed by downstream analysis tools.
Reference
|
Manager which constructs data representations based on the chain output. |
|
Builds reconstructed and truth fragments. |
|
Builds reconstructed and truth particles. |
|
Builds reconstructed and truth interactions. |