LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
NViewTrackMatchingAlgorithm class. More...
#include "NViewTrackMatchingAlgorithm.h"
Public Types | |
typedef T | MatchingType |
Public Member Functions | |
NViewTrackMatchingAlgorithm () | |
Default constructor. More... | |
virtual | ~NViewTrackMatchingAlgorithm () |
Destructor. More... | |
const TwoDSlidingFitResult & | GetCachedSlidingFitResult (const pandora::Cluster *const pCluster) const |
Get a sliding fit result from the algorithm cache. More... | |
unsigned int | GetSlidingFitWindow () const |
Get the layer window for the sliding linear fits. More... | |
virtual bool | MakeClusterSplits (const SplitPositionMap &splitPositionMap) |
Make cluster splits. More... | |
virtual bool | MakeClusterSplit (const pandora::CartesianVector &splitPosition, const pandora::Cluster *&pCurrentCluster, const pandora::Cluster *&pLowXCluster, const pandora::Cluster *&pHighXCluster) const |
Make a cluster split. More... | |
virtual void | UpdateForNewCluster (const pandora::Cluster *const pNewCluster) |
Update to reflect addition of a new cluster to the problem space. More... | |
virtual void | UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster) |
Update to reflect cluster deletion. More... | |
virtual void | SelectInputClusters (const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const |
Select a subset of input clusters for processing in this algorithm. More... | |
virtual void | PrepareInputClusters (pandora::ClusterList &preparedClusterList) |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results. More... | |
virtual void | SetPfoParticleId (PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set pfo particle id. More... | |
const std::string & | GetClusterListName (const pandora::HitType hitType) const |
Get the cluster list name corresponding to a specified hit type. More... | |
const pandora::ClusterList & | GetInputClusterList (const pandora::HitType hitType) const |
Get the input cluster list corresponding to a specified hit type. More... | |
const pandora::ClusterList & | GetSelectedClusterList (const pandora::HitType hitType) const |
Get the selected cluster list corresponding to a specified hit type. More... | |
virtual void | CalculateOverlapResult (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3=nullptr)=0 |
Calculate cluster overlap result and store in container. More... | |
virtual bool | MakeClusterMerges (const ClusterMergeMap &clusterMergeMap) |
Merge clusters together. More... | |
virtual bool | CreateThreeDParticles (const ProtoParticleVector &protoParticleVector) |
Create particles using findings from recent algorithm processing. More... | |
virtual void | SetPfoParameters (const ProtoParticle &protoParticle, PandoraContentApi::ParticleFlowObject::Parameters &pfoParameters) const |
Set Pfo properties. More... | |
Static Public Member Functions | |
static bool | SortSplitPositions (const pandora::CartesianVector &lhs, const pandora::CartesianVector &rhs) |
Sort split position cartesian vectors by increasing x coordinate. More... | |
Protected Member Functions | |
void | AddToSlidingFitCache (const pandora::Cluster *const pCluster) |
Add a new sliding fit result, for the specified cluster, to the algorithm cache. More... | |
void | RemoveFromSlidingFitCache (const pandora::Cluster *const pCluster) |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache. More... | |
virtual void | TidyUp () |
Tidy member variables in derived class. More... | |
virtual pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
MatchingType & | GetMatchingControl () |
Get the matching control. More... | |
virtual void | SelectAllInputClusters () |
Select a subset of input clusters for processing in this algorithm. More... | |
virtual void | PrepareAllInputClusters () |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters. More... | |
virtual void | PerformMainLoop () |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult. More... | |
virtual void | ExamineOverlapContainer ()=0 |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required. More... | |
Protected Attributes | |
MatchingType | m_matchingControl |
The matching control. More... | |
Private Attributes | |
unsigned int | m_slidingFitWindow |
The layer window for the sliding linear fits. More... | |
TwoDSlidingFitResultMap | m_slidingFitResultMap |
The sliding fit result map. More... | |
unsigned int | m_minClusterCaloHits |
The min number of hits in base cluster selection method. More... | |
float | m_minClusterLengthSquared |
The min length (squared) in base cluster selection method. More... | |
NViewTrackMatchingAlgorithm class.
Definition at line 26 of file NViewTrackMatchingAlgorithm.h.
|
inherited |
Definition at line 23 of file NViewMatchingAlgorithm.h.
lar_content::NViewTrackMatchingAlgorithm< T >::NViewTrackMatchingAlgorithm | ( | ) |
Default constructor.
Definition at line 28 of file NViewTrackMatchingAlgorithm.cc.
|
virtual |
|
protected |
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 255 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), lar_content::LArGeometryHelper::GetWirePitch(), lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitResultMap, and lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitWindow.
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::PrepareInputClusters(), and lar_content::NViewTrackMatchingAlgorithm< T >::UpdateForNewCluster().
|
pure virtualinherited |
Calculate cluster overlap result and store in container.
pCluster1 | address of cluster1 |
pCluster2 | address of cluster2 |
pCluster3 | address of cluster3 |
Implemented in lar_content::ThreeViewShowersAlgorithm, lar_content::TwoViewDeltaRayMatchingAlgorithm, lar_content::ThreeViewTrackFragmentsAlgorithm, lar_content::ThreeViewDeltaRayMatchingAlgorithm, lar_content::ThreeViewTransverseTracksAlgorithm, lar_content::TwoViewTransverseTracksAlgorithm, lar_content::ThreeViewLongitudinalTracksAlgorithm, and lar_content::ThreeViewRemnantsAlgorithm.
Referenced by lar_content::ThreeViewMatchingControl< T >::PerformMainLoop(), lar_content::TwoViewMatchingControl< T >::PerformMainLoop(), lar_content::ThreeViewMatchingControl< T >::UpdateForNewCluster(), and lar_content::TwoViewMatchingControl< T >::UpdateForNewCluster().
|
virtualinherited |
Create particles using findings from recent algorithm processing.
protoParticleVector | the proto particle vector |
whether | particles were created |
Definition at line 88 of file MatchingBaseAlgorithm.cc.
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::CreatePfos(), lar_content::ClearRemnantsTool::CreateThreeDParticles(), lar_content::ClearLongitudinalTracksTool::CreateThreeDParticles(), lar_content::ClearTracksTool::CreateThreeDParticles(), lar_content::TwoViewClearTracksTool::CreateThreeDParticles(), lar_content::ClearTrackFragmentsTool::FindTrackFragments(), lar_content::MatchedEndPointsTool::Run(), lar_content::SimpleShowersTool::Run(), lar_content::ConnectedRemnantsTool::Run(), lar_content::MopUpRemnantsTool::Run(), lar_content::TwoViewSimpleTracksTool::Run(), lar_content::MissingTrackTool::Run(), lar_content::TracksCrossingGapsTool::Run(), lar_content::MissingTrackSegmentTool::Run(), lar_content::LongTracksTool::Run(), lar_content::TwoViewLongTracksTool::Run(), and lar_content::ClearShowersTool::Run().
|
protectedpure virtualinherited |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
Implemented in lar_content::TwoViewDeltaRayMatchingAlgorithm, lar_content::ThreeViewShowersAlgorithm, lar_content::ThreeViewTrackFragmentsAlgorithm, lar_content::ThreeViewTransverseTracksAlgorithm, lar_content::TwoViewTransverseTracksAlgorithm, lar_content::ThreeViewLongitudinalTracksAlgorithm, lar_content::ThreeViewDeltaRayMatchingAlgorithm, and lar_content::ThreeViewRemnantsAlgorithm.
const TwoDSlidingFitResult & lar_content::NViewTrackMatchingAlgorithm< T >::GetCachedSlidingFitResult | ( | const pandora::Cluster *const | pCluster | ) | const |
Get a sliding fit result from the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 45 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitResultMap.
Referenced by lar_content::UndershootTracksTool::GetIteratorListModifications(), lar_content::OvershootTracksTool::GetIteratorListModifications(), lar_content::TwoViewThreeDKinkTool::GetIteratorListModifications(), lar_content::MissingTrackSegmentTool::GetSegmentOverlapMap(), lar_content::MissingTrackSegmentTool::GetSlidingFitResultMap(), lar_content::UndershootTracksTool::IsThreeDKink(), lar_content::OvershootTracksTool::IsThreeDKink(), lar_content::TwoViewThreeDKinkTool::IsThreeDKink(), lar_content::TrackSplittingTool::PassesChecks(), and lar_content::TracksCrossingGapsTool::PassesGapChecks().
|
virtualinherited |
Get the cluster list name corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 58 of file NViewMatchingAlgorithm.cc.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::AddInStrayClusters(), lar_content::NViewTrackMatchingAlgorithm< T >::MakeClusterSplits(), lar_content::DeltaRayMergeTool::MakeOneCommonViewMerges(), lar_content::DeltaRayMergeTool::MakeTwoCommonViewMerges(), lar_content::ClearTrackFragmentsTool::ProcessTensorElement(), lar_content::CosmicRayRemovalTool::ReclusterRemnant(), lar_content::TwoViewCosmicRayRemovalTool::ReclusterRemnant(), lar_content::CosmicRayRemovalTool::SplitDeltaRayCluster(), lar_content::TwoViewCosmicRayRemovalTool::SplitDeltaRayCluster(), and lar_content::DeltaRayRemovalTool::SplitMuonCluster().
|
virtualinherited |
Get the input cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 66 of file NViewMatchingAlgorithm.cc.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::FillStrayClusterList(), lar_content::MissingTrackSegmentTool::GetCandidateClusters(), lar_content::NViewDeltaRayMatchingAlgorithm< T >::PrepareInputClusters(), lar_content::ShowerTensorVisualizationTool::Run(), and lar_content::TransverseTensorVisualizationTool::Run().
|
inlineprotectedinherited |
Get the matching control.
Definition at line 59 of file NViewMatchingAlgorithm.h.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
|
virtualinherited |
Get the selected cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 74 of file NViewMatchingAlgorithm.cc.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
|
inline |
Get the layer window for the sliding linear fits.
Definition at line 118 of file NViewTrackMatchingAlgorithm.h.
References lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitWindow.
Referenced by lar_content::MissingTrackSegmentTool::GetSlidingFitResultMap().
|
virtualinherited |
Merge clusters together.
clusterMergeMap | the cluster merge map |
Definition at line 48 of file MatchingBaseAlgorithm.cc.
Referenced by lar_content::SplitShowersTool::ApplyChanges(), lar_content::ThreeDKinkBaseTool::ApplyChanges(), lar_content::TwoViewThreeDKinkTool::ApplyChanges(), lar_content::ConnectedRemnantsTool::Run(), and lar_content::MissingTrackSegmentTool::Run().
|
virtual |
Make a cluster split.
splitPosition | the split position |
pCurrentCluster | the cluster to split |
pLowXCluster | to receive the low x cluster |
pHighXCluster | to receive the high x cluster |
Definition at line 105 of file NViewTrackMatchingAlgorithm.cc.
References f, lar_content::LArPointingCluster::GetInnerVertex(), lar_content::LArPointingCluster::GetOuterVertex(), and lar_content::LArPointingCluster::Vertex::GetPosition().
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::MakeClusterSplits().
|
virtual |
Make cluster splits.
splitPositionMap | the split position map |
Definition at line 58 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), lar_content::NViewMatchingAlgorithm< T >::GetClusterListName(), lar_content::NViewTrackMatchingAlgorithm< T >::MakeClusterSplit(), lar_content::LArClusterHelper::SortByNHits(), lar_content::NViewTrackMatchingAlgorithm< T >::UpdateForNewCluster(), and lar_content::NViewTrackMatchingAlgorithm< T >::UpdateUponDeletion().
Referenced by lar_content::ThreeDKinkBaseTool::ApplyChanges(), lar_content::TwoViewThreeDKinkTool::ApplyChanges(), and lar_content::TrackSplittingTool::Run().
|
protectedvirtualinherited |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.
Implements lar_content::MatchingBaseAlgorithm.
Reimplemented in lar_content::ThreeViewTrackFragmentsAlgorithm.
Definition at line 106 of file NViewMatchingAlgorithm.cc.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
|
protectedvirtualinherited |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 90 of file NViewMatchingAlgorithm.cc.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
|
virtual |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
preparedClusterList | to receive the prepared cluster list, non const so as to be able to modify input selected list |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 225 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::AddToSlidingFitCache().
|
protectedvirtual |
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Reimplemented in lar_content::ThreeViewTrackFragmentsAlgorithm, lar_content::ThreeViewTransverseTracksAlgorithm, lar_content::TwoViewTransverseTracksAlgorithm, and lar_content::ThreeViewLongitudinalTracksAlgorithm.
Definition at line 287 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::m_minClusterCaloHits, lar_content::NViewTrackMatchingAlgorithm< T >::m_minClusterLengthSquared, lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitWindow, and lar_content::NViewMatchingAlgorithm< T >::ReadSettings().
|
protected |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
pCluster | address of the relevant cluster |
Definition at line 267 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitResultMap.
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::UpdateUponDeletion().
|
protectedvirtualinherited |
Select a subset of input clusters for processing in this algorithm.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 82 of file NViewMatchingAlgorithm.cc.
References lar_content::NViewMatchingAlgorithm< T >::m_matchingControl.
|
virtual |
Select a subset of input clusters for processing in this algorithm.
pInputClusterList | address of an input cluster list |
selectedClusterList | to receive the selected cluster list |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 205 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::LArClusterHelper::GetLengthSquared(), lar_content::NViewTrackMatchingAlgorithm< T >::m_minClusterCaloHits, and lar_content::NViewTrackMatchingAlgorithm< T >::m_minClusterLengthSquared.
Referenced by lar_content::ClearTrackFragmentsTool::ProcessTensorElement().
|
virtualinherited |
Set Pfo properties.
protoParticle | the input proto particle |
pfoParameters | the output pfo parameters |
Definition at line 116 of file MatchingBaseAlgorithm.cc.
References f, and lar_content::ProtoParticle::m_clusterList.
|
virtual |
Set pfo particle id.
pfoParameters | the output pfo parameters |
Reimplemented from lar_content::MatchingBaseAlgorithm.
Definition at line 247 of file NViewTrackMatchingAlgorithm.cc.
|
static |
Sort split position cartesian vectors by increasing x coordinate.
lhs | the first cartesian vector |
rhs | the second cartesian vector |
Definition at line 168 of file NViewTrackMatchingAlgorithm.cc.
|
protectedvirtual |
Tidy member variables in derived class.
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Definition at line 278 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::m_slidingFitResultMap, and lar_content::NViewMatchingAlgorithm< T >::TidyUp().
|
virtual |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Reimplemented in lar_content::ThreeViewTrackFragmentsAlgorithm.
Definition at line 176 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::AddToSlidingFitCache(), and lar_content::NViewMatchingAlgorithm< T >::UpdateForNewCluster().
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::MakeClusterSplits().
|
virtual |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< T >.
Definition at line 196 of file NViewTrackMatchingAlgorithm.cc.
References lar_content::NViewTrackMatchingAlgorithm< T >::RemoveFromSlidingFitCache(), and lar_content::NViewMatchingAlgorithm< T >::UpdateUponDeletion().
Referenced by lar_content::ClearTrackFragmentsTool::FindTrackFragments(), lar_content::NViewTrackMatchingAlgorithm< T >::MakeClusterSplits(), and lar_content::ClearTrackFragmentsTool::ProcessTensorElement().
|
protectedinherited |
The matching control.
Definition at line 53 of file NViewMatchingAlgorithm.h.
Referenced by lar_content::NViewMatchingAlgorithm< T >::GetClusterListName(), lar_content::NViewMatchingAlgorithm< T >::GetInputClusterList(), lar_content::NViewMatchingAlgorithm< T >::GetMatchingControl(), lar_content::NViewMatchingAlgorithm< T >::GetSelectedClusterList(), lar_content::NViewMatchingAlgorithm< T >::PerformMainLoop(), lar_content::NViewMatchingAlgorithm< T >::PrepareAllInputClusters(), lar_content::NViewMatchingAlgorithm< T >::ReadSettings(), lar_content::NViewMatchingAlgorithm< T >::SelectAllInputClusters(), lar_content::NViewMatchingAlgorithm< T >::TidyUp(), lar_content::NViewMatchingAlgorithm< T >::UpdateForNewCluster(), and lar_content::NViewMatchingAlgorithm< T >::UpdateUponDeletion().
|
private |
The min number of hits in base cluster selection method.
Definition at line 111 of file NViewTrackMatchingAlgorithm.h.
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::ReadSettings(), and lar_content::NViewTrackMatchingAlgorithm< T >::SelectInputClusters().
|
private |
The min length (squared) in base cluster selection method.
Definition at line 112 of file NViewTrackMatchingAlgorithm.h.
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::ReadSettings(), and lar_content::NViewTrackMatchingAlgorithm< T >::SelectInputClusters().
|
private |
The sliding fit result map.
Definition at line 109 of file NViewTrackMatchingAlgorithm.h.
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::AddToSlidingFitCache(), lar_content::NViewTrackMatchingAlgorithm< T >::GetCachedSlidingFitResult(), lar_content::NViewTrackMatchingAlgorithm< T >::RemoveFromSlidingFitCache(), and lar_content::NViewTrackMatchingAlgorithm< T >::TidyUp().
|
private |
The layer window for the sliding linear fits.
Definition at line 108 of file NViewTrackMatchingAlgorithm.h.
Referenced by lar_content::NViewTrackMatchingAlgorithm< T >::AddToSlidingFitCache(), lar_content::NViewTrackMatchingAlgorithm< T >::GetSlidingFitWindow(), and lar_content::NViewTrackMatchingAlgorithm< T >::ReadSettings().