From 815e2ff8c6f10850172e73260a10a3d5396f0c43 Mon Sep 17 00:00:00 2001 From: Andrei Gaponenko Date: Thu, 26 Sep 2019 11:58:13 -0500 Subject: [PATCH] GenerateProtonTimes bug fix: applyToGenIds configuration piece should be used conditionally per its declaration. --- CommonMC/src/GenerateProtonTimes_module.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CommonMC/src/GenerateProtonTimes_module.cc b/CommonMC/src/GenerateProtonTimes_module.cc index 23dfcc44e3..4856e800a9 100644 --- a/CommonMC/src/GenerateProtonTimes_module.cc +++ b/CommonMC/src/GenerateProtonTimes_module.cc @@ -111,14 +111,14 @@ namespace mu2e { typedef std::vector VS; - const auto ig(conf().ignoredGenIds()); - for(const auto i: ig) { + for(const auto i: conf().ignoredGenIds()) { ignoredGenIds_.insert(GenId::findByName(i).id()); } - const auto ia(conf().applyToGenIds()); - for(const auto i: ia) { - applyToGenIds_.insert(GenId::findByName(i).id()); + if(ignoredGenIds_.empty()) { + for(const auto i: conf().applyToGenIds()) { + applyToGenIds_.insert(GenId::findByName(i).id()); + } } conf().randPDFparameters(protonPulseConf_);