From 0ef7fab3f482a40577bd04c05a29cac00d63bdf7 Mon Sep 17 00:00:00 2001 From: Alice Date: Wed, 22 Mar 2017 10:06:11 +0100 Subject: [PATCH] fix a newly intorduced bug in clustermerger --- examples/example_pdebug_python_comparer.cpp | 2 +- papas/reconstruction/src/MergedClusterBuilder.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/example_pdebug_python_comparer.cpp b/examples/example_pdebug_python_comparer.cpp index 3a19de1..ee75d0a 100644 --- a/examples/example_pdebug_python_comparer.cpp +++ b/examples/example_pdebug_python_comparer.cpp @@ -37,7 +37,7 @@ int main(int argc, char* argv[]) { CMS CMSDetector; papas::PapasManager papasManager{CMSDetector}; unsigned int eventNo = 0; - unsigned int nEvents = 200; + unsigned int nEvents = 5; auto start = std::chrono::steady_clock::now(); diff --git a/papas/reconstruction/src/MergedClusterBuilder.cpp b/papas/reconstruction/src/MergedClusterBuilder.cpp index 76e90dc..1c25627 100644 --- a/papas/reconstruction/src/MergedClusterBuilder.cpp +++ b/papas/reconstruction/src/MergedClusterBuilder.cpp @@ -50,7 +50,7 @@ MergedClusterBuilder::MergedClusterBuilder(const Event& event, #endif auto id = *subgraph.begin(); double totalenergy = 0.; - for (const auto& c : ids) { + for (const auto& c : subgraph) { totalenergy += clusters.at(c).energy(); } // create the merged Cluster @@ -63,7 +63,7 @@ MergedClusterBuilder::MergedClusterBuilder(const Event& event, } // merge the original clusters into the new merged cluster // also add in the links between the block elements and the block into the history_nodes - if (ids.size() > 1) { + if (subgraph.size() > 1) { for (auto elemid : subgraph) { if (elemid != id) { // we have already handled the first element mergedCluster += clusters.at(elemid);