From b7831309dbfa0aad60801d618f43f5b934cd707f Mon Sep 17 00:00:00 2001 From: Marshall Scott <mbscott@anl.gov> Date: Fri, 7 May 2021 16:04:57 -0400 Subject: [PATCH] Added count function 2 --- .../scripts/emcal_barrel_pions_electrons_analysis.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_electrons_analysis.cxx b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_electrons_analysis.cxx index 7bd5275e..996f1309 100644 --- a/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_electrons_analysis.cxx +++ b/benchmarks/barrel_ecal/scripts/emcal_barrel_pions_electrons_analysis.cxx @@ -64,7 +64,8 @@ void emcal_barrel_pions_electrons_analysis(const char* input_fname = "sim_output int count = 0; if (input[2].pdgID == 11)// Electron { - for (const auto& i: evt && count > 1) + for (const auto& i: evt) + if (count > 0) continue; total_edep += i.energyDeposit; count++; } @@ -79,7 +80,8 @@ void emcal_barrel_pions_electrons_analysis(const char* input_fname = "sim_output int count = 0; if (input[2].pdgID == -211)// Negative pion { - for (const auto& i: evt && count < 1) + for (const auto& i: evt) + if (count > 0) continue; total_edep += i.energyDeposit; count++; } -- GitLab