From 12df959320262bb0fb00ed115b323d2134cf424e Mon Sep 17 00:00:00 2001 From: James William Monk <james.william.monk@cern.ch> Date: Wed, 28 Oct 2015 16:04:47 +0100 Subject: [PATCH] tagging MG weights fix (Pythia8_i-00-12-03) * Tag Pythia8_i-00-12-03 2015-10-23 James Monk <jmonk@cern.ch> * Make sure m_internal_event_number is updated only if the event passes the CKKWL acceptance cuts. Event number == 1 is used to initialise the weight names, so prior to this fix a crash was possible if the very first event failed the acceptance cuts. --- Generators/Pythia8_i/src/Pythia8_i.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Generators/Pythia8_i/src/Pythia8_i.cxx b/Generators/Pythia8_i/src/Pythia8_i.cxx index bee5ba18ef3..0607703006d 100644 --- a/Generators/Pythia8_i/src/Pythia8_i.cxx +++ b/Generators/Pythia8_i/src/Pythia8_i.cxx @@ -375,10 +375,9 @@ StatusCode Pythia8_i::callGenerator(){ returnCode = this->callGenerator(); }else{ m_nMerged += eventWeight; + ++m_internal_event_number; } - ++m_internal_event_number; - return returnCode; } -- GitLab