The source project of this merge request has been removed.
Fix LHEFilter to allow reading more than one LHE file
@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:
- 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 inprocess_event
to break down, as it indicates the end of the event record too early (i.e. returnsFalse
when it should returnTrue
). We have fixed that by only returningFalse
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. - 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