CombineHarvester
HttSystematics_SMLegacy.cc
Go to the documentation of this file.
2 #include <vector>
3 #include <string>
7 
8 namespace ch {
9 
10 using ch::syst::SystMap;
12 using ch::syst::era;
13 using ch::syst::channel;
14 using ch::syst::bin_id;
15 using ch::syst::process;
16 using ch::JoinStr;
17 
19  CombineHarvester src = cb.cp();
20  src.channel({"ee", "mm"});
21 
22  // This regular expression will match any Higgs signal process.
23  // It's useful for catching all these processes when we don't know
24  // which of them will be signal or background
25  std::string higgs_rgx = "^(qq|gg|[WZV])H.*$";
26 
27  auto signal = Set2Vec(src.cp().signals().process_set());
28 
29  // Lumi not added for ggH_hww125 type processes
30  src.cp().process({"qqH", "ggH", "WH", "ZH", "Dibosons", "WJets"})
31  .AddSyst(cb, "lumi_$ERA", "lnN", SystMap<era>::init
32  ({"7TeV"}, 1.022)
33  ({"8TeV"}, 1.026));
34 
35  src.cp().channel({"ee"})
36  .process_rgx({higgs_rgx, "ZTT", "TTJ", "WJets", "Dibosons"})
37  .AddSyst(cb, "CMS_eff_e", "lnN", SystMap<era>::init
38  ({"7TeV"}, 1.04)
39  ({"8TeV"}, 1.06));
40 
41  src.cp().channel({"mm"})
42  .process_rgx({higgs_rgx, "ZTT", "TTJ", "WJets", "Dibosons"})
43  .AddSyst(cb, "CMS_eff_m", "lnN", SystMap<era>::init
44  ({"7TeV"}, 1.04)
45  ({"8TeV"}, 1.04));
46 
47  src.cp().channel({"ee"})
48  .process_rgx({higgs_rgx, "ZTT", "TTJ", "Dibosons"})
49  .AddSyst(cb, "CMS_scale_e_$ERA", "shape", SystMap<>::init(0.50));
50 
51  src.cp().process_rgx({higgs_rgx, "TTJ", "Dibosons"})
52  .AddSyst(cb, "CMS_scale_j_$ERA", "shape", SystMap<>::init(0.50));
53 
54  src.cp().channel({"ee"}).process_rgx({higgs_rgx, "TTJ", "Dibosons"}).bin_id({4})
55  .AddSyst(cb, "CMS_htt_scale_met_$ERA", "shape", SystMap<>::init(0.50));
56 
57  src.cp().channel({"mm"}).process_rgx({higgs_rgx, "Dibosons"}).bin_id({4})
58  .AddSyst(cb, "CMS_htt_scale_met_SignalDibosonWjets_$ERA", "shape", SystMap<>::init(0.50));
59 
60  src.cp().channel({"mm"}).process({"TTJ"}).bin_id({4})
61  .AddSyst(cb, "CMS_htt_scale_met_TTJ_$ERA", "shape", SystMap<>::init(0.50));
62 
63 
64  src.cp().process({"TTJ"})
65  .AddSyst(cb, "CMS_eff_b_$ERA", "lnN", SystMap<era, bin_id>::init
66  ({"7TeV"}, {0, 1}, 0.96)
67  ({"7TeV"}, {2, 3, 4}, 0.95)
68  ({"8TeV"}, {2, 3}, 0.97)
69  ({"8TeV"}, {4}, 0.99));
70 
71  src.cp().process_rgx({"^ggH.*$"})
72  .AddSyst(cb, "pdf_gg", "lnN", SystMap<>::init(1.097));
73 
74  src.cp().process({"ggH"}).bin_id({4})
75  .AddSyst(cb, "pdf_gg_Shape", "shape", SystMap<>::init(1.0));
76 
77  src.cp().process_rgx({"^ggH.*$"})
78  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<>::init(1.036));
79  src.cp().process({"WH", "ZH"})
80  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<channel, bin_id>::init
81  ({"ee", "mm"}, {0, 1, 2, 3}, 1.01)
82  ({"ee"}, {4}, 1.01)
83  ({"mm"}, {4}, 1.04));
84 
85  src.cp().process({"qqH"}).bin_id({4})
86  .AddSyst(cb, "pdf_qqbar_Shape", "shape", SystMap<>::init(1.0));
87 
88  src.cp().process_rgx({"^ggH.*$"})
89  .AddSyst(cb, "QCDscale_ggH", "lnN", SystMap<bin_id>::init
90  ({0}, 1.103)
91  ({1}, 1.100));
92 
93  src.cp().process_rgx({"^ggH.*$"})
94  .AddSyst(cb, "QCDscale_ggH1in", "lnN", SystMap<bin_id>::init
95  ({2}, 1.109)
96  ({3}, 1.107));
97 
98  src.cp().process_rgx({"^ggH.*$"})
99  .AddSyst(cb, "QCDscale_ggH2in", "lnN", SystMap<bin_id>::init
100  ({4}, 1.182));
101 
102  src.cp().process({"ggH"}).bin_id({4})
103  .AddSyst(cb, "QCDscale_ggH2in_Shape", "shape", SystMap<>::init(1.0));
104 
105  src.cp().process_rgx({"^qqH.*$"})
106  .AddSyst(cb, "QCDscale_qqH", "lnN", SystMap<bin_id>::init
107  ({0}, 1.034)
108  ({1}, 1.028)
109  ({2}, 1.008)
110  ({3}, 1.013)
111  ({4}, 1.009));
112 
113  src.cp().process({"qqH"}).bin_id({4})
114  .AddSyst(cb, "QCDscale_qqH_Shape", "shape", SystMap<>::init(1.0));
115 
116  src.cp().process({"WH", "ZH"})
117  .AddSyst(cb, "QCDscale_VH", "lnN", SystMap<>::init(1.04));
118 
119  src.cp().process_rgx({"^ggH.*$"})
120  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
121  ({0}, 1.035)
122  ({1}, 1.042)
123  ({2}, 0.984)
124  ({3}, 0.978)
125  ({4}, 0.926));
126  src.cp().process_rgx({"^qqH.*$", "WH", "ZH"})
127  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
128  ({0}, 1.089)
129  ({1}, 1.063)
130  ({2}, 1.000)
131  ({3}, 1.004)
132  ({4}, 0.986));
133 
134  src.cp().process({"ZTT"})
135  .AddSyst(cb, "CMS_htt_zttNorm_$ERA", "lnN", SystMap<>::init(1.03));
136 
137  src.cp().channel({"ee"}).process({"ZTT"})
138  .AddSyst(cb, "CMS_htt_ee_ztt_extrap_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
139  ({"7TeV"}, {1, 2}, 1.07)
140  ({"7TeV"}, {3}, 1.06)
141  ({"7TeV"}, {4}, 1.09)
142  ({"8TeV"}, {1}, 1.09)
143  ({"8TeV"}, {2, 3}, 1.07)
144  ({"8TeV"}, {4}, 1.09));
145 
146  src.cp().channel({"mm"}).process({"ZTT"})
147  .AddSyst(cb, "CMS_htt_mm_zttLnN_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
148  ({"7TeV"}, {1, 2}, 1.07)
149  ({"7TeV"}, {3}, 1.06)
150  ({"7TeV"}, {4}, 1.08)
151  ({"8TeV"}, {1}, 1.09)
152  ({"8TeV"}, {2, 3}, 1.07)
153  ({"8TeV"}, {4}, 1.08));
154 
155  src.cp().process({"TTJ"})
156  .AddSyst(cb, "CMS_htt_ttbarNorm_$ERA", "lnN", SystMap<era>::init
157  ({"7TeV"}, 1.08)
158  ({"8TeV"}, 1.10));
159 
160  src.cp().process({"Dibosons"}).AddSyst(cb,
161  "CMS_htt_$CHANNEL_DiBosonNorm_$ERA", "lnN", SystMap<>::init(1.30));
162 
163  src.cp().process({"ZEE", "ZMM"})
164  .AddSyst(cb, "CMS_htt_$CHANNEL_z$CHANNELNorm_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
165  ({"7TeV"}, {0}, 1.01)
166  ({"7TeV"}, {1}, 1.0045)
167  ({"7TeV"}, {2}, 1.01)
168  ({"7TeV"}, {3}, 1.007)
169  ({"7TeV"}, {4}, 1.02)
170  ({"8TeV"}, {0}, 1.01)
171  ({"8TeV"}, {1}, 1.001)
172  ({"8TeV"}, {2}, 1.01)
173  ({"8TeV"}, {3}, 1.007)
174  ({"8TeV"}, {4}, 1.015));
175 
176  src.cp().process({"QCD"})
177  .AddSyst(cb, "CMS_htt_$CHANNEL_QCDNorm_$BIN_$ERA", "lnN", SystMap<channel, era, bin_id>::init
178  ({"ee"}, {"7TeV"}, {0}, 1.19)
179  ({"ee"}, {"7TeV"}, {1}, 1.50)
180  ({"ee"}, {"7TeV"}, {2}, 1.35)
181  ({"ee"}, {"7TeV"}, {3}, 1.34)
182  ({"ee"}, {"7TeV"}, {4}, 1.70)
183  ({"ee"}, {"8TeV"}, {0}, 1.11)
184  ({"ee"}, {"8TeV"}, {1}, 1.09)
185  ({"ee"}, {"8TeV"}, {2}, 1.16)
186  ({"ee"}, {"8TeV"}, {3}, 1.14)
187  ({"ee"}, {"8TeV"}, {4}, 1.55)
188  ({"mm"}, {"7TeV"}, {0}, 1.11)
189  ({"mm"}, {"7TeV"}, {1}, 1.11)
190  ({"mm"}, {"7TeV"}, {2}, 1.25)
191  ({"mm"}, {"7TeV"}, {3}, 1.09)
192  ({"mm"}, {"7TeV"}, {4}, 2.00)
193  ({"mm"}, {"8TeV"}, {0}, 1.10)
194  ({"mm"}, {"8TeV"}, {1}, 1.08)
195  ({"mm"}, {"8TeV"}, {2}, 1.12)
196  ({"mm"}, {"8TeV"}, {3}, 1.09)
197  ({"mm"}, {"8TeV"}, {4}, 1.70));
198 
199  auto ee_bins = src.cp().channel({"ee"}).bin_set();
200  for (auto bin : ee_bins) {
201  std::string clip = bin;
202  boost::replace_all(clip, "ee_", "");
203  for (std::string i : {"0", "1", "2"}) {
204  src.cp().process({"ZEE"}).bin({bin}).AddSyst(
205  cb, "CMS_htt_$CHANNEL_z$CHANNELShape_" + clip + "_mass" + i + "_$ERA",
206  "shape", SystMap<>::init(1.0));
207  }
208  }
209 
210  auto mm_bins = src.cp().channel({"mm"}).bin_set();
211  for (auto bin : mm_bins) {
212  std::string clip = bin;
213  boost::replace_all(clip, "mumu_", "");
214  for (std::string i : {"0", "1", "2"}) {
215  src.cp().process({"ZMM"}).bin({bin}).AddSyst(
216  cb, "CMS_htt_$CHANNEL_z$CHANNELShape_" + clip + "_mass" + i + "_$ERA",
217  "shape", SystMap<>::init(1.0));
218  }
219  }
220 }
221 
223  CombineHarvester src = cb.cp();
224  src.channel({"em"});
225 
226  // This regular expression will match any Higgs signal process.
227  // It's useful for catching all these processes when we don't know
228  // which of them will be signal or background
229  std::string higgs_rgx = "^(qq|gg|[WZV])H.*$";
230 
231  std::vector<std::string> ggH = {"ggH", "ggH_hww125"};
232  std::vector<std::string> qqH = {"qqH", "qqH_hww125"};
233 
234  auto signal = Set2Vec(src.cp().signals().process_set());
235 
236  src.cp().process_rgx({higgs_rgx, "EWK"})
237  .AddSyst(cb, "lumi_$ERA", "lnN", SystMap<era>::init
238  ({"7TeV"}, 1.022)
239  ({"8TeV"}, 1.026));
240 
241  src.cp().AddSyst(cb, "CMS_eff_e", "lnN", SystMap<>::init(1.02));
242  src.cp().AddSyst(cb, "CMS_eff_m", "lnN", SystMap<>::init(1.02));
243 
244  src.cp().process_rgx({higgs_rgx, "Ztt"}).bin_id({0, 2, 4, 5})
245  .AddSyst(cb, "CMS_scale_e_$ERA", "shape", SystMap<>::init(1.00));
246  src.cp().process_rgx({higgs_rgx, "Ztt"}).bin_id({1, 3})
247  .AddSyst(cb, "CMS_scale_e_highpt_$ERA", "shape", SystMap<>::init(1.00));
248 
249  src.cp().AddSyst(cb,
250  "CMS_scale_j_$ERA", "lnN", SystMap<era, bin_id, process>::init
251  ({"7TeV"}, {0, 1}, {ggH}, 0.98)
252  ({"7TeV"}, {0, 1}, {qqH}, 0.90)
253  ({"7TeV"}, {0, 1}, {"WH", "ZH"}, 0.98)
254  ({"7TeV"}, {0, 1}, {"EWK", "ttbar"}, 0.99)
255  ({"7TeV"}, {2, 3}, {ggH}, 1.05)
256  ({"7TeV"}, {2, 3}, {"EWK", "ttbar"}, 1.05)
257  ({"7TeV"}, {4}, {ggH}, 1.15)
258  ({"7TeV"}, {4}, {qqH}, 1.05)
259  ({"7TeV"}, {4}, {"WH", "ZH"}, 1.15)
260  ({"7TeV"}, {4}, {"EWK", "ttbar"}, 1.20)
261  ({"8TeV"}, {0}, {ggH}, 0.98)
262  ({"8TeV"}, {0}, {qqH}, 0.90)
263  ({"8TeV"}, {0}, {"WH", "ZH"}, 0.95)
264  ({"8TeV"}, {0}, {"ttbar"}, 0.91)
265  ({"8TeV"}, {0}, {"EWK"}, 0.98)
266  ({"8TeV"}, {1}, {ggH}, 0.98)
267  ({"8TeV"}, {1}, {qqH}, 0.89)
268  ({"8TeV"}, {1}, {"WH", "ZH"}, 0.95)
269  ({"8TeV"}, {1}, {"ttbar"}, 0.90)
270  ({"8TeV"}, {1}, {"EWK"}, 0.98)
271  ({"8TeV"}, {2}, {ggH}, 1.03)
272  ({"8TeV"}, {2}, {qqH}, 0.99)
273  ({"8TeV"}, {2}, {"WH", "ZH"}, 1.02)
274  ({"8TeV"}, {2}, {"ttbar"}, 1.03)
275  ({"8TeV"}, {2}, {"EWK"}, 0.98)
276  ({"8TeV"}, {3}, {ggH}, 1.02)
277  ({"8TeV"}, {3}, {qqH}, 0.99)
278  ({"8TeV"}, {3}, {"WH", "ZH"}, 1.01)
279  ({"8TeV"}, {3}, {"ttbar"}, 1.02)
280  ({"8TeV"}, {3}, {"EWK"}, 0.99)
281  ({"8TeV"}, {4}, {ggH}, 1.10)
282  ({"8TeV"}, {4}, {qqH}, 1.05)
283  ({"8TeV"}, {4}, {"WH", "ZH"}, 1.05)
284  ({"8TeV"}, {4}, {"ttbar"}, 1.22)
285  ({"8TeV"}, {4}, {"EWK"}, 1.21)
286  ({"8TeV"}, {5}, {ggH}, 1.14)
287  ({"8TeV"}, {5}, {qqH}, 1.04)
288  ({"8TeV"}, {5}, {"WH", "ZH"}, 1.04)
289  ({"8TeV"}, {5}, {"ttbar"}, 1.08)
290  ({"8TeV"}, {5}, {"EWK"}, 1.08));
291 
292  src.cp().era({"7TeV"}).process_rgx({higgs_rgx, "EWK", "ttbar"}).AddSyst(cb,
293  "CMS_htt_scale_met_$ERA", "lnN", SystMap<bin_id>::init
294  ({0, 1, 2, 3, 4}, 1.05));
295 
296  src.cp().era({"8TeV"}).process_rgx({higgs_rgx}).AddSyst(cb,
297  "CMS_htt_scale_met_$ERA", "lnN", SystMap<bin_id>::init
298  ({0}, 0.98)
299  ({2}, 1.01)
300  ({1, 3}, 0.99)
301  ({4, 5}, 0.98));
302  src.cp().era({"8TeV"}).process({"EWK", "ttbar"}).AddSyst(cb,
303  "CMS_htt_scale_met_$ERA", "lnN", SystMap<bin_id, process>::init
304  ({0}, {"ttbar"}, 1.01)
305  ({1}, {"ttbar"}, 0.99)
306  ({4}, {"ttbar"}, 1.00)
307  ({4}, {"EWK"}, 0.98)
308  ({5}, {"EWK", "ttbar"}, 1.10));
309 
310  src.cp().process({"ttbar"})
311  .AddSyst(cb, "CMS_eff_b_$ERA", "lnN", SystMap<era, bin_id>::init
312  ({"7TeV"}, {0, 1}, 0.96)
313  ({"7TeV"}, {2, 3, 4}, 0.95)
314  ({"8TeV"}, {2, 3, 4, 5}, 0.97));
315 
316  src.cp().process_rgx({"^ggH.*$"})
317  .AddSyst(cb, "pdf_gg", "lnN", SystMap<>::init(1.097));
318 
319  src.cp().process_rgx({"^qqH.*$"})
320  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<>::init(1.036));
321 
322  src.cp().process({"WH", "ZH"})
323  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<bin_id>::init
324  ({0, 1}, 1.01)
325  ({2, 3, 4, 5}, 1.02));
326 
327  src.cp().process_rgx({"^ggH.*$"})
328  .AddSyst(cb, "QCDscale_ggH", "lnN", SystMap<bin_id>::init
329  ({0, 1}, 1.08));
330 
331  src.cp().process_rgx({"^ggH.*$"})
332  .AddSyst(cb, "QCDscale_ggH1in", "lnN", SystMap<bin_id>::init
333  ({2}, 1.105)
334  ({3}, 1.125));
335 
336  src.cp().process_rgx({"^ggH.*$"})
337  .AddSyst(cb, "QCDscale_ggH2in", "lnN", SystMap<era, bin_id>::init
338  ({"7TeV"}, {4}, 1.274)
339  ({"8TeV"}, {4}, 1.228)
340  ({"8TeV"}, {5}, 1.307));
341 
342  src.cp().process_rgx({"^qqH.*$"})
343  .AddSyst(cb, "QCDscale_qqH", "lnN", SystMap<bin_id>::init
344  ({0}, 1.034)
345  ({1}, 1.028)
346  ({2}, 1.008)
347  ({3}, 1.013)
348  ({4}, 1.019));
349 
350  src.cp().process({"WH", "ZH"})
351  .AddSyst(cb, "QCDscale_VH", "lnN", SystMap<>::init(1.04));
352 
353  src.cp().process_rgx({"^ggH.*$"})
354  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
355  ({0}, 1.035)
356  ({1}, 1.042)
357  ({2}, 0.984)
358  ({3}, 0.978)
359  ({4}, 0.890)
360  ({5}, 0.881));
361 
362  src.cp().process_rgx({"^qqH.*$", "WH", "ZH"})
363  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
364  ({0}, 1.089)
365  ({1}, 1.063)
366  ({4}, 0.988)
367  ({5}, 0.986));
368 
369  src.cp().process({"Ztt"})
370  .AddSyst(cb, "CMS_htt_zttNorm_$ERA", "lnN", SystMap<>::init(1.03));
371 
372  src.cp().process({"Ztt"})
373  .AddSyst(cb, "CMS_htt_extrap_ztt_$BIN_$ERA", "lnN",
375  ({1, 2}, 1.03)
376  ({3}, 1.05)
377  ({4, 5}, 1.10));
378 
379  src.cp().process({"ttbar"})
380  .AddSyst(cb, "CMS_htt_ttbarNorm_$ERA", "lnN", SystMap<era, bin_id>::init
381  ({"7TeV"}, {0, 1, 4}, 1.08)
382  ({"7TeV"}, {2, 3}, 1.10)
383  ({"8TeV"}, {0, 1, 2, 3}, 1.10)
384  ({"8TeV"}, {4, 5}, 1.08));
385 
386  src.cp().process({"ttbar"})
387  .AddSyst(cb, "CMS_htt_ttbarNorm_$BIN_$ERA", "lnN",
389  ({"7TeV"}, {4}, 1.05)
390  ({"8TeV"}, {4, 5}, 1.10));
391 
392  src.cp().process({"EWK"})
393  .AddSyst(cb, "CMS_htt_DiBosonNorm_$ERA", "lnN", SystMap<>::init(1.15));
394 
395  src.cp().process({"Fakes"})
396  .AddSyst(cb, "CMS_htt_fakes_em_$ERA", "lnN", SystMap<>::init(1.30));
397 
398  src.cp().process({"Fakes"})
399  .AddSyst(cb, "CMS_htt_fakes_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
400  ({"7TeV"}, {1}, 1.30)
401  ({"7TeV"}, {2}, 1.11)
402  ({"7TeV"}, {3}, 1.05)
403  ({"7TeV"}, {4}, 1.09)
404  ({"8TeV"}, {1}, 1.10)
405  ({"8TeV"}, {2, 3, 4, 5}, 1.05));
406 
407  auto em_bins = src.cp().bin_id({0, 1, 2}).bin_set();
408  for (auto bin : em_bins) {
409  std::string clip = bin;
410  boost::replace_all(clip, "emu_", "em_");
411  src.cp().process({"Fakes"}).bin({bin}).AddSyst(cb,
412  "CMS_htt_FakeShape_" + clip + "_$ERA", "shape", SystMap<>::init(1.00));
413  }
414 }
415 
417  CombineHarvester src = cb.cp();
418  src.channel({"et", "mt"});
419 
420  auto signal = Set2Vec(cb.cp().signals().process_set());
421 
422  src.cp().signals()
423  .AddSyst(cb, "lumi_$ERA", "lnN", SystMap<era>::init
424  ({"7TeV"}, 1.022)
425  ({"8TeV"}, 1.026));
426 
427  src.cp().process({"ggH"})
428  .AddSyst(cb, "pdf_gg", "lnN", SystMap<>::init
429  (1.097));
430 
431  src.cp().process({"qqH", "WH", "ZH"})
432  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<channel, era, process>::init
433  ({"et", "mt"}, {"7TeV", "8TeV"}, {"qqH"}, 1.036)
434  ({"et"}, {"7TeV"}, {"WH", "ZH"}, 1.02)
435  ({"et"}, {"8TeV"}, {"WH", "ZH"}, 1.04)
436  ({"mt"}, {"7TeV", "8TeV"}, {"WH", "ZH"}, 1.04));
437 
438  src.cp().process({"ggH"})
439  .AddSyst(cb, "QCDscale_ggH", "lnN", SystMap<bin_id>::init
440  ({1, 2}, 1.08));
441 
442  src.cp().process({"ggH"})
443  .AddSyst(cb, "QCDscale_ggH1in", "lnN", SystMap<channel, bin_id>::init
444  ({"mt"}, {3}, 1.105)
445  ({"mt"}, {4}, 1.095)
446  ({"mt"}, {5}, 1.195)
447  ({"et"}, {3}, 1.125)
448  ({"et"}, {5}, 1.175));
449 
450  src.cp().process({"ggH"})
451  .AddSyst(cb, "QCDscale_ggH2in", "lnN", SystMap<channel, era, bin_id>::init
452  ({"mt"}, {"7TeV", "8TeV"}, {6}, 1.228)
453  ({"mt"}, {"7TeV", "8TeV"}, {7}, 1.307)
454  ({"et"}, {"7TeV"}, {6}, 1.275)
455  ({"et"}, {"8TeV"}, {6}, 1.228)
456  ({"et"}, {"8TeV"}, {7}, 1.307));
457 
458  src.cp().process({"qqH"})
459  .AddSyst(cb, "QCDscale_qqH", "lnN", SystMap<channel, era, bin_id>::init
460  ({"et", "mt"}, {"7TeV", "8TeV"}, {1}, 1.022)
461  ({"et", "mt"}, {"7TeV", "8TeV"}, {2}, 1.023)
462  ({"et", "mt"}, {"7TeV", "8TeV"}, {3}, 1.015)
463  ({"et", "mt"}, {"7TeV", "8TeV"}, {4}, 1.013)
464  ({"et", "mt"}, {"7TeV", "8TeV"}, {5}, 1.015)
465  ({"mt"}, {"7TeV", "8TeV"}, {6}, 1.018)
466  ({"et"}, {"7TeV"}, {6}, 0.981)
467  ({"et"}, {"8TeV"}, {6}, 1.018)
468  ({"et", "mt"}, {"7TeV", "8TeV"}, {7}, 1.031));
469 
470  src.cp().process({"WH", "ZH"})
471  .AddSyst(cb, "QCDscale_VH", "lnN", SystMap<channel, era, bin_id>::init
472  ({"mt"}, {"7TeV", "8TeV"}, {1, 2}, 1.010)
473  ({"mt"}, {"7TeV", "8TeV"}, {3, 4, 5, 6, 7}, 1.040)
474  ({"et"}, {"7TeV"}, {1, 2, 3, 5, 6, 7}, 1.040)
475  ({"et"}, {"8TeV"}, {1, 2}, 1.010)
476  ({"et"}, {"8TeV"}, {3, 5, 6, 7}, 1.040));
477 
478  src.cp().process({"qqH", "WH", "ZH"})
479  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
480  ({1}, 1.050)
481  ({2}, 1.060)
482  ({3}, 1.007)
483  ({4}, 0.996)
484  ({5}, 1.006)
485  ({6}, 0.988)
486  ({7}, 0.986));
487  src.cp().process({"ggH"})
488  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
489  ({1}, 1.013)
490  ({2}, 1.028)
491  ({3}, 0.946)
492  ({4}, 0.954)
493  ({5}, 0.983)
494  ({6}, 0.893)
495  ({7}, 0.881));
496 
497  src.cp().channel({"mt"})
498  .process(JoinStr({signal, {"ZTT", "ZL", "ZJ", "TT", "VV"}}))
499  .AddSyst(cb, "CMS_eff_m", "lnN", SystMap<>::init(1.02));
500 
501  src.cp().channel({"et"})
502  .process(JoinStr({signal, {"ZTT", "ZL", "ZJ", "TT", "VV"}}))
503  .AddSyst(cb, "CMS_eff_e", "lnN", SystMap<>::init(1.02));
504 
505  src.cp().process(JoinStr({signal, {"ZTT", "TT", "VV"}}))
506  .AddSyst(cb, "CMS_eff_t_$CHANNEL_$ERA", "lnN", SystMap<>::init(1.08));
507 
508  src.cp().process(JoinStr({signal, {"ZTT", "TT", "VV"}})).AddSyst(cb,
509  "CMS_eff_t_$CHANNEL_medium_$ERA", "lnN", SystMap<channel, era, bin_id>::init
510  ({"mt"}, {"7TeV", "8TeV"}, {1, 3}, 1.03)
511  ({"mt"}, {"7TeV", "8TeV"}, {6, 7}, 1.01)
512  ({"et"}, {"7TeV"}, {1}, 1.03)
513  ({"et"}, {"7TeV"}, {3}, 1.08)
514  ({"et"}, {"8TeV"}, {1, 3}, 1.03)
515  ({"et"}, {"7TeV", "8TeV"}, {6, 7}, 1.01));
516 
517  src.cp().process(JoinStr({signal, {"ZTT", "TT", "VV"}}))
518  .AddSyst(cb, "CMS_eff_t_$CHANNEL_high_$ERA", "lnN",
520  ({"et", "mt"}, {2, 4, 5}, 1.030)
521  ({"et", "mt"}, {6}, 1.012)
522  ({"mt"}, {7}, 1.015)
523  ({"et"}, {7}, 1.012));
524 
525  src.cp().channel({"mt"}).process(JoinStr({signal, {"ZTT"}}))
526  .AddSyst(cb, "CMS_scale_t_mutau_$ERA", "shape", SystMap<>::init(1.00));
527 
528  src.cp().channel({"et"}).process(JoinStr({signal, {"ZTT"}}))
529  .AddSyst(cb, "CMS_scale_t_etau_$ERA", "shape", SystMap<>::init(1.00));
530 
531  src.cp().channel({"mt"})
532  .AddSyst(cb,
533  "CMS_scale_j_$ERA", "lnN", SystMap<era, bin_id, process>::init
534  ({"7TeV"}, {1, 2}, {"ggH"}, 0.98)
535  ({"7TeV"}, {1, 2}, {"qqH"}, 0.86)
536  ({"7TeV"}, {1, 2}, {"WH", "ZH"}, 0.97)
537  ({"7TeV"}, {1, 2}, {"TT"}, 0.99)
538  ({"7TeV"}, {1, 2}, {"VV"}, 0.98)
539  ({"7TeV"}, {3}, {"ggH"}, 1.05)
540  ({"7TeV"}, {3}, {"qqH"}, 1.01)
541  ({"7TeV"}, {3}, {"WH", "ZH"}, 1.05)
542  ({"7TeV"}, {3}, {"VV"}, 1.02)
543  ({"7TeV"}, {4, 5}, {"ggH"}, 1.03)
544  ({"7TeV"}, {4, 5}, {"qqH"}, 1.02)
545  ({"7TeV"}, {4, 5}, {"WH", "ZH"}, 1.03)
546  ({"7TeV"}, {4, 5}, {"TT"}, 1.01)
547  ({"7TeV"}, {4, 5}, {"VV"}, 1.04)
548  ({"7TeV"}, {6}, {"ggH"}, 1.20)
549  ({"7TeV"}, {6}, {"qqH"}, 1.05)
550  ({"7TeV"}, {6}, {"WH", "ZH"}, 1.20)
551  ({"7TeV"}, {6}, {"TT"}, 1.10)
552  ({"7TeV"}, {6}, {"VV"}, 1.15)
553  ({"8TeV"}, {1}, {"ggH"}, 0.98)
554  ({"8TeV"}, {1}, {"qqH"}, 0.92)
555  ({"8TeV"}, {1}, {"WH", "ZH"}, 0.96)
556  ({"8TeV"}, {1}, {"ZL"}, 0.99)
557  ({"8TeV"}, {1}, {"ZJ"}, 0.98)
558  ({"8TeV"}, {1}, {"TT"}, 0.95)
559  ({"8TeV"}, {1}, {"VV"}, 0.98)
560  ({"8TeV"}, {2}, {"ggH"}, 0.98)
561  ({"8TeV"}, {2}, {"qqH"}, 0.92)
562  ({"8TeV"}, {2}, {"WH", "ZH"}, 0.88)
563  ({"8TeV"}, {2}, {"ZL"}, 0.99)
564  ({"8TeV"}, {2}, {"ZJ"}, 0.97)
565  ({"8TeV"}, {2}, {"TT"}, 0.84)
566  ({"8TeV"}, {2}, {"VV"}, 0.97)
567  ({"8TeV"}, {3}, {"ggH"}, 1.04)
568  ({"8TeV"}, {3}, {"qqH"}, 0.99)
569  ({"8TeV"}, {3}, {"WH", "ZH"}, 1.01)
570  ({"8TeV"}, {3}, {"ZL", "ZJ"}, 1.02)
571  ({"8TeV"}, {3}, {"VV"}, 1.03)
572  ({"8TeV"}, {4}, {"ggH"}, 1.04)
573  ({"8TeV"}, {4}, {"WH", "ZH"}, 1.03)
574  ({"8TeV"}, {4}, {"ZL", "ZJ"}, 1.02)
575  ({"8TeV"}, {4}, {"VV"}, 1.02)
576  ({"8TeV"}, {5}, {"ggH"}, 1.02)
577  ({"8TeV"}, {5}, {"WH", "ZH"}, 1.01)
578  ({"8TeV"}, {5}, {"TT"}, 0.97)
579  ({"8TeV"}, {5}, {"VV"}, 1.03)
580  ({"8TeV"}, {6}, {"ggH"}, 1.10)
581  ({"8TeV"}, {6}, {"qqH"}, 1.04)
582  ({"8TeV"}, {6}, {"WH", "ZH"}, 1.15)
583  ({"8TeV"}, {6}, {"ZL"}, 1.05)
584  ({"8TeV"}, {6}, {"ZJ"}, 1.10)
585  ({"8TeV"}, {6}, {"TT"}, 1.05)
586  ({"8TeV"}, {6}, {"VV"}, 1.08)
587  ({"8TeV"}, {7}, {"ggH"}, 1.06)
588  ({"8TeV"}, {7}, {"qqH"}, 1.03)
589  ({"8TeV"}, {7}, {"WH", "ZH"}, 1.15)
590  ({"8TeV"}, {7}, {"ZL"}, 1.05)
591  ({"8TeV"}, {7}, {"TT"}, 1.05)
592  ({"8TeV"}, {7}, {"VV"}, 1.10));
593 
594  src.cp().channel({"et"})
595  .AddSyst(cb,
596  "CMS_scale_j_$ERA", "lnN", SystMap<era, bin_id, process>::init
597  ({"7TeV"}, {1, 2}, {"ggH"}, 0.97)
598  ({"7TeV"}, {1, 2}, {"qqH"}, 0.85)
599  ({"7TeV"}, {1, 2}, {"WH", "ZH"}, 0.95)
600  ({"7TeV"}, {1, 2}, {"TT"}, 0.98)
601  ({"7TeV"}, {1, 2}, {"VV"}, 0.97)
602  ({"7TeV"}, {3}, {"ggH"}, 1.02)
603  ({"7TeV"}, {3}, {"qqH"}, 1.03)
604  ({"7TeV"}, {3}, {"WH", "ZH"}, 1.02)
605  ({"7TeV"}, {3}, {"VV"}, 1.01)
606  ({"7TeV"}, {5}, {"ggH"}, 1.06)
607  ({"7TeV"}, {5}, {"qqH"}, 1.02)
608  ({"7TeV"}, {5}, {"WH", "ZH"}, 1.06)
609  ({"7TeV"}, {5}, {"VV"}, 1.02)
610  ({"7TeV"}, {6}, {"ggH"}, 1.20)
611  ({"7TeV"}, {6}, {"qqH"}, 1.07)
612  ({"7TeV"}, {6}, {"WH", "ZH"}, 1.20)
613  ({"7TeV"}, {6}, {"TT"}, 1.10)
614  ({"7TeV"}, {6}, {"VV"}, 1.25)
615  ({"8TeV"}, {1}, {"ggH"}, 0.98)
616  ({"8TeV"}, {1}, {"qqH"}, 0.90)
617  ({"8TeV"}, {1}, {"WH", "ZH"}, 0.96)
618  ({"8TeV"}, {1}, {"ZL"}, 0.99)
619  ({"8TeV"}, {1}, {"ZJ"}, 0.92)
620  ({"8TeV"}, {1}, {"TT"}, 0.95)
621  ({"8TeV"}, {1}, {"VV"}, 0.97)
622  ({"8TeV"}, {2}, {"ggH"}, 0.98)
623  ({"8TeV"}, {2}, {"qqH"}, 0.89)
624  ({"8TeV"}, {2}, {"WH", "ZH"}, 0.95)
625  ({"8TeV"}, {2}, {"ZL"}, 0.99)
626  ({"8TeV"}, {2}, {"ZJ"}, 0.94)
627  ({"8TeV"}, {2}, {"TT"}, 0.84)
628  ({"8TeV"}, {2}, {"VV"}, 0.98)
629  ({"8TeV"}, {3}, {"ggH"}, 1.01)
630  ({"8TeV"}, {3}, {"qqH"}, 0.99)
631  ({"8TeV"}, {3}, {"WH", "ZH"}, 1.01)
632  ({"8TeV"}, {3}, {"VV"}, 1.03)
633  ({"8TeV"}, {5}, {"ggH"}, 1.02)
634  ({"8TeV"}, {5}, {"WH", "ZH"}, 1.01)
635  ({"8TeV"}, {5}, {"TT"}, 0.97)
636  ({"8TeV"}, {5}, {"VV"}, 1.03)
637  ({"8TeV"}, {6}, {"ggH"}, 1.10)
638  ({"8TeV"}, {6}, {"qqH"}, 1.05)
639  ({"8TeV"}, {6}, {"WH", "ZH"}, 1.15)
640  ({"8TeV"}, {6}, {"ZL"}, 1.08)
641  ({"8TeV"}, {6}, {"ZJ"}, 1.08)
642  ({"8TeV"}, {6}, {"TT"}, 1.05)
643  ({"8TeV"}, {6}, {"VV"}, 1.10)
644  ({"8TeV"}, {7}, {"ggH"}, 1.06)
645  ({"8TeV"}, {7}, {"qqH"}, 1.03)
646  ({"8TeV"}, {7}, {"WH", "ZH"}, 1.15)
647  ({"8TeV"}, {7}, {"ZL"}, 1.08)
648  ({"8TeV"}, {7}, {"TT"}, 1.05)
649  ({"8TeV"}, {7}, {"VV"}, 1.10));
650 
651  src.cp()
652  .AddSyst(cb, "CMS_htt_scale_met_$ERA", "lnN",
654  ({"et", "mt"}, {"7TeV"}, {1, 2, 3, 4, 5, 6}, {signal}, 1.05)
655  ({"mt"}, {"7TeV"}, {1, 2, 3, 4, 5, 6}, {"TT", "W"}, 1.07)
656  ({"et"}, {"7TeV"}, {1, 2, 3, 4, 5, 6}, {"TT", "VV"}, 1.07)
657  ({"et", "mt"}, {"7TeV"}, {1, 2, 3, 4, 5, 6}, {"ZL", "ZJ"}, 1.05)
658  ({"et", "mt"}, {"8TeV"}, {1}, {"TT"}, 1.05)
659  ({"et", "mt"}, {"8TeV"}, {1}, {"W"}, 1.01)
660  ({"et", "mt"}, {"8TeV"}, {2}, {signal}, 1.01)
661  ({"et", "mt"}, {"8TeV"}, {2}, {"TT"}, 1.04)
662  ({"et", "mt"}, {"8TeV"}, {2}, {"W"}, 1.01)
663  ({"et", "mt"}, {"8TeV"}, {2}, {"ZL"}, 1.02)
664  ({"et", "mt"}, {"8TeV"}, {3}, {signal}, 0.99)
665  ({"mt"}, {"8TeV"}, {3}, {"TT"}, 1.02)
666  ({"et"}, {"8TeV"}, {3}, {"TT", "VV", "ZJ"}, 1.01)
667  ({"et", "mt"}, {"8TeV"}, {3}, {"W"}, 1.01)
668  ({"et", "mt"}, {"8TeV"}, {3}, {"ZL"}, 1.02)
669  ({"et", "mt"}, {"8TeV"}, {4}, {signal}, 0.99)
670  ({"et", "mt"}, {"8TeV"}, {4}, {"TT"}, 1.02)
671  ({"et", "mt"}, {"8TeV"}, {4}, {"W"}, 1.01)
672  ({"et", "mt"}, {"8TeV"}, {4}, {"ZL"}, 1.03)
673  ({"mt"}, {"8TeV"}, {5}, {signal}, 0.99)
674  ({"et"}, {"8TeV"}, {5}, {signal}, 0.98)
675  ({"et", "mt"}, {"8TeV"}, {5}, {"TT"}, 1.01)
676  ({"et", "mt"}, {"8TeV"}, {5}, {"W"}, 1.03)
677  ({"mt"}, {"8TeV"}, {5}, {"ZL"}, 1.02)
678  ({"et"}, {"8TeV"}, {5}, {"ZL"}, 1.12)
679  ({"mt"}, {"8TeV"}, {5}, {"ZJ"}, 0.98)
680  ({"et"}, {"8TeV"}, {5}, {"ZJ"}, 0.97)
681  ({"et", "mt"}, {"8TeV"}, {6}, {signal}, 0.99)
682  ({"et", "mt"}, {"8TeV"}, {6}, {"TT", "W"}, 1.04)
683  ({"et", "mt"}, {"8TeV"}, {6}, {"ZL", "ZJ"}, 1.03)
684  ({"et", "mt"}, {"8TeV"}, {7}, {signal}, 0.99)
685  ({"et", "mt"}, {"8TeV"}, {7}, {"TT", "W"}, 1.03)
686  ({"et", "mt"}, {"8TeV"}, {7}, {"ZL", "ZJ"}, 1.03));
687 
688  src.cp()
689  .AddSyst(cb, "CMS_eff_b_$ERA", "lnN",
691  ({"mt"}, {"7TeV"}, {1, 2, 3, 4, 5, 6}, {"TT"}, 0.90)
692  ({"mt"}, {"7TeV"}, {3, 4, 5}, {"VV"}, 0.98)
693  ({"et"}, {"7TeV"}, {1}, {"TT"}, 0.97)
694  ({"et"}, {"7TeV"}, {2, 3, 5, 6}, {"TT"}, 0.94)
695  ({"et"}, {"7TeV"}, {3, 5}, {"VV"}, 0.97)
696  ({"et"}, {"7TeV"}, {6}, {"VV"}, 0.85)
697  ({"mt"}, {"8TeV"}, {1}, {"TT"}, 0.98)
698  ({"et"}, {"8TeV"}, {1}, {"TT"}, 0.96)
699  ({"et", "mt"}, {"8TeV"}, {2, 3, 4}, {"TT"}, 0.96)
700  ({"mt"}, {"8TeV"}, {5, 6, 7}, {"TT"}, 0.94)
701  ({"et"}, {"8TeV"}, {5, 6, 7}, {"TT"}, 0.96));
702 
703  src.cp().process({"ZTT", "ZL", "ZJ"})
704  .AddSyst(cb, "CMS_htt_zttNorm_$ERA", "lnN", SystMap<>::init(1.03));
705 
706  src.cp().process({"ZTT"})
707  .AddSyst(cb, "CMS_htt_extrap_ztt_$BIN_$ERA", "lnN",
709  ({"et", "mt"}, {1, 2, 3, 4, 5}, 1.05)
710  ({"et", "mt"}, {6}, 1.10)
711  ({"mt"}, {7}, 1.13)
712  ({"et"}, {7}, 1.16));
713  src.cp().channel({"et"}).bin_id({6}).era({"7TeV"}).process({"ZL"})
714  .AddSyst(cb, "CMS_htt_extrap_ztt_$BIN_$ERA", "lnN", SystMap<>::init
715  (1.10));
716 
717  src.cp().process({"TT"})
718  .AddSyst(cb, "CMS_htt_ttbarNorm_$ERA", "lnN", SystMap<era, bin_id>::init
719  ({"7TeV"}, {1, 2, 3, 4, 5, 6}, 1.08)
720  ({"8TeV"}, {1, 2, 3, 4, 5}, 1.10)
721  ({"8TeV"}, {6, 7}, 1.08));
722 
723  src.cp().process({"TT"})
724  .AddSyst(cb,
725  "CMS_htt_ttbarNorm_$BIN_$ERA", "lnN", SystMap<channel, era, bin_id>::init
726  ({"mt"}, {"7TeV"}, {6}, 1.20)
727  ({"mt"}, {"8TeV"}, {6, 7}, 1.33)
728  ({"et"}, {"7TeV"}, {6}, 1.23)
729  ({"et"}, {"8TeV"}, {6, 7}, 1.33));
730 
731  src.cp().process({"W"})
732  .AddSyst(cb, "CMS_htt_WNorm_$BIN_$ERA", "lnN",
734  ({"mt", "et"}, {"7TeV"}, {1, 2}, 1.20)
735  ({"mt", "et"}, {"7TeV"}, {3, 4}, 1.10)
736  ({"mt"}, {"7TeV"}, {5}, 1.12)
737  ({"et"}, {"7TeV"}, {5}, 1.10)
738  ({"mt"}, {"7TeV"}, {6}, 1.20)
739  ({"et"}, {"7TeV"}, {6}, 1.50)
740  ({"mt", "et"}, {"8TeV"}, {1, 2}, 1.20)
741  ({"mt"}, {"8TeV"}, {3}, 1.15)
742  ({"et"}, {"8TeV"}, {3}, 1.16)
743  ({"mt", "et"}, {"8TeV"}, {4}, 1.11)
744  ({"mt"}, {"8TeV"}, {5}, 1.16)
745  ({"et"}, {"8TeV"}, {5}, 1.17)
746  ({"mt"}, {"8TeV"}, {6}, 1.21)
747  ({"et"}, {"8TeV"}, {6}, 1.26)
748  ({"mt"}, {"8TeV"}, {7}, 1.51)
749  ({"et"}, {"8TeV"}, {7}, 1.56));
750 
751  src.cp().process({"VV"})
752  .AddSyst(cb, "CMS_htt_DiBosonNorm_$ERA", "lnN", SystMap<>::init(1.15));
753 
754  src.cp().process({"VV"})
755  .AddSyst(cb,
756  "CMS_htt_DiBosonNorm_$BIN_$ERA", "lnN",
758  ({"mt"}, {"7TeV"}, {6}, 1.37)
759  ({"et"}, {"7TeV"}, {6}, 1.40)
760  ({"mt"}, {"8TeV"}, {6}, 1.50)
761  ({"mt"}, {"8TeV"}, {7}, 1.45)
762  ({"et"}, {"8TeV"}, {6}, 1.39)
763  ({"et"}, {"8TeV"}, {7}, 1.33));
764 
765  src.cp().process({"QCD"})
766  .AddSyst(cb,
767  "CMS_htt_QCDSyst_$BIN_$ERA", "lnN", SystMap<channel, era, bin_id>::init
768  ({"mt"}, {"7TeV"}, {1, 2, 3, 4, 5}, 1.10)
769  ({"et"}, {"7TeV"}, {1, 2}, 1.20)
770  ({"et"}, {"7TeV"}, {3, 5}, 1.10)
771  ({"mt"}, {"7TeV"}, {6}, 1.22)
772  ({"et"}, {"7TeV"}, {6}, 1.40)
773  ({"mt"}, {"8TeV"}, {1, 2}, 1.06)
774  ({"mt"}, {"8TeV"}, {3, 4, 5}, 1.10)
775  ({"mt"}, {"8TeV"}, {6}, 1.30)
776  ({"mt"}, {"8TeV"}, {7}, 1.70)
777  ({"et"}, {"8TeV"}, {1, 2, 3, 5}, 1.10)
778  ({"et"}, {"8TeV"}, {6}, 1.30)
779  ({"et"}, {"8TeV"}, {7}, 2.00));
780 
781  src.cp().channel({"mt"}).process({"QCD"}).bin_id({3})
782  .AddSyst(cb, "CMS_htt_QCDShape_mutau_1jet_medium_$ERA", "shape",
783  SystMap<>::init(1.00));
784  src.cp().channel({"et"}).process({"QCD"}).bin_id({3})
785  .AddSyst(cb, "CMS_htt_QCDShape_etau_1jet_medium_$ERA", "shape",
786  SystMap<>::init(1.00));
787 
788  src.cp().channel({"mt"}).process({"QCD"}).bin_id({4})
789  .AddSyst(cb, "CMS_htt_QCDShape_mutau_1jet_high_lowhiggs_$ERA", "shape",
790  SystMap<>::init(1.00));
791 
792  src.cp().channel({"mt"}).process({"QCD"}).bin_id({6}).era({"7TeV"})
793  .AddSyst(cb, "CMS_htt_QCDShape_mutau_vbf_$ERA", "shape",
794  SystMap<>::init(1.00));
795  src.cp().channel({"et"}).process({"QCD"}).bin_id({6}).era({"7TeV"})
796  .AddSyst(cb, "CMS_htt_QCDShape_etau_vbf_$ERA", "shape",
797  SystMap<>::init(1.00));
798 
799  src.cp().channel({"mt"}).process({"QCD"}).bin_id({6}).era({"8TeV"})
800  .AddSyst(cb, "CMS_htt_QCDShape_mutau_vbf_loose_$ERA", "shape",
801  SystMap<>::init(1.00));
802  src.cp().channel({"et"}).process({"QCD"}).bin_id({6}).era({"8TeV"})
803  .AddSyst(cb, "CMS_htt_QCDShape_etau_vbf_loose_$ERA", "shape",
804  SystMap<>::init(1.00));
805 
806  src.cp().process({"ZJ"})
807  .AddSyst(cb, "CMS_htt_ZJetFakeTau_$BIN_$ERA", "lnN",
809  ({"et", "mt"}, {"7TeV", "8TeV"}, {1, 2, 3, 4, 5}, 1.20)
810  ({"mt"}, {"7TeV", "8TeV"}, {6}, 1.30)
811  ({"et"}, {"7TeV"}, {6}, 1.56)
812  ({"et"}, {"8TeV"}, {6}, 1.20)
813  ({"mt"}, {"8TeV"}, {7}, 1.80)
814  ({"et"}, {"8TeV"}, {7}, 1.65));
815 
816  src.cp().channel({"mt"}).process({"ZL"})
817  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_$ERA", "lnN",
818  SystMap<>::init(1.30));
819 
820 
821  src.cp().channel({"et"}).process({"ZL"}).bin_id({3, 6, 7})
822  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_low_$ERA", "lnN",
823  SystMap<bin_id>::init({3}, 1.20)({6, 7}, 1.06));
824  src.cp().channel({"et"}).process({"ZL"}).bin_id({3, 5})
825  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_met_$ERA", "lnN",
826  SystMap<>::init(1.30));
827  src.cp().channel({"et"}).process({"ZL"}).bin_id({1, 6, 7})
828  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_medium_$ERA", "lnN",
829  SystMap<bin_id>::init({1}, 1.20)({6, 7}, 1.08));
830  src.cp().channel({"et"}).process({"ZL"}).bin_id({3}).era({"8TeV"})
831  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_medium_$ERA", "lnN",
832  SystMap<bin_id>::init({3}, 1.20));
833  src.cp().channel({"et"}).process({"ZL"}).bin_id({2, 5, 6, 7})
834  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_high_$ERA", "lnN",
835  SystMap<bin_id>::init({2, 5}, 1.20)({6, 7}, 1.06));
836 
837  src.cp().channel({"mt"}).process({"ZL"})
838  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$BIN_$ERA", "lnN",
840  ({"7TeV"}, {6}, 2.00)
841  ({"8TeV"}, {5}, 1.26)
842  ({"8TeV"}, {6}, 1.70));
843 
844  src.cp().channel({"et"}).process({"ZL"})
845  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$BIN_$ERA", "lnN",
847  ({"8TeV"}, {5}, 1.30)
848  ({"8TeV"}, {6}, 1.70)
849  ({"8TeV"}, {7}, 1.74));
850 
851 
852  src.cp().channel({"mt"}).process({"ZL"})
853  .AddSyst(cb,
854  "CMS_htt_ZLScale_mutau_$ERA", "shape", SystMap<>::init(1.00));
855  src.cp().channel({"et"}).process({"ZL"})
856  .AddSyst(cb,
857  "CMS_htt_ZLScale_etau_$ERA", "shape", SystMap<>::init(1.00));
858 }
859 
861  CombineHarvester src = cb.cp();
862  src.channel({"tt"});
863 
864  auto signal = Set2Vec(cb.cp().signals().process_set());
865 
866  src.cp().signals()
867  .AddSyst(cb, "lumi_$ERA", "lnN", SystMap<era>::init
868  ({"8TeV"}, 1.026));
869 
870  src.cp().process({"ggH"})
871  .AddSyst(cb, "pdf_gg", "lnN", SystMap<>::init
872  (1.097));
873 
874  src.cp().process({"qqH", "WH", "ZH"})
875  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<process>::init
876  ({"qqH"}, 1.036)
877  ({"WH", "ZH"}, 1.020));
878 
879  src.cp().process({"ggH"})
880  .AddSyst(cb, "QCDscale_ggH1in", "lnN", SystMap<bin_id>::init
881  ({0}, 1.205)
882  ({1}, 1.175));
883 
884  src.cp().process({"ggH"})
885  .AddSyst(cb, "QCDscale_ggH2in", "lnN", SystMap<bin_id>::init
886  ({2}, 1.41));
887 
888  src.cp().process({"qqH"})
889  .AddSyst(cb, "QCDscale_qqH", "lnN", SystMap<bin_id>::init
890  ({0}, 1.012)
891  ({1}, 1.014)
892  ({2}, 1.013));
893 
894  src.cp().process({"WH", "ZH"})
895  .AddSyst(cb, "QCDscale_VH", "lnN", SystMap<bin_id>::init
896  ({0, 1, 2}, 1.04));
897 
898  src.cp().process({"qqH", "WH", "ZH"})
899  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
900  ({0}, 1.025)
901  ({1}, 0.996));
902  src.cp().process({"ggH"})
903  .AddSyst(cb, "UEPS", "lnN", SystMap<bin_id>::init
904  ({0}, 0.975)
905  ({1}, 0.993)
906  ({2}, 0.900));
907 
908  src.cp().process(JoinStr({signal, {"ZTT", "TT", "VV"}}))
909  .AddSyst(cb, "CMS_eff_t_$CHANNEL_$ERA", "lnN", SystMap<>::init(1.19));
910 
911  src.cp().process(JoinStr({signal, {"ZTT"}}))
912  .AddSyst(cb, "CMS_scale_t_tautau_$ERA", "shape", SystMap<>::init(1.00));
913 
914  src.cp()
915  .AddSyst(cb,
916  "CMS_scale_j_$ERA", "lnN", SystMap<era, bin_id, process>::init
917  ({"8TeV"}, {0}, {"qqH"}, 0.99)
918  ({"8TeV"}, {1}, {"qqH"}, 0.99)
919  ({"8TeV"}, {2}, {"ggH"}, 1.035)
920  ({"8TeV"}, {2}, {"qqH"}, 1.015)
921  ({"8TeV"}, {2}, {"WH", "ZH"}, 1.015)
922  ({"8TeV"}, {2}, {"ZL", "ZJ"}, 1.03)
923  ({"8TeV"}, {2}, {"TT"}, 1.02)
924  ({"8TeV"}, {2}, {"VV"}, 1.08));
925 
926  src.cp()
927  .AddSyst(cb, "CMS_htt_scale_met_$ERA", "lnN",
929  ({"8TeV"}, {0}, {"W"}, 1.015)
930  ({"8TeV"}, {0}, {"TT"}, 1.02)
931  ({"8TeV"}, {1}, {"TT"}, 1.02)
932  ({"8TeV"}, {1}, {signal}, 1.03)
933  ({"8TeV"}, {2}, {"W"}, 1.015));
934 
935  src.cp()
936  .AddSyst(cb, "CMS_eff_b_$ERA", "lnN", SystMap<era, bin_id, process>::init
937  ({"8TeV"}, {0}, {"TT"}, 0.93)
938  ({"8TeV"}, {1}, {"TT"}, 0.83)
939  ({"8TeV"}, {2}, {"TT"}, 0.93));
940 
941  src.cp()
942  .AddSyst(cb, "CMS_fake_b_$ERA", "lnN", SystMap<era, bin_id, process>::init
943  ({"8TeV"}, {0}, {"TT"}, 0.96)
944  ({"8TeV"}, {1}, {"TT"}, 0.83)
945  ({"8TeV"}, {2}, {"TT"}, 0.96));
946 
947  src.cp()
948  .AddSyst(cb, "CMS_htt_zttNorm_$ERA", "lnN",
950  ({"8TeV"}, {0, 1}, {"ZTT", "ZL", "ZJ"}, 1.033)
951  ({"8TeV"}, {2}, {"ZTT", "ZJ"}, 1.03));
952 
953  src.cp().process({"ZTT"})
954  .AddSyst(cb, "CMS_htt_extrap_ztt_$BIN_$ERA", "lnN", SystMap<bin_id>::init
955  ({0, 1}, 1.03)
956  ({2}, 1.10));
957 
958  src.cp().process({"TT"})
959  .AddSyst(cb, "CMS_htt_ttbarNorm_$ERA", "lnN", SystMap<>::init(1.10));
960 
961  src.cp().process({"TT"})
962  .AddSyst(cb,
963  "CMS_htt_ttbarNorm_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
964  ({"8TeV"}, {0, 1}, 1.05)
965  ({"8TeV"}, {2}, 1.24));
966 
967  src.cp().process({"W"})
968  .AddSyst(cb, "CMS_htt_WNorm_$BIN_$ERA", "lnN", SystMap<>::init(1.30));
969 
970  src.cp().process({"VV"})
971  .AddSyst(cb, "CMS_htt_DiBosonNorm_$ERA", "lnN", SystMap<>::init(1.15));
972 
973  src.cp().process({"VV"})
974  .AddSyst(cb,
975  "CMS_htt_DiBosonNorm_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
976  ({"8TeV"}, {0, 1}, 1.15)
977  ({"8TeV"}, {2}, 1.13));
978 
979  src.cp().process({"QCD"})
980  .AddSyst(cb, "CMS_htt_QCDSyst_$BIN_$ERA", "lnN", SystMap<>::init(1.35));
981 
982  src.cp().process({"ZJ"})
983  .AddSyst(cb,
984  "CMS_htt_ZJetFakeTau_$BIN_$ERA", "lnN", SystMap<>::init(1.20));
985 
986  src.cp().process({"ZL"}).bin_id({0, 1})
987  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$BIN_$ERA", "lnN",
988  SystMap<>::init(1.30));
989 }
990 }
CombineHarvester & process_rgx(std::vector< std::string > const &vec, bool cond=true)
CombineHarvester & bin_id(std::vector< int > const &vec, bool cond=true)
CombineHarvester & signals()
CombineHarvester & process(std::vector< std::string > const &vec, bool cond=true)
CombineHarvester & era(std::vector< std::string > const &vec, bool cond=true)
std::set< std::string > process_set()
void AddSyst(CombineHarvester &target, std::string const &name, std::string const &type, Map const &valmap)
CombineHarvester cp()
Creates and returns a shallow copy of the CombineHarvester instance.
CombineHarvester & channel(std::vector< std::string > const &vec, bool cond=true)
Definition: Algorithm.h:10
void AddSystematics_ee_mm(CombineHarvester &cb)
std::vector< T > Set2Vec(std::set< T > const &in)
Definition: Utilities.h:101
void AddSystematics_et_mt(CombineHarvester &cb)
std::vector< std::string > JoinStr(std::vector< std::vector< std::string >> const &in)
Definition: Utilities.cc:153
void AddSystematics_tt(CombineHarvester &cb)
void AddSystematics_em(CombineHarvester &cb)