spine.data.larcv.CRTHit
- class spine.data.larcv.CRTHit(units: str = 'cm', id: int = -1, plane: int = -1, ts0_s: int = -1, ts0_ns: float = nan, ts0_s_corr: float = nan, ts0_ns_corr: float = nan, ts1_ns: float = nan, total_pe: float = nan, tagger: str = '', feb_id: ndarray = <factory>, center: ndarray = <factory>, width: ndarray = <factory>)[source]
CRT hit information.
- id
Index of the CRT hit in the list
- Type:
int
- plane
Index of the CRT tagger that registered the hit
- Type:
int
- tagger
Name of the CRT tagger that registered the hit
- Type:
str
- feb_id
Address of the FEB board stored as a list of bytes (uint8)
- Type:
np.ndarray
- ts0_s
Absolute time from White Rabbit (seconds component)
- Type:
int
- ts0_ns
Absolute time from White Rabbit (nanoseconds component)
- Type:
float
- ts0_s_corr
Unclear in the documentation, placeholder at this point
- Type:
float
- ts0_ns_corr
Unclear in the documentation, placeholder at this point
- Type:
float
- ts1_ns
Time relative to the trigger (nanoseconds component)
- Type:
float
- time
Alias for ts1_ns, but scaled to microseconds
- Type:
float
- total_pe
Total number of PE in the CRT hit
- Type:
float
- center
Barycenter of the CRT hit in detector coordinates
- Type:
np.ndarray
- width
Uncertainty on the barycenter of the CRT hit in detector coordinates
- Type:
np.ndarray
- units
Units in which the position attributes are expressed
- Type:
str
- Attributes:
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.
timeTime w.r.t.
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_larcv(crthit)Builds and returns a CRTHit object from a LArCV CRTHit 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__(units: str = 'cm', id: int = -1, plane: int = -1, ts0_s: int = -1, ts0_ns: float = nan, ts0_s_corr: float = nan, ts0_ns_corr: float = nan, ts1_ns: float = nan, total_pe: float = nan, tagger: str = '', feb_id: ndarray = <factory>, center: ndarray = <factory>, width: ndarray = <factory>) None
Methods
__init__(units, id, plane, ts0_s, ts0_ns, ...)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_larcv(crthit)Builds and returns a CRTHit object from a LArCV CRTHit 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
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.
Time w.r.t.
- id: int = -1
- plane: int = -1
- ts0_s: int = -1
- ts0_ns: float = nan
- ts0_s_corr: float = nan
- ts0_ns_corr: float = nan
- ts1_ns: float = nan
- total_pe: float = nan
- tagger: str = ''
- units: str = 'cm'
- feb_id: ndarray
- center: ndarray
- width: ndarray
- property time: float
Time w.r.t. to the trigger in microseconds.
- Returns:
Time of the CRT hit w.r.t. to the trigger in microseconds.
- Return type:
float
- classmethod from_larcv(crthit)[source]
Builds and returns a CRTHit object from a LArCV CRTHit object.
- Parameters:
crthit (larcv.CRTHit) – LArCV-format CRT hit
- Returns:
CRT hit object
- Return type: