3from AthenaCommon
import Logging
4from ..powheg_V2
import PowhegV2
5from ..external
import ExternalMadSpin
8logger = Logging.logging.getLogger(
"PowhegControl")
15 "t t~ emu+ emu- > all [MadSpin]" :
"00000",
16 't t~ emu+ emu- > all' :
'22222',
17 't t~ emu+ emu- > b j j b~ j j emu+ emu-' :
'00022',
18 't t~ emu+ emu- > b l+ vl b~ l- vl~ emu+ emu-' :
'22200',
19 "t t~ emu+ emu- > b emu+ vemu b~ emu- vemu~ emu+ emu-":
"22000",
20 't t~ emu+ emu- > semileptonic emu+ emu-':
'11111',
21 't t~ emu+ emu- > undecayed emu+ emu-' :
'00000',
28 Powheg interface for ttll production.
30 Reference for this process: https://arxiv.org/abs/2112.08892
32 @author Timothee Theveneaux-Pelzer <tpelzer@cern.ch>
36 """! Constructor: all process options are set here.
38 @param base_directory: path to PowhegBox code.
39 @param kwargs dictionary of arguments from Gen_tf.
41 super(ttll, self).
__init__(base_directory,
"ttll", **kwargs)
119 self.
add_keyword(
"topdecaymode",
"t t~ ll > all", name=
"decay_mode")
134 Retrieve nlox parameters file, copy it into the local directory, and edit some of the parameters
140 original_path = os.path.join(os.path.dirname(self.
executable),
'test',
'nlox_parameters.par')
143 fallback_path = os.path.join(os.path.dirname(os.path.dirname(self.
executable)),
'test',
'nlox_parameters.par')
146 if os.path.exists(original_path):
147 source_file = original_path
148 elif os.path.exists(fallback_path):
149 source_file = fallback_path
151 raise FileNotFoundError(
"No valid nlox_parameters.par found in expected locations.")
154 shutil.copyfile(source_file,
'./nlox_parameters.par-old')
158 with open(
'./nlox_parameters.par-old')
as f:
159 lines = f.readlines()
172 with open(
'./nlox_parameters.par',
'w')
as f:
174 for pattern, replacement
in update_dict.items():
176 line = replacement+
'\n'
179 logger.info(
'New file ./nlox_parameters.par created locally with updated parameters')
183 Validate decay_mode keywords and translate them from ATLAS input to Powheg input
187 error_message =
"Decay mode '{given}' not recognised, valid choices are: '{choices}'!".format(given=self.
decay_mode, choices=
"', '".join(self.
allowed_decay_modes))
188 logger.warning(error_message)
189 raise ValueError(error_message)
199 if self.
decay_mode ==
't t~ emu+ emu- > semileptonic emu+ emu-':
add_keyword(self, keyword, value=None, name=None, frozen=None, hidden=None, description=None, **kwargs)
Register configurable parameter that is exposed to the user.
expose(self)
Add all names to the interface of this object.
parameters_by_keyword(self, keyword)
Retrieve all parameters that use a given keyword.
Class for running external MadSpin process.
get_nlox_params_file(self)
__init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Base class for PowhegBox V2 processes.
executable
Powheg executable that will be used.
dict externals
List of external processes to schedule.
list validation_functions
List of validation functions to run before preparing runcard.
add_algorithm(self, alg_or_process)
Add an algorithm or external process to the sequence.
default_scales(self)
Default scale variations for this process.