mlreco.iotools.parsers package¶
I/O parsers are used to read data products from a LArCV ROOT file.
Parsers are listed under iotools.dataset.schema in the configuration. schema is a list of named values. Each name is arbitrary and will be used as a key to access the output of the parser in a dictionary.
List of existing parsers¶
Parser name |
Description |
|---|---|
|
Retrieve sparse tensor input from larcv::EventSparseTensor2D object |
|
Retrieve sparse tensor input from larcv::EventSparseTensor3D object |
|
Takes semantics tensor and turns its labels into ghost labels |
Parser name |
Description |
|---|---|
|
Retrieve list of sparse tensor input from larcv::EventClusterPixel2D |
|
Retrieve list of sparse tensor input from larcv::EventClusterVoxel3D |
Parser name |
Description |
|---|---|
|
Retrieve array of larcv::Particle |
|
Retrieve array of larcv::Neutrino |
|
Retrieve array of larcv::Particle ground truth points tensor |
|
Retrieve array of larcv::Particle coordinates (start and end) and start time |
|
Construct edges between particles (i.e. clusters) from larcv::EventParticle |
|
Get a single larcv::Particle PDG code |
|
Get a single larcv::Particle initial energy |
Parser name |
Description |
||
|---|---|---|---|
|
Get the meta information to translate into real world coordinates (2D) |
||
|
Get the meta information to translate into real world coordinates (3D) |
||
|
Parse run info (run |
subrun |
event number) |
What does a typical parser configuration look like?¶
If the configuration looks like this, for example:
schema:
input_data:
parser: parse_sparse3d
args:
sparse_event_list:
- sparse3d_reco
- sparse3d_reco_chi2
Then input_data is an arbitrary name chosen by the user, which will be the key to
access the output of the parser parse_sparse3d. The parser arguments can be
ROOT TTree names that will be fed to the parser or parser arguments. The arguments
can either be passed as an ordered list (following the order of the function arguments) or
a dictionary of (argument name, value) pairs. In this example, the parser will be called
with a list of 2 objects: A larcv::EventSparseTensor3D coming from the ROOT TTree
sparse3d_reco, and another one coming from the TTree sparse3d_reco_chi2.
How do I know what a parser requires?¶
To be completed.
How do I know what my ROOT file contains?¶
To be completed.