Class FlowTriples¶
- Defined in File FlowTriples.h
Class Documentation¶
-
class
FlowTriples
¶ Generate and store (U,V,Y) wire combintations extracted from examining coincident ionization between two planes.
Revision history 2020/07/22: Added doxygen documentation.
- Author
- Taritree Wongjirad (taritree.wongjirad@tufts.edu)
- Date
- $Data 2020/07/22 17:00$
Public Functions
-
FlowTriples
()¶
-
FlowTriples
(int source_plane, int target_plane, const std::vector<larcv::Image2D> &adc_v, const std::vector<larcv::Image2D> &badch_v, float threshold, bool save_index)¶ generate list of possible combinations of (U,V,Y) intersections given source to target plane matching.
this version takes image2d as input
- Parameters
source
: The source plane index, where we start the match with a pixel above threshold.target
: The target plane index, where we match to pixels above thresholdadc_v
: Vector of image pixel valuesbadch_v
: Vector of images labeling bad channelsthreshold
: Pixels that we consider must be above this valuesave_index
: If true, we save the index of the pixel in the sparse matrix representation. If false, we save the image col posiiton. Saving the col position requires searching the sparse matrix entries, but one can append to matrix. Saving the index requires no searching, but look-up is broken if matrix is changed.
-
FlowTriples
(int source, int target, const std::vector<larcv::Image2D> &adc_v, const std::vector<larcv::Image2D> &badch_v, const std::vector<std::vector<PixData_t>> &sparseimg_vv, float threshold, bool save_index)¶ generate list of possible combinations of (U,V,Y) intersections given source to target plane matching.
this version takes the sparse matrix representation of the image, skipping its generation
- Parameters
source
: The source plane index, where we start the match with a pixel above threshold.target
: The target plane index, where we match to pixels above thresholdadc_v
: Vector of image pixel valuesbadch_v
: Vector of images labeling bad channelssparseimg_vv
: Sparse representation (i.e. list of pixels) for each plane.threshold
: Pixels that we consider must be above this valuesave_index
: If true, we save the index of the pixel in the sparse matrix representation. If false, we save the image col posiiton. Saving the col position requires searching the sparse matrix entries, but one can append to matrix. Saving the index requires no searching, but look-up is broken if matrix is changed.
-
virtual
~FlowTriples
()¶
-
int
nsourceIndices
() const¶ number of pixels in the source image
-
int
get_source_plane_index
()¶ index of the source plane considered
-
int
get_target_plane_index
()¶ index of the target plane considered
-
int
get_other_plane_index
()¶ index of the other (not source or target) plane considered
-
std::vector<TH2D>
plot_triple_data
(const std::vector<larcv::Image2D> &adc_v, const std::vector<std::vector<PixData_t>> &sparseimg_vv, std::string hist_stem_name)¶ use a th2d to plot the projected locations of the triplets in each of the planes
utility function to help with visual debugging
- Parameters
adc_v
: Vector of image pixel valuessparseimg_vv
: Sparse representation (i.e. list of pixels) for each plane.hist_stem_name
: Stem of histogram name generated.
-
std::vector<TH2D>
plot_sparse_data
(const std::vector<larcv::Image2D> &adc_v, const std::vector<std::vector<PixData_t>> &sparseimg_vv, std::string hist_stem_name)¶ make a TH2D in order to visualize the sparse matrix data
utility function to help with visual debugging
- Parameters
adc_v
: Vector of image pixel valuessparseimg_vv
: Sparse representation (i.e. list of pixels) for each plane.hist_stem_name
: Stem of histogram name generated.
-
std::vector<std::vector<int>> &
getTriples
()¶ get the combination of three wires with coincident charge seen
Public Static Functions
-
std::vector<std::vector<FlowTriples::PixData_t>>
make_initial_sparse_image
(const std::vector<larcv::Image2D> &adc_v, float threshold)¶ convert the wire image data into a sparse represntation
we convert the image into a vector of PixData_t objects.
- Return
- Vector of images in sparse representation (i.e. a list of pixels above threshold)
- Parameters
adc_v
: Vector of image pixel valuesthreshold
: Keep only pixels with value above this threshold
Protected Functions
-
void
_makeTriples
(int source, int target, const std::vector<larcv::Image2D> &adc_v, const std::vector<larcv::Image2D> &badch_v, const std::vector<std::vector<PixData_t>> &sparseimg_vv, float threshold, bool save_index)¶ using the list of pixels in the sparse matrix representation, build the list of possible three-plane triplets
- Parameters
source
: The source plane index, where we start the match with a pixel above threshold.target
: The target plane index, where we match to pixels above thresholdadc_v
: Vector of image pixel valuesbadch_v
: Vector of images labeling bad channelssparseimg_vv
: Sparse representation (i.e. list of pixels) for each plane.threshold
: Pixels that we consider must be above this valuesave_index
: If true, we save the index of the pixel in the sparse matrix representation. If false, we save the image col posiiton. Saving the col position requires searching the sparse matrix entries, but one can append to matrix. Saving the index requires no searching, but look-up is broken if matrix is changed.
Protected Attributes
-
int
_source_plane
¶ index of the source plane considered
-
int
_target_plane
¶ index of the target plane considered
-
int
_other_plane
¶ index of the other (non-source, non-target) plane considered
-
std::vector<std::vector<int>>
_triple_v
¶ combination of three wire plane pixels with coincident charge
-
struct
PixData_t
¶ internal struct to represent to a pixel and provide sorting method