RecursivePfoMopUpAlgorithm class.
More...
#include <RecursivePfoMopUpAlgorithm.h>
lar_content::RecursivePfoMopUpAlgorithm::RecursivePfoMopUpAlgorithm |
( |
| ) |
|
|
inline |
Get the PfoMergeStats for all of the particles in the event from m_pfoListNames.
- Returns
- List of PfoMergeStats for each Pfo
Definition at line 42 of file RecursivePfoMopUpAlgorithm.cc.
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;
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;
pandora::StringVector m_pfoListNames
The list of pfo list names.
static void GetTwoDClusterList(const pandora::ParticleFlowObject *const pPfo, pandora::ClusterList &clusterList)
Get the list of 2D clusters from an input pfo.
std::vector< PfoMergeStats > PfoMergeStatsList
std::vector< unsigned int > ClusterNumHitsList
Equality comparator for two PfoMergeStats.
- Parameters
-
- Returns
- boolean if the lhs and rhs are the same
Definition at line 92 of file RecursivePfoMopUpAlgorithm.h.
95 return ((lhs.m_numClusterHits == rhs.m_numClusterHits) && (
std::abs(lhs.m_trackScore - rhs.m_trackScore) < std::numeric_limits<float>::epsilon()));
StatusCode lar_content::RecursivePfoMopUpAlgorithm::ReadSettings |
( |
const pandora::TiXmlHandle |
xmlHandle | ) |
|
|
private |
Definition at line 73 of file RecursivePfoMopUpAlgorithm.cc.
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;
pandora::StringVector m_pfoListNames
The list of pfo list names.
unsigned int m_maxIterations
Maximum number of iterations.
pandora::StringVector m_mopUpAlgorithms
Ordered list of mop up algorithms to run.
StatusCode lar_content::RecursivePfoMopUpAlgorithm::Run |
( |
| ) |
|
|
private |
Definition at line 20 of file RecursivePfoMopUpAlgorithm.cc.
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;
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.
static bool PfoMergeStatsComp(const PfoMergeStats &lhs, const PfoMergeStats &rhs)
Equality comparator for two PfoMergeStats.
std::vector< PfoMergeStats > PfoMergeStatsList
bool equal(double a, double b)
Comparison tolerance, in centimeters.
pandora::StringVector m_mopUpAlgorithms
Ordered list of mop up algorithms to run.
unsigned int lar_content::RecursivePfoMopUpAlgorithm::m_maxIterations |
|
private |
pandora::StringVector lar_content::RecursivePfoMopUpAlgorithm::m_mopUpAlgorithms |
|
private |
pandora::StringVector lar_content::RecursivePfoMopUpAlgorithm::m_pfoListNames |
|
private |
The documentation for this class was generated from the following files: