From 660a4a77e261ad7b3a83148396f01370c58c201b Mon Sep 17 00:00:00 2001 From: Perez Date: Fri, 6 Oct 2023 14:33:30 +0200 Subject: [PATCH] Bugfix in MCParticle::get_indices_MotherByIndex. In some cases with identical particles in the decay chain requested, decays could be selected that did not correspond to the one requested. --- analyzers/dataframe/src/MCParticle.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/analyzers/dataframe/src/MCParticle.cc b/analyzers/dataframe/src/MCParticle.cc index a63b37480c..009d0d4c25 100644 --- a/analyzers/dataframe/src/MCParticle.cc +++ b/analyzers/dataframe/src/MCParticle.cc @@ -594,6 +594,7 @@ ROOT::VecOps::RVec get_indices_MotherByIndex ( int imother, // careful, there can be several particles with the same PDG ! if (std::find(found.begin(), found.end(), idx_d) == found.end()) { // idx_d has NOT already been "used" found.push_back( idx_d ); + break; } } }