3from AthenaCommon
import Logging
4from ..powheg_V2
import PowhegV2
5from ..external
import ExternalMadSpin
8logger = Logging.logging.getLogger(
"PowhegControl")
15 "t t~ z > all [MadSpin]" :
"00000",
16 't t~ z > all' :
'22222',
17 't t~ z > b j j b~ j j emu+ emu-' :
'00022',
18 't t~ z > b l+ vl b~ l- vl~ emu+ emu-' :
'22200',
19 "t t~ z > b emu+ vemu b~ emu- vemu~ emu+ emu-":
"22000",
20 't t~ z > semileptonic + emu+ emu-':
'11111',
21 't t~ z > undecayed' :
'00000',
28 Powheg interface for ttZ 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(ttZ, self).
__init__(base_directory,
"ttZ", **kwargs)
117 self.
add_keyword(
"topdecaymode",
"t t~ z > all", name=
"decay_mode")
132 Retrieve nlox parameters file, copy it into the local directory, and edit some of the parameters
138 original_path = os.path.join(os.path.dirname(self.
executable),
'test',
'nlox_parameters.par')
141 fallback_path = os.path.join(os.path.dirname(os.path.dirname(self.
executable)),
'test',
'nlox_parameters.par')
144 if os.path.exists(original_path):
145 source_file = original_path
146 elif os.path.exists(fallback_path):
147 source_file = fallback_path
149 raise FileNotFoundError(
"No valid nlox_parameters.par found in expected locations.")
152 shutil.copyfile(source_file,
'./nlox_parameters.par-old')
156 with open(
'./nlox_parameters.par-old')
as f:
157 lines = f.readlines()
170 with open(
'./nlox_parameters.par',
'w')
as f:
172 for pattern, replacement
in update_dict.items():
174 line = replacement+
'\n'
177 logger.info(
'New file ./nlox_parameters.par created locally with updated parameters')
181 Validate decay_mode keywords and translate them from ATLAS input to Powheg input
185 error_message =
"Decay mode '{given}' not recognised, valid choices are: '{choices}'!".format(given=self.
decay_mode, choices=
"', '".join(self.
allowed_decay_modes))
186 logger.warning(error_message)
187 raise ValueError(error_message)
197 if self.
decay_mode ==
't t~ z > 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.
__init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
get_nlox_params_file(self)
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.