mlreco.iotools.parsers.cluster module

mlreco.iotools.parsers.cluster.parse_cluster2d(cluster_event)[source]

A function to retrieve a 2D clusters tensor

schema:
  cluster_label:
    parser: parse_cluster2d
    args:
      cluster_event: cluster2d_pcluster
Configuration

cluster_event (larcv::EventClusterPixel2D)

Returns

  • np_voxels (np.ndarray) – a numpy array with the shape (N,2) where 2 represents (x,y) coordinate

  • np_features (np.ndarray) – a numpy array with the shape (N,2) where 2 is pixel value and cluster id, respectively

mlreco.iotools.parsers.cluster.parse_cluster3d(cluster_event, particle_event=None, particle_mpv_event=None, sparse_semantics_event=None, sparse_value_event=None, add_particle_info=False, add_kinematics_info=False, clean_data=True, precedence=[1, 2, 0, 3, 4], type_include_mpr=False, type_include_secondary=False, primary_include_mpr=True, break_clusters=False)[source]

a function to retrieve a 3D clusters tensor

schema:
  cluster_label:
    parser: parse_cluster3d
    args:
      cluster_event: cluster3d_pcluster
      particle_event: particle_pcluster
      particle_mpv_event: particle_mpv
      sparse_semantics_event: sparse3d_semantics
      sparse_value_event: sparse3d_pcluster
      add_particle_info: true
      add_kinematics_info: false
      clean_data: true
      precedence: [1,2,0,3,4]
      type_include_mpr: false
      type_include_secondary: false
      primary_include_mpr: true
      break_clusters: True
Configuration
  • cluster_event (larcv::EventClusterVoxel3D)

  • particle_event (larcv::EventParticle)

  • particle_mpv_event (larcv::EventParticle)

  • sparse_semantics_event (larcv::EventSparseTensor3D)

  • sparse_value_event (larcv::EventSparseTensor3D)

  • add_particle_info (bool)

  • add_kinematics_info (bool)

  • clean_data (bool)

  • precedence (list)

  • type_include_mpr (bool)

  • type_include_secondary (bool)

  • primary_include_mpr (bool)

  • break_clusters (bool)

Returns

  • np_voxels (np.ndarray) – a numpy array with the shape (n,3) where 3 represents (x,y,z) coordinate

  • np_features (np.ndarray) – a numpy array with the shape (n,m) where m (2-13) includes: * voxel value, * cluster id if add_particle_info is true, it also includes * group id, * interaction id, * nu id, * particle type, * primary id if add_kinematics_info is true, it also includes * group id, * particle type, * momentum, * vtx (x,y,z), * primary group id if either add_* is true, it includes last: * semantic type

mlreco.iotools.parsers.cluster.parse_cluster3d_charge_rescaled(cluster_event, particle_event=None, particle_mpv_event=None, sparse_semantics_event=None, sparse_value_event_list=None, add_particle_info=False, add_kinematics_info=False, clean_data=True, precedence=[1, 2, 0, 3, 4], type_include_mpr=False, type_include_secondary=False, primary_include_mpr=True, break_clusters=False)[source]