LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
kdTree class definiton More...
#include "kdTree.h"
Classes | |
class | KdTreeNode |
define a kd tree node More... | |
Public Types | |
using | KdTreeNodeVec = std::vector< KdTreeNode > |
using | KdTreeNodeList = std::list< KdTreeNode > |
using | Hit3DVec = std::vector< const reco::ClusterHit3D * > |
using | CandPair = std::pair< double, const reco::ClusterHit3D * > |
using | CandPairList = std::list< CandPair > |
Public Member Functions | |
kdTree (fhicl::ParameterSet const &pset) | |
Constructor. More... | |
virtual | ~kdTree () |
Destructor. More... | |
void | configure (fhicl::ParameterSet const &pset) |
Configure our kdTree... More... | |
KdTreeNode & | BuildKdTree (Hit3DVec::iterator, Hit3DVec::iterator, KdTreeNodeList &, int depth=0) const |
Given an input set of ClusterHit3D objects, build a kd tree structure. More... | |
size_t | FindNearestNeighbors (const reco::ClusterHit3D *, const KdTreeNode &, CandPairList &, float &) const |
bool | FindEntry (const reco::ClusterHit3D *, const KdTreeNode &, CandPairList &, float &, bool &, int) const |
bool | FindEntryBrute (const reco::ClusterHit3D *, const KdTreeNode &, int) const |
KdTreeNode | BuildKdTree (const reco::HitPairList &, KdTreeNodeList &) const |
Given an input HitPairList, build out the map of nearest neighbors. More... | |
KdTreeNode | BuildKdTree (const reco::HitPairListPtr &, KdTreeNodeList &) const |
Given an input HitPairListPtr, build out the map of nearest neighbors. More... | |
float | getTimeToExecute () const |
Private Member Functions | |
bool | consistentPairs (const reco::ClusterHit3D *pair1, const reco::ClusterHit3D *pair2, float &hitSeparation) const |
The bigger question: are two pairs of hits consistent? More... | |
float | DistanceBetweenNodes (const reco::ClusterHit3D *, const reco::ClusterHit3D *) const |
Private Attributes | |
bool | m_enableMonitoring |
float | m_timeToBuild |
float | m_pairSigmaPeakTime |
Consider hits consistent if "significance" less than this. More... | |
float | m_refLeafBestDist |
Set neighborhood distance to this when ref leaf found. More... | |
using lar_cluster3d::kdTree::CandPair = std::pair<double,const reco::ClusterHit3D*> |
using lar_cluster3d::kdTree::CandPairList = std::list<CandPair> |
using lar_cluster3d::kdTree::Hit3DVec = std::vector<const reco::ClusterHit3D*> |
using lar_cluster3d::kdTree::KdTreeNodeList = std::list<KdTreeNode> |
using lar_cluster3d::kdTree::KdTreeNodeVec = std::vector<KdTreeNode> |
lar_cluster3d::kdTree::kdTree | ( | fhicl::ParameterSet const & | pset | ) |
Constructor.
pset |
Definition at line 32 of file kdTree.cxx.
References configure().
|
virtual |
kdTree::KdTreeNode & lar_cluster3d::kdTree::BuildKdTree | ( | Hit3DVec::iterator | first, |
Hit3DVec::iterator | last, | ||
KdTreeNodeList & | kdTreeNodeContainer, | ||
int | depth = 0 |
||
) | const |
Given an input set of ClusterHit3D objects, build a kd tree structure.
hitPairList | The input list of 3D hits to run clustering on |
kdTreeVec | Container for the nodes |
Definition at line 120 of file kdTree.cxx.
References reco::ClusterHit3D::getPosition(), art::left(), art::right(), lar_cluster3d::kdTree::KdTreeNode::xPlane, lar_cluster3d::kdTree::KdTreeNode::yPlane, and lar_cluster3d::kdTree::KdTreeNode::zPlane.
Referenced by BuildKdTree(), lar_cluster3d::DBScanAlg::Cluster3DHits(), and lar_cluster3d::MinSpanTreeAlg::Cluster3DHits().
kdTree::KdTreeNode lar_cluster3d::kdTree::BuildKdTree | ( | const reco::HitPairList & | hitPairList, |
KdTreeNodeList & | kdTreeNodeContainer | ||
) | const |
Given an input HitPairList, build out the map of nearest neighbors.
Definition at line 57 of file kdTree.cxx.
References BuildKdTree(), m_enableMonitoring, and m_timeToBuild.
kdTree::KdTreeNode lar_cluster3d::kdTree::BuildKdTree | ( | const reco::HitPairListPtr & | hitPairList, |
KdTreeNodeList & | kdTreeNodeContainer | ||
) | const |
Given an input HitPairListPtr, build out the map of nearest neighbors.
Definition at line 85 of file kdTree.cxx.
References BuildKdTree(), reco::ClusterHit3D::HITINVIEW0, reco::ClusterHit3D::HITINVIEW1, reco::ClusterHit3D::HITINVIEW2, m_enableMonitoring, and m_timeToBuild.
void lar_cluster3d::kdTree::configure | ( | fhicl::ParameterSet const & | pset | ) |
Configure our kdTree...
ParameterSet | The input set of parameters for configuration |
Definition at line 45 of file kdTree.cxx.
References fhicl::ParameterSet::get(), m_enableMonitoring, m_pairSigmaPeakTime, m_refLeafBestDist, and m_timeToBuild.
Referenced by kdTree().
|
private |
The bigger question: are two pairs of hits consistent?
Definition at line 280 of file kdTree.cxx.
References DistanceBetweenNodes(), reco::ClusterHit3D::getAvePeakTime(), reco::ClusterHit3D::getSigmaPeakTime(), reco::ClusterHit3D::getWireIDs(), m_pairSigmaPeakTime, and max.
Referenced by FindEntry(), FindNearestNeighbors(), and getTimeToExecute().
|
private |
Definition at line 324 of file kdTree.cxx.
References reco::ClusterHit3D::getPosition().
Referenced by consistentPairs(), and getTimeToExecute().
bool lar_cluster3d::kdTree::FindEntry | ( | const reco::ClusterHit3D * | refHit, |
const KdTreeNode & | node, | ||
CandPairList & | CandPairList, | ||
float & | bestDist, | ||
bool & | selfNotFound, | ||
int | depth | ||
) | const |
Definition at line 215 of file kdTree.cxx.
References consistentPairs(), lar_cluster3d::kdTree::KdTreeNode::getAxisValue(), lar_cluster3d::kdTree::KdTreeNode::getClusterHit3D(), reco::ClusterHit3D::getPosition(), lar_cluster3d::kdTree::KdTreeNode::getSplitAxis(), lar_cluster3d::kdTree::KdTreeNode::isLeafNode(), lar_cluster3d::kdTree::KdTreeNode::leftTree(), max, and lar_cluster3d::kdTree::KdTreeNode::rightTree().
bool lar_cluster3d::kdTree::FindEntryBrute | ( | const reco::ClusterHit3D * | refHit, |
const KdTreeNode & | node, | ||
int | depth | ||
) | const |
Definition at line 260 of file kdTree.cxx.
References lar_cluster3d::kdTree::KdTreeNode::getClusterHit3D(), lar_cluster3d::kdTree::KdTreeNode::isLeafNode(), lar_cluster3d::kdTree::KdTreeNode::leftTree(), and lar_cluster3d::kdTree::KdTreeNode::rightTree().
size_t lar_cluster3d::kdTree::FindNearestNeighbors | ( | const reco::ClusterHit3D * | refHit, |
const KdTreeNode & | node, | ||
CandPairList & | CandPairList, | ||
float & | bestDist | ||
) | const |
Definition at line 178 of file kdTree.cxx.
References consistentPairs(), lar_cluster3d::kdTree::KdTreeNode::getAxisValue(), lar_cluster3d::kdTree::KdTreeNode::getClusterHit3D(), reco::ClusterHit3D::getPosition(), lar_cluster3d::kdTree::KdTreeNode::getSplitAxis(), lar_cluster3d::kdTree::KdTreeNode::isLeafNode(), lar_cluster3d::kdTree::KdTreeNode::leftTree(), m_refLeafBestDist, max, and lar_cluster3d::kdTree::KdTreeNode::rightTree().
Referenced by lar_cluster3d::MinSpanTreeAlg::AStar(), lar_cluster3d::DBScanAlg::Cluster3DHits(), lar_cluster3d::DBScanAlg::expandCluster(), and lar_cluster3d::MinSpanTreeAlg::RunPrimsAlgorithm().
|
inline |
Definition at line 86 of file kdTree.h.
References consistentPairs(), DistanceBetweenNodes(), and m_timeToBuild.
Referenced by lar_cluster3d::DBScanAlg::Cluster3DHits(), and lar_cluster3d::MinSpanTreeAlg::Cluster3DHits().
|
private |
Definition at line 97 of file kdTree.h.
Referenced by BuildKdTree(), and configure().
|
private |
Consider hits consistent if "significance" less than this.
Definition at line 99 of file kdTree.h.
Referenced by configure(), and consistentPairs().
|
private |
Set neighborhood distance to this when ref leaf found.
Definition at line 100 of file kdTree.h.
Referenced by configure(), and FindNearestNeighbors().
|
mutableprivate |
Definition at line 98 of file kdTree.h.
Referenced by BuildKdTree(), configure(), and getTimeToExecute().