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

TrackMergeRefinementAlgorithm class. More...

#include "TrackMergeRefinementAlgorithm.h"

Inheritance diagram for lar_content::TrackMergeRefinementAlgorithm:
Collaboration diagram for lar_content::TrackMergeRefinementAlgorithm:

Public Member Functions

 TrackMergeRefinementAlgorithm ()
 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::pair< TwoDSlidingFitResultMap *, TwoDSlidingFitResultMap * > SlidingFitResultMapPair
 
typedef std::unordered_map< const pandora::Cluster *, pandora::CaloHitListClusterToCaloHitListMap
 

Protected Member Functions

template<typename T >
void InitialiseContainers (const pandora::ClusterList *pClusterList, const T sortFunction, pandora::ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const
 Fill the cluster vector and sliding fit maps with clusters that are determined to be track-like.
 
bool GetClusterMergingCoordinates (const TwoDSlidingFitResult &clusterMicroFitResult, const TwoDSlidingFitResult &clusterMacroFitResult, const TwoDSlidingFitResult &associatedMacroFitResult, const bool isEndUpstream, pandora::CartesianVector &clusterMergePosition, pandora::CartesianVector &clusterMergeDirection) const
 Get the merging coordinate and direction for an input cluster with respect to an associated cluster.
 
void GetHitsInBoundingBox (const pandora::CartesianVector &firstCorner, const pandora::CartesianVector &secondCorner, const pandora::ClusterList *const pClusterList, ClusterToCaloHitListMap &clusterToCaloHitListMap, const pandora::ClusterList &unavailableProtectedClusters=pandora::ClusterList(), const float distanceToLine=-1.f) const
 Find the unprotected hits that are contained within a defined box with the option to apply a cut on the distance to the connecting line.
 
bool IsInBoundingBox (const float minX, const float maxX, const float minZ, const float maxZ, const pandora::CartesianVector &hitPosition) const
 check whether a hit is contained within a defined square region
 
bool IsCloseToLine (const pandora::CartesianVector &hitPosition, const pandora::CartesianVector &lineStart, const pandora::CartesianVector &lineDirection, const float distanceToLine) const
 Check whether a hit is close to a line.
 
bool AreExtrapolatedHitsGood (const ClusterToCaloHitListMap &clusterToCaloHitListMap, ClusterAssociation &clusterAssociation) const
 Perform topological checks on the collected hits to ensure no gaps are present.
 
bool IsNearBoundary (const pandora::CaloHit *const pCaloHit, const pandora::CartesianVector &boundaryPosition2D, const float boundaryTolerance) const
 Check whether a hit is close to a boundary point.
 
bool IsTrackContinuous (const ClusterAssociation &clusterAssociation, const pandora::CaloHitVector &extrapolatedCaloHitVector) const
 Check whether the extrapolatedCaloHitVector contains a continuous line of hits between the cluster merge points.
 
void GetTrackSegmentBoundaries (const ClusterAssociation &clusterAssociation, pandora::CartesianPointVector &trackSegmentBoundaries) const
 Obtain the segment boundaries of the connecting line to test whether extrapolated hits are continuous.
 
void RepositionIfInGap (const pandora::CartesianVector &mergeDirection, pandora::CartesianVector &trackPoint) const
 Move an input position to the higher line gap edge if it lies within a gap.
 
float DistanceInGap (const pandora::CartesianVector &upstreamPoint, const pandora::CartesianVector &downstreamPoint, const pandora::CartesianVector &connectingLine, pandora::DetectorGapList &consideredGaps) const
 Calculate the track length between two points that lies in gaps.
 
bool IsInLineSegment (const pandora::CartesianVector &lowerBoundary, const pandora::CartesianVector &upperBoundary, const pandora::CartesianVector &point) const
 Whether a position falls within a specified segment of the cluster connecting line.
 
const pandora::ClusterRemoveOffAxisHitsFromTrack (const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition, const bool isEndUpstream, const ClusterToCaloHitListMap &clusterToCaloHitListMap, pandora::ClusterList &remnantClusterList, TwoDSlidingFitResultMap &microSlidingFitResultMap, TwoDSlidingFitResultMap &macroSlidingFitResultMap) const
 Remove any hits in the upstream/downstream cluster that lie off of the main track axis (i.e. clustering errors)
 
void AddHitsToMainTrack (const pandora::Cluster *const pMainTrackCluster, const pandora::Cluster *const pShowerTrackCluster, const pandora::CaloHitList &caloHitsToMerge, const ClusterAssociation &clusterAssociation, pandora::ClusterList &remnantClusterList) const
 Remove the hits from a shower cluster that belong to the main track and add them into the main track cluster.
 
void ProcessRemnantClusters (const pandora::ClusterList &remnantClusterList, const pandora::Cluster *const pMainTrackCluster, const pandora::ClusterList *const pClusterList, pandora::ClusterList &createdClusters) const
 Process the remnant clusters separating those that stradle the main track.
 
bool AddToNearestCluster (const pandora::Cluster *const pClusterToMerge, const pandora::Cluster *const pMainTrackCluster, const pandora::ClusterList *const pClusterList) const
 Add a cluster to the nearest cluster satisfying separation distance thresholds.
 
bool IsClusterRemnantDisconnected (const pandora::Cluster *const pRemnantCluster) const
 Whether a remnant cluster is considered to be disconnected and therefore should undergo further fragmentation.
 
void FragmentRemnantCluster (const pandora::Cluster *const pRemnantCluster, pandora::ClusterList &fragmentedClusterList) const
 Fragment a cluster using simple hit separation logic.
 
template<typename T >
void UpdateContainers (const pandora::ClusterList &clustersToAdd, const pandora::ClusterList &clustersToDelete, const T sortFunction, pandora::ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const
 Remove deleted clusters from the cluster vector and sliding fit maps and add in created clusters that are determined to be track-like.
 
void RemoveClusterFromContainers (const pandora::Cluster *const pClustertoRemove, pandora::ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const
 Remove a cluster from the cluster vector and sliding fit maps.
 
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

float m_minClusterLength
 The minimum length of a considered cluster.
 
unsigned int m_microSlidingFitWindow
 The sliding fit window used in the fits contained within the microSlidingFitResultMap.
 
unsigned int m_macroSlidingFitWindow
 The sliding fit window used in the fits contained within the macroSlidingFitResultMap.
 
float m_stableRegionClusterFraction
 The threshold fraction of fit contributing layers which defines the stable region.
 
float m_mergePointMinCosAngleDeviation
 The threshold cos opening angle between the cluster local gradient and the associated cluster global gradient used to determine merge points.
 
float m_minHitFractionForHitRemoval
 The threshold fraction of hits to be removed from the cluster for hit removal to proceed.
 
float m_maxDistanceFromMainTrack
 The threshold distance for a hit to be added to the main track.
 
float m_maxHitDistanceFromCluster
 The threshold separation between a hit and cluster for the hit to be merged into the cluster.
 
float m_maxHitSeparationForConnectedCluster
 The maximum separation between two adjacent (in z) hits in a connected cluster.
 
unsigned int m_maxTrackGaps
 The maximum number of graps allowed in the extrapolated hit vector.
 
float m_lineSegmentLength
 The length of a track gap.
 
bool m_hitWidthMode
 Whether to consider the width of hits.
 
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.
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 
bool FindBestClusterAssociation (const pandora::ClusterVector &clusterVector, const SlidingFitResultMapPair &slidingFitResultMapPair, ClusterPairAssociation &clusterAssociation) const
 Find the best cluster association.
 
bool AreClustersAssociated (const pandora::CartesianVector &upstreamPoint, const pandora::CartesianVector &upstreamDirection, const pandora::CartesianVector &downstreamPoint, const pandora::CartesianVector &downstreamDirection) const
 Whether two clusters are assoicated to one another.
 
void GetUnavailableProtectedClusters (const ClusterPairAssociation &clusterAssociation, const pandora::ClusterList &createdMainTrackClusters, pandora::ClusterList &unavailableProtectedClusters) const
 Obtain a list of clusters whos hits are protected and cannot be reassigned.
 
bool AreExtrapolatedHitsNearBoundaries (const pandora::CaloHitVector &extrapolatedHitVector, ClusterAssociation &clusterAssociation) const
 Check the separation of the extremal extrapolated hits with the cluster merge points or, in the case of no hits, the cluster merge point separation.
 
void ConsiderClusterAssociation (const ClusterPairAssociation &clusterAssociation, pandora::ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const
 Remove the cluster association from the cluster vector so that the same cluster pair is not considered again.
 
const pandora::ClusterCreateMainTrack (const ClusterPairAssociation &clusterAssociation, const ClusterToCaloHitListMap &clusterToCaloHitListMap, const pandora::ClusterList *pClusterList, pandora::ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const
 Refine the cluster endpoints and merge together the associated clusters alongside any extrapolated hits.
 

Private Attributes

unsigned int m_maxLoopIterations
 The maximum number of main loop iterations.
 
float m_minClusterLengthSum
 The threshold cluster and associated cluster length sum.
 
float m_minSeparationDistance
 The threshold separation distance between associated clusters.
 
float m_minDirectionDeviationCosAngle
 The threshold cos opening angle of the associated cluster directions.
 
float m_maxPredictedMergePointOffset
 The threshold separation distance between the predicted and true cluster merge points.
 
float m_distanceToLine
 The threshold hit distance of an extrapolated hit from the segment connecting line.
 
float m_boundaryTolerance
 The maximum allowed distance of an extremal extrapolate hit to a cluster merge point.
 

Detailed Description

Member Typedef Documentation

◆ ClusterToCaloHitListMap

Definition at line 31 of file TrackRefinementBaseAlgorithm.h.

◆ SlidingFitResultMapPair

Constructor & Destructor Documentation

◆ TrackMergeRefinementAlgorithm()

lar_content::TrackMergeRefinementAlgorithm::TrackMergeRefinementAlgorithm ( )

Default constructor.

Definition at line 21 of file TrackMergeRefinementAlgorithm.cc.

Member Function Documentation

◆ AddHitsToMainTrack()

void lar_content::TrackRefinementBaseAlgorithm::AddHitsToMainTrack ( const pandora::Cluster *const  pMainTrackCluster,
const pandora::Cluster *const  pShowerTrackCluster,
const pandora::CaloHitList caloHitsToMerge,
const ClusterAssociation clusterAssociation,
pandora::ClusterList remnantClusterList 
) const
protectedinherited

Remove the hits from a shower cluster that belong to the main track and add them into the main track cluster.

Parameters
pMainTrackClusterthe main track cluster
pShowerClusterthe input shower cluster
caloHitsToMergethe list of calo hits to remove from the shower cluster
clusterAssociationthe clusterAssociation
remnantClusterListthe input list to store the remnant clusters

Definition at line 573 of file TrackRefinementBaseAlgorithm.cc.

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

◆ AddToNearestCluster()

bool lar_content::TrackRefinementBaseAlgorithm::AddToNearestCluster ( const pandora::Cluster *const  pClusterToMerge,
const pandora::Cluster *const  pMainTrackCluster,
const pandora::ClusterList *const  pClusterList 
) const
protectedinherited

Add a cluster to the nearest cluster satisfying separation distance thresholds.

Parameters
pClusterToMergethe cluster to merge
pMainTrackClusterthe main track cluster
pClusterListthe list of all clusters
Returns
whether cluster was added to a nearby cluster

Definition at line 668 of file TrackRefinementBaseAlgorithm.cc.

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

◆ AreClustersAssociated()

bool lar_content::TrackMergeRefinementAlgorithm::AreClustersAssociated ( const pandora::CartesianVector upstreamPoint,
const pandora::CartesianVector upstreamDirection,
const pandora::CartesianVector downstreamPoint,
const pandora::CartesianVector downstreamDirection 
) const
private

Whether two clusters are assoicated to one another.

Parameters
upstreamPointthe merge point of the upstream cluster
upstreamDirectionthe local direction of the upstream cluster at the merge point
downstreamPointthe merge point of the downstream cluster
downstreamDirectionthe local direction of the downstrean cluster at the merge point
Returns
whether the clusters are associated

Definition at line 175 of file TrackMergeRefinementAlgorithm.cc.

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

◆ AreExtrapolatedHitsGood()

bool lar_content::TrackRefinementBaseAlgorithm::AreExtrapolatedHitsGood ( const ClusterToCaloHitListMap clusterToCaloHitListMap,
ClusterAssociation clusterAssociation 
) const
protectedinherited

Perform topological checks on the collected hits to ensure no gaps are present.

Parameters
clusterToCaloHitListMapthe input map [parent cluster -> list of hits which belong to the main track]
clusterAssociationthe clusterAssociation
Returns
whether the checks pass

Definition at line 188 of file TrackRefinementBaseAlgorithm.cc.

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

◆ AreExtrapolatedHitsNearBoundaries()

bool lar_content::TrackMergeRefinementAlgorithm::AreExtrapolatedHitsNearBoundaries ( const pandora::CaloHitVector extrapolatedHitVector,
ClusterAssociation clusterAssociation 
) const
privatevirtual

Check the separation of the extremal extrapolated hits with the cluster merge points or, in the case of no hits, the cluster merge point separation.

Parameters
extrapolatedHitVectorthe extrapolated hit vector (ordered closest hit to the upstream merge point -> furthest hit)
clusterAssociationthe cluster association
Returns
whether the checks pass

Implements lar_content::TrackRefinementBaseAlgorithm.

Definition at line 217 of file TrackMergeRefinementAlgorithm.cc.

Here is the call graph for this function:

◆ ConsiderClusterAssociation()

void lar_content::TrackMergeRefinementAlgorithm::ConsiderClusterAssociation ( const ClusterPairAssociation clusterAssociation,
pandora::ClusterVector clusterVector,
SlidingFitResultMapPair slidingFitResultMapPair 
) const
private

Remove the cluster association from the cluster vector so that the same cluster pair is not considered again.

Parameters
clusterAssociationthe cluster pair association
clusterVectorthe vector of clusters considered in future iterations of the algorithm
slidingFitResultMapPairthe {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps

Definition at line 236 of file TrackMergeRefinementAlgorithm.cc.

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

◆ CreateMainTrack()

const Cluster * lar_content::TrackMergeRefinementAlgorithm::CreateMainTrack ( const ClusterPairAssociation clusterAssociation,
const ClusterToCaloHitListMap clusterToCaloHitListMap,
const pandora::ClusterList pClusterList,
pandora::ClusterVector clusterVector,
SlidingFitResultMapPair slidingFitResultMapPair 
) const
private

Refine the cluster endpoints and merge together the associated clusters alongside any extrapolated hits.

Parameters
clusterAssociationthe cluster pair association
clusterToCaloHitListMapthe map [parent cluster -> list of hits which belong to the main track]
pClusterListthe list of all clusters
clusterVectorthe vector of clusters considered in future iterations of the algorithm
slidingFitResultMapPairthe {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps
Returns
the address of the created main track cluster

Definition at line 246 of file TrackMergeRefinementAlgorithm.cc.

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

◆ DistanceInGap()

float lar_content::TrackRefinementBaseAlgorithm::DistanceInGap ( const pandora::CartesianVector upstreamPoint,
const pandora::CartesianVector downstreamPoint,
const pandora::CartesianVector connectingLine,
pandora::DetectorGapList consideredGaps 
) const
protectedinherited

Calculate the track length between two points that lies in gaps.

Parameters
upstreamPointthe upstream point
downstreamPointthe downstream point
connectingLinethe track direction
consideredGapsthe list of gaps to ignore

Definition at line 385 of file TrackRefinementBaseAlgorithm.cc.

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

◆ FindBestClusterAssociation()

bool lar_content::TrackMergeRefinementAlgorithm::FindBestClusterAssociation ( const pandora::ClusterVector clusterVector,
const SlidingFitResultMapPair slidingFitResultMapPair,
ClusterPairAssociation clusterAssociation 
) const
private

Find the best cluster association.

Parameters
clusterVectorthe vector of clusters to consider
slidingFitResultMapPairthe {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps
clusterAssociationthe cluster pair association
Returns
whether a cluster pair association was found

Definition at line 91 of file TrackMergeRefinementAlgorithm.cc.

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

◆ FragmentRemnantCluster()

void lar_content::TrackRefinementBaseAlgorithm::FragmentRemnantCluster ( const pandora::Cluster *const  pRemnantCluster,
pandora::ClusterList fragmentedClusterList 
) const
protectedinherited

Fragment a cluster using simple hit separation logic.

Parameters
pRemnantClusterthe input remnant cluster to fragment
fragmentedClusterListthe input list to store the final remnant clusters

Definition at line 731 of file TrackRefinementBaseAlgorithm.cc.

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

◆ GetClusterMergingCoordinates()

bool lar_content::TrackRefinementBaseAlgorithm::GetClusterMergingCoordinates ( const TwoDSlidingFitResult clusterMicroFitResult,
const TwoDSlidingFitResult clusterMacroFitResult,
const TwoDSlidingFitResult associatedMacroFitResult,
const bool  isEndUpstream,
pandora::CartesianVector clusterMergePosition,
pandora::CartesianVector clusterMergeDirection 
) const
protectedinherited

Get the merging coordinate and direction for an input cluster with respect to an associated cluster.

Parameters
clusterMicroFitResultthe local TwoDSlidingFitResult of the cluster
clusterMacroFitResultthe global TwoDSlidingFitResult of the cluster
associatedMacroFitReultthe global TwoDSlidingFitResult of the associated cluster
isEndUpstreamwhether the sought cluster merge point is the upstream
clusterMergePositionthe merge position of the cluster
clusterMergeDirectionthe merge direction of the cluster
Returns
whether it was possible to find a suitable merge position

Definition at line 69 of file TrackRefinementBaseAlgorithm.cc.

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

◆ GetHitsInBoundingBox()

void lar_content::TrackRefinementBaseAlgorithm::GetHitsInBoundingBox ( const pandora::CartesianVector firstCorner,
const pandora::CartesianVector secondCorner,
const pandora::ClusterList *const  pClusterList,
ClusterToCaloHitListMap clusterToCaloHitListMap,
const pandora::ClusterList unavailableProtectedClusters = pandora::ClusterList(),
const float  distanceToLine = -1.f 
) const
protectedinherited

Find the unprotected hits that are contained within a defined box with the option to apply a cut on the distance to the connecting line.

Parameters
firstCornerthe position of one corner
secondCornerthe position of the opposite corner
pClusterListthe list of all clusters
clusterToCaloHitListMapthe output map [parent cluster -> list of hits which belong to the main track]
unavailableProtectedClustersthe list of clusters whose hits are protected
distanceToLinethe maximum perpendicular distance of a collected hit from the connecting line

Definition at line 130 of file TrackRefinementBaseAlgorithm.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.

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

◆ GetTrackSegmentBoundaries()

void lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries ( const ClusterAssociation clusterAssociation,
pandora::CartesianPointVector trackSegmentBoundaries 
) const
protectedinherited

Obtain the segment boundaries of the connecting line to test whether extrapolated hits are continuous.

Parameters
clusterAssociationthe clusterAssociation
trackSegmentBoundariesthe output vector of segment boundaries

Definition at line 275 of file TrackRefinementBaseAlgorithm.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.

◆ GetUnavailableProtectedClusters()

void lar_content::TrackMergeRefinementAlgorithm::GetUnavailableProtectedClusters ( const ClusterPairAssociation clusterAssociation,
const pandora::ClusterList createdMainTrackClusters,
pandora::ClusterList unavailableProtectedClusters 
) const
private

Obtain a list of clusters whos hits are protected and cannot be reassigned.

Parameters
clusterAssociationthe clusterPairAssociation
createdMainTrackClustersthe list of main track clusters that have hitherto collected
unavailableProtectedClustersthe output list of protected clusters

Definition at line 205 of file TrackMergeRefinementAlgorithm.cc.

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

◆ InitialiseContainers()

template<typename T >
template void lar_content::TrackRefinementBaseAlgorithm::InitialiseContainers< SortFunction > ( const pandora::ClusterList pClusterList,
const T  sortFunction,
pandora::ClusterVector clusterVector,
SlidingFitResultMapPair slidingFitResultMapPair 
) const
protectedinherited

Fill the cluster vector and sliding fit maps with clusters that are determined to be track-like.

Parameters
pClusterListthe list of input clusters
sortFunctionthe sort class or function used to sort the clusterVector
clusterVectorthe input vector to store clusters considered within the algorithm
slidingFitResultMapPairthe {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps

Definition at line 40 of file TrackRefinementBaseAlgorithm.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:

◆ IsCloseToLine()

bool lar_content::TrackRefinementBaseAlgorithm::IsCloseToLine ( const pandora::CartesianVector hitPosition,
const pandora::CartesianVector lineStart,
const pandora::CartesianVector lineDirection,
const float  distanceToLine 
) const
protectedinherited

Check whether a hit is close to a line.

Parameters
hitPositionthe position of the hit
lineStartthe start point of the line (can actually be any point on the line)
lineDirectionthe unit vector of the line direction
distanceToLinethe definition of 'close'
Returns
whether the hit is close to the line

Definition at line 178 of file TrackRefinementBaseAlgorithm.cc.

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

◆ IsClusterRemnantDisconnected()

bool lar_content::TrackRefinementBaseAlgorithm::IsClusterRemnantDisconnected ( const pandora::Cluster *const  pRemnantCluster) const
protectedinherited

Whether a remnant cluster is considered to be disconnected and therefore should undergo further fragmentation.

Parameters
pRemnantClusterthe input remnant cluster
Returns
whether the remnant cluster is disconnected

Definition at line 702 of file TrackRefinementBaseAlgorithm.cc.

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

◆ IsInBoundingBox()

bool lar_content::TrackRefinementBaseAlgorithm::IsInBoundingBox ( const float  minX,
const float  maxX,
const float  minZ,
const float  maxZ,
const pandora::CartesianVector hitPosition 
) const
protectedinherited

check whether a hit is contained within a defined square region

Parameters
minXthe minimum x coordinate of the square region
maxXthe maximum x coordinate of the square region
minZthe minimum z coordinate of the square region
maxZthe maximum z coordinate of the square region
hitPositionthe position of the hit
Returns
whether the hit is contained within the square region

Definition at line 170 of file TrackRefinementBaseAlgorithm.cc.

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

◆ IsInLineSegment()

bool lar_content::TrackRefinementBaseAlgorithm::IsInLineSegment ( const pandora::CartesianVector lowerBoundary,
const pandora::CartesianVector upperBoundary,
const pandora::CartesianVector point 
) const
protectedinherited

Whether a position falls within a specified segment of the cluster connecting line.

Parameters
lowerBoundarythe lower boundary of the segment
upperBoundarythe upper boundary of the segment
pointthe position
Returns
whether the position falls within segment

Definition at line 472 of file TrackRefinementBaseAlgorithm.cc.

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

◆ IsNearBoundary()

bool lar_content::TrackRefinementBaseAlgorithm::IsNearBoundary ( const pandora::CaloHit *const  pCaloHit,
const pandora::CartesianVector boundaryPosition2D,
const float  boundaryTolerance 
) const
protectedinherited

Check whether a hit is close to a boundary point.

Parameters
pCaloHitthe input calo hit
boundaryPosition2Dthe position of the 2D boundary point
boundaryTolerancethe definition of close
Returns
whether the check passes

Definition at line 212 of file TrackRefinementBaseAlgorithm.cc.

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

◆ IsTrackContinuous()

bool lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous ( const ClusterAssociation clusterAssociation,
const pandora::CaloHitVector extrapolatedCaloHitVector 
) const
protectedinherited

Check whether the extrapolatedCaloHitVector contains a continuous line of hits between the cluster merge points.

Parameters
clusterAssociationthe clusterAssociation
extrapolatedCaloHitVectorthe vector of extrapolated calo hits
Returns
whether the calo hits are continuous

Definition at line 221 of file TrackRefinementBaseAlgorithm.cc.

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

◆ ProcessRemnantClusters()

void lar_content::TrackRefinementBaseAlgorithm::ProcessRemnantClusters ( const pandora::ClusterList remnantClusterList,
const pandora::Cluster *const  pMainTrackCluster,
const pandora::ClusterList *const  pClusterList,
pandora::ClusterList createdClusters 
) const
protectedinherited

Process the remnant clusters separating those that stradle the main track.

Parameters
remnantClusterListthe list of remnant clusters to process
pMainTrackClusterthe main track cluster
pClusterListthe list of all clusters
createdClustersthe input list to store the final remnant clusters

Definition at line 641 of file TrackRefinementBaseAlgorithm.cc.

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

◆ ReadSettings()

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

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements lar_content::TrackRefinementBaseAlgorithm.

Definition at line 291 of file TrackMergeRefinementAlgorithm.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:

◆ RemoveClusterFromContainers()

void lar_content::TrackRefinementBaseAlgorithm::RemoveClusterFromContainers ( const pandora::Cluster *const  pClustertoRemove,
pandora::ClusterVector clusterVector,
SlidingFitResultMapPair slidingFitResultMapPair 
) const
protectedinherited

Remove a cluster from the cluster vector and sliding fit maps.

Parameters
pClustertoRemovethe clusters to remove from the containers
clusterVectorthe vector to store clusters considered within the algorithm
slidingFitResultMapPairthe {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps

Definition at line 805 of file TrackRefinementBaseAlgorithm.cc.

Here is the caller graph for this function:

◆ RemoveOffAxisHitsFromTrack()

const Cluster * lar_content::TrackRefinementBaseAlgorithm::RemoveOffAxisHitsFromTrack ( const pandora::Cluster *const  pCluster,
const pandora::CartesianVector splitPosition,
const bool  isEndUpstream,
const ClusterToCaloHitListMap clusterToCaloHitListMap,
pandora::ClusterList remnantClusterList,
TwoDSlidingFitResultMap microSlidingFitResultMap,
TwoDSlidingFitResultMap macroSlidingFitResultMap 
) const
protectedinherited

Remove any hits in the upstream/downstream cluster that lie off of the main track axis (i.e. clustering errors)

Parameters
pClusterthe input cluster
splitPositionthe position after which hits are considered for removal
isEndUpstreamwhether the upstream end is to be refined
clusterToCaloHitListMapthe map [parent cluster -> list of hits which belong to the main track]
remnantClusterListthe input list to store the remnant clusters
microSlidingFitResultMapthe mapping [cluster -> TwoDSlidingFitResult] where fits correspond to local gradients
macroSlidingFitResultMapthe mapping [cluster -> TwoDSlidingFitResult] where fits correspond to global cluster gradients
Returns
the address of the (possibly) modified cluster

Definition at line 496 of file TrackRefinementBaseAlgorithm.cc.

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

◆ RepositionIfInGap()

void lar_content::TrackRefinementBaseAlgorithm::RepositionIfInGap ( const pandora::CartesianVector mergeDirection,
pandora::CartesianVector trackPoint 
) const
protectedinherited

Move an input position to the higher line gap edge if it lies within a gap.

Parameters
mergeDirectionthe direction of the track
trackPointthe input position

Definition at line 341 of file TrackRefinementBaseAlgorithm.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::TrackMergeRefinementAlgorithm::Run ( )
privatevirtual

Run the algorithm.

Implements lar_content::TrackRefinementBaseAlgorithm.

Definition at line 34 of file TrackMergeRefinementAlgorithm.cc.

Here is the call graph for this function:

◆ UpdateContainers()

template<typename T >
template void lar_content::TrackRefinementBaseAlgorithm::UpdateContainers< SortFunction > ( const pandora::ClusterList clustersToAdd,
const pandora::ClusterList clustersToDelete,
const T  sortFunction,
pandora::ClusterVector clusterVector,
SlidingFitResultMapPair slidingFitResultMapPair 
) const
protectedinherited

Remove deleted clusters from the cluster vector and sliding fit maps and add in created clusters that are determined to be track-like.

Parameters
clustersToAddthe list of clusters to add to the containers
clustersToDeletethe list of clusters to remove from the containers
sortFunctionthe sort class or function used to sort the clusterVector
clusterVectorthe vector to store clusters considered within the algorithm
slidingFitResultMapPairthe {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps

Definition at line 793 of file TrackRefinementBaseAlgorithm.cc.

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

Member Data Documentation

◆ m_boundaryTolerance

float lar_content::TrackMergeRefinementAlgorithm::m_boundaryTolerance
private

The maximum allowed distance of an extremal extrapolate hit to a cluster merge point.

Definition at line 105 of file TrackMergeRefinementAlgorithm.h.

◆ m_distanceToLine

float lar_content::TrackMergeRefinementAlgorithm::m_distanceToLine
private

The threshold hit distance of an extrapolated hit from the segment connecting line.

Definition at line 104 of file TrackMergeRefinementAlgorithm.h.

◆ m_hitWidthMode

bool lar_content::TrackRefinementBaseAlgorithm::m_hitWidthMode
protectedinherited

Whether to consider the width of hits.

Definition at line 318 of file TrackRefinementBaseAlgorithm.h.

◆ m_instanceName

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

The process instance name.

Definition at line 89 of file Process.h.

◆ m_lineSegmentLength

float lar_content::TrackRefinementBaseAlgorithm::m_lineSegmentLength
protectedinherited

The length of a track gap.

Definition at line 317 of file TrackRefinementBaseAlgorithm.h.

◆ m_macroSlidingFitWindow

unsigned int lar_content::TrackRefinementBaseAlgorithm::m_macroSlidingFitWindow
protectedinherited

The sliding fit window used in the fits contained within the macroSlidingFitResultMap.

Definition at line 309 of file TrackRefinementBaseAlgorithm.h.

◆ m_maxDistanceFromMainTrack

float lar_content::TrackRefinementBaseAlgorithm::m_maxDistanceFromMainTrack
protectedinherited

The threshold distance for a hit to be added to the main track.

Definition at line 313 of file TrackRefinementBaseAlgorithm.h.

◆ m_maxHitDistanceFromCluster

float lar_content::TrackRefinementBaseAlgorithm::m_maxHitDistanceFromCluster
protectedinherited

The threshold separation between a hit and cluster for the hit to be merged into the cluster.

Definition at line 314 of file TrackRefinementBaseAlgorithm.h.

◆ m_maxHitSeparationForConnectedCluster

float lar_content::TrackRefinementBaseAlgorithm::m_maxHitSeparationForConnectedCluster
protectedinherited

The maximum separation between two adjacent (in z) hits in a connected cluster.

Definition at line 315 of file TrackRefinementBaseAlgorithm.h.

◆ m_maxLoopIterations

unsigned int lar_content::TrackMergeRefinementAlgorithm::m_maxLoopIterations
private

The maximum number of main loop iterations.

Definition at line 99 of file TrackMergeRefinementAlgorithm.h.

◆ m_maxPredictedMergePointOffset

float lar_content::TrackMergeRefinementAlgorithm::m_maxPredictedMergePointOffset
private

The threshold separation distance between the predicted and true cluster merge points.

Definition at line 103 of file TrackMergeRefinementAlgorithm.h.

◆ m_maxTrackGaps

unsigned int lar_content::TrackRefinementBaseAlgorithm::m_maxTrackGaps
protectedinherited

The maximum number of graps allowed in the extrapolated hit vector.

Definition at line 316 of file TrackRefinementBaseAlgorithm.h.

◆ m_mergePointMinCosAngleDeviation

float lar_content::TrackRefinementBaseAlgorithm::m_mergePointMinCosAngleDeviation
protectedinherited

The threshold cos opening angle between the cluster local gradient and the associated cluster global gradient used to determine merge points.

Definition at line 311 of file TrackRefinementBaseAlgorithm.h.

◆ m_microSlidingFitWindow

unsigned int lar_content::TrackRefinementBaseAlgorithm::m_microSlidingFitWindow
protectedinherited

The sliding fit window used in the fits contained within the microSlidingFitResultMap.

Definition at line 308 of file TrackRefinementBaseAlgorithm.h.

◆ m_minClusterLength

float lar_content::TrackRefinementBaseAlgorithm::m_minClusterLength
protectedinherited

The minimum length of a considered cluster.

Definition at line 307 of file TrackRefinementBaseAlgorithm.h.

◆ m_minClusterLengthSum

float lar_content::TrackMergeRefinementAlgorithm::m_minClusterLengthSum
private

The threshold cluster and associated cluster length sum.

Definition at line 100 of file TrackMergeRefinementAlgorithm.h.

◆ m_minDirectionDeviationCosAngle

float lar_content::TrackMergeRefinementAlgorithm::m_minDirectionDeviationCosAngle
private

The threshold cos opening angle of the associated cluster directions.

Definition at line 102 of file TrackMergeRefinementAlgorithm.h.

◆ m_minHitFractionForHitRemoval

float lar_content::TrackRefinementBaseAlgorithm::m_minHitFractionForHitRemoval
protectedinherited

The threshold fraction of hits to be removed from the cluster for hit removal to proceed.

Definition at line 312 of file TrackRefinementBaseAlgorithm.h.

◆ m_minSeparationDistance

float lar_content::TrackMergeRefinementAlgorithm::m_minSeparationDistance
private

The threshold separation distance between associated clusters.

Definition at line 101 of file TrackMergeRefinementAlgorithm.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_stableRegionClusterFraction

float lar_content::TrackRefinementBaseAlgorithm::m_stableRegionClusterFraction
protectedinherited

The threshold fraction of fit contributing layers which defines the stable region.

Definition at line 310 of file TrackRefinementBaseAlgorithm.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: