31 if (std::equal(mergeStatsListBefore.cbegin(), mergeStatsListBefore.cend(), mergeStatsListAfter.cbegin(), mergeStatsListAfter.cend(),
PfoMergeStatsComp))
34 mergeStatsListBefore = std::move(mergeStatsListAfter);
37 return STATUS_CODE_SUCCESS;
48 const PfoList *pPfoList(
nullptr);
58 for (
auto const &
cluster : clusterList)
59 pfoHits.push_back(
cluster->GetNCaloHits());
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;
81 return STATUS_CODE_SUCCESS;
Header file for the pfo helper class.
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
static pandora::StatusCode RunDaughterAlgorithm(const pandora::Algorithm &algorithm, const std::string &daughterAlgorithmName)
Run an algorithm registered with pandora, from within a parent algorithm.
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
static void GetTwoDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 2D clusters from an input pfo.
unsigned int m_maxIterations
Maximum number of iterations.
PfoMergeStatsList GetPfoMergeStats() const
Get the PfoMergeStats for all of the particles in the event from m_pfoListNames.
pandora::StatusCode Run()
Run the algorithm.
pandora::StringVector m_mopUpAlgorithms
Ordered list of mop up algorithms to run.
std::vector< unsigned int > ClusterNumHitsList
pandora::StringVector m_pfoListNames
The list of pfo list names.
static bool PfoMergeStatsComp(const PfoMergeStats &lhs, const PfoMergeStats &rhs)
Equality comparator for two PfoMergeStats.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
std::vector< PfoMergeStats > PfoMergeStatsList
ParticleFlowObject class.
static StatusCode ReadVectorOfValues(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
Read a vector of values from a (space separated) list in an xml element.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
static StatusCode ProcessAlgorithmList(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, StringVector &algorithmNames)
Process a list of daughter algorithms in an xml file.
MANAGED_CONTAINER< const Cluster * > ClusterList
std::map< std::string, float > PropertiesMap
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList
PfoMergeStats class: Object to compare PFO before/after merging algs have run to see if anything chan...