CombineHarvester
HhhSystematics.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 
18 
20  src.channel({"et","mt"});
21 
22  auto signal = Set2Vec(cb.cp().signals().process_set());
23 
24  src.cp().signals()
25  .AddSyst(cb, "lumi_8TeV", "lnN", SystMap<>::init
26  (1.026));
27 
28  src.cp().process(JoinStr({signal,{"ZTT","ZJ","ZL","TT","VV"}})).channel({"et"})
29  .AddSyst(cb, "CMS_eff_e", "lnN", SystMap<>::init
30  (1.02));
31 
32  src.cp().process(JoinStr({signal,{"ZTT","ZJ","ZL","TT","VV"}})).channel({"mt"})
33  .AddSyst(cb, "CMS_eff_m", "lnN", SystMap<>::init
34  (1.01));
35 
36  src.cp().process(JoinStr({signal,{"ZTT","TT","VV"}})).channel({"et"})
37  .AddSyst(cb, "CMS_eff_t_etau_8TeV", "lnN", SystMap<bin_id,process>::init
38  ({0,1,2},JoinStr({signal,{"ZTT","VV","TT"}}),1.08));
39 
40  src.cp().process(JoinStr({signal,{"ZTT","TT","VV"}})).channel({"mt"})
41  .AddSyst(cb, "CMS_eff_t_mutau_8TeV", "lnN", SystMap<bin_id,process>::init
42  ({0,1,2},JoinStr({signal,{"ZTT","VV","TT"}}),1.08));
43 
44 
45  src.cp().process(JoinStr({signal,{"TT","ZL","ZJ","VV"}}))
46  .AddSyst(cb, "CMS_htt_scale_met_8TeV", "lnN", SystMap<channel,bin_id,process>::init
47  ({"et"},{0},JoinStr({signal,{"VV"}}),1.01)
48  ({"et"},{0},{"TT"},0.97)
49  ({"et"},{0},{"ZL"},0.98)
50  ({"et"},{1},{signal},0.99)
51  ({"et"},{1},{"TT"},0.98)
52  ({"et"},{1},{"ZL","ZJ"},0.96)
53  ({"et"},{1},{"VV"},0.97)
54  ({"et"},{2},{signal},1.01)
55  ({"et"},{2},{"TT"},0.96)
56  ({"mt"},{0},{signal},1.01)
57  ({"mt"},{0},{"TT"},0.97)
58  ({"mt"},{0},{"ZL"},0.93)
59  ({"mt"},{0},{"ZJ"},0.99)
60  ({"mt"},{0},{"VV"},1.04)
61  ({"mt"},{1},{signal},0.99)
62  ({"mt"},{1},{"TT"},0.98)
63  ({"mt"},{1},{"ZJ"},0.95)
64  ({"mt"},{1},{"VV"},0.96)
65  ({"mt"},{2},{signal},0.99)
66  ({"mt"},{2},{"TT"},0.97)
67  ({"mt"},{2},{"VV"},1.01));
68 
69 
70  src.cp().process(JoinStr({signal,{"ZTT"}})).channel({"et"})
71  .AddSyst(cb, "CMS_scale_t_etau_8TeV", "shape", SystMap<>::init
72  (1.00));
73 
74  src.cp().process(JoinStr({signal,{"ZTT"}})).channel({"mt"})
75  .AddSyst(cb, "CMS_scale_t_mutau_8TeV", "shape", SystMap<>::init
76  (1.00));
77 
78 
79 
80  src.cp().process(JoinStr({signal,{"ZTT","ZJ","ZL","TT","VV"}}))
81  .AddSyst(cb, "CMS_scale_j_8TeV","shape",SystMap<>::init(1.00));
82 
83 
84  src.cp().process(JoinStr({signal,{"TT","W","VV","QCD","ZL","ZJ"}}))
85  .AddSyst(cb,"CMS_eff_b_8TeV","lnN",SystMap<channel,bin_id,process>::init
86  ({"et","mt"},{0},{"TT"}, 0.95)
87  ({"et","mt"},{0},{"W"}, 1.01)
88  ({"et"},{0},{signal},0.93)
89  ({"mt"},{0},{signal},0.92)
90  ({"mt"},{0},{"VV"},0.99)
91  ({"et"},{1},{"VV","QCD"},0.97)
92  ({"et"},{1},{"W"},0.99)
93  ({"mt"},{1},JoinStr({signal,{"ZJ"}}),0.99)
94  ({"mt"},{1},{"VV"},1.02)
95  ({"mt"},{1},{"W"},1.01)
96  ({"mt"},{1},{"QCD"},0.98)
97  ({"mt"},{1},{"ZL"},1.05)
98  ({"et"},{2},JoinStr({signal,{"TT"}}),1.04)
99  ({"et"},{2},{"VV"},1.13)
100  ({"et"},{2},{"W"},0.68)
101  ({"et"},{2},{"ZL"},1.07)
102  ({"mt"},{2},JoinStr({signal,{"TT"}}),1.05)
103  ({"mt"},{2},{"VV"},1.01)
104  ({"mt"},{2},{"W"},0.28)
105  ({"mt"},{2},{"ZJ"},1.41));
106 
107 src.cp().process({"ZTT","ZL","ZJ"})
108  .AddSyst(cb,"CMS_htt_zttNorm_8TeV","lnN",SystMap<>::init(1.03));
109 
110 src.cp().process({"TT","W"})
111  .AddSyst(cb,"CMS_htt_ttbarNorm_8TeV","lnN",SystMap<bin_id,process>::init
112  ({0,1,2},{"TT"},1.10)
113  ({1},{"W"},0.75));
114 
115 src.cp().process({"VV"})
116  .AddSyst(cb,"CMS_htt_DiBosonNorm_8TeV","lnN",SystMap<>::init(1.15));
117 
118 src.cp().process({"ZL"}).channel({"et"})
119  .AddSyst(cb,"CMS_htt_ZLeptonFakeTau_etau_8TeV","lnN",SystMap<bin_id>::init
120  ({0,1},1.20)
121  ({2},1.40));
122 
123 src.cp().process({"ZL"}).channel({"mt"})
124  .AddSyst(cb,"CMS_htt_ZLeptonFakeTau_mutau_8TeV","lnN",SystMap<bin_id>::init
125  ({0},1.30)
126  ({1},1.60)
127  ({2},1.40));
128 
129 src.cp().process({"ZL","ZJ","W","VV"})
130  .AddSyst(cb,"CMS_fake_b_8TeV","lnN",SystMap<channel,bin_id,process>::init
131  ({"mt"},{0},{"VV"},0.99)
132  ({"et"},{1},{"ZL"},1.01)
133  ({"et"},{1},{"ZJ"},1.04)
134  ({"mt"},{1},{"VV"},1.03)
135  ({"mt"},{1},{"ZL"},1.04)
136  ({"mt"},{1},{"ZJ"},1.02)
137  ({"et"},{2},{"W"},0.95)
138  ({"mt"},{2},{"VV"},1.01)
139  ({"mt"},{2},{"W"},0.96));
140 
141 src.cp().process({"W"}).bin_id({0}).channel({"et"})
142  .AddSyst(cb,"CMS_htt_WNorm_etau_2jet0tag_8TeV","lnN",SystMap<>::init(1.10));
143 
144 src.cp().process({"ZTT"}).bin_id({0}).channel({"et"})
145  .AddSyst(cb,"CMS_htt_extrap_ztt_etau_2jet0tag_8TeV","lnN",SystMap<>::init(1.05));
146 
147 src.cp().process({"QCD"}).bin_id({0}).channel({"et"})
148  .AddSyst(cb,"CMS_htt_QCDSyst_etau_2jet0tag_8TeV","lnN", SystMap<>::init(1.20));
149 
150 src.cp().process({"ZJ"}).bin_id({0}).channel({"et"})
151  .AddSyst(cb,"CMS_htt_ZJetFakeTau_etau_2jet0tag_8TeV","lnN",SystMap<>::init(1.20));
152 
153 src.cp().process({"W"}).bin_id({0}).channel({"mt"})
154  .AddSyst(cb,"CMS_htt_WNorm_mutau_2jet0tag_8TeV","lnN",SystMap<>::init(1.10));
155 
156 src.cp().process({"ZTT"}).bin_id({0}).channel({"mt"})
157  .AddSyst(cb,"CMS_htt_extrap_ztt_mutau_2jet0tag_8TeV","lnN",SystMap<>::init(1.05));
158 
159 src.cp().process({"QCD"}).bin_id({0}).channel({"mt"})
160  .AddSyst(cb,"CMS_htt_QCDSyst_mutau_2jet0tag_8TeV","lnN", SystMap<>::init(1.20));
161 
162 src.cp().process({"ZJ"}).bin_id({0}).channel({"mt"})
163  .AddSyst(cb,"CMS_htt_ZJetFakeTau_mutau_2jet0tag_8TeV","lnN",SystMap<>::init(1.20));
164 
165 
166 src.cp().process({"W"}).bin_id({1}).channel({"et"})
167  .AddSyst(cb,"CMS_htt_WNorm_etau_2jet1tag_8TeV","lnN",SystMap<>::init(1.30));
168 
169 src.cp().process({"ZTT"}).bin_id({1}).channel({"et"})
170  .AddSyst(cb,"CMS_htt_extrap_ztt_etau_2jet1tag_8TeV","lnN",SystMap<>::init(1.05));
171 
172 src.cp().process({"ZTT"}).channel({"mt"})
173  .AddSyst(cb,"CMS_htt_ttbar_emb_mutau_8TeV","lnN",SystMap<bin_id>::init
174  ({1},1.08)
175  ({2},1.27));
176 
177 src.cp().process({"ZTT"}).channel({"et"})
178  .AddSyst(cb,"CMS_htt_ttbar_emb_etau_8TeV","lnN",SystMap<bin_id>::init
179  ({1},1.08)
180  ({2},1.32));
181 
182 src.cp().process({"QCD"}).bin_id({1}).channel({"et"})
183  .AddSyst(cb,"CMS_htt_QCDSyst_etau_2jet1tag_8TeV","lnN",SystMap<>::init(1.40));
184 
185 src.cp().process({"ZJ"}).bin_id({1}).channel({"et"})
186  .AddSyst(cb,"CMS_htt_ZJetFakeTau_etau_2jet1tag_8TeV","lnN",SystMap<>::init(1.25));
187 
188 src.cp().process({"W"}).bin_id({1}).channel({"mt"})
189  .AddSyst(cb,"CMS_htt_WNorm_mutau_2jet1tag_8TeV","lnN",SystMap<>::init(1.30));
190 
191 src.cp().process({"ZTT"}).bin_id({1}).channel({"mt"})
192  .AddSyst(cb,"CMS_htt_extrap_ztt_mutau_2jet1tag_8TeV","lnN",SystMap<>::init(1.05));
193 
194 src.cp().process({"QCD"}).bin_id({1}).channel({"mt"})
195  .AddSyst(cb,"CMS_htt_QCDSyst_mutau_2jet1tag_8TeV","lnN",SystMap<>::init(1.40));
196 
197 src.cp().process({"ZJ"}).bin_id({1}).channel({"mt"})
198  .AddSyst(cb,"CMS_htt_ZJetFakeTau_mutau_2jet1tag_8TeV","lnN",SystMap<>::init(1.20));
199 
200 
201 src.cp().process({"W"}).bin_id({2}).channel({"et"})
202  .AddSyst(cb,"CMS_htt_WNorm_etau_2jet2tag_8TeV","lnN",SystMap<>::init(2.00));
203 
204 src.cp().process({"ZTT"}).bin_id({2}).channel({"et"})
205  .AddSyst(cb,"CMS_htt_extrap_ztt_etau_2jet2tag_8TeV","lnN",SystMap<>::init(1.06));
206 
207 src.cp().process({"QCD"}).bin_id({2}).channel({"et"})
208  .AddSyst(cb,"CMS_htt_QCDSyst_etau_2jet2tag_8TeV","lnN",SystMap<>::init(2.00));
209 
210 src.cp().process({"ZJ"}).bin_id({2}).channel({"et"})
211  .AddSyst(cb,"CMS_htt_ZJetFakeTau_etau_2jet2tag_8TeV","lnN",SystMap<>::init(1.70));
212 
213 src.cp().process({"W"}).bin_id({2}).channel({"mt"})
214  .AddSyst(cb,"CMS_htt_WNorm_mutau_2jet2tag_8TeV","lnN",SystMap<>::init(2.00));
215 
216 src.cp().process({"ZTT"}).bin_id({2}).channel({"mt"})
217  .AddSyst(cb,"CMS_htt_extrap_ztt_mutau_2jet2tag_8TeV","lnN",SystMap<>::init(1.06));
218 
219 src.cp().process({"QCD"}).bin_id({2}).channel({"mt"})
220  .AddSyst(cb,"CMS_htt_QCDSyst_mutau_2jet2tag_8TeV","lnN",SystMap<>::init(1.60));
221 
222 src.cp().process({"ZJ"}).bin_id({2}).channel({"mt"})
223  .AddSyst(cb,"CMS_htt_ZJetFakeTau_mutau_2jet2tag_8TeV","lnN",SystMap<>::init(1.90));
224 
225 }
226 
228 
229  CombineHarvester src = cb.cp();
230  AddSystematics_hhh_et_mt(cb, src);
231 
232 }
233 
234 
236  src.channel({"tt"});
237 
238  auto signal = Set2Vec(cb.cp().signals().process_set());
239 
240  src.cp().signals()
241  .AddSyst(cb, "lumi_8TeV", "lnN", SystMap<>::init(1.026));
242 
243  src.cp().process(JoinStr({signal,{"TT","VV","ZTT","W"}}))
244  .AddSyst(cb, "CMS_eff_t_tautau_8TeV", "lnN", SystMap<process>::init
245  (JoinStr({signal,{"TT","VV","ZTT"}}),1.190)
246  ({"W"}, 1.095));
247 
248  src.cp().process(JoinStr({signal,{"ZTT","W"}}))
249  .AddSyst(cb, "CMS_scale_t_tautau_8TeV", "shape", SystMap<>::init(1.00));
250 
251  src.cp().process(JoinStr({signal,{"TT","VV","W","ZLL","ZTT"}}))
252  .AddSyst(cb, "CMS_scale_j_8TeV", "shape", SystMap<>::init(1.00));
253 
254  src.cp().process(JoinStr({signal,{"TT"}}))
255  .AddSyst(cb, "CMS_eff_b_8TeV", "lnN", SystMap<bin_id,process>::init
256  ({0}, signal, 0.944)
257  ({0}, {"TT"}, 0.949)
258  ({1}, signal, 0.980)
259  ({2}, {"TT"}, 1.042)
260  ({2}, signal, 1.049));
261 
262  src.cp().process({"TT","ZTT"})
263  .AddSyst(cb, "CMS_htt_ttbarNorm_8TeV", "lnN", SystMap<bin_id,process>::init
264  ({0,1,2}, {"TT"}, 1.100)
265  ({1}, {"ZTT"}, 0.949)
266  ({2}, {"ZTT"}, 0.494));
267 
268  src.cp().process({"VV"})
269  .AddSyst(cb, "CMS_htt_DiBosonNorm_8TeV", "lnN", SystMap<>::init(1.150));
270 
271  src.cp().process({"W"}).bin_id({0})
272  .AddSyst(cb, "CMS_WNorm_tautau_8TeV", "lnN", SystMap<>::init(1.200));
273 
274  src.cp().process({"QCD"}).bin_id({0})
275  .AddSyst(cb, "CMS_htt_QCDSyst_tautau_2jet0tag_8TeV", "lnN", SystMap<>::init(1.100));
276 
277  src.cp().process({"QCD"}).bin_id({1})
278  .AddSyst(cb, "CMS_htt_QCDSyst_tautau_2jet1tag_8TeV", "lnN", SystMap<>::init(1.200));
279 
280  src.cp().process({"QCD"}).bin_id({2})
281  .AddSyst(cb, "CMS_htt_QCDSyst_tautau_2jet2tag_8TeV", "lnN", SystMap<>::init(1.400));
282 
283  src.cp().process({"ZTT","ZLL"})
284  .AddSyst(cb, "CMS_htt_zttNorm_8TeV", "lnN", SystMap<>::init(1.033));
285 
286  src.cp().process({"ZTT"}).bin_id({0})
287  .AddSyst(cb, "CMS_htt_extrap_ztt_tautau_2jet0tag_8TeV", "lnN", SystMap<>::init(1.057));
288 
289  src.cp().process({"ZTT"}).bin_id({1})
290  .AddSyst(cb, "CMS_htt_extrap_ztt_tautau_2jet1tag_8TeV", "lnN", SystMap<>::init(1.252));
291 
292  src.cp().process({"ZTT"}).bin_id({2})
293  .AddSyst(cb, "CMS_htt_extrap_ztt_tautau_2jet2tag_8TeV", "lnN", SystMap<>::init(2.749));
294 
295  src.cp().process({"ZLL"}).bin_id({0})
296  .AddSyst(cb, "CMS_htt_ZLL_FakeTau_tautau_2jet0tag_8TeV", "lnN", SystMap<>::init(1.301));
297 
298  src.cp().process({"ZLL"}).bin_id({1})
299  .AddSyst(cb, "CMS_htt_ZLL_FakeTau_tautau_2jet1tag_8TeV", "lnN", SystMap<>::init(1.515));
300 
301  src.cp().process({"ZLL"}).bin_id({2})
302  .AddSyst(cb, "CMS_htt_ZLL_FakeTau_tautau_2jet2tag_8TeV", "lnN", SystMap<>::init(1.671));
303 
304  }
306 
307  CombineHarvester src = cb.cp();
308  AddSystematics_hhh_tt(cb, src);
309 
310  }
311 }
CombineHarvester & signals()
CombineHarvester & process(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_hhh_et_mt(CombineHarvester &cb, CombineHarvester src)
std::vector< T > Set2Vec(std::set< T > const &in)
Definition: Utilities.h:101
std::vector< std::string > JoinStr(std::vector< std::vector< std::string >> const &in)
Definition: Utilities.cc:153
void AddSystematics_hhh_tt(CombineHarvester &cb, CombineHarvester src)