8 #ifndef LAR_HIT_WIDTH_CLUSTER_MERGING_ALGORITHM_H
9 #define LAR_HIT_WIDTH_CLUSTER_MERGING_ALGORITHM_H 1
11 #include "Pandora/Algorithm.h"
34 bool IsExtremalCluster(
const bool isForward,
const pandora::Cluster *
const pCurrentCluster,
const pandora::Cluster *
const pTestCluster)
const;
73 const pandora::CartesianVector &fitReferencePoint,
const float fittingWeight)
const;
96 pandora::CartesianVector &orthoDirection)
const;
108 const pandora::CartesianVector &axisDirection,
const pandora::CartesianVector &constituentHitPosition,
float &rL,
float &rT)
const;
118 void GetGlobalDirection(
const pandora::CartesianVector &axisDirection,
const float gradient, pandora::CartesianVector &globalDirection)
const;
129 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
147 #endif //LAR_HIT_WIDTH_CLUSTER_MERGING_ALGORITHM_H
float m_minClusterWeight
The threshold hit weight of the original, unscaled cluster to be considered in the merging process...
Header file for the lar hit width helper class.
bool IsExtremalCluster(const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const
Determine which of two clusters is extremal.
float m_maxXMergeDistance
The maximum x distance between merging points of associated clusters, units cm.
void GetFittingAxes(const LArHitWidthHelper::ConstituentHitVector &constituentHitSubsetVector, pandora::CartesianVector &axisDirection, pandora::CartesianVector &orthoDirection) const
Obtain the axes of the fitting frame.
std::unordered_map< const pandora::Cluster *, ClusterAssociation > ClusterAssociationMap
HitWidthClusterMergingAlgorithm()
Default constructor.
void PopulateClusterAssociationMap(const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const
Populate the cluster association map.
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...
float m_minDirectionDeviationCosAngle
The minimum cosine opening angle of the direction of and associated cluster before and after merge...
float m_minClusterSparseness
The threshold sparseness of a cluster to be considered in the merging process.
HitWidthClusterMergingAlgorithm class.
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.
float m_minMergeCosOpeningAngle
The minimum cosine opening angle of the directions of associated clusters.
std::vector< ConstituentHit > ConstituentHitVector
bool AreClustersAssociated(const LArHitWidthHelper::ClusterParameters ¤tClusterParameters, const LArHitWidthHelper::ClusterParameters &testClusterParameters) const
Determine whether two clusters are associated.
Header file for the cluster association algorithm class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void RemoveShortcutAssociations(const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const
Remove 'shortcut' associations from the cluster association map.
float m_maxConstituentHitWidth
The maximum hit width of a constituent hit of broken up hit, units cm.
float m_hitWidthScalingFactor
The scaling factor of the hit widths.
std::unordered_map< const pandora::Cluster *, const ClusterParameters > ClusterToParametersMap
ClusterAssociationAlgorithm class.
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.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
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 th...
float m_fittingWeight
The maximum hit weight considered in the least squared fit.
LArHitWidthHelper::ClusterToParametersMap m_clusterToParametersMap
The map [cluster -> cluster parameters].
float m_maxZMergeDistance
The maximum z distance between merging points of associated clusters, units cm.
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...
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...