9 #include "Pandora/AlgorithmHeaders.h" 20 StatusCode RecursivePfoMopUpAlgorithm::Run()
24 for (
unsigned int iter = 0; iter < m_maxIterations; ++iter)
26 for (
auto const &mopUpAlg : m_mopUpAlgorithms)
27 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::RunDaughterAlgorithm(*
this, mopUpAlg));
31 if (std::equal(mergeStatsListBefore.cbegin(), mergeStatsListBefore.cend(), mergeStatsListAfter.cbegin(), mergeStatsListAfter.cend(), PfoMergeStatsComp))
34 mergeStatsListBefore =
std::move(mergeStatsListAfter);
37 return STATUS_CODE_SUCCESS;
46 for (
auto const &pfoListName : m_pfoListNames)
48 const PfoList *pPfoList(
nullptr);
49 if (STATUS_CODE_SUCCESS != PandoraContentApi::GetList(*
this, pfoListName, pPfoList))
52 for (
const ParticleFlowObject *
const pPfo : *pPfoList)
55 ClusterList clusterList;
56 LArPfoHelper::GetTwoDClusterList(pPfo, clusterList);
58 for (
auto const &
cluster : clusterList)
59 pfoHits.push_back(
cluster->GetNCaloHits());
61 const PropertiesMap &pfoMeta(pPfo->GetPropertiesMap());
62 const auto &trackScoreIter(pfoMeta.find(
"TrackScore"));
63 const float trackScore(trackScoreIter != pfoMeta.end() ? trackScoreIter->second : -1.f);
65 pfoMergeStatsList.emplace_back(
PfoMergeStats{pfoHits, trackScore});
68 return pfoMergeStatsList;
73 StatusCode RecursivePfoMopUpAlgorithm::ReadSettings(
const pandora::TiXmlHandle xmlHandle)
75 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmList(*
this, xmlHandle,
"MopUpAlgorithms", m_mopUpAlgorithms));
77 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadVectorOfValues(xmlHandle,
"PfoListNames", m_pfoListNames));
79 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle,
"MaxIterations", m_maxIterations));
81 return STATUS_CODE_SUCCESS;
Header file for the pfo helper class.
PfoMergeStats class: Object to compare PFO before/after merging algs have run to see if anything chan...
Cluster finding and building.
std::vector< PfoMergeStats > PfoMergeStatsList
std::vector< unsigned int > ClusterNumHitsList