Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::ClusterAssociationAlgorithm Class Referenceabstract

ClusterAssociationAlgorithm class. More...

#include "ClusterAssociationAlgorithm.h"

Inheritance diagram for lar_content::ClusterAssociationAlgorithm:
Collaboration diagram for lar_content::ClusterAssociationAlgorithm:

Classes

class  ClusterAssociation
 ClusterAssociation class. More...
 

Public Member Functions

 ClusterAssociationAlgorithm ()
 Default constructor.
 
const std::string & GetType () const
 Get the type.
 
const std::string & GetInstanceName () const
 Get the instance name.
 
const PandoraGetPandora () const
 Get the associated pandora instance.
 

Protected Types

typedef std::unordered_map< const pandora::Cluster *, ClusterAssociationClusterAssociationMap
 

Protected Member Functions

virtual pandora::StatusCode Run ()
 Run the algorithm.
 
virtual pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
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.
 
virtual void PopulateClusterAssociationMap (const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const =0
 Populate the cluster association map.
 
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.
 
virtual StatusCode Initialize ()
 Perform any operations that must occur after reading settings, but before running the process.
 
virtual StatusCode Reset ()
 Perform any operations when pandora is reset, typically at the end of each event.
 
StatusCode RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName)
 Register i) the pandora instance that will run the process and ii) the process type.
 

Protected Attributes

const Pandoram_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Private Member Functions

void UnambiguousPropagation (const pandora::Cluster *const pCluster, const bool isForward, ClusterAssociationMap &clusterAssociationMap) const
 Unambiguous propagation.
 
void AmbiguousPropagation (const pandora::Cluster *const pCluster, const bool isForward, ClusterAssociationMap &clusterAssociationMap) const
 Ambiguous propagation.
 
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.
 
void UpdateForAmbiguousMerge (const pandora::Cluster *const pCluster, ClusterAssociationMap &clusterAssociationMap) const
 Update cluster association map to reflect an ambiguous cluster merge.
 
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.
 

Private Attributes

bool m_mergeMade
 
bool m_resolveAmbiguousAssociations
 Whether to resolve ambiguous associations.
 

Detailed Description


Class Documentation

◆ lar_content::ClusterAssociationAlgorithm::ClusterAssociation

class lar_content::ClusterAssociationAlgorithm::ClusterAssociation

ClusterAssociation class.

Definition at line 36 of file ClusterAssociationAlgorithm.h.

Class Members
ClusterSet m_backwardAssociations The list of backward associations.
ClusterSet m_forwardAssociations The list of forward associations.

Member Typedef Documentation

◆ ClusterAssociationMap

Constructor & Destructor Documentation

◆ ClusterAssociationAlgorithm()

lar_content::ClusterAssociationAlgorithm::ClusterAssociationAlgorithm ( )

Default constructor.

Definition at line 20 of file ClusterAssociationAlgorithm.cc.

Member Function Documentation

◆ AmbiguousPropagation()

void lar_content::ClusterAssociationAlgorithm::AmbiguousPropagation ( const pandora::Cluster *const  pCluster,
const bool  isForward,
ClusterAssociationMap clusterAssociationMap 
) const
private

Ambiguous propagation.

Parameters
pClusteraddress of the cluster to propagate
isForwardwhether propagation direction is forward
clusterAssociationMapthe cluster association map

Definition at line 121 of file ClusterAssociationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetListOfCleanClusters()

virtual void lar_content::ClusterAssociationAlgorithm::GetListOfCleanClusters ( const pandora::ClusterList *const  pClusterList,
pandora::ClusterVector clusterVector 
) const
protectedpure virtual

Populate cluster vector with subset of cluster list, containing clusters judged to be clean.

Parameters
pClusterListaddress of the cluster list
clusterVectorto receive the populated cluster vector

Implemented in lar_content::CrossGapsAssociationAlgorithm, lar_content::HitWidthClusterMergingAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::TransverseAssociationAlgorithm.

Here is the caller graph for this function:

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode pandora::Process::Initialize ( )
inlineprotectedvirtualinherited

Perform any operations that must occur after reading settings, but before running the process.

Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.

Definition at line 126 of file Process.h.

Here is the caller graph for this function:

◆ IsExtremalCluster()

virtual bool lar_content::ClusterAssociationAlgorithm::IsExtremalCluster ( const bool  isForward,
const pandora::Cluster *const  pCurrentCluster,
const pandora::Cluster *const  pTestCluster 
) const
protectedpure virtual

Determine which of two clusters is extremal.

Parameters
isForwardwhether propagation direction is forward
pCurrentClustercurrent extremal cluster
pTestClusterpotential extremal cluster
Returns
boolean

Implemented in lar_content::CrossGapsAssociationAlgorithm, lar_content::HitWidthClusterMergingAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::TransverseAssociationAlgorithm.

Here is the caller graph for this function:

◆ NavigateAlongAssociations()

void lar_content::ClusterAssociationAlgorithm::NavigateAlongAssociations ( const ClusterAssociationMap clusterAssociationMap,
const pandora::Cluster *const  pCluster,
const bool  isForward,
const pandora::Cluster *&  pExtremalCluster,
pandora::ClusterSet clusterSet 
) const
private

Navigate along cluster associations, from specified cluster, in specified direction.

Parameters
clusterAssociationMapthe cluster association map
pClusteraddress of cluster with which to begin search
isForwardwhether propagation direction is forward
pExtremalClusterto receive the extremal cluster
clusterSetto receive set of clusters traversed

Definition at line 231 of file ClusterAssociationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PopulateClusterAssociationMap()

virtual void lar_content::ClusterAssociationAlgorithm::PopulateClusterAssociationMap ( const pandora::ClusterVector clusterVector,
ClusterAssociationMap clusterAssociationMap 
) const
protectedpure virtual

Populate the cluster association map.

Parameters
clusterVectorthe cluster vector
clusterAssociationMapto receive the populated cluster association map

Implemented in lar_content::CrossGapsAssociationAlgorithm, lar_content::HitWidthClusterMergingAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::TransverseAssociationAlgorithm.

Here is the caller graph for this function:

◆ ReadSettings()

StatusCode lar_content::ClusterAssociationAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
protectedvirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Reimplemented in lar_content::CrossGapsAssociationAlgorithm, lar_content::HitWidthClusterMergingAlgorithm, lar_content::LongitudinalAssociationAlgorithm, and lar_content::TransverseAssociationAlgorithm.

Definition at line 254 of file ClusterAssociationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
inlineprotectedvirtualinherited

Perform any operations when pandora is reset, typically at the end of each event.

Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.

Definition at line 133 of file Process.h.

Here is the caller graph for this function:

◆ Run()

StatusCode lar_content::ClusterAssociationAlgorithm::Run ( )
protectedvirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 26 of file ClusterAssociationAlgorithm.cc.

Here is the call graph for this function:

◆ UnambiguousPropagation()

void lar_content::ClusterAssociationAlgorithm::UnambiguousPropagation ( const pandora::Cluster *const  pCluster,
const bool  isForward,
ClusterAssociationMap clusterAssociationMap 
) const
private

Unambiguous propagation.

Parameters
pClusteraddress of the cluster to propagate
isForwardwhether propagation direction is forward
clusterAssociationMapthe cluster association map

Definition at line 87 of file ClusterAssociationAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateForAmbiguousMerge()

void lar_content::ClusterAssociationAlgorithm::UpdateForAmbiguousMerge ( const pandora::Cluster *const  pCluster,
ClusterAssociationMap clusterAssociationMap 
) const
private

Update cluster association map to reflect an ambiguous cluster merge.

Parameters
pClusteraddress of the cluster to be cleared
clusterAssociationMapthe cluster association map

Definition at line 204 of file ClusterAssociationAlgorithm.cc.

Here is the caller graph for this function:

◆ UpdateForUnambiguousMerge()

void lar_content::ClusterAssociationAlgorithm::UpdateForUnambiguousMerge ( const pandora::Cluster *const  pClusterToEnlarge,
const pandora::Cluster *const  pClusterToDelete,
const bool  isForwardMerge,
ClusterAssociationMap clusterAssociationMap 
) const
private

Update cluster association map to reflect an unambiguous cluster merge.

Parameters
pClusterToEnlargeaddress of the cluster to be enlarged
pClusterToDeleteaddress of the cluster to be deleted
isForwardMergewhether merge is forward (pClusterToEnlarge is forward-associated with pClusterToDelete)
clusterAssociationMapthe cluster association map

Definition at line 166 of file ClusterAssociationAlgorithm.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_mergeMade

bool lar_content::ClusterAssociationAlgorithm::m_mergeMade
mutableprivate

Definition at line 123 of file ClusterAssociationAlgorithm.h.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_resolveAmbiguousAssociations

bool lar_content::ClusterAssociationAlgorithm::m_resolveAmbiguousAssociations
private

Whether to resolve ambiguous associations.

Definition at line 125 of file ClusterAssociationAlgorithm.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.


The documentation for this class was generated from the following files: