Skip to content

Commit

Permalink
Small changes for photon channels
Browse files Browse the repository at this point in the history
  • Loading branch information
bryates committed Nov 19, 2024
1 parent b85714b commit 4c77311
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions topeft/modules/datacard_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class DatacardMaker():
],
"tWZ": ["TWZToLL_"],
#"convs": ["TTGamma_"],
"ttA": ["TTGamma_"],
"fakes": ["nonprompt"],
"charge_flips_": ["flips"],
"data_obs": ["data"],
Expand All @@ -160,6 +159,7 @@ class DatacardMaker():
"TTTo2L2Nu_",
],
"ttlnu_": ["ttlnuJet_"],
"ttA_": ["TTGamma_"],
}

# Controls how we rebin the dense axis of the corresponding distribution
Expand Down Expand Up @@ -265,7 +265,9 @@ def get_jet_mults(cls,s):
@classmethod
def get_lep_mult(cls,s):
""" Returns the lepton multiplicity based on the string passed to it."""
if s.startswith("2l"):
if s.startswith("2los_"):
return 2.3 # Hack because photon 2los starts at 3 jets
if s.startswith("2lss_"):
return 2
elif s.startswith("3l_"):
return 3
Expand Down Expand Up @@ -316,6 +318,7 @@ def __init__(self,pkl_path,**kwargs):
"TTJets",
"WJetsToLNu",
"TTGJets", # This is the old low stats convs process, new one should be TTGamma
"TTGamma_central",

# "TTGamma",
# "WWTo2L2Nu","ZZTo4L",#"WZTo3LNu",
Expand Down Expand Up @@ -786,6 +789,8 @@ def analyze(self,km_dist,ch,selected_wcs, crop_negative_bins, wcs_dict):
num_l = self.get_lep_mult(ch)
if num_l == 2 or num_l == 4:
num_b = 2
if num_l == 2.3:
num_b = 3

outf_root_name = self.FNAME_TEMPLATE.format(cat=ch,kmvar=km_dist,ext="root")

Expand Down

0 comments on commit 4c77311

Please sign in to comment.