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

CrossedTrackSplittingAlgorithm class. More...

#include "CrossedTrackSplittingAlgorithm.h"

Inheritance diagram for lar_content::CrossedTrackSplittingAlgorithm:
Collaboration diagram for lar_content::CrossedTrackSplittingAlgorithm:

Public Member Functions

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

typedef KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > HitKDTree2D
 
typedef KDTreeNodeInfoT< const pandora::CaloHit *, 2 > HitKDNode2D
 
typedef std::vector< HitKDNode2DHitKDNode2DList
 
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterSetClusterToClustersMap
 
typedef std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > HitToClusterMap
 

Private Member Functions

pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
pandora::StatusCode PreparationStep (const pandora::ClusterVector &clusterVector)
 Perform any preparatory actions, such as caching information for subsequent expensive calculations.
 
pandora::StatusCode TidyUpStep ()
 Tidy up any information cached in e.g. the preparation step.
 
pandora::StatusCode FindBestSplitPosition (const TwoDSlidingFitResult &slidingFit1, const TwoDSlidingFitResult &slidingFit2, pandora::CartesianVector &splitPosition, pandora::CartesianVector &direction1, pandora::CartesianVector &direction2) const
 Find the best split position and direction for a pair of clusters.
 
void FindCandidateSplitPositions (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, pandora::CartesianPointVector &candidateVector) const
 Find average positions of pairs of hits within a maximum separation.
 
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 BuildSlidingFitResultMap (const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const
 Build the map of sliding fit results.
 
void SplitCluster (const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection, pandora::CaloHitList &firstCaloHitList, pandora::CaloHitList &secondCaloHitList) const
 Split cluster at a given position and direction.
 
pandora::StatusCode ReplaceClusters (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &firstDirection, const pandora::CartesianVector &secondDirection) const
 Replace crossed clusters with un-crossed clusters.
 

Private Attributes

float m_maxClusterSeparation
 maximum separation of two clusters
 
float m_maxClusterSeparationSquared
 maximum separation of two clusters (squared)
 
float m_minCosRelativeAngle
 maximum relative angle between tracks after un-crossing
 
float m_searchRegion1D
 Search region, applied to each dimension, for look-up from kd-trees.
 
ClusterToClustersMap m_nearbyClusters
 The nearby clusters map.
 
unsigned int m_halfWindowLayers
 half window layers for sliding linear fot
 
float m_minClusterLength
 minimum length of clusters
 

Detailed Description

Member Typedef Documentation

◆ ClusterToClustersMap

◆ HitKDNode2D

◆ HitKDNode2DList

◆ HitKDTree2D

◆ HitToClusterMap

Definition at line 42 of file CrossedTrackSplittingAlgorithm.h.

Constructor & Destructor Documentation

◆ CrossedTrackSplittingAlgorithm()

lar_content::CrossedTrackSplittingAlgorithm::CrossedTrackSplittingAlgorithm ( )

Default constructor.

Definition at line 23 of file CrossedTrackSplittingAlgorithm.cc.

Member Function Documentation

◆ BuildSlidingFitResultMap()

void lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm::BuildSlidingFitResultMap ( const pandora::ClusterVector clusterVector,
TwoDSlidingFitResultMap slidingFitResultMap 
) const
privateinherited

Build the map of sliding fit results.

Parameters
clusterVectorthe input cluster vector
slidingFitResultMapthe output sliding fit result map

Definition at line 132 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.cc.

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

◆ FindBestSplitPosition()

StatusCode lar_content::CrossedTrackSplittingAlgorithm::FindBestSplitPosition ( const TwoDSlidingFitResult slidingFit1,
const TwoDSlidingFitResult slidingFit2,
pandora::CartesianVector splitPosition,
pandora::CartesianVector direction1,
pandora::CartesianVector direction2 
) const
privatevirtual

Find the best split position and direction for a pair of clusters.

Parameters
slidingFit1the sliding linear fit to the first cluster
slidingFit2the sliding linear fit to the second cluster
splitPositionthe output split position
direction1the output direction of the first new cluster
direction2the output direction of the second new cluster

Implements lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm.

Definition at line 86 of file CrossedTrackSplittingAlgorithm.cc.

Here is the call graph for this function:

◆ FindCandidateSplitPositions()

void lar_content::CrossedTrackSplittingAlgorithm::FindCandidateSplitPositions ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
pandora::CartesianPointVector candidateVector 
) const
private

Find average positions of pairs of hits within a maximum separation.

Parameters
pCluster1the first cluster
pCluster2the second cluster
candidateVectorto receive the average positions

Definition at line 241 of file CrossedTrackSplittingAlgorithm.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::TwoDSlidingFitSplittingAndSwitchingAlgorithm::GetListOfCleanClusters ( const pandora::ClusterList *const  pClusterList,
pandora::ClusterVector clusterVector 
) const
privateinherited

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

Definition at line 115 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.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.

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

◆ PreparationStep()

StatusCode lar_content::CrossedTrackSplittingAlgorithm::PreparationStep ( const pandora::ClusterVector clusterVector)
privatevirtual

Perform any preparatory actions, such as caching information for subsequent expensive calculations.

Parameters
clusterVectorthe cluster vector

Reimplemented from lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm.

Definition at line 33 of file CrossedTrackSplittingAlgorithm.cc.

Here is the call graph for this function:

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Reimplemented from lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm.

Definition at line 274 of file CrossedTrackSplittingAlgorithm.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:

◆ ReplaceClusters()

StatusCode lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm::ReplaceClusters ( const pandora::Cluster *const  pCluster1,
const pandora::Cluster *const  pCluster2,
const pandora::CartesianVector splitPosition,
const pandora::CartesianVector firstDirection,
const pandora::CartesianVector secondDirection 
) const
privateinherited

Replace crossed clusters with un-crossed clusters.

Parameters
pCluster1the first cluster to be deleted
pCluster2the second cluster to be deleted
splitPositionthe split position
firstDirectionthe direction of the first new cluster
secondDirectionthe direction of the second new cluster

Definition at line 182 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.cc.

Here is the call graph for this function:
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::TwoDSlidingFitSplittingAndSwitchingAlgorithm::Run ( )
protectedvirtualinherited

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 29 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.cc.

Here is the call graph for this function:

◆ SplitCluster()

void lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm::SplitCluster ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector splitPosition,
const pandora::CartesianVector splitDirection,
pandora::CaloHitList firstCaloHitList,
pandora::CaloHitList secondCaloHitList 
) const
privateinherited

Split cluster at a given position and direction.

Parameters
pClusterthe cluster
splitPositionthe position at which to split the cluster
splitDirectionthe direction of the un-crossed cluster
firstCaloHitListthe hits to be added to the first new cluster
secondCaloHitListthe hits to be added to the second new cluster

Definition at line 159 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.cc.

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

◆ TidyUpStep()

StatusCode lar_content::CrossedTrackSplittingAlgorithm::TidyUpStep ( )
privatevirtual

Tidy up any information cached in e.g. the preparation step.

Reimplemented from lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm.

Definition at line 77 of file CrossedTrackSplittingAlgorithm.cc.

Member Data Documentation

◆ m_halfWindowLayers

unsigned int lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm::m_halfWindowLayers
privateinherited

half window layers for sliding linear fot

Definition at line 99 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.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::CrossedTrackSplittingAlgorithm::m_maxClusterSeparation
private

maximum separation of two clusters

Definition at line 60 of file CrossedTrackSplittingAlgorithm.h.

◆ m_maxClusterSeparationSquared

float lar_content::CrossedTrackSplittingAlgorithm::m_maxClusterSeparationSquared
private

maximum separation of two clusters (squared)

Definition at line 61 of file CrossedTrackSplittingAlgorithm.h.

◆ m_minClusterLength

float lar_content::TwoDSlidingFitSplittingAndSwitchingAlgorithm::m_minClusterLength
privateinherited

minimum length of clusters

Definition at line 100 of file TwoDSlidingFitSplittingAndSwitchingAlgorithm.h.

◆ m_minCosRelativeAngle

float lar_content::CrossedTrackSplittingAlgorithm::m_minCosRelativeAngle
private

maximum relative angle between tracks after un-crossing

Definition at line 62 of file CrossedTrackSplittingAlgorithm.h.

◆ m_nearbyClusters

ClusterToClustersMap lar_content::CrossedTrackSplittingAlgorithm::m_nearbyClusters
private

The nearby clusters map.

Definition at line 65 of file CrossedTrackSplittingAlgorithm.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_searchRegion1D

float lar_content::CrossedTrackSplittingAlgorithm::m_searchRegion1D
private

Search region, applied to each dimension, for look-up from kd-trees.

Definition at line 64 of file CrossedTrackSplittingAlgorithm.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: