122 std::vector<float> wirePitchVec(3,0.);
124 wirePitchVec[0] = geometry->
WirePitch(0);
125 wirePitchVec[1] = geometry->
WirePitch(1);
126 wirePitchVec[2] = geometry->
WirePitch(2);
128 float maxBestDist = 1.99 * *std::max_element(wirePitchVec.begin(),wirePitchVec.end());
130 kdTreeParams.
put_or_replace<
float>(
"RefLeafBestDist", maxBestDist);
158 for(
const auto&
hit : hitPairList)
193 theClockDBScan.
stop();
208 theClockBuildClusters.
stop();
213 mf::LogDebug(
"Cluster3D") <<
">>>>> DBScan done, found " << clusterParametersList.size() <<
" clusters" <<
std::endl;
241 for(
const auto&
hit : hitPairList)
276 theClockDBScan.
stop();
291 theClockBuildClusters.
stop();
296 mf::LogDebug(
"Cluster3D") <<
">>>>> DBScan done, found " << clusterParametersList.size() <<
" clusters" <<
std::endl;
309 while(!candPairList.empty())
327 if (neighborCandPairList.size() >= minPts)
329 std::copy(neighborCandPairList.begin(),neighborCandPairList.end(),std::back_inserter(candPairList));
340 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.
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
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
art framework interface to geometry description
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.
static int max(int a, int b)
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.
double accumulated_real_time() const
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.
std::list< ClusterParameters > ClusterParametersList
QTextStream & endl(QTextStream &s)
void addHit3D(const reco::ClusterHit3D *hit3D)
void setStatusBit(unsigned bits) const