Skip to content

Fix LHEFilter to allow reading more than one LHE file

Volker Andreas Austrup requested to merge (removed):fix_LHEFilter into master

@jroggel and I tried out the LHEFilter in the context of mll-sliced dileptonic ttbar samples and observed two problems when trying to use more than one LHE file as input. These are fixed with this MR.

In particular, the issues are the following:

  1. Gen_tf stopped with the error message "Failure to find footer" when using two LHE files as input. This was caused by the comment line "#Random number generator exit values: ..." (might be a Powheg-specific thing?), which in individual LHE files follows the </LesHouchesEvents> tag, but in merged LHE files appears before the tag. This causes the logic in process_event to break down, as it indicates the end of the event record too early (i.e. returns False when it should return True). We have fixed that by only returning False when the current line actually matches </LesHouchesEvents>. Other lines not contained within an event block are assumed to be comments and are copied as-is.
  2. When running with three or more input LHE files, only the last two were actually used. This was due to an incorrect indentation in the loop over the LHE files in initialise, which resulted in merged events being overwritten as the merged file was repeatedly renamed.

Tagging @tpelzer as the original author of the code.

Edited by Volker Andreas Austrup

Merge request reports

Loading