LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "fuzzyClusterAlg.h"
Classes | |
class | baseCluster |
This stores information about a cluster. More... | |
class | showerCluster |
This stores information about a showerlike cluster. More... | |
class | trackCluster |
This stores information about a tracklike cluster. More... | |
Public Member Functions | |
fuzzyClusterAlg (fhicl::ParameterSet const &pset) | |
virtual | ~fuzzyClusterAlg () |
void | reconfigure (fhicl::ParameterSet const &p) |
void | InitFuzzy (std::vector< art::Ptr< recob::Hit > > &allhits, std::set< uint32_t > badChannels) |
void | run_fuzzy_cluster (const std::vector< art::Ptr< recob::Hit > > &allhits) |
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 |
std::vector< std::vector< double > > | data |
Private Member Functions | |
void | mergeHoughLinesBySegment (unsigned int k, std::vector< protoTrack > *protoTracks, double xyScale, int mergeStyle, double wire_dist, double tickToDist) |
bool | mergeTrackClusters (unsigned int k, std::vector< trackCluster > *trackClusters, double xyScale, double wire_dist, double tickToDist) |
bool | mergeShowerClusters (unsigned int k, std::vector< showerCluster > *showerClusters, double xyScale, double wire_dist, double tickToDist) |
bool | mergeShowerTrackClusters (showerCluster *showerClusterI, trackCluster *trackClusterJ, double xyScale, double wire_dist, double tickToDist) |
double | HoughLineDistance (double p0MinLine1, double p1MinLine1, double p0MaxLine1, double p1MaxLine1, double p0MinLine2, double p1MinLine2, double p0MaxLine2, double p1MaxLine2) |
bool | HoughLineIntersect (double x11, double y11, double x12, double y12, double x21, double y21, double x22, double y22) |
double | PointSegmentDistance (double px, double py, double x1, double y1, double x2, double y2) |
double | DistanceBetweenHits (art::Ptr< recob::Hit > hit0, art::Ptr< recob::Hit > hit1, double wire_dist, double tickToDist) |
Private Attributes | |
double | fNumberTimeBoundaries |
Number of boundaries in ticks for the drift window to be divided up to make the Hough line finder easier on memory. More... | |
double | fNumberWireBoundaries |
Number of boundaries in wires for the drift window to be divided up to make the Hough line finder easier on memory. More... | |
bool | fRunHough |
bool | fGenerateHoughLinesOnly |
Show only the results of the Hough line finder, hits not in a line will not be clustered. More... | |
bool | fDoFuzzyRemnantMerge |
Tell the algorithm to merge fuzzy cluster remnants into showers or tracks (0-off, 1-on) More... | |
double | fFuzzyRemnantMergeCutoff |
cut off on merging the fuzzy cluster remnants into the nearest shower or track More... | |
bool | fDoTrackClusterMerge |
Turn on cut on product of charge asymmetry and sin of angle between slopes of lines. More... | |
double | fTrackClusterMergeCutoff |
Max distance between Hough lines before two lines are merged (muon tracks),. More... | |
double | fChargeAsymAngleCut |
Cut on product of charge asymmetry and sin of angle between slopes of lines. More... | |
double | fSigmaChargeAsymAngleCut |
Cut on product of charge asymmetry and sin of angle between slopes of lines. More... | |
bool | fDoShowerClusterMerge |
Turns on shower Hough line merging (0-off, 1-on) More... | |
double | fShowerClusterMergeAngle |
Max angle between slopes before two lines are merged, for lines in shower line regions. More... | |
double | fShowerClusterMergeCutoff |
Max distance between Hough lines before two lines are merged (electron showers),. More... | |
bool | fDoShowerTrackClusterMerge |
Turn on cut on product of charge asymmetry and sin of angle between slopes of lines. More... | |
double | fShowerTrackClusterMergeCutoff |
Max distance between Hough lines before two lines are merged (electron showers),. More... | |
double | fShowerTrackClusterMergeAngle |
Max angle between slopes before two lines are merged, for lines in shower line regions. More... | |
double | fShowerLikenessCut |
Cut on shower likeness (larger the more shower like, smaller the less shower like) More... | |
int | fMaxVertexLines |
Max number of line end points allowed in a Hough line merge region for a merge to happen. More... | |
double | fVertexLinesCutoff |
Size of the vertex region to count up lines for fMaxVertexLines. 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 |
HoughBaseAlg | fHBAlg |
DBScanAlg | fDBScan |
art::ServiceHandle< geo::Geometry > | fGeom |
handle to geometry service More... | |
Definition at line 26 of file fuzzyClusterAlg.h.
cluster::fuzzyClusterAlg::fuzzyClusterAlg | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 112 of file fuzzyClusterAlg.cxx.
References reconfigure().
|
virtual |
Definition at line 121 of file fuzzyClusterAlg.cxx.
|
private |
Definition at line 1410 of file fuzzyClusterAlg.cxx.
References recob::Hit::Channel(), norm, and recob::Hit::PeakTime().
Referenced by mergeShowerClusters(), mergeShowerTrackClusters(), and mergeTrackClusters().
|
private |
Definition at line 1431 of file fuzzyClusterAlg.cxx.
References HoughLineIntersect(), and PointSegmentDistance().
Referenced by mergeShowerClusters(), mergeShowerTrackClusters(), and mergeTrackClusters().
|
private |
Definition at line 1473 of file fuzzyClusterAlg.cxx.
References s.
Referenced by HoughLineDistance().
void cluster::fuzzyClusterAlg::InitFuzzy | ( | std::vector< art::Ptr< recob::Hit > > & | allhits, |
std::set< uint32_t > | badChannels | ||
) |
Definition at line 154 of file fuzzyClusterAlg.cxx.
References geo::GeometryCore::Cryostat(), detinfo::DetectorProperties::DriftVelocity(), detinfo::DetectorProperties::Efield(), fBadChannels, fBadWireSum, fclusters, fMaxWidth, fnoise, fpointId_to_clusterId, fps, fsim, fsim2, fsim3, fvisited, fWirePitch, detinfo::DetectorProperties::SamplingRate(), detinfo::DetectorProperties::Temperature(), and geo::CryostatGeo::TPC().
Referenced by cluster::fuzzyCluster::produce().
|
private |
|
private |
Definition at line 1212 of file fuzzyClusterAlg.cxx.
References DistanceBetweenHits(), fShowerClusterMergeAngle, fShowerClusterMergeCutoff, HoughLineDistance(), and norm.
Referenced by run_fuzzy_cluster().
|
private |
Definition at line 588 of file fuzzyClusterAlg.cxx.
References cluster::fuzzyClusterAlg::baseCluster::addProtoTracks(), cluster::fuzzyClusterAlg::baseCluster::clearProtoTracks(), cluster::fuzzyClusterAlg::baseCluster::clusterProtoTracks, DistanceBetweenHits(), fMaxVertexLines, fShowerTrackClusterMergeAngle, fShowerTrackClusterMergeCutoff, fVertexLinesCutoff, HoughLineDistance(), and norm.
Referenced by run_fuzzy_cluster().
|
private |
Definition at line 845 of file fuzzyClusterAlg.cxx.
References DistanceBetweenHits(), fChargeAsymAngleCut, fMaxVertexLines, fSigmaChargeAsymAngleCut, fTrackClusterMergeCutoff, fVertexLinesCutoff, HoughLineDistance(), norm, and geo::sqr().
Referenced by run_fuzzy_cluster().
|
private |
Definition at line 1504 of file fuzzyClusterAlg.cxx.
References norm, x1, x2, y1, and y2.
Referenced by HoughLineDistance(), and run_fuzzy_cluster().
void cluster::fuzzyClusterAlg::reconfigure | ( | fhicl::ParameterSet const & | p | ) |
Definition at line 126 of file fuzzyClusterAlg.cxx.
References fChargeAsymAngleCut, fDBScan, fDoFuzzyRemnantMerge, fDoShowerClusterMerge, fDoShowerTrackClusterMerge, fDoTrackClusterMerge, fFuzzyRemnantMergeCutoff, fGenerateHoughLinesOnly, fHBAlg, fMaxVertexLines, fNumberTimeBoundaries, fNumberWireBoundaries, fRunHough, fShowerClusterMergeAngle, fShowerClusterMergeCutoff, fShowerLikenessCut, fShowerTrackClusterMergeAngle, fShowerTrackClusterMergeCutoff, fSigmaChargeAsymAngleCut, fTrackClusterMergeCutoff, fVertexLinesCutoff, fhicl::ParameterSet::get(), cluster::DBScanAlg::reconfigure(), and cluster::HoughBaseAlg::reconfigure().
Referenced by fuzzyClusterAlg(), and cluster::fuzzyCluster::reconfigure().
void cluster::fuzzyClusterAlg::run_fuzzy_cluster | ( | const std::vector< art::Ptr< recob::Hit > > & | allhits | ) |
Veto the hit if it already belongs to a line, proto tracks (Hough lines) are added after the fuzzy clusters
Sum up background hits, use smart distance
end loop over hits
end loop over lines found
Definition at line 217 of file fuzzyClusterAlg.cxx.
References d, detinfo::DetectorProperties::DriftVelocity(), detinfo::DetectorProperties::Efield(), fclusters, fDoFuzzyRemnantMerge, fDoShowerClusterMerge, fDoShowerTrackClusterMerge, fDoTrackClusterMerge, fFuzzyRemnantMergeCutoff, fGenerateHoughLinesOnly, fHBAlg, fnoise, fNumberTimeBoundaries, fNumberWireBoundaries, fpointId_to_clusterId, fps, fRunHough, fShowerLikenessCut, fvisited, fWirePitch, geo::kInduction, cluster::kNO_CLUSTER, cluster::kNOISE_CLUSTER, LOG_DEBUG, mergeShowerClusters(), mergeShowerTrackClusters(), mergeTrackClusters(), noise(), norm, geo::GeometryCore::Nwires(), PointSegmentDistance(), detinfo::DetectorProperties::ReadOutWindowSize(), detinfo::DetectorProperties::SamplingRate(), geo::GeometryCore::SignalType(), geo::sqr(), detinfo::DetectorProperties::Temperature(), cluster::HoughBaseAlg::Transform(), and y.
Referenced by cluster::fuzzyCluster::produce().
std::vector<std::vector<double> > cluster::fuzzyClusterAlg::data |
Definition at line 53 of file fuzzyClusterAlg.h.
|
private |
set of bad channels in this detector
Definition at line 159 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy().
|
private |
running total of bad channels. Used for fast intervening dead wire counting ala fBadChannelSum[m]-fBadChannelSum[n].
Definition at line 160 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy().
|
private |
Cut on product of charge asymmetry and sin of angle between slopes of lines.
Definition at line 78 of file fuzzyClusterAlg.h.
Referenced by mergeTrackClusters(), and reconfigure().
std::vector<std::vector<unsigned int> > cluster::fuzzyClusterAlg::fclusters |
collection of something
Definition at line 39 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy(), cluster::fuzzyCluster::produce(), and run_fuzzy_cluster().
|
private |
Definition at line 173 of file fuzzyClusterAlg.h.
Referenced by reconfigure().
|
private |
Tell the algorithm to merge fuzzy cluster remnants into showers or tracks (0-off, 1-on)
Definition at line 73 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Turns on shower Hough line merging (0-off, 1-on)
Definition at line 81 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Turn on cut on product of charge asymmetry and sin of angle between slopes of lines.
Definition at line 85 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Turn on cut on product of charge asymmetry and sin of angle between slopes of lines.
Definition at line 76 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
cut off on merging the fuzzy cluster remnants into the nearest shower or track
Definition at line 74 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Show only the results of the Hough line finder, hits not in a line will not be clustered.
Definition at line 71 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
handle to geometry service
Definition at line 175 of file fuzzyClusterAlg.h.
|
private |
Definition at line 170 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Max number of line end points allowed in a Hough line merge region for a merge to happen.
Definition at line 91 of file fuzzyClusterAlg.h.
Referenced by mergeShowerTrackClusters(), mergeTrackClusters(), and reconfigure().
double cluster::fuzzyClusterAlg::fMaxWidth |
Definition at line 45 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy().
|
private |
Definition at line 156 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy(), and run_fuzzy_cluster().
|
private |
Number of boundaries in ticks for the drift window to be divided up to make the Hough line finder easier on memory.
Definition at line 63 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Number of boundaries in wires for the drift window to be divided up to make the Hough line finder easier on memory.
Definition at line 67 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
std::vector<unsigned int> cluster::fuzzyClusterAlg::fpointId_to_clusterId |
mapping point_id -> clusterId
Definition at line 41 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy(), cluster::fuzzyCluster::produce(), and run_fuzzy_cluster().
std::vector<std::vector<double> > cluster::fuzzyClusterAlg::fps |
the collection of points we are working on
Definition at line 40 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy(), cluster::fuzzyCluster::produce(), and run_fuzzy_cluster().
|
private |
Definition at line 70 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Max angle between slopes before two lines are merged, for lines in shower line regions.
Definition at line 82 of file fuzzyClusterAlg.h.
Referenced by mergeShowerClusters(), and reconfigure().
|
private |
Max distance between Hough lines before two lines are merged (electron showers),.
Definition at line 83 of file fuzzyClusterAlg.h.
Referenced by mergeShowerClusters(), and reconfigure().
|
private |
Cut on shower likeness (larger the more shower like, smaller the less shower like)
Definition at line 89 of file fuzzyClusterAlg.h.
Referenced by reconfigure(), and run_fuzzy_cluster().
|
private |
Max angle between slopes before two lines are merged, for lines in shower line regions.
Definition at line 87 of file fuzzyClusterAlg.h.
Referenced by mergeShowerTrackClusters(), and reconfigure().
|
private |
Max distance between Hough lines before two lines are merged (electron showers),.
Definition at line 86 of file fuzzyClusterAlg.h.
Referenced by mergeShowerTrackClusters(), and reconfigure().
|
private |
Cut on product of charge asymmetry and sin of angle between slopes of lines.
Definition at line 79 of file fuzzyClusterAlg.h.
Referenced by mergeTrackClusters(), and reconfigure().
std::vector<std::vector<double> > cluster::fuzzyClusterAlg::fsim |
Definition at line 42 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy().
std::vector<std::vector<double> > cluster::fuzzyClusterAlg::fsim2 |
Definition at line 43 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy().
std::vector<std::vector<double> > cluster::fuzzyClusterAlg::fsim3 |
Definition at line 44 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy().
|
private |
Max distance between Hough lines before two lines are merged (muon tracks),.
Definition at line 77 of file fuzzyClusterAlg.h.
Referenced by mergeTrackClusters(), and reconfigure().
|
private |
Size of the vertex region to count up lines for fMaxVertexLines.
Definition at line 92 of file fuzzyClusterAlg.h.
Referenced by mergeShowerTrackClusters(), mergeTrackClusters(), and reconfigure().
|
private |
Definition at line 157 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy(), and run_fuzzy_cluster().
|
private |
the pitch of the wires in each plane
Definition at line 158 of file fuzzyClusterAlg.h.
Referenced by InitFuzzy(), and run_fuzzy_cluster().