LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
TwoViewMatchingControl class. More...
#include "TwoViewMatchingControl.h"
Public Types | |
typedef OverlapMatrix< T > | MatrixType |
Public Member Functions | |
TwoViewMatchingControl (MatchingBaseAlgorithm *const pAlgorithm) | |
Constructor. More... | |
virtual | ~TwoViewMatchingControl () |
Destructor. More... | |
MatrixType & | GetOverlapMatrix () |
Get the overlap matrix. More... | |
unsigned int | GetHitTypeIndex (const pandora::HitType hitType) |
Get the index of an input hit type returning 0 if not found in map. More... | |
Protected Attributes | |
MatchingBaseAlgorithm * | m_pAlgorithm |
The address of the matching base algorithm. More... | |
Private Types | |
typedef std::unordered_map< pandora::HitType, unsigned int, std::hash< int > > | HitTypeToIndexMap |
Private Member Functions | |
void | UpdateForNewCluster (const pandora::Cluster *const pNewCluster) |
Update to reflect addition of a new cluster to the problem space. More... | |
void | UpdateUponDeletion (const pandora::Cluster *const pDeletedCluster) |
Update to reflect cluster deletion. 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... | |
void | SelectAllInputClusters () |
Select a subset of input clusters for processing in this algorithm. More... | |
void | PrepareAllInputClusters () |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results. More... | |
void | PerformMainLoop () |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult. More... | |
void | TidyUp () |
Tidy member variables. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read settings from xml. More... | |
Private Attributes | |
const pandora::ClusterList * | m_pInputClusterList1 |
Address of the input cluster list 1. More... | |
const pandora::ClusterList * | m_pInputClusterList2 |
Address of the input cluster list 2. More... | |
pandora::ClusterList | m_clusterList1 |
The selected modified cluster list 1. More... | |
pandora::ClusterList | m_clusterList2 |
The selected modified cluster list 2. More... | |
MatrixType | m_overlapMatrix |
The overlap matrix. More... | |
HitTypeToIndexMap | m_hitTypeToIndexMap |
The hit type to index map. More... | |
std::string | m_inputClusterListName1 |
The name of the view 1 cluster list. More... | |
std::string | m_inputClusterListName2 |
The name of the view 2 cluster list. More... | |
Friends | |
template<typename U > | |
class | NViewMatchingAlgorithm |
TwoViewMatchingControl class.
Definition at line 24 of file TwoViewMatchingControl.h.
|
private |
Definition at line 75 of file TwoViewMatchingControl.h.
typedef OverlapMatrix<T> lar_content::TwoViewMatchingControl< T >::MatrixType |
Definition at line 27 of file TwoViewMatchingControl.h.
lar_content::TwoViewMatchingControl< T >::TwoViewMatchingControl | ( | MatchingBaseAlgorithm *const | pAlgorithm | ) |
Constructor.
pAlgorithm | address of the matching base algorithm |
Definition at line 24 of file TwoViewMatchingControl.cc.
|
virtual |
|
privatevirtual |
Get the cluster list name corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::NViewMatchingControl.
Definition at line 115 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap, lar_content::TwoViewMatchingControl< T >::m_inputClusterListName1, and lar_content::TwoViewMatchingControl< T >::m_inputClusterListName2.
unsigned int lar_content::TwoViewMatchingControl< T >::GetHitTypeIndex | ( | const pandora::HitType | hitType | ) |
Get the index of an input hit type returning 0 if not found in map.
Definition at line 49 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap.
|
privatevirtual |
Get the input cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::NViewMatchingControl.
Definition at line 130 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap, lar_content::TwoViewMatchingControl< T >::m_pInputClusterList1, and lar_content::TwoViewMatchingControl< T >::m_pInputClusterList2.
TwoViewMatchingControl< T >::MatrixType & lar_content::TwoViewMatchingControl< T >::GetOverlapMatrix | ( | ) |
Get the overlap matrix.
Definition at line 41 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_overlapMatrix.
Referenced by lar_content::TwoViewDeltaRayMatchingAlgorithm::DoesClusterPassTensorThreshold(), and lar_content::TwoViewTransverseTracksAlgorithm::TwoViewTransverseTracksAlgorithm().
|
privatevirtual |
Get the selected cluster list corresponding to a specified hit type.
hitType | the hit type |
Implements lar_content::NViewMatchingControl.
Definition at line 148 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, and lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap.
|
privatevirtual |
Main loop over cluster combinations in order to populate the overlap container. Responsible for calling CalculateOverlapResult.
Implements lar_content::NViewMatchingControl.
Definition at line 215 of file TwoViewMatchingControl.cc.
References lar_content::MatchingBaseAlgorithm::CalculateOverlapResult(), lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, lar_content::NViewMatchingControl::m_pAlgorithm, and lar_content::LArClusterHelper::SortByNHits().
|
privatevirtual |
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
Implements lar_content::NViewMatchingControl.
Definition at line 191 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, lar_content::NViewMatchingControl::m_pAlgorithm, and lar_content::MatchingBaseAlgorithm::PrepareInputClusters().
|
privatevirtual |
Read settings from xml.
xmlHandle | the xml handle |
Implements lar_content::NViewMatchingControl.
Definition at line 232 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_inputClusterListName1, and lar_content::TwoViewMatchingControl< T >::m_inputClusterListName2.
|
privatevirtual |
Select a subset of input clusters for processing in this algorithm.
Implements lar_content::NViewMatchingControl.
Definition at line 163 of file TwoViewMatchingControl.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap, lar_content::TwoViewMatchingControl< T >::m_inputClusterListName1, lar_content::TwoViewMatchingControl< T >::m_inputClusterListName2, lar_content::NViewMatchingControl::m_pAlgorithm, lar_content::TwoViewMatchingControl< T >::m_pInputClusterList1, lar_content::TwoViewMatchingControl< T >::m_pInputClusterList2, and lar_content::MatchingBaseAlgorithm::SelectInputClusters().
|
privatevirtual |
Tidy member variables.
Implements lar_content::NViewMatchingControl.
Definition at line 200 of file TwoViewMatchingControl.cc.
References lar_content::OverlapMatrix< T >::Clear(), lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap, lar_content::TwoViewMatchingControl< T >::m_overlapMatrix, lar_content::TwoViewMatchingControl< T >::m_pInputClusterList1, and lar_content::TwoViewMatchingControl< T >::m_pInputClusterList2.
|
privatevirtual |
Update to reflect addition of a new cluster to the problem space.
pNewCluster | address of the new cluster |
Implements lar_content::NViewMatchingControl.
Definition at line 62 of file TwoViewMatchingControl.cc.
References lar_content::MatchingBaseAlgorithm::CalculateOverlapResult(), lar_content::LArClusterHelper::GetClusterHitType(), lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, lar_content::TwoViewMatchingControl< T >::m_hitTypeToIndexMap, lar_content::NViewMatchingControl::m_pAlgorithm, and lar_content::LArClusterHelper::SortByNHits().
|
privatevirtual |
Update to reflect cluster deletion.
pDeletedCluster | address of the deleted cluster |
Implements lar_content::NViewMatchingControl.
Definition at line 98 of file TwoViewMatchingControl.cc.
References lar_content::TwoViewMatchingControl< T >::m_clusterList1, lar_content::TwoViewMatchingControl< T >::m_clusterList2, lar_content::TwoViewMatchingControl< T >::m_overlapMatrix, and lar_content::OverlapMatrix< T >::RemoveCluster().
Definition at line 82 of file TwoViewMatchingControl.h.
|
private |
The selected modified cluster list 1.
Definition at line 70 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetSelectedClusterList(), lar_content::TwoViewMatchingControl< T >::PerformMainLoop(), lar_content::TwoViewMatchingControl< T >::PrepareAllInputClusters(), lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters(), lar_content::TwoViewMatchingControl< T >::TidyUp(), lar_content::TwoViewMatchingControl< T >::UpdateForNewCluster(), and lar_content::TwoViewMatchingControl< T >::UpdateUponDeletion().
|
private |
The selected modified cluster list 2.
Definition at line 71 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetSelectedClusterList(), lar_content::TwoViewMatchingControl< T >::PerformMainLoop(), lar_content::TwoViewMatchingControl< T >::PrepareAllInputClusters(), lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters(), lar_content::TwoViewMatchingControl< T >::TidyUp(), lar_content::TwoViewMatchingControl< T >::UpdateForNewCluster(), and lar_content::TwoViewMatchingControl< T >::UpdateUponDeletion().
|
private |
The hit type to index map.
Definition at line 76 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetClusterListName(), lar_content::TwoViewMatchingControl< T >::GetHitTypeIndex(), lar_content::TwoViewMatchingControl< T >::GetInputClusterList(), lar_content::TwoViewMatchingControl< T >::GetSelectedClusterList(), lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters(), lar_content::TwoViewMatchingControl< T >::TidyUp(), and lar_content::TwoViewMatchingControl< T >::UpdateForNewCluster().
|
private |
The name of the view 1 cluster list.
Definition at line 78 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetClusterListName(), lar_content::TwoViewMatchingControl< T >::ReadSettings(), and lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters().
|
private |
The name of the view 2 cluster list.
Definition at line 79 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetClusterListName(), lar_content::TwoViewMatchingControl< T >::ReadSettings(), and lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters().
|
private |
The overlap matrix.
Definition at line 73 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetOverlapMatrix(), lar_content::TwoViewMatchingControl< T >::TidyUp(), and lar_content::TwoViewMatchingControl< T >::UpdateUponDeletion().
|
protectedinherited |
The address of the matching base algorithm.
Definition at line 105 of file NViewMatchingControl.h.
Referenced by lar_content::ThreeViewMatchingControl< T >::PerformMainLoop(), lar_content::TwoViewMatchingControl< T >::PerformMainLoop(), lar_content::ThreeViewMatchingControl< T >::PrepareAllInputClusters(), lar_content::TwoViewMatchingControl< T >::PrepareAllInputClusters(), lar_content::ThreeViewMatchingControl< T >::SelectAllInputClusters(), lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters(), lar_content::ThreeViewMatchingControl< T >::UpdateForNewCluster(), and lar_content::TwoViewMatchingControl< T >::UpdateForNewCluster().
|
private |
Address of the input cluster list 1.
Definition at line 67 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetInputClusterList(), lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters(), and lar_content::TwoViewMatchingControl< T >::TidyUp().
|
private |
Address of the input cluster list 2.
Definition at line 68 of file TwoViewMatchingControl.h.
Referenced by lar_content::TwoViewMatchingControl< T >::GetInputClusterList(), lar_content::TwoViewMatchingControl< T >::SelectAllInputClusters(), and lar_content::TwoViewMatchingControl< T >::TidyUp().