spine.io.parse.larcv.misc
Module that contains parsers that do not fit in other categories.
Contains the following parsers:
- LArCVMetaParser
- LArCVRunInfoParser
- LArCVFlashParser
- LArCVCRTHitParser
- LArCVTriggerParser
Classes
|
Copy construct CRTHit and return an array of CRTHit. |
|
Copy construct Flash and return an array of Flash. |
|
Get the metadata information to translate into real world coordinates. |
|
Parse run information (run, subrun, event number). |
|
Copy construct Trigger and return a Trigger. |
- class spine.io.parse.larcv.misc.LArCVMetaParser(projection_id: int | None = None, **kwargs: Any)[source]
Get the metadata information to translate into real world coordinates.
Each entry in a dataset is a cube, where pixel/voxel coordinates typically go from 0 to some integer N in each dimension. If you wish to translate these pixel/voxel coordinates back into real world coordinates, you can use the output of this parser to compute it.
Methods
__call__(trees)Parse one entry.
get_input_data(trees)Build the parser-call input dictionary from loaded tree products.
process([sparse_event, cluster_event])Fetches the metadata from one object that has it.
- name: ClassVar[str | None] = 'meta'
- aliases: ClassVar[tuple[str, ...]] = ('meta2d', 'meta3d')
- returns: ClassVar[str | None] = 'object'
- overlay: ClassVar[str | None] = 'match'
- process(sparse_event: Any | None = None, cluster_event: Any | None = None) ImageMeta3D[source]
Fetches the metadata from one object that has it.
- Parameters:
sparse_event (Union[larcv.EventSparseTensor2D) – larcv.EventSparseTensor3D], optional Tensor which contains the metadata information as an attribute
cluster_event (Union[larcv.EventClusterPixel2D,) – larcv.EventClusterVoxel3D], optional Cluster which contains the metadata information as an attribute
- Returns:
Metadata information for one image
- Return type:
- class spine.io.parse.larcv.misc.LArCVRunInfoParser(dtype: str, **kwargs: Any)[source]
Parse run information (run, subrun, event number).
Methods
__call__(trees)Parse one entry.
get_input_data(trees)Build the parser-call input dictionary from loaded tree products.
process([sparse_event, cluster_event])Fetches the run information from one object that has it.
- name: ClassVar[str | None] = 'run_info'
- returns: ClassVar[str | None] = 'object'
- overlay: ClassVar[str | None] = 'cat'
- process(sparse_event: Any | None = None, cluster_event: Any | None = None) RunInfo[source]
Fetches the run information from one object that has it.
- Parameters:
sparse_event (Union[larcv.EventSparseTensor2D) – larcv.EventSparseTensor3D], optional Tensor which contains the run information as an attribute
cluster_event (Union[larcv.EventClusterPixel2D,) – larcv.EventClusterVoxel3D], optional Cluster which contains the run information as an attribute
- Returns:
Run information object
- Return type:
- class spine.io.parse.larcv.misc.LArCVFlashParser(merge: dict[str, Any] | None = None, **kwargs: Any)[source]
Copy construct Flash and return an array of Flash.
This parser also takes care of flashes that have been split between their respective optical volumes, provided a flash_event_list. This parser assumes that the trees are provided in order of the volume ID they correspond to.
- Attributes:
- overlay
Methods
__call__(trees)Parse one entry.
get_input_data(trees)Build the parser-call input dictionary from loaded tree products.
process([flash_event, flash_event_list])Fetches the list of optical flashes.
- name: ClassVar[str | None] = 'flash'
- aliases: ClassVar[tuple[str, ...]] = ('opflash',)
- returns: ClassVar[str | None] = 'object_list'
- process(flash_event: Any | None = None, flash_event_list: list[Any] | None = None) ParserObjectList[source]
Fetches the list of optical flashes.
- Parameters:
flash_event (larcv.EventFlash, optional) – Optical flash event which contains a list of flash objects
flash_event_list (List[larcv.EventFlash], optional) – List of optical flash events, each a list of flash objects
- Returns:
List of optical flash objects
- Return type:
List[Flash]
- class spine.io.parse.larcv.misc.LArCVCRTHitParser(dtype: str, **kwargs: Any)[source]
Copy construct CRTHit and return an array of CRTHit.
- Attributes:
- overlay
Methods
__call__(trees)Parse one entry.
get_input_data(trees)Build the parser-call input dictionary from loaded tree products.
process(crthit_event)Fetches the list of CRT hits.
- name: ClassVar[str | None] = 'crthit'
- returns: ClassVar[str | None] = 'object_list'
- process(crthit_event: Any) ParserObjectList[source]
Fetches the list of CRT hits.
- Parameters:
crthit_event (larcv.CRTHitEvent)
- Returns:
List of CRT hit objects
- Return type:
List[CRTHit]
- class spine.io.parse.larcv.misc.LArCVTriggerParser(dtype: str, **kwargs: Any)[source]
Copy construct Trigger and return a Trigger.
Methods
__call__(trees)Parse one entry.
get_input_data(trees)Build the parser-call input dictionary from loaded tree products.
process(trigger_event)Fetches the trigger information.
- name: ClassVar[str | None] = 'trigger'
- returns: ClassVar[str | None] = 'object'
- overlay: ClassVar[str | None] = 'cat'