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

CrossGapsAssociationAlgorithm class. More...

#include "CrossGapsAssociationAlgorithm.h"

Inheritance diagram for lar_content::CrossGapsAssociationAlgorithm:
Collaboration diagram for lar_content::CrossGapsAssociationAlgorithm:

Public Member Functions

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

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 TwoDSlidingFitResult &innerFitResult, const TwoDSlidingFitResult &outerFitResult) const
 Determine whether two clusters are associated.
 
bool IsAssociated (const pandora::CartesianVector &startPosition, const pandora::CartesianVector &startDirection, const TwoDSlidingFitResult &targetFitResult) const
 Sample points along the extrapolation from a starting position to a target fit result to declare cluster association.
 
bool IsNearCluster (const pandora::CartesianVector &samplingPoint, const TwoDSlidingFitResult &targetFitResult) const
 Whether a sampling point lies near a target 2d sliding fit result.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
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_minClusterHits
 The minimum allowed number of hits in a clean cluster.
 
unsigned int m_minClusterLayers
 The minimum allowed number of layers for a clean cluster.
 
unsigned int m_slidingFitWindow
 The layer window for the sliding linear fits.
 
unsigned int m_maxSamplingPoints
 The maximum number of extension sampling points considered per association check.
 
float m_sampleStepSize
 The sampling step size used in association checks, units cm.
 
unsigned int m_maxUnmatchedSampleRun
 The maximum run of unmatched (and non-gap) samples to consider before stopping.
 
float m_maxOnClusterDistance
 The maximum distance between a sampling point and sliding fit to target cluster.
 
unsigned int m_minMatchedSamplingPoints
 Minimum number of matched sampling points to declare association.
 
float m_minMatchedSamplingFraction
 Minimum ratio between matched sampling points and expectation to declare association.
 
float m_gapTolerance
 The tolerance to use when querying whether a sampling point is in a gap, 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

◆ CrossGapsAssociationAlgorithm()

lar_content::CrossGapsAssociationAlgorithm::CrossGapsAssociationAlgorithm ( )

Default constructor.

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

bool lar_content::CrossGapsAssociationAlgorithm::AreClustersAssociated ( const TwoDSlidingFitResult innerFitResult,
const TwoDSlidingFitResult outerFitResult 
) const
private

Determine whether two clusters are associated.

Parameters
innerFitResulttwo dimensional sliding fit result for the inner cluster
outerFitResulttwo dimensional sliding fit result for the outer cluster
Returns
boolean

Definition at line 124 of file CrossGapsAssociationAlgorithm.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::CrossGapsAssociationAlgorithm::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 37 of file CrossGapsAssociationAlgorithm.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:

◆ IsAssociated()

bool lar_content::CrossGapsAssociationAlgorithm::IsAssociated ( const pandora::CartesianVector startPosition,
const pandora::CartesianVector startDirection,
const TwoDSlidingFitResult targetFitResult 
) const
private

Sample points along the extrapolation from a starting position to a target fit result to declare cluster association.

Parameters
startPositionthe start position
startDirectionthe start direction
targetFitResultthe target fit result
Returns
boolean

Definition at line 138 of file CrossGapsAssociationAlgorithm.cc.

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

◆ IsExtremalCluster()

bool lar_content::CrossGapsAssociationAlgorithm::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 108 of file CrossGapsAssociationAlgorithm.cc.

Here is the call graph for this function:

◆ IsNearCluster()

bool lar_content::CrossGapsAssociationAlgorithm::IsNearCluster ( const pandora::CartesianVector samplingPoint,
const TwoDSlidingFitResult targetFitResult 
) const
private

Whether a sampling point lies near a target 2d sliding fit result.

Parameters
samplingPointthe sampling point
targetFitResultthe target fit result
Returns
boolean

Definition at line 178 of file CrossGapsAssociationAlgorithm.cc.

Here is the call graph for this function:
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
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::CrossGapsAssociationAlgorithm::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 59 of file CrossGapsAssociationAlgorithm.cc.

Here is the call graph for this function:

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::ClusterAssociationAlgorithm.

Definition at line 204 of file CrossGapsAssociationAlgorithm.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_gapTolerance

float lar_content::CrossGapsAssociationAlgorithm::m_gapTolerance
private

The tolerance to use when querying whether a sampling point is in a gap, units cm.

Definition at line 79 of file CrossGapsAssociationAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_maxOnClusterDistance

float lar_content::CrossGapsAssociationAlgorithm::m_maxOnClusterDistance
private

The maximum distance between a sampling point and sliding fit to target cluster.

Definition at line 76 of file CrossGapsAssociationAlgorithm.h.

◆ m_maxSamplingPoints

unsigned int lar_content::CrossGapsAssociationAlgorithm::m_maxSamplingPoints
private

The maximum number of extension sampling points considered per association check.

Definition at line 73 of file CrossGapsAssociationAlgorithm.h.

◆ m_maxUnmatchedSampleRun

unsigned int lar_content::CrossGapsAssociationAlgorithm::m_maxUnmatchedSampleRun
private

The maximum run of unmatched (and non-gap) samples to consider before stopping.

Definition at line 75 of file CrossGapsAssociationAlgorithm.h.

◆ m_mergeMade

bool lar_content::ClusterAssociationAlgorithm::m_mergeMade
mutableprivateinherited

Definition at line 123 of file ClusterAssociationAlgorithm.h.

◆ m_minClusterHits

unsigned int lar_content::CrossGapsAssociationAlgorithm::m_minClusterHits
private

The minimum allowed number of hits in a clean cluster.

Definition at line 70 of file CrossGapsAssociationAlgorithm.h.

◆ m_minClusterLayers

unsigned int lar_content::CrossGapsAssociationAlgorithm::m_minClusterLayers
private

The minimum allowed number of layers for a clean cluster.

Definition at line 71 of file CrossGapsAssociationAlgorithm.h.

◆ m_minMatchedSamplingFraction

float lar_content::CrossGapsAssociationAlgorithm::m_minMatchedSamplingFraction
private

Minimum ratio between matched sampling points and expectation to declare association.

Definition at line 78 of file CrossGapsAssociationAlgorithm.h.

◆ m_minMatchedSamplingPoints

unsigned int lar_content::CrossGapsAssociationAlgorithm::m_minMatchedSamplingPoints
private

Minimum number of matched sampling points to declare association.

Definition at line 77 of file CrossGapsAssociationAlgorithm.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_sampleStepSize

float lar_content::CrossGapsAssociationAlgorithm::m_sampleStepSize
private

The sampling step size used in association checks, units cm.

Definition at line 74 of file CrossGapsAssociationAlgorithm.h.

◆ m_slidingFitWindow

unsigned int lar_content::CrossGapsAssociationAlgorithm::m_slidingFitWindow
private

The layer window for the sliding linear fits.

Definition at line 72 of file CrossGapsAssociationAlgorithm.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: