Class DBScanLArMatchHits¶
- Defined in File DBScanLArMatchHits.h
Class Documentation¶
-
class
DBScanLArMatchHits: public larcv_base¶ cluster larflow3d hits using dbscan
Basically an interface between IO managers and the cluster_sdbscan_larflow3dhits() routine, which uses Simple DBScan from ublarcvapp.
Public Functions
-
DBScanLArMatchHits()¶ default constructor
-
virtual
~DBScanLArMatchHits()¶
-
void
process(larcv::IOManager &iolc, larlite::storage_manager &ioll)¶ process data in event containers
- Parameters
iolcv: LArCV IO manager with event dataioll: larlite storage_manager with event data
-
void
set_min_larmatch_score(float min_score)¶ set minimum larmatch score to include hits
-
void
set_dbscan_pars(float maxdist, int minsize, int maxkd)¶ set parameters that control dbscan behavior
-
void
set_input_larflowhit_tree_name(std::string treename)¶ set the input tree name for larflow3dhit container
-
void
set_output_larflowhit_tree_name(std::string treename)¶ set the output tree name where larflowcluster objects will be stored
Protected Functions
-
larlite::larflowcluster
makeLArFlowCluster(cluster_t &cluster, const std::vector<larlite::larflow3dhit> &source_lfhit_v)¶ convert cluster data in cluster_t into a larflowcluster object
- Return
- cluster represented as larlite::larflowcluster object
- Parameters
cluster: cluster produced by cluster_sdbscan_larflow3dhits()source_lfhit_v: larflow3dhit vector passed into cluster_sdbscan_larflow3dhits()
-
cluster_t
absorb_nearby_hits(const cluster_t &cluster, const std::vector<larlite::larflow3dhit> &hit_v, std::vector<int> &used_hits_v, float max_dist2line)¶ assign spacepoints to cluster made using downsampled set of spacepoints
- Return
- A new cluster_t object that includes all assigned spacepoints
- Parameters
cluster: The cluster made using downsampled space pointshit_v: Container with all spacepoints (i.e. not downsampled)used_hits_v: Vector same size as hit_v, containing 1 if hit is already used. If 1, will not be added to current cluster.max_dist2line: Maximum distance a space point can be from the downsampled cluster’s 1st principle component
-
void
makeCluster(const std::vector<larlite::larflow3dhit> &inputhits, std::vector<cluster_t> &output_cluster_v, std::vector<int> &used_hits_v)¶ make cluster_t objects using given vector of larflow3dhit objects
- Parameters
inputhits: Input vector of larflow3dhit objects to clusteroutput_cluster_v: Output clusters foundused_hits_v: Vector same length as inputhits. If 1, that hit has already been assigned to a cluster. This function updates this flag for hits claimed while running this method.
Protected Attributes
-
std::string
_input_larflowhit_tree_name¶ name of tree to get larflow3dhit data from
-
std::string
_out_cluster_tree_name¶ name of tree which will store larlite::larflowcluster objects
-
float
_min_larmatch_score¶ larmatch score threshold for including points in clustering
-
float
_maxdist¶ max distance value used in dbscan
-
int
_minsize¶ minimum size of cluster
-
int
_maxkd¶ max number of neighbors a spacepoint can have in dbscan
-