Skip to content
Snippets Groups Projects

Add HH model variations

Merged Marcel Rieger requested to merge model_samples_check into master
7 files
+ 261
86
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 138
38
@@ -292,7 +292,7 @@ class HHModel(PhysicsModel):
couplings_in_expr = []
if 'kl' in s_expr: couplings_in_expr.append('kl')
if 'kt' in s_expr: couplings_in_expr.append('kt')
# no constant expressions are expected
if len(couplings_in_expr) == 0:
raise RuntimeError('GGF HH : scaling expression has no coefficients')
@@ -426,51 +426,128 @@ class HHModel(PhysicsModel):
#########################################
# ggf samples with keys (kl, kt), ordered by kl
ggf_samples = OrderedDict([
((0, 1), GGFHHSample(0, 1, val_xs=0.06007, label="ggHH_kl_0_kt_1")),
((1, 1), GGFHHSample(1, 1, val_xs=0.02675, label="ggHH_kl_1_kt_1")),
((2.45, 1), GGFHHSample(2.45, 1, val_xs=0.01133, label="ggHH_kl_2p45_kt_1")),
((5, 1), GGFHHSample(5, 1, val_xs=0.07903, label="ggHH_kl_5_kt_1")),
# GGF : val_kl, val_kt
GGF_sample_list = [
GGFHHSample(1,1, val_xs = 0.02675, label = 'ggHH_kl_1_kt_1' ),
# GGFHHSample(0,1, val_xs = 0.06007, label = 'ggHH_kl_0_kt_1' ),
GGFHHSample(5,1, val_xs = 0.07903, label = 'ggHH_kl_5_kt_1' ),
GGFHHSample(2.45,1, val_xs = 0.01133, label = 'ggHH_kl_2p45_kt_1' ),
]
])
# VBF : val_CV, val_C2V, val_kl
VBF_sample_list = [
VBFHHSample(1,1,1, val_xs = 0.00054/(0.3364), label = 'qqHH_CV_1_C2V_1_kl_1' ),
VBFHHSample(1,2,1, val_xs = 0.00472/(0.3364), label = 'qqHH_CV_1_C2V_2_kl_1' ),
VBFHHSample(1,1,2, val_xs = 0.00044/(0.3364), label = 'qqHH_CV_1_C2V_1_kl_2' ),
VBFHHSample(1,1,0, val_xs = 0.00145/(0.3364), label = 'qqHH_CV_1_C2V_1_kl_0' ),
VBFHHSample(0.5,1,1, val_xs = 0.00353/(0.3364), label = 'qqHH_CV_0p5_C2V_1_kl_1'),
VBFHHSample(1.5,1,1, val_xs = 0.02149/(0.3364), label = 'qqHH_CV_1p5_C2V_1_kl_1'),
]
# vbf samples with keys (CV, C2V, kl), SM point first, then ordered by kl, then C2V, then CV
vbf_samples = OrderedDict([
((1, 1, 1), VBFHHSample(1, 1, 1, val_xs=0.00054 / 0.3364, label="qqHH_CV_1_C2V_1_kl_1")),
((1, 1, 0), VBFHHSample(1, 1, 0, val_xs=0.00145 / 0.3364, label="qqHH_CV_1_C2V_1_kl_0")),
((1, 1, 2), VBFHHSample(1, 1, 2, val_xs=0.00044 / 0.3364, label="qqHH_CV_1_C2V_1_kl_2")),
((1, 0, 1), VBFHHSample(1, 0, 1, val_xs=0.00880 / 0.3364, label="qqHH_CV_1_C2V_0_kl_1")),
((1, 2, 1), VBFHHSample(1, 2, 1, val_xs=0.00472 / 0.3364, label="qqHH_CV_1_C2V_2_kl_1")),
((0.5, 1, 1), VBFHHSample(0.5, 1, 1, val_xs=0.00353 / 0.3364, label="qqHH_CV_0p5_C2V_1_kl_1")),
((1.5, 1, 1), VBFHHSample(1.5, 1, 1, val_xs=0.02149 / 0.3364, label="qqHH_CV_1p5_C2V_1_kl_1")),
])
HHdefault = HHModel(
ggf_sample_list = GGF_sample_list,
vbf_sample_list = VBF_sample_list,
name = 'HHdefault'
)
#bbZZ_model = False
def get_ggf_samples(keys):
"""
Returns a list of :py:class:`GGFHHSample` instances mapped to certain *keys* in the ordered
*ggf_samples* dictionary above. A key can either be a tuple of (kl, kt) values as used in dict,
or an index. Example:
#if(bbZZ_model):
.. code-block:: python
# GGF_sample_list_bbZZ = [
# GGFHHSample(1,1, val_xs = 0.02675, label = 'ggHH_hbbhzz_process' ),
# GGFHHSample(2,1, val_xs = 0.01238, label = 'klambda2_process' ),
#GGFHHSample(0,1, val_xs = 0.06007, label = 'klambda0_process' ),
# GGFHHSample(5,1, val_xs = 0.07903, label = 'klambda5_process' ),
# GGFHHSample(2.45,1, val_xs = 0.01133, label = 'ggHH_kl_2p45_kt_1' ),
# ]
get_ggf_samples([2, (5, 1)])
# -> [GGFHHSample:ggHH_kl_2p45_kt_1, GGFHHSample:ggHH_kl_5_kt_1]
"""
keys = [
(key if isinstance(key, tuple) else ggf_samples.keys()[key])
for key in keys
]
return [ggf_samples[key] for key in keys]
# HHbbZZ4l = HHModel(
# ggf_sample_list = GGF_sample_list_bbZZ,
# vbf_sample_list = VBF_sample_list,
# name = 'HH_bbZZ_default'
# )
# f = GGFHHFormula(GGF_sample_list)
# f = VBFHHFormula(VBF_sample_list)
def get_vbf_samples(keys):
"""
Returns a list of :py:class:`VBFHHSample` instances mapped to certain *keys* in the ordered
*vbf_samples* dictionary above. A key can either be a tuple of (CV, C2V, kl) values as used in
dict, or an index. Example:
.. code-block:: python
get_vbf_samples([2, (1, 2, 1)])
# -> [VBFHHSample:qqHH_CV_1_C2V_1_kl_2, VBFHHSample:qqHH_CV_1_C2V_2_kl_1]
"""
keys = [
(key if isinstance(key, tuple) else vbf_samples.keys()[key])
for key in keys
]
return [vbf_samples[key] for key in keys]
def create_model(name, skip_ggf=None, skip_vbf=None):
"""
Returns a new :py:class:`HHModel` instance named *name*. Its ggf and vbf sample lists are
using all availabe samples except those defined in *skip_ggf* and *skip_vbf*, respectively,
through :py:func:`get_ggf_samples` and :py:func:`get_vbf_samples`. The order of passed keys to
be skipped does not matter.
"""
# get all use sample keys
ggf_keys = list(ggf_samples.keys())
vbf_keys = list(vbf_samples.keys())
for key in skip_ggf or []:
ggf_keys.remove(key)
for key in skip_vbf or []:
vbf_keys.remove(key)
# create the return the model
return HHModel(
ggf_sample_list=get_ggf_samples(ggf_keys),
vbf_sample_list=get_vbf_samples(vbf_keys),
name=name,
)
# standard of models
model_all = create_model("model_all")
model_default = create_model("model_default", skip_ggf=[(0, 1)], skip_vbf=[(1, 0, 1)])
model_bbgg = create_model("model_bbgg", skip_ggf=[(0, 1)], skip_vbf=[(0.5, 1, 1)])
# ggf test models
model_no_ggf_kl0 = create_model("model_no_ggf_kl0", skip_ggf=[(0, 1)], skip_vbf=[(1, 0, 1)])
model_no_ggf_kl1 = create_model("model_no_ggf_kl1", skip_ggf=[(1, 1)], skip_vbf=[(1, 0, 1)])
model_no_ggf_kl2p45 = create_model("model_no_ggf_kl2p45", skip_ggf=[(2.45, 1)], skip_vbf=[(1, 0, 1)])
model_no_ggf_kl5 = create_model("model_no_ggf_kl5", skip_ggf=[(5, 1)], skip_vbf=[(1, 0, 1)])
# vbf test models
model_no_vbf_sm = create_model("model_no_vbf_sm", skip_ggf=[(0, 1)], skip_vbf=[(1, 1, 1)])
model_no_vbf_kl0 = create_model("model_no_vbf_kl0", skip_ggf=[(0, 1)], skip_vbf=[(1, 1, 0)])
model_no_vbf_kl2 = create_model("model_no_vbf_kl2", skip_ggf=[(0, 1)], skip_vbf=[(1, 1, 2)])
model_no_vbf_C2V0 = create_model("model_no_vbf_C2V0", skip_ggf=[(0, 1)], skip_vbf=[(1, 0, 1)])
model_no_vbf_C2V2 = create_model("model_no_vbf_C2V2", skip_ggf=[(0, 1)], skip_vbf=[(1, 2, 1)])
model_no_vbf_CV0p5 = create_model("model_no_vbf_CV0p5", skip_ggf=[(0, 1)], skip_vbf=[(0.5, 1, 1)])
model_no_vbf_CV1p5 = create_model("model_no_vbf_CV1p5", skip_ggf=[(0, 1)], skip_vbf=[(1.5, 1, 1)])
# legacy objects for development
GGF_sample_list = [
# GGFHHSample(0, 1, val_xs=0.06007, label="ggHH_kl_0_kt_1"),
GGFHHSample(1, 1, val_xs=0.02675, label="ggHH_kl_1_kt_1"),
GGFHHSample(2.45, 1, val_xs=0.01133, label="ggHH_kl_2p45_kt_1"),
GGFHHSample(5, 1, val_xs=0.07903, label="ggHH_kl_5_kt_1"),
]
VBF_sample_list = [
VBFHHSample(1, 1, 1, val_xs=0.00054 / 0.3364, label="qqHH_CV_1_C2V_1_kl_1"),
VBFHHSample(1, 1, 0, val_xs=0.00145 / 0.3364, label="qqHH_CV_1_C2V_1_kl_0"),
VBFHHSample(1, 1, 2, val_xs=0.00044 / 0.3364, label="qqHH_CV_1_C2V_1_kl_2"),
# VBFHHSample(1, 0, 1, val_xs=0.00880 / 0.3364, label="qqHH_CV_1_C2V_0_kl_1"),
VBFHHSample(1, 2, 1, val_xs=0.00472 / 0.3364, label="qqHH_CV_1_C2V_2_kl_1"),
VBFHHSample(0.5, 1, 1, val_xs=0.00353 / 0.3364, label="qqHH_CV_0p5_C2V_1_kl_1"),
VBFHHSample(1.5, 1, 1, val_xs=0.02149 / 0.3364, label="qqHH_CV_1p5_C2V_1_kl_1"),
]
HHdefault = HHModel(
ggf_sample_list=GGF_sample_list,
vbf_sample_list=VBF_sample_list,
name="HHdefault",
)
def create_ggf_xsec_func(formula=None, nnlo=True):
"""
@@ -543,3 +620,26 @@ get_ggf_xsec = create_ggf_xsec_func()
#: Default function for getting VBF cross sections using the formula of the HHdefault model.
get_vbf_xsec = create_vbf_xsec_func()
# debug
#bbZZ_model = False
#if(bbZZ_model):
# GGF_sample_list_bbZZ = [
# GGFHHSample(1,1, val_xs = 0.02675, label = 'ggHH_hbbhzz_process' ),
# GGFHHSample(2,1, val_xs = 0.01238, label = 'klambda2_process' ),
#GGFHHSample(0,1, val_xs = 0.06007, label = 'klambda0_process' ),
# GGFHHSample(5,1, val_xs = 0.07903, label = 'klambda5_process' ),
# GGFHHSample(2.45,1, val_xs = 0.01133, label = 'ggHH_kl_2p45_kt_1' ),
# ]
# HHbbZZ4l = HHModel(
# ggf_sample_list = GGF_sample_list_bbZZ,
# vbf_sample_list = VBF_sample_list,
# name = 'HH_bbZZ_default'
# )
# f = GGFHHFormula(GGF_sample_list)
# f = VBFHHFormula(VBF_sample_list)
Loading