CombineHarvester
AZhSystematics.cc
Go to the documentation of this file.
1 #include <vector>
2 #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 
19 
21  src.channel({"et","mt","em","tt"});
22  //category 0 = ee, 1 = mm
23 
24  auto signal = Set2Vec(cb.cp().signals().process_set());
25 
26  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}}))
27  .AddSyst(cb, "lumi_8TeV", "lnN", SystMap<>::init
28  (1.026));
29 
30  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}}))
31  .AddSyst(cb, "CMS_eff_e_8TeV", "lnN", SystMap<channel,bin_id>::init
32  ({"et"}, {0}, 1.06)
33  ({"et"}, {1}, 1.02)
34  ({"em"}, {0}, 1.06)
35  ({"em"}, {1}, 1.02)
36  ({"mt"}, {0}, 1.04)
37  ({"tt"}, {0}, 1.04));
38 
39  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}}))
40  .AddSyst(cb, "CMS_eff_m_8TeV", "lnN", SystMap<channel,bin_id>::init
41  ({"et"}, {1}, 1.04)
42  ({"em"}, {0}, 1.02)
43  ({"em"}, {1}, 1.06)
44  ({"mt"}, {0}, 1.02)
45  ({"mt"}, {1}, 1.06)
46  ({"tt"}, {1}, 1.04));
47 
48  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}})).channel({"et","mt"})
49  .AddSyst(cb, "CMS_eff_t_llet_8TeV", "lnN", SystMap<>::init
50  (1.06));
51 
52  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}})).channel({"tt"})
53  .AddSyst(cb, "CMS_eff_t_lltt_8TeV", "lnN", SystMap<>::init
54  (1.12));
55 
56  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}})).bin_id({0})
57  .AddSyst(cb, "CMS_trigger_e_8TeV", "lnN", SystMap<>::init
58  (1.01));
59 
60  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}})).bin_id({1})
61  .AddSyst(cb, "CMS_trigger_m_8TeV", "lnN", SystMap<>::init
62  (1.01));
63 
64  src.cp().process(JoinStr({signal,{"GGToZZ2L2L","ZH_ww125","ZH_ww125","ZZ","TTZ","WWZ","WZZ","ZZZ"}}))
65  .AddSyst(cb, "CMS_fake_b_8TeV", "lnN", SystMap<>::init
66  (1.01));
67 
68  src.cp().process({"ZZ"})
69  .AddSyst(cb, "QCDscale_VV", "lnN", SystMap<>::init
70  (1.06));
71 
72  src.cp().process({"ZZ"})
73  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<>::init
74  (1.05));
75 
76  src.cp().process({"ZZ_tt125"})
77  .AddSyst(cb, "CMS_htt_SM125_mu", "lnN", SystMap<>::init
78  (1.30));
79 
80  src.cp().process({"ZZ_ww125"})
81  .AddSyst(cb, "CMS_hww_SM125_mu", "lnN", SystMap<>::init
82  (1.20));
83 
84  src.cp().process({"ZZ_tt125,ZZ_ww125"})
85  .AddSyst(cb, "QCDscale_VH", "lnN", SystMap<>::init
86  (1.031));
87 
88  src.cp().process({"ZZ_tt125,ZZ_ww125"})
89  .AddSyst(cb, "pdf_qqbar", "lnN", SystMap<>::init
90  (1.025));
91 
92  src.cp().process({"Zjets"}).channel({"et","mt"})
93  .AddSyst(cb, "CMS_zh2l2tau_ZjetBkg_lt_extrap_8TeV", "lnN", SystMap<>::init
94  (1.20));
95 
96  src.cp().process({"Zjets"}).channel({"em"})
97  .AddSyst(cb, "CMS_zh2l2tau_ZjetBkg_emu_extrap_8TeV", "lnN", SystMap<>::init
98  (1.50));
99 
100  src.cp().process({"Zjets"}).channel({"tt"})
101  .AddSyst(cb, "CMS_zh2l2tau_ZjetBkg_tt_extrap_8TeV", "lnN", SystMap<>::init
102  (1.15));
103 
104  src.cp().process({"Zjets"}).channel({"mt"})
105  .AddSyst(cb, "CMS_zh2l2tau_ZjetBkg_mu_extrap_8TeV", "lnN", SystMap<>::init
106  (1.10));
107 
108  src.cp().process({"Zjets"}).channel({"et"})
109  .AddSyst(cb, "CMS_zh2l2tau_ZjetBkg_e_extrap_8TeV", "lnN", SystMap<>::init
110  (1.10));
111 
112  src.cp().process(JoinStr({signal,{"ZZ","GGToZZ2L2L","TTZ","WWZ","WZZ","ZZZ","ZH_ww125","ZH_tt125"}})).channel({"et"})
113  .AddSyst(cb, "CMS_scale_t_llet_8TeV", "shape", SystMap<>::init
114  (1.00));
115 
116  src.cp().process(JoinStr({signal,{"ZZ","GGToZZ2L2L","TTZ","WWZ","WZZ","ZZZ","ZH_ww125","ZH_tt125"}})).channel({"mt"})
117  .AddSyst(cb, "CMS_scale_t_llmt_8TeV", "shape", SystMap<>::init
118  (1.00));
119 
120  src.cp().process(JoinStr({signal,{"ZZ","GGToZZ2L2L","TTZ","WWZ","WZZ","ZZZ","ZH_ww125","ZH_tt125"}})).channel({"tt"})
121  .AddSyst(cb, "CMS_scale_t_lltt_8TeV", "shape", SystMap<>::init
122  (1.00));
123 
124  src.cp().process({"GGToZZ2L2L"})
125  .AddSyst(cb, "CMS_zh2l2tau_GGZZ2L2LBkg_8TeV", "lnN", SystMap<>::init
126  (1.44));
127 
128  src.cp().process({"TTZ"})
129  .AddSyst(cb, "CMS_zh2l2tau_TTZBkg_8TeV", "lnN", SystMap<>::init
130  (1.50));
131 
132  src.cp().process({"GGToZZ2L2L"}).channel({"em"})
133  .AddSyst(cb, "CMS_vhtt_ggZZNorm_em_8TeV", "lnN", SystMap<>::init
134  (1.05));
135 
136  src.cp().process({"TTZ"}).channel({"em"})
137  .AddSyst(cb, "CMS_vhtt_ttZNorm_em_8TeV", "lnN", SystMap<>::init
138  (1.15));
139 
140  src.cp().process({"ZZ"}).channel({"em"})
141  .AddSyst(cb, "CMS_vhtt_zzNorm_em_8TeV", "lnN", SystMap<>::init
142  (1.05));
143 
144  src.cp().process({"WWZ"})
145  .AddSyst(cb, "CMS_vhtt_wwzNorm_8TeV", "lnN", SystMap<>::init
146  (1.50));
147 
148  src.cp().process({"WZZ"})
149  .AddSyst(cb, "CMS_vhtt_wzzNorm_8TeV", "lnN", SystMap<>::init
150  (1.50));
151 
152  src.cp().process({"ZZZ"})
153  .AddSyst(cb, "CMS_vhtt_zzzNorm_8TeV", "lnN", SystMap<>::init
154  (1.50));
155 
156  src.cp().process({"GGToZZ2L2L"}).channel({"mt"})
157  .AddSyst(cb, "CMS_vhtt_ggZZNorm_mt_8TeV", "lnN", SystMap<>::init
158  (1.05));
159 
160  src.cp().process({"TTZ"}).channel({"mt"})
161  .AddSyst(cb, "CMS_vhtt_ttZNorm_mt_8TeV", "lnN", SystMap<>::init
162  (1.30));
163 
164  src.cp().process({"ZZ"}).channel({"mt"})
165  .AddSyst(cb, "CMS_vhtt_zzNorm_mt_8TeV", "lnN", SystMap<>::init
166  (1.05));
167 
168  src.cp().process({"GGToZZ2L2L"}).channel({"et"})
169  .AddSyst(cb, "CMS_vhtt_ggZZNorm_et_8TeV", "lnN", SystMap<>::init
170  (1.05));
171 
172  src.cp().process({"TTZ"}).channel({"et"})
173  .AddSyst(cb, "CMS_vhtt_ttZNorm_et_8TeV", "lnN", SystMap<>::init
174  (1.30));
175 
176  src.cp().process({"ZZ"}).channel({"et"})
177  .AddSyst(cb, "CMS_vhtt_zzNorm_et_8TeV", "lnN", SystMap<>::init
178  (1.05));
179 
180  src.cp().process({"GGToZZ2L2L"}).channel({"tt"})
181  .AddSyst(cb, "CMS_vhtt_ggZZNorm_tt_8TeV", "lnN", SystMap<>::init
182  (1.05));
183 
184  src.cp().process({"TTZ"}).channel({"tt"})
185  .AddSyst(cb, "CMS_vhtt_ttZNorm_tt_8TeV", "lnN", SystMap<>::init
186  (1.30));
187 
188  src.cp().process({"ZZ"}).channel({"tt"})
189  .AddSyst(cb, "CMS_vhtt_zzNorm_tt_8TeV", "lnN", SystMap<>::init
190  (1.05));
191 
192 }
193 
195 
196  CombineHarvester src = cb.cp();
197  AddSystematics_AZh(cb, src);
198 
199 }
200 }
201 
CombineHarvester & bin_id(std::vector< int > const &vec, bool cond=true)
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
std::vector< T > Set2Vec(std::set< T > const &in)
Definition: Utilities.h:101
void AddSystematics_AZh(CombineHarvester &cb, CombineHarvester src)
std::vector< std::string > JoinStr(std::vector< std::vector< std::string >> const &in)
Definition: Utilities.cc:153