Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::SimpleClusterMergingAlgorithm Class Reference

SimpleClusterMergingAlgorithm class. More...

#include "SimpleClusterMergingAlgorithm.h"

Inheritance diagram for lar_content::SimpleClusterMergingAlgorithm:
Collaboration diagram for lar_content::SimpleClusterMergingAlgorithm:

Public Member Functions

 SimpleClusterMergingAlgorithm ()
 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 *, pandora::ClusterListClusterMergeMap
 

Protected Member Functions

virtual pandora::StatusCode Run ()
 Run the algorithm.
 
void MergeClusters (pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const
 Merge associated clusters.
 
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.
 
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.
 
void GetSortedListOfCleanClusters (const pandora::ClusterVector &inputClusters, pandora::ClusterVector &outputClusters) const
 Sort the selected clusters, so that they have a well-defined ordering.
 
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

std::string m_inputClusterListName
 The name of the input cluster list. If not specified, will access current list.
 
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 GetListOfCleanClusters (const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const
 Populate cluster vector with subset of cluster list, containing clusters judged to be clean.
 
void PopulateClusterMergeMap (const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const
 Form associations between pointing clusters.
 
bool IsAssociated (const pandora::Cluster *const pClusterI, const pandora::Cluster *const pClusterJ) const
 Decide whether two clusters are associated.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

unsigned int m_minCaloHitsPerCluster
 The min number of calo hits per candidate cluster.
 
float m_maxClusterSeparation
 Maximum distance at which clusters can be joined.
 

Detailed Description

Member Typedef Documentation

◆ ClusterMergeMap

typedef std::unordered_map<const pandora::Cluster *, pandora::ClusterList> lar_content::ClusterMergingAlgorithm::ClusterMergeMap
protectedinherited

Definition at line 27 of file ClusterMergingAlgorithm.h.

Constructor & Destructor Documentation

◆ SimpleClusterMergingAlgorithm()

lar_content::SimpleClusterMergingAlgorithm::SimpleClusterMergingAlgorithm ( )

Default constructor.

Definition at line 20 of file SimpleClusterMergingAlgorithm.cc.

Member Function Documentation

◆ CollectAssociatedClusters() [1/2]

void lar_content::ClusterMergingAlgorithm::CollectAssociatedClusters ( const pandora::Cluster *const  pSeedCluster,
const ClusterMergeMap clusterMergeMap,
pandora::ClusterList associatedClusterList 
) const
protectedinherited

Collect up all clusters associations related to a given seed cluster.

Parameters
pSeedClusterpointer to the initial cluster
clusterMergeMapthe map of cluster associations
associatedClusterListthe output list of associated clusters

Definition at line 97 of file ClusterMergingAlgorithm.cc.

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

◆ CollectAssociatedClusters() [2/2]

void lar_content::ClusterMergingAlgorithm::CollectAssociatedClusters ( const pandora::Cluster *const  pSeedCluster,
const pandora::Cluster *const  pCurrentCluster,
const ClusterMergeMap clusterMergeMap,
const pandora::ClusterSet clusterVetoList,
pandora::ClusterList associatedClusterList 
) const
protectedinherited

Collect up all clusters associations related to a given seed cluster.

Parameters
pSeedClusterpointer to the initial cluster
pCurrentClusterpointer to the current cluster
clusterMergeMapthe map of cluster associations
clusterVetoListthe list of clusters that have already been merged
associatedClusterListthe output list of associated clusters

Definition at line 106 of file ClusterMergingAlgorithm.cc.

Here is the call 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()

void lar_content::SimpleClusterMergingAlgorithm::GetListOfCleanClusters ( const pandora::ClusterList *const  pClusterList,
pandora::ClusterVector clusterVector 
) const
privatevirtual

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

Implements lar_content::ClusterMergingAlgorithm.

Definition at line 26 of file SimpleClusterMergingAlgorithm.cc.

Here is the call 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.

◆ GetSortedListOfCleanClusters()

void lar_content::ClusterMergingAlgorithm::GetSortedListOfCleanClusters ( const pandora::ClusterVector inputClusters,
pandora::ClusterVector outputClusters 
) const
protectedinherited

Sort the selected clusters, so that they have a well-defined ordering.

Parameters
inputClustersthe input vector of clusters
outputClustersthe output vector of clusters

Definition at line 135 of file ClusterMergingAlgorithm.cc.

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

◆ 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:

◆ IsAssociated()

bool lar_content::SimpleClusterMergingAlgorithm::IsAssociated ( const pandora::Cluster *const  pClusterI,
const pandora::Cluster *const  pClusterJ 
) const
private

Decide whether two clusters are associated.

Parameters
pClusterIthe address of the first cluster
pClusterJthe address of the second cluster
Returns
boolean

Definition at line 70 of file SimpleClusterMergingAlgorithm.cc.

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

◆ MergeClusters()

void lar_content::ClusterMergingAlgorithm::MergeClusters ( pandora::ClusterVector clusterVector,
ClusterMergeMap clusterMergeMap 
) const
protectedinherited

Merge associated clusters.

Parameters
clusterVectorthe vector of clean clusters
clusterMergeMapthe matrix of cluster associations

Definition at line 62 of file ClusterMergingAlgorithm.cc.

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

◆ PopulateClusterMergeMap()

void lar_content::SimpleClusterMergingAlgorithm::PopulateClusterMergeMap ( const pandora::ClusterVector clusterVector,
ClusterMergeMap clusterMergeMap 
) const
privatevirtual

Form associations between pointing clusters.

Parameters
clusterVectorthe vector of clean clusters
clusterMergeMapthe matrix of cluster associations

Implements lar_content::ClusterMergingAlgorithm.

Definition at line 46 of file SimpleClusterMergingAlgorithm.cc.

Here is the call graph for this function:

◆ ReadSettings()

StatusCode lar_content::SimpleClusterMergingAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::ClusterMergingAlgorithm.

Definition at line 80 of file SimpleClusterMergingAlgorithm.cc.

Here is the call 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::ClusterMergingAlgorithm::Run ( )
protectedvirtualinherited

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 20 of file ClusterMergingAlgorithm.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_inputClusterListName

std::string lar_content::ClusterMergingAlgorithm::m_inputClusterListName
protectedinherited

The name of the input cluster list. If not specified, will access current list.

Definition at line 83 of file ClusterMergingAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxClusterSeparation

float lar_content::SimpleClusterMergingAlgorithm::m_maxClusterSeparation
private

Maximum distance at which clusters can be joined.

Definition at line 46 of file SimpleClusterMergingAlgorithm.h.

◆ m_minCaloHitsPerCluster

unsigned int lar_content::SimpleClusterMergingAlgorithm::m_minCaloHitsPerCluster
private

The min number of calo hits per candidate cluster.

Definition at line 45 of file SimpleClusterMergingAlgorithm.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_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: