![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
BoundedRegionClusterMergingAlgorithm class. More...
#include "BoundedRegionClusterMergingAlgorithm.h"
Public Member Functions | |
BoundedRegionClusterMergingAlgorithm () | |
Protected Types | |
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterList > | ClusterMergeMap |
Protected Member Functions | |
virtual pandora::StatusCode | Run () |
virtual pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
void | GetListOfBoundedRegionClusters (const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const |
Populate cluster vector with all clusters starting in the defined region. More... | |
bool | AreClustersAssociated (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const |
Compare two clusters and decide if they should be associated with each other. More... | |
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 | PopulateClusterMergeMap (const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const |
Form associations between pointing clusters. More... | |
void | MergeClusters (pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const |
Merge associated clusters. More... | |
void | CollectAssociatedClusters (const pandora::Cluster *const pSeedCluster, const ClusterMergeMap &clusterMergeMap, pandora::ClusterList &associatedClusterList) const |
Collect up all clusters associations related to a given seed cluster. More... | |
void | CollectAssociatedClusters (const pandora::Cluster *const pSeedCluster, const pandora::Cluster *const pCurrentCluster, const ClusterMergeMap &clusterMergeMap, const pandora::ClusterSet &clusterVetoList, pandora::ClusterList &associatedClusterList) const |
Collect up all clusters associations related to a given seed cluster. More... | |
void | GetSortedListOfCleanClusters (const pandora::ClusterVector &inputClusters, pandora::ClusterVector &outputClusters) const |
Sort the selected clusters, so that they have a well-defined ordering. More... | |
Protected Attributes | |
std::string | m_inputClusterListName |
The name of the input cluster list. If not specified, will access current list. More... | |
Private Attributes | |
float | m_xRegionMin |
Minimum x value of the bounded region box. More... | |
float | m_xRegionMax |
Maximum x value of the bounded region box. More... | |
float | m_zRegionMin |
Minimum z value (wire dimension) of the bounded region box. More... | |
float | m_zRegionMax |
Maximum z value (wire dimension) of the bounded region box. More... | |
float | m_maxDistance |
Maximum distance below which clusters can be associated. More... | |
unsigned int | m_minClusterHits |
Threshold on the size of clusters to be considered for merging. More... | |
BoundedRegionClusterMergingAlgorithm class.
Definition at line 22 of file BoundedRegionClusterMergingAlgorithm.h.
|
protected |
Definition at line 31 of file BoundedRegionClusterMergingAlgorithm.h.
lar_content::BoundedRegionClusterMergingAlgorithm::BoundedRegionClusterMergingAlgorithm | ( | ) |
Definition at line 20 of file BoundedRegionClusterMergingAlgorithm.cc.
|
protected |
Compare two clusters and decide if they should be associated with each other.
pCluster1 | pointer to the first cluster |
pCluster2 | pointer to the second cluster |
Definition at line 125 of file BoundedRegionClusterMergingAlgorithm.cc.
References lar_content::LArClusterHelper::GetClosestDistance(), and m_maxDistance.
Referenced by PopulateClusterMergeMap().
|
protectedinherited |
Collect up all clusters associations related to a given seed cluster.
pSeedCluster | pointer to the initial cluster |
clusterMergeMap | the map of cluster associations |
associatedClusterList | the output list of associated clusters |
|
protectedinherited |
Collect up all clusters associations related to a given seed cluster.
pSeedCluster | pointer to the initial cluster |
pCurrentCluster | pointer to the current cluster |
clusterMergeMap | the map of cluster associations |
clusterVetoList | the list of clusters that have already been merged |
associatedClusterList | the output list of associated clusters |
|
protected |
Populate cluster vector with all clusters starting in the defined region.
pClusterList | pointer to the list of all 2D clusters |
clusterVector | to receive the clusters within the bounded region |
Definition at line 72 of file BoundedRegionClusterMergingAlgorithm.cc.
References f, lar_content::LArClusterHelper::GetClusterBoundingBox(), m_minClusterHits, m_xRegionMax, m_xRegionMin, m_zRegionMax, m_zRegionMin, and lar_content::LArClusterHelper::SortByNHits().
Referenced by Run().
|
protectedvirtual |
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::ClusterMergingAlgorithm.
Definition at line 133 of file BoundedRegionClusterMergingAlgorithm.cc.
|
protectedinherited |
Sort the selected clusters, so that they have a well-defined ordering.
inputClusters | the input vector of clusters |
outputClusters | the output vector of clusters |
Definition at line 135 of file ClusterMergingAlgorithm.cc.
|
protectedinherited |
Merge associated clusters.
clusterVector | the vector of clean clusters |
clusterMergeMap | the matrix of cluster associations |
Definition at line 62 of file ClusterMergingAlgorithm.cc.
Referenced by Run().
|
protectedvirtual |
Form associations between pointing clusters.
clusterVector | the vector of clean clusters |
clusterMergeMap | the matrix of cluster associations |
Implements lar_content::ClusterMergingAlgorithm.
Definition at line 97 of file BoundedRegionClusterMergingAlgorithm.cc.
References AreClustersAssociated().
Referenced by Run().
|
protectedvirtual |
Reimplemented from lar_content::ClusterMergingAlgorithm.
Definition at line 139 of file BoundedRegionClusterMergingAlgorithm.cc.
References m_maxDistance, m_minClusterHits, m_xRegionMax, m_xRegionMin, m_zRegionMax, m_zRegionMin, and lar_content::ClusterMergingAlgorithm::ReadSettings().
|
protectedvirtual |
Reimplemented from lar_content::ClusterMergingAlgorithm.
Definition at line 30 of file BoundedRegionClusterMergingAlgorithm.cc.
References GetListOfBoundedRegionClusters(), lar_content::ClusterMergingAlgorithm::m_inputClusterListName, lar_content::ClusterMergingAlgorithm::MergeClusters(), and PopulateClusterMergeMap().
|
protectedinherited |
The name of the input cluster list. If not specified, will access current list.
Definition at line 83 of file ClusterMergingAlgorithm.h.
Referenced by Run().
|
private |
Maximum distance below which clusters can be associated.
Definition at line 72 of file BoundedRegionClusterMergingAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
private |
Threshold on the size of clusters to be considered for merging.
Definition at line 73 of file BoundedRegionClusterMergingAlgorithm.h.
Referenced by GetListOfBoundedRegionClusters(), and ReadSettings().
|
private |
Maximum x value of the bounded region box.
Definition at line 69 of file BoundedRegionClusterMergingAlgorithm.h.
Referenced by GetListOfBoundedRegionClusters(), and ReadSettings().
|
private |
Minimum x value of the bounded region box.
Definition at line 68 of file BoundedRegionClusterMergingAlgorithm.h.
Referenced by GetListOfBoundedRegionClusters(), and ReadSettings().
|
private |
Maximum z value (wire dimension) of the bounded region box.
Definition at line 71 of file BoundedRegionClusterMergingAlgorithm.h.
Referenced by GetListOfBoundedRegionClusters(), and ReadSettings().
|
private |
Minimum z value (wire dimension) of the bounded region box.
Definition at line 70 of file BoundedRegionClusterMergingAlgorithm.h.
Referenced by GetListOfBoundedRegionClusters(), and ReadSettings().