![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Default Powheg configuration for top pair production plus one jet.
More...
|
def | __init__ (self, base_directory, **kwargs) |
| Constructor: all process options are set here. More...
|
|
def | validate_decays (self) |
| Validate semileptonic and topdecaymode keywords. More...
|
|
def | default_PDFs (self) |
| Default PDFs for this process. More...
|
|
def | default_scales (self) |
| Default scale variations for this process. More...
|
|
def | files_for_cleanup (self) |
| Wildcarded list of files created by this process that can be deleted. More...
|
|
def | integration_file_names (self) |
| Wildcarded list of integration files that might be created by this process. More...
|
|
def | mandatory_integration_file_names (self) |
| Wildcarded list of integration files that are needed for this process. More...
|
|
def | powheg_version (self) |
| Version of PowhegBox process. More...
|
|
def | stage_is_completed (self, stage) |
| Set whether the specified POWHEG-BOX generation stage is complete. More...
|
|
def | hoppet_info (self) |
|
def | hoppet_warning (self) |
|
def | openloops_error (self) |
|
def | manually_set_openloops_paths (self) |
|
def | manually_set_openloops_gnu_paths (self) |
|
def | link_madloop_libraries (self) |
|
def | link_external_powheg_libraries (self, librarypath) |
|
def | add_algorithm (self, alg_or_process) |
| Add an algorithm or external process to the sequence. More...
|
|
def | prepare_to_parallelise (self, n_cores) |
| Scale calculation parameters by n_cores. More...
|
|
def | validate_parameters (self) |
| Validate any parameters which need it before preparing runcard. More...
|
|
def | validate_integration_parameters (self) |
| Validate integration keywords by forcing to integer values. More...
|
|
def | check_decay_mode (self, decay_mode, allowed_decay_modes=None) |
| Check whether a decay mode is allowed an raise an exception if it is not. More...
|
|
def | check_using_integration_files (self) |
|
def | modify_parameter (self, stage=0) |
|
def | set_parameter_in_config (self, key, value) |
|
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. More...
|
|
def | expose (self) |
| Add all names to the interface of this object. More...
|
|
def | has_keyword (self, keyword) |
|
def | has_parameter (self, parameter) |
|
def | parameters_by_keyword (self, keyword) |
| Retrieve all parameters that use a given keyword. More...
|
|
def | parameters_by_name (self, name) |
| Retrieve all parameters that use a given name. More...
|
|
Default Powheg configuration for top pair production plus one jet.
Create a configurable object with all applicable Powheg options.
- Author
- James Robinson james.nosp@m..rob.nosp@m.inson.nosp@m.@cer.nosp@m.n.ch
Definition at line 28 of file ttj.py.
◆ __init__()
def python.processes.powheg.ttj.ttj.__init__ |
( |
|
self, |
|
|
|
base_directory, |
|
|
** |
kwargs |
|
) |
| |
Constructor: all process options are set here.
- Parameters
-
base_directory | path to PowhegBox code. |
kwargs | dictionary of arguments from Generate_tf. |
Definition at line 36 of file ttj.py.
36 def __init__(self, base_directory, **kwargs):
37 """! Constructor: all process options are set here.
39 @param base_directory: path to PowhegBox code.
40 @param kwargs dictionary of arguments from Generate_tf.
42 super(ttj, self).
__init__(base_directory,
"ttbarj", **kwargs)
45 logger.warning(
"Applying manual, hard-coded fixes for library paths")
46 OLPath = os.path.dirname(self.executable)+
"/obj-gnu"
47 os.environ[
'OpenLoopsPath'] = OLPath
48 logger.info(
"OpenLoopsPath defined as = {0}".
format(os.getenv(
'OpenLoopsPath')))
51 self.add_algorithm(ExternalMadSpin(process=
"generate p p > t t~ j [QCD]"))
54 self.validation_functions.
append(
"validate_decays")
58 self.allowed_decay_modes =
sorted(_decay_mode_lookup.keys())
61 self.add_keyword(
"alphaem")
62 self.add_keyword(
"bcut")
63 self.add_keyword(
"bornktmin", 5.0)
64 self.add_keyword(
"bornonly")
65 self.add_keyword(
"bornsuppfact", 100.0)
66 self.add_keyword(
"bornzerodamp")
67 self.add_keyword(
"bottomthr")
68 self.add_keyword(
"bottomthrpdf")
69 self.add_keyword(
"charmthr")
70 self.add_keyword(
"charmthrpdf")
71 self.add_keyword(
"CKM_Vcb")
72 self.add_keyword(
"CKM_Vcd")
73 self.add_keyword(
"CKM_Vcs")
74 self.add_keyword(
"CKM_Vtb")
75 self.add_keyword(
"CKM_Vtd")
76 self.add_keyword(
"CKM_Vts")
77 self.add_keyword(
"CKM_Vub")
78 self.add_keyword(
"CKM_Vud")
79 self.add_keyword(
"CKM_Vus")
80 self.add_keyword(
"clobberlhe")
81 self.add_keyword(
'collremnsamp"')
82 self.add_keyword(
"colltest")
83 self.add_keyword(
"compute_rwgt")
84 self.add_keyword(
"elbranching")
85 self.add_keyword(
"facscfact", self.default_scales[0])
86 self.add_keyword(
"fastbtlbound")
87 self.add_keyword(
"ffltest")
88 self.add_keyword(
"flg_debug")
89 self.add_keyword(
"foldcsi", 2)
90 self.add_keyword(
"foldphi", 2)
91 self.add_keyword(
"foldy", 2)
92 self.add_keyword(
"fullrwgt")
93 self.add_keyword(
"fullrwgtmode")
94 self.add_keyword(
"ggproc")
95 self.add_keyword(
"gqbproc")
96 self.add_keyword(
"hdamp")
97 self.add_keyword(
"hfact")
98 self.add_keyword(
"icsimax", 3)
99 self.add_keyword(
"ih1")
100 self.add_keyword(
"ih2")
101 self.add_keyword(
"itmx1")
102 self.add_keyword(
"itmx2", 4)
103 self.add_keyword(
"iupperfsr")
104 self.add_keyword(
"iupperisr")
105 self.add_keyword(
"iymax", 3)
106 self.add_keyword(
"jacsing")
107 self.add_keyword(
"largecorrfact")
108 self.add_keyword(
"lhans1", self.default_PDFs)
109 self.add_keyword(
"lhans2", self.default_PDFs)
110 self.add_keyword(
"lhfm/bmass")
111 self.add_keyword(
"lhfm/cmass")
112 self.add_keyword(
"lhfm/emass")
113 self.add_keyword(
"lhfm/mumass")
114 self.add_keyword(
"lhfm/taumass")
115 self.add_keyword(
"manyseeds")
116 self.add_keyword(
"masswindow_high")
117 self.add_keyword(
"masswindow_low")
118 self.add_keyword(
"ncall1", 51000)
119 self.add_keyword(
"ncall1rm")
120 self.add_keyword(
"ncall2", 91000)
121 self.add_keyword(
"ncall2rm")
122 self.add_keyword(
"nubound", 11000)
123 self.add_keyword(
"par_2gsupp")
124 self.add_keyword(
"par_diexp")
125 self.add_keyword(
"par_dijexp")
126 self.add_keyword(
"par_fsrtinycsi")
127 self.add_keyword(
"par_fsrtinyy")
128 self.add_keyword(
"par_isrtinycsi")
129 self.add_keyword(
"par_isrtinyy")
130 self.add_keyword(
"parallelstage")
131 self.add_keyword(
"pdfreweight")
132 self.add_keyword(
"psgen")
133 self.add_keyword(
"ptmin_jet", 20.0)
134 self.add_keyword(
"ptsqmin")
135 self.add_keyword(
"ptsupp")
136 self.add_keyword(
"qgproc")
137 self.add_keyword(
"qqbproc")
138 self.add_keyword(
"qqpproc")
139 self.add_keyword(
"qqproc")
140 self.add_keyword(
"R_jet")
141 self.add_keyword(
"radregion")
142 self.add_keyword(
"rand1")
143 self.add_keyword(
"rand2")
144 self.add_keyword(
"renscfact", self.default_scales[1])
145 self.add_keyword(
"runningscale")
146 self.add_keyword(
"rwl_add")
147 self.add_keyword(
"rwl_file")
148 self.add_keyword(
"rwl_format_rwgt")
149 self.add_keyword(
"rwl_group_events")
150 self.add_keyword(
"semileptonic", hidden=
True)
151 self.add_keyword(
"smartsig")
152 self.add_keyword(
"softtest")
153 self.add_keyword(
"sthw2")
154 self.add_keyword(
"storeinfo_rwgt")
155 self.add_keyword(
"testplots")
156 self.add_keyword(
"testsuda")
157 self.add_keyword(
"topdecaymode",
"t t~ > all", name=
"decay_mode")
158 self.add_keyword(
"topmass")
159 self.add_keyword(
"topwidth")
160 self.add_keyword(
"ubsigmadetails")
161 self.add_keyword(
"use-old-grid")
162 self.add_keyword(
"use-old-ubound")
163 self.add_keyword(
"use-OLP-interface")
164 self.add_keyword(
"withdamp")
165 self.add_keyword(
"withnegweights")
166 self.add_keyword(
"withsubtr")
167 self.add_keyword(
"Wmass")
168 self.add_keyword(
"Wwidth")
169 self.add_keyword(
"xupbound", 6)
170 self.add_keyword(
"zerowidth")
171 self.add_keyword(
"Zmass")
172 self.add_keyword(
"Zwidth")
◆ add_algorithm()
def python.processes.powheg_base.PowhegBase.add_algorithm |
( |
|
self, |
|
|
|
alg_or_process |
|
) |
| |
|
inherited |
Add an algorithm or external process to the sequence.
- Parameters
-
process | Algorithm or external process to add. |
Definition at line 205 of file powheg_base.py.
206 """! Add an algorithm or external process to the sequence.
208 @param process Algorithm or external process to add.
211 if isinstance(alg_or_process, str):
212 self.algorithms.
append(alg_or_process)
215 self.externals[alg_or_process.name] = alg_or_process
◆ add_keyword()
def python.processes.configurable.Configurable.add_keyword |
( |
|
self, |
|
|
|
keyword, |
|
|
|
value = None , |
|
|
|
name = None , |
|
|
|
frozen = None , |
|
|
|
hidden = None , |
|
|
|
description = None , |
|
|
** |
kwargs |
|
) |
| |
|
inherited |
Register configurable parameter that is exposed to the user.
- Parameters
-
keyword | Powheg keyword that gets written to the runcard. |
value | Value of the parameter. |
name | Configurable parameter name exposed to the user. |
hidden | True if this parameter should be hidden from the user. |
frozen | True if this parameter cannot be changed. |
description | Description for the run card. |
parameter | Name used in the run card if different. |
Definition at line 21 of file configurable.py.
21 def add_keyword(self, keyword, value=None, name=None, frozen=None, hidden=None, description=None, **kwargs):
22 """! Register configurable parameter that is exposed to the user.
24 @param keyword Powheg keyword that gets written to the runcard.
25 @param value Value of the parameter.
26 @param name Configurable parameter name exposed to the user.
27 @param hidden True if this parameter should be hidden from the user.
28 @param frozen True if this parameter cannot be changed.
29 @param description Description for the run card.
30 @param parameter Name used in the run card if different.
33 defaults = Registry().get_defaults(keyword)
34 if value == defaults[
"value"]
and value
is not None and (hidden
is not True):
35 if keyword
not in [
"ebeam1",
"ebeam2"]:
36 logger.debug(
"Unnecessarily setting parameter {} to {} which is its default value!".
format(keyword, value))
37 value = [value, defaults[
"value"]][value
is None]
38 name = [name, defaults[
"name"]][name
is None]
39 description = [description, defaults[
"description"]][description
is None]
40 hidden = [hidden, defaults[
"hidden"]][hidden
is None]
41 frozen = [frozen, defaults[
"frozen"]][frozen
is None]
42 if keyword
in [p.keyword
for p
in self.parameters]:
43 raise AttributeError(
"Keyword '{}' has already been defined for this process".
format(keyword))
44 self.parameters.
append(Parameter(keyword, name=name, value=value, frozen=frozen, hidden=hidden, description=description, **kwargs))
◆ check_decay_mode()
def python.processes.powheg_base.PowhegBase.check_decay_mode |
( |
|
self, |
|
|
|
decay_mode, |
|
|
|
allowed_decay_modes = None |
|
) |
| |
|
inherited |
Check whether a decay mode is allowed an raise an exception if it is not.
Definition at line 280 of file powheg_base.py.
281 """! Check whether a decay mode is allowed an raise an exception if it is not."""
282 if allowed_decay_modes
is None:
283 allowed_decay_modes = self.allowed_decay_modes
284 if decay_mode
not in allowed_decay_modes:
285 logger.warning(
"Decay mode {} not recognised!".
format(decay_mode))
286 logger.info(
"Allowed decay modes are:")
287 for allowed_decay_mode
in allowed_decay_modes:
288 logger.info(
"... {}".
format(allowed_decay_mode))
289 raise ValueError(
"Decay mode {} not recognised!".
format(decay_mode))
◆ check_using_integration_files()
def python.processes.powheg_base.PowhegBase.check_using_integration_files |
( |
|
self | ) |
|
|
inherited |
Definition at line 291 of file powheg_base.py.
295 missing_patterns = []
297 search_strings = self.mandatory_integration_file_names
298 except AttributeError:
299 logger.fatal(
"No integration grid file name patterns defined for this process.")
301 for s
in search_strings:
306 missing_patterns.append(s)
307 if missing_patterns == []:
308 logger.info(
"Integration grid files found locally. Event generation shall continue, skipping the integration step.")
309 logger.info(
"Integration grid files found locally: {}".
format(found_files))
311 logger.info(
"Integration grid files needed were not found locally. Event generation shall continue, starting by the integration step.")
312 logger.info(
"Missing integration grid files with these patterns: {}".
format(missing_patterns))
313 logger.info(
"Integration grid files found locally (if any): {}".
format(found_files))
◆ default_PDFs()
def python.processes.powheg_V2.PowhegV2.default_PDFs |
( |
|
self | ) |
|
|
inherited |
Default PDFs for this process.
Reimplemented from python.processes.powheg_base.PowhegBase.
Definition at line 27 of file powheg_V2.py.
28 """! Default PDFs for this process."""
30 __PDF_list += [266000, 265000]
31 __PDF_list += [303200]
32 __PDF_list += [27400, 27100]
33 __PDF_list += [14000, 14400]
34 __PDF_list += [304400, 304200]
35 __PDF_list += [331500, 331100]
36 __PDF_list += [14200, 14300, 14100]
◆ default_scales()
def python.processes.powheg_V2.PowhegV2.default_scales |
( |
|
self | ) |
|
|
inherited |
Default scale variations for this process.
Reimplemented from python.processes.powheg_base.PowhegBase.
Definition at line 41 of file powheg_V2.py.
42 """! Default scale variations for this process."""
43 return [[1.0, 1.0, 1.0, 0.5, 0.5, 2.0, 2.0],\
44 [1.0, 0.5, 2.0, 0.5, 1.0, 1.0, 2.0]]
◆ expose()
def python.processes.configurable.Configurable.expose |
( |
|
self | ) |
|
|
inherited |
Add all names to the interface of this object.
Definition at line 46 of file configurable.py.
47 """! Add all names to the interface of this object."""
48 for parameter
in self.parameters:
49 setattr(self, parameter.name, parameter.value)
◆ files_for_cleanup()
def python.processes.powheg_V2.PowhegV2.files_for_cleanup |
( |
|
self | ) |
|
|
inherited |
Wildcarded list of files created by this process that can be deleted.
Reimplemented from python.processes.powheg_base.PowhegBase.
Definition at line 47 of file powheg_V2.py.
48 """! Wildcarded list of files created by this process that can be deleted."""
53 "mint_upb_btildeupb.top",
54 "mint_upb_remnupb.top",
56 "pwgboundviolations*.dat",
62 "reweighting_input.xml",
◆ has_keyword()
def python.processes.configurable.Configurable.has_keyword |
( |
|
self, |
|
|
|
keyword |
|
) |
| |
|
inherited |
Definition at line 51 of file configurable.py.
52 return (len(
list(self.parameters_by_keyword(keyword))) > 0)
◆ has_parameter()
def python.processes.configurable.Configurable.has_parameter |
( |
|
self, |
|
|
|
parameter |
|
) |
| |
|
inherited |
Definition at line 54 of file configurable.py.
55 return (len(
list(self.parameters_by_name(parameter))) > 0)
◆ hoppet_info()
def python.processes.powheg_base.PowhegBase.hoppet_info |
( |
|
self | ) |
|
|
inherited |
Returns a list of strings to be treated as info messages in the log
They otherwise throw an error with HOPPET v. 1.2.0
Cf. AGENE-2016
Definition at line 23 of file powheg_base.py.
25 Returns a list of strings to be treated as info messages in the log
26 They otherwise throw an error with HOPPET v. 1.2.0
29 return [
"-----------------------------------------------------------",
30 "Welcome to HOPPET v. 1.2.0",
31 "Higher Order Perturbative Parton Evolution Toolkit",
32 "Written by Gavin P. Salam (2001-2012)",
33 "with contributions from Juan Rojo",
34 "Frederic Dreyer and Alexander Karlberg",
35 "It is made available under the GNU public license,",
36 "with the additional request that if you use it or any",
37 "derivative of it in scientific work then you should cite:",
38 "G.P. Salam & J. Rojo, CPC 180(2009)120 (arXiv:0804.3755).",
39 "You are also encouraged to cite the original references,",
40 "for LO, NLO and NNLO splitting functions, the QCD",
41 "1, 2 and 3 loop beta functions and the coupling and",
42 "PDF and coupling mass threshold matching functions."]
◆ hoppet_warning()
def python.processes.powheg_base.PowhegBase.hoppet_warning |
( |
|
self | ) |
|
|
inherited |
Returns a list of strings to be treated as warning messages in the log
They otherwise throw an error
Definition at line 44 of file powheg_base.py.
46 Returns a list of strings to be treated as warning messages in the log
47 They otherwise throw an error
49 return [
"WARNING in InitMTMNNLO: using parametrisation (less accuracte) for A2PShg"]
◆ integration_file_names()
def python.processes.powheg_V2.PowhegV2.integration_file_names |
( |
|
self | ) |
|
|
inherited |
Wildcarded list of integration files that might be created by this process.
All files matching these patterns will be included in the gridpack.
Reimplemented from python.processes.powheg_base.PowhegBase.
Definition at line 67 of file powheg_V2.py.
68 """! Wildcarded list of integration files that might be created by this process."""
69 """! All files matching these patterns will be included in the gridpack."""
◆ link_external_powheg_libraries()
def python.processes.powheg_base.PowhegBase.link_external_powheg_libraries |
( |
|
self, |
|
|
|
librarypath |
|
) |
| |
|
inherited |
Manual fix for external libraries path.
This library is expected to be installed in the POWHEGPATH folder.
Needs to be adjusted if the version of the library changes.
Definition at line 122 of file powheg_base.py.
124 Manual fix for external libraries path.
125 This library is expected to be installed in the POWHEGPATH folder.
126 Needs to be adjusted if the version of the library changes.
128 logger.warning(
"Applying manual fixes for library paths:" + librarypath)
129 logger.debug(
"LD_LIBRARY_PATH (before) = {0}".
format(os.getenv(
'LD_LIBRARY_PATH')))
130 ldpath = os.getenv(
'LD_LIBRARY_PATH')
131 powhegpath = os.getenv(
'POWHEGPATH')
132 librarypath = glob.glob(powhegpath+librarypath)
133 ldpath_new = ldpath+
":" + librarypath[0]
134 os.environ[
'LD_LIBRARY_PATH'] = ldpath_new
135 logger.debug(
"LD_LIBRARY_PATH (after) = {0}".
format(os.getenv(
'LD_LIBRARY_PATH')))
◆ link_madloop_libraries()
def python.processes.powheg_base.PowhegBase.link_madloop_libraries |
( |
|
self | ) |
|
|
inherited |
Manual fix for MadLoop libraries, avoiding issues when /afs not available
This is NOT a viable long-term solution and should be made obsolete after the migration
The trick consists in making a symbolic link of some directory in the installation
which contains some files needed by MadLoop
Definition at line 94 of file powheg_base.py.
96 Manual fix for MadLoop libraries, avoiding issues when /afs not available
97 This is NOT a viable long-term solution and should be made obsolete after the migration
98 The trick consists in making a symbolic link of some directory in the installation
99 which contains some files needed by MadLoop
102 logger.warning(
"Applying manual, hard-coded fixes for MadLoop library paths")
103 MadLoop_virtual = os.path.dirname(self.executable)+
"/virtual"
104 logger.info(
"Trying to link directory {} locally".
format(MadLoop_virtual))
105 if not os.access(MadLoop_virtual,os.R_OK):
106 logger.fatal(
"Impossible to access directory {} needed for this process which uses MadLoop".
format(MadLoop_virtual))
107 if os.access(
"virtual",os.R_OK):
108 logger.info(
"Found \"virtual\" probably from previous run - deleting it to recreate it with correct path")
112 logger.fatal(
"Impossible to remove \"virtual\" symbolic link - exiting...")
114 os.symlink(MadLoop_virtual,
"virtual")
115 link = os.readlink(
"virtual")
116 if link != MadLoop_virtual:
117 logger.fatal(
"Symbolic link \"virtual\" points to {0} while it should point to {1} - linking probably didn't work. Exiting...".
format(link,MadLoop_virtual))
120 logger.info(
"Local directory \"virtual\" now points to {}".
format(MadLoop_virtual))
◆ mandatory_integration_file_names()
def python.processes.powheg_V2.PowhegV2.mandatory_integration_file_names |
( |
|
self | ) |
|
|
inherited |
Wildcarded list of integration files that are needed for this process.
If some of the patterns don't match any files before running, a warning will be made to inform that no pre-made integration grid will be used.
Reimplemented from python.processes.powheg_base.PowhegBase.
Definition at line 80 of file powheg_V2.py.
81 """! Wildcarded list of integration files that are needed for this process."""
82 """! If some of the patterns don't match any files before running, a warning will be made to inform that no pre-made integration grid will be used."""
◆ manually_set_openloops_gnu_paths()
def python.processes.powheg_base.PowhegBase.manually_set_openloops_gnu_paths |
( |
|
self | ) |
|
|
inherited |
Manual fix for OpenLoops libraries path, avoiding issues when /afs not available
This is NOT a viable long-term solution and should be made obsolete after the migration
away from AFS is more advanced.
Definition at line 76 of file powheg_base.py.
78 Manual fix for OpenLoops libraries path, avoiding issues when /afs not available
79 This is NOT a viable long-term solution and should be made obsolete after the migration
80 away from AFS is more advanced.
83 logger.warning(
"Applying manual, hard-coded fixes for OpenLoops library paths")
84 logger.info(
"OpenLoopsPath (before) = {0}".
format(os.getenv(
'OpenLoopsPath')))
85 logger.debug(
"LD_LIBRARY_PATH (before) = {0}".
format(os.getenv(
'LD_LIBRARY_PATH')))
86 OLPath = os.path.dirname(self.executable)+
"/obj-gnu"
87 os.environ[
'OpenLoopsPath'] = OLPath
88 ldpath = os.getenv(
'LD_LIBRARY_PATH')
89 ldpath_new = OLPath+
":" + OLPath +
"/proclib:" + ldpath
90 os.environ[
'LD_LIBRARY_PATH'] = ldpath_new
91 logger.info(
"OpenLoopsPath (after) = {0}".
format(os.getenv(
'OpenLoopsPath')))
92 logger.debug(
"LD_LIBRARY_PATH (after) = {0}".
format(os.getenv(
'LD_LIBRARY_PATH')))
◆ manually_set_openloops_paths()
def python.processes.powheg_base.PowhegBase.manually_set_openloops_paths |
( |
|
self | ) |
|
|
inherited |
Manual fix for OpenLoops libraries path, avoiding issues when /afs not available
This is NOT a viable long-term solution and should be made obsolete after the migration
away from AFS is more advanced.
Definition at line 58 of file powheg_base.py.
60 Manual fix for OpenLoops libraries path, avoiding issues when /afs not available
61 This is NOT a viable long-term solution and should be made obsolete after the migration
62 away from AFS is more advanced.
65 logger.warning(
"Applying manual, hard-coded fixes for OpenLoops library paths")
66 logger.info(
"OpenLoopsPath (before) = {0}".
format(os.getenv(
'OpenLoopsPath')))
67 logger.debug(
"LD_LIBRARY_PATH (before) = {0}".
format(os.getenv(
'LD_LIBRARY_PATH')))
68 OLPath = os.path.dirname(self.executable)+
"/obj-gfortran"
69 os.environ[
'OpenLoopsPath'] = OLPath
70 ldpath = os.getenv(
'LD_LIBRARY_PATH')
71 ldpath_new = OLPath+
":" + OLPath +
"/proclib:" + ldpath
72 os.environ[
'LD_LIBRARY_PATH'] = ldpath_new
73 logger.info(
"OpenLoopsPath (after) = {0}".
format(os.getenv(
'OpenLoopsPath')))
74 logger.debug(
"LD_LIBRARY_PATH (after) = {0}".
format(os.getenv(
'LD_LIBRARY_PATH')))
◆ modify_parameter()
def python.processes.powheg_base.PowhegBase.modify_parameter |
( |
|
self, |
|
|
|
stage = 0 |
|
) |
| |
|
inherited |
Definition at line 316 of file powheg_base.py.
319 if not bool(self.parameterStageDict):
322 logger.info(
"Modifying parameters for the stages : {0}".
format(self.parameterStageDict))
325 for key
in self.parameterStageDict:
326 settingsList = self.parameterStageDict[key]
327 if abs(settingsList[2] - stage) <=1e-09:
328 self.set_parameter_in_config(key,settingsList[1])
330 self.set_parameter_in_config(key,settingsList[0])
◆ openloops_error()
def python.processes.powheg_base.PowhegBase.openloops_error |
( |
|
self | ) |
|
|
inherited |
Returns a list of strings to be treated as error messages in the log
They otherwise do not throw an error
Definition at line 51 of file powheg_base.py.
53 Returns a list of strings to be treated as error messages in the log
54 They otherwise do not throw an error
56 return [
"[POWHEG-BOX+OpenLoops] Process not found!"]
◆ parameters_by_keyword()
def python.processes.configurable.Configurable.parameters_by_keyword |
( |
|
self, |
|
|
|
keyword |
|
) |
| |
|
inherited |
Retrieve all parameters that use a given keyword.
- Parameters
-
keyword | Powheg keyword that gets written to the runcard. |
Definition at line 57 of file configurable.py.
58 """! Retrieve all parameters that use a given keyword.
60 @param keyword Powheg keyword that gets written to the runcard.
62 return [p
for p
in self.parameters
if p.keyword == keyword]
◆ parameters_by_name()
def python.processes.configurable.Configurable.parameters_by_name |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
inherited |
Retrieve all parameters that use a given name.
- Parameters
-
Definition at line 64 of file configurable.py.
65 """! Retrieve all parameters that use a given name.
67 @param name Configurable parameter name exposed to the user.
69 return [p
for p
in self.parameters
if p.name == name]
◆ powheg_version()
def python.processes.powheg_V2.PowhegV2.powheg_version |
( |
|
self | ) |
|
|
inherited |
◆ prepare_to_parallelise()
def python.processes.powheg_base.PowhegBase.prepare_to_parallelise |
( |
|
self, |
|
|
|
n_cores |
|
) |
| |
|
inherited |
Scale calculation parameters by n_cores.
Definition at line 247 of file powheg_base.py.
248 """! Scale calculation parameters by n_cores."""
249 __nEvents_unscaled = self.parameters_by_keyword(
"numevts")[0].value
250 for keyword
in [
"ncall1",
"ncall1rm",
"ncall2",
"ncall2rm",
"nubound",
"numevts"]:
251 for parameter
in self.parameters_by_keyword(keyword):
252 if int(parameter.value) > 0:
253 parameter.value =
int(math.ceil(
float(parameter.value) / n_cores))
254 __nEvents_scaled = self.parameters_by_keyword(
"numevts")[0].value
255 logger.info(
"Scaling number of events per job from {} down to {}".
format(__nEvents_unscaled, __nEvents_scaled))
257 [parameter.freeze()
for parameter
in self.parameters_by_name(
"parallelstage")]
◆ set_parameter_in_config()
def python.processes.powheg_base.PowhegBase.set_parameter_in_config |
( |
|
self, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
|
inherited |
Definition at line 332 of file powheg_base.py.
333 FileParser(
"powheg.input").text_replace(key+
".*", key+
" {}".
format(value))
◆ stage_is_completed()
def python.processes.powheg_V2.PowhegV2.stage_is_completed |
( |
|
self, |
|
|
|
stage |
|
) |
| |
|
inherited |
Set whether the specified POWHEG-BOX generation stage is complete.
Reimplemented from python.processes.powheg_base.PowhegBase.
Definition at line 96 of file powheg_V2.py.
97 """! Set whether the specified POWHEG-BOX generation stage is complete."""
99 required_files = [
"pwg*xg*.dat"]
101 required_files = [
"pwg*upb*.dat",
"pwggrid*.dat"]
103 required_files = [
"pwgfullgrid*.dat",
"pwgubound*.dat"]
108 for required_file
in required_files:
109 if not glob.glob(required_file):
◆ validate_decays()
def python.processes.powheg.ttj.ttj.validate_decays |
( |
|
self | ) |
|
Validate semileptonic and topdecaymode keywords.
Definition at line 174 of file ttj.py.
175 """! Validate semileptonic and topdecaymode keywords."""
177 if self.decay_mode
not in self.allowed_decay_modes:
178 error_message =
"Decay mode '{given}' not recognised, valid choices are: '{choices}'!".
format(given=self.decay_mode, choices=
"', '".
join(self.allowed_decay_modes))
179 logger.warning(error_message)
180 raise ValueError(error_message)
184 if "MadSpin" in self.decay_mode:
189 self.parameters_by_keyword(
"topdecaymode")[0].value = _decay_mode_lookup[self.decay_mode]
190 if self.decay_mode ==
"semileptonic":
192 self.parameters_by_keyword(
"semileptonic")[0].value = 1
◆ validate_integration_parameters()
def python.processes.powheg_base.PowhegBase.validate_integration_parameters |
( |
|
self | ) |
|
|
inherited |
Validate integration keywords by forcing to integer values.
Definition at line 269 of file powheg_base.py.
270 """! Validate integration keywords by forcing to integer values."""
272 for name
in (
"foldcsi",
"foldphi",
"foldy",
"itmx1",
"itmx2",
"ncall1",
"ncall2",
"nEvents"):
273 for parameter
in self.parameters_by_name(name):
275 parameter.value =
int(parameter.value)
277 logger.fatal(
"Failed to validate {} with value {}".
format(name, parameter.value))
◆ validate_parameters()
def python.processes.powheg_base.PowhegBase.validate_parameters |
( |
|
self | ) |
|
|
inherited |
Validate any parameters which need it before preparing runcard.
Definition at line 264 of file powheg_base.py.
265 """! Validate any parameters which need it before preparing runcard."""
266 for function_name
in self.validation_functions:
267 getattr(self, function_name)()
◆ algorithms
python.processes.powheg_base.PowhegBase.algorithms |
|
inherited |
List of additional algorithms to schedule.
Definition at line 170 of file powheg_base.py.
◆ allowed_decay_modes
python.processes.powheg.ttj.ttj.allowed_decay_modes |
List of allowed decay modes (The sorting of the list is just to increase readability when it's printed)
Definition at line 58 of file ttj.py.
◆ cores
python.processes.powheg_base.PowhegBase.cores |
|
inherited |
◆ decay_mode
python.processes.powheg.ttj.ttj.decay_mode |
◆ error_output
python.processes.powheg_base.PowhegBase.error_output |
|
inherited |
◆ executable
python.processes.powheg_base.PowhegBase.executable |
|
inherited |
◆ externals
python.processes.powheg_base.PowhegBase.externals |
|
inherited |
List of external processes to schedule.
Definition at line 173 of file powheg_base.py.
◆ info_output
python.processes.powheg_base.PowhegBase.info_output |
|
inherited |
◆ is_reweightable
python.processes.powheg_base.PowhegBase.is_reweightable |
|
inherited |
Switch to determine whether reweighting is allowed.
Definition at line 188 of file powheg_base.py.
◆ parameters
python.processes.configurable.Configurable.parameters |
|
inherited |
◆ parameterStageDict
python.processes.powheg_base.PowhegBase.parameterStageDict |
|
inherited |
Dictionary used to change parameters of the Powheg input.
The structure is: {"parameter" : [default_value, changed_value, parallelstage_to_changed_value]}
Definition at line 203 of file powheg_base.py.
◆ powhegbox_revision
python.processes.powheg_base.PowhegBase.powhegbox_revision |
|
inherited |
Log the PowhegBox version and process-code revision for AMI etc.
Also set environment variable POWHEGVER to this contain this information SVN revision of PowhegBox code
Definition at line 164 of file powheg_base.py.
◆ process_revision
python.processes.powheg_base.PowhegBase.process_revision |
|
inherited |
◆ remove_oldStyle_rwt_comments
python.processes.powheg_base.PowhegBase.remove_oldStyle_rwt_comments |
|
inherited |
Switch to determine if the #rwgt and #pdf comments should be kept in lhe files despite using xml reweighting.
Definition at line 194 of file powheg_base.py.
◆ use_XML_reweighting
python.processes.powheg_base.PowhegBase.use_XML_reweighting |
|
inherited |
Switch to determine whether XML reweighting should be used.
Definition at line 191 of file powheg_base.py.
◆ validation_functions
python.processes.powheg_base.PowhegBase.validation_functions |
|
inherited |
List of validation functions to run before preparing runcard.
Definition at line 176 of file powheg_base.py.
◆ warning_output
python.processes.powheg_base.PowhegBase.warning_output |
|
inherited |
Special treatment for some log messages.
Definition at line 197 of file powheg_base.py.
The documentation for this class was generated from the following file:
def expose(self)
Add all names to the interface of this object.
def validate_parameters(self)
Validate any parameters which need it before preparing runcard.
def add_algorithm(self, alg_or_process)
Add an algorithm or external process to the sequence.
def manually_set_openloops_gnu_paths(self)
def parameters_by_name(self, name)
Retrieve all parameters that use a given name.
def check_using_integration_files(self)
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.
def files_for_cleanup(self)
Wildcarded list of files created by this process that can be deleted.
def has_parameter(self, parameter)
def prepare_to_parallelise(self, n_cores)
Scale calculation parameters by n_cores.
def openloops_error(self)
def set_parameter_in_config(self, key, value)
def parameters_by_keyword(self, keyword)
Retrieve all parameters that use a given keyword.
def validate_decays(self)
Validate idvecbos and vdecaymode keywords.
def powheg_version(self)
Version of PowhegBox process.
def check_decay_mode(self, decay_mode, allowed_decay_modes=None)
Check whether a decay mode is allowed an raise an exception if it is not.
def validate_integration_parameters(self)
Validate integration keywords by forcing to integer values.
def default_scales(self)
Default scale variations for this process.
def link_external_powheg_libraries(self, librarypath)
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
def link_madloop_libraries(self)
std::string join(const std::vector< std::string > &v, const char c=',')
def mandatory_integration_file_names(self)
Wildcarded list of integration files that are needed for this process.
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
def modify_parameter(self, stage=0)
def integration_file_names(self)
Wildcarded list of integration files that might be created by this process.
def default_PDFs(self)
Default PDFs for this process.
def has_keyword(self, keyword)
def manually_set_openloops_paths(self)
def stage_is_completed(self, stage)
Set whether the specified POWHEG-BOX generation stage is complete.
setBGCode setTAP setLVL2ErrorBits bool