LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 () | |
Default Constructor. More... | |
kdTree (fhicl::ParameterSet const &pset) | |
Constructor. More... | |
~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 |
float | DistanceBetweenNodesYZ (const reco::ClusterHit3D *, const reco::ClusterHit3D *) const |
Private Attributes | |
bool | fEnableMonitoring |
float | fTimeToBuild |
float | fPairSigmaPeakTime |
Consider hits consistent if "significance" less than this. More... | |
float | fRefLeafBestDist |
Set neighborhood distance to this when ref leaf found. More... | |
int | fMaxWireDeltas |
Maximum total number of delta wires. 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> |
|
inline |
Default Constructor.
Definition at line 36 of file kdTree.h.
lar_cluster3d::kdTree::kdTree | ( | fhicl::ParameterSet const & | pset | ) |
Constructor.
pset |
Definition at line 24 of file kdTree.cxx.
References configure().
lar_cluster3d::kdTree::~kdTree | ( | ) |
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 109 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(), lar_cluster3d::MinSpanTreeAlg::Cluster3DHits(), and lar_cluster3d::MSTPathFinder::ModifyClusters().
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 48 of file kdTree.cxx.
References BuildKdTree(), fEnableMonitoring, and fTimeToBuild.
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 75 of file kdTree.cxx.
References BuildKdTree(), fEnableMonitoring, fTimeToBuild, reco::ClusterHit3D::HITINVIEW0, reco::ClusterHit3D::HITINVIEW1, and reco::ClusterHit3D::HITINVIEW2.
void lar_cluster3d::kdTree::configure | ( | fhicl::ParameterSet const & | pset | ) |
Configure our kdTree...
ParameterSet | The input set of parameters for configuration |
Definition at line 35 of file kdTree.cxx.
References fEnableMonitoring, fMaxWireDeltas, fPairSigmaPeakTime, fRefLeafBestDist, fTimeToBuild, and fhicl::ParameterSet::get().
Referenced by kdTree().
|
private |
The bigger question: are two pairs of hits consistent?
Definition at line 297 of file kdTree.cxx.
References util::abs(), DistanceBetweenNodesYZ(), fPairSigmaPeakTime, reco::ClusterHit3D::getAvePeakTime(), reco::ClusterHit3D::getSigmaPeakTime(), and reco::ClusterHit3D::getWireIDs().
Referenced by FindEntry(), and FindNearestNeighbors().
|
private |
Definition at line 355 of file kdTree.cxx.
References reco::ClusterHit3D::getPosition().
|
private |
Definition at line 342 of file kdTree.cxx.
References reco::ClusterHit3D::getPosition().
Referenced by consistentPairs().
bool lar_cluster3d::kdTree::FindEntry | ( | const reco::ClusterHit3D * | refHit, |
const KdTreeNode & | node, | ||
CandPairList & | CandPairList, | ||
float & | bestDist, | ||
bool & | selfNotFound, | ||
int | depth | ||
) | const |
Definition at line 224 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(), and lar_cluster3d::kdTree::KdTreeNode::rightTree().
bool lar_cluster3d::kdTree::FindEntryBrute | ( | const reco::ClusterHit3D * | refHit, |
const KdTreeNode & | node, | ||
int | depth | ||
) | const |
Definition at line 277 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 183 of file kdTree.cxx.
References consistentPairs(), fRefLeafBestDist, 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(), and lar_cluster3d::kdTree::KdTreeNode::rightTree().
Referenced by lar_cluster3d::DBScanAlg::Cluster3DHits(), lar_cluster3d::DBScanAlg::expandCluster(), lar_cluster3d::MinSpanTreeAlg::RunPrimsAlgorithm(), and lar_cluster3d::MSTPathFinder::RunPrimsAlgorithm().
|
inline |
Definition at line 104 of file kdTree.h.
Referenced by lar_cluster3d::DBScanAlg::Cluster3DHits(), lar_cluster3d::MinSpanTreeAlg::Cluster3DHits(), and lar_cluster3d::MSTPathFinder::ModifyClusters().
|
private |
Definition at line 117 of file kdTree.h.
Referenced by BuildKdTree(), and configure().
|
private |
Maximum total number of delta wires.
Definition at line 121 of file kdTree.h.
Referenced by configure().
|
private |
Consider hits consistent if "significance" less than this.
Definition at line 119 of file kdTree.h.
Referenced by configure(), and consistentPairs().
|
private |
Set neighborhood distance to this when ref leaf found.
Definition at line 120 of file kdTree.h.
Referenced by configure(), and FindNearestNeighbors().
|
mutableprivate |
Definition at line 118 of file kdTree.h.
Referenced by BuildKdTree(), and configure().