LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "DBScanAlg.h"
Public Member Functions | |
DBScanAlg (fhicl::ParameterSet const &pset) | |
void | InitScan (const detinfo::DetectorClocksData &clockData, const detinfo::DetectorPropertiesData &detProp, const std::vector< art::Ptr< recob::Hit >> &allhits, std::set< uint32_t > badChannels, const std::vector< geo::WireID > &wireids=std::vector< geo::WireID >()) |
double | getSimilarity (const std::vector< double > v1, const std::vector< double > v2) |
std::vector< unsigned int > | findNeighbors (unsigned int pid, double threshold, double threshold2) |
void | computeSimilarity () |
void | run_cluster () |
double | getSimilarity2 (const std::vector< double > v1, const std::vector< double > v2) |
void | computeSimilarity2 () |
double | getWidthFactor (const std::vector< double > v1, const std::vector< double > v2) |
void | computeWidthFactor () |
Public Attributes | |
std::vector< std::vector< unsigned int > > | fclusters |
collection of something More... | |
std::vector< std::vector< double > > | fps |
the collection of points we are working on More... | |
std::vector< unsigned int > | fpointId_to_clusterId |
mapping point_id -> clusterId More... | |
std::vector< std::vector< double > > | fsim |
std::vector< std::vector< double > > | fsim2 |
std::vector< std::vector< double > > | fsim3 |
double | fMaxWidth |
RTree | fRTree |
std::vector< dbsPoint > | fRect |
Private Member Functions | |
void | run_dbscan_cluster () |
void | run_FN_cluster () |
void | run_FN_naive_cluster () |
bool | ExpandCluster (unsigned int point, unsigned int clusterID) |
std::set< unsigned int > | RegionQuery (unsigned int point) |
std::vector< unsigned int > | RegionQuery_vector (unsigned int point) |
Private Attributes | |
double | fEps |
double | fEps2 |
unsigned int | fMinPts |
unsigned int | fClusterMethod |
Which clustering method to use. More... | |
unsigned int | fDistanceMetric |
Which distance metric to use. More... | |
std::vector< bool > | fnoise |
std::vector< bool > | fvisited |
std::vector< double > | fWirePitch |
the pitch of the wires in each plane More... | |
std::set< uint32_t > | fBadChannels |
set of bad channels in this detector More... | |
std::vector< uint32_t > | fBadWireSum |
Definition at line 51 of file DBScanAlg.h.
|
explicit |
Definition at line 245 of file DBScanAlg.cxx.
References fhicl::ParameterSet::get().
void cluster::DBScanAlg::computeSimilarity | ( | ) |
Definition at line 469 of file DBScanAlg.cxx.
References util::size().
void cluster::DBScanAlg::computeSimilarity2 | ( | ) |
Definition at line 481 of file DBScanAlg.cxx.
References util::size().
void cluster::DBScanAlg::computeWidthFactor | ( | ) |
Definition at line 493 of file DBScanAlg.cxx.
References util::size().
|
private |
Definition at line 606 of file DBScanAlg.cxx.
References cluster::kNO_CLUSTER, cluster::kNOISE_CLUSTER, and tca::seeds.
std::vector< unsigned int > cluster::DBScanAlg::findNeighbors | ( | unsigned int | pid, |
double | threshold, | ||
double | threshold2 | ||
) |
Definition at line 451 of file DBScanAlg.cxx.
double cluster::DBScanAlg::getSimilarity | ( | const std::vector< double > | v1, |
const std::vector< double > | v2 | ||
) |
Definition at line 347 of file DBScanAlg.cxx.
References util::abs().
double cluster::DBScanAlg::getSimilarity2 | ( | const std::vector< double > | v1, |
const std::vector< double > | v2 | ||
) |
Definition at line 383 of file DBScanAlg.cxx.
References util::abs(), and e.
double cluster::DBScanAlg::getWidthFactor | ( | const std::vector< double > | v1, |
const std::vector< double > | v2 | ||
) |
Definition at line 422 of file DBScanAlg.cxx.
void cluster::DBScanAlg::InitScan | ( | const detinfo::DetectorClocksData & | clockData, |
const detinfo::DetectorPropertiesData & | detProp, | ||
const std::vector< art::Ptr< recob::Hit >> & | allhits, | ||
std::set< uint32_t > | badChannels, | ||
const std::vector< geo::WireID > & | wireids = std::vector<geo::WireID>() |
||
) |
get 2 first wires and find their spacing (wire_dist)
Definition at line 255 of file DBScanAlg.cxx.
References dbsPoint::bounds(), Visitor::count, detinfo::DetectorPropertiesData::DriftVelocity(), detinfo::DetectorPropertiesData::Efield(), geo::GeometryCore::Iterate(), cluster::kNO_CLUSTER, geo::GeometryCore::Nchannels(), detinfo::sampling_rate(), and detinfo::DetectorPropertiesData::Temperature().
Referenced by cluster::DBcluster::produce().
|
private |
Definition at line 570 of file DBScanAlg.cxx.
References dbsPoint::bounds(), and Visitor::sResult.
|
private |
Definition at line 585 of file DBScanAlg.cxx.
References dbsPoint::bounds(), and Visitor::vResult.
void cluster::DBScanAlg::run_cluster | ( | ) |
Definition at line 509 of file DBScanAlg.cxx.
Referenced by cluster::DBcluster::produce().
|
private |
Definition at line 527 of file DBScanAlg.cxx.
References cluster::kNO_CLUSTER, cluster::kNOISE_CLUSTER, noise(), and dbsPoint::y.
|
private |
Definition at line 650 of file DBScanAlg.cxx.
References cluster::kNO_CLUSTER, noise(), and dbsPoint::y.
|
private |
Definition at line 727 of file DBScanAlg.cxx.
References cluster::kNO_CLUSTER, noise(), and dbsPoint::y.
|
private |
set of bad channels in this detector
Definition at line 97 of file DBScanAlg.h.
|
private |
running total of bad channels. Used for fast intervening dead wire counting ala fBadChannelSum[m]-fBadChannelSum[n].
Definition at line 98 of file DBScanAlg.h.
|
private |
Which clustering method to use.
Definition at line 90 of file DBScanAlg.h.
std::vector<std::vector<unsigned int> > cluster::DBScanAlg::fclusters |
collection of something
Definition at line 70 of file DBScanAlg.h.
Referenced by cluster::DBcluster::produce().
|
private |
Which distance metric to use.
Definition at line 91 of file DBScanAlg.h.
|
private |
Definition at line 85 of file DBScanAlg.h.
|
private |
Definition at line 86 of file DBScanAlg.h.
double cluster::DBScanAlg::fMaxWidth |
Definition at line 76 of file DBScanAlg.h.
|
private |
Definition at line 88 of file DBScanAlg.h.
|
private |
Definition at line 94 of file DBScanAlg.h.
std::vector<unsigned int> cluster::DBScanAlg::fpointId_to_clusterId |
mapping point_id -> clusterId
Definition at line 72 of file DBScanAlg.h.
Referenced by cluster::DBcluster::produce().
std::vector<std::vector<double> > cluster::DBScanAlg::fps |
the collection of points we are working on
Definition at line 71 of file DBScanAlg.h.
Referenced by cluster::DBcluster::produce().
std::vector<dbsPoint> cluster::DBScanAlg::fRect |
Definition at line 79 of file DBScanAlg.h.
RTree cluster::DBScanAlg::fRTree |
Definition at line 78 of file DBScanAlg.h.
std::vector<std::vector<double> > cluster::DBScanAlg::fsim |
Definition at line 73 of file DBScanAlg.h.
std::vector<std::vector<double> > cluster::DBScanAlg::fsim2 |
Definition at line 74 of file DBScanAlg.h.
std::vector<std::vector<double> > cluster::DBScanAlg::fsim3 |
Definition at line 75 of file DBScanAlg.h.
|
private |
Definition at line 95 of file DBScanAlg.h.
|
private |
the pitch of the wires in each plane
Definition at line 96 of file DBScanAlg.h.