NLO Pythia8 shower module drops the last event

Bug #1706507 reported by Sung Hak Lim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Paolo Torrielli

Bug Description

Dear MG5 team,

I found that Pythia8 generated HepMC file always miss the last event in the LHE input.

I also compared momentum of parton information in LHE and HepMC, and missing event is the last one.

MG5 version: 2.5.4
Pythia version: 8.226

I think this is a bug due to following code:

[MG5]/template/NLO/MCatNLO/srcPythia8/Pythia82_hep.cc

around line 72

    if (nSelected >= iEventshower) break;

This breaks event saving loop when nSelected = iEventshower. However, nSelected starting from 1 so this will break loop at the last event without saving it.

If I modify it into

    if (nSelected > iEventshower) break;

Then I got following additional Pythia abort message in mcatnlo_run.log file.

 Pythia::next(): 10000 events have been generated
 PYTHIA Abort from Pythia::next: reached end of Les Houches Events File

Therefore, LHE events are fully parsed now.

If we grep "E " for both HepMC output, I got 9999 for current published code and 10000 for my new code.

Could you confirm this?

Best wishes,
Sung Hak Lim

Changed in mg5amcnlo:
assignee: nobody → Paolo Torrielli (paolotorriell)
Revision history for this message
Paolo Torrielli (paolo-torrielli) wrote : Re: [Bug 1706507] NLO Pythia8 shower module drops the last event

Dear Sung,
thanks very much for your feedback.
I conform this behaviour and the solution you propose.
I’ll include this in the next 2.5.6 release.
Thanks again.
Cheers.
Paolo

> On 26 Jul 2017, at 08:24, Olivier Mattelaer <email address hidden> wrote:
>
> ** Changed in: mg5amcnlo
> Assignee: (unassigned) => Paolo Torrielli (paolotorriell)
>
> --
> You received this bug notification because you are a member of aMC@NLO,
> which is subscribed to MadGraph5_aMC@NLO.
> Matching subscriptions: aMCatNLO_bug_reports
> https://bugs.launchpad.net/bugs/1706507
>
> Title:
> NLO Pythia8 shower module drops the last event
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Dear MG5 team,
>
> I found that Pythia8 generated HepMC file always miss the last event
> in the LHE input.
>
> I also compared momentum of parton information in LHE and HepMC, and
> missing event is the last one.
>
> MG5 version: 2.5.4
> Pythia version: 8.226
>
> I think this is a bug due to following code:
>
> [MG5]/template/NLO/MCatNLO/srcPythia8/Pythia82_hep.cc
>
> around line 72
>
> if (nSelected >= iEventshower) break;
>
> This breaks event saving loop when nSelected = iEventshower. However,
> nSelected starting from 1 so this will break loop at the last event
> without saving it.
>
> If I modify it into
>
> if (nSelected > iEventshower) break;
>
> Then I got following additional Pythia abort message in
> mcatnlo_run.log file.
>
> Pythia::next(): 10000 events have been generated
> PYTHIA Abort from Pythia::next: reached end of Les Houches Events File
>
> Therefore, LHE events are fully parsed now.
>
> If we grep "E " for both HepMC output, I got 9999 for current
> published code and 10000 for my new code.
>
> Could you confirm this?
>
> Best wishes,
> Sung Hak Lim
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1706507/+subscriptions

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.