TransverseAssociationAlgorithm class. More...
#include <TransverseAssociationAlgorithm.h>
Classes | |
class | LArTransverseCluster |
LArTransverseCluster class. More... | |
Public Member Functions | |
TransverseAssociationAlgorithm () | |
Default constructor. More... | |
Public Member Functions inherited from lar_content::ClusterAssociationAlgorithm | |
ClusterAssociationAlgorithm () | |
Default constructor. More... | |
Private Types | |
typedef std::vector< LArTransverseCluster * > | TransverseClusterList |
typedef KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > | HitKDTree2D |
typedef KDTreeNodeInfoT< const pandora::CaloHit *, 2 > | HitKDNode2D |
typedef std::vector< HitKDNode2D > | HitKDNode2DList |
typedef std::unordered_map< const pandora::Cluster *, pandora::ClusterSet > | ClusterToClustersMap |
typedef std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > | HitToClusterMap |
Private Member Functions | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
void | GetListOfCleanClusters (const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const |
Populate cluster vector with subset of cluster list, containing clusters judged to be clean. More... | |
void | PopulateClusterAssociationMap (const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const |
Populate the cluster association map. More... | |
bool | IsExtremalCluster (const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const |
Determine which of two clusters is extremal. More... | |
void | GetNearbyClusterMap (const pandora::ClusterVector &allClusters, ClusterToClustersMap &nearbyClusters) const |
Use a kd-tree to obtain details of all nearby cluster combinations. More... | |
void | SortInputClusters (const pandora::ClusterVector &inputClusters, pandora::ClusterVector &shortClusters, pandora::ClusterVector &transverseMediumClusters, pandora::ClusterVector &longitudinalMediumClusters, pandora::ClusterVector &longClusters) const |
Separate input clusters by length. More... | |
void | FillReducedAssociationMap (const ClusterToClustersMap &nearbyClusters, const pandora::ClusterVector &firstVector, const pandora::ClusterVector &secondVector, ClusterAssociationMap &clusterAssociationMap) const |
Form a reduced set of associations between two input lists of clusters. More... | |
void | FillAssociationMap (const ClusterToClustersMap &nearbyClusters, const pandora::ClusterVector &firstVector, const pandora::ClusterVector &secondVector, ClusterAssociationMap &firstAssociationMap, ClusterAssociationMap &secondAssociationMap) const |
Form associations between two input lists of cluster. More... | |
void | FillTransverseClusterList (const ClusterToClustersMap &nearbyClusters, const pandora::ClusterVector &inputClusters, const ClusterAssociationMap &inputAssociationMap, TransverseClusterList &transverseClusterList) const |
Create transverse cluster objects, these are protoclusters with a direction and inner/outer vertices. More... | |
void | FillTransverseAssociationMap (const ClusterToClustersMap &nearbyClusters, const TransverseClusterList &transverseClusterList, const ClusterAssociationMap &transverseAssociationMap, ClusterAssociationMap &clusterAssociationMap) const |
Form associations between transverse cluster objects. More... | |
void | GetAssociatedClusters (const ClusterToClustersMap &nearbyClusters, const pandora::Cluster *const pCluster, const ClusterAssociationMap &inputAssociationMap, pandora::ClusterVector &associatedClusters) const |
Find the clusters that are transversely associated with a target cluster. More... | |
bool | IsAssociated (const bool isForward, const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const ClusterToClustersMap &nearbyClusters) const |
Determine whether clusters are association. More... | |
bool | IsTransverseAssociated (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const ClusterToClustersMap &nearbyClusters) const |
Determine whether two clusters are within the same cluster window. More... | |
bool | IsTransverseAssociated (const LArTransverseCluster *const pTransverseCluster1, const LArTransverseCluster *const pTransverseCluster2, const ClusterToClustersMap &nearbyClusters) const |
Determine whether two transverse clusters are associated. More... | |
bool | IsTransverseAssociated (const LArTransverseCluster *const pTransverseCluster, const pandora::CartesianVector &testPosition) const |
Determine whether one transverse cluster is associated with the vertex from a second transverse cluster. More... | |
bool | IsOverlapping (const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const |
Determine whether two clusters are overlapping. More... | |
float | GetTransverseSpan (const pandora::Cluster *const pCluster) const |
Calculate the overall span in X for a clusters. More... | |
float | GetLongitudinalSpan (const pandora::Cluster *const pCluster) const |
Calculate the overall span in Z for a clusters. More... | |
float | GetTransverseSpan (const pandora::Cluster *const pCluster, const pandora::ClusterVector &associatedClusters) const |
Calculate the overall span in X for a set of clusters. More... | |
void | GetExtremalCoordinatesX (const pandora::Cluster *const pCluster, float &minX, float &maxX) const |
Get minimum and maximum X coordinates for a given cluster. More... | |
void | GetExtremalCoordinatesZ (const pandora::Cluster *const pCluster, float &minZ, float &maxZ) const |
Get minimum and maximum Z coordinates for a given cluster. More... | |
void | GetExtremalCoordinatesXZ (const pandora::Cluster *const pCluster, const bool useX, float &minXZ, float &maxXZ) const |
Get minimum and maximum X or Z coordinates for a given cluster. More... | |
void | GetExtremalCoordinatesX (const pandora::Cluster *const pCluster, pandora::CartesianVector &innerCoordinate, pandora::CartesianVector &outerCoordinate) const |
Get extremal 2D coordinates for a given cluster (ordered by X) More... | |
void | FillReducedAssociationMap (const ClusterAssociationMap &inputAssociationMap, ClusterAssociationMap &outputAssociationMap) const |
Remove double-counting from association map. More... | |
void | FillReducedAssociationMap (const ClusterAssociationMap &firstAssociationMap, const ClusterAssociationMap &secondAssociationMap, const ClusterAssociationMap &secondAssociationMapSwapped, ClusterAssociationMap &clusterAssociationMap) const |
Use one map to block associations from another map. More... | |
void | FillSymmetricAssociationMap (const ClusterAssociationMap &inputAssociationMap, ClusterAssociationMap &outputAssociationMap) const |
Symmetrise an association map. More... | |
void | FinalizeClusterAssociationMap (const ClusterAssociationMap &inputAssociationMap, ClusterAssociationMap &outputAssociationMap) const |
Symmetrise and then remove double-counting from an association map. More... | |
Private Attributes | |
float | m_firstLengthCut |
float | m_secondLengthCut |
float | m_clusterWindow |
float | m_clusterAngle |
float | m_clusterCosAngle |
float | m_clusterTanAngle |
float | m_maxTransverseOverlap |
float | m_maxProjectedOverlap |
float | m_maxLongitudinalOverlap |
float | m_transverseClusterMinCosTheta |
float | m_transverseClusterMinLength |
float | m_transverseClusterMaxDisplacement |
float | m_searchRegionX |
Search region, applied to x dimension, for look-up from kd-trees. More... | |
float | m_searchRegionZ |
Search region, applied to u/v/w dimension, for look-up from kd-trees. More... | |
Additional Inherited Members | |
Protected Types inherited from lar_content::ClusterAssociationAlgorithm | |
typedef std::unordered_map< const pandora::Cluster *, ClusterAssociation > | ClusterAssociationMap |
Protected Member Functions inherited from lar_content::ClusterAssociationAlgorithm | |
virtual pandora::StatusCode | Run () |
TransverseAssociationAlgorithm class.
Definition at line 28 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 100 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 97 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 98 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 96 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 101 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 94 of file TransverseAssociationAlgorithm.h.
lar_content::TransverseAssociationAlgorithm::TransverseAssociationAlgorithm | ( | ) |
Default constructor.
Definition at line 22 of file TransverseAssociationAlgorithm.cc.
|
private |
Form associations between two input lists of cluster.
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
firstVector | the first input vector of clusters |
secondVector | the second input vector of clusters |
firstAssociationMap | the map of associations between first and second cluster vectors |
secondAssociationMap | the reversed map of associations between first and cluster vectors |
Definition at line 212 of file TransverseAssociationAlgorithm.cc.
|
private |
Form a reduced set of associations between two input lists of clusters.
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
firstVector | the first input vector of clusters |
secondVector | the second input vector of clusters |
clusterAssociationMap | the output map of associations between clusters |
|
private |
Remove double-counting from association map.
inputAssociationMap | the inputted association map |
outputAssociationMap | the outputted association map |
Definition at line 592 of file TransverseAssociationAlgorithm.cc.
|
private |
Use one map to block associations from another map.
firstAssociationMap | the first association map |
secondAssociationMap | the second association map |
secondAssociationMap | the second association map reversed |
clusterAssociationMap | the outputted association map |
Definition at line 600 of file TransverseAssociationAlgorithm.cc.
|
private |
Symmetrise an association map.
inputAssociationMap | the inputted association map |
outputAssociationMap | the outputted association map |
Definition at line 685 of file TransverseAssociationAlgorithm.cc.
|
private |
Form associations between transverse cluster objects.
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
transverseClusterList | the input vector of transverse cluster objects |
transverseAssociationMap | the external map of associations between clusters |
clusterAssociationMap | the output map of associations between clusters |
Definition at line 262 of file TransverseAssociationAlgorithm.cc.
|
private |
Create transverse cluster objects, these are protoclusters with a direction and inner/outer vertices.
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
inputClusters | the input vector of clusters |
inputAssociationMap | the map of associations between input clusters |
transverseClusterList | the output vector of transverse cluster objects |
Definition at line 243 of file TransverseAssociationAlgorithm.cc.
|
private |
Symmetrise and then remove double-counting from an association map.
inputAssociationMap | the inputted association map |
outputAssociationMap | the outputted association map |
Definition at line 769 of file TransverseAssociationAlgorithm.cc.
|
private |
Find the clusters that are transversely associated with a target cluster.
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
pCluster | the target cluster |
inputAssociationMap | the map of associations between clusters |
outputClusters | the output vector of clusters transversely associated with target cluster |
Definition at line 305 of file TransverseAssociationAlgorithm.cc.
|
private |
Get minimum and maximum X coordinates for a given cluster.
pCluster | the input cluster |
minX | the minimum X position |
maxX | the maximum X position |
|
private |
Get extremal 2D coordinates for a given cluster (ordered by X)
pCluster | the input cluster |
innerCoordinate | the inner coordinate |
outerCoordinate | the outer coordinate |
|
private |
Get minimum and maximum X or Z coordinates for a given cluster.
pCluster | the input cluster |
useX | calculate extermal coordinates for X (rather than Z) |
minXZ | the minimum X or Z position |
maxXZ | the maximum X or Z position |
Definition at line 553 of file TransverseAssociationAlgorithm.cc.
|
private |
Get minimum and maximum Z coordinates for a given cluster.
pCluster | the input cluster |
minZ | the minimum Z position |
maxZ | the maximum Z position |
Definition at line 546 of file TransverseAssociationAlgorithm.cc.
|
privatevirtual |
Populate cluster vector with subset of cluster list, containing clusters judged to be clean.
pClusterList | address of the cluster list |
clusterVector | to receive the populated cluster vector |
Implements lar_content::ClusterAssociationAlgorithm.
Definition at line 42 of file TransverseAssociationAlgorithm.cc.
|
private |
Calculate the overall span in Z for a clusters.
pCluster | the target cluster |
Definition at line 475 of file TransverseAssociationAlgorithm.cc.
|
private |
Use a kd-tree to obtain details of all nearby cluster combinations.
allClusters | the list of all clusters |
nearbyClusters | to obtain the nearby cluster map |
Definition at line 118 of file TransverseAssociationAlgorithm.cc.
|
private |
Calculate the overall span in X for a clusters.
pCluster | the target cluster |
|
private |
Calculate the overall span in X for a set of clusters.
pCluster | the target cluster |
associatedClusters | the vector of associated clusters |
|
private |
Determine whether clusters are association.
isForward | whether the association is forwards or backwards |
pCluster1 | the first cluster |
pCluster2 | the second cluster |
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
Definition at line 335 of file TransverseAssociationAlgorithm.cc.
|
privatevirtual |
Determine which of two clusters is extremal.
isForward | whether propagation direction is forward |
pCurrentCluster | current extremal cluster |
pTestCluster | potential extremal cluster |
Implements lar_content::ClusterAssociationAlgorithm.
Definition at line 515 of file TransverseAssociationAlgorithm.cc.
|
private |
Determine whether two clusters are overlapping.
pCluster1 | the first cluster |
pCluster2 | the second cluster |
Definition at line 445 of file TransverseAssociationAlgorithm.cc.
|
private |
Determine whether two clusters are within the same cluster window.
pCluster1 | the first cluster |
pCluster2 | the second cluster |
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
|
private |
Determine whether two transverse clusters are associated.
pTransverseCluster1 | the first transverse cluster |
pTransverseCluster2 | the second transverse cluster |
nearbyClusters | the nearby cluster map, extracted via use of a kd-tree |
Definition at line 404 of file TransverseAssociationAlgorithm.cc.
|
private |
Determine whether one transverse cluster is associated with the vertex from a second transverse cluster.
pTransverseCluster | the target cluster |
theVertex | the vertex position |
|
privatevirtual |
Populate the cluster association map.
clusterVector | the cluster vector |
clusterAssociationMap | to receive the populated cluster association map |
Implements lar_content::ClusterAssociationAlgorithm.
Definition at line 51 of file TransverseAssociationAlgorithm.cc.
|
privatevirtual |
Reimplemented from lar_content::ClusterAssociationAlgorithm.
Definition at line 851 of file TransverseAssociationAlgorithm.cc.
|
private |
Separate input clusters by length.
inputClusters | the input vector of clusters |
shortClusters | the output vector of short clusters |
transverseMediumClusters | the output vector of transverse medium clusters |
longitudinalMediumClusters | the output vector of longitudinal medium clusters |
longClusters | the output vector of all long clusters |
Definition at line 159 of file TransverseAssociationAlgorithm.cc.
|
private |
Definition at line 340 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 341 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 342 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 339 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 336 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 346 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 345 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 344 of file TransverseAssociationAlgorithm.h.
|
private |
Search region, applied to x dimension, for look-up from kd-trees.
Definition at line 352 of file TransverseAssociationAlgorithm.h.
|
private |
Search region, applied to u/v/w dimension, for look-up from kd-trees.
Definition at line 353 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 337 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 350 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 348 of file TransverseAssociationAlgorithm.h.
|
private |
Definition at line 349 of file TransverseAssociationAlgorithm.h.