Skip to content

Commit

Permalink
Merge pull request #354 from jeyserma/main
Browse files Browse the repository at this point in the history
Add extra herapdf20 uncertainties
  • Loading branch information
bendavid authored Dec 1, 2023
2 parents bcccc5c + c2adfa6 commit 65858c0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions utilities/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def common_parser(for_reco_highPU=False):
class PDFFilterAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
# Filter unique values, but keep first item in its position
if "herapdf20" in values:
values.append("herapdf20ext")
unique_values = [values[0], *set([x for x in values[1:]])]
setattr(namespace, self.dest, unique_values)

Expand Down
12 changes: 12 additions & 0 deletions wremnants/combine_theory_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,18 @@ def add_pdf_uncertainty(self, action=None, from_corr=False, scale=1):
skipEntries=[{pdf_ax : "^pdf0[a-z]*"}],
**pdf_args
)
if pdfName == 'pdfHERAPDF20':
self.card_tool.addSystematic(pdf_hist+'ext',
skipEntries=[{pdf_ax : "^pdf0[a-z]*"}],
processes=['wtau_samples', 'single_v_nonsig_samples'] if self.skipFromSignal else ['single_v_samples'],
mirror=True,
group=pdfName,
splitGroup={f"{pdfName}NoAlphaS": '.*'},
passToFakes=self.propagate_to_fakes,
actionMap=action,
scale=pdfInfo.get("scale", 1)*scale,
systAxes=[pdf_ax],
)

asRange = pdfInfo['alphasRange']
asname = f"{pdfName}alphaS{asRange}" if not from_corr else pdf_hist.replace("Vars", "_pdfas")
Expand Down
10 changes: 9 additions & 1 deletion wremnants/theory_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,17 @@
"alphas" : ["LHEPdfWeightAltSet20[0]", "LHEPdfWeightAltSet22[0]", "LHEPdfWeightAltSet23[0]"], # alphas 116-120
"alphasRange" : "002",
},
"herapdf20ext" : {
"name" : "pdfHERAPDF20ext",
"branch" : "LHEPdfWeightAltSet21",
"combine" : "symHessian",
"entries" : 14,
"alphas" : ["LHEPdfWeightAltSet20[0]", "LHEPdfWeightAltSet22[0]", "LHEPdfWeightAltSet23[0]"], # dummy AS
"alphasRange" : "002",
},
}


only_central_pdf_datasets = [
"Wplusmunu_bugfix",
"Wminusmunu_bugfix",
Expand Down Expand Up @@ -559,4 +568,3 @@ def pdfBugfixMSHT20(df , tensorPDFName):
f"auto& res = {tensorPDFName};"
f"res(15) = {tensorPDFName}(0) - ({tensorPDFName}(15) - {tensorPDFName}(0));"
"return res")

0 comments on commit 65858c0

Please sign in to comment.