9 #include "Pandora/AlgorithmHeaders.h" 18 MopUpRemnantsTool::MopUpRemnantsTool()
26 if (PandoraContentApi::GetSettings(*pAlgorithm)->ShouldDisplayAlgorithmInfo())
27 std::cout <<
"----> Running Algorithm Tool: " << this->GetInstanceName() <<
", " << this->GetType() << std::endl;
30 this->FindBestShowers(overlapTensor, protoParticleVector);
40 ClusterSet usedClusters;
44 for (
const Cluster *
const pKeyCluster : sortedKeyClusters)
46 if (!pKeyCluster->IsAvailable())
53 this->SelectBestElement(connectedElements, usedClusters, eIter);
54 this->GetUsedClusters(connectedElements, usedClusters);
56 if (connectedElements.end() == eIter)
63 protoParticleVector.push_back(protoParticle);
73 usedClusters.insert(eIter->GetClusterU());
74 usedClusters.insert(eIter->GetClusterV());
75 usedClusters.insert(eIter->GetClusterW());
84 float bestFigureOfMerit(0.
f);
88 const Cluster *
const pClusterU = eIter->GetClusterU();
89 const Cluster *
const pClusterV = eIter->GetClusterV();
90 const Cluster *
const pClusterW = eIter->GetClusterW();
92 if (usedClusters.count(pClusterU) || usedClusters.count(pClusterV) || usedClusters.count(pClusterW))
95 const float figureOfMerit(pClusterU->GetHadronicEnergy() + pClusterV->GetHadronicEnergy() + pClusterW->GetHadronicEnergy());
97 if (figureOfMerit > bestFigureOfMerit)
99 bestFigureOfMerit = figureOfMerit;
107 StatusCode MopUpRemnantsTool::ReadSettings(
const TiXmlHandle )
109 return STATUS_CODE_SUCCESS;
std::vector< ProtoParticle > ProtoParticleVector
virtual bool CreateThreeDParticles(const ProtoParticleVector &protoParticleVector)
Create particles using findings from recent algorithm processing.
void GetConnectedElements(const pandora::Cluster *const pCluster, const bool ignoreUnavailable, ElementList &elementList) const
Get a list of elements connected to a specified cluster.
pandora::ClusterList m_clusterListW
List of 2D W clusters in a 3D proto particle.
std::vector< Element > ElementList
pandora::ClusterList m_clusterListV
List of 2D V clusters in a 3D proto particle.
pandora::ClusterList m_clusterListU
List of 2D U clusters in a 3D proto particle.
void GetSortedKeyClusters(pandora::ClusterVector &sortedKeyClusters) const
Get a sorted vector of key clusters (U clusters with current implementation)
std::vector< art::Ptr< recob::Cluster > > ClusterVector
ThreeDRemnantsAlgorithm class.
TheTensor::const_iterator const_iterator