-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into plot_postfit_shapes
- Loading branch information
Showing
50 changed files
with
1,896 additions
and
1,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
Creation and modification of processes in the HH -> bbWW analysis. | ||
NOTE: it is crucial to modify processes before the campaign is created. Otherwise, | ||
the changes will not be reflected in the campaign and there will be inconsistencies. | ||
""" | ||
|
||
# import order as od | ||
|
||
|
||
from hbw.config.processes import create_parent_process | ||
from hbw.config.styling import color_palette | ||
from cmsdb.util import add_decay_process | ||
|
||
|
||
def modify_cmsdb_processes(): | ||
from cmsdb.processes import ( | ||
qcd_mu, qcd_em, qcd_bctoe, | ||
tt, ttv, st, w_lnu, vv, h, | ||
dy, dy_m4to10, dy_m10to50, dy_m50toinf, dy_m50toinf_0j, dy_m50toinf_1j, dy_m50toinf_2j, | ||
) | ||
|
||
qcd_mu.label = "QCD Muon enriched" | ||
qcd_ele = create_parent_process( | ||
[qcd_em, qcd_bctoe], | ||
name="qcd_ele", | ||
id=31199, | ||
label="QCD Electron enriched", | ||
) | ||
|
||
v_lep = create_parent_process( | ||
[w_lnu, dy], | ||
name="v_lep", | ||
id=64575573, # random number | ||
label="W and DY", | ||
) | ||
|
||
t_bkg = create_parent_process( | ||
[st, tt, ttv], | ||
name="t_bkg", | ||
id=97842611, # random number | ||
label="tt + st", | ||
) | ||
|
||
background = create_parent_process( # noqa: F841 | ||
[t_bkg, v_lep, vv, w_lnu, h, qcd_ele, qcd_mu], | ||
name="background", | ||
id=99999, | ||
label="background", | ||
color=color_palette["blue"], | ||
) | ||
|
||
decay_map = { | ||
"lf": { | ||
"name": "lf", | ||
"id": 50, | ||
"label": "(lf)", | ||
"br": -1, | ||
}, | ||
"hf": { | ||
"name": "hf", | ||
"id": 60, | ||
"label": "(hf)", | ||
"br": -1, | ||
}, | ||
} | ||
|
||
for dy_proc_inst in ( | ||
dy, dy_m4to10, dy_m10to50, dy_m50toinf, dy_m50toinf_0j, dy_m50toinf_1j, dy_m50toinf_2j, | ||
): | ||
add_production_mode_parent = dy_proc_inst.name != "dy" | ||
for flavour in ("hf", "lf"): | ||
# the 'add_decay_process' function helps us to create all parent-daughter relationships | ||
add_decay_process( | ||
dy_proc_inst, | ||
decay_map[flavour], | ||
add_production_mode_parent=add_production_mode_parent, | ||
name_func=lambda parent_name, decay_name: f"{parent_name}_{decay_name}", | ||
label_func=lambda parent_label, decay_label: f"{parent_label} {decay_label}", | ||
xsecs=None, | ||
aux={"flavour": flavour}, | ||
) |
Oops, something went wrong.