Class ChooseMaxLArFlowHit

Nested Relationships

Inheritance Relationships

Base Type

  • public larcv_base

Class Documentation

class ChooseMaxLArFlowHit : public larcv_base

reduce the number of larflow hits by choosing the maximum flow from a source pixel

When generating possible space points, a pixel in a given image can be a part of several possible space points.

This class reduces the number of hits such that only one space point exists per pixel per row (i.e. time bin) per plane on a given image. This reduction is done for each plane. We take the union of reduced hits from the three planes.

Example on one plane: a list of space points might have the following image coordinates given as (row, colU, colV, colY, larmatch score): (row=10, 1, 2, 3, 0.8 ), (row=15,5, 6, 3, 0.3), (row=15, 8, 1, 3, 0.9). This class, if operating only on the Y-plane, reduces this list to: (row=10, 1, 2, 3, 0.8 ), (row=15, 8, 1, 3, 0.9).

Public Functions

ChooseMaxLArFlowHit()
virtual ~ChooseMaxLArFlowHit()
void process(larcv::IOManager &iolcv, larlite::storage_manager &ioll)

Reduce hits from event data stored in IO managers.

Parameters
  • iolcv: LArCV data manager with the event data
  • ioll: larlite data manager with the data for the same event

void set_input_larflow3dhit_treename(std::string name)

set the input tree name to get hits from

Parameters
  • name: Set name of input hit tree. Tree follows naming pattern image2d_[name]_tree.

void set_output_larflow3dhit_treename(std::string name)

set the output tree name to get hits from

Parameters
  • name: Set name of output hit tree. Tree follows naming pattern image2d_[name]_tree.

Protected Functions

void _make_pixelmap(const larlite::event_larflow3dhit &hit_v, const std::vector<larcv::Image2D> &img_v, const int source_plane, std::vector<int> &idx_used_v)

make map from pixel on a plane to a vector of space point indices

This associates at the space points to pixels in the image. There should be at least one space point per pixel. This allows us to later choose the space point with the highest score for each pixel.

The pixel map information populates the larflow::recoChooseMaxLArFlow::_srcpixel_to_spacepoint_m data memeber.

Parameters
  • hit_v: Event container holding larflow3dhit instances, which represent our space points.
  • img_v: Wire plane images. We use these get the ImageMeta for each image.
  • source_plane: The wire plane of interest
  • idx_used_v: Index of the event container hit_v that have been associated to the pixel map.

Protected Attributes

std::map<Pixel_t, std::vector<int>> _srcpixel_to_spacepoint_m

map source image pixel to space point triplet

std::string _input_larflow3dhit_treename

name of tree to get hits from

std::string _output_larflow3dhit_treename

name of tree to store hits in

struct Pixel_t

Internal struct representing a pixel in wire plane image.

Public Functions

bool operator<(const Pixel_t &rhs) const

comparator ordering by (plane,row,col)

Public Members

int row

row in 2D image

int col

col in 2D image

int plane

plane index of image