10 #include "cetlib/search_path.h" 11 #include "cetlib/cpu_timer.h" 124 cet::cpu_timer theClockDBScan;
140 for(
const auto&
hit : hitPairList)
175 theClockDBScan.stop();
181 cet::cpu_timer theClockBuildClusters;
190 theClockBuildClusters.stop();
195 mf::LogDebug(
"Cluster3D") <<
">>>>> DBScan done, found " << clusterParametersList.size() <<
" clusters" << std::endl;
207 cet::cpu_timer theClockDBScan;
223 for(
const auto&
hit : hitPairList)
258 theClockDBScan.stop();
264 cet::cpu_timer theClockBuildClusters;
273 theClockBuildClusters.stop();
278 mf::LogDebug(
"Cluster3D") <<
">>>>> DBScan done, found " << clusterParametersList.size() <<
" clusters" << std::endl;
291 while(!candPairList.empty())
309 if (neighborCandPairList.size() >= minPts)
311 std::copy(neighborCandPairList.begin(),neighborCandPairList.end(),std::back_inserter(candPairList));
322 candPairList.pop_front();
void expandCluster(const kdTree::KdTreeNode &, kdTree::CandPairList &, reco::ClusterParameters &, size_t) const
the main routine for DBScan
This algorithm will create and then cluster 3D hits using DBScan.
void configure(const fhicl::ParameterSet &) override
Interface for configuring the particular algorithm tool.
bool m_enableMonitoring
Data members to follow.
Declaration of signal hit object.
std::list< KdTreeNode > KdTreeNodeList
Implements a kdTree for use in clustering.
size_t FindNearestNeighbors(const reco::ClusterHit3D *, const KdTreeNode &, CandPairList &, float &) const
Labelled "noise" by a clustering algorithm.
void BuildClusterInfo(reco::ClusterParametersList &clusterParametersList) const
Given the results of running DBScan, format the clusters so that they can be easily transferred back ...
Cluster finding and building.
IClusterAlg interface class definiton.
unsigned int getStatusBits() const
std::list< std::unique_ptr< reco::ClusterHit3D >> HitPairList
ClusterParamsBuilder class definiton.
T get(std::string const &key) const
TimeValues
enumerate the possible values for time checking if monitoring timing
std::list< const reco::ClusterHit3D * > HitPairListPtr
This provides an art tool interface definition for 3D Cluster algorithms.
Detector simulation of raw signals on wires.
std::list< CandPair > CandPairList
void Cluster3DHits(reco::HitPairList &hitPairList, reco::ClusterParametersList &clusterParametersList) const override
Given a set of recob hits, run DBscan to form 3D clusters.
Utility object to perform functions of association.
DBScanAlg(fhicl::ParameterSet const &pset)
Constructor.
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
DBScanAlg class definiton.
float getTimeToExecute(IClusterAlg::TimeValues index) const override
If monitoring, recover the time to execute a particular function.
ClusterParamsBuilder m_clusterBuilder
float getTimeToExecute() const
"visited" by a clustering algorithm
std::vector< float > m_timeVector
KdTreeNode & BuildKdTree(Hit3DVec::iterator, Hit3DVec::iterator, KdTreeNodeList &, int depth=0) const
Given an input set of ClusterHit3D objects, build a kd tree structure.
std::list< ClusterParameters > ClusterParametersList
void addHit3D(const reco::ClusterHit3D *hit3D)
void setStatusBit(unsigned bits) const