LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
DeltaRayMatchingContainers class. More...
#include "DeltaRayMatchingContainers.h"
Public Types | |
typedef std::map< const pandora::Cluster *, const pandora::ParticleFlowObject * > | ClusterToPfoMap |
typedef std::map< const pandora::Cluster *, pandora::ClusterList > | ClusterProximityMap |
Public Member Functions | |
DeltaRayMatchingContainers () | |
Default constructor. More... | |
const ClusterToPfoMap & | GetClusterToPfoMap (const pandora::HitType hitType) const |
Get the mapping of clusters to the pfos to which they belong. More... | |
const ClusterProximityMap & | GetClusterProximityMap (const pandora::HitType hitType) const |
Get the mapping of clusters to to their neighbouring clusters. More... | |
void | FillContainers (const pandora::PfoList &inputPfoList, const pandora::ClusterList &inputClusterList1, const pandora::ClusterList &inputClusterList2=pandora::ClusterList(), const pandora::ClusterList &inputClusterList3=pandora::ClusterList()) |
Fill the HitToClusterMap, the ClusterProximityMap and the ClusterToPfoMap in all input views. More... | |
void | AddClustersToPfoMaps (const pandora::ParticleFlowObject *const pPfo) |
Add the clusters of a cosmic ray/delta ray pfo to the cluster to pfo maps. More... | |
void | AddClustersToContainers (const pandora::ClusterVector &newClusterVector, const pandora::PfoVector &pfoVector) |
Add a list of clusters to the hit to cluster and cluster proximity maps and, if appropriate, to the cluster to pfo map. More... | |
void | RemoveClusterFromContainers (const pandora::Cluster *const pDeletedCluster) |
Remove an input cluster's hits from the hit to cluster and cluster proximity maps and, if appropriate, from the cluster to pfo map. More... | |
void | ClearContainers () |
Empty all algorithm containers. More... | |
Public Attributes | |
float | m_searchRegion1D |
Search region, applied to each dimension, for look-up from kd-tree. More... | |
Private Types | |
typedef std::map< const pandora::CaloHit *, const pandora::Cluster * > | HitToClusterMap |
typedef KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > | HitKDTree2D |
typedef KDTreeNodeInfoT< const pandora::CaloHit *, 2 > | HitKDNode2D |
typedef std::vector< HitKDNode2D > | HitKDNode2DList |
Private Member Functions | |
void | FillHitToClusterMap (const pandora::ClusterList &inputClusterList) |
Populate the hit to cluster map from a list of clusters. More... | |
void | AddToClusterMap (const pandora::Cluster *const pCluster) |
Add the hits of a given cluster to the hit to cluster map. More... | |
void | FillClusterToPfoMaps (const pandora::PfoList &pfoList) |
Populate all cluster to pfo maps from a list of particle flow objects. More... | |
void | FillClusterProximityMap (const pandora::ClusterList &inputClusterList) |
Populate the cluster proximity map from a list of clusters. More... | |
void | BuildKDTree (const pandora::HitType hitType) |
Build the KD tree. More... | |
void | AddToClusterProximityMap (const pandora::Cluster *const pCluster) |
Add a cluster to the cluster proximity map. More... | |
Private Attributes | |
HitToClusterMap | m_hitToClusterMapU |
The mapping of hits to the clusters to which they belong (in the U view) More... | |
HitToClusterMap | m_hitToClusterMapV |
The mapping of hits to the clusters to which they belong (in the V view) More... | |
HitToClusterMap | m_hitToClusterMapW |
The mapping of hits to the clusters to which they belong (in the W view) More... | |
HitKDTree2D | m_kdTreeU |
The KD tree (in the U view) More... | |
HitKDTree2D | m_kdTreeV |
The KD tree (in the V view) More... | |
HitKDTree2D | m_kdTreeW |
The KD tree (in the W view) More... | |
ClusterProximityMap | m_clusterProximityMapU |
The mapping of clusters to their neighbouring clusters (in the U view) More... | |
ClusterProximityMap | m_clusterProximityMapV |
The mapping of clusters to their neighbouring clusters (in the V view) More... | |
ClusterProximityMap | m_clusterProximityMapW |
The mapping of clusters to their neighbouring clusters (in the W view) More... | |
ClusterToPfoMap | m_clusterToPfoMapU |
The mapping of cosmic ray U clusters to the cosmic ray pfos to which they belong. More... | |
ClusterToPfoMap | m_clusterToPfoMapV |
The mapping of cosmic ray V clusters to the cosmic ray pfos to which they belong. More... | |
ClusterToPfoMap | m_clusterToPfoMapW |
The mapping of cosmic ray W clusters to the cosmic ray pfos to which they belong. More... | |
DeltaRayMatchingContainers class.
Definition at line 21 of file DeltaRayMatchingContainers.h.
typedef std::map<const pandora::Cluster *, pandora::ClusterList> lar_content::DeltaRayMatchingContainers::ClusterProximityMap |
Definition at line 25 of file DeltaRayMatchingContainers.h.
typedef std::map<const pandora::Cluster *, const pandora::ParticleFlowObject *> lar_content::DeltaRayMatchingContainers::ClusterToPfoMap |
Definition at line 24 of file DeltaRayMatchingContainers.h.
|
private |
Definition at line 90 of file DeltaRayMatchingContainers.h.
|
private |
Definition at line 91 of file DeltaRayMatchingContainers.h.
|
private |
Definition at line 89 of file DeltaRayMatchingContainers.h.
|
private |
Definition at line 88 of file DeltaRayMatchingContainers.h.
lar_content::DeltaRayMatchingContainers::DeltaRayMatchingContainers | ( | ) |
Default constructor.
Definition at line 23 of file DeltaRayMatchingContainers.cc.
void lar_content::DeltaRayMatchingContainers::AddClustersToContainers | ( | const pandora::ClusterVector & | newClusterVector, |
const pandora::PfoVector & | pfoVector | ||
) |
Add a list of clusters to the hit to cluster and cluster proximity maps and, if appropriate, to the cluster to pfo map.
newClusterVector | the ordered cluster vector |
pfoVector | the matching ordered vector of pfos to which the clusters belong (nullptr if not applicable) |
Definition at line 179 of file DeltaRayMatchingContainers.cc.
References AddClustersToPfoMaps(), AddToClusterMap(), and AddToClusterProximityMap().
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::AddInStrayClusters(), lar_content::OneViewDeltaRayMatchingAlgorithm::MergeClusterGroup(), and lar_content::NViewDeltaRayMatchingAlgorithm< T >::UpdateForNewClusters().
void lar_content::DeltaRayMatchingContainers::AddClustersToPfoMaps | ( | const pandora::ParticleFlowObject *const | pPfo | ) |
Add the clusters of a cosmic ray/delta ray pfo to the cluster to pfo maps.
the | address of the input cosmic ray/delta ray pfo |
Definition at line 156 of file DeltaRayMatchingContainers.cc.
References lar_content::LArPfoHelper::GetClusters(), m_clusterToPfoMapU, m_clusterToPfoMapV, and m_clusterToPfoMapW.
Referenced by AddClustersToContainers(), lar_content::OneViewDeltaRayMatchingAlgorithm::AddIntoExistingDeltaRay(), lar_content::OneViewDeltaRayMatchingAlgorithm::CreatePfo(), and FillClusterToPfoMaps().
|
private |
Add the hits of a given cluster to the hit to cluster map.
pCluster | the address of the input cluster |
Definition at line 54 of file DeltaRayMatchingContainers.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), m_hitToClusterMapU, m_hitToClusterMapV, and m_hitToClusterMapW.
Referenced by AddClustersToContainers(), and FillHitToClusterMap().
|
private |
Add a cluster to the cluster proximity map.
pCluster | the address of the input cluster |
Definition at line 105 of file DeltaRayMatchingContainers.cc.
References lar_content::build_2d_kd_search_region(), lar_content::LArClusterHelper::GetClusterHitType(), m_clusterProximityMapU, m_clusterProximityMapV, m_clusterProximityMapW, m_hitToClusterMapU, m_hitToClusterMapV, m_hitToClusterMapW, m_kdTreeU, m_kdTreeV, m_kdTreeW, m_searchRegion1D, and lar_content::KDTreeLinkerAlgo< DATA, DIM >::search().
Referenced by AddClustersToContainers(), and FillClusterProximityMap().
|
private |
Build the KD tree.
hitType | the hit type of the KD tree to build |
Definition at line 85 of file DeltaRayMatchingContainers.cc.
References lar_content::KDTreeLinkerAlgo< DATA, DIM >::build(), lar_content::fill_and_bound_2d_kd_tree(), m_hitToClusterMapU, m_hitToClusterMapV, m_hitToClusterMapW, m_kdTreeU, m_kdTreeV, and m_kdTreeW.
Referenced by FillClusterProximityMap().
void lar_content::DeltaRayMatchingContainers::ClearContainers | ( | ) |
Empty all algorithm containers.
Definition at line 254 of file DeltaRayMatchingContainers.cc.
References lar_content::KDTreeLinkerAlgo< DATA, DIM >::clear(), m_clusterProximityMapU, m_clusterProximityMapV, m_clusterProximityMapW, m_clusterToPfoMapU, m_clusterToPfoMapV, m_clusterToPfoMapW, m_hitToClusterMapU, m_hitToClusterMapV, m_hitToClusterMapW, m_kdTreeU, m_kdTreeV, and m_kdTreeW.
Referenced by lar_content::OneViewDeltaRayMatchingAlgorithm::Run(), and lar_content::NViewDeltaRayMatchingAlgorithm< T >::TidyUp().
|
private |
Populate the cluster proximity map from a list of clusters.
inputClusterList | the input list of clusters |
Definition at line 70 of file DeltaRayMatchingContainers.cc.
References AddToClusterProximityMap(), BuildKDTree(), and lar_content::LArClusterHelper::GetClusterHitType().
Referenced by FillContainers().
|
private |
Populate all cluster to pfo maps from a list of particle flow objects.
pfoList | the input list of pfos |
Definition at line 148 of file DeltaRayMatchingContainers.cc.
References AddClustersToPfoMaps().
Referenced by FillContainers().
void lar_content::DeltaRayMatchingContainers::FillContainers | ( | const pandora::PfoList & | inputPfoList, |
const pandora::ClusterList & | inputClusterList1, | ||
const pandora::ClusterList & | inputClusterList2 = pandora::ClusterList() , |
||
const pandora::ClusterList & | inputClusterList3 = pandora::ClusterList() |
||
) |
Fill the HitToClusterMap, the ClusterProximityMap and the ClusterToPfoMap in all input views.
inputPfoList | the input list of pfos |
inputClusterList1 | the input list of clusters in view 1 |
inputClusterList2 | the input list of clusters in view 2 |
inputClusterList3 | the input list of clusters in view 3 |
Definition at line 30 of file DeltaRayMatchingContainers.cc.
References FillClusterProximityMap(), FillClusterToPfoMaps(), and FillHitToClusterMap().
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::PrepareInputClusters(), and lar_content::OneViewDeltaRayMatchingAlgorithm::Run().
|
private |
Populate the hit to cluster map from a list of clusters.
inputClusterList | the input list of clusters |
Definition at line 46 of file DeltaRayMatchingContainers.cc.
References AddToClusterMap().
Referenced by FillContainers().
|
inline |
Get the mapping of clusters to to their neighbouring clusters.
Definition at line 152 of file DeltaRayMatchingContainers.h.
References m_clusterProximityMapU, m_clusterProximityMapV, and m_clusterProximityMapW.
Referenced by lar_content::NViewDeltaRayMatchingAlgorithm< T >::CollectStrayClusters(), lar_content::OneViewDeltaRayMatchingAlgorithm::GetBestProjectedCluster(), lar_content::OneViewDeltaRayMatchingAlgorithm::GetNearbyAvailableClusters(), lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetNearbyMuonPfos(), and lar_content::OneViewDeltaRayMatchingAlgorithm::PerformOneViewMatching().
|
inline |
Get the mapping of clusters to the pfos to which they belong.
Definition at line 161 of file DeltaRayMatchingContainers.h.
References m_clusterToPfoMapU, m_clusterToPfoMapV, and m_clusterToPfoMapW.
Referenced by lar_content::OneViewDeltaRayMatchingAlgorithm::AddIntoExistingDeltaRay(), lar_content::NViewDeltaRayMatchingAlgorithm< T >::GetNearbyMuonPfos(), lar_content::OneViewDeltaRayMatchingAlgorithm::IsDeltaRayPfo(), lar_content::OneViewDeltaRayMatchingAlgorithm::IsMuonPfo(), lar_content::OneViewDeltaRayMatchingAlgorithm::PerformOneViewMatching(), and lar_content::NViewDeltaRayMatchingAlgorithm< T >::UpdateUponDeletion().
void lar_content::DeltaRayMatchingContainers::RemoveClusterFromContainers | ( | const pandora::Cluster *const | pDeletedCluster | ) |
Remove an input cluster's hits from the hit to cluster and cluster proximity maps and, if appropriate, from the cluster to pfo map.
pDeletedCluster | the input cluster |
Definition at line 198 of file DeltaRayMatchingContainers.cc.
References lar_content::LArClusterHelper::GetClusterHitType(), m_clusterProximityMapU, m_clusterProximityMapV, m_clusterProximityMapW, m_clusterToPfoMapU, m_clusterToPfoMapV, m_clusterToPfoMapW, m_hitToClusterMapU, m_hitToClusterMapV, and m_hitToClusterMapW.
Referenced by lar_content::OneViewDeltaRayMatchingAlgorithm::MergeClusterGroup(), and lar_content::NViewDeltaRayMatchingAlgorithm< T >::UpdateUponDeletion().
|
private |
The mapping of clusters to their neighbouring clusters (in the U view)
Definition at line 141 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), ClearContainers(), GetClusterProximityMap(), and RemoveClusterFromContainers().
|
private |
The mapping of clusters to their neighbouring clusters (in the V view)
Definition at line 142 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), ClearContainers(), GetClusterProximityMap(), and RemoveClusterFromContainers().
|
private |
The mapping of clusters to their neighbouring clusters (in the W view)
Definition at line 143 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), ClearContainers(), GetClusterProximityMap(), and RemoveClusterFromContainers().
|
private |
The mapping of cosmic ray U clusters to the cosmic ray pfos to which they belong.
Definition at line 144 of file DeltaRayMatchingContainers.h.
Referenced by AddClustersToPfoMaps(), ClearContainers(), GetClusterToPfoMap(), and RemoveClusterFromContainers().
|
private |
The mapping of cosmic ray V clusters to the cosmic ray pfos to which they belong.
Definition at line 145 of file DeltaRayMatchingContainers.h.
Referenced by AddClustersToPfoMaps(), ClearContainers(), GetClusterToPfoMap(), and RemoveClusterFromContainers().
|
private |
The mapping of cosmic ray W clusters to the cosmic ray pfos to which they belong.
Definition at line 146 of file DeltaRayMatchingContainers.h.
Referenced by AddClustersToPfoMaps(), ClearContainers(), GetClusterToPfoMap(), and RemoveClusterFromContainers().
|
private |
The mapping of hits to the clusters to which they belong (in the U view)
Definition at line 135 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterMap(), AddToClusterProximityMap(), BuildKDTree(), ClearContainers(), and RemoveClusterFromContainers().
|
private |
The mapping of hits to the clusters to which they belong (in the V view)
Definition at line 136 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterMap(), AddToClusterProximityMap(), BuildKDTree(), ClearContainers(), and RemoveClusterFromContainers().
|
private |
The mapping of hits to the clusters to which they belong (in the W view)
Definition at line 137 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterMap(), AddToClusterProximityMap(), BuildKDTree(), ClearContainers(), and RemoveClusterFromContainers().
|
private |
The KD tree (in the U view)
Definition at line 138 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), BuildKDTree(), and ClearContainers().
|
private |
The KD tree (in the V view)
Definition at line 139 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), BuildKDTree(), and ClearContainers().
|
private |
The KD tree (in the W view)
Definition at line 140 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), BuildKDTree(), and ClearContainers().
float lar_content::DeltaRayMatchingContainers::m_searchRegion1D |
Search region, applied to each dimension, for look-up from kd-tree.
Definition at line 85 of file DeltaRayMatchingContainers.h.
Referenced by AddToClusterProximityMap(), lar_content::OneViewDeltaRayMatchingAlgorithm::ReadSettings(), and lar_content::NViewDeltaRayMatchingAlgorithm< T >::ReadSettings().