LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
ClusterAssociationAlgorithm class. More...
#include "ClusterAssociationAlgorithm.h"
Classes | |
class | ClusterAssociation |
ClusterAssociation class. More... | |
Public Member Functions | |
ClusterAssociationAlgorithm () | |
Default constructor. More... | |
Protected Types | |
typedef std::unordered_map< const pandora::Cluster *, ClusterAssociation > | ClusterAssociationMap |
Protected Member Functions | |
virtual pandora::StatusCode | Run () |
virtual pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
virtual void | GetListOfCleanClusters (const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const =0 |
Populate cluster vector with subset of cluster list, containing clusters judged to be clean. More... | |
virtual void | PopulateClusterAssociationMap (const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const =0 |
Populate the cluster association map. More... | |
virtual bool | IsExtremalCluster (const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const =0 |
Determine which of two clusters is extremal. More... | |
Private Member Functions | |
void | UnambiguousPropagation (const pandora::Cluster *const pCluster, const bool isForward, ClusterAssociationMap &clusterAssociationMap) const |
Unambiguous propagation. More... | |
void | AmbiguousPropagation (const pandora::Cluster *const pCluster, const bool isForward, ClusterAssociationMap &clusterAssociationMap) const |
Ambiguous propagation. More... | |
void | UpdateForUnambiguousMerge (const pandora::Cluster *const pClusterToEnlarge, const pandora::Cluster *const pClusterToDelete, const bool isForwardMerge, ClusterAssociationMap &clusterAssociationMap) const |
Update cluster association map to reflect an unambiguous cluster merge. More... | |
void | UpdateForAmbiguousMerge (const pandora::Cluster *const pClusterToEnlarge, const pandora::Cluster *const pClusterToDelete, const bool isForwardMerge, ClusterAssociationMap &clusterAssociationMap) const |
Update cluster association map to reflect an ambiguous cluster merge. More... | |
void | NavigateAlongAssociations (const ClusterAssociationMap &clusterAssociationMap, const pandora::Cluster *const pCluster, const bool isForward, const pandora::Cluster *&pExtremalCluster, pandora::ClusterSet &clusterSet) const |
Navigate along cluster associations, from specified cluster, in specified direction. More... | |
Private Attributes | |
bool | m_mergeMade |
bool | m_resolveAmbiguousAssociations |
Whether to resolve ambiguous associations. More... | |
ClusterAssociationAlgorithm class.
Definition at line 21 of file ClusterAssociationAlgorithm.h.
|
protected |
Definition at line 43 of file ClusterAssociationAlgorithm.h.
lar_content::ClusterAssociationAlgorithm::ClusterAssociationAlgorithm | ( | ) |
Default constructor.
Definition at line 20 of file ClusterAssociationAlgorithm.cc.
|
private |
Ambiguous propagation.
pCluster | address of the cluster to propagate |
isForward | whether propagation direction is forward |
clusterAssociationMap | the cluster association map |
Definition at line 117 of file ClusterAssociationAlgorithm.cc.
References m_mergeMade, NavigateAlongAssociations(), lar_content::LArClusterHelper::SortByNHits(), and UpdateForAmbiguousMerge().
Referenced by Run().
|
protectedpure virtual |
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 |
Implemented in lar_content::TransverseAssociationAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::CrossGapsAssociationAlgorithm.
Referenced by Run().
|
protectedpure virtual |
Determine which of two clusters is extremal.
isForward | whether propagation direction is forward |
pCurrentCluster | current extremal cluster |
pTestCluster | potential extremal cluster |
Implemented in lar_content::TransverseAssociationAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::CrossGapsAssociationAlgorithm.
Referenced by NavigateAlongAssociations().
|
private |
Navigate along cluster associations, from specified cluster, in specified direction.
clusterAssociationMap | the cluster association map |
pCluster | address of cluster with which to begin search |
isForward | whether propagation direction is forward |
pExtremalCluster | to receive the extremal cluster |
clusterSet | to receive set of clusters traversed |
Definition at line 264 of file ClusterAssociationAlgorithm.cc.
References IsExtremalCluster().
Referenced by AmbiguousPropagation().
|
protectedpure virtual |
Populate the cluster association map.
clusterVector | the cluster vector |
clusterAssociationMap | to receive the populated cluster association map |
Implemented in lar_content::TransverseAssociationAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::CrossGapsAssociationAlgorithm.
Referenced by Run().
|
protectedvirtual |
Reimplemented in lar_content::TransverseAssociationAlgorithm, lar_content::CrossGapsAssociationAlgorithm, and lar_content::LongitudinalAssociationAlgorithm.
Definition at line 287 of file ClusterAssociationAlgorithm.cc.
References m_resolveAmbiguousAssociations.
Referenced by lar_content::LongitudinalAssociationAlgorithm::ReadSettings(), lar_content::CrossGapsAssociationAlgorithm::ReadSettings(), and lar_content::TransverseAssociationAlgorithm::ReadSettings().
|
protectedvirtual |
Definition at line 28 of file ClusterAssociationAlgorithm.cc.
References AmbiguousPropagation(), GetListOfCleanClusters(), m_mergeMade, m_resolveAmbiguousAssociations, PopulateClusterAssociationMap(), and UnambiguousPropagation().
|
private |
Unambiguous propagation.
pCluster | address of the cluster to propagate |
isForward | whether propagation direction is forward |
clusterAssociationMap | the cluster association map |
Definition at line 84 of file ClusterAssociationAlgorithm.cc.
References m_mergeMade, and UpdateForUnambiguousMerge().
Referenced by Run().
|
private |
Update cluster association map to reflect an ambiguous cluster merge.
pClusterToEnlarge | address of the cluster to be enlarged |
pClusterToDelete | address of the cluster to be deleted |
isForwardMerge | whether merge is forward (pClusterToEnlarge is forward-associated with pClusterToDelete) |
clusterAssociationMap | the cluster association map |
Definition at line 197 of file ClusterAssociationAlgorithm.cc.
References UpdateForUnambiguousMerge().
Referenced by AmbiguousPropagation().
|
private |
Update cluster association map to reflect an unambiguous cluster merge.
pClusterToEnlarge | address of the cluster to be enlarged |
pClusterToDelete | address of the cluster to be deleted |
isForwardMerge | whether merge is forward (pClusterToEnlarge is forward-associated with pClusterToDelete) |
clusterAssociationMap | the cluster association map |
Definition at line 159 of file ClusterAssociationAlgorithm.cc.
Referenced by UnambiguousPropagation(), and UpdateForAmbiguousMerge().
|
mutableprivate |
Definition at line 125 of file ClusterAssociationAlgorithm.h.
Referenced by AmbiguousPropagation(), Run(), and UnambiguousPropagation().
|
private |
Whether to resolve ambiguous associations.
Definition at line 127 of file ClusterAssociationAlgorithm.h.
Referenced by ReadSettings(), and Run().