Skip to content

Commit

Permalink
merging master
Browse files Browse the repository at this point in the history
  • Loading branch information
aalvesan committed Feb 11, 2025
2 parents 808cd34 + 3f3f7fa commit e767eef
Show file tree
Hide file tree
Showing 8 changed files with 672 additions and 576 deletions.
29 changes: 19 additions & 10 deletions hbt/config/configs_hbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,7 @@ def if_not_era(*, values: list[str | None] | None = None, **kwargs) -> list[str]
"dilep": (dilep := [f"dilep_{var}" for var in ["energy", "mass", "pt", "eta", "phi", "dr"]]),
"dijet": (dijet := [f"dijet_{var}" for var in ["energy", "mass", "pt", "eta", "phi", "dr"]]),
"default": [
*dijet,
*dilep,
*hh,
*dijet, *dilep, *hh,
"mu1_pt", "mu1_eta", "mu1_phi", "mu2_pt", "mu2_eta", "mu2_phi",
"e1_pt", "e1_eta", "e1_phi", "e2_pt", "e2_eta", "e2_phi",
"tau1_pt", "tau1_eta", "tau1_phi", "tau2_pt", "tau2_eta", "tau2_phi",
Expand All @@ -565,9 +563,7 @@ def if_not_era(*, values: list[str | None] | None = None, **kwargs) -> list[str]

# shift groups for conveniently looping over certain shifts
# (used during plotting)
cfg.x.shift_groups = {

}
cfg.x.shift_groups = {}

# selector step groups for conveniently looping over certain steps
# (used in cutflow tasks)
Expand Down Expand Up @@ -1390,7 +1386,7 @@ def add_external(name, value):
}

################################################################################################
# external configs: channels, categories, met filters, triggers, variables, hist hooks
# external configs: channels, categories, met filters, triggers, variables
################################################################################################

# channels
Expand Down Expand Up @@ -1432,9 +1428,22 @@ def add_external(name, value):
else:
raise False

# add hist hooks
from hbt.config.hist_hooks import add_hist_hooks
add_hist_hooks(cfg)
################################################################################################
# hist hooks
################################################################################################

cfg.x.hist_hooks = DotDict()

# simple blinding
cfg.x.hist_hooks.blind = lambda task, hists: {p: h for p, h in hists.items() if not p.is_data}

# qcd estimation
from hbt.hist_hooks.qcd import add_hooks as add_qcd_hooks
add_qcd_hooks(cfg)

# binning
from hbt.hist_hooks.binning import add_hooks as add_binning_hooks
add_binning_hooks(cfg)

################################################################################################
# LFN settings
Expand Down
513 changes: 0 additions & 513 deletions hbt/config/hist_hooks.py

This file was deleted.

1 change: 1 addition & 0 deletions hbt/hist_hooks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# coding: utf-8
Loading

0 comments on commit e767eef

Please # to comment.