LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
ThreeViewTransverseTracksAlgorithm class. More...
#include "ThreeViewTransverseTracksAlgorithm.h"
Public Types | |
typedef NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > > | BaseAlgorithm |
typedef ThreeViewMatchingControl< TransverseOverlapResult > | MatchingType |
Public Member Functions | |
ThreeViewTransverseTracksAlgorithm () | |
Default constructor. 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 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... | |
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... | |
Protected Attributes | |
MatchingType | m_matchingControl |
The matching control. More... | |
Private Types | |
typedef std::map< unsigned int, TransverseOverlapResult > | FitSegmentToOverlapResultMap |
typedef std::map< unsigned int, FitSegmentToOverlapResultMap > | FitSegmentMatrix |
typedef std::map< unsigned int, FitSegmentMatrix > | FitSegmentTensor |
typedef std::vector< TransverseTensorTool * > | TensorToolVector |
Private Member Functions | |
void | CalculateOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW) |
Calculate cluster overlap result and store in container. More... | |
pandora::StatusCode | CalculateOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, TransverseOverlapResult &overlapResult) |
Calculate the overlap result for given group of clusters. More... | |
void | GetFitSegmentTensor (const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, FitSegmentTensor &fitSegmentTensor) const |
Get the number of matched points for three fit segments and accompanying sliding fit results. More... | |
pandora::StatusCode | GetSegmentOverlap (const FitSegment &fitSegmentU, const FitSegment &fitSegmentV, const FitSegment &fitSegmentW, const TwoDSlidingFitResult &slidingFitResultU, const TwoDSlidingFitResult &slidingFitResultV, const TwoDSlidingFitResult &slidingFitResultW, TransverseOverlapResult &transverseOverlapResult) const |
Get the overlap result for three fit segments and the accompanying sliding fit results. More... | |
void | GetBestOverlapResult (const FitSegmentTensor &fitSegmentTensor, TransverseOverlapResult &bestTransverseOverlapResult) const |
Get the best overlap result, by examining the fit segment tensor. More... | |
void | GetPreviousOverlapResults (const unsigned int indexU, const unsigned int indexV, const unsigned int indexW, FitSegmentTensor &fitSegmentSumTensor, TransverseOverlapResultVector &transverseOverlapResultVector) const |
Get track overlap results for possible connected segments. More... | |
void | ExamineOverlapContainer () |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
TensorToolVector | m_algorithmToolVector |
The algorithm tool vector. More... | |
unsigned int | m_nMaxTensorToolRepeats |
The maximum number of repeat loops over tensor tools. More... | |
unsigned int | m_maxFitSegmentIndex |
The maximum number of fit segments used when identifying best overlap result. More... | |
float | m_pseudoChi2Cut |
The pseudo chi2 cut to identify matched sampling points. More... | |
float | m_minSegmentMatchedFraction |
The minimum segment matched sampling fraction to allow segment grouping. More... | |
unsigned int | m_minSegmentMatchedPoints |
The minimum number of matched segment sampling points to allow segment grouping. More... | |
float | m_minOverallMatchedFraction |
The minimum matched sampling fraction to allow particle creation. More... | |
unsigned int | m_minOverallMatchedPoints |
The minimum number of matched segment sampling points to allow particle creation. More... | |
float | m_minSamplingPointsPerLayer |
The minimum number of sampling points per layer to allow particle creation. More... | |
ThreeViewTransverseTracksAlgorithm class.
Definition at line 29 of file ThreeViewTransverseTracksAlgorithm.h.
typedef NViewTrackMatchingAlgorithm<ThreeViewMatchingControl<TransverseOverlapResult> > lar_content::ThreeViewTransverseTracksAlgorithm::BaseAlgorithm |
Definition at line 32 of file ThreeViewTransverseTracksAlgorithm.h.
|
private |
Definition at line 41 of file ThreeViewTransverseTracksAlgorithm.h.
|
private |
Definition at line 42 of file ThreeViewTransverseTracksAlgorithm.h.
|
private |
Definition at line 40 of file ThreeViewTransverseTracksAlgorithm.h.
|
inherited |
Definition at line 23 of file NViewMatchingAlgorithm.h.
|
private |
Definition at line 109 of file ThreeViewTransverseTracksAlgorithm.h.
lar_content::ThreeViewTransverseTracksAlgorithm::ThreeViewTransverseTracksAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file ThreeViewTransverseTracksAlgorithm.cc.
References CalculateOverlapResult(), f, GetBestOverlapResult(), lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >::GetCachedSlidingFitResult(), GetFitSegmentTensor(), lar_content::TrackOverlapResult::GetMatchedFraction(), lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >::GetMatchingControl(), lar_content::TwoDSlidingFitResult::GetMaxLayer(), lar_content::TwoDSlidingFitResult::GetMinLayer(), lar_content::TrackOverlapResult::GetNMatchedSamplingPoints(), lar_content::TrackOverlapResult::GetNSamplingPoints(), lar_content::ThreeViewMatchingControl< T >::GetOverlapTensor(), lar_content::TrackOverlapResult::IsInitialized(), m_minOverallMatchedFraction, m_minOverallMatchedPoints, m_minSamplingPointsPerLayer, and lar_content::OverlapTensor< T >::SetOverlapResult().
|
protectedinherited |
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
pCluster | address of the relevant cluster |
|
privatevirtual |
Calculate cluster overlap result and store in container.
pCluster1 | address of cluster1 |
pCluster2 | address of cluster2 |
pCluster3 | address of cluster3 |
Implements lar_content::MatchingBaseAlgorithm.
Referenced by ThreeViewTransverseTracksAlgorithm().
|
private |
Calculate the overlap result for given group of clusters.
pClusterU | the cluster from the U view |
pClusterV | the cluster from the V view |
pClusterW | the cluster from the W view |
overlapResult | to receive the overlap result |
|
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::TwoViewSimpleTracksTool::Run(), lar_content::MissingTrackTool::Run(), lar_content::ConnectedRemnantsTool::Run(), lar_content::MopUpRemnantsTool::Run(), lar_content::MatchedEndPointsTool::Run(), lar_content::SimpleShowersTool::Run(), lar_content::TracksCrossingGapsTool::Run(), lar_content::MissingTrackSegmentTool::Run(), lar_content::LongTracksTool::Run(), lar_content::TwoViewLongTracksTool::Run(), and lar_content::ClearShowersTool::Run().
|
privatevirtual |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 297 of file ThreeViewTransverseTracksAlgorithm.cc.
References m_algorithmToolVector, and m_nMaxTensorToolRepeats.
|
private |
Get the best overlap result, by examining the fit segment tensor.
fitSegmentTensor | the fit segment tensor |
bestTransverseOverlapResult | to receive the best transverse overlap result |
Definition at line 193 of file ThreeViewTransverseTracksAlgorithm.cc.
References GetPreviousOverlapResults(), lar_content::TrackOverlapResult::IsInitialized(), and m_maxFitSegmentIndex.
Referenced by ThreeViewTransverseTracksAlgorithm().
|
inherited |
Get a sliding fit result from the algorithm cache.
pCluster | address of the relevant cluster |
Referenced by ThreeViewTransverseTracksAlgorithm().
|
virtualinherited |
Get the cluster list name corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
private |
Get the number of matched points for three fit segments and accompanying sliding fit results.
slidingFitResultU | sliding fit result for u cluster |
slidingFitResultV | sliding fit result for v cluster |
slidingFitResultW | sliding fit result for w cluster |
fitSegmentTensor | the fit segment tensor |
Definition at line 87 of file ThreeViewTransverseTracksAlgorithm.cc.
References lar_content::TwoDSlidingFitResult::GetFitSegmentList(), GetSegmentOverlap(), m_minSegmentMatchedFraction, and m_minSegmentMatchedPoints.
Referenced by ThreeViewTransverseTracksAlgorithm().
|
virtualinherited |
Get the input cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
protectedinherited |
Get the matching control.
Referenced by ThreeViewTransverseTracksAlgorithm().
|
private |
Get track overlap results for possible connected segments.
indexU | the index u |
indexV | the index v |
indexW | the index w |
transverseOverlapResultVector | the transverse overlap result vector |
Definition at line 269 of file ThreeViewTransverseTracksAlgorithm.cc.
References lar_content::TrackOverlapResult::IsInitialized(), and x1.
Referenced by GetBestOverlapResult().
|
private |
Get the overlap result for three fit segments and the accompanying sliding fit results.
fitSegmentU | the fit segment u |
fitSegmentV | the fit segment v |
fitSegmentW | the fit segment w |
slidingFitResultU | sliding fit result for u cluster |
slidingFitResultV | sliding fit result for v cluster |
slidingFitResultW | sliding fit result for w cluster |
transverseOverlapResult | to receive the transverse overlap result |
Definition at line 123 of file ThreeViewTransverseTracksAlgorithm.cc.
References f, lar_content::FitSegment::GetEndLayer(), lar_content::FitSegment::GetMaxX(), lar_content::FitSegment::GetMinX(), lar_content::FitSegment::GetStartLayer(), lar_content::TwoDSlidingFitResult::GetTransverseProjection(), m_pseudoChi2Cut, lar_content::LArGeometryHelper::MergeTwoPositions(), n, w, and x.
Referenced by GetFitSegmentTensor().
|
virtualinherited |
Get the selected cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
inherited |
Get the layer window for the sliding linear fits.
|
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().
|
virtualinherited |
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 |
|
virtualinherited |
Make cluster splits.
splitPositionMap | the split position map |
|
protectedvirtualinherited |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.
Implements lar_content::MatchingBaseAlgorithm.
|
protectedvirtualinherited |
Perform any preparatory steps required, e.g. caching expensive fit results for clusters.
Implements lar_content::MatchingBaseAlgorithm.
|
virtualinherited |
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.
|
privatevirtual |
Reimplemented from lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >.
Definition at line 320 of file ThreeViewTransverseTracksAlgorithm.cc.
References m_algorithmToolVector, m_maxFitSegmentIndex, m_minOverallMatchedFraction, m_minOverallMatchedPoints, m_minSamplingPointsPerLayer, m_minSegmentMatchedFraction, m_minSegmentMatchedPoints, m_nMaxTensorToolRepeats, m_pseudoChi2Cut, and lar_content::NViewTrackMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >::ReadSettings().
|
protectedinherited |
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
pCluster | address of the relevant cluster |
|
protectedvirtualinherited |
Select a subset of input clusters for processing in this algorithm.
Implements lar_content::MatchingBaseAlgorithm.
|
virtualinherited |
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.
|
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.
|
virtualinherited |
Set pfo particle id.
pfoParameters | the output pfo parameters |
Reimplemented from lar_content::MatchingBaseAlgorithm.
|
staticinherited |
Sort split position cartesian vectors by increasing x coordinate.
lhs | the first cartesian vector |
rhs | the second cartesian vector |
|
protectedvirtualinherited |
Tidy member variables in derived class.
Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >.
|
virtualinherited |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >.
|
virtualinherited |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< ThreeViewMatchingControl< TransverseOverlapResult > >.
|
private |
The algorithm tool vector.
Definition at line 110 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by ExamineOverlapContainer(), and ReadSettings().
|
protectedinherited |
The matching control.
Definition at line 53 of file NViewMatchingAlgorithm.h.
|
private |
The maximum number of fit segments used when identifying best overlap result.
Definition at line 113 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by GetBestOverlapResult(), and ReadSettings().
|
private |
The minimum matched sampling fraction to allow particle creation.
Definition at line 117 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and ThreeViewTransverseTracksAlgorithm().
|
private |
The minimum number of matched segment sampling points to allow particle creation.
Definition at line 118 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and ThreeViewTransverseTracksAlgorithm().
|
private |
The minimum number of sampling points per layer to allow particle creation.
Definition at line 119 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and ThreeViewTransverseTracksAlgorithm().
|
private |
The minimum segment matched sampling fraction to allow segment grouping.
Definition at line 115 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by GetFitSegmentTensor(), and ReadSettings().
|
private |
The minimum number of matched segment sampling points to allow segment grouping.
Definition at line 116 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by GetFitSegmentTensor(), and ReadSettings().
|
private |
The maximum number of repeat loops over tensor tools.
Definition at line 112 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by ExamineOverlapContainer(), and ReadSettings().
|
private |
The pseudo chi2 cut to identify matched sampling points.
Definition at line 114 of file ThreeViewTransverseTracksAlgorithm.h.
Referenced by GetSegmentOverlap(), and ReadSettings().