![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "MergeClusterAlg.h"
Public Member Functions | |
MergeClusterAlg (fhicl::ParameterSet const &pset) | |
void | FindClusterEndPoints (art::PtrVector< recob::Hit > const &cluster, TVector2 const ¢re, TVector2 const &direction, TVector2 &start, TVector2 &end) const |
double | FindClusterOverlap (TVector2 const &direction, TVector2 const ¢re, TVector2 const &start1, TVector2 const &end1, TVector2 const &start2, TVector2 const &end2) const |
double | FindCrossingDistance (TVector2 const &direction1, TVector2 const ¢re1, TVector2 const &direction2, TVector2 const ¢re2) const |
double | FindMinSeparation (art::PtrVector< recob::Hit > const &cluster1, art::PtrVector< recob::Hit > const &cluster2) const |
double | FindProjectedWidth (TVector2 const ¢re1, TVector2 const &start1, TVector2 const &end1, TVector2 const ¢re2, TVector2 const &start2, TVector2 const &end2) const |
double | GlobalWire (geo::WireID const &wireID) const |
TVector2 | HitCoordinates (art::Ptr< recob::Hit > const &hit) const |
int | MergeClusters (std::vector< art::PtrVector< recob::Hit >> const &planeClusters, std::vector< art::PtrVector< recob::Hit >> &clusters) const |
bool | PassCuts (double angle, double crossingDistance, double projectedWidth, double separation, double longLength) const |
Private Attributes | |
unsigned int | fMinMergeClusterSize |
double | fMaxMergeSeparation |
double | fProjWidthThreshold |
art::ServiceHandle< art::TFileService const > | tfs |
geo::WireReadoutGeom const * | fWireReadoutGeom |
std::map< int, int > | trueClusterMap |
TTree * | fTree |
double | fAngle |
double | fEigenvalue |
int | fCluster1Size |
int | fCluster2Size |
double | fLength1 |
double | fLength2 |
double | fSeparation |
double | fCrossingDistance |
double | fProjectedWidth |
double | fOverlap |
bool | fTrueMerge |
Definition at line 38 of file MergeClusterAlg.h.
cluster::MergeClusterAlg::MergeClusterAlg | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 19 of file MergeClusterAlg.cxx.
References fAngle, fCluster1Size, fCluster2Size, fCrossingDistance, fEigenvalue, fLength1, fLength2, fMaxMergeSeparation, fMinMergeClusterSize, fOverlap, fProjectedWidth, fProjWidthThreshold, fSeparation, fTree, fTrueMerge, Get, and tfs.
void cluster::MergeClusterAlg::FindClusterEndPoints | ( | art::PtrVector< recob::Hit > const & | cluster, |
TVector2 const & | centre, | ||
TVector2 const & | direction, | ||
TVector2 & | start, | ||
TVector2 & | end | ||
) | const |
Find estimates of cluster start/end points
Definition at line 39 of file MergeClusterAlg.cxx.
References HitCoordinates().
Referenced by MergeClusters().
double cluster::MergeClusterAlg::FindClusterOverlap | ( | TVector2 const & | direction, |
TVector2 const & | centre, | ||
TVector2 const & | start1, | ||
TVector2 const & | end1, | ||
TVector2 const & | start2, | ||
TVector2 const & | end2 | ||
) | const |
Calculates the overlap of the clusters on the line projected between them
Definition at line 60 of file MergeClusterAlg.cxx.
References tmp.
double cluster::MergeClusterAlg::FindCrossingDistance | ( | TVector2 const & | direction1, |
TVector2 const & | centre1, | ||
TVector2 const & | direction2, | ||
TVector2 const & | centre2 | ||
) | const |
Finds the distance between the crossing point of the lines and the closest line centre
Definition at line 97 of file MergeClusterAlg.cxx.
Referenced by MergeClusters().
double cluster::MergeClusterAlg::FindMinSeparation | ( | art::PtrVector< recob::Hit > const & | cluster1, |
art::PtrVector< recob::Hit > const & | cluster2 | ||
) | const |
Calculates the minimum separation between two clusters
Definition at line 114 of file MergeClusterAlg.cxx.
References HitCoordinates().
Referenced by MergeClusters().
double cluster::MergeClusterAlg::FindProjectedWidth | ( | TVector2 const & | centre1, |
TVector2 const & | start1, | ||
TVector2 const & | end1, | ||
TVector2 const & | centre2, | ||
TVector2 const & | start2, | ||
TVector2 const & | end2 | ||
) | const |
Projects clusters parallel to the line which runs through their centres and finds the minimum containing width
Definition at line 137 of file MergeClusterAlg.cxx.
Referenced by MergeClusters().
double cluster::MergeClusterAlg::GlobalWire | ( | geo::WireID const & | wireID | ) | const |
Find the global wire position
Definition at line 163 of file MergeClusterAlg.cxx.
References geo::CryostatID::Cryostat, fWireReadoutGeom, geo::WireGeo::GetCenter(), geo::kInduction, geo::WireReadoutGeom::Nwires(), geo::WireReadoutGeom::Plane(), geo::PlaneID::Plane, geo::WireReadoutGeom::SignalType(), geo::TPCID::TPC, geo::WireReadoutGeom::Wire(), geo::WireID::Wire, and geo::PlaneGeo::WireCoordinate().
Referenced by HitCoordinates().
TVector2 cluster::MergeClusterAlg::HitCoordinates | ( | art::Ptr< recob::Hit > const & | hit | ) | const |
Return the coordinates of this hit in global wire/tick space
Definition at line 176 of file MergeClusterAlg.cxx.
References GlobalWire(), recob::Hit::PeakTime(), and recob::Hit::WireID().
Referenced by FindClusterEndPoints(), FindMinSeparation(), and MergeClusters().
int cluster::MergeClusterAlg::MergeClusters | ( | std::vector< art::PtrVector< recob::Hit >> const & | planeClusters, |
std::vector< art::PtrVector< recob::Hit >> & | clusters | ||
) | const |
Merges clusters which lie along a straight line
Definition at line 182 of file MergeClusterAlg.cxx.
References art::PtrVector< T >::at(), FindClusterEndPoints(), FindCrossingDistance(), FindMinSeparation(), FindProjectedWidth(), fMaxMergeSeparation, fMinMergeClusterSize, HitCoordinates(), hits(), PassCuts(), and art::PtrVector< T >::size().
Referenced by cluster::BlurredClustering::produce().
bool cluster::MergeClusterAlg::PassCuts | ( | double | angle, |
double | crossingDistance, | ||
double | projectedWidth, | ||
double | separation, | ||
double | longLength | ||
) | const |
Boolean function which decides whether or not two clusters should be merged, depending on their properties
Definition at line 314 of file MergeClusterAlg.cxx.
References fProjWidthThreshold.
Referenced by MergeClusters().
|
private |
Definition at line 91 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 93 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 94 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 98 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 92 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 95 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 96 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 79 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg(), and MergeClusters().
|
private |
Definition at line 78 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg(), and MergeClusters().
|
private |
Definition at line 100 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 99 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 81 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg(), and PassCuts().
|
private |
Definition at line 97 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 90 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 101 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 85 of file MergeClusterAlg.h.
Referenced by GlobalWire().
|
private |
Definition at line 84 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 87 of file MergeClusterAlg.h.