LArSoft
v06_85_00
Liquid Argon Software toolkit - http://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 144 of file LArOverlapTensor.h.
typedef TheTensor::const_iterator lar_content::OverlapTensor< T >::const_iterator |
Definition at line 149 of file LArOverlapTensor.h.
typedef std::vector<Element> lar_content::OverlapTensor< T >::ElementList |
Definition at line 86 of file LArOverlapTensor.h.
typedef std::unordered_map<const pandora::Cluster*, OverlapResult> lar_content::OverlapTensor< T >::OverlapList |
Definition at line 145 of file LArOverlapTensor.h.
typedef std::unordered_map<const pandora::Cluster*, OverlapList> lar_content::OverlapTensor< T >::OverlapMatrix |
Definition at line 146 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 147 of file LArOverlapTensor.h.
|
inline |
Returns an iterator referring to the first element in the overlap tensor.
Definition at line 303 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_overlapTensor.
Referenced by lar_content::ClearTrackFragmentsTool::GetAffectedKeyClusters().
|
inline |
Clear overlap tensor.
Definition at line 387 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::ThreeDBaseAlgorithm< 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 68 of file LArOverlapTensor.cc.
|
inline |
Returns an iterator referring to the past-the-end element in the overlap tensor.
Definition at line 311 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 273 of file LArOverlapTensor.cc.
|
inline |
Get the cluster navigation map U->V.
Definition at line 363 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapUV.
Referenced by lar_content::ThreeDBaseAlgorithm< T >::RemoveUnavailableTensorElements().
|
inline |
Get the cluster navigation map V->W.
Definition at line 371 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapVW.
Referenced by lar_content::ThreeDBaseAlgorithm< T >::RemoveUnavailableTensorElements().
|
inline |
Get the cluster navigation map W->U.
Definition at line 379 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::m_clusterNavigationMapWU.
Referenced by lar_content::ThreeDBaseAlgorithm< T >::RemoveUnavailableTensorElements().
|
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 294 of file LArOverlapTensor.h.
Referenced by 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(), and lar_content::ShowerTensorVisualizationTool::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 84 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 284 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 334 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 349 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 319 of file LArOverlapTensor.h.
References lar_content::OverlapTensor< T >::GetOverlapList().
Referenced by lar_content::ThreeDTrackFragmentsAlgorithm::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 95 of file LArOverlapTensor.cc.
References evd::details::begin(), and evd::details::end().
Referenced by 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(), and lar_content::TransverseTensorVisualizationTool::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 31 of file LArOverlapTensor.cc.
References evd::details::begin(), and evd::details::end().
Referenced by lar_content::ClearRemnantsTool::Run(), lar_content::ClearTracksTool::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 154 of file LArOverlapTensor.cc.
References evd::details::begin(), and evd::details::end().
Referenced by lar_content::ThreeDBaseAlgorithm< 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 130 of file LArOverlapTensor.cc.
Referenced by lar_content::ThreeDTrackFragmentsAlgorithm::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 106 of file LArOverlapTensor.cc.
Referenced by lar_content::ThreeDRemnantsAlgorithm::CalculateOverlapResult(), lar_content::ThreeDTrackFragmentsAlgorithm::PerformMainLoop(), lar_content::ThreeDShowersAlgorithm::RemoveFromSlidingFitCache(), lar_content::ThreeDLongitudinalTracksAlgorithm::ThreeDLongitudinalTracksAlgorithm(), and lar_content::ThreeDTransverseTracksAlgorithm::ThreeDTransverseTracksAlgorithm().
|
private |
The cluster navigation map U->V.
Definition at line 276 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 277 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 278 of file LArOverlapTensor.h.
Referenced by lar_content::OverlapTensor< T >::Clear(), and lar_content::OverlapTensor< T >::GetClusterNavigationMapWU().
|
private |
The overlap tensor.
Definition at line 275 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().