Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ClusterGrowingAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_CLUSTER_GROWING_ALGORITHM_H
9#define LAR_CLUSTER_GROWING_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
13#include <unordered_map>
14
15namespace lar_content
16{
17
22{
23public:
28
29protected:
30 virtual pandora::StatusCode Run();
32
33 typedef std::unordered_map<const pandora::Cluster *, pandora::ClusterList> ClusterMergeMap;
34
41 virtual void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &cleanClusters) const = 0;
42
49 virtual void GetListOfSeedClusters(const pandora::ClusterVector &cleanClusters, pandora::ClusterVector &seedClusters) const = 0;
50
51private:
59 void GetListOfNonSeedClusters(const pandora::ClusterVector &inputClusters, const pandora::ClusterVector &seedClusters,
60 pandora::ClusterVector &nonSeedClusters) const;
61
70 const pandora::ClusterVector &seedClusters, const pandora::ClusterVector &nonSeedClusters, ClusterMergeMap &clusterMergeMap) const;
71
77 void MergeClusters(const ClusterMergeMap &clusterMergeMap) const;
78
80
82};
83
84} // namespace lar_content
85
86#endif // #ifndef LAR_CLUSTER_GROWING_ALGORITHM_H
Header file for the algorithm class.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
std::string m_inputClusterListName
The name of the input cluster list. If not specified, will access current list.
virtual void GetListOfSeedClusters(const pandora::ClusterVector &cleanClusters, pandora::ClusterVector &seedClusters) const =0
Select seed clusters for growing.
void PopulateClusterMergeMap(const pandora::ClusterVector &seedClusters, const pandora::ClusterVector &nonSeedClusters, ClusterMergeMap &clusterMergeMap) const
Identify a set of cluster merges.
void MergeClusters(const ClusterMergeMap &clusterMergeMap) const
Merge clusters.
virtual void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &cleanClusters) const =0
Populate cluster vector with the subset of clusters judged to be clean.
virtual pandora::StatusCode Run()
Run the algorithm.
void GetListOfNonSeedClusters(const pandora::ClusterVector &inputClusters, const pandora::ClusterVector &seedClusters, pandora::ClusterVector &nonSeedClusters) const
Get List of non-seed clusters.
float m_maxClusterSeparation
Maximum distance at which clusters can be joined.
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterMergeMap
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
std::vector< const Cluster * > ClusterVector
MANAGED_CONTAINER< const Cluster * > ClusterList
StatusCode
The StatusCode enum.