Skip to content

Commit

Permalink
Use tec calibrator from cf.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Jul 18, 2024
1 parent 5ade52a commit 5fd5a37
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 222 deletions.
4 changes: 2 additions & 2 deletions hbt/calibration/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
from columnflow.calibration import Calibrator, calibrator
from columnflow.calibration.cms.met import met_phi
from columnflow.calibration.cms.jets import jec, jec_nominal, jer
from columnflow.calibration.cms.tau import tec, tec_nominal
from columnflow.production.cms.mc_weight import mc_weight
from columnflow.production.cms.seeds import deterministic_seeds
from columnflow.util import maybe_import

from hbt.util import IF_RUN_2
from hbt.calibration.tau import tec, tec_nominal


ak = maybe_import("awkward")


# derive calibrators to add settings
jec_full = jec.derive("jec_full", cls_dict={"mc_only": True, "nominal_only": True})

Expand Down
211 changes: 0 additions & 211 deletions hbt/calibration/tau.py

This file was deleted.

14 changes: 8 additions & 6 deletions hbt/config/configs_hbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,20 +452,22 @@ def if_era(
# tau settings
################################################################################################

# TODO: combine with tau_tagger info for tec
cfg.x.tau_energy_calibration = ("Tight", "Tight")

# name of the deep tau tagger
# (used in the tec calibrator)
# tau tagger name
# (needed by TECConfig below as well as tau selection)
if run == 2:
# TODO: still correct?
# TODO: still correct? what about 2p5?
cfg.x.tau_tagger = "DeepTau2017v2p1"
elif run == 3:
# https://twiki.cern.ch/twiki/bin/view/CMS/TauIDRecommendationForRun3
cfg.x.tau_tagger = "DeepTau2018v2p5"
else:
assert False

# tec config
from columnflow.calibration.cms.tau import TECConfig
corrector_kwargs = {"wp": "Tight", "wp_VSe": "Tight"} if run == 3 else {}
cfg.x.tec = TECConfig(tagger=cfg.x.tau_tagger, corrector_kwargs=corrector_kwargs)

# tau ID working points
if campaign.x.version < 10:
cfg.x.tau_id_working_points = DotDict.wrap({
Expand Down
4 changes: 2 additions & 2 deletions law.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ default_analysis: hbt.config.analysis_hbt.analysis_hbt
default_config: run3_2022_preEE
default_dataset: hh_ggf_hbb_htt_kl1_kt1_powheg

production_modules: columnflow.production.{categories,normalization,processes}, columnflow.production.cms.{btag,electron,mc_weight,muon,pdf,pileup,scale,seeds,gen_top_decay}, hbt.production.{default,weights,features,btag,tau,minimal,hh_mass,res_pdnn}
calibration_modules: columnflow.calibration.cms.{jets,met}, hbt.calibration.{default,tau,fake_triggers}
calibration_modules: columnflow.calibration.cms.{jets,met,tau}, hbt.calibration.{default,fake_triggers}
selection_modules: columnflow.selection.empty, columnflow.selection.cms.{json_filter,met_filters}, hbt.selection.{default,lepton,trigger}
production_modules: columnflow.production.{categories,normalization,processes}, columnflow.production.cms.{btag,electron,mc_weight,muon,pdf,pileup,scale,seeds,gen_top_decay}, hbt.production.{default,weights,features,btag,tau,minimal,hh_mass,res_pdnn}
categorization_modules: hbt.categorization.default
weight_production_modules: columnflow.weight.{empty,all_weights}, hbt.weight.default
ml_modules: hbt.ml.test
Expand Down

0 comments on commit 5fd5a37

Please sign in to comment.