spine.data.out.RecoInteraction
- class spine.data.out.RecoInteraction(is_truth: bool = False, units: str = 'cm', id: int = -1, is_contained: bool = False, is_time_contained: bool = False, is_cathode_crosser: bool = False, is_matched: bool = False, cathode_offset: float = nan, index: ndarray = <factory>, orig_index: ndarray = <factory>, points: ndarray = <factory>, depositions: ndarray = <factory>, sources: ndarray = <factory>, match_ids: ndarray = <factory>, match_overlaps: ndarray = <factory>, is_fiducial: bool = False, is_flash_matched: bool = False, flash_total_pe: float = nan, flash_hypo_pe: float = nan, particles: list[RecoParticle] = <factory>, particle_ids: ndarray = <factory>, vertex: ndarray = <factory>, flash_ids: ndarray = <factory>, flash_volume_ids: ndarray = <factory>, flash_times: ndarray = <factory>, flash_scores: ndarray = <factory>)[source]
Reconstructed interaction information.
- particles
List of particles that make up the interaction
- Type:
List[RecoParticle]
- Attributes:
crt_idsReturns the list of CRT hit IDs matched to this interaction.
crt_scoresReturns the list of quality metrics of CRT hits matched to this interaction.
crt_timesReturns the list of CRT hit times matched to this interaction.
depositions_sumTotal deposition value for the entire object.
enum_attrsFetches HDF5-friendly enumerator descriptors for enum-backed fields.
enum_dictsFetches the dictionary of enumerated attributes and their enumerator descriptors.
enum_valuesFetches reverse enum lookups from stored values to symbolic names.
field_unitsFetches the documented units for each field.
index_attrsReturn the tuple of index-bearing attributes.
is_crt_matchedChecks if any particle in the interaction was matched to a CRT hit.
leading_showerLeading primary shower of this interaction.
module_idsList of modules that contribute to this object.
num_particlesNumber of particles that make up this interaction.
num_primary_particlesNumber of primary particles associated with this interaction.
particle_countsNumber of particles of each PID species in this interaction.
primary_particle_countsNumber of primary particles of each PID species in this interaction.
primary_particle_idsList of primary Particle IDs associated with this interaction.
primary_particlesList of primary particles associated with this interaction.
sizeTotal number of voxels that make up the object.
topologyString representing the interaction topology.
Methods
as_dict([lite, include_derived])Returns the data class as dictionary of (key, value) pairs.
attr_names([include_derived, ...])Return the names of valid attributes on this data class.
from_dict(cls_dict)Builds and returns an object of the class from a dictionary of attributes.
from_particles(particles)Builds an Interaction instance from its constituent Particle objects.
reset_cathode_crosser()Resets the cathode crossing information for the object.
reset_flash_match()Reset all the flash matching attributes.
reset_match()Resets the reco/truth matching information for the object.
scalar_dict([attrs, lengths, lite])Returns the data class attributes as a dictionary of scalars.
set_precision([precision])Casts all the vector attributes to a different precision.
shift_indexes(shifts)Apply offsets to index attributes in place.
to_cm(meta)Converts the coordinates of the positional attributes to cm in place.
to_px(meta)Converts the coordinates of the positional attributes to pixel in place.
value_with_units(attr)Fetch an attribute value with its documented units.
- __init__(is_truth: bool = False, units: str = 'cm', id: int = -1, is_contained: bool = False, is_time_contained: bool = False, is_cathode_crosser: bool = False, is_matched: bool = False, cathode_offset: float = nan, index: ndarray = <factory>, orig_index: ndarray = <factory>, points: ndarray = <factory>, depositions: ndarray = <factory>, sources: ndarray = <factory>, match_ids: ndarray = <factory>, match_overlaps: ndarray = <factory>, is_fiducial: bool = False, is_flash_matched: bool = False, flash_total_pe: float = nan, flash_hypo_pe: float = nan, particles: list[RecoParticle] = <factory>, particle_ids: ndarray = <factory>, vertex: ndarray = <factory>, flash_ids: ndarray = <factory>, flash_volume_ids: ndarray = <factory>, flash_times: ndarray = <factory>, flash_scores: ndarray = <factory>) None
Methods
__init__(is_truth, units, id, is_contained, ...)as_dict([lite, include_derived])Returns the data class as dictionary of (key, value) pairs.
attr_names([include_derived, ...])Return the names of valid attributes on this data class.
from_dict(cls_dict)Builds and returns an object of the class from a dictionary of attributes.
from_particles(particles)Builds an Interaction instance from its constituent Particle objects.
reset_cathode_crosser()Resets the cathode crossing information for the object.
reset_flash_match()Reset all the flash matching attributes.
reset_match()Resets the reco/truth matching information for the object.
scalar_dict([attrs, lengths, lite])Returns the data class attributes as a dictionary of scalars.
set_precision([precision])Casts all the vector attributes to a different precision.
shift_indexes(shifts)Apply offsets to index attributes in place.
to_cm(meta)Converts the coordinates of the positional attributes to cm in place.
to_px(meta)Converts the coordinates of the positional attributes to pixel in place.
value_with_units(attr)Fetch an attribute value with its documented units.
Attributes
cathode_offsetcrt_idsReturns the list of CRT hit IDs matched to this interaction.
crt_scoresReturns the list of quality metrics of CRT hits matched to this interaction.
crt_timesReturns the list of CRT hit times matched to this interaction.
depositions_sumTotal deposition value for the entire object.
enum_attrsFetches HDF5-friendly enumerator descriptors for enum-backed fields.
enum_dictsFetches the dictionary of enumerated attributes and their enumerator descriptors.
enum_valuesFetches reverse enum lookups from stored values to symbolic names.
field_unitsFetches the documented units for each field.
flash_hypo_peflash_total_peidindex_attrsReturn the tuple of index-bearing attributes.
is_cathode_crosseris_containedis_crt_matchedChecks if any particle in the interaction was matched to a CRT hit.
is_fiducialis_flash_matchedis_matchedis_time_containedis_truthLeading primary shower of this interaction.
module_idsList of modules that contribute to this object.
num_particlesNumber of particles that make up this interaction.
num_primary_particlesNumber of primary particles associated with this interaction.
particle_countsNumber of particles of each PID species in this interaction.
primary_particle_countsNumber of primary particles of each PID species in this interaction.
primary_particle_idsList of primary Particle IDs associated with this interaction.
primary_particlesList of primary particles associated with this interaction.
sizeTotal number of voxels that make up the object.
topologyString representing the interaction topology.
unitsparticle_idsvertexflash_idsflash_volume_idsflash_timesflash_scoresindexorig_indexpointsdepositionssourcesmatch_idsmatch_overlaps- particles: list[RecoParticle]
- property leading_shower: RecoParticle | None
Leading primary shower of this interaction.
- Returns:
Primary shower with the highest kinetic energy
- Return type: