 |
ATLAS Offline Software
|
Go to the documentation of this file.
3 from AthenaCommon
import Logging
4 from ..powheg_V2
import PowhegV2
5 from ..external
import ExternalMadSpin
8 logger = Logging.logging.getLogger(
"PowhegControl")
14 _decay_mode_lookup = {
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)
119 self.
add_keyword(
"topdecaymode",
"t t~ z > all", name=
"decay_mode")
134 Retrives nlox parameters file, copy it in 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
188 logger.warning(error_message)
189 raise ValueError(error_message)
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
def expose(self)
Add all names to the interface of this object.
def add_algorithm(self, alg_or_process)
Add an algorithm or external process to the sequence.
def default_scales(self)
Default scale variations for this process.
def add_keyword(self, keyword, value=None, name=None, frozen=None, hidden=None, description=None, **kwargs)
Register configurable parameter that is exposed to the user.
Class for running external MadSpin process.
def parameters_by_keyword(self, keyword)
Retrieve all parameters that use a given keyword.
validation_functions
List of validation functions to run before preparing runcard.
def get_nlox_params_file(self)
std::string join(const std::vector< std::string > &v, const char c=',')
externals
List of external processes to schedule.
def default_PDFs(self)
Default PDFs for this process.
Base class for PowhegBox V2 processes.
executable
Powheg executable that will be used.
def validate_decays(self)
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.