LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
OverlapTensor class. More...
#include "LArOverlapTensor.h"
Classes | |
class | Element |
Element class. More... | |
Public Types | |
typedef T | OverlapResult |
typedef std::vector< Element > | ElementList |
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterList > | ClusterNavigationMap |
typedef std::unordered_map< const pandora::Cluster *, OverlapResult > | OverlapList |
typedef std::unordered_map< const pandora::Cluster *, OverlapList > | OverlapMatrix |
typedef std::unordered_map< const pandora::Cluster *, OverlapMatrix > | TheTensor |
typedef TheTensor::const_iterator | const_iterator |
Public Member Functions | |
void | GetUnambiguousElements (const bool ignoreUnavailable, ElementList &elementList) const |
Get unambiguous elements. More... | |
bool | DefaultAmbiguityFunction (const pandora::ClusterList &clusterListU, const pandora::ClusterList &clusterListV, const pandora::ClusterList &clusterListW, const pandora::Cluster *&pClusterU, const pandora::Cluster *&pClusterV, const pandora::Cluster *&pClusterW) const |
Default ambiguity function, checking that only one U, V and W cluster is found. More... | |
void | GetNConnections (const pandora::Cluster *const pCluster, const bool ignoreUnavailable, unsigned int &nU, unsigned int &nV, unsigned int &nW) const |
Get the number of connections for a specified cluster. More... | |
void | GetConnectedElements (const pandora::Cluster *const pCluster, const bool ignoreUnavailable, ElementList &elementList) const |
Get a list of elements connected to a specified cluster. More... | |
void | GetConnectedElements (const pandora::Cluster *const pCluster, const bool ignoreUnavailable, ElementList &elementList, unsigned int &nU, unsigned int &nV, unsigned int &nW) const |
Get a list of elements connected to a specified cluster. More... | |
const_iterator | begin () const |
Returns an iterator referring to the first element in the overlap tensor. More... | |
const_iterator | end () const |
Returns an iterator referring to the past-the-end element in the overlap tensor. More... | |
void | GetSortedKeyClusters (pandora::ClusterVector &sortedKeyClusters) const |
Get a sorted vector of key clusters (U clusters with current implementation) More... | |
const OverlapResult & | GetOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW) const |
Get the overlap result for a specified trio of clusters. More... | |
const OverlapList & | GetOverlapList (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV) const |
Get the overlap list for a specified pair of clusters. More... | |
const OverlapMatrix & | GetOverlapMatrix (const pandora::Cluster *const pClusterU) const |
Get the cluster overlap matrix for a specified cluster. More... | |
const ClusterNavigationMap & | GetClusterNavigationMapUV () const |
Get the cluster navigation map U->V. More... | |
const ClusterNavigationMap & | GetClusterNavigationMapVW () const |
Get the cluster navigation map V->W. More... | |
const ClusterNavigationMap & | GetClusterNavigationMapWU () const |
Get the cluster navigation map W->U. More... | |
void | SetOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, const OverlapResult &overlapResult) |
Set overlap result. More... | |
void | ReplaceOverlapResult (const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW, const OverlapResult &overlapResult) |
SetReplace an existing overlap result. More... | |
void | RemoveCluster (const pandora::Cluster *const pCluster) |
Remove entries from tensor corresponding to specified cluster. More... | |
void | Clear () |
Clear overlap tensor. More... | |
Private Member Functions | |
void | GetConnectedElements (const pandora::Cluster *const pCluster, const bool ignoreUnavailable, ElementList &elementList, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const |
Get elements connected to a specified cluster. More... | |
void | ExploreConnections (const pandora::Cluster *const pCluster, const bool ignoreUnavailable, pandora::ClusterList &clusterListU, pandora::ClusterList &clusterListV, pandora::ClusterList &clusterListW) const |
Explore connections associated with a given cluster. More... | |
Private Attributes | |
TheTensor | m_overlapTensor |
The overlap tensor. More... | |
ClusterNavigationMap | m_clusterNavigationMapUV |
The cluster navigation map U->V. More... | |
ClusterNavigationMap | m_clusterNavigationMapVW |
The cluster navigation map V->W. More... | |
ClusterNavigationMap | m_clusterNavigationMapWU |
The cluster navigation map W->U. More... | |
OverlapTensor class.
Definition at line 23 of file LArOverlapTensor.h.
typedef std::unordered_map<const pandora::Cluster *, pandora::ClusterList> lar_content::OverlapTensor< T >::ClusterNavigationMap |
Definition at line 155 of file LArOverlapTensor.h.
typedef TheTensor::const_iterator lar_content::OverlapTensor< T >::const_iterator |
Definition at line 160 of file LArOverlapTensor.h.
typedef std::vector<Element> lar_content::OverlapTensor< T >::ElementList |
Definition at line 96 of file LArOverlapTensor.h.
typedef std::unordered_map<const pandora::Cluster *, OverlapResult> lar_content::OverlapTensor< T >::OverlapList |
Definition at line 156 of file LArOverlapTensor.h.
typedef std::unordered_map<const pandora::Cluster *, OverlapList> lar_content::OverlapTensor< T >::OverlapMatrix |
Definition at line 157 of file LArOverlapTensor.h.
typedef T lar_content::OverlapTensor< T >::OverlapResult |
Definition at line 26 of file LArOverlapTensor.h.
typedef std::unordered_map<const pandora::Cluster *, OverlapMatrix> lar_content::OverlapTensor< T >::TheTensor |
Definition at line 158 of file LArOverlapTensor.h.
|
inline |
Returns an iterator referring to the first element in the overlap tensor.
Definition at line 317 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_overlapTensor.
Referenced by lar_content::ClearTrackFragmentsTool::GetAffectedKeyClusters().
|
inline |
Clear overlap tensor.
Definition at line 400 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapUV, lar_content::OverlapTensor< T >::m_clusterNavigationMapVW, lar_content::OverlapTensor< T >::m_clusterNavigationMapWU, and lar_content::OverlapTensor< T >::m_overlapTensor.
Referenced by lar_content::ThreeViewMatchingControl< T >::TidyUp().
bool lar_content::OverlapTensor< T >::DefaultAmbiguityFunction | ( | const pandora::ClusterList & | clusterListU, |
const pandora::ClusterList & | clusterListV, | ||
const pandora::ClusterList & | clusterListW, | ||
const pandora::Cluster *& | pClusterU, | ||
const pandora::Cluster *& | pClusterV, | ||
const pandora::Cluster *& | pClusterW | ||
) | const |
Default ambiguity function, checking that only one U, V and W cluster is found.
clusterListU | cluster list U |
clusterListV | cluster list V |
clusterListW | cluster list W |
pClusterU | to receive the address of the unambiguous U cluster |
pClusterV | to receive the address of the unambiguous V cluster |
pClusterW | to receive the address of the unambiguous W cluster |
Definition at line 79 of file LArOverlapTensor.cc.
|
inline |
Returns an iterator referring to the past-the-end element in the overlap tensor.
Definition at line 325 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_overlapTensor.
Referenced by lar_content::ClearTrackFragmentsTool::GetAffectedKeyClusters().
|
private |
Explore connections associated with a given cluster.
pCluster | address of the cluster |
clusterListU | connected u clusters |
clusterListV | connected v clusters |
clusterListW | connected w clusters |
Definition at line 295 of file LArOverlapTensor.cc.
|
inline |
Get the cluster navigation map U->V.
Definition at line 376 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapUV.
|
inline |
Get the cluster navigation map V->W.
Definition at line 384 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapVW.
|
inline |
Get the cluster navigation map W->U.
Definition at line 392 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapWU.
|
inline |
Get a list of elements connected to a specified cluster.
pCluster | address of a cluster |
ignoreUnavailable | whether to ignore unavailable clusters |
elementList | to receive the connected element list |
Definition at line 308 of file LArOverlapTensor.h.
Referenced by lar_content::AmbiguousDeltaRayTool::ExamineConnectedElements(), lar_content::DeltaRayMergeTool::ExamineConnectedElements(), lar_content::SimpleShowersTool::FindBestShower(), lar_content::MopUpRemnantsTool::FindBestShowers(), lar_content::ClearShowersTool::FindClearShowers(), lar_content::ConnectedRemnantsTool::FindConnectedShowers(), lar_content::LongTracksTool::FindLongTracks(), lar_content::MatchedEndPointsTool::FindMatchedTracks(), lar_content::MissingTrackTool::FindMissingTracks(), lar_content::SplitShowersTool::FindSplitShowers(), lar_content::TracksCrossingGapsTool::FindTracks(), lar_content::TrackSplittingTool::FindTracks(), lar_content::MissingTrackSegmentTool::FindTracks(), lar_content::ClearTrackFragmentsTool::GetAndCheckElementList(), lar_content::ThreeDKinkBaseTool::GetModifications(), lar_content::OverlapTensor< T >::GetNConnections(), lar_content::TransverseTensorVisualizationTool::Run(), lar_content::ShowerTensorVisualizationTool::Run(), lar_content::DeltaRayRemovalTool::Run(), and lar_content::CosmicRayRemovalTool::Run().
void lar_content::OverlapTensor< T >::GetConnectedElements | ( | const pandora::Cluster *const | pCluster, |
const bool | ignoreUnavailable, | ||
ElementList & | elementList, | ||
unsigned int & | nU, | ||
unsigned int & | nV, | ||
unsigned int & | nW | ||
) | const |
Get a list of elements connected to a specified cluster.
pCluster | address of a cluster |
ignoreUnavailable | whether to ignore unavailable clusters |
elementList | to receive the connected element list |
nU | to receive the number of u connections |
nV | to receive the number of v connections |
nW | to receive the number of w connections |
Definition at line 95 of file LArOverlapTensor.cc.
|
private |
Get elements connected to a specified cluster.
pCluster | address of the cluster |
elementList | the element list |
clusterListU | connected u clusters |
clusterListV | connected v clusters |
clusterListW | connected w clusters |
|
inline |
Get the number of connections for a specified cluster.
pCluster | address of a cluster |
ignoreUnavailable | whether to ignore unavailable clusters |
nU | to receive the number of u connections |
nV | to receive the number of v connections |
nW | to receive the number of w connections |
Definition at line 298 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::GetConnectedElements().
|
inline |
Get the overlap list for a specified pair of clusters.
pClusterU | address of cluster u |
pClusterV | address of cluster v |
Definition at line 348 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::GetOverlapMatrix().
Referenced by lar_content::OverlapTensor< T >::GetOverlapResult().
|
inline |
Get the cluster overlap matrix for a specified cluster.
pClusterU | address of cluster u |
Definition at line 363 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_overlapTensor.
Referenced by lar_content::OverlapTensor< T >::GetOverlapList().
|
inline |
Get the overlap result for a specified trio of clusters.
pClusterU | address of cluster u |
pClusterV | address of cluster v |
pClusterW | address of cluster w |
Definition at line 333 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::GetOverlapList().
Referenced by lar_content::ThreeViewTrackFragmentsAlgorithm::PerformMainLoop().
void lar_content::OverlapTensor< T >::GetSortedKeyClusters | ( | pandora::ClusterVector & | sortedKeyClusters | ) | const |
Get a sorted vector of key clusters (U clusters with current implementation)
sortedKeyClusters | to receive the sorted vector of key clusters |
Definition at line 108 of file LArOverlapTensor.cc.
References util::begin(), and util::end().
Referenced by lar_content::AmbiguousDeltaRayTool::ExamineConnectedElements(), lar_content::DeltaRayMergeTool::ExamineConnectedElements(), lar_content::SimpleShowersTool::FindBestShower(), lar_content::MopUpRemnantsTool::FindBestShowers(), lar_content::ClearShowersTool::FindClearShowers(), lar_content::ConnectedRemnantsTool::FindConnectedShowers(), lar_content::LongTracksTool::FindLongTracks(), lar_content::MatchedEndPointsTool::FindMatchedTracks(), lar_content::MissingTrackTool::FindMissingTracks(), lar_content::SplitShowersTool::FindSplitShowers(), lar_content::ClearTrackFragmentsTool::FindTrackFragments(), lar_content::TracksCrossingGapsTool::FindTracks(), lar_content::TrackSplittingTool::FindTracks(), lar_content::MissingTrackSegmentTool::FindTracks(), lar_content::ThreeDKinkBaseTool::GetModifications(), lar_content::ShowerTensorVisualizationTool::Run(), lar_content::TransverseTensorVisualizationTool::Run(), lar_content::DeltaRayRemovalTool::Run(), and lar_content::CosmicRayRemovalTool::Run().
void lar_content::OverlapTensor< T >::GetUnambiguousElements | ( | const bool | ignoreUnavailable, |
ElementList & | elementList | ||
) | const |
Get unambiguous elements.
ignoreUnavailable | whether to ignore unavailable clusters |
elementList | to receive the unambiguous element list |
Definition at line 42 of file LArOverlapTensor.cc.
References util::begin(), and util::end().
Referenced by lar_content::ClearRemnantsTool::Run(), lar_content::ClearTracksTool::Run(), lar_content::UnambiguousDeltaRayTool::Run(), and lar_content::ClearLongitudinalTracksTool::Run().
void lar_content::OverlapTensor< T >::RemoveCluster | ( | const pandora::Cluster *const | pCluster | ) |
Remove entries from tensor corresponding to specified cluster.
pCluster | address of the cluster |
Definition at line 170 of file LArOverlapTensor.cc.
References util::begin(), and util::end().
Referenced by lar_content::ThreeViewMatchingControl< T >::UpdateUponDeletion().
void lar_content::OverlapTensor< T >::ReplaceOverlapResult | ( | const pandora::Cluster *const | pClusterU, |
const pandora::Cluster *const | pClusterV, | ||
const pandora::Cluster *const | pClusterW, | ||
const OverlapResult & | overlapResult | ||
) |
SetReplace an existing overlap result.
pClusterU | address of cluster u |
pClusterV | address of cluster v |
pClusterW | address of cluster w |
overlapResult | the overlap result |
Definition at line 146 of file LArOverlapTensor.cc.
Referenced by lar_content::ThreeViewTrackFragmentsAlgorithm::PerformMainLoop().
void lar_content::OverlapTensor< T >::SetOverlapResult | ( | const pandora::Cluster *const | pClusterU, |
const pandora::Cluster *const | pClusterV, | ||
const pandora::Cluster *const | pClusterW, | ||
const OverlapResult & | overlapResult | ||
) |
Set overlap result.
pClusterU | address of cluster u |
pClusterV | address of cluster v |
pClusterW | address of cluster w |
overlapResult | the overlap result |
Definition at line 119 of file LArOverlapTensor.cc.
Referenced by lar_content::ThreeViewRemnantsAlgorithm::CalculateOverlapResult(), lar_content::ThreeViewDeltaRayMatchingAlgorithm::DoesClusterPassTensorThreshold(), lar_content::ThreeViewTrackFragmentsAlgorithm::PerformMainLoop(), lar_content::ThreeViewShowersAlgorithm::RemoveFromSlidingFitCache(), lar_content::ThreeViewLongitudinalTracksAlgorithm::ThreeViewLongitudinalTracksAlgorithm(), and lar_content::ThreeViewTransverseTracksAlgorithm::ThreeViewTransverseTracksAlgorithm().
|
private |
The cluster navigation map U->V.
Definition at line 290 of file LArOverlapTensor.h.
Referenced by lar_content::OverlapTensor< T >::Clear(), and lar_content::OverlapTensor< T >::GetClusterNavigationMapUV().
|
private |
The cluster navigation map V->W.
Definition at line 291 of file LArOverlapTensor.h.
Referenced by lar_content::OverlapTensor< T >::Clear(), and lar_content::OverlapTensor< T >::GetClusterNavigationMapVW().
|
private |
The cluster navigation map W->U.
Definition at line 292 of file LArOverlapTensor.h.
Referenced by lar_content::OverlapTensor< T >::Clear(), and lar_content::OverlapTensor< T >::GetClusterNavigationMapWU().
|
private |
The overlap tensor.
Definition at line 289 of file LArOverlapTensor.h.
Referenced by lar_content::OverlapTensor< T >::begin(), lar_content::OverlapTensor< T >::Clear(), lar_content::OverlapTensor< T >::end(), and lar_content::OverlapTensor< T >::GetOverlapMatrix().