LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Public Types | |
enum | TimeValues { BUILDTHREEDHITS = 0, BUILDHITTOHITMAP = 1, RUNDBSCAN = 2, BUILDCLUSTERINFO = 3, PATHFINDING = 4, NUMTIMEVALUES } |
enumerate the possible values for time checking if monitoring timing More... | |
Public Member Functions | |
MinSpanTreeAlg (const fhicl::ParameterSet &) | |
Constructor. More... | |
~MinSpanTreeAlg () | |
Destructor. More... | |
void | configure (fhicl::ParameterSet const &pset) override |
void | Cluster3DHits (reco::HitPairList &hitPairList, reco::ClusterParametersList &clusterParametersList) const override |
Given a set of recob hits, run DBscan to form 3D clusters. More... | |
void | Cluster3DHits (reco::HitPairListPtr &, reco::ClusterParametersList &) const override |
Given a set of recob hits, run DBscan to form 3D clusters. More... | |
float | getTimeToExecute (TimeValues index) const override |
If monitoring, recover the time to execute a particular function. More... | |
virtual void | configure (const fhicl::ParameterSet &)=0 |
Interface for configuring the particular algorithm tool. More... | |
Private Types | |
using | BestNodeTuple = std::tuple< const reco::ClusterHit3D *, float, float > |
using | BestNodeMap = std::unordered_map< const reco::ClusterHit3D *, BestNodeTuple > |
using | ChannelStatusVec = std::vector< size_t > |
define data structure for keeping track of channel status More... | |
using | ChannelStatusByPlaneVec = std::vector< ChannelStatusVec > |
Private Member Functions | |
void | RunPrimsAlgorithm (reco::HitPairList &, kdTree::KdTreeNode &, reco::ClusterParametersList &) const |
Driver for Prim's algorithm. More... | |
void | PruneAmbiguousHits (reco::ClusterParameters &, reco::Hit2DToClusterMap &) const |
Prune the obvious ambiguous hits. More... | |
void | FindBestPathInCluster (reco::ClusterParameters &) const |
Algorithm to find the best path through the given cluster. More... | |
reco::HitPairListPtr | DepthFirstSearch (const reco::EdgeTuple &, const reco::Hit3DToEdgeMap &, float &) const |
a depth first search to find longest branches More... | |
void | FindBestPathInCluster (reco::ClusterParameters &, kdTree::KdTreeNode &) const |
Alternative version of FindBestPathInCluster utilizing an A* algorithm. More... | |
void | AStar (const reco::ClusterHit3D *, const reco::ClusterHit3D *, reco::ClusterParameters &) const |
Algorithm to find shortest path between two 3D hits. More... | |
void | ReconstructBestPath (const reco::ClusterHit3D *, BestNodeMap &, reco::HitPairListPtr &, reco::EdgeList &) const |
float | DistanceBetweenNodes (const reco::ClusterHit3D *, const reco::ClusterHit3D *) const |
void | LeastCostPath (const reco::EdgeTuple &, const reco::ClusterHit3D *, reco::ClusterParameters &, float &) const |
Find the lowest cost path between two nodes using MST edges. More... | |
void | CheckHitSorting (reco::ClusterParameters &clusterParams) const |
Private Attributes | |
bool | m_enableMonitoring |
Data members to follow. More... | |
std::vector< float > | m_timeVector |
std::vector< std::vector< float > > | m_wireDir |
geo::Geometry const * | m_geometry |
PrincipalComponentsAlg | m_pcaAlg |
kdTree | m_kdTree |
std::unique_ptr< lar_cluster3d::IClusterParametersBuilder > | m_clusterBuilder |
Common cluster builder tool. More... | |
Definition at line 43 of file MinSpanTreeAlg_tool.cc.
|
private |
Definition at line 116 of file MinSpanTreeAlg_tool.cc.
|
private |
Definition at line 115 of file MinSpanTreeAlg_tool.cc.
|
private |
Definition at line 139 of file MinSpanTreeAlg_tool.cc.
|
private |
define data structure for keeping track of channel status
Definition at line 138 of file MinSpanTreeAlg_tool.cc.
|
inherited |
enumerate the possible values for time checking if monitoring timing
Enumerator | |
---|---|
BUILDTHREEDHITS | |
BUILDHITTOHITMAP | |
RUNDBSCAN | |
BUILDCLUSTERINFO | |
PATHFINDING | |
NUMTIMEVALUES |
Definition at line 61 of file IClusterAlg.h.
|
explicit |
Constructor.
pset |
Definition at line 157 of file MinSpanTreeAlg_tool.cc.
References configure().
lar_cluster3d::MinSpanTreeAlg::~MinSpanTreeAlg | ( | ) |
|
private |
Algorithm to find shortest path between two 3D hits.
Definition at line 537 of file MinSpanTreeAlg_tool.cc.
References DistanceBetweenNodes(), reco::ClusterParameters::getBestEdgeList(), reco::ClusterParameters::getBestHitPairListPtr(), reco::ClusterParameters::getHit3DToEdgeMap(), reco::ClusterHit3D::getStatusBits(), reco::ClusterHit3D::PATHCHECKED, ReconstructBestPath(), and reco::ClusterHit3D::setStatusBit().
Referenced by getTimeToExecute().
|
private |
Definition at line 890 of file MinSpanTreeAlg_tool.cc.
References DEFINE_ART_CLASS_TOOL, reco::PrincipalComponents::getEigenVectors(), reco::ClusterParameters::getHitPairListPtr(), reco::ClusterHit3D::getHits(), reco::PrincipalComponents::getSvdOK(), reco::ClusterHit3D::getWireIDs(), m_pcaAlg, m_wireDir, and lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_3D().
|
overridevirtual |
Given a set of recob hits, run DBscan to form 3D clusters.
hitPairList | The input list of 3D hits to run clustering on |
hitPairClusterMap | A map of hits that have been clustered |
clusterParametersList | A list of cluster objects (parameters from associated hits) |
Driver for processing input 2D hits, transforming to 3D hits and building lists of associated 3D hits (candidate 3D clusters)
Implements lar_cluster3d::IClusterAlg.
Definition at line 202 of file MinSpanTreeAlg_tool.cc.
References lar_cluster3d::IClusterAlg::BUILDCLUSTERINFO, lar_cluster3d::IClusterAlg::BUILDHITTOHITMAP, lar_cluster3d::kdTree::BuildKdTree(), trkf::fill(), FindBestPathInCluster(), lar_cluster3d::kdTree::getTimeToExecute(), m_clusterBuilder, m_enableMonitoring, m_kdTree, m_timeVector, and RunPrimsAlgorithm().
|
inlineoverridevirtual |
Given a set of recob hits, run DBscan to form 3D clusters.
hitPairListPtr | The input list of 3D hits to run clustering on |
clusterParametersList | A list of cluster objects (parameters from associated hits) |
Implements lar_cluster3d::IClusterAlg.
Definition at line 69 of file MinSpanTreeAlg_tool.cc.
|
pure virtualinherited |
Interface for configuring the particular algorithm tool.
ParameterSet | The input set of parameters for configuration |
Implemented in lar_cluster3d::DBScanAlg.
|
override |
Definition at line 170 of file MinSpanTreeAlg_tool.cc.
References geo::GeometryCore::ChannelToWire(), geo::WireGeo::Direction(), fhicl::ParameterSet::get(), m_clusterBuilder, m_enableMonitoring, m_geometry, m_timeVector, m_wireDir, lar_cluster3d::IClusterAlg::NUMTIMEVALUES, and geo::GeometryCore::WirePtr().
Referenced by MinSpanTreeAlg().
|
private |
a depth first search to find longest branches
Definition at line 719 of file MinSpanTreeAlg_tool.cc.
Referenced by FindBestPathInCluster(), and getTimeToExecute().
|
private |
Definition at line 688 of file MinSpanTreeAlg_tool.cc.
References reco::ClusterHit3D::getPosition().
Referenced by AStar(), FindBestPathInCluster(), and ReconstructBestPath().
|
private |
Algorithm to find the best path through the given cluster.
Definition at line 376 of file MinSpanTreeAlg_tool.cc.
References DepthFirstSearch(), util::empty(), reco::ClusterParameters::getBestEdgeList(), reco::ClusterParameters::getHit3DToEdgeMap(), reco::ClusterParameters::getHitPairListPtr(), m_enableMonitoring, m_timeVector, lar_cluster3d::IClusterAlg::PATHFINDING, and util::size().
Referenced by Cluster3DHits(), and getTimeToExecute().
|
private |
Alternative version of FindBestPathInCluster utilizing an A* algorithm.
Definition at line 441 of file MinSpanTreeAlg_tool.cc.
References util::abs(), DistanceBetweenNodes(), util::empty(), reco::PrincipalComponents::getAvePosition(), reco::ClusterParameters::getBestEdgeList(), reco::ClusterParameters::getBestHitPairListPtr(), reco::PrincipalComponents::getEigenValues(), reco::PrincipalComponents::getEigenVectors(), reco::ClusterParameters::getHit3DToEdgeMap(), reco::ClusterParameters::getHitPairListPtr(), reco::PrincipalComponents::getSvdOK(), LeastCostPath(), art::left(), m_enableMonitoring, m_pcaAlg, m_timeVector, lar_cluster3d::IClusterAlg::PATHFINDING, lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_3D(), art::right(), and util::size().
|
inlineoverridevirtual |
If monitoring, recover the time to execute a particular function.
Implements lar_cluster3d::IClusterAlg.
Definition at line 76 of file MinSpanTreeAlg_tool.cc.
References AStar(), DepthFirstSearch(), FindBestPathInCluster(), m_timeVector, PruneAmbiguousHits(), and RunPrimsAlgorithm().
|
private |
Find the lowest cost path between two nodes using MST edges.
Definition at line 640 of file MinSpanTreeAlg_tool.cc.
References reco::ClusterParameters::getBestEdgeList(), reco::ClusterParameters::getBestHitPairListPtr(), and reco::ClusterParameters::getHit3DToEdgeMap().
Referenced by FindBestPathInCluster().
|
private |
Prune the obvious ambiguous hits.
Definition at line 765 of file MinSpanTreeAlg_tool.cc.
References reco::ClusterParameters::getHitPairListPtr(), and util::size().
Referenced by getTimeToExecute().
|
private |
Definition at line 619 of file MinSpanTreeAlg_tool.cc.
References DistanceBetweenNodes().
Referenced by AStar().
|
private |
Driver for Prim's algorithm.
Definition at line 249 of file MinSpanTreeAlg_tool.cc.
References reco::ClusterHit3D::CLUSTERATTACHED, lar_cluster3d::kdTree::FindNearestNeighbors(), reco::ClusterHit3D::getHitChiSquare(), art::left(), m_enableMonitoring, m_kdTree, m_timeVector, art::right(), lar_cluster3d::IClusterAlg::RUNDBSCAN, and reco::ClusterHit3D::setStatusBit().
Referenced by Cluster3DHits(), and getTimeToExecute().
|
private |
Common cluster builder tool.
Definition at line 154 of file MinSpanTreeAlg_tool.cc.
Referenced by Cluster3DHits(), and configure().
|
private |
Data members to follow.
Definition at line 144 of file MinSpanTreeAlg_tool.cc.
Referenced by Cluster3DHits(), configure(), FindBestPathInCluster(), and RunPrimsAlgorithm().
|
private |
Definition at line 148 of file MinSpanTreeAlg_tool.cc.
Referenced by configure().
|
private |
Definition at line 151 of file MinSpanTreeAlg_tool.cc.
Referenced by Cluster3DHits(), and RunPrimsAlgorithm().
|
private |
Definition at line 150 of file MinSpanTreeAlg_tool.cc.
Referenced by CheckHitSorting(), and FindBestPathInCluster().
|
mutableprivate |
Definition at line 145 of file MinSpanTreeAlg_tool.cc.
Referenced by Cluster3DHits(), configure(), FindBestPathInCluster(), getTimeToExecute(), and RunPrimsAlgorithm().
|
private |
Definition at line 146 of file MinSpanTreeAlg_tool.cc.
Referenced by CheckHitSorting(), and configure().