Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle SMEFTsim topU3l <-> dim6top rotations #458

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions topeft/modules/datacard_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import re
import json
import yaml
import time

from collections import defaultdict
Expand Down Expand Up @@ -306,6 +307,26 @@
with open(topeft_path("params/wc_ranges.json"), "r") as wc_ranges_json:
self.wc_ranges = json.load(wc_ranges_json)

with open(topeft_path("params/SMEFTsim-topU3l_dim6top.yml")) as f:
self.rotate = yaml.load(f,Loader=yaml.CLoader)
for k,v in self.rotate.items():
if isinstance(v, str):
if "CW" in v or "SW" in v:
v = eval(v.replace("{CW}", str(self.rotate["CW"])).replace("{SW}", str(self.rotate["SW"])))
self.rotate[k] = v
elif isinstance(v, list):
for i,vv in enumerate(v):
if "CW" in vv or "SW" in vv:
v[i] = vv.replace("{CW}", str(self.rotate["CW"])).replace("{SW}", str(self.rotate["SW"]))
wcs = v[1]
v = v[0]
wcs = {wc: wc+"[0, " + str(self.wc_ranges[wc][0]) + ", " + str(self.wc_ranges[wc][1]) + "]" for wc in wcs}
v = v.format(**wcs)
self.rotate[k] = v
if isinstance(v, str) and v in self.wc_ranges:
v = v.replace(v, v+"[0, " + str(self.wc_ranges[v][0]) + ", " + str(self.wc_ranges[v][1]) + "]")
self.rotate[k] = v

if self.year_lst:
for yr in self.year_lst:
if not yr in self.YEARS:
Expand Down Expand Up @@ -788,6 +809,8 @@
return scalings_json

def format_wc(self,wcname):
if wcname in self.rotate:
return self.rotate[wcname]

Check warning on line 813 in topeft/modules/datacard_tools.py

View check run for this annotation

Codecov / codecov/patch

topeft/modules/datacard_tools.py#L813

Added line #L813 was not covered by tests
lo, hi = self.wc_ranges[wcname]
return "%s[0,%.1f,%.1f]" % (wcname, lo, hi)

Expand Down
23 changes: 23 additions & 0 deletions topeft/params/SMEFTsim-topU3l_dim6top.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Weinberg angle for rotating ctW,ctB <-> ctW,ctZ (assuming cHWB=0)
"CW": 0.88136 # PDG W / Z mass ratio
"SW": "np.sqrt(1 - np.square({CW}))" # eval in python

# SMEFTsim j <-> dim6top q
"ctj1": "ctq1"
"cQj31": "cQq13"
"ctj8": "ctq8"
"cQj11": "cQq11"
"cQj18": "cQq81"
"cQj38": "cQq83"

"cQQ1": ["expr::SEMFTsim_cQQ1('0.5 * @0', {cQQ1})", ["cQQ1"]]
"ctt": "ctt1"

# ctG relative minus sign
"ctGRe": ["expr::ctGRe('-1 * @0', {ctG})", ["ctG"]]
"ctGIm": ["expr::ctGIm('-1 * @0', {ctG})", ["ctG"]]

# ctW,ctB <-> ctW,ctZ
"ctWRe": ["expr::ctWRe('-1 * @0', {ctW})", ["ctW"]]
"ctBRe": ["expr::ctBRe('@0 / {SW} - @1 * {CW}/{SW} ', {ctZ}, {ctW})", ["ctZ", "ctW"]]
"ctBRe": ["expr::ctBRe('@0 / {SW} - @1 * {CW}/{SW} ', {ctZ}, {ctW})", ["ctZ", "ctW"]] # {ctZ}/SW - {ctW}/TW (TW = tan Weinberg angle)
20 changes: 19 additions & 1 deletion topeft/params/wc_ranges.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"cpt": [-15.0, 15.0],
"cptb": [-9.0, 9.0],
"ctG": [-0.8, 0.8],
"ctGI": [-100, 100],
"ctW": [-1.5, 1.5],
"ctZ": [-2.0, 2.0],
"ctei": [-4.0, 4.0],
Expand All @@ -24,5 +25,22 @@
"ctp": [-15.0, 40.0],
"ctq1": [-0.6, 0.6],
"ctq8": [-1.4, 1.4],
"ctt1": [-2.6, 2.6]
"ctt1": [-2.6, 2.6],

"cQd1": [-100, 100],
"ctj1": [-100, 100],
"cQj31": [-100, 100],
"ctj8": [-100, 100],
"ctd1": [-100, 100],
"ctd8": [-100, 100],
"ctGRe": [-100, 100],
"ctGIm": [-100, 100],
"cQj11": [-100, 100],
"cQj18": [-100, 100],
"ctu8": [-100, 100],
"cQd8": [-100, 100],
"ctu1": [-100, 100],
"cQu1": [-100, 100],
"cQj38": [-100, 100],
"cQu8": [-100, 100]
}
Loading