LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Public Member Functions | |
ClusterMergeAlg (const fhicl::ParameterSet &) | |
Constructor. More... | |
~ClusterMergeAlg () | |
Destructor. More... | |
void | configure (fhicl::ParameterSet const &pset) override |
void | initializeHistograms (art::TFileDirectory &) override |
Interface for initializing histograms if they are desired Note that the idea is to put hisgtograms in a subfolder. More... | |
void | ModifyClusters (reco::ClusterParametersList &) const override |
Scan an input collection of clusters and modify those according to the specific implementing algorithm. More... | |
float | getTimeToExecute () const override |
If monitoring, recover the time to execute a particular function. More... | |
virtual void | configure (const fhicl::ParameterSet &)=0 |
Interface for configuring the particular algorithm tool. More... | |
Private Member Functions | |
bool | linearClusters (reco::ClusterParameters &, reco::ClusterParameters &) const |
bool | mergeClusters (reco::ClusterParameters &, reco::ClusterParameters &) const |
float | closestApproach (const Eigen::Vector3f &, const Eigen::Vector3f &, const Eigen::Vector3f &, const Eigen::Vector3f &, Eigen::Vector3f &, Eigen::Vector3f &, Eigen::Vector3f &) const |
const reco::ClusterHit3D * | findClosestHit3D (const Eigen::Vector3f &, const Eigen::Vector3f &, const reco::HitPairListPtr &) const |
const reco::ClusterHit3D * | findFurthestHit3D (const Eigen::Vector3f &, const Eigen::Vector3f &, const reco::HitPairListPtr &) const |
Private Attributes | |
bool | fEnableMonitoring |
Data members to follow. More... | |
float | fMinTransEigenVal |
Set a mininum allowed value for the transverse eigen values. More... | |
float | fMinEigenToProcess |
Don't look anymore at clusters below this size. More... | |
bool | fOutputHistograms |
Take the time to create and fill some histograms for diagnostics. More... | |
float | fTimeToProcess |
Keep track of how long it took to run this algorithm. More... | |
std::vector< TH1F * > | fFirstEigenValueHists |
First Cluster eigen value. More... | |
std::vector< TH1F * > | fNextEigenValueHists |
Next Cluster eigen value. More... | |
TH1F * | fNumMergedClusters |
How many clusters were merged? More... | |
TH1F * | f1stTo2ndPosLenHist |
Distance between cluster centers. More... | |
TH1F * | fRMaxFirstHist |
radius of "cylinder" first cluster More... | |
TH1F * | fCosMaxFirstHist |
Cos angle beteeen cylinder axis and edge. More... | |
TH1F * | fCosFirstAxisHist |
Cos angle between vector between centers and first axis. More... | |
TH1F * | f1stTo2ndProjEigenHist |
arc length along vector between centers from first center to cylinder More... | |
TH1F * | fRMaxNextHist |
radius of "cylinder" next cluster More... | |
TH1F * | fCosMaxNextHist |
Cos angle beteeen cylinder axis and edge. More... | |
TH1F * | fCosNextAxisHist |
Cos angle between vector between centers and next axis. More... | |
TH1F * | f2ndTo1stProjEigenHist |
arc length along vector between centers from next center to cylinder More... | |
TH1F * | fGapBetweenClusHist |
Gap between clusters. More... | |
TH1F * | fGapRatToLenHist |
Ratio of gap to distance between centers. More... | |
TH1F * | fProjEndPointLenHist |
Projection of vector between the endpoints. More... | |
TH1F * | fProjEndPointRatHist |
Ratio of projection to vector length. More... | |
TH1F * | fAxesDocaHist |
Closest distance between two primary axes. More... | |
TH1F * | f1stDocaArcLRatHist |
arc length to POCA for DOCA first cluster More... | |
TH1F * | f2ndDocaArcLRatHist |
arc length to POCA for DOCA second cluster More... | |
TH1F * | f1stTo2ndPosLenRatHist |
Ratio of distance between centers and first proj eigen. More... | |
TH1F * | fGapRatHist |
Ratio of gap and next proj eigen. More... | |
PrincipalComponentsAlg | fPCAAlg |
Definition at line 34 of file ClusterMergeAlg_tool.cc.
|
explicit |
Constructor.
pset |
lar_cluster3d::ClusterMergeAlg::~ClusterMergeAlg | ( | ) |
|
private |
Definition at line 606 of file ClusterMergeAlg_tool.cc.
References util::abs(), d, den, and e.
Referenced by getTimeToExecute(), and linearClusters().
|
pure virtualinherited |
Interface for configuring the particular algorithm tool.
ParameterSet | The input set of parameters for configuration |
|
override |
Definition at line 147 of file ClusterMergeAlg_tool.cc.
References dir, f1stDocaArcLRatHist, f1stTo2ndPosLenHist, f1stTo2ndPosLenRatHist, f1stTo2ndProjEigenHist, f2ndDocaArcLRatHist, f2ndTo1stProjEigenHist, fAxesDocaHist, fCosFirstAxisHist, fCosMaxFirstHist, fCosMaxNextHist, fCosNextAxisHist, fEnableMonitoring, fFirstEigenValueHists, fGapBetweenClusHist, fGapRatHist, fGapRatToLenHist, fMinEigenToProcess, fMinTransEigenVal, fNextEigenValueHists, fNumMergedClusters, fOutputHistograms, fProjEndPointLenHist, fProjEndPointRatHist, fRMaxFirstHist, fRMaxNextHist, fTimeToProcess, and fhicl::ParameterSet::get().
|
private |
Definition at line 648 of file ClusterMergeAlg_tool.cc.
Referenced by getTimeToExecute().
|
private |
Definition at line 669 of file ClusterMergeAlg_tool.cc.
References DEFINE_ART_CLASS_TOOL.
Referenced by getTimeToExecute().
|
inlineoverridevirtual |
If monitoring, recover the time to execute a particular function.
Implements lar_cluster3d::IClusterModAlg.
Definition at line 69 of file ClusterMergeAlg_tool.cc.
References closestApproach(), findClosestHit3D(), findFurthestHit3D(), fTimeToProcess, linearClusters(), and mergeClusters().
|
overridevirtual |
Interface for initializing histograms if they are desired Note that the idea is to put hisgtograms in a subfolder.
TFileDirectory | - the folder to store the hists in |
Implements lar_cluster3d::IClusterModAlg.
Definition at line 213 of file ClusterMergeAlg_tool.cc.
|
private |
Definition at line 338 of file ClusterMergeAlg_tool.cc.
References util::abs(), closestApproach(), geo::vect::dot(), f1stDocaArcLRatHist, f1stTo2ndPosLenHist, f1stTo2ndPosLenRatHist, f1stTo2ndProjEigenHist, f2ndDocaArcLRatHist, f2ndTo1stProjEigenHist, fAxesDocaHist, fCosFirstAxisHist, fCosMaxFirstHist, fCosMaxNextHist, fCosNextAxisHist, fGapBetweenClusHist, Fill(), fMinTransEigenVal, fNextEigenValueHists, fOutputHistograms, fProjEndPointLenHist, fProjEndPointRatHist, fRMaxFirstHist, fRMaxNextHist, reco::PrincipalComponents::getAvePosition(), reco::PrincipalComponents::getEigenValues(), reco::PrincipalComponents::getEigenVectors(), and reco::ClusterParameters::getFullPCA().
Referenced by getTimeToExecute(), and ModifyClusters().
|
private |
Definition at line 565 of file ClusterMergeAlg_tool.cc.
References fPCAAlg, reco::ClusterParameters::getFullPCA(), reco::ClusterParameters::getHit3DToEdgeMap(), reco::ClusterParameters::getHitPairListPtr(), reco::ClusterParameters::getSkeletonPCA(), reco::PrincipalComponents::getSvdOK(), lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_3D(), and reco::ClusterParameters::UpdateParameters().
Referenced by getTimeToExecute(), and ModifyClusters().
|
overridevirtual |
Scan an input collection of clusters and modify those according to the specific implementing algorithm.
clusterParametersList | A list of cluster objects (parameters from associated hits) |
Top level interface for algorithm to consider pairs of clusters from the input list and determine if they are consistent with each other and, therefore, should be merged. This is done by looking at the PCA for each cluster and looking at the projection of the primary axis along the vector connecting their centers.
Implements lar_cluster3d::IClusterModAlg.
Definition at line 218 of file ClusterMergeAlg_tool.cc.
References fEnableMonitoring, fFirstEigenValueHists, Fill(), fMinEigenToProcess, fMinTransEigenVal, fNumMergedClusters, fOutputHistograms, fTimeToProcess, reco::PrincipalComponents::getEigenValues(), reco::ClusterParameters::getFullPCA(), art::left(), linearClusters(), mergeClusters(), and art::right().
|
private |
arc length to POCA for DOCA first cluster
Definition at line 126 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Distance between cluster centers.
Definition at line 106 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Ratio of distance between centers and first proj eigen.
Definition at line 129 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
arc length along vector between centers from first center to cylinder
Definition at line 112 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
arc length to POCA for DOCA second cluster
Definition at line 127 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
arc length along vector between centers from next center to cylinder
Definition at line 118 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Closest distance between two primary axes.
Definition at line 125 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Cos angle between vector between centers and first axis.
Definition at line 110 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Cos angle beteeen cylinder axis and edge.
Definition at line 109 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Cos angle beteeen cylinder axis and edge.
Definition at line 115 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Cos angle between vector between centers and next axis.
Definition at line 116 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Data members to follow.
If true then turn on monitoring (e.g. timing)
Definition at line 95 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and ModifyClusters().
|
private |
First Cluster eigen value.
Definition at line 102 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and ModifyClusters().
|
private |
Gap between clusters.
Definition at line 120 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Ratio of gap and next proj eigen.
Definition at line 130 of file ClusterMergeAlg_tool.cc.
Referenced by configure().
|
private |
Ratio of gap to distance between centers.
Definition at line 121 of file ClusterMergeAlg_tool.cc.
Referenced by configure().
|
private |
Don't look anymore at clusters below this size.
Definition at line 97 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and ModifyClusters().
|
private |
Set a mininum allowed value for the transverse eigen values.
Definition at line 96 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), linearClusters(), and ModifyClusters().
|
private |
Next Cluster eigen value.
Definition at line 103 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
How many clusters were merged?
Definition at line 104 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and ModifyClusters().
|
private |
Take the time to create and fill some histograms for diagnostics.
Definition at line 98 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), linearClusters(), and ModifyClusters().
|
private |
Definition at line 132 of file ClusterMergeAlg_tool.cc.
Referenced by mergeClusters().
|
private |
Projection of vector between the endpoints.
Definition at line 122 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
Ratio of projection to vector length.
Definition at line 123 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
radius of "cylinder" first cluster
Definition at line 108 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
private |
radius of "cylinder" next cluster
Definition at line 114 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), and linearClusters().
|
mutableprivate |
Keep track of how long it took to run this algorithm.
Definition at line 100 of file ClusterMergeAlg_tool.cc.
Referenced by configure(), getTimeToExecute(), and ModifyClusters().