LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
TrackMergeRefinementAlgorithm class. More...
#include "TrackMergeRefinementAlgorithm.h"
Public Member Functions | |
TrackMergeRefinementAlgorithm () | |
Default constructor. More... | |
template<typename T > | |
void | InitialiseContainers (const ClusterList *pClusterList, const T sortFunction, ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const |
template<typename T > | |
void | UpdateContainers (const ClusterList &clustersToAdd, const ClusterList &clustersToDelete, const T sortFunction, ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const |
Protected Types | |
typedef std::pair< TwoDSlidingFitResultMap *, TwoDSlidingFitResultMap * > | SlidingFitResultMapPair |
typedef std::unordered_map< const pandora::Cluster *, pandora::CaloHitList > | ClusterToCaloHitListMap |
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. More... | |
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. More... | |
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. More... | |
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 More... | |
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. More... | |
bool | AreExtrapolatedHitsGood (const ClusterToCaloHitListMap &clusterToCaloHitListMap, ClusterAssociation &clusterAssociation) const |
Perform topological checks on the collected hits to ensure no gaps are present. More... | |
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. More... | |
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. More... | |
void | GetTrackSegmentBoundaries (const ClusterAssociation &clusterAssociation, pandora::CartesianPointVector &trackSegmentBoundaries) const |
Obtain the segment boundaries of the connecting line to test whether extrapolated hits are continuous. More... | |
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. More... | |
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. More... | |
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. More... | |
const pandora::Cluster * | RemoveOffAxisHitsFromTrack (const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition, const bool isEndUpstream, const ClusterToCaloHitListMap &clusterToCaloHitListMap, pandora::ClusterList &remnantClusterList, TwoDSlidingFitResultMap µSlidingFitResultMap, TwoDSlidingFitResultMap ¯oSlidingFitResultMap) const |
Remove any hits in the upstream/downstream cluster that lie off of the main track axis (i.e. clustering errors) More... | |
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. More... | |
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. More... | |
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. More... | |
bool | IsClusterRemnantDisconnected (const pandora::Cluster *const pRemnantCluster) const |
Whether a remnant cluster is considered to be disconnected and therefore should undergo further fragmentation. More... | |
void | FragmentRemnantCluster (const pandora::Cluster *const pRemnantCluster, pandora::ClusterList &fragmentedClusterList) const |
Fragment a cluster using simple hit separation logic. More... | |
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. More... | |
void | RemoveClusterFromContainers (const pandora::Cluster *const pClustertoRemove, pandora::ClusterVector &clusterVector, SlidingFitResultMapPair &slidingFitResultMapPair) const |
Remove a cluster from the cluster vector and sliding fit maps. More... | |
Protected Attributes | |
float | m_minClusterLength |
The minimum length of a considered cluster. More... | |
unsigned int | m_microSlidingFitWindow |
The sliding fit window used in the fits contained within the microSlidingFitResultMap. More... | |
unsigned int | m_macroSlidingFitWindow |
The sliding fit window used in the fits contained within the macroSlidingFitResultMap. More... | |
float | m_stableRegionClusterFraction |
The threshold fraction of fit contributing layers which defines the stable region. More... | |
float | m_mergePointMinCosAngleDeviation |
The threshold cos opening angle between the cluster local gradient and the associated cluster global gradient used to determine merge points. More... | |
float | m_minHitFractionForHitRemoval |
The threshold fraction of hits to be removed from the cluster for hit removal to proceed. More... | |
float | m_maxDistanceFromMainTrack |
The threshold distance for a hit to be added to the main track. More... | |
float | m_maxHitDistanceFromCluster |
The threshold separation between a hit and cluster for the hit to be merged into the cluster. More... | |
float | m_maxHitSeparationForConnectedCluster |
The maximum separation between two adjacent (in z) hits in a connected cluster. More... | |
unsigned int | m_maxTrackGaps |
The maximum number of graps allowed in the extrapolated hit vector. More... | |
float | m_lineSegmentLength |
The length of a track gap. More... | |
bool | m_hitWidthMode |
Whether to consider the width of hits. More... | |
Private Member Functions | |
pandora::StatusCode | Run () |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
bool | FindBestClusterAssociation (const pandora::ClusterVector &clusterVector, const SlidingFitResultMapPair &slidingFitResultMapPair, ClusterPairAssociation &clusterAssociation) const |
Find the best cluster association. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
const pandora::Cluster * | CreateMainTrack (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. More... | |
Private Attributes | |
unsigned int | m_maxLoopIterations |
The maximum number of main loop iterations. More... | |
float | m_minClusterLengthSum |
The threshold cluster and associated cluster length sum. More... | |
float | m_minSeparationDistance |
The threshold separation distance between associated clusters. More... | |
float | m_minDirectionDeviationCosAngle |
The threshold cos opening angle of the associated cluster directions. More... | |
float | m_maxPredictedMergePointOffset |
The threshold separation distance between the predicted and true cluster merge points. More... | |
float | m_distanceToLine |
The threshold hit distance of an extrapolated hit from the segment connecting line. More... | |
float | m_boundaryTolerance |
The maximum allowed distance of an extremal extrapolate hit to a cluster merge point. More... | |
TrackMergeRefinementAlgorithm class.
Definition at line 18 of file TrackMergeRefinementAlgorithm.h.
|
protectedinherited |
Definition at line 31 of file TrackRefinementBaseAlgorithm.h.
|
protectedinherited |
Definition at line 30 of file TrackRefinementBaseAlgorithm.h.
lar_content::TrackMergeRefinementAlgorithm::TrackMergeRefinementAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file TrackMergeRefinementAlgorithm.cc.
|
protectedinherited |
Remove the hits from a shower cluster that belong to the main track and add them into the main track cluster.
pMainTrackCluster | the main track cluster |
pShowerCluster | the input shower cluster |
caloHitsToMerge | the list of calo hits to remove from the shower cluster |
clusterAssociation | the clusterAssociation |
remnantClusterList | the input list to store the remnant clusters |
Definition at line 572 of file TrackRefinementBaseAlgorithm.cc.
References f, lar_content::ClusterAssociation::GetConnectingLineDirection(), lar_content::LArClusterHelper::GetLengthSquared(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::m_minClusterLength, and lar_content::TrackRefinementBaseAlgorithm::m_minHitFractionForHitRemoval.
Referenced by CreateMainTrack().
|
protectedinherited |
Add a cluster to the nearest cluster satisfying separation distance thresholds.
pClusterToMerge | the cluster to merge |
pMainTrackCluster | the main track cluster |
pClusterList | the list of all clusters |
Definition at line 667 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::LArClusterHelper::GetClosestDistance(), lar_content::TrackRefinementBaseAlgorithm::m_maxDistanceFromMainTrack, and lar_content::TrackRefinementBaseAlgorithm::m_maxHitDistanceFromCluster.
Referenced by lar_content::TrackRefinementBaseAlgorithm::ProcessRemnantClusters().
|
private |
Whether two clusters are assoicated to one another.
upstreamPoint | the merge point of the upstream cluster |
upstreamDirection | the local direction of the upstream cluster at the merge point |
downstreamPoint | the merge point of the downstream cluster |
downstreamDirection | the local direction of the downstrean cluster at the merge point |
Definition at line 175 of file TrackMergeRefinementAlgorithm.cc.
References m_maxPredictedMergePointOffset, m_minDirectionDeviationCosAngle, and m_minSeparationDistance.
Referenced by FindBestClusterAssociation().
|
protectedinherited |
Perform topological checks on the collected hits to ensure no gaps are present.
clusterToCaloHitListMap | the input map [parent cluster -> list of hits which belong to the main track] |
clusterAssociation | the clusterAssociation |
Definition at line 187 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::AreExtrapolatedHitsNearBoundaries(), lar_content::ClusterAssociation::GetConnectingLineDirection(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous(), and lar_content::TrackRefinementBaseAlgorithm::m_hitWidthMode.
Referenced by Run().
|
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.
extrapolatedHitVector | the extrapolated hit vector (ordered closest hit to the upstream merge point -> furthest hit) |
clusterAssociation | the cluster association |
Implements lar_content::TrackRefinementBaseAlgorithm.
Definition at line 217 of file TrackMergeRefinementAlgorithm.cc.
References lar_content::ClusterAssociation::GetDownstreamMergePoint(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::IsNearBoundary(), and m_boundaryTolerance.
|
private |
Remove the cluster association from the cluster vector so that the same cluster pair is not considered again.
clusterAssociation | the cluster pair association |
clusterVector | the vector of clusters considered in future iterations of the algorithm |
slidingFitResultMapPair | the {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps |
Definition at line 236 of file TrackMergeRefinementAlgorithm.cc.
References lar_content::ClusterPairAssociation::GetDownstreamCluster(), lar_content::ClusterPairAssociation::GetUpstreamCluster(), and lar_content::TrackRefinementBaseAlgorithm::RemoveClusterFromContainers().
Referenced by Run().
|
private |
Refine the cluster endpoints and merge together the associated clusters alongside any extrapolated hits.
clusterAssociation | the cluster pair association |
clusterToCaloHitListMap | the map [parent cluster -> list of hits which belong to the main track] |
pClusterList | the list of all clusters |
clusterVector | the vector of clusters considered in future iterations of the algorithm |
slidingFitResultMapPair | the {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps |
Definition at line 246 of file TrackMergeRefinementAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::AddHitsToMainTrack(), lar_content::ClusterPairAssociation::GetDownstreamCluster(), lar_content::ClusterAssociation::GetDownstreamMergePoint(), lar_content::ClusterPairAssociation::GetUpstreamCluster(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::ProcessRemnantClusters(), lar_content::TrackRefinementBaseAlgorithm::RemoveOffAxisHitsFromTrack(), lar_content::LArClusterHelper::SortByNHits(), and lar_content::TrackRefinementBaseAlgorithm::UpdateContainers().
Referenced by Run().
|
protectedinherited |
Calculate the track length between two points that lies in gaps.
upstreamPoint | the upstream point |
downstreamPoint | the downstream point |
connectingLine | the track direction |
consideredGaps | the list of gaps to ignore |
Definition at line 384 of file TrackRefinementBaseAlgorithm.cc.
References f.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries().
|
private |
Find the best cluster association.
clusterVector | the vector of clusters to consider |
slidingFitResultMapPair | the {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps |
clusterAssociation | the cluster pair association |
Definition at line 91 of file TrackMergeRefinementAlgorithm.cc.
References AreClustersAssociated(), f, lar_content::TrackRefinementBaseAlgorithm::GetClusterMergingCoordinates(), lar_content::LArClusterHelper::GetLength(), m_minClusterLengthSum, and lar_content::LArClusterHelper::SortByPosition().
Referenced by Run().
|
protectedinherited |
Fragment a cluster using simple hit separation logic.
pRemnantCluster | the input remnant cluster to fragment |
fragmentedClusterList | the input list to store the final remnant clusters |
Definition at line 730 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::LArClusterHelper::GetClosestDistance(), and lar_content::TrackRefinementBaseAlgorithm::m_maxHitDistanceFromCluster.
Referenced by lar_content::TrackRefinementBaseAlgorithm::ProcessRemnantClusters().
|
protectedinherited |
Get the merging coordinate and direction for an input cluster with respect to an associated cluster.
clusterMicroFitResult | the local TwoDSlidingFitResult of the cluster |
clusterMacroFitResult | the global TwoDSlidingFitResult of the cluster |
associatedMacroFitReult | the global TwoDSlidingFitResult of the associated cluster |
isEndUpstream | whether the sought cluster merge point is the upstream |
clusterMergePosition | the merge position of the cluster |
clusterMergeDirection | the merge direction of the cluster |
Definition at line 68 of file TrackRefinementBaseAlgorithm.cc.
References f, lar_content::TwoDSlidingFitResult::GetGlobalDirection(), lar_content::TwoDSlidingFitResult::GetGlobalFitPosition(), lar_content::TwoDSlidingFitResult::GetLayerFitResultMap(), lar_content::TwoDSlidingFitResult::GetMaxLayer(), lar_content::TwoDSlidingFitResult::GetMinLayer(), lar_content::TrackRefinementBaseAlgorithm::m_mergePointMinCosAngleDeviation, and lar_content::TrackRefinementBaseAlgorithm::m_stableRegionClusterFraction.
Referenced by FindBestClusterAssociation().
|
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.
firstCorner | the position of one corner |
secondCorner | the position of the opposite corner |
pClusterList | the list of all clusters |
clusterToCaloHitListMap | the output map [parent cluster -> list of hits which belong to the main track] |
unavailableProtectedClusters | the list of clusters whose hits are protected |
distanceToLine | the maximum perpendicular distance of a collected hit from the connecting line |
Definition at line 129 of file TrackRefinementBaseAlgorithm.cc.
References f, lar_content::LArHitWidthHelper::GetClosestPointToLine2D(), lar_content::TrackRefinementBaseAlgorithm::IsCloseToLine(), lar_content::TrackRefinementBaseAlgorithm::IsInBoundingBox(), and lar_content::TrackRefinementBaseAlgorithm::m_hitWidthMode.
Referenced by Run().
|
protectedinherited |
Obtain the segment boundaries of the connecting line to test whether extrapolated hits are continuous.
clusterAssociation | the clusterAssociation |
trackSegmentBoundaries | the output vector of segment boundaries |
Definition at line 274 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::DistanceInGap(), f, lar_content::ClusterAssociation::GetConnectingLineDirection(), lar_content::ClusterAssociation::GetDownstreamMergePoint(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::m_lineSegmentLength, and lar_content::TrackRefinementBaseAlgorithm::RepositionIfInGap().
Referenced by lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous().
|
private |
Obtain a list of clusters whos hits are protected and cannot be reassigned.
clusterAssociation | the clusterPairAssociation |
createdMainTrackClusters | the list of main track clusters that have hitherto collected |
unavailableProtectedClusters | the output list of protected clusters |
Definition at line 205 of file TrackMergeRefinementAlgorithm.cc.
References lar_content::ClusterPairAssociation::GetDownstreamCluster(), and lar_content::ClusterPairAssociation::GetUpstreamCluster().
Referenced by Run().
|
inherited |
Definition at line 40 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), lar_content::LArClusterHelper::GetLengthSquared(), lar_content::LArGeometryHelper::GetWirePitch(), lar_content::TrackRefinementBaseAlgorithm::m_macroSlidingFitWindow, lar_content::TrackRefinementBaseAlgorithm::m_microSlidingFitWindow, and lar_content::TrackRefinementBaseAlgorithm::m_minClusterLength.
|
protectedinherited |
Fill the cluster vector and sliding fit maps with clusters that are determined to be track-like.
pClusterList | the list of input clusters |
sortFunction | the sort class or function used to sort the clusterVector |
clusterVector | the input vector to store clusters considered within the algorithm |
slidingFitResultMapPair | the {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps |
Referenced by Run(), and lar_content::TrackRefinementBaseAlgorithm::UpdateContainers().
|
protectedinherited |
Check whether a hit is close to a line.
hitPosition | the position of the hit |
lineStart | the start point of the line (can actually be any point on the line) |
lineDirection | the unit vector of the line direction |
distanceToLine | the definition of 'close' |
Definition at line 177 of file TrackRefinementBaseAlgorithm.cc.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetHitsInBoundingBox().
|
protectedinherited |
Whether a remnant cluster is considered to be disconnected and therefore should undergo further fragmentation.
pRemnantCluster | the input remnant cluster |
Definition at line 701 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::m_maxHitSeparationForConnectedCluster.
Referenced by lar_content::TrackRefinementBaseAlgorithm::ProcessRemnantClusters().
|
protectedinherited |
check whether a hit is contained within a defined square region
minX | the minimum x coordinate of the square region |
maxX | the maximum x coordinate of the square region |
minZ | the minimum z coordinate of the square region |
maxZ | the maximum z coordinate of the square region |
hitPosition | the position of the hit |
Definition at line 169 of file TrackRefinementBaseAlgorithm.cc.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetHitsInBoundingBox().
|
protectedinherited |
Whether a position falls within a specified segment of the cluster connecting line.
lowerBoundary | the lower boundary of the segment |
upperBoundary | the upper boundary of the segment |
point | the position |
Definition at line 471 of file TrackRefinementBaseAlgorithm.cc.
Referenced by lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous().
|
protectedinherited |
Check whether a hit is close to a boundary point.
pCaloHit | the input calo hit |
boundaryPosition2D | the position of the 2D boundary point |
boundaryTolerance | the definition of close |
Definition at line 211 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::LArHitWidthHelper::GetClosestDistanceToPoint2D().
Referenced by AreExtrapolatedHitsNearBoundaries().
|
protectedinherited |
Check whether the extrapolatedCaloHitVector contains a continuous line of hits between the cluster merge points.
clusterAssociation | the clusterAssociation |
extrapolatedCaloHitVector | the vector of extrapolated calo hits |
Definition at line 220 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::LArHitWidthHelper::GetClosestPointToLine2D(), lar_content::ClusterAssociation::GetConnectingLineDirection(), lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::IsInLineSegment(), lar_content::TrackRefinementBaseAlgorithm::m_hitWidthMode, and lar_content::TrackRefinementBaseAlgorithm::m_maxTrackGaps.
Referenced by lar_content::TrackRefinementBaseAlgorithm::AreExtrapolatedHitsGood().
|
protectedinherited |
Process the remnant clusters separating those that stradle the main track.
remnantClusterList | the list of remnant clusters to process |
pMainTrackCluster | the main track cluster |
pClusterList | the list of all clusters |
createdClusters | the input list to store the final remnant clusters |
Definition at line 640 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::AddToNearestCluster(), lar_content::TrackRefinementBaseAlgorithm::FragmentRemnantCluster(), and lar_content::TrackRefinementBaseAlgorithm::IsClusterRemnantDisconnected().
Referenced by CreateMainTrack().
|
privatevirtual |
Implements lar_content::TrackRefinementBaseAlgorithm.
Definition at line 291 of file TrackMergeRefinementAlgorithm.cc.
References m_boundaryTolerance, m_distanceToLine, m_maxLoopIterations, m_maxPredictedMergePointOffset, m_minClusterLengthSum, m_minDirectionDeviationCosAngle, m_minSeparationDistance, and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
Remove a cluster from the cluster vector and sliding fit maps.
pClustertoRemove | the clusters to remove from the containers |
clusterVector | the vector to store clusters considered within the algorithm |
slidingFitResultMapPair | the {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps |
Definition at line 804 of file TrackRefinementBaseAlgorithm.cc.
Referenced by ConsiderClusterAssociation(), and lar_content::TrackRefinementBaseAlgorithm::UpdateContainers().
|
protectedinherited |
Remove any hits in the upstream/downstream cluster that lie off of the main track axis (i.e. clustering errors)
pCluster | the input cluster |
splitPosition | the position after which hits are considered for removal |
isEndUpstream | whether the upstream end is to be refined |
clusterToCaloHitListMap | the map [parent cluster -> list of hits which belong to the main track] |
remnantClusterList | the input list to store the remnant clusters |
microSlidingFitResultMap | the mapping [cluster -> TwoDSlidingFitResult] where fits correspond to local gradients |
macroSlidingFitResultMap | the mapping [cluster -> TwoDSlidingFitResult] where fits correspond to global cluster gradients |
Definition at line 495 of file TrackRefinementBaseAlgorithm.cc.
References f, and lar_content::TwoDSlidingFitResult::GetLocalPosition().
Referenced by CreateMainTrack().
|
protectedinherited |
Move an input position to the higher line gap edge if it lies within a gap.
mergeDirection | the direction of the track |
trackPoint | the input position |
Definition at line 340 of file TrackRefinementBaseAlgorithm.cc.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries().
|
privatevirtual |
Implements lar_content::TrackRefinementBaseAlgorithm.
Definition at line 34 of file TrackMergeRefinementAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::AreExtrapolatedHitsGood(), ConsiderClusterAssociation(), CreateMainTrack(), FindBestClusterAssociation(), lar_content::ClusterPairAssociation::GetDownstreamCluster(), lar_content::ClusterAssociation::GetDownstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::GetHitsInBoundingBox(), GetUnavailableProtectedClusters(), lar_content::ClusterPairAssociation::GetUpstreamCluster(), lar_content::ClusterAssociation::GetUpstreamMergePoint(), lar_content::TrackRefinementBaseAlgorithm::InitialiseContainers(), m_distanceToLine, m_maxLoopIterations, and lar_content::LArClusterHelper::SortByNHits().
|
protectedinherited |
Remove deleted clusters from the cluster vector and sliding fit maps and add in created clusters that are determined to be track-like.
clustersToAdd | the list of clusters to add to the containers |
clustersToDelete | the list of clusters to remove from the containers |
sortFunction | the sort class or function used to sort the clusterVector |
clusterVector | the vector to store clusters considered within the algorithm |
slidingFitResultMapPair | the {micro, macro} pair of [cluster -> TwoDSlidingFitResult] maps |
Referenced by CreateMainTrack().
|
inherited |
Definition at line 792 of file TrackRefinementBaseAlgorithm.cc.
References lar_content::TrackRefinementBaseAlgorithm::InitialiseContainers(), and lar_content::TrackRefinementBaseAlgorithm::RemoveClusterFromContainers().
|
private |
The maximum allowed distance of an extremal extrapolate hit to a cluster merge point.
Definition at line 105 of file TrackMergeRefinementAlgorithm.h.
Referenced by AreExtrapolatedHitsNearBoundaries(), and ReadSettings().
|
private |
The threshold hit distance of an extrapolated hit from the segment connecting line.
Definition at line 104 of file TrackMergeRefinementAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
protectedinherited |
Whether to consider the width of hits.
Definition at line 318 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::AreExtrapolatedHitsGood(), lar_content::TrackRefinementBaseAlgorithm::GetHitsInBoundingBox(), lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous(), lar_content::TrackRefinementBaseAlgorithm::SortByDistanceAlongLine::operator()(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
The length of a track gap.
Definition at line 317 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetTrackSegmentBoundaries(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
The sliding fit window used in the fits contained within the macroSlidingFitResultMap.
Definition at line 309 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::InitialiseContainers(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
The threshold distance for a hit to be added to the main track.
Definition at line 313 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::AddToNearestCluster(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
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.
Referenced by lar_content::TrackRefinementBaseAlgorithm::AddToNearestCluster(), lar_content::TrackRefinementBaseAlgorithm::FragmentRemnantCluster(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
The maximum separation between two adjacent (in z) hits in a connected cluster.
Definition at line 315 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::IsClusterRemnantDisconnected(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
private |
The maximum number of main loop iterations.
Definition at line 99 of file TrackMergeRefinementAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
The threshold separation distance between the predicted and true cluster merge points.
Definition at line 103 of file TrackMergeRefinementAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
protectedinherited |
The maximum number of graps allowed in the extrapolated hit vector.
Definition at line 316 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::IsTrackContinuous(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
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.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetClusterMergingCoordinates(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
The sliding fit window used in the fits contained within the microSlidingFitResultMap.
Definition at line 308 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::InitialiseContainers(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
protectedinherited |
The minimum length of a considered cluster.
Definition at line 307 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::AddHitsToMainTrack(), lar_content::TrackRefinementBaseAlgorithm::InitialiseContainers(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
private |
The threshold cluster and associated cluster length sum.
Definition at line 100 of file TrackMergeRefinementAlgorithm.h.
Referenced by FindBestClusterAssociation(), and ReadSettings().
|
private |
The threshold cos opening angle of the associated cluster directions.
Definition at line 102 of file TrackMergeRefinementAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
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.
Referenced by lar_content::TrackRefinementBaseAlgorithm::AddHitsToMainTrack(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().
|
private |
The threshold separation distance between associated clusters.
Definition at line 101 of file TrackMergeRefinementAlgorithm.h.
Referenced by AreClustersAssociated(), and ReadSettings().
|
protectedinherited |
The threshold fraction of fit contributing layers which defines the stable region.
Definition at line 310 of file TrackRefinementBaseAlgorithm.h.
Referenced by lar_content::TrackRefinementBaseAlgorithm::GetClusterMergingCoordinates(), and lar_content::TrackRefinementBaseAlgorithm::ReadSettings().