Skip to content

Commit ee9ee58

Browse files
committed
updating nuisance scheme to include fake rate EWK subtraction uncertainty
1 parent 6481b5f commit ee9ee58

File tree

23 files changed

+905
-1356
lines changed

23 files changed

+905
-1356
lines changed

WH_chargeAsymmetry/UL/2016HIPM_v9/WH3l/aliases.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,32 @@
134134
'samples' : ['Fake']
135135
}
136136

137+
aliases['fakeWEWKEleUp'] = {
138+
'linesToAdd' : [f'#include "{configurations}/macros/fake_rate_reader_class.cc"'],
139+
'linesToProcess' : [f"ROOT.gInterpreter.Declare('fake_rate_reader fr_reader_EWKEleUp = fake_rate_reader(\"2016_HIPM\", \"90\", \"82\", 0.90, 0.82, \"EWKEleUp\", 3, \"std\", \"{configurations}\");')"],
140+
'expr' : 'fr_reader_EWKEleUp(Lepton_pdgId, Lepton_conept, Lepton_eta, Lepton_isTightMuon_cut_Tight80x, Lepton_isTightElectron_mvaFall17V2Iso_WP90, Lepton_mvaTTH_UL, Muon_mvaTTH, Lepton_muonIdx, CleanJet_pt, nCleanJet)',
141+
'samples' : ['Fake']
142+
}
143+
aliases['fakeWEWKEleDown'] = {
144+
'linesToAdd' : [f'#include "{configurations}/macros/fake_rate_reader_class.cc"'],
145+
'linesToProcess' : [f"ROOT.gInterpreter.Declare('fake_rate_reader fr_reader_EWKEleDown = fake_rate_reader(\"2016_HIPM\", \"90\", \"82\", 0.90, 0.82, \"EWKEleDown\", 3, \"std\", \"{configurations}\");')"],
146+
'expr' : 'fr_reader_EWKEleDown(Lepton_pdgId, Lepton_conept, Lepton_eta, Lepton_isTightMuon_cut_Tight80x, Lepton_isTightElectron_mvaFall17V2Iso_WP90, Lepton_mvaTTH_UL, Muon_mvaTTH, Lepton_muonIdx, CleanJet_pt, nCleanJet)',
147+
'samples' : ['Fake']
148+
}
149+
150+
aliases['fakeWEWKMuUp'] = {
151+
'linesToAdd' : [f'#include "{configurations}/macros/fake_rate_reader_class.cc"'],
152+
'linesToProcess' : [f"ROOT.gInterpreter.Declare('fake_rate_reader fr_reader_EWKMuUp = fake_rate_reader(\"2016_HIPM\", \"90\", \"82\", 0.90, 0.82, \"EWKMuUp\", 3, \"std\", \"{configurations}\");')"],
153+
'expr' : 'fr_reader_EWKMuUp(Lepton_pdgId, Lepton_conept, Lepton_eta, Lepton_isTightMuon_cut_Tight80x, Lepton_isTightElectron_mvaFall17V2Iso_WP90, Lepton_mvaTTH_UL, Muon_mvaTTH, Lepton_muonIdx, CleanJet_pt, nCleanJet)',
154+
'samples' : ['Fake']
155+
}
156+
aliases['fakeWEWKMuDown'] = {
157+
'linesToAdd' : [f'#include "{configurations}/macros/fake_rate_reader_class.cc"'],
158+
'linesToProcess' : [f"ROOT.gInterpreter.Declare('fake_rate_reader fr_reader_EWKMuDown = fake_rate_reader(\"2016_HIPM\", \"90\", \"82\", 0.90, 0.82, \"EWKMuDown\", 3, \"std\", \"{configurations}\");')"],
159+
'expr' : 'fr_reader_EWKMuDown(Lepton_pdgId, Lepton_conept, Lepton_eta, Lepton_isTightMuon_cut_Tight80x, Lepton_isTightElectron_mvaFall17V2Iso_WP90, Lepton_mvaTTH_UL, Muon_mvaTTH, Lepton_muonIdx, CleanJet_pt, nCleanJet)',
160+
'samples' : ['Fake']
161+
}
162+
137163
# No jet with pt > 30 GeV
138164
aliases['zeroJet'] = {
139165
'expr' : 'Alt(CleanJet_pt, 0, 0) < 30.'

WH_chargeAsymmetry/UL/2016HIPM_v9/WH3l/nuisances.py

Lines changed: 85 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def makeMCDirectory(var=''):
6161

6262
# # Overall 30% normalization
6363
# nuisances['fake_syst_0j'] = {
64-
# 'name' : 'CMS_WH_hww_fake_syst_0j_2016',
64+
# 'name' : 'CMS_WH_hww_fake_syst_0j_2016HIPM',
6565
# 'kind' : 'weight',
6666
# 'type' : 'lnN',
6767
# 'samples' : {
@@ -77,7 +77,7 @@ def makeMCDirectory(var=''):
7777
# }
7878

7979
nuisances['fake_syst_2j'] = {
80-
'name' : 'CMS_WH_hww_fake_syst_2j_2016',
80+
'name' : 'CMS_WH_hww_fake_syst_2j_2016HIPM',
8181
'kind' : 'weight',
8282
'type' : 'lnN',
8383
'samples' : {
@@ -87,7 +87,7 @@ def makeMCDirectory(var=''):
8787
}
8888

8989
nuisances['fake_syst_1j'] = {
90-
'name' : 'CMS_WH_hww_fake_syst_1j_2016',
90+
'name' : 'CMS_WH_hww_fake_syst_1j_2016HIPM',
9191
'kind' : 'weight',
9292
'type' : 'lnN',
9393
'samples' : {
@@ -97,7 +97,7 @@ def makeMCDirectory(var=''):
9797
}
9898

9999
nuisances['fake_syst_sssf'] = {
100-
'name' : 'CMS_WH_hww_fake_syst_sssf_2016',
100+
'name' : 'CMS_WH_hww_fake_syst_sssf_2016HIPM',
101101
'kind' : 'weight',
102102
'type' : 'lnN',
103103
'samples' : {
@@ -110,7 +110,7 @@ def makeMCDirectory(var=''):
110110
}
111111

112112
# # nuisances['fake_syst_sssf_minus'] = {
113-
# # 'name' : 'CMS_WH_hww_fake_syst_sssf_minus_2016',
113+
# # 'name' : 'CMS_WH_hww_fake_syst_sssf_minus_2016HIPM',
114114
# # 'kind' : 'weight',
115115
# # 'type' : 'lnN',
116116
# # 'samples' : {
@@ -122,7 +122,7 @@ def makeMCDirectory(var=''):
122122
# # }
123123

124124
nuisances['fake_syst_ossf'] = {
125-
'name' : 'CMS_WH_hww_fake_syst_ossf_2016',
125+
'name' : 'CMS_WH_hww_fake_syst_ossf_2016HIPM',
126126
'kind' : 'weight',
127127
'type' : 'lnN',
128128
'samples' : {
@@ -135,7 +135,7 @@ def makeMCDirectory(var=''):
135135
}
136136

137137
# # nuisances['fake_syst_ossf_minus'] = {
138-
# # 'name' : 'CMS_WH_hww_fake_syst_ossf_minus_2016',
138+
# # 'name' : 'CMS_WH_hww_fake_syst_ossf_minus_2016HIPM',
139139
# # 'kind' : 'weight',
140140
# # 'type' : 'lnN',
141141
# # 'samples' : {
@@ -146,40 +146,56 @@ def makeMCDirectory(var=''):
146146
# # ],
147147
# # }
148148

149-
# Statistical and systematic uncertainty on the fake rates
149+
# Statistical and systematic uncertainties on the fake rates
150150
nuisances['fake_ele'] = {
151-
'name' : 'CMS_WH_hww_fake_e_2016',
151+
'name' : 'CMS_WH_hww_fake_e_2016HIPM',
152152
'kind' : 'weight',
153153
'type' : 'shape',
154154
'samples' : {
155155
'Fake' : ['fakeWEleUp', 'fakeWEleDown'],
156156
}
157157
}
158158
nuisances['fake_ele_stat'] = {
159-
'name' : 'CMS_WH_hww_fake_stat_e_2016',
159+
'name' : 'CMS_WH_hww_fake_stat_e_2016HIPM',
160160
'kind' : 'weight',
161161
'type' : 'shape',
162162
'samples' : {
163163
'Fake' : ['fakeWStatEleUp', 'fakeWStatEleDown']
164164
}
165165
}
166+
nuisances['fake_ele_EWK'] = {
167+
'name' : 'CMS_WH_hww_fake_EWK_sub_e_2016HIPM',
168+
'kind' : 'weight',
169+
'type' : 'shape',
170+
'samples' : {
171+
'Fake' : ['fakeWEWKEleUp', 'fakeWEWKEleDown']
172+
}
173+
}
166174

167175
nuisances['fake_mu'] = {
168-
'name' : 'CMS_WH_hww_fake_m_2016',
176+
'name' : 'CMS_WH_hww_fake_m_2016HIPM',
169177
'kind' : 'weight',
170178
'type' : 'shape',
171179
'samples' : {
172180
'Fake' : ['fakeWMuUp', 'fakeWMuDown'],
173181
}
174182
}
175183
nuisances['fake_mu_stat'] = {
176-
'name' : 'CMS_WH_hww_fake_stat_m_2016',
184+
'name' : 'CMS_WH_hww_fake_stat_m_2016HIPM',
177185
'kind' : 'weight',
178186
'type' : 'shape',
179187
'samples' : {
180188
'Fake' : ['fakeWStatMuUp', 'fakeWStatMuDown'],
181189
}
182190
}
191+
nuisances['fake_mu_EWK'] = {
192+
'name' : 'CMS_WH_hww_fake_EWK_sub_m_2016HIPM',
193+
'kind' : 'weight',
194+
'type' : 'shape',
195+
'samples' : {
196+
'Fake' : ['fakeWEWKMuUp', 'fakeWEWKMuDown']
197+
}
198+
}
183199

184200
###### B-tagger
185201
for shift in ['lf', 'hf', 'hfstats1', 'hfstats2', 'lfstats1', 'lfstats2', 'cferr1', 'cferr2']:
@@ -509,7 +525,7 @@ def makeMCDirectory(var=''):
509525

510526
# Vg and VgS scale uncertainty
511527
nuisances['VgStarScale0j'] = {
512-
'name' : 'CMS_hww_VgStarScale0j_2016',
528+
'name' : 'CMS_hww_VgStarScale0j_2016HIPM',
513529
'type' : 'lnN',
514530
'samples' : {
515531
'VgS' : '1.25'
@@ -518,7 +534,7 @@ def makeMCDirectory(var=''):
518534
}
519535

520536
nuisances['VgScale0j'] = {
521-
'name' : 'CMS_hww_VgScale0j_2016',
537+
'name' : 'CMS_hww_VgScale0j_2016HIPM',
522538
'type' : 'lnN',
523539
'samples' : {
524540
'Vg' : '1.25'
@@ -611,7 +627,7 @@ def makeMCDirectory(var=''):
611627

612628
# WZ normalization from control region
613629
nuisances['WZ2jnorm'] = {
614-
'name' : 'CMS_hww_WZ3l2jnorm_2016',
630+
'name' : 'CMS_hww_WZ3l2jnorm_2016HIPM',
615631
'samples' : {
616632
'WZ' : '1.00',
617633
},
@@ -621,7 +637,7 @@ def makeMCDirectory(var=''):
621637
}
622638

623639
nuisances['WZ1jnorm'] = {
624-
'name' : 'CMS_hww_WZ3l1jnorm_2016',
640+
'name' : 'CMS_hww_WZ3l1jnorm_2016HIPM',
625641
'samples' : {
626642
'WZ' : '1.00',
627643
},
@@ -632,7 +648,7 @@ def makeMCDirectory(var=''):
632648
}
633649

634650
nuisances['WZ3lnorm'] = {
635-
'name' : 'CMS_hww_WZ0j3lnorm_2016',
651+
'name' : 'CMS_hww_WZ0j3lnorm_2016HIPM',
636652
'samples' : {
637653
'WZ' : '1.00',
638654
},
@@ -646,76 +662,76 @@ def makeMCDirectory(var=''):
646662
]
647663
}
648664

649-
### Charge asymmetry uncertainty
650-
651-
# # 0 jet plus
652-
# nuisances['charge_plus_0j'] = {
653-
# 'name' : 'CMS_WH_hww_charge_0j_plus_2016',
654-
# 'kind' : 'weight',
655-
# 'type' : 'lnN',
656-
# 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
657-
# 'cuts' : [
658-
# 'wh3l_13TeV_sssf_plus_pt2ge20',
659-
# 'wh3l_13TeV_ossf_plus_pt2ge20',
660-
# ],
661-
# }
665+
# ### Charge asymmetry uncertainty
662666

663-
# # 0 jet minus
664-
# nuisances['charge_minus_0j'] = {
665-
# 'name' : 'CMS_WH_hww_charge_0j_minus_2016',
666-
# 'kind' : 'weight',
667-
# 'type' : 'lnN',
668-
# 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
669-
# 'cuts' : [
670-
# 'wh3l_13TeV_sssf_minus_pt2ge20',
671-
# 'wh3l_13TeV_ossf_minus_pt2ge20',
672-
# ],
673-
# }
667+
# # # 0 jet plus
668+
# # nuisances['charge_plus_0j'] = {
669+
# # 'name' : 'CMS_WH_hww_charge_0j_plus_2016HIPM',
670+
# # 'kind' : 'weight',
671+
# # 'type' : 'lnN',
672+
# # 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
673+
# # 'cuts' : [
674+
# # 'wh3l_13TeV_sssf_plus_pt2ge20',
675+
# # 'wh3l_13TeV_ossf_plus_pt2ge20',
676+
# # ],
677+
# # }
674678

675-
# SSSF plus
676-
nuisances['charge_plus_0j_sssf'] = {
677-
'name' : 'CMS_WH_hww_charge_0j_plus_sssf_2016',
678-
'kind' : 'weight',
679-
'type' : 'lnN',
680-
'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
681-
'cuts' : [
682-
'wh3l_13TeV_sssf_plus_pt2ge20',
683-
],
684-
}
679+
# # # 0 jet minus
680+
# # nuisances['charge_minus_0j'] = {
681+
# # 'name' : 'CMS_WH_hww_charge_0j_minus_2016HIPM',
682+
# # 'kind' : 'weight',
683+
# # 'type' : 'lnN',
684+
# # 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
685+
# # 'cuts' : [
686+
# # 'wh3l_13TeV_sssf_minus_pt2ge20',
687+
# # 'wh3l_13TeV_ossf_minus_pt2ge20',
688+
# # ],
689+
# # }
685690

686-
# # SSSF minus
687-
# nuisances['charge_minus_0j_sssf'] = {
688-
# 'name' : 'CMS_WH_hww_charge_0j_minus_sssf_2016',
691+
# # SSSF plus
692+
# nuisances['charge_plus_0j_sssf'] = {
693+
# 'name' : 'CMS_WH_hww_charge_0j_plus_sssf_2016HIPM',
689694
# 'kind' : 'weight',
690695
# 'type' : 'lnN',
691696
# 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
692697
# 'cuts' : [
693-
# 'wh3l_13TeV_sssf_minus_pt2ge20',
698+
# 'wh3l_13TeV_sssf_plus_pt2ge20',
694699
# ],
695700
# }
696701

697-
# OSSF plus
698-
nuisances['charge_plus_0j_ossf'] = {
699-
'name' : 'CMS_WH_hww_charge_0j_plus_ossf_2016',
700-
'kind' : 'weight',
701-
'type' : 'lnN',
702-
'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
703-
'cuts' : [
704-
'wh3l_13TeV_ossf_plus_pt2ge20',
705-
],
706-
}
702+
# # # SSSF minus
703+
# # nuisances['charge_minus_0j_sssf'] = {
704+
# # 'name' : 'CMS_WH_hww_charge_0j_minus_sssf_2016HIPM',
705+
# # 'kind' : 'weight',
706+
# # 'type' : 'lnN',
707+
# # 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
708+
# # 'cuts' : [
709+
# # 'wh3l_13TeV_sssf_minus_pt2ge20',
710+
# # ],
711+
# # }
707712

708-
# # OSSF minus
709-
# nuisances['charge_minus_0j_ossf'] = {
710-
# 'name' : 'CMS_WH_hww_charge_0j_minus_ossf_2016',
713+
# # OSSF plus
714+
# nuisances['charge_plus_0j_ossf'] = {
715+
# 'name' : 'CMS_WH_hww_charge_0j_plus_ossf_2016HIPM',
711716
# 'kind' : 'weight',
712717
# 'type' : 'lnN',
713718
# 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
714719
# 'cuts' : [
715-
# 'wh3l_13TeV_ossf_minus_pt2ge20',
720+
# 'wh3l_13TeV_ossf_plus_pt2ge20',
716721
# ],
717722
# }
718723

724+
# # # OSSF minus
725+
# # nuisances['charge_minus_0j_ossf'] = {
726+
# # 'name' : 'CMS_WH_hww_charge_0j_minus_ossf_2016HIPM',
727+
# # 'kind' : 'weight',
728+
# # 'type' : 'lnN',
729+
# # 'samples' : dict((skey, '1.10') for skey in samples if skey not in ['DATA']),
730+
# # 'cuts' : [
731+
# # 'wh3l_13TeV_ossf_minus_pt2ge20',
732+
# # ],
733+
# # }
734+
719735
# Use the following if you want to apply the automatic combine MC stat nuisances.
720736
nuisances['stat'] = {
721737
'type' : 'auto',

WH_chargeAsymmetry/UL/2016HIPM_v9/WHSS/DY_OS_CR/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Compile the configuration. Do it after every change to any file in this director
2424

2525
Produce histograms using batch:
2626

27-
mkShapesRDF -o 0 -f . -b 1
27+
mkShapesRDF -c 1 -o 0 -f . -b 1
2828

2929
Check jobs status:
3030

0 commit comments

Comments
 (0)