Skip to content

Commit d6b3301

Browse files
author
Sebastiano Quinto
committed
Updated ggH_DF configs
1 parent 1d0c187 commit d6b3301

File tree

316 files changed

+5610
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+5610
-651
lines changed

HWW/ggH_DF/2022/aliases.py

Lines changed: 37 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
mc_emb = [skey for skey in samples if skey not in ('Fake', 'DATA', 'DATA_Mu', 'DATA_EMu', 'Fake_EG', 'Fake_Mu', 'Fake_EMu')]
1818

1919

20-
# LepCut2l__ele_wp90iso__mu_cut_TightHWW
21-
eleWP = 'wp90iso'
22-
muWP = 'cut_Tight_HWW'
20+
# LepCut2l__ele_cutBased_LooseID_tthMVA_Run3__mu_cut_TightID_pfIsoTight_HWW_tthmva_67
21+
eleWP = 'cutBased_LooseID_tthMVA_Run3'
22+
muWP = 'cut_TightID_pfIsoTight_HWW_tthmva_67'
2323

2424
aliases['LepWPCut'] = {
2525
'expr': 'LepCut2l__ele_'+eleWP+'__mu_'+muWP,
@@ -59,10 +59,13 @@
5959

6060
Tag = 'ele_'+eleWP+'_mu_'+muWP
6161

62-
#aliases["fakeW"] = {
63-
# "expr": f"fakeW_{Tag}_2l0j*(Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 0, 0)<30.0) + fakeW_{Tag}_2l1j*(Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 0, 0)>30.0 && Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 1, 0)<30.0) + fakeW_{Tag}_2l2j*(Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 1, 0)>30.0)",
64-
# 'samples': ['Fake', 'Fake_EG', 'Fake_Mu', 'Fake_EMu']
65-
#}
62+
aliases['fakeW'] = {
63+
'linesToAdd' : [f'#include "{configurations}macros/fake_rate_reader_class.cc"'],
64+
'linesToProcess':[f"ROOT.gInterpreter.Declare('fake_rate_reader fr_reader = fake_rate_reader(\"2022\", \"{eleWP}\", \"{muWP}\", 0.90, 0.80, \"nominal\", 2, \"std\", \"{configurations}\");')"],
65+
'expr': f'fr_reader(Lepton_pdgId, Lepton_pt, Lepton_eta, Lepton_isTightMuon_{muWP}, Lepton_isTightElectron_{eleWP}, Lepton_muonIdx, CleanJet_pt, nCleanJet)',
66+
'samples' : ['Fake']
67+
}
68+
6669
#aliases["fakeWEleUp"] = {
6770
# "expr": f"fakeW_{Tag}_2l0jElUp*(Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 0, 0)<30.0) + fakeW_{Tag}_2l1jElUp*(Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 0, 0)>30.0 && Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 1, 0)<30.0) + fakeW_{Tag}_2l2jElUp*(Alt(CleanJet_pt[abs(CleanJet_eta)<=2.5], 1, 0)>30.0)",
6871
# 'samples':['Fake', 'Fake_EG', 'Fake_Mu', 'Fake_EMu']
@@ -167,7 +170,7 @@
167170
# If this is not the case, swap configurations with the proper path
168171

169172
# path = "your/path"
170-
'''
173+
171174
eff_map_year = '2022' # ['2022', '20222', '2023', '20232']
172175
year = '2022_Summer22'
173176

@@ -177,12 +180,12 @@
177180
if shift != 'central':
178181
btagsf += '_' + shift
179182
aliases[btagsf] = {
180-
'linesToAdd': [f'#include "{configurations}evaluate_btagSF{flavour}.cc"'],
181-
'linesToProcess': [f"ROOT.gInterpreter.Declare('btagSF{flavour} btagSF{flavour}_{shift} = btagSF{flavour}(\"{configurations}bTagEff_2022_ttbar_{bAlgo}_loose.root\", \"{year}\");')"],
183+
'linesToAdd': [f'#include "{configurations}macros/evaluate_btagSF{flavour}.cc"'],
184+
'linesToProcess': [f"ROOT.gInterpreter.Declare('btagSF{flavour} btagSF{flavour}_{shift} = btagSF{flavour}(\"{configurations}fixedWP/bTagEff_{eff_map_year}_ttbar_{bAlgo}_loose.root\", \"{year}\");')"],
182185
'expr': f'btagSF{flavour}_{shift}(CleanJet_pt, CleanJet_eta, CleanJet_jetIdx, nCleanJet, Jet_hadronFlavour, Jet_btag{bAlgo}, "{WP_eval}", "{shift}", "{tagger}")',
183186
'samples' : mc,
184187
}
185-
'''
188+
186189

187190
# B tagging selections and scale factors
188191
aliases['bVeto'] = {
@@ -206,10 +209,10 @@
206209

207210
# CR definition
208211
aliases['topcr'] = {
209-
'expr': 'mtw2 > 30 && mll > 50 && ((zeroJet && !bVeto) || bReq)'
212+
'expr': 'mll > 50 && ((zeroJet && !bVeto) || bReq) && mtw2 > 30'
210213
}
211214
aliases['dycr'] = {
212-
'expr': 'mth < 60 && mll > 30 && mll < 80 && bVeto'
215+
'expr': 'mth < 60 && mll > 30 && mll < 80 && bVeto && mtw2 > 30'
213216
}
214217
aliases['wwcr'] = {
215218
'expr': 'mth > 60 && mtw2 > 30 && mll > 100 && bVeto'
@@ -232,26 +235,26 @@
232235
# Systematic uncertainty variations standard B-tagger
233236

234237

235-
for shift in ['jes','lf','hf','lfstats1','lfstats2','hfstats1','hfstats2','cferr1','cferr2']:
236-
237-
for targ in ['bVeto', 'bReq']:
238-
alias = aliases['%sSF%sup' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ])
239-
#alias['expr'] = alias['expr'].replace('btagSF_deepjet_shape', 'btagSF_deepjet_shape_up_%s' % shift)
240-
alias['expr'] = alias['expr'].replace(f"btagSF_{bSF}_shape", f"btagSF_{bSF}_shape_up_{shift}")
241-
242-
alias = aliases['%sSF%sdown' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ])
243-
#alias['expr'] = alias['expr'].replace('btagSF_deepjet_shape', 'btagSF_deepjet_shape_down_%s' % shift)
244-
alias['expr'] = alias['expr'].replace(f"btagSF_{bSF}_shape", f"btagSF_{bSF}_shape_down_{shift}")
245-
246-
aliases['btagSF%sup' % shift] = {
247-
'expr': aliases['btagSF']['expr'].replace('SF', 'SF' + shift + 'up'),
248-
'samples': mc
249-
}
250-
251-
aliases['btagSF%sdown' % shift] = {
252-
'expr': aliases['btagSF']['expr'].replace('SF', 'SF' + shift + 'down'),
253-
'samples': mc
254-
}
238+
#for shift in ['jes','lf','hf','lfstats1','lfstats2','hfstats1','hfstats2','cferr1','cferr2']:
239+
#
240+
# for targ in ['bVeto', 'bReq']:
241+
# alias = aliases['%sSF%sup' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ])
242+
# #alias['expr'] = alias['expr'].replace('btagSF_deepjet_shape', 'btagSF_deepjet_shape_up_%s' % shift)
243+
# alias['expr'] = alias['expr'].replace(f"btagSF_{bSF}_shape", f"btagSF_{bSF}_shape_up_{shift}")
244+
#
245+
# alias = aliases['%sSF%sdown' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ])
246+
# #alias['expr'] = alias['expr'].replace('btagSF_deepjet_shape', 'btagSF_deepjet_shape_down_%s' % shift)
247+
# alias['expr'] = alias['expr'].replace(f"btagSF_{bSF}_shape", f"btagSF_{bSF}_shape_down_{shift}")
248+
#
249+
# aliases['btagSF%sup' % shift] = {
250+
# 'expr': aliases['btagSF']['expr'].replace('SF', 'SF' + shift + 'up'),
251+
# 'samples': mc
252+
# }
253+
#
254+
# aliases['btagSF%sdown' % shift] = {
255+
# 'expr': aliases['btagSF']['expr'].replace('SF', 'SF' + shift + 'down'),
256+
# 'samples': mc
257+
# }
255258

256259

257260
########################
@@ -262,7 +265,7 @@
262265

263266
# Use this for the usual SF
264267
aliases['SFweight'] = {
265-
'expr': ' * '.join(['SFweight2l', 'LepWPCut', 'LepWPSF','btagSF']),
268+
'expr': ' * '.join(['SFweight2l', 'LepWPCut', 'LepWPSF', 'btagSFbc', 'btagSFlight']),
266269
'samples': mc
267270
}
268271

@@ -283,25 +286,3 @@
283286
'expr': 'LepSF2l__mu_'+muWP+'__Down',
284287
'samples': mc
285288
}
286-
287-
aliases['snn_SigVSBkg'] = {
288-
'linesToAdd': ['#include "/afs/cern.ch/user/s/squinto/private/work/PlotsConfigurationsRun3/HWW/ggH_DF/2022/macros/snn_sigVSbkg.cc"'],
289-
'class': 'snn_SigVSBkg',
290-
'args': 'PV_npvsGood, mll, mth, ptll, drll, dphill, \
291-
Lepton_pt[0], Lepton_pt[1], Lepton_eta[0], Lepton_eta[1], Lepton_phi[0], Lepton_phi[1], \
292-
PuppiMET_pt, Sum(CleanJet_pt>30), \
293-
Alt(CleanJet_pt, 0, -99) - 9999.9*(CleanJet_pt[0]<30), Alt(CleanJet_pt, 1, -99) - 9999.9*(CleanJet_pt[1]<30), \
294-
Alt(CleanJet_eta, 0, -99) - 9999.9*(CleanJet_pt[0]<30), Alt(CleanJet_eta, 1, -99) - 9999.9*(CleanJet_pt[1]<30)',
295-
'afterNuis' : True
296-
}
297-
298-
#aliases['sns_SigVSBkg'] = {
299-
# 'linesToAdd': ['#include "/afs/cern.ch/user/s/squinto/private/work/PlotsConfigurationsRun3/HWW/ggH_DF/2022/macros/sns_sigVSbkg.cc"'],
300-
# 'class': 'sns_SigVSBkg',
301-
# 'args': 'PV_npvsGood, mll, mth, ptll, drll, dphill, \
302-
# Lepton_pt[0], Lepton_pt[1], Lepton_eta[0], Lepton_eta[1], Lepton_phi[0], Lepton_phi[1], \
303-
# PuppiMET_pt, Sum(CleanJet_pt>30), \
304-
# Alt(CleanJet_pt, 0, -99) - 9999.9*(CleanJet_pt[0]<30), Alt(CleanJet_pt, 1, -99) - 9999.9*(CleanJet_pt[1]<30), \
305-
# Alt(CleanJet_eta, 0, -99) - 9999.9*(CleanJet_pt[0]<30), Alt(CleanJet_eta, 1, -99) - 9999.9*(CleanJet_pt[1]<30)',
306-
# 'afterNuis' : True
307-
#}

HWW/ggH_DF/2022/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys,os
22

33
#: tag used to identify the configuration folder version
4-
tag = "ggH_DF_2022_SNS"
4+
tag = "ggH_DF_2022_talk_ttHMVA"
55

66
#: file to use as runner script, default uses mkShapesRDF.shapeAnalysis.runner, otherwise specify path to script
77
runnerFile = "default"

HWW/ggH_DF/2022/cuts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
'mp_1j_pt2lt20' : ' Lepton_pdgId[0] > 0 && Lepton_pt[1]<20 && oneJet && Alt(CleanJet_pt,1,0)<30',
3535
#
3636
'2j' : ' (mjj<65 || mjj>105) && mjj<120 && multiJet',
37-
#'inc' : '(mjj<65 || mjj>105)',
3837
}
3938
}
4039

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)