LArSoft
v09_90_00
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 |
void | reconfigure (fhicl::ParameterSet const &p) |
bool | PassCuts (double angle, double crossingDistance, double projectedWidth, double separation, double longLength) const |
Private Attributes | |
unsigned int | fMinMergeClusterSize |
double | fMaxMergeSeparation |
double | fProjWidthThreshold |
art::ServiceHandle< geo::Geometry const > | fGeom |
art::ServiceHandle< art::TFileService const > | tfs |
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 40 of file MergeClusterAlg.h.
cluster::MergeClusterAlg::MergeClusterAlg | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 18 of file MergeClusterAlg.cxx.
References fAngle, fCluster1Size, fCluster2Size, fCrossingDistance, fEigenvalue, fLength1, fLength2, fOverlap, fProjectedWidth, fSeparation, fTree, fTrueMerge, reconfigure(), 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 35 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 98 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 118 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 142 of file MergeClusterAlg.cxx.
Referenced by MergeClusters().
double cluster::MergeClusterAlg::GlobalWire | ( | geo::WireID const & | wireID | ) | const |
Find the global wire position
Definition at line 171 of file MergeClusterAlg.cxx.
References geo::CryostatID::Cryostat, fGeom, geo::WireGeo::GetCenter(), geo::kInduction, geo::GeometryCore::Nwires(), geo::PlaneID::Plane, geo::GeometryCore::SignalType(), geo::TPCID::TPC, geo::WireID::Wire, geo::GeometryCore::WireCoordinate(), and geo::GeometryCore::WireIDToWireGeo().
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 184 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 191 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 323 of file MergeClusterAlg.cxx.
References fProjWidthThreshold.
Referenced by MergeClusters().
void cluster::MergeClusterAlg::reconfigure | ( | fhicl::ParameterSet const & | p | ) |
Definition at line 345 of file MergeClusterAlg.cxx.
References fMaxMergeSeparation, fMinMergeClusterSize, fProjWidthThreshold, and fhicl::ParameterSet::get().
Referenced by MergeClusterAlg().
|
private |
Definition at line 94 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 96 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 97 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 101 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 95 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 87 of file MergeClusterAlg.h.
Referenced by GlobalWire().
|
private |
Definition at line 98 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 99 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 82 of file MergeClusterAlg.h.
Referenced by MergeClusters(), and reconfigure().
|
private |
Definition at line 81 of file MergeClusterAlg.h.
Referenced by MergeClusters(), and reconfigure().
|
private |
Definition at line 103 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 102 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 84 of file MergeClusterAlg.h.
Referenced by PassCuts(), and reconfigure().
|
private |
Definition at line 100 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 93 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 104 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 88 of file MergeClusterAlg.h.
Referenced by MergeClusterAlg().
|
private |
Definition at line 90 of file MergeClusterAlg.h.