Skip to content

Commit

Permalink
fix a newly intorduced bug in clustermerger
Browse files Browse the repository at this point in the history
  • Loading branch information
Alice committed Mar 22, 2017
1 parent 371eba1 commit 0ef7fab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/example_pdebug_python_comparer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions papas/reconstruction/src/MergedClusterBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 0ef7fab

Please sign in to comment.