CombineHarvester
HttSystematics_MSSMLegacy.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 
21  auto signal = Set2Vec(src.cp().signals().SetFromProcs(
22  std::mem_fn(&Process::process)));
23 
24  src.cp().signals()
25  .AddSyst(cb, "lumi_$ERA", "lnN", SystMap<era>::init
26  ({"7TeV"}, 1.026)
27  ({"8TeV"}, 1.026));
28 
29  src.cp().process(JoinStr({signal, {"ZTT", "ZL", "ZJ", "TT", "VV"}}))
30  .AddSyst(cb, "CMS_eff_m", "lnN", SystMap<>::init(1.02));
31 
32  src.cp().process(JoinStr({signal, {"ZTT", "TT", "VV"}}))
33  .AddSyst(cb, "CMS_eff_t_$CHANNEL_$ERA", "lnN", SystMap<>::init(1.08));
34 
35  src.cp().process(JoinStr({signal, {"ZTT"}}))
36  .AddSyst(cb, "CMS_scale_t_mutau_$ERA", "shape", SystMap<>::init(1.00));
37 
38  src.cp().process(JoinStr({signal})).AddSyst(
39  cb, "CMS_eff_t_mssmHigh_mutau_$ERA", "shape", SystMap<>::init(1.00));
40 
41  src.cp()
42  .AddSyst(cb,
43  "CMS_scale_j_$ERA", "lnN", SystMap<era, bin_id, process>::init
44  ({"7TeV"}, {9}, {"ggH"}, 1.05)
45  ({"7TeV"}, {9}, {"bbH"}, 0.96)
46  ({"7TeV"}, {9}, {"TT"}, 1.10)
47  ({"7TeV"}, {9}, {"VV"}, 1.03)
48  ({"8TeV"}, {8}, {"bbH", "TT"}, 0.99)
49  ({"8TeV"}, {9}, {"ggH"}, 0.99)
50  ({"8TeV"}, {9}, {"bbH"}, 1.01)
51  ({"8TeV"}, {9}, {"TT"}, 0.92)
52  ({"8TeV"}, {9}, {"VV", "ZL", "ZJ"}, 0.98)
53  );
54 
55  src.cp()
56  .AddSyst(cb, "CMS_htt_scale_met_$ERA", "lnN",
58  ({"7TeV"}, {8}, {signal}, 1.05)
59  ({"7TeV"}, {8}, {"ZL", "ZJ"}, 1.05)
60  ({"7TeV"}, {8}, {"TT", "VV"}, 1.07)
61  ({"7TeV"}, {9}, {signal}, 1.05)
62  ({"7TeV"}, {9}, {"TT", "VV"}, 1.07)
63  ({"8TeV"}, {8}, {signal}, 0.99)
64  ({"8TeV"}, {8}, {"TT", "ZL", "ZJ"}, 1.01)
65  ({"8TeV"}, {9}, {signal}, 0.99)
66  ({"8TeV"}, {9}, {"TT", "W", "ZL", "ZJ"}, 1.01));
67 
68  src.cp()
69  .AddSyst(cb, "CMS_eff_b_$ERA", "lnN", SystMap<era, bin_id, process>::init
70  ({"7TeV"}, {8}, {signal}, 0.99)
71  ({"7TeV"}, {8}, {"ZL", "ZJ", "TT", "VV"}, 0.99)
72  ({"7TeV"}, {9}, {signal}, 1.06)
73  ({"7TeV"}, {9}, {"ZL", "ZJ", "TT", "VV"}, 1.06)
74  ({"8TeV"}, {8}, {"bbH"}, 0.99)
75  ({"8TeV"}, {8}, {"VV"}, 0.98)
76  ({"8TeV"}, {8}, {"TT"}, 0.95)
77  ({"8TeV"}, {9}, {"bbH"}, 1.03)
78  ({"8TeV"}, {9}, {"ggH"}, 1.01)
79  ({"8TeV"}, {9}, {"ZL", "VV"}, 1.04)
80  ({"8TeV"}, {9}, {"TT"}, 1.02));
81 
82  src.cp()
83  .AddSyst(cb, "CMS_fake_b_$ERA", "lnN", SystMap<era, bin_id, process>::init
84  ({"7TeV"}, {8}, {signal}, 0.99)
85  ({"7TeV"}, {8}, {"ZL", "ZJ", "TT", "VV"}, 0.99)
86  ({"7TeV"}, {9}, {signal}, 1.01)
87  ({"7TeV"}, {9}, {"ZL", "ZJ", "TT", "VV"}, 1.01)
88  ({"8TeV"}, {8}, {"VV"}, 0.99)
89  ({"8TeV"}, {8}, {"TT"}, 0.97)
90  ({"8TeV"}, {9}, {"ggH"}, 1.05)
91  ({"8TeV"}, {9}, {"TT", "VV"}, 1.01)
92  ({"8TeV"}, {9}, {"ZL"}, 1.05)
93  ({"8TeV"}, {9}, {"ZJ"}, 1.09));
94 
95  src.cp().process({"ZTT", "ZL", "ZJ"})
96  .AddSyst(cb, "CMS_htt_zttNorm_$ERA", "lnN", SystMap<>::init(1.03));
97 
98  src.cp().process({"ZTT"})
99  .AddSyst(cb, "CMS_htt_extrap_ztt_$BIN_$ERA", "lnN", SystMap<bin_id>::init
100  ({9}, 1.03));
101 
102  src.cp().process({"TT"})
103  .AddSyst(cb, "CMS_htt_ttbarNorm_$ERA", "lnN", SystMap<era, bin_id>::init
104  ({"7TeV"}, {8, 9}, 1.08)
105  ({"8TeV"}, {8, 9}, 1.10));
106 
107  src.cp().process({"TT"})
108  .AddSyst(cb,
109  "CMS_htt_ttbar_emb_$ERA", "lnN", SystMap<era, bin_id>::init
110  ({"7TeV", "8TeV"}, {9}, 1.14));
111 
112  src.cp().process({"W"})
113  .AddSyst(cb, "CMS_htt_WNorm_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
114  ({"7TeV"}, {8}, 1.10)
115  ({"7TeV"}, {9}, 1.30)
116  ({"8TeV"}, {8}, 1.10)
117  ({"8TeV"}, {9}, 1.30));
118 
119  src.cp().process({"W"}).bin_id({8})
120  .AddSyst(cb, "CMS_htt_WShape_mutau_nobtag_$ERA", "shape",
121  SystMap<>::init(1.00));
122  src.cp().process({"W"}).bin_id({9})
123  .AddSyst(cb, "CMS_htt_WShape_mutau_btag_$ERA", "shape",
124  SystMap<>::init(1.00));
125 
126  src.cp().process({"VV"})
127  .AddSyst(cb, "CMS_htt_DiBosonNorm_$ERA", "lnN", SystMap<>::init(1.15));
128 
129  src.cp().process({"QCD"})
130  .AddSyst(cb,
131  "CMS_htt_QCDSyst_$BIN_$ERA", "lnN", SystMap<era, bin_id>::init
132  ({"7TeV"}, {8}, 1.10)
133  ({"7TeV"}, {9}, 1.20)
134  ({"8TeV"}, {8}, 1.10)
135  ({"8TeV"}, {9}, 1.20));
136 
137  src.cp().process({"QCD"}).bin_id({8})
138  .AddSyst(cb, "CMS_htt_QCDShape_mutau_nobtag_$ERA", "shape",
139  SystMap<>::init(1.00));
140  src.cp().process({"QCD"}).bin_id({9})
141  .AddSyst(cb, "CMS_htt_QCDShape_mutau_btag_$ERA", "shape",
142  SystMap<>::init(1.00));
143 
144  src.cp().process({"ZJ"})
145  .AddSyst(cb, "CMS_htt_ZJetFakeTau_$BIN_$ERA", "lnN", SystMap<bin_id>::init
146  ({8}, 1.20)
147  ({9}, 1.20));
148 
149  src.cp().process({"ZL"})
150  .AddSyst(cb, "CMS_htt_ZLeptonFakeTau_$CHANNEL_$ERA", "lnN",
151  SystMap<>::init(1.30));
152 
153  src.cp().process({"ZL"})
154  .AddSyst(cb,
155  "CMS_htt_ZLScale_mutau_$ERA", "shape", SystMap<>::init(1.00));
156 }
157 
159 
160  CombineHarvester src = cb.cp();
161  AddMSSMSystematics(cb, src);
162 
163 }
164 
165 }
CombineHarvester & signals()
CombineHarvester & process(std::vector< std::string > const &vec, bool cond=true)
std::set< R > SetFromProcs(T func)
Fill an std::set using only the Process entries.
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.
virtual std::string const & process() const
Definition: Object.h:20
Definition: Algorithm.h:10
std::vector< T > Set2Vec(std::set< T > const &in)
Definition: Utilities.h:101
void AddMSSMSystematics(CombineHarvester &cb, CombineHarvester src)
std::vector< std::string > JoinStr(std::vector< std::vector< std::string >> const &in)
Definition: Utilities.cc:153