Identify candidate particles.
46 ClusterSet usedClusters;
48 overlapTensor.GetSortedKeyClusters(sortedKeyClusters);
50 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
52 if (!pKeyCluster->IsAvailable())
56 overlapTensor.GetConnectedElements(pKeyCluster,
true, connectedElements);
59 this->
GetClusters(connectedElements, usedClusters, clusterVectorU, clusterVectorV, clusterVectorW);
61 if (clusterVectorU.empty() || clusterVectorV.empty() || clusterVectorW.empty())
64 usedClusters.insert(clusterVectorU.begin(), clusterVectorU.end());
65 usedClusters.insert(clusterVectorV.begin(), clusterVectorV.end());
66 usedClusters.insert(clusterVectorW.begin(), clusterVectorW.end());
71 const Cluster *
const pClusterU = clusterVectorU.front();
72 const Cluster *
const pClusterV = clusterVectorV.front();
73 const Cluster *
const pClusterW = clusterVectorW.front();
75 ProtoParticle protoParticle;
76 protoParticle.m_clusterList.push_back(pClusterU);
77 protoParticle.m_clusterList.push_back(pClusterV);
78 protoParticle.m_clusterList.push_back(pClusterW);
79 protoParticleVector.push_back(protoParticle);
81 this->
FillMergeMap(pClusterU, clusterVectorU, clusterMergeMap);
82 this->
FillMergeMap(pClusterV, clusterVectorV, clusterMergeMap);
83 this->
FillMergeMap(pClusterW, clusterVectorW, clusterMergeMap);
void FillMergeMap(const pandora::Cluster *const pCluster, const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const
Fill map of clusters to be merged.
std::vector< Element > ElementList
void GetClusters(const TensorType::ElementList &connectedElements, const pandora::ClusterSet &usedClusters, pandora::ClusterVector &clusterVectorU, pandora::ClusterVector &clusterVectorV, pandora::ClusterVector &clusterVectorW) const
Separate connected clusters into cluster lists by view.
bool IsConnected(const pandora::ClusterVector &clusterVector) const
Check whether all clusters in a list are spatially connected.
std::vector< art::Ptr< recob::Cluster > > ClusterVector