![]() |
ATLAS Offline Software
|
Utility functions for manipulating LHE files. More...
Functions | |
| _open_file (filename) | |
| merge (input_file_pattern, output_file) | |
| Merge many input LHE files into a single output file. | |
| event_iterator (input_files, verbose=True) | |
| Python generator to iterate through events from input LHE files. | |
| event_weight_iterator (input_files) | |
| Python generator to iterate through event weights from input LHE files. | |
| event_counter (input_file_pattern) | |
| Count total number of events in input files. | |
| add_weight_to_header (header, weightgroup_name, weight_name, weight_id) | |
| Add a weight to a header passed as input (can be a string or an ElementTree). | |
| preamble (input_LHE_file) | |
| Get opening lines from file as a string. | |
| postamble (input_LHE_file) | |
| Get closing lines from file as a string. | |
| opening_tag (input_LHE_file) | |
| Get <LesHouchesEvents> opening tag from file as a string. | |
| comment_block (input_LHE_file) | |
| Get comment block from file as a string. | |
| header_block (input_LHE_file) | |
| Get <header> block from file as a string. | |
| init_block (input_LHE_file) | |
| Get <init> block from file as a string. | |
| get_first_event (input_LHE_file) | |
| Get first event from file as a string. | |
| string_to_weight (input_event) | |
| Get weight name/value pairs from an input string. | |
| ensure_coloured_quarks (input_event) | |
| Ensure that all final-state quarks in the event are coloured. | |
| mu2tau (input_event) | |
| Swap out muons for taus, and muon neutrinos for tau neutrinos. | |
| e2tau (input_event) | |
| Swap out electrons for taus, and electron neutrinos for tau neutrinos. | |
| mu2e (input_event) | |
| Swap out muons for electrons, and muon neutrinos for electron neutrinos. | |
| e2mu (input_event) | |
| Swap out electrons for muons, and electron neutrinos for muon neutrinos. | |
| gg4l_emu2all (input_event) | |
| Algorithm specific to gg4l Powheg process, to obtain an inclusive sample starting from the only supported decay mode for ZZ production, 2e2mu. | |
| update_XWGTUP_with_reweighted_nominal (input_event, wgtid_for_old_XWGTUP_value=None) | |
| Ensure that XWGTUP is equal to the reweighted nominal. | |
| Powheg2LHEv3 (input_event, name_to_ID) | |
| Get new-style event weights from an input event string. | |
| reindent_XML (elem) | |
| Re-indent XML so that elements are on their own line. | |
Variables | |
| logger = Logging.logging.getLogger("PowhegControl") | |
| Get handle to Athena logging. | |
|
protected |
| python.utility.LHE.add_weight_to_header | ( | header, | |
| weightgroup_name, | |||
| weight_name, | |||
| weight_id ) |
Add a weight to a header passed as input (can be a string or an ElementTree).
Definition at line 96 of file LHE.py.
| python.utility.LHE.comment_block | ( | input_LHE_file | ) |
| python.utility.LHE.e2mu | ( | input_event | ) |
Swap out electrons for muons, and electron neutrinos for muon neutrinos.
Note no momentum reshuffling is done.
Definition at line 287 of file LHE.py.
| python.utility.LHE.e2tau | ( | input_event | ) |
Swap out electrons for taus, and electron neutrinos for tau neutrinos.
Note no momentum reshuffling is done, but Pythia appears to restore the correct tau mass.
Definition at line 237 of file LHE.py.
| python.utility.LHE.ensure_coloured_quarks | ( | input_event | ) |
Ensure that all final-state quarks in the event are coloured.
Definition at line 188 of file LHE.py.
| python.utility.LHE.event_counter | ( | input_file_pattern | ) |
| python.utility.LHE.event_iterator | ( | input_files, | |
| verbose = True ) |
Python generator to iterate through events from input LHE files.
Definition at line 58 of file LHE.py.
| python.utility.LHE.event_weight_iterator | ( | input_files | ) |
Python generator to iterate through event weights from input LHE files.
Definition at line 83 of file LHE.py.
| python.utility.LHE.get_first_event | ( | input_LHE_file | ) |
Get first event from file as a string.
Definition at line 172 of file LHE.py.
| python.utility.LHE.gg4l_emu2all | ( | input_event | ) |
Algorithm specific to gg4l Powheg process, to obtain an inclusive sample starting from the only supported decay mode for ZZ production, 2e2mu.
Definition at line 313 of file LHE.py.
| python.utility.LHE.header_block | ( | input_LHE_file | ) |
| python.utility.LHE.init_block | ( | input_LHE_file | ) |
Get <init> block from file as a string.
Definition at line 161 of file LHE.py.
| python.utility.LHE.merge | ( | input_file_pattern, | |
| output_file ) |
Merge many input LHE files into a single output file.
Definition at line 29 of file LHE.py.
| python.utility.LHE.mu2e | ( | input_event | ) |
Swap out muons for electrons, and muon neutrinos for electron neutrinos.
Note no momentum reshuffling is done.
Definition at line 262 of file LHE.py.
| python.utility.LHE.mu2tau | ( | input_event | ) |
Swap out muons for taus, and muon neutrinos for tau neutrinos.
Note no momentum reshuffling is done, but Pythia appears to restore the correct tau mass.
Definition at line 211 of file LHE.py.
| python.utility.LHE.opening_tag | ( | input_LHE_file | ) |
Get <LesHouchesEvents> opening tag from file as a string.
Definition at line 137 of file LHE.py.
| python.utility.LHE.postamble | ( | input_LHE_file | ) |
Get closing lines from file as a string.
Definition at line 129 of file LHE.py.
| python.utility.LHE.Powheg2LHEv3 | ( | input_event, | |
| name_to_ID ) |
Get new-style event weights from an input event string.
Definition at line 396 of file LHE.py.
| python.utility.LHE.preamble | ( | input_LHE_file | ) |
Get opening lines from file as a string.
Definition at line 121 of file LHE.py.
| python.utility.LHE.reindent_XML | ( | elem | ) |
Re-indent XML so that elements are on their own line.
Definition at line 409 of file LHE.py.
| python.utility.LHE.string_to_weight | ( | input_event | ) |
Get weight name/value pairs from an input string.
Definition at line 181 of file LHE.py.
| python.utility.LHE.update_XWGTUP_with_reweighted_nominal | ( | input_event, | |
| wgtid_for_old_XWGTUP_value = None ) |
Ensure that XWGTUP is equal to the reweighted nominal.
Definition at line 366 of file LHE.py.