LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
TwoViewTransverseTracksAlgorithm class. More...
#include "TwoViewTransverseTracksAlgorithm.h"
Public Types | |
typedef NViewTrackMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > > | BaseAlgorithm |
typedef std::set< unsigned int > | UIntSet |
typedef TwoViewMatchingControl< TwoViewTransverseOverlapResult > | MatchingType |
Public Member Functions | |
TwoViewTransverseTracksAlgorithm () | |
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::vector< TransverseMatrixTool * > | MatrixToolVector |
Private Member Functions | |
void | CalculateOverlapResult (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const) |
Calculate cluster overlap result and store in container. More... | |
pandora::StatusCode | CalculateOverlapResult (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, TwoViewTransverseOverlapResult &overlapResult) |
Calculates the two view overlap result. More... | |
unsigned int | CalculateNumberOfLocallyMatchingSamplingPoints (const DiscreteProbabilityVector &discreteProbabilityVector1, const DiscreteProbabilityVector &discreteProbabilityVector2, std::mt19937 &randomNumberGenerator) |
Calculates the number of the sliding windows that contains charge bins that locally match. More... | |
float | GetPrimaryAxisDotDriftAxis (const pandora::Cluster *const pCluster) |
Get the dot product between the cluster's primary axis and the drift axis. 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 | |
MatrixToolVector | m_algorithmToolVector |
The algorithm tool vector. More... | |
unsigned int | m_nMaxMatrixToolRepeats |
The maximum number of repeat loops over matrix tools. More... | |
unsigned int | m_downsampleFactor |
The downsampling (hit merging) applied to hits in the overlap region. More... | |
unsigned int | m_minSamples |
The minimum number of samples needed for comparing charges. More... | |
unsigned int | m_nPermutations |
The number of permutations for calculating p-values. More... | |
float | m_localMatchingScoreThreshold |
The minimum score to classify a local region as matching. More... | |
float | m_maxDotProduct |
float | m_minOverallMatchingScore |
M The maximum allowed cluster primary qxis Dot drift axis to fill the overlap result. More... | |
float | m_minOverallLocallyMatchedFraction |
The minimum required lcoally matched fraction to fill the overlap result. More... | |
std::mt19937 | m_randomNumberGenerator |
The random number generator. More... | |
TwoViewTransverseTracksAlgorithm class.
Definition at line 32 of file TwoViewTransverseTracksAlgorithm.h.
typedef NViewTrackMatchingAlgorithm<TwoViewMatchingControl<TwoViewTransverseOverlapResult> > lar_content::TwoViewTransverseTracksAlgorithm::BaseAlgorithm |
Definition at line 35 of file TwoViewTransverseTracksAlgorithm.h.
|
inherited |
Definition at line 23 of file NViewMatchingAlgorithm.h.
|
private |
Definition at line 80 of file TwoViewTransverseTracksAlgorithm.h.
typedef std::set<unsigned int> lar_content::TwoViewTransverseTracksAlgorithm::UIntSet |
Definition at line 36 of file TwoViewTransverseTracksAlgorithm.h.
lar_content::TwoViewTransverseTracksAlgorithm::TwoViewTransverseTracksAlgorithm | ( | ) |
Default constructor.
Definition at line 23 of file TwoViewTransverseTracksAlgorithm.cc.
References lar_content::LArDiscreteProbabilityHelper::CalculateCorrelationCoefficient(), lar_content::LArDiscreteProbabilityHelper::CalculateCorrelationCoefficientPValueFromPermutationTest(), CalculateNumberOfLocallyMatchingSamplingPoints(), CalculateOverlapResult(), f, lar_content::LArClusterHelper::GetCaloHitListInBoundingBox(), lar_content::LArGeometryHelper::GetCommonDaughterVolumes(), lar_content::NViewMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >::GetMatchingControl(), lar_content::TwoViewMatchingControl< T >::GetOverlapMatrix(), GetPrimaryAxisDotDriftAxis(), lar_content::DiscreteProbabilityVector::GetSize(), lar_content::TwoViewXOverlap::GetTwoViewXOverlapMax(), lar_content::TwoViewXOverlap::GetTwoViewXOverlapMin(), lar_content::TwoViewXOverlap::GetTwoViewXOverlapSpan(), lar_content::TwoViewXOverlap::GetXSpan0(), lar_content::TwoViewXOverlap::GetXSpan1(), lar_content::TrackTwoViewOverlapResult::IsInitialized(), m_downsampleFactor, m_maxDotProduct, m_minOverallLocallyMatchedFraction, m_minOverallMatchingScore, m_minSamples, m_nPermutations, m_randomNumberGenerator, and lar_content::OverlapMatrix< T >::SetOverlapResult().
|
protectedinherited |
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
pCluster | address of the relevant cluster |
|
private |
Calculates the number of the sliding windows that contains charge bins that locally match.
discreteProbabilityVector1 | the view 0 discrete probability vector containing the charge information |
pCluster2 | the view 1 discrete probability vector containing the charge information |
randomNumberGenerator | a seeded random number generator |
Definition at line 145 of file TwoViewTransverseTracksAlgorithm.cc.
References lar_content::LArDiscreteProbabilityHelper::CalculateCorrelationCoefficientPValueFromPermutationTest(), f, lar_content::DiscreteProbabilityVector::GetProbability(), lar_content::DiscreteProbabilityVector::GetSize(), m_localMatchingScoreThreshold, m_minSamples, and m_nPermutations.
Referenced by TwoViewTransverseTracksAlgorithm().
|
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 TwoViewTransverseTracksAlgorithm().
|
private |
Calculates the two view overlap result.
pCluster1 | the view 0 cluster |
pCluster2 | the view 1 cluster |
overlapResult | the two view 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::TwoViewClearTracksTool::CreateThreeDParticles(), lar_content::ClearLongitudinalTracksTool::CreateThreeDParticles(), lar_content::ClearTracksTool::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().
|
privatevirtual |
Examine contents of overlap container, collect together best-matching 2D particles and modify clusters as required.
Implements lar_content::MatchingBaseAlgorithm.
Definition at line 213 of file TwoViewTransverseTracksAlgorithm.cc.
References m_algorithmToolVector, and m_nMaxMatrixToolRepeats.
|
inherited |
Get a sliding fit result from the algorithm cache.
pCluster | address of the relevant cluster |
|
virtualinherited |
Get the cluster list name corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::MatchingBaseAlgorithm.
|
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 TwoViewTransverseTracksAlgorithm().
|
private |
Get the dot product between the cluster's primary axis and the drift axis.
pCluster | the cluster |
Definition at line 196 of file TwoViewTransverseTracksAlgorithm.cc.
References f, lar_content::LArClusterHelper::GetCoordinateVector(), and lar_content::LArPcaHelper::RunPca().
Referenced by TwoViewTransverseTracksAlgorithm().
|
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< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >.
Definition at line 234 of file TwoViewTransverseTracksAlgorithm.cc.
References m_algorithmToolVector, m_downsampleFactor, m_localMatchingScoreThreshold, m_maxDotProduct, m_minOverallLocallyMatchedFraction, m_minOverallMatchingScore, m_minSamples, m_nMaxMatrixToolRepeats, m_nPermutations, and lar_content::NViewTrackMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >::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< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >.
|
virtualinherited |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >.
|
virtualinherited |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Reimplemented from lar_content::NViewMatchingAlgorithm< TwoViewMatchingControl< TwoViewTransverseOverlapResult > >.
|
private |
The algorithm tool vector.
Definition at line 81 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by ExamineOverlapContainer(), and ReadSettings().
|
private |
The downsampling (hit merging) applied to hits in the overlap region.
Definition at line 84 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and TwoViewTransverseTracksAlgorithm().
|
private |
The minimum score to classify a local region as matching.
Definition at line 87 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by CalculateNumberOfLocallyMatchingSamplingPoints(), and ReadSettings().
|
protectedinherited |
The matching control.
Definition at line 53 of file NViewMatchingAlgorithm.h.
|
private |
Definition at line 88 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and TwoViewTransverseTracksAlgorithm().
|
private |
The minimum required lcoally matched fraction to fill the overlap result.
Definition at line 90 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and TwoViewTransverseTracksAlgorithm().
|
private |
M The maximum allowed cluster primary qxis Dot drift axis to fill the overlap result.
The minimum required global matching score to fill the overlap result
Definition at line 89 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by ReadSettings(), and TwoViewTransverseTracksAlgorithm().
|
private |
The minimum number of samples needed for comparing charges.
Definition at line 85 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by CalculateNumberOfLocallyMatchingSamplingPoints(), ReadSettings(), and TwoViewTransverseTracksAlgorithm().
|
private |
The maximum number of repeat loops over matrix tools.
Definition at line 83 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by ExamineOverlapContainer(), and ReadSettings().
|
private |
The number of permutations for calculating p-values.
Definition at line 86 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by CalculateNumberOfLocallyMatchingSamplingPoints(), ReadSettings(), and TwoViewTransverseTracksAlgorithm().
|
private |
The random number generator.
Definition at line 91 of file TwoViewTransverseTracksAlgorithm.h.
Referenced by TwoViewTransverseTracksAlgorithm().