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

LongitudinalAssociationAlgorithm class. More...

#include "LongitudinalAssociationAlgorithm.h"

Inheritance diagram for lar_content::LongitudinalAssociationAlgorithm:
Collaboration diagram for lar_content::LongitudinalAssociationAlgorithm:

Public Member Functions

 LongitudinalAssociationAlgorithm ()
 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 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

pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
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 PopulateClusterAssociationMap (const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const
 Populate the cluster association map.
 
bool IsExtremalCluster (const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const
 Determine which of two clusters is extremal.
 
bool AreClustersAssociated (const pandora::Cluster *const pInnerCluster, const pandora::Cluster *const pOuterCluster) const
 Determine whether two clusters are associated.
 
bool AreClustersAssociated (const pandora::CartesianVector &innerClusterEnd, const pandora::CartesianVector &outerClusterStart, const pandora::ClusterFitResult &innerFit, const pandora::ClusterFitResult &outerFit) const
 Determine whether two clusters are associated.
 
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

unsigned int m_minClusterLayers
 minimum allowed number of layers for a clean cluster
 
unsigned int m_maxGapLayers
 maximum allowed number of layers between associated clusters
 
unsigned int m_fitLayers
 number of layers to fit at start and end of cluster
 
float m_maxGapDistanceSquared
 maximum allowed distance (squared) between associated clusters
 
float m_minCosRelativeAngle
 maximum allowed relative angle between associated clusters
 
float m_maxTransverseDisplacement
 maximum allowed transverse displacement after extrapolation (normalised to cell size)
 
float m_maxLongitudinalDisplacement
 maximum allowed longitudinal displacement after extrapolation (normalised to cell size)
 
float m_hitSizeZ
 estimated hit size in z (wire number) dimension, units cm
 
float m_hitSizeX
 estimated hit size in x (drift time) dimension, units cm
 
bool m_mergeMade
 
bool m_resolveAmbiguousAssociations
 Whether to resolve ambiguous associations.
 

Detailed Description

Member Typedef Documentation

◆ ClusterAssociationMap

Definition at line 43 of file ClusterAssociationAlgorithm.h.

Constructor & Destructor Documentation

◆ LongitudinalAssociationAlgorithm()

lar_content::LongitudinalAssociationAlgorithm::LongitudinalAssociationAlgorithm ( )

Default constructor.

Definition at line 20 of file LongitudinalAssociationAlgorithm.cc.

Member Function Documentation

◆ AmbiguousPropagation()

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

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:

◆ AreClustersAssociated() [1/2]

bool lar_content::LongitudinalAssociationAlgorithm::AreClustersAssociated ( const pandora::CartesianVector innerClusterEnd,
const pandora::CartesianVector outerClusterStart,
const pandora::ClusterFitResult innerFit,
const pandora::ClusterFitResult outerFit 
) const
private

Determine whether two clusters are associated.

Parameters
innerClusterEndinner cluster end position
outerClusterStartouter cluster start position
innerFitinner cluster fit result
outerFitouter cluster fit result
Returns
whether the clusters are associated

Definition at line 135 of file LongitudinalAssociationAlgorithm.cc.

Here is the call graph for this function:

◆ AreClustersAssociated() [2/2]

bool lar_content::LongitudinalAssociationAlgorithm::AreClustersAssociated ( const pandora::Cluster *const  pInnerCluster,
const pandora::Cluster *const  pOuterCluster 
) const
private

Determine whether two clusters are associated.

Parameters
pInnerClusteraddress of the inner cluster
pOuterClusteraddress of the outer cluster
Returns
whether the clusters are associated

Definition at line 93 of file LongitudinalAssociationAlgorithm.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()

void lar_content::LongitudinalAssociationAlgorithm::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::ClusterAssociationAlgorithm.

Definition at line 35 of file LongitudinalAssociationAlgorithm.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.

◆ 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()

bool lar_content::LongitudinalAssociationAlgorithm::IsExtremalCluster ( const bool  isForward,
const pandora::Cluster *const  pCurrentCluster,
const pandora::Cluster *const  pTestCluster 
) const
privatevirtual

Determine which of two clusters is extremal.

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

Implements lar_content::ClusterAssociationAlgorithm.

Definition at line 77 of file LongitudinalAssociationAlgorithm.cc.

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

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()

void lar_content::LongitudinalAssociationAlgorithm::PopulateClusterAssociationMap ( const pandora::ClusterVector clusterVector,
ClusterAssociationMap clusterAssociationMap 
) const
privatevirtual

Populate the cluster association map.

Parameters
clusterVectorthe cluster vector
clusterAssociationMapto receive the populated cluster association map

Implements lar_content::ClusterAssociationAlgorithm.

Definition at line 52 of file LongitudinalAssociationAlgorithm.cc.

Here is the call graph for this function:

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::ClusterAssociationAlgorithm.

Definition at line 183 of file LongitudinalAssociationAlgorithm.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::ClusterAssociationAlgorithm::Run ( )
protectedvirtualinherited

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
privateinherited

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
privateinherited

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
privateinherited

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_fitLayers

unsigned int lar_content::LongitudinalAssociationAlgorithm::m_fitLayers
private

number of layers to fit at start and end of cluster

Definition at line 62 of file LongitudinalAssociationAlgorithm.h.

◆ m_hitSizeX

float lar_content::LongitudinalAssociationAlgorithm::m_hitSizeX
private

estimated hit size in x (drift time) dimension, units cm

Definition at line 68 of file LongitudinalAssociationAlgorithm.h.

◆ m_hitSizeZ

float lar_content::LongitudinalAssociationAlgorithm::m_hitSizeZ
private

estimated hit size in z (wire number) dimension, units cm

Definition at line 67 of file LongitudinalAssociationAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxGapDistanceSquared

float lar_content::LongitudinalAssociationAlgorithm::m_maxGapDistanceSquared
private

maximum allowed distance (squared) between associated clusters

Definition at line 63 of file LongitudinalAssociationAlgorithm.h.

◆ m_maxGapLayers

unsigned int lar_content::LongitudinalAssociationAlgorithm::m_maxGapLayers
private

maximum allowed number of layers between associated clusters

Definition at line 61 of file LongitudinalAssociationAlgorithm.h.

◆ m_maxLongitudinalDisplacement

float lar_content::LongitudinalAssociationAlgorithm::m_maxLongitudinalDisplacement
private

maximum allowed longitudinal displacement after extrapolation (normalised to cell size)

Definition at line 66 of file LongitudinalAssociationAlgorithm.h.

◆ m_maxTransverseDisplacement

float lar_content::LongitudinalAssociationAlgorithm::m_maxTransverseDisplacement
private

maximum allowed transverse displacement after extrapolation (normalised to cell size)

Definition at line 65 of file LongitudinalAssociationAlgorithm.h.

◆ m_mergeMade

bool lar_content::ClusterAssociationAlgorithm::m_mergeMade
mutableprivateinherited

Definition at line 123 of file ClusterAssociationAlgorithm.h.

◆ m_minClusterLayers

unsigned int lar_content::LongitudinalAssociationAlgorithm::m_minClusterLayers
private

minimum allowed number of layers for a clean cluster

Definition at line 60 of file LongitudinalAssociationAlgorithm.h.

◆ m_minCosRelativeAngle

float lar_content::LongitudinalAssociationAlgorithm::m_minCosRelativeAngle
private

maximum allowed relative angle between associated clusters

Definition at line 64 of file LongitudinalAssociationAlgorithm.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
privateinherited

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: