9 #include "Pandora/AlgorithmHeaders.h" 20 SimpleClusterMergingAlgorithm::SimpleClusterMergingAlgorithm() : m_minCaloHitsPerCluster(5), m_maxClusterSeparation(2.5
f)
30 const Cluster *
const pCluster = *iter;
32 if (!pCluster->IsAvailable())
38 clusterVector.push_back(pCluster);
50 const Cluster *
const pClusterI = *iterI;
54 const Cluster *
const pClusterJ = *iterJ;
56 if (pClusterI == pClusterJ)
61 clusterMergeMap[pClusterI].push_back(pClusterJ);
62 clusterMergeMap[pClusterJ].push_back(pClusterI);
82 PANDORA_RETURN_RESULT_IF_AND_IF(
83 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MinCaloHitsPerCluster",
m_minCaloHitsPerCluster));
85 PANDORA_RETURN_RESULT_IF_AND_IF(
86 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle,
"MaxClusterSeparation",
m_maxClusterSeparation));
static bool SortByNHits(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
Sort clusters by number of hits, then layer span, then inner layer, then position, then pulse-height.
unsigned int m_minCaloHitsPerCluster
The min number of calo hits per candidate cluster.
float m_maxClusterSeparation
Maximum distance at which clusters can be joined.
Header file for the simple cluster merging algorithm class.
Header file for the cluster helper class.
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...
bool IsAssociated(const pandora::Cluster *const pClusterI, const pandora::Cluster *const pClusterJ) const
Decide whether two clusters are associated.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterMergeMap
std::vector< art::Ptr< recob::Cluster > > ClusterVector
void PopulateClusterMergeMap(const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const
Form associations between pointing clusters.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
static float GetClosestDistance(const pandora::ClusterList &clusterList1, const pandora::ClusterList &clusterList2)
Get closest distance between clusters in a pair of cluster lists.