21 int color,
const set<string> &files,
const string &cut =
"1"){
22 return make_shared<Process>(process_name, type, color,
23 unique_ptr<Baby>(
new T(files)),
28 gErrorIgnoreLevel = 6000;
33 string trig_mc =
"/net/cms2/cms2r0/babymaker/babies/2016_05_31/mc/unskimmed/";
35 string trig_skim1l_mc =
"/net/cms2/cms2r0/babymaker/babies/2016_06_09/mc/skim_1lht500met200/";
36 string trig_skim0l_mc =
"/net/cms2/cms2r0/babymaker/babies/2016_05_31/mc/skim_qcd/";
37 string trig_skim2l_mc =
"/net/cms2/cms2r0/babymaker/babies/2016_05_31/mc/skim_dy_ht300/";
39 Palette colors(
"txt/colors.txt",
"default");
42 {trig_skim1l_mc+
"*_TTJets*Lept*.root", trig_skim1l_mc+
"*_TTJets_HT*.root"},
"ntruleps<=1&&stitch");
44 {trig_skim1l_mc+
"*_TTJets*Lept*.root", trig_skim1l_mc+
"*_TTJets_HT*.root"},
"ntruleps>=2&&stitch");
46 {trig_skim1l_mc+
"*_WJetsToLNu*.root"});
48 {trig_skim1l_mc+
"*_ST_*.root"});
50 {trig_skim1l_mc+
"*_TTWJets*.root", trig_skim1l_mc+
"*_TTZTo*.root"});
52 {trig_skim1l_mc+
"*DYJetsToLL*.root", trig_skim1l_mc+
"*_QCD_HT*.root",
53 trig_skim1l_mc+
"*_ZJet*.root", trig_skim1l_mc+
"*_WWTo*.root",
54 trig_skim1l_mc+
"*ggZH_HToBB*.root", trig_skim1l_mc+
"*ttHJetTobb*.root",
55 trig_skim1l_mc+
"*_TTGJets*.root", trig_skim1l_mc+
"*_TTTT_*.root",
56 trig_skim1l_mc+
"*_WH_HToBB*.root", trig_skim1l_mc+
"*_WZTo*.root",
57 trig_skim1l_mc+
"*_ZH_HToBB*.root", trig_skim1l_mc+
"_ZZ_*.root"});
60 {trig_mc+
"*SMS-T1tttt_mGluino-1500_mLSP-100*.root"});
62 {trig_mc+
"*SMS-T1tttt_mGluino-1200_mLSP-800*.root"});
63 t1tttt_c->SetLineStyle(2);
68 {
"/net/cms2/cms2r0/babymaker/babies/2016_06_14/data/skim_standard/*.root"},
"pass&&(trig[4]||trig[8]||trig[13]||trig[33])");
69 vector<shared_ptr<Process> > full_trig_skim_1l = {data_1l,
tt1l,
tt2l, wjets, single_t, ttv, other};
75 {trig_skim0l_mc+
"*_TTJets_TuneCUETP8M1_13TeV*.root"});
77 {trig_skim0l_mc+
"*_QCD_HT700to1000*.root",trig_skim0l_mc+
"*_QCD_HT1000to1500*.root",
78 trig_skim0l_mc+
"*_QCD_HT1500to2000*.root",trig_skim0l_mc+
"*_QCD_HT2000toInf*.root"});
80 {trig_skim0l_mc+
"*_TTWJet*root", trig_skim0l_mc+
"*_TTZTo*.root",
81 trig_skim0l_mc+
"*_ZJet*.root", trig_skim0l_mc+
"*_WWTo*.root",
82 trig_skim0l_mc+
"*ggZH_HToBB*.root", trig_skim0l_mc+
"*ttHJetTobb*.root",
83 trig_skim0l_mc+
"*_TTGJets*.root", trig_skim0l_mc+
"*_TTTT_*.root",
84 trig_skim0l_mc+
"*_WH_HToBB*.root", trig_skim0l_mc+
"*_WZTo*.root",
85 trig_skim0l_mc+
"*_ST_*.root", trig_skim0l_mc+
"*_WJetsToLNu*.root",
86 trig_skim0l_mc+
"*_ZH_HToBB*.root", trig_skim0l_mc+
"_ZZ_*.root",
87 trig_skim0l_mc+
"*_DYJetsToLL*HT*.root"});
90 {
"/net/cms2/cms2r0/babymaker/babies/2016_06_05/data/jetht/skim_qcd/*.root"},
"pass&&trig[12]");
91 vector<shared_ptr<Process> > full_trig_skim_0l = {data_0l, qcd_0l, tt_0l, other_0l};
97 {trig_skim2l_mc+
"*_TTJets*Lept*.root"},
100 {trig_skim2l_mc+
"*_TTJets*Lept*.root"},
103 {trig_skim2l_mc+
"*_DYJetsToLL*HT*.root"});
105 {trig_skim2l_mc+
"*_TTWJet*root", trig_skim2l_mc+
"*_TTZTo*.root",
106 trig_skim2l_mc+
"*_ZJet*.root", trig_skim2l_mc+
"*_WWTo*.root",
107 trig_skim2l_mc+
"*ggZH_HToBB*.root", trig_skim2l_mc+
"*ttHJetTobb*.root",
108 trig_skim2l_mc+
"*_TTGJets*.root", trig_skim2l_mc+
"*_TTTT_*.root",
109 trig_skim2l_mc+
"*_WH_HToBB*.root", trig_skim2l_mc+
"*_WZTo*.root",
110 trig_skim2l_mc+
"*_ST_*.root", trig_skim2l_mc+
"*_WJetsToLNu*.root",
111 trig_skim2l_mc+
"*_ZH_HToBB*.root", trig_skim2l_mc+
"_ZZ_*.root",
112 trig_skim2l_mc+
"*_QCD_HT700to1000*.root",trig_skim2l_mc+
"*_QCD_HT1000to1500*.root",
113 trig_skim2l_mc+
"*_QCD_HT1500to2000*.root",trig_skim2l_mc+
"*_QCD_HT2000toInf*.root"});
116 {
"/net/cms2/cms2r0/babymaker/babies/2016_06_05/data/singlelep/combined/*.root"},
"pass&&(trig[20]||trig[22])");
117 vector<shared_ptr<Process> > full_trig_skim_2l = {data_2l, tt1l_2l, tt2l_2l, dy_2l, other_2l};
120 PlotOpt log_lumi(
"txt/plot_styles.txt",
"CMSPaper");
121 log_lumi.
Title(TitleType::preliminary)
122 .
Bottom(BottomType::ratio)
123 .
YAxis(YAxisType::log)
124 .
Stack(StackType::data_norm);
126 PlotOpt log_shapes = log_lumi().
Stack(StackType::shapes)
129 PlotOpt lin_shapes = log_shapes().
YAxis(YAxisType::linear);
130 PlotOpt log_lumi_info = log_lumi().
Title(TitleType::info);
131 PlotOpt lin_lumi_info = lin_lumi().
Title(TitleType::info);
132 PlotOpt log_shapes_info = log_shapes().
Title(TitleType::info);
133 PlotOpt lin_shapes_info = lin_shapes().
Title(TitleType::info);
134 vector<PlotOpt> all_plot_types = {log_lumi_info, lin_lumi_info};
137 string lowmtcut =
"ht>500&&met>200&&mt<140";
138 string lowmjcut =
"ht>500&&met>200&&mj<400";
141 for(
int ilep=0; ilep<3; ilep++)
144 if(ilep==0) lepcut=
"nels==1&&nmus==0";
145 if(ilep==1) lepcut=
"nels==0&&nmus==1";
146 if(ilep==2) lepcut=
"nleps==1";
148 for(
int inveto=0; inveto<2; inveto++)
151 if(inveto==0) nvetocut=
"nveto==0";
152 if(inveto==1) nvetocut=
"1";
154 for(
int injets=0; injets<2; injets++)
157 if(injets==0) njetscut=
"njets>=5";
158 if(injets==1) njetscut=
"njets>=6";
160 for(
int inb=0; inb<2; inb++)
163 if(inb==0) nbcut=
"nbm>=1";
164 if(inb==1) nbcut=
"nbm>=2";
169 pm.
Push<HistoStack>(HistoDef(15, 500, 2000.,
"ht",
"H_{T} [GeV]",
170 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {500.}),
171 full_trig_skim_1l, all_plot_types);
172 pm.
Push<HistoStack>(HistoDef(10, 200, 700.,
"met",
"E_{T}^{miss} [GeV]",
173 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {200., 350., 500.}),
174 full_trig_skim_1l, all_plot_types);
175 pm.
Push<HistoStack>(HistoDef(10, 200, 700.,
"met",
"E_{T}^{miss} [GeV]",
176 lepcut+
"&&"+lowmjcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {200., 350., 500.}),
177 full_trig_skim_1l, all_plot_types);
178 pm.
Push<HistoStack>(HistoDef(16, -0.5, 15.5,
"njets",
"N_{jets}",
179 lepcut+
"&&"+lowmtcut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {5.5, 8.5}),
180 full_trig_skim_1l, all_plot_types);
181 pm.
Push<HistoStack>(HistoDef(7, -0.5, 6.5,
"nbm",
"N_{b}",
182 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nvetocut,
"weight/eff_trig", {0.5, 1.5, 2.5}),
183 full_trig_skim_1l, all_plot_types);
184 pm.
Push<HistoStack>(HistoDef(14, 0., 280.,
"mt",
"m_{T} [GeV]",
185 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {140.}),
186 full_trig_skim_1l, all_plot_types);
187 pm.
Push<HistoStack>(HistoDef(14, 0., 280.,
"mt",
"m_{T} [GeV]",
188 lepcut+
"&&"+lowmjcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {140.}),
189 full_trig_skim_1l, all_plot_types);
190 pm.
Push<HistoStack>(HistoDef(14, 0., 280.,
"mt",
"m_{T} [GeV]",
191 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&nbm==0"+
"&&"+nvetocut,
"weight/eff_trig", {140.}),
192 full_trig_skim_1l, all_plot_types);
197 pm.
Push<HistoStack>(HistoDef(10, 200, 700.,
"met",
"E_{T}^{miss} [GeV]",
198 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(leps_eta[0]<1.479&&leps_eta[0]>-1.479)",
"weight/eff_trig", {200., 350., 500.}),
199 full_trig_skim_1l, all_plot_types);
200 pm.
Push<HistoStack>(HistoDef(10, 200, 700.,
"met",
"E_{T}^{miss} [GeV]",
201 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(leps_eta[0]>1.479||leps_eta[0]<-1.479)",
"weight/eff_trig", {200., 350., 500.}),
202 full_trig_skim_1l, all_plot_types);
210 pm.
Push<HistoStack>(HistoDef(10, 0, 200.,
"leps_pt[0]",
"p_{T}(electron) [GeV]",
211 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
212 full_trig_skim_1l, all_plot_types);
213 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"leps_eta[0]",
"#eta(electron) [GeV]",
214 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
215 full_trig_skim_1l, all_plot_types);
219 pm.
Push<HistoStack>(HistoDef(10, 0, 200.,
"leps_pt[0]",
"p_{T}(muon) [GeV]",
220 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
221 full_trig_skim_1l, all_plot_types);
222 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"leps_eta[0]",
"#eta(muon) [GeV]",
223 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
224 full_trig_skim_1l, all_plot_types);
228 pm.
Push<HistoStack>(HistoDef(10, 0, 200.,
"leps_pt[0]",
"p_{T}(lepton) [GeV]",
229 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
230 full_trig_skim_1l, all_plot_types);
231 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"leps_eta[0]",
"#eta(lepton) [GeV]",
232 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
233 full_trig_skim_1l, all_plot_types);
239 pm.
Push<HistoStack>(HistoDef(10, 30, 630.,
"jets_pt[0]",
"p_{T}(leading jet) [GeV]",
240 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(!jets_islep[0])",
"weight/eff_trig", {999.}),
241 full_trig_skim_1l, all_plot_types);
242 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"jets_eta[0]",
"#eta(leading jet) [GeV]",
243 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(!jets_islep[0])",
"weight/eff_trig", {999.}),
244 full_trig_skim_1l, all_plot_types);
245 pm.
Push<HistoStack>(HistoDef(10, 0, 200.,
"jets_m[0]",
"mass(leading jet) [GeV]",
246 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(!jets_islep[0])",
"weight/eff_trig", {999.}),
247 full_trig_skim_1l, all_plot_types);
248 pm.
Push<HistoStack>(HistoDef(10, 30, 630.,
"jets_pt",
"p_{T}(jet) [GeV]",
249 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(!jets_islep)",
"weight/eff_trig", {999.}),
250 full_trig_skim_1l, all_plot_types);
251 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"jets_eta",
"#eta(jet) [GeV]",
252 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(!jets_islep)",
"weight/eff_trig", {999.}),
253 full_trig_skim_1l, all_plot_types);
254 pm.
Push<HistoStack>(HistoDef(10, 0, 200.,
"jets_m",
"m(jet) [GeV]",
255 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&(!jets_islep)",
"weight/eff_trig", {999.}),
256 full_trig_skim_1l, all_plot_types);
261 pm.
Push<HistoStack>(HistoDef(10, 0, 1000.,
"fjets14_pt[0]",
"p_{T}(J1) [GeV]",
262 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
263 full_trig_skim_1l, all_plot_types);
264 pm.
Push<HistoStack>(HistoDef(10, 0, 500.,
"fjets14_m[0]",
"m_{J1} [GeV]",
265 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
266 full_trig_skim_1l, all_plot_types);
267 pm.
Push<HistoStack>(HistoDef(10, 0, 500.,
"fjets14_m[0]",
"m_{J1} [GeV]",
268 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&leps_pt[0]>160",
"weight/eff_trig", {999.}),
269 full_trig_skim_1l, all_plot_types);
270 pm.
Push<HistoStack>(HistoDef(10, 0, 500.,
"fjets14_m[0]",
"m_{J1} [GeV]",
271 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut+
"&&leps_pt[0]<=160",
"weight/eff_trig", {999.}),
272 full_trig_skim_1l, all_plot_types);
273 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"fjets14_eta[0]",
"#eta(J1)",
274 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
275 full_trig_skim_1l, all_plot_types);
276 pm.
Push<HistoStack>(HistoDef(7, 0.5, 7.5,
"fjets14_nconst[0]",
"N_{constituents}(J1)",
277 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
278 full_trig_skim_1l, all_plot_types);
279 pm.
Push<HistoStack>(HistoDef(10, 0, 1000.,
"fjets14_pt",
"p_{T}(J) [GeV]",
280 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
281 full_trig_skim_1l, all_plot_types);
282 pm.
Push<HistoStack>(HistoDef(10, 0, 500.,
"fjets14_m",
"m_{J} [GeV]",
283 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
284 full_trig_skim_1l, all_plot_types);
285 pm.
Push<HistoStack>(HistoDef(10, -2.5, 2.5,
"fjets14_eta",
"#eta(J)",
286 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
287 full_trig_skim_1l, all_plot_types);
288 pm.
Push<HistoStack>(HistoDef(7, 0.5, 7.5,
"fjets14_nconst",
"N_{constituents}(J)",
289 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
290 full_trig_skim_1l, all_plot_types);
292 pm.
Push<HistoStack>(HistoDef(20, 0, 400.,
"fjets14_m[0]",
"m_{J1} [GeV]",
293 lepcut+
"&&"+lowmtcut+
"&&njets<=5&&nbm>=1",
"weight/eff_trig", {999.}),
294 full_trig_skim_1l, all_plot_types);
297 pm.
Push<HistoStack>(HistoDef(15, 0., 1500.,
"mj14",
"M_{J} [GeV]",
298 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {400.}),
299 full_trig_skim_1l, all_plot_types);
300 pm.
Push<HistoStack>(HistoDef(7, 0.5, 7.5,
"nfjets14",
"N_{J} [GeV]",
301 lepcut+
"&&"+lowmtcut+
"&&"+njetscut+
"&&"+nbcut+
"&&"+nvetocut,
"weight/eff_trig", {999.}),
302 full_trig_skim_1l, all_plot_types);
PlotOpt & Stack(PlotOptTypes::StackType stack_type)
PlotOpt & YAxis(PlotOptTypes::YAxisType y_axis_type)
FigureType & Push(Args &&...args)
Organizes efficient production of plots with single loop over each process.
PlotOpt & Bottom(PlotOptTypes::BottomType bottom_type)
PlotOpt & ShowBackgroundError(bool show_background_error)
void MakePlots(double luminosity, const std::string &subdir="")
Prints all added plots with given luminosity.
PlotOpt & Title(PlotOptTypes::TitleType title_type)
shared_ptr< Process > Proc(const string process_name, Process::Type type, int color, const set< string > &files, const string &cut="1")
Loads colors from a text configuration file.