Commit 6dff052b authored by Ewelina Maria Lobodzinska's avatar Ewelina Maria Lobodzinska
Browse files

Merge branch '21.6-PowhegControl-FixPdfCommentsIssue' into '21.6'

PowhegControl: fix reweighting issue and expose parallelstage in some processes

See merge request !45526
parents c4c6fde2 7c06eff8
......@@ -123,6 +123,7 @@ def reweighter(process, weight_groups, powheg_LHE_output):
if not default_weight_exists_already(powheg_LHE_output) and not any([weight.group == "nominal" for weight in weight_list]):
weight_list = [WeightTuple(ID=0, name="nominal", group="nominal", parallel_xml_compatible=True, parameter_settings=[], keywords=None, combine=None)] + weight_list
FileParser("powheg.input").text_replace("pdfreweight .*", "pdfreweight 0")
# Construct xml output
xml_lines, serial_xml_weight_list, current_weightgroup = [], [], None
for weight in weight_list:
......@@ -240,6 +241,7 @@ def add_single_weight(process, weight, idx_weight, n_total, use_XML):
FileParser("powheg.input").text_replace("rwl_file .*", "rwl_file 'reweighting_input.xml'")
FileParser("powheg.input").text_replace("rwl_add .*", "rwl_add 1")
FileParser("powheg.input").text_replace("clobberlhe .*", "clobberlhe 1")
FileParser("powheg.input").text_replace("pdfreweight .*", "pdfreweight 0")
else:
# As the nominal process has already been run, turn on compute_rwgt
FileParser("powheg.input").text_replace("compute_rwgt 0", "compute_rwgt 1")
......@@ -300,7 +302,7 @@ def repair_comment_lines(lheFile, pattern):
if not os.path.isfile("{}.before_reweighting".format(lheFile)):
logger.error("Impossible to find file {}.before_reweighting".format(lheFile))
raise IOError
# in case anything turns bad, will give up fixing
impossible_to_fix = False
# initialise counters to 0
......
......@@ -150,4 +150,5 @@ class DMGG(PowhegV2):
self.check_decay_mode(self.DM_model, self.allowed_decay_modes)
# Set the decay parameter appropriately
__decay_mode_lookup = {"EFT": 1, "full theory": -1}
self.parameters_by_keyword("decaymode")[0].value = __decay_mode_lookup[self.DM_model]
\ No newline at end of file
self.parameters_by_keyword("decaymode")[0].value = __decay_mode_lookup[self.DM_model]
......@@ -10,7 +10,7 @@ logger = Logging.logging.getLogger("PowhegControl")
class VBF_ZZ(PowhegV2):
"""
Default Powheg configuration for opposite-sign W-boson pair plus jet pair production through vector boson fusion.
Default Powheg configuration for Z-boson pair plus jet production through vector boson fusion.
Create a configurable object with all applicable Powheg options.
......
......@@ -99,6 +99,7 @@ class W_SMEFT(PowhegV2):
self.add_keyword("par_2gsupp")
self.add_keyword("par_diexp")
self.add_keyword("par_dijexp")
self.add_keyword("parallelstage")
self.add_keyword("pdfreweight")
self.add_keyword("ptsqmin")
self.add_keyword("ptsupp")
......
......@@ -98,6 +98,7 @@ class Z_SMEFT(PowhegV2):
self.add_keyword("par_2gsupp")
self.add_keyword("par_diexp")
self.add_keyword("par_dijexp")
self.add_keyword("parallelstage")
self.add_keyword("pdfreweight")
self.add_keyword("ptsqmin")
self.add_keyword("ptsupp")
......
......@@ -97,6 +97,7 @@ class ttj(PowhegV2):
self.add_keyword("par_fsrtinyy")
self.add_keyword("par_isrtinycsi")
self.add_keyword("par_isrtinyy")
self.add_keyword("parallelstage")
self.add_keyword("pdfreweight")
self.add_keyword("psgen")
self.add_keyword("ptmin_jet", 20.0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment