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_ids

Returns the list of CRT hit IDs matched to this interaction.

crt_scores

Returns the list of quality metrics of CRT hits matched to this interaction.

crt_times

Returns the list of CRT hit times matched to this interaction.

depositions_sum

Total deposition value for the entire object.

enum_attrs

Fetches HDF5-friendly enumerator descriptors for enum-backed fields.

enum_dicts

Fetches the dictionary of enumerated attributes and their enumerator descriptors.

enum_values

Fetches reverse enum lookups from stored values to symbolic names.

field_units

Fetches the documented units for each field.

index_attrs

Return the tuple of index-bearing attributes.

is_crt_matched

Checks if any particle in the interaction was matched to a CRT hit.

leading_shower

Leading primary shower of this interaction.

module_ids

List of modules that contribute to this object.

num_particles

Number of particles that make up this interaction.

num_primary_particles

Number of primary particles associated with this interaction.

particle_counts

Number of particles of each PID species in this interaction.

primary_particle_counts

Number of primary particles of each PID species in this interaction.

primary_particle_ids

List of primary Particle IDs associated with this interaction.

primary_particles

List of primary particles associated with this interaction.

size

Total number of voxels that make up the object.

topology

String 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_offset

crt_ids

Returns the list of CRT hit IDs matched to this interaction.

crt_scores

Returns the list of quality metrics of CRT hits matched to this interaction.

crt_times

Returns the list of CRT hit times matched to this interaction.

depositions_sum

Total deposition value for the entire object.

enum_attrs

Fetches HDF5-friendly enumerator descriptors for enum-backed fields.

enum_dicts

Fetches the dictionary of enumerated attributes and their enumerator descriptors.

enum_values

Fetches reverse enum lookups from stored values to symbolic names.

field_units

Fetches the documented units for each field.

flash_hypo_pe

flash_total_pe

id

index_attrs

Return the tuple of index-bearing attributes.

is_cathode_crosser

is_contained

is_crt_matched

Checks if any particle in the interaction was matched to a CRT hit.

is_fiducial

is_flash_matched

is_matched

is_time_contained

is_truth

leading_shower

Leading primary shower of this interaction.

module_ids

List of modules that contribute to this object.

num_particles

Number of particles that make up this interaction.

num_primary_particles

Number of primary particles associated with this interaction.

particle_counts

Number of particles of each PID species in this interaction.

primary_particle_counts

Number of primary particles of each PID species in this interaction.

primary_particle_ids

List of primary Particle IDs associated with this interaction.

primary_particles

List of primary particles associated with this interaction.

size

Total number of voxels that make up the object.

topology

String representing the interaction topology.

units

particles

particle_ids

vertex

flash_ids

flash_volume_ids

flash_times

flash_scores

index

orig_index

points

depositions

sources

match_ids

match_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:

RecoParticle