LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
CrossGapsAssociationAlgorithm class. More...
#include "CrossGapsAssociationAlgorithm.h"
Public Member Functions | |
CrossGapsAssociationAlgorithm () | |
Default constructor. More... | |
Protected Types | |
typedef std::unordered_map< const pandora::Cluster *, ClusterAssociation > | ClusterAssociationMap |
Protected Member Functions | |
virtual pandora::StatusCode | Run () |
Private Member Functions | |
void | GetListOfCleanClusters (const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const |
Populate cluster vector with subset of cluster list, containing clusters judged to be clean. More... | |
void | PopulateClusterAssociationMap (const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const |
Populate the cluster association map. More... | |
bool | IsExtremalCluster (const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const |
Determine which of two clusters is extremal. More... | |
bool | AreClustersAssociated (const TwoDSlidingFitResult &innerFitResult, const TwoDSlidingFitResult &outerFitResult) const |
Determine whether two clusters are associated. More... | |
bool | IsAssociated (const pandora::CartesianVector &startPosition, const pandora::CartesianVector &startDirection, const TwoDSlidingFitResult &targetFitResult) const |
Sample points along the extrapolation from a starting position to a target fit result to declare cluster association. More... | |
bool | IsNearCluster (const pandora::CartesianVector &samplingPoint, const TwoDSlidingFitResult &targetFitResult) const |
Whether a sampling point lies near a target 2d sliding fit result. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
unsigned int | m_minClusterHits |
The minimum allowed number of hits in a clean cluster. More... | |
unsigned int | m_minClusterLayers |
The minimum allowed number of layers for a clean cluster. More... | |
unsigned int | m_slidingFitWindow |
The layer window for the sliding linear fits. More... | |
unsigned int | m_maxSamplingPoints |
The maximum number of extension sampling points considered per association check. More... | |
float | m_sampleStepSize |
The sampling step size used in association checks, units cm. More... | |
unsigned int | m_maxUnmatchedSampleRun |
The maximum run of unmatched (and non-gap) samples to consider before stopping. More... | |
float | m_maxOnClusterDistance |
The maximum distance between a sampling point and sliding fit to target cluster. More... | |
unsigned int | m_minMatchedSamplingPoints |
Minimum number of matched sampling points to declare association. More... | |
float | m_minMatchedSamplingFraction |
Minimum ratio between matched sampling points and expectation to declare association. More... | |
float | m_gapTolerance |
The tolerance to use when querying whether a sampling point is in a gap, units cm. More... | |
CrossGapsAssociationAlgorithm class.
Definition at line 23 of file CrossGapsAssociationAlgorithm.h.
|
protectedinherited |
Definition at line 43 of file ClusterAssociationAlgorithm.h.
lar_content::CrossGapsAssociationAlgorithm::CrossGapsAssociationAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file CrossGapsAssociationAlgorithm.cc.
|
private |
Determine whether two clusters are associated.
innerFitResult | two dimensional sliding fit result for the inner cluster |
outerFitResult | two dimensional sliding fit result for the outer cluster |
Definition at line 124 of file CrossGapsAssociationAlgorithm.cc.
References lar_content::TwoDSlidingFitResult::GetCluster(), lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerDirection(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerPosition(), and IsAssociated().
Referenced by PopulateClusterAssociationMap().
|
privatevirtual |
Populate cluster vector with subset of cluster list, containing clusters judged to be clean.
pClusterList | address of the cluster list |
clusterVector | to receive the populated cluster vector |
Implements lar_content::ClusterAssociationAlgorithm.
Definition at line 37 of file CrossGapsAssociationAlgorithm.cc.
References m_minClusterHits, m_minClusterLayers, and lar_content::LArClusterHelper::SortByInnerLayer().
|
private |
Sample points along the extrapolation from a starting position to a target fit result to declare cluster association.
startPosition | the start position |
startDirection | the start direction |
targetFitResult | the target fit result |
Definition at line 138 of file CrossGapsAssociationAlgorithm.cc.
References f, lar_content::TwoDSlidingFitResult::GetCluster(), lar_content::LArClusterHelper::GetClusterHitType(), lar_content::TwoDSlidingFitResult::GetGlobalMaxLayerPosition(), lar_content::TwoDSlidingFitResult::GetGlobalMinLayerPosition(), lar_content::LArGeometryHelper::GetWirePitchRatio(), lar_content::LArGeometryHelper::IsInGap(), IsNearCluster(), m_gapTolerance, m_maxSamplingPoints, m_maxUnmatchedSampleRun, m_minMatchedSamplingFraction, m_minMatchedSamplingPoints, and m_sampleStepSize.
Referenced by AreClustersAssociated().
|
privatevirtual |
Determine which of two clusters is extremal.
isForward | whether propagation direction is forward |
pCurrentCluster | current extremal cluster |
pTestCluster | potential extremal cluster |
Implements lar_content::ClusterAssociationAlgorithm.
Definition at line 108 of file CrossGapsAssociationAlgorithm.cc.
References lar_content::LArClusterHelper::SortByNHits().
|
private |
Whether a sampling point lies near a target 2d sliding fit result.
samplingPoint | the sampling point |
targetFitResult | the target fit result |
Definition at line 181 of file CrossGapsAssociationAlgorithm.cc.
References f, lar_content::TwoDSlidingFitResult::GetCluster(), lar_content::LArClusterHelper::GetClusterHitType(), lar_content::TwoDSlidingFitResult::GetGlobalFitPosition(), lar_content::TwoDSlidingFitResult::GetGlobalFitPositionAtX(), lar_content::TwoDSlidingFitResult::GetLocalPosition(), lar_content::LArGeometryHelper::GetWirePitchRatio(), and m_maxOnClusterDistance.
Referenced by IsAssociated().
|
privatevirtual |
Populate the cluster association map.
clusterVector | the cluster vector |
clusterAssociationMap | to receive the populated cluster association map |
Implements lar_content::ClusterAssociationAlgorithm.
Definition at line 59 of file CrossGapsAssociationAlgorithm.cc.
References AreClustersAssociated(), lar_content::LArClusterHelper::GetClusterHitType(), lar_content::LArGeometryHelper::GetWirePitch(), and m_slidingFitWindow.
|
privatevirtual |
Reimplemented from lar_content::ClusterAssociationAlgorithm.
Definition at line 211 of file CrossGapsAssociationAlgorithm.cc.
References m_gapTolerance, m_maxOnClusterDistance, m_maxSamplingPoints, m_maxUnmatchedSampleRun, m_minClusterHits, m_minClusterLayers, m_minMatchedSamplingFraction, m_minMatchedSamplingPoints, m_sampleStepSize, m_slidingFitWindow, and lar_content::ClusterAssociationAlgorithm::ReadSettings().
|
protectedvirtualinherited |
Definition at line 28 of file ClusterAssociationAlgorithm.cc.
References lar_content::ClusterAssociationAlgorithm::AmbiguousPropagation(), lar_content::ClusterAssociationAlgorithm::GetListOfCleanClusters(), lar_content::ClusterAssociationAlgorithm::m_mergeMade, lar_content::ClusterAssociationAlgorithm::m_resolveAmbiguousAssociations, lar_content::ClusterAssociationAlgorithm::PopulateClusterAssociationMap(), and lar_content::ClusterAssociationAlgorithm::UnambiguousPropagation().
|
private |
The tolerance to use when querying whether a sampling point is in a gap, units cm.
Definition at line 79 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsAssociated(), and ReadSettings().
|
private |
The maximum distance between a sampling point and sliding fit to target cluster.
Definition at line 76 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsNearCluster(), and ReadSettings().
|
private |
The maximum number of extension sampling points considered per association check.
Definition at line 73 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsAssociated(), and ReadSettings().
|
private |
The maximum run of unmatched (and non-gap) samples to consider before stopping.
Definition at line 75 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsAssociated(), and ReadSettings().
|
private |
The minimum allowed number of hits in a clean cluster.
Definition at line 70 of file CrossGapsAssociationAlgorithm.h.
Referenced by GetListOfCleanClusters(), and ReadSettings().
|
private |
The minimum allowed number of layers for a clean cluster.
Definition at line 71 of file CrossGapsAssociationAlgorithm.h.
Referenced by GetListOfCleanClusters(), and ReadSettings().
|
private |
Minimum ratio between matched sampling points and expectation to declare association.
Definition at line 78 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsAssociated(), and ReadSettings().
|
private |
Minimum number of matched sampling points to declare association.
Definition at line 77 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsAssociated(), and ReadSettings().
|
private |
The sampling step size used in association checks, units cm.
Definition at line 74 of file CrossGapsAssociationAlgorithm.h.
Referenced by IsAssociated(), and ReadSettings().
|
private |
The layer window for the sliding linear fits.
Definition at line 72 of file CrossGapsAssociationAlgorithm.h.
Referenced by PopulateClusterAssociationMap(), and ReadSettings().