HitWidthClusterMergingAlgorithm class. More...
#include <HitWidthClusterMergingAlgorithm.h>
Public Member Functions | |
HitWidthClusterMergingAlgorithm () | |
Default constructor. More... | |
Public Member Functions inherited from lar_content::ClusterAssociationAlgorithm | |
ClusterAssociationAlgorithm () | |
Default constructor. More... | |
Private Member Functions | |
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... | |
bool | AreClustersAssociated (const LArHitWidthHelper::ClusterParameters ¤tClusterParameters, const LArHitWidthHelper::ClusterParameters &testClusterParameters) const |
Determine whether two clusters are associated. More... | |
void | FindClosestPointToPosition (const pandora::CartesianVector &position, const LArHitWidthHelper::ConstituentHitVector &constituentHitVector, pandora::CartesianVector &closestPoint) const |
Determine the position of the constituent hit that lies closest to a specified position. More... | |
void | GetClusterDirection (const LArHitWidthHelper::ConstituentHitVector &constituentHitVector, pandora::CartesianVector &direction, const pandora::CartesianVector &fitReferencePoint, const float fittingWeight) const |
Determine the cluster direction at a reference point by performing a weighted least squared fit to the input consitutent hit positions The fit is performed in a rotated cartesian coordinate system defined by a fitting axis determined by eigen The function is composed of two main loops that calculate the: More... | |
void | GetConstituentHitSubsetVector (const LArHitWidthHelper::ConstituentHitVector &constituentHitVector, const pandora::CartesianVector &fitReferencePoint, const float fittingWeight, LArHitWidthHelper::ConstituentHitVector &constituentHitSubsetVector) const |
Obtain a vector of the minimum number of hits closest to a reference point that exceed a given weight. More... | |
void | GetFittingAxes (const LArHitWidthHelper::ConstituentHitVector &constituentHitSubsetVector, pandora::CartesianVector &axisDirection, pandora::CartesianVector &orthoDirection) const |
Obtain the axes of the fitting frame. More... | |
void | GetFittingCoordinates (const pandora::CartesianVector &axisDirection, const pandora::CartesianVector &constituentHitPosition, float &rL, float &rT) const |
Translate from (x, y, z) coordinates to (rL, rT) coordinates. More... | |
void | GetGlobalDirection (const pandora::CartesianVector &axisDirection, const float gradient, pandora::CartesianVector &globalDirection) const |
Translate a gradient in the fitting coordinate frame to a direction vector in the detector frame. More... | |
void | RemoveShortcutAssociations (const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const |
Remove 'shortcut' associations from the cluster association map. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
float | m_maxConstituentHitWidth |
The maximum hit width of a constituent hit of broken up hit, units cm. More... | |
float | m_hitWidthScalingFactor |
The scaling factor of the hit widths. More... | |
float | m_fittingWeight |
The maximum hit weight considered in the least squared fit. More... | |
float | m_minClusterWeight |
The threshold hit weight of the original, unscaled cluster to be considered in the merging process. More... | |
float | m_maxXMergeDistance |
The maximum x distance between merging points of associated clusters, units cm. More... | |
float | m_maxZMergeDistance |
The maximum z distance between merging points of associated clusters, units cm. More... | |
float | m_minMergeCosOpeningAngle |
The minimum cosine opening angle of the directions of associated clusters. More... | |
float | m_minDirectionDeviationCosAngle |
The minimum cosine opening angle of the direction of and associated cluster before and after merge. More... | |
float | m_minClusterSparseness |
The threshold sparseness of a cluster to be considered in the merging process. More... | |
LArHitWidthHelper::ClusterToParametersMap | m_clusterToParametersMap |
The map [cluster -> cluster parameters]. 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 () |
HitWidthClusterMergingAlgorithm class.
Definition at line 23 of file HitWidthClusterMergingAlgorithm.h.
lar_content::HitWidthClusterMergingAlgorithm::HitWidthClusterMergingAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Determine whether two clusters are associated.
currentClusterParameters | parameters defining the current cluster |
testClusterParameters | parameters defining the test cluster |
Definition at line 129 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Determine the position of the constituent hit that lies closest to a specified position.
position | the point to which the consituent hits will be compared |
constituentHitVector | the input vector of constituent hits |
closestPoint | the position of the closest constituent hit |
Definition at line 206 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Determine the cluster direction at a reference point by performing a weighted least squared fit to the input consitutent hit positions The fit is performed in a rotated cartesian coordinate system defined by a fitting axis determined by eigen The function is composed of two main loops that calculate the:
constituentHitVector | the input vector of constituent hits |
direction | the fitted cluster direction |
fitReferencePoint | the hits closest to this point are included in the fit |
fittingWeight | the weight that is considered in the fit |
Definition at line 225 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Obtain a vector of the minimum number of hits closest to a reference point that exceed a given weight.
constituentHitVector | the input vector of constituent hits |
fitReferencePoint | the reference point |
fittingWeight | the specified cumulative hit weight |
constituentHitSubsetVector | the subset of constituent hits |
Definition at line 307 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Obtain the axes of the fitting frame.
constituentHitSubsetVector | the input vector of constituent hits |
axisDirection | the fitting 'x-axis' |
orthoDirection | the fitting 'z-axis' |
Definition at line 330 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Translate from (x, y, z) coordinates to (rL, rT) coordinates.
axisDirection | the fitting 'x-axis' |
constituentHitPosition | the (x, y, z) position of a constituent hit |
rL | the fitting 'x' coordinate |
rT | the fitting 'z' coordinate |
Definition at line 356 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Translate a gradient in the fitting coordinate frame to a direction vector in the detector frame.
axisDirection | the fitting 'x-axis' |
gradient | the gradient dT/dL |
globalDirection | the direction vector in the detector frame |
Definition at line 369 of file HitWidthClusterMergingAlgorithm.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 36 of file HitWidthClusterMergingAlgorithm.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 102 of file HitWidthClusterMergingAlgorithm.cc.
|
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 71 of file HitWidthClusterMergingAlgorithm.cc.
|
privatevirtual |
Reimplemented from lar_content::ClusterAssociationAlgorithm.
Definition at line 445 of file HitWidthClusterMergingAlgorithm.cc.
|
private |
Remove 'shortcut' associations from the cluster association map.
clusterVector | the vector of clusters considered in the merging process |
clusterAssociationMap | the mapping of clusters to forward/backward associations |
Definition at line 384 of file HitWidthClusterMergingAlgorithm.cc.
|
mutableprivate |
The map [cluster -> cluster parameters].
Definition at line 142 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The maximum hit weight considered in the least squared fit.
Definition at line 133 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The scaling factor of the hit widths.
Definition at line 132 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The maximum hit width of a constituent hit of broken up hit, units cm.
Definition at line 131 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The maximum x distance between merging points of associated clusters, units cm.
Definition at line 135 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The maximum z distance between merging points of associated clusters, units cm.
Definition at line 136 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The threshold sparseness of a cluster to be considered in the merging process.
Definition at line 139 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The threshold hit weight of the original, unscaled cluster to be considered in the merging process.
Definition at line 134 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The minimum cosine opening angle of the direction of and associated cluster before and after merge.
Definition at line 138 of file HitWidthClusterMergingAlgorithm.h.
|
private |
The minimum cosine opening angle of the directions of associated clusters.
Definition at line 137 of file HitWidthClusterMergingAlgorithm.h.