12 #include "cetlib/cpu_timer.h" 92 std::unique_ptr<lar_cluster3d::IClusterParametersBuilder>
113 m_clusterBuilder = art::make_tool<lar_cluster3d::IClusterParametersBuilder>(
128 float maxBestDist = 1.99 * *std::max_element(wirePitchVec.begin(), wirePitchVec.end());
130 kdTreeParams.
put_or_replace<
float>(
"RefLeafBestDist", maxBestDist);
142 cet::cpu_timer theClockDBScan;
158 for (
const auto&
hit : hitPairList) {
167 float bestDistance(std::numeric_limits<float>::max());
189 theClockDBScan.stop();
195 cet::cpu_timer theClockBuildClusters;
203 theClockBuildClusters.stop();
208 mf::LogDebug(
"Cluster3D") <<
">>>>> DBScan done, found " << clusterParametersList.size()
209 <<
" clusters" << std::endl;
221 cet::cpu_timer theClockDBScan;
237 for (
const auto&
hit : hitPairList) {
246 float bestDistance(std::numeric_limits<float>::max());
268 theClockDBScan.stop();
274 cet::cpu_timer theClockBuildClusters;
282 theClockBuildClusters.stop();
287 mf::LogDebug(
"Cluster3D") <<
">>>>> DBScan done, found " << clusterParametersList.size()
288 <<
" clusters" << std::endl;
301 while (!candPairList.empty()) {
312 float bestDistance(std::numeric_limits<float>::max());
317 if (neighborCandPairList.size() >= minPts) {
318 std::copy(neighborCandPairList.begin(),
319 neighborCandPairList.end(),
320 std::back_inserter(candPairList));
330 candPairList.pop_front();
void expandCluster(const kdTree::KdTreeNode &, kdTree::CandPairList &, reco::ClusterParameters &, size_t) const
the main routine for DBScan
std::list< reco::ClusterHit3D > HitPairList
void configure(const fhicl::ParameterSet &) override
Interface for configuring the particular algorithm tool.
bool m_enableMonitoring
Data members to follow.
The data type to uniquely identify a Plane.
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.
Cluster finding and building.
IClusterAlg interface class definiton.
unsigned int getStatusBits() const
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.
The data type to uniquely identify a TPC.
std::unique_ptr< lar_cluster3d::IClusterParametersBuilder > m_clusterBuilder
Common cluster builder tool.
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.
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.
float getTimeToExecute() const
"visited" by a clustering algorithm
std::vector< float > m_timeVector
void put_or_replace(std::string const &key)
KdTreeNode & BuildKdTree(Hit3DVec::iterator, Hit3DVec::iterator, KdTreeNodeList &, int depth=0) const
Given an input set of ClusterHit3D objects, build a kd tree structure.
Length_t WirePitch(PlaneID const &planeid=plane_zero) const
Returns the distance between two consecutive wires.
art framework interface to geometry description
std::list< ClusterParameters > ClusterParametersList
void addHit3D(const reco::ClusterHit3D *hit3D)
void setStatusBit(unsigned bits) const