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

ShowerGrowingAlgorithm class. More...

#include "ShowerGrowingAlgorithm.h"

Inheritance diagram for lar_content::ShowerGrowingAlgorithm:
Collaboration diagram for lar_content::ShowerGrowingAlgorithm:

Public Member Functions

 ShowerGrowingAlgorithm ()
 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 *, LArVertexHelper::ClusterDirectionClusterDirectionMap
 
enum  AssociationType { NONE = 0 , SINGLE_ORDER = 1 , STANDARD = 2 , STRONG = 3 }
 AssociationType enum. More...
 
typedef std::unordered_map< const pandora::Cluster *, AssociationClusterAssociationMap
 
typedef std::unordered_map< const pandora::Cluster *, ClusterAssociationMapClusterUsageMap
 
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterVectorSeedAssociationList
 

Protected Member Functions

bool IsVertexAssociated (const LArPointingCluster &pointingCluster, const pandora::CartesianVector &vertexPosition2D) const
 Whether a pointing cluster is assciated with a provided 2D vertex projection.
 
void FindAssociatedClusters (const pandora::Cluster *const pParticleSeed, pandora::ClusterVector &candidateClusters, ClusterUsageMap &forwardUsageMap, ClusterUsageMap &backwardUsageMap) const
 Find clusters associated with a particle seed.
 
void IdentifyClusterMerges (const pandora::ClusterVector &particleSeedVector, const ClusterUsageMap &backwardUsageMap, SeedAssociationList &seedAssociationList) const
 Identify cluster merges.
 
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.
 

Static Protected Member Functions

static bool SortClusters (const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
 Sorting for clusters to determine order in which seeds are considered.
 

Protected Attributes

ClusterDirectionMap m_clusterDirectionMap
 The cluster direction map.
 
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

pandora::StatusCode Run ()
 Run the algorithm.
 
void SimpleModeShowerGrowing (const pandora::ClusterList *const pClusterList, const std::string &clusterListName) const
 Simple single-pass shower growing mode.
 
bool GetNextSeedCandidate (const pandora::ClusterList *const pClusterList, const pandora::ClusterSet &usedClusters, const pandora::Cluster *&pSeedCluster) const
 Get the next seed candidate, using a list of available candidates and a list of those already used.
 
void GetAllVertexSeedCandidates (const pandora::ClusterList *const pClusterList, const pandora::Vertex *const pVertex, pandora::ClusterVector &seedClusters) const
 Get all seed candidates associated with a provided vertex.
 
void GetSeedAssociationList (const pandora::ClusterVector &particleSeedVector, const pandora::ClusterList *const pClusterList, SeedAssociationList &seedAssociationList) const
 Get the seed association list for a given vector of particle seed candidates.
 
void ProcessSeedAssociationDetails (const SeedAssociationList &seedAssociationList, const std::string &clusterListName, pandora::ClusterSet &usedClusters) const
 Process the details stored in a specified seed association list.
 
void ProcessBranchClusters (const pandora::Cluster *const pParentCluster, const pandora::ClusterVector &branchClusters, const std::string &listName) const
 Process the list of branch clusters, merging with specified parent cluster, dealing with any existing pfos as required.
 
AssociationType AreClustersAssociated (const pandora::Cluster *const pClusterSeed, const pandora::Cluster *const pCluster) const
 Determine whether two clusters are associated.
 
float GetFigureOfMerit (const SeedAssociationList &seedAssociationList) const
 Get a figure of merit representing the consistency of the provided seed associated list.
 
unsigned int GetNVertexConnections (const pandora::CartesianVector &vertexPosition2D, const LArPointingClusterList &pointingClusterList) const
 Get the number of clusters associated with the vertex.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

pandora::StringVector m_inputClusterListNames
 The names of the input cluster lists.
 
unsigned int m_minCaloHitsPerCluster
 The minimum number of calo hits per (seed or branch) cluster.
 
float m_nearbyClusterDistance
 The nearby cluster distance, used for determining cluster associations.
 
float m_remoteClusterDistance
 The remote cluster distance, used for determining cluster associations.
 
float m_directionTanAngle
 Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
 
float m_directionApexShift
 Direction determination, look for vertex inside triangle with apex shifted along the cluster length.
 
float m_minVertexLongitudinalDistance
 Vertex association check: min longitudinal distance cut.
 
float m_maxVertexLongitudinalDistance
 Vertex association check: max longitudinal distance cut.
 
float m_maxVertexTransverseDistance
 Vertex association check: max transverse distance cut.
 
float m_vertexAngularAllowance
 Vertex association check: pointing angular allowance in degrees.
 

Detailed Description

ShowerGrowingAlgorithm class.

Definition at line 27 of file ShowerGrowingAlgorithm.h.

Member Typedef Documentation

◆ ClusterAssociationMap

typedef std::unordered_map<const pandora::Cluster *, Association> lar_content::BranchGrowingAlgorithm::ClusterAssociationMap
protectedinherited

Definition at line 87 of file BranchGrowingAlgorithm.h.

◆ ClusterDirectionMap

◆ ClusterUsageMap

typedef std::unordered_map<const pandora::Cluster *, ClusterAssociationMap> lar_content::BranchGrowingAlgorithm::ClusterUsageMap
protectedinherited

Definition at line 88 of file BranchGrowingAlgorithm.h.

◆ SeedAssociationList

Definition at line 111 of file BranchGrowingAlgorithm.h.

Member Enumeration Documentation

◆ AssociationType

AssociationType enum.

Enumerator
NONE 
SINGLE_ORDER 
STANDARD 
STRONG 

Definition at line 27 of file BranchGrowingAlgorithm.h.

Constructor & Destructor Documentation

◆ ShowerGrowingAlgorithm()

lar_content::ShowerGrowingAlgorithm::ShowerGrowingAlgorithm ( )

Default constructor.

Definition at line 25 of file ShowerGrowingAlgorithm.cc.

Member Function Documentation

◆ AreClustersAssociated()

ShowerGrowingAlgorithm::AssociationType lar_content::ShowerGrowingAlgorithm::AreClustersAssociated ( const pandora::Cluster *const  pClusterSeed,
const pandora::Cluster *const  pCluster 
) const
privatevirtual

Determine whether two clusters are associated.

Parameters
pClusterSeedaddress of cluster seed (may be daughter of primary seed)
pClusteraddress of cluster
Returns
the association type

Implements lar_content::BranchGrowingAlgorithm.

Definition at line 276 of file ShowerGrowingAlgorithm.cc.

Here is the call graph for this function:

◆ FindAssociatedClusters()

void lar_content::BranchGrowingAlgorithm::FindAssociatedClusters ( const pandora::Cluster *const  pParticleSeed,
pandora::ClusterVector candidateClusters,
ClusterUsageMap forwardUsageMap,
ClusterUsageMap backwardUsageMap 
) const
protectedinherited

Find clusters associated with a particle seed.

Parameters
pParticleSeedaddress of the particle seed
candidateClusterslist of clusters which may be associated with seed
forwardUsageMapthe particle seed usage map
backwardUsageMapthe cluster usage map

Definition at line 20 of file BranchGrowingAlgorithm.cc.

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

◆ GetAllVertexSeedCandidates()

void lar_content::ShowerGrowingAlgorithm::GetAllVertexSeedCandidates ( const pandora::ClusterList *const  pClusterList,
const pandora::Vertex *const  pVertex,
pandora::ClusterVector seedClusters 
) const
private

Get all seed candidates associated with a provided vertex.

Parameters
pClusterListthe list of available seed candidates
pVertexthe address of the vertex
seedClustersto receive the list of vertex seed candidates

Definition at line 164 of file ShowerGrowingAlgorithm.cc.

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

◆ GetFigureOfMerit()

float lar_content::ShowerGrowingAlgorithm::GetFigureOfMerit ( const SeedAssociationList seedAssociationList) const
private

Get a figure of merit representing the consistency of the provided seed associated list.

Parameters
seedAssociationListthe seed association list
Returns
the figure of merit

Definition at line 358 of file ShowerGrowingAlgorithm.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.

◆ GetNextSeedCandidate()

bool lar_content::ShowerGrowingAlgorithm::GetNextSeedCandidate ( const pandora::ClusterList *const  pClusterList,
const pandora::ClusterSet usedClusters,
const pandora::Cluster *&  pSeedCluster 
) const
private

Get the next seed candidate, using a list of available candidates and a list of those already used.

Parameters
pClusterListthe list of available seed candidates
usedClustersthe list of candidates already considered
pSeedClusterto receive the address of the next seed candidate
Returns
whether a seed candidate has been found

Definition at line 133 of file ShowerGrowingAlgorithm.cc.

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

◆ GetNVertexConnections()

unsigned int lar_content::ShowerGrowingAlgorithm::GetNVertexConnections ( const pandora::CartesianVector vertexPosition2D,
const LArPointingClusterList pointingClusterList 
) const
private

Get the number of clusters associated with the vertex.

Parameters
vertexPosition2Dthe projected vertex position
pointingClusterListthe list of relevant pointing clusters
Returns
the number of clusters associated with the vertex

Definition at line 413 of file ShowerGrowingAlgorithm.cc.

Here is the call graph for this function:
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.

◆ GetSeedAssociationList()

void lar_content::ShowerGrowingAlgorithm::GetSeedAssociationList ( const pandora::ClusterVector particleSeedVector,
const pandora::ClusterList *const  pClusterList,
SeedAssociationList seedAssociationList 
) const
private

Get the seed association list for a given vector of particle seed candidates.

Parameters
particleSeedVectorthe particle seed vector
pClusterListthe address of the input cluster list
seedAssociationListto receive the populated seed association list

Definition at line 201 of file ShowerGrowingAlgorithm.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.

◆ IdentifyClusterMerges()

void lar_content::BranchGrowingAlgorithm::IdentifyClusterMerges ( const pandora::ClusterVector particleSeedVector,
const ClusterUsageMap backwardUsageMap,
SeedAssociationList seedAssociationList 
) const
protectedinherited

Identify cluster merges.

Parameters
particleSeedVectorthe list of all particle seeds
backwardUsageMapthe map from cluster to particle seed associations
seedAssociationListto receive the populated seed association list

Definition at line 73 of file BranchGrowingAlgorithm.cc.

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

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

◆ IsVertexAssociated()

bool lar_content::ShowerGrowingAlgorithm::IsVertexAssociated ( const LArPointingCluster pointingCluster,
const pandora::CartesianVector vertexPosition2D 
) const
protected

Whether a pointing cluster is assciated with a provided 2D vertex projection.

Parameters
pointingClusterthe pointing cluster
vertexPosition2Dthe projected vertex position
Returns
boolean

Definition at line 40 of file ShowerGrowingAlgorithm.cc.

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

◆ ProcessBranchClusters()

void lar_content::ShowerGrowingAlgorithm::ProcessBranchClusters ( const pandora::Cluster *const  pParentCluster,
const pandora::ClusterVector branchClusters,
const std::string &  listName 
) const
private

Process the list of branch clusters, merging with specified parent cluster, dealing with any existing pfos as required.

Parameters
pParentClusterthe address of the parent cluster
branchClustersthe list of branch clusters for the specified seed cluster
listNamethe cluster list name
pfoListthe input pfo list

Definition at line 258 of file ShowerGrowingAlgorithm.cc.

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

◆ ProcessSeedAssociationDetails()

void lar_content::ShowerGrowingAlgorithm::ProcessSeedAssociationDetails ( const SeedAssociationList seedAssociationList,
const std::string &  clusterListName,
pandora::ClusterSet usedClusters 
) const
private

Process the details stored in a specified seed association list.

Parameters
seedAssociationListthe seed association list
clusterListNamethe cluster list name
pfoListthe pfo list
usedClustersthe list of candidates already considered

Definition at line 238 of file ShowerGrowingAlgorithm.cc.

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

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::BranchGrowingAlgorithm.

Definition at line 428 of file ShowerGrowingAlgorithm.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::ShowerGrowingAlgorithm::Run ( )
privatevirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 67 of file ShowerGrowingAlgorithm.cc.

Here is the call graph for this function:

◆ SimpleModeShowerGrowing()

void lar_content::ShowerGrowingAlgorithm::SimpleModeShowerGrowing ( const pandora::ClusterList *const  pClusterList,
const std::string &  clusterListName 
) const
private

Simple single-pass shower growing mode.

Parameters
pClusterListthe list of clusters
clusterListNamethe cluster list name

Definition at line 100 of file ShowerGrowingAlgorithm.cc.

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

◆ SortClusters()

bool lar_content::ShowerGrowingAlgorithm::SortClusters ( const pandora::Cluster *const  pLhs,
const pandora::Cluster *const  pRhs 
)
staticprotected

Sorting for clusters to determine order in which seeds are considered.

Parameters
pLhsaddress of first cluster
pRhsaddress of second cluster

Definition at line 52 of file ShowerGrowingAlgorithm.cc.

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

Member Data Documentation

◆ m_clusterDirectionMap

ClusterDirectionMap lar_content::ShowerGrowingAlgorithm::m_clusterDirectionMap
mutableprotected

The cluster direction map.

Definition at line 55 of file ShowerGrowingAlgorithm.h.

◆ m_directionApexShift

float lar_content::ShowerGrowingAlgorithm::m_directionApexShift
private

Direction determination, look for vertex inside triangle with apex shifted along the cluster length.

Definition at line 152 of file ShowerGrowingAlgorithm.h.

◆ m_directionTanAngle

float lar_content::ShowerGrowingAlgorithm::m_directionTanAngle
private

Direction determination, look for vertex inside triangle with apex shifted along the cluster length.

Definition at line 151 of file ShowerGrowingAlgorithm.h.

◆ m_inputClusterListNames

pandora::StringVector lar_content::ShowerGrowingAlgorithm::m_inputClusterListNames
private

The names of the input cluster lists.

Definition at line 145 of file ShowerGrowingAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxVertexLongitudinalDistance

float lar_content::ShowerGrowingAlgorithm::m_maxVertexLongitudinalDistance
private

Vertex association check: max longitudinal distance cut.

Definition at line 155 of file ShowerGrowingAlgorithm.h.

◆ m_maxVertexTransverseDistance

float lar_content::ShowerGrowingAlgorithm::m_maxVertexTransverseDistance
private

Vertex association check: max transverse distance cut.

Definition at line 156 of file ShowerGrowingAlgorithm.h.

◆ m_minCaloHitsPerCluster

unsigned int lar_content::ShowerGrowingAlgorithm::m_minCaloHitsPerCluster
private

The minimum number of calo hits per (seed or branch) cluster.

Definition at line 147 of file ShowerGrowingAlgorithm.h.

◆ m_minVertexLongitudinalDistance

float lar_content::ShowerGrowingAlgorithm::m_minVertexLongitudinalDistance
private

Vertex association check: min longitudinal distance cut.

Definition at line 154 of file ShowerGrowingAlgorithm.h.

◆ m_nearbyClusterDistance

float lar_content::ShowerGrowingAlgorithm::m_nearbyClusterDistance
private

The nearby cluster distance, used for determining cluster associations.

Definition at line 148 of file ShowerGrowingAlgorithm.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_remoteClusterDistance

float lar_content::ShowerGrowingAlgorithm::m_remoteClusterDistance
private

The remote cluster distance, used for determining cluster associations.

Definition at line 149 of file ShowerGrowingAlgorithm.h.

◆ m_type

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

The process type.

Definition at line 88 of file Process.h.

◆ m_vertexAngularAllowance

float lar_content::ShowerGrowingAlgorithm::m_vertexAngularAllowance
private

Vertex association check: pointing angular allowance in degrees.

Definition at line 157 of file ShowerGrowingAlgorithm.h.


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