Class FlowMatchHitMaker¶
- Defined in File FlowMatchHitMaker.h
Class Documentation¶
-
class
FlowMatchHitMaker
¶ Processes output of LArMatch network and makes space point objects.
Revision history 2020/07/22: Added doxygen documentation.
- Author
- Taritree Wongjirad (taritree.wongjirad@tuts.edu)
- Date
- $Data 2020/07/22 17:00$
Public Functions
-
FlowMatchHitMaker
()¶
-
virtual
~FlowMatchHitMaker
()¶
-
void
clear
()¶ reset state and clear member containers
-
int
add_match_data
(PyObject *pair_probs, PyObject *source_sparseimg, PyObject *target_sparseimg, PyObject *matchpairs, const int source_plane, const int target_plane, const larcv::ImageMeta &source_meta, const std::vector<larcv::Image2D> &img_v, const larcv::EventChStatus &ev_chstatus)¶ compile network output into hit candidate information
- Parameters
pair_probs
: Pointer to (1,Np) numpy array containing larmatch scores for Np space pointssource_sparseimg
: Pointer to (Ns,2) numpy array containing indicies (row,col) of Ns non-zero pixelstarget_sparseimg
: Pointer to (Nt,2) numpy array containing indicies (row,col) of Nt non-zero pixelsmatchpairs
: Point to (Np,2) numpy array containing index to (source_sparseimg,target_sparseimg) arrays for Np space pointssource_plane
: Index of source planetarget_plane
: Index of target planesource_meta
: ImageMeta describing parameters for soruce imageimg_v
: vector of Image2D instances containing ionization information (i.e. the wireplane images)ev_chstatus
: Class containing status of channels, i.e. if good or dead
-
void
set_score_threshold
(float score)¶ spacepoints with larmatch score below set value will not be stored
-
int
add_triplet_match_data
(PyObject *triple_probs, PyObject *triplet_indices, PyObject *sparseimg_u, PyObject *sparseimg_v, PyObject *sparseimg_y, const std::vector<std::vector<float>> &pos_vv, const std::vector<larcv::Image2D> &adc_v)¶ compile network output into hit candidate information
-
int
add_triplet_ssnet_scores
(PyObject *triplet_indices, PyObject *sparseimg_u, PyObject *sparseimg_v, PyObject *sparseimg_y, const larcv::ImageMeta &meta, PyObject *ssnet_scores)¶ store ssnet scores in match_t struct
add_triplet_match_data needed to have been run first
-
int
add_triplet_keypoint_scores
(PyObject *triplet_indices, PyObject *sparseimg_u, PyObject *sparseimg_v, PyObject *sparseimg_y, const larcv::ImageMeta &meta, PyObject *kplabel_scores)¶ store keypoint label scores in match_t struct
add_triplet_match_data needed to have been run first
-
int
add_triplet_affinity_field
(PyObject *triplet_indices, PyObject *imgu_sparseimg, PyObject *imgv_sparseimg, PyObject *imgy_sparseimg, const larcv::ImageMeta &meta, PyObject *paf_pred)¶ store particle affinity field direction
add_triplet_match_data needed to have been run first
-
void
make_hits
(const larcv::EventChStatus &ev_chstatus, std::vector<larlite::larflow3dhit> &hit_v) const¶ uses the match data in _matches_v to make hits
makes larlite::larflow3dhit objects based on stored match data the object is a wrapper around a vector<float>.
spacepoint proposals below _match_score_threshold will be skipped.
larflow3dhit inherits from vector<float>. The values in the vector are as follows:
[3-9]: 6 flow direction scores + 1 max scire (deprecated based on 2-flow paradigm. for triplet, [8] is the only score stored [10-12]: 3 ssnet scores, (bg,track,shower) [13-15]: 3 keypoint label score [nu,track,shower] [16-18]: 3D flow direction
- Parameters
ev_chstatus
: Class containing channel status, indicating if good or dead wirehit_v
: vector of space points whose larmatch score was above threshold
Public Members
-
float
_match_score_threshold
¶ do not generate hits for space points below this threshold
-
std::map<std::vector<int>, int>
_match_map
¶ map of (Y,U,V) triple to positin in matches_v
-
bool
has_ssnet_scores
¶ ssnet scores have been provided
-
bool
has_kplabel_scores
¶ keypoint scores have been provided
-
bool
has_paf
¶ particle affinity field directions have been provided
-
struct
match_t
¶ internal struct storing network output for single spacepoint
indexed by (U,V,Y) wire ids
Public Functions
-
match_t
()¶
-
bool
operator<
(const match_t &rhs) const¶ comparitor for sorting. based on plane wire ids going from plane Y,U,V.
-
void
set_wire
(int plane, int wire)¶ set wire index number for a plane
-
void
set_istruth
(int label)¶ set flag indicating if true space point. 1->true; 0->ghost.
-
void
set_score
(int source_plane, int target_plane, float prob)¶ set larmatch score for provided flow between planes
-
std::vector<float>
get_scores
() const¶ get the scores for all of the flow directions
Public Members
-
int
Y
¶ Y-wire.
-
int
U
¶ U-wire.
-
int
V
¶ V-wire.
-
float
YU
¶ match score between Y to U
-
float
YV
¶ match score between Y to V
-
float
UV
¶ match score between U to V
-
float
UY
¶ match score between U to Y
-
float
VU
¶ match score between V to U
-
float
VY
¶ match score between V to Y
-
std::array<float, 3>
tyz
¶ tick, y, z coordinates
-
std::vector<float>
ssnet_scores
¶ ssnet scores
-
std::vector<float>
keypoint_scores
¶ keypoint scores (for each class)
-
std::vector<float>
paf
¶ particle affinity field, 3D vector
-
int
istruth
¶ indicates if a true (i.e. not ghost) space point. 1->true; 0->ghost
-