29 #ifndef CHARGEDFRAGMENTSMERGINGALGORITHM2_H
30 #define CHARGEDFRAGMENTSMERGINGALGORITHM2_H
32 #include "Pandora/Algorithm.h"
33 #include "Pandora/PandoraInputTypes.h"
39 namespace pandora {
class ClusterFitResult; }
41 namespace april_content
53 class Factory :
public pandora::AlgorithmFactory
56 pandora::Algorithm *CreateAlgorithm()
const;
60 pandora::StatusCode Run();
61 pandora::StatusCode ReadSettings(
const pandora::TiXmlHandle xmlHandle);
65 void GetNearbyClusters(pandora::Cluster* cluster,
const std::vector<april_content::APRILCluster*>& clusterVector,
66 std::vector<april_content::APRILCluster*>& clustersInRange);
68 bool CheckNearbyClusterWithCharge(
const april_content::APRILCluster* pCluster, std::vector<april_content::APRILCluster*>& nearbyClusters,
int charge);
71 std::vector<april_content::APRILCluster*>& allClusters,
72 std::vector<april_content::APRILCluster*>& properClusters);
74 pandora::StatusCode CleanClusterForMerging(std::vector<APRILCluster*>& clusterVector);
89 pandora::StatusCode
FindClustersToMerge(
const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap)
const;
107 pandora::StatusCode
FindBestParentCluster(
const pandora::Cluster *
const pDaughterCluster,
const pandora::ClusterVector &clusterVector,
108 const pandora::Cluster *&pBestParentCluster)
const;
111 float m_maxStartingClusterDistance;
112 float m_maxClosestClusterDistance;
116 bool m_onlyUseConnectedHits;
120 arma::mat m_clusterCentroidsMatrix;
121 std::vector<APRILCluster*> m_clustersToMerge;
126 inline pandora::Algorithm *ChargedFragmentsMergingAlgorithm2::Factory::CreateAlgorithm()
const
pandora::StatusCode FindClustersToMerge(const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap) const
Algorithm workhorse, find associations between daughter and parent cluster.
pandora::StatusCode FindBestParentCluster(const pandora::Cluster *const pDaughterCluster, const pandora::ClusterVector &clusterVector, const pandora::Cluster *&pBestParentCluster) const
Find the best parent cluster to merge a daughter one.
bool CanMergeCluster(const pandora::Cluster *const pCluster) const
Whether the cluster is eligible for association.
Factory class for instantiating algorithm.
Definition: ChargedFragmentsMergingAlgorithm2.h:53
Cluster class.
Definition: Cluster.h:89
ChargedFragmentsMergingAlgorithm2 class.
Definition: ChargedFragmentsMergingAlgorithm2.h:47
pandora::StatusCode GetEligibleClusters(std::vector< APRILCluster * > &clusterVector) const
Get the eligible clusters for parent-daughter association.
Definition: ChargedFragmentsMergingAlgorithm2.cc:653