ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
plot_datamc.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include <string>
3 #include <vector>
4 #include <memory>
5 
6 #include "TError.h"
7 #include "TColor.h"
8 
9 #include "core/baby.hpp"
10 #include "core/process.hpp"
11 #include "core/named_func.hpp"
12 #include "core/plot_maker.hpp"
13 #include "core/plot_opt.hpp"
14 #include "core/palette.hpp"
15 #include "core/hist1d.hpp"
16 
17 using namespace std;
18 using namespace PlotOptTypes;
19 
20 int main(){
21  gErrorIgnoreLevel = 6000;
22 
23  double lumi = 2.6;
24 
25  // 80X (ttbar, qcd, dy[ht=100-600], wjets) + 74X (rest)
26  string trig_mc = "/net/cms2/cms2r0/babymaker/babies/2016_06_14/mc/unskimmed/";
27  string trig_skim1l_mc = "/net/cms2/cms2r0/babymaker/babies/2016_06_14/mc/merged_standard/";
28  string trig_skim0l_mc = "/net/cms2/cms2r0/babymaker/babies/2016_06_14/mc/merged_qcd/";
29  string trig_skim2l_mc = "/net/cms2/cms2r0/babymaker/babies/2016_06_14/mc/merged_dy_ht300/";
30 
31  Palette colors("txt/colors.txt", "default");
32 
33  auto tt1l = Process::MakeShared<Baby_full>("t#bar{t} (1l)", Process::Type::background, colors("tt_1l"),
34  {trig_skim1l_mc+"*_TTJets*Lept*.root", trig_skim1l_mc+"*_TTJets_HT*.root"}, "ntruleps<=1&&stitch");
35  auto tt2l = Process::MakeShared<Baby_full>("t#bar{t} (2l)", Process::Type::background, colors("tt_2l"),
36  {trig_skim1l_mc+"*_TTJets*Lept*.root", trig_skim1l_mc+"*_TTJets_HT*.root"}, "ntruleps>=2&&stitch");
37  auto wjets = Process::MakeShared<Baby_full>("W+jets", Process::Type::background, colors("wjets"),
38  {trig_skim1l_mc+"*_WJetsToLNu*.root"});
39  auto single_t = Process::MakeShared<Baby_full>("Single t", Process::Type::background, colors("single_t"),
40  {trig_skim1l_mc+"*_ST_*.root"});
41  auto ttv = Process::MakeShared<Baby_full>("t#bar{t}V", Process::Type::background, colors("ttv"),
42  {trig_skim1l_mc+"*_TTWJets*.root", trig_skim1l_mc+"*_TTZTo*.root"});
43  auto other = Process::MakeShared<Baby_full>("Other", Process::Type::background, colors("other"),
44  {trig_skim1l_mc+"*DYJetsToLL*.root", trig_skim1l_mc+"*_QCD_HT*.root",
45  trig_skim1l_mc+"*_ZJet*.root", trig_skim1l_mc+"*_WWTo*.root",
46  trig_skim1l_mc+"*ggZH_HToBB*.root", trig_skim1l_mc+"*ttHJetTobb*.root",
47  trig_skim1l_mc+"*_TTGJets*.root", trig_skim1l_mc+"*_TTTT_*.root",
48  trig_skim1l_mc+"*_WH_HToBB*.root", trig_skim1l_mc+"*_WZTo*.root",
49  trig_skim1l_mc+"*_ZH_HToBB*.root", trig_skim1l_mc+"_ZZ_*.root"});
50 
51  auto t1tttt_nc = Process::MakeShared<Baby_full>("T1tttt(1500,100)", Process::Type::signal, colors("t1tttt"),
52  {trig_mc+"*SMS-T1tttt_mGluino-1500_mLSP-100*.root"});
53  auto t1tttt_c = Process::MakeShared<Baby_full>("T1tttt(1200,800)", Process::Type::signal, colors("t1tttt"),
54  {trig_mc+"*SMS-T1tttt_mGluino-1200_mLSP-800*.root"});
55  t1tttt_c->SetLineStyle(2);
56 
57  auto data_1l = Process::MakeShared<Baby_full>("Data", Process::Type::data, kBlack,
58  {"/net/cms2/cms2r0/babymaker/babies/2016_06_21/data/skim_standard/*.root"},"pass&&(trig[4]||trig[8]||trig[13]||trig[33])");
59  vector<shared_ptr<Process> > full_trig_skim_1l = {data_1l, /*t1tttt_nc, t1tttt_c,*/ tt1l, tt2l, wjets, single_t, ttv, other};
60 
61  //
62  // 0-lepton plots
63  //
64  auto tt_0l = Process::MakeShared<Baby_full>("t#bar{t}", Process::Type::background, colors("tt_1l"),
65  {trig_skim0l_mc+"*_TTJets_TuneCUETP8M1_13TeV*.root"});
66  auto qcd_0l = Process::MakeShared<Baby_full>("QCD", Process::Type::background, colors("qcd"),
67  {trig_skim0l_mc+"*_QCD_HT700to1000*.root",trig_skim0l_mc+"*_QCD_HT1000to1500*.root",
68  trig_skim0l_mc+"*_QCD_HT1500to2000*.root",trig_skim0l_mc+"*_QCD_HT2000toInf*.root"});
69  auto other_0l = Process::MakeShared<Baby_full>("Other", Process::Type::background, colors("ttv"),
70  {trig_skim0l_mc+"*_TTWJet*root", trig_skim0l_mc+"*_TTZTo*.root",
71  trig_skim0l_mc+"*_ZJet*.root", trig_skim0l_mc+"*_WWTo*.root",
72  trig_skim0l_mc+"*ggZH_HToBB*.root", trig_skim0l_mc+"*ttHJetTobb*.root",
73  trig_skim0l_mc+"*_TTGJets*.root", trig_skim0l_mc+"*_TTTT_*.root",
74  trig_skim0l_mc+"*_WH_HToBB*.root", trig_skim0l_mc+"*_WZTo*.root",
75  trig_skim0l_mc+"*_ST_*.root", trig_skim0l_mc+"*_WJetsToLNu*.root",
76  trig_skim0l_mc+"*_ZH_HToBB*.root", trig_skim0l_mc+"_ZZ_*.root",
77  trig_skim0l_mc+"*_DYJetsToLL*HT*.root"});
78 
79  auto data_0l = Process::MakeShared<Baby_full>("Data", Process::Type::data, kBlack,
80  {"/net/cms2/cms2r0/babymaker/babies/2016_06_21/data/skim_ht900/*.root"},"pass&&trig[12]");
81  vector<shared_ptr<Process> > full_trig_skim_0l = {data_0l, /*t1tttt_nc, t1tttt_c,*/ qcd_0l, tt_0l, other_0l};
82 
83  //
84  // 2-lepton plots
85  //
86  auto tt1l_2l = Process::MakeShared<Baby_full>("t#bar{t} (1l)", Process::Type::background, colors("tt_1l"),
87  {trig_skim2l_mc+"*_TTJets*Lept*.root"},
88  "ntruleps<=1");
89  auto tt2l_2l = Process::MakeShared<Baby_full>("t#bar{t} (2l)", Process::Type::background, colors("tt_2l"),
90  {trig_skim2l_mc+"*_TTJets*Lept*.root"},
91  "ntruleps>=2");
92  auto dy_2l = Process::MakeShared<Baby_full>("DY", Process::Type::background, colors("wjets"),
93  {trig_skim2l_mc+"*_DYJetsToLL*HT*.root"});
94  auto other_2l = Process::MakeShared<Baby_full>("Other", Process::Type::background, colors("ttv"),
95  {trig_skim2l_mc+"*_TTWJet*root", trig_skim2l_mc+"*_TTZTo*.root",
96  trig_skim2l_mc+"*_ZJet*.root", trig_skim2l_mc+"*_WWTo*.root",
97  trig_skim2l_mc+"*ggZH_HToBB*.root", trig_skim2l_mc+"*ttHJetTobb*.root",
98  trig_skim2l_mc+"*_TTGJets*.root", trig_skim2l_mc+"*_TTTT_*.root",
99  trig_skim2l_mc+"*_WH_HToBB*.root", trig_skim2l_mc+"*_WZTo*.root",
100  trig_skim2l_mc+"*_ST_*.root", trig_skim2l_mc+"*_WJetsToLNu*.root",
101  trig_skim2l_mc+"*_ZH_HToBB*.root", trig_skim2l_mc+"_ZZ_*.root",
102  trig_skim2l_mc+"*_QCD_HT700to1000*.root",trig_skim2l_mc+"*_QCD_HT1000to1500*.root",
103  trig_skim2l_mc+"*_QCD_HT1500to2000*.root",trig_skim2l_mc+"*_QCD_HT2000toInf*.root"});
104 
105  auto data_2l = Process::MakeShared<Baby_full>("Data", Process::Type::data, kBlack,
106  {"/net/cms2/cms2r0/babymaker/babies/2016_06_21/data/skim_nm1nj2/*.root"},"pass&&(trig[20]||trig[22])");
107  vector<shared_ptr<Process> > full_trig_skim_2l = {data_2l, /*t1tttt_nc, t1tttt_c,*/ tt1l_2l, tt2l_2l, dy_2l, other_2l};
108 
109  //
110  PlotOpt log_lumi("txt/plot_styles.txt", "CMSPaper");
111  log_lumi.Title(TitleType::preliminary)
112  .Bottom(BottomType::ratio)
113  .YAxis(YAxisType::log)
114  .Stack(StackType::data_norm);
115  PlotOpt lin_lumi = log_lumi().YAxis(YAxisType::linear);
116  PlotOpt log_shapes = log_lumi().Stack(StackType::shapes)
117  .Bottom(BottomType::off)
118  .ShowBackgroundError(false);
119  PlotOpt lin_shapes = log_shapes().YAxis(YAxisType::linear);
120  PlotOpt log_lumi_info = log_lumi().Title(TitleType::info);
121  PlotOpt lin_lumi_info = lin_lumi().Title(TitleType::info);
122  PlotOpt log_shapes_info = log_shapes().Title(TitleType::info);
123  PlotOpt lin_shapes_info = lin_shapes().Title(TitleType::info);
124  vector<PlotOpt> all_plot_types = {log_lumi_info, lin_lumi_info};
125 
126  NamedFunc lowmtcut = "ht>500&&met>200&&mt<140";
127  NamedFunc lowmjcut = "ht>500&&met>200&&mj14<400";
128  PlotMaker pm;
129 
130  for(int ilep=0; ilep<3; ilep++){
131  NamedFunc lepcut(true);
132  if(ilep==0) lepcut="nels==1&&nmus==0";
133  if(ilep==1) lepcut="nels==0&&nmus==1";
134  if(ilep==2) lepcut="nleps==1";
135 
136  for(int inveto=0; inveto<2; inveto++){
137  NamedFunc nvetocut(true);
138  if(inveto==0) nvetocut="nveto==0";
139  if(inveto==1) nvetocut="1";
140  if(inveto==1) continue;
141 
142  for(int injets=0; injets<2; injets++){
143  NamedFunc njetscut(true);
144  if(injets==0) njetscut="njets>=5";
145  if(injets==1) njetscut="njets>=6";
146  if(injets==0) continue;
147 
148  for(int inb=0; inb<2; inb++){
149  NamedFunc nbcut(true);
150  if(inb==0) nbcut="nbm>=1";
151  if(inb==1) nbcut="nbm>=2";
152  if(inb==1) continue;
153 
154  //
155  // event-level variables except ones related to fatjet
156  //
157  pm.Push<Hist1D>(Axis(15, 500, 2000., "ht", "H_{T} [GeV]", {500.}),
158  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
159  full_trig_skim_1l, all_plot_types);
160  pm.Push<Hist1D>(Axis(10, 200, 700., "met", "E_{T}^{miss} [GeV]", {200., 350., 500.}),
161  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
162  full_trig_skim_1l, all_plot_types);
163  pm.Push<Hist1D>(Axis(10, 200, 700., "met", "E_{T}^{miss} [GeV]", {200., 350., 500.}),
164  lepcut&&lowmjcut&&njetscut&&nbcut&&nvetocut,
165  full_trig_skim_1l, all_plot_types);
166  pm.Push<Hist1D>(Axis(16, -0.5, 15.5, "njets", "N_{jets}", {5.5, 8.5}),
167  lepcut&&lowmtcut&&nbcut&&nvetocut,
168  full_trig_skim_1l, all_plot_types);
169  pm.Push<Hist1D>(Axis(7, -0.5, 6.5, "nbm", "N_{b}", {0.5, 1.5, 2.5}),
170  lepcut&&lowmtcut&&njetscut&&nvetocut,
171  full_trig_skim_1l, all_plot_types);
172  pm.Push<Hist1D>(Axis(14, 0., 280., "mt", "m_{T} [GeV]", {140.}),
173  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
174  full_trig_skim_1l, all_plot_types);
175  pm.Push<Hist1D>(Axis(14, 0., 280., "mt", "m_{T} [GeV]", {140.}),
176  lepcut&&lowmjcut&&njetscut&&nbcut&&nvetocut,
177  full_trig_skim_1l, all_plot_types);
178  pm.Push<Hist1D>(Axis(14, 0., 280., "mt", "m_{T} [GeV]", {140.}),
179  lepcut&&lowmtcut&&njetscut+"&&nbm==0"&&nvetocut,
180  full_trig_skim_1l, all_plot_types);
181 
182  if(ilep==0){
183  // only barrel or endcap electron
184  pm.Push<Hist1D>(Axis(10, 200, 700., "met", "E_{T}^{miss} [GeV]", {200., 350., 500.}),
185  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"leps_eta[0]<1.479&&leps_eta[0]>-1.479",
186  full_trig_skim_1l, all_plot_types);
187  pm.Push<Hist1D>(Axis(10, 200, 700., "met", "E_{T}^{miss} [GeV]", {200., 350., 500.}),
188  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"leps_eta[0]>1.479||leps_eta[0]<-1.479",
189  full_trig_skim_1l, all_plot_types);
190  }
191 
192  //
193  // leptons
194  //
195  if(ilep==0){// electron
196  pm.Push<Hist1D>(Axis(10, 0, 200., "leps_pt[0]", "p_{T}(electron) [GeV]"),
197  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
198  full_trig_skim_1l, all_plot_types);
199  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "leps_eta[0]", "#eta(electron) [GeV]"),
200  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
201  full_trig_skim_1l, all_plot_types);
202  }else if(ilep==1){// muon
203  pm.Push<Hist1D>(Axis(10, 0, 200., "leps_pt[0]", "p_{T}(muon) [GeV]"),
204  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
205  full_trig_skim_1l, all_plot_types);
206  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "leps_eta[0]", "#eta(muon) [GeV]"),
207  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
208  full_trig_skim_1l, all_plot_types);
209  }else if(ilep==2){ // electron or muon
210  pm.Push<Hist1D>(Axis(10, 0, 200., "leps_pt[0]", "p_{T}(lepton) [GeV]"),
211  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
212  full_trig_skim_1l, all_plot_types);
213  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "leps_eta[0]", "#eta(lepton) [GeV]"),
214  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
215  full_trig_skim_1l, all_plot_types);
216  }
217 
218  //
219  // jets
220  //
221  pm.Push<Hist1D>(Axis(10, 30, 630., "jets_pt[0]", "p_{T}(leading jet) [GeV]"),
222  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"!jets_islep[0]",
223  full_trig_skim_1l, all_plot_types);
224  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "jets_eta[0]", "#eta(leading jet) [GeV]"),
225  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"!jets_islep[0]",
226  full_trig_skim_1l, all_plot_types);
227  pm.Push<Hist1D>(Axis(10, 0, 200., "jets_m[0]", "mass(leading jet) [GeV]"),
228  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"!jets_islep[0]",
229  full_trig_skim_1l, all_plot_types);
230  pm.Push<Hist1D>(Axis(10, 30, 630., "jets_pt", "p_{T}(jet) [GeV]"),
231  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"!jets_islep",
232  full_trig_skim_1l, all_plot_types);
233  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "jets_eta", "#eta(jet) [GeV]"),
234  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"!jets_islep",
235  full_trig_skim_1l, all_plot_types);
236  pm.Push<Hist1D>(Axis(10, 0, 200., "jets_m", "m(jet) [GeV]"),
237  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"!jets_islep",
238  full_trig_skim_1l, all_plot_types);
239 
240  //
241  // fatjets
242  //
243  pm.Push<Hist1D>(Axis(10, 0, 1000., "fjets14_pt[0]", "p_{T}(J1) [GeV]"),
244  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
245  full_trig_skim_1l, all_plot_types);
246  pm.Push<Hist1D>(Axis(10, 0, 500., "fjets14_m[0]", "m_{J1} [GeV]"),
247  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
248  full_trig_skim_1l, all_plot_types);
249  pm.Push<Hist1D>(Axis(10, 0, 500., "fjets14_m[0]", "m_{J1} [GeV]"),
250  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"leps_pt[0]>160",
251  full_trig_skim_1l, all_plot_types);
252  pm.Push<Hist1D>(Axis(10, 0, 500., "fjets14_m[0]", "m_{J1} [GeV]"),
253  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut&&"leps_pt[0]<=160",
254  full_trig_skim_1l, all_plot_types);
255  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "fjets14_eta[0]", "#eta(J1)"),
256  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
257  full_trig_skim_1l, all_plot_types);
258  pm.Push<Hist1D>(Axis(7, 0.5, 7.5, "fjets14_nconst[0]", "N_{constituents}(J1)"),
259  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
260  full_trig_skim_1l, all_plot_types);
261  pm.Push<Hist1D>(Axis(10, 0, 1000., "fjets14_pt", "p_{T}(J) [GeV]"),
262  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
263  full_trig_skim_1l, all_plot_types);
264  pm.Push<Hist1D>(Axis(10, 0, 500., "fjets14_m", "m_{J} [GeV]"),
265  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
266  full_trig_skim_1l, all_plot_types);
267  pm.Push<Hist1D>(Axis(10, -2.5, 2.5, "fjets14_eta", "#eta(J)"),
268  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
269  full_trig_skim_1l, all_plot_types);
270  pm.Push<Hist1D>(Axis(7, 0.5, 7.5, "fjets14_nconst", "N_{constituents}(J)"),
271  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
272  full_trig_skim_1l, all_plot_types);
273 
274  pm.Push<Hist1D>(Axis(20, 0, 400., "fjets14_m[0]", "m_{J1} [GeV]"),
275  lepcut&&lowmtcut&&"njets<=5&&nbm>=1",
276  full_trig_skim_1l, all_plot_types);
277 
278  // event-level variables related to fatjet
279  pm.Push<Hist1D>(Axis(15, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
280  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
281  full_trig_skim_1l, all_plot_types);
282  pm.Push<Hist1D>(Axis(7, 0.5, 7.5, "nfjets14", "N_{J} [GeV]"),
283  lepcut&&lowmtcut&&njetscut&&nbcut&&nvetocut,
284  full_trig_skim_1l, all_plot_types);
285 
286  } //for(int inb=0; inb<2; inb++)
287  } //for(int injets=0; injets<2; injets++)
288  } //for(int inveto=0; inveto<2; inveto++)
289  }
290 
291  //
292  // 0-lepton events
293  //
294  pm.Push<Hist1D>(Axis(30, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
295  "nleps==0&&met<50&&ht>1000&&njets>=4&&njets<=5",
296  full_trig_skim_0l, all_plot_types);
297  pm.Push<Hist1D>(Axis(30, 0., 500., "fjets14_m", "m_{J} [GeV] [GeV]", {400.}),
298  "nleps==0&&met<50&&ht>1000&&njets>=4&&njets<=5",
299  full_trig_skim_0l, all_plot_types);
300 
301  pm.Push<Hist1D>(Axis(30, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
302  "nleps==0&&met<50&&ht>1000&&njets>=6&&njets<=8",
303  full_trig_skim_0l, all_plot_types);
304  pm.Push<Hist1D>(Axis(30, 0., 500., "fjets14_m", "m_{J} [GeV]", {400.}),
305  "nleps==0&&met<50&&ht>1000&&njets>=6&&njets<=8",
306  full_trig_skim_0l, all_plot_types);
307 
308  pm.Push<Hist1D>(Axis(30, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
309  "nleps==0&&met<50&&ht>1000&&njets>=9",
310  full_trig_skim_0l, all_plot_types);
311  pm.Push<Hist1D>(Axis(30, 0., 500., "fjets14_m", "m_{J} [GeV]", {400.}),
312  "nleps==0&&met<50&&ht>1000&&njets>=9",
313  full_trig_skim_0l, all_plot_types);
314 
315  //
316  // di-lepton events
317  //
318  string mll="(mumu_m*(mumu_m>0&&mumu_pt1>30)+elel_m*(elel_m>0&&elel_pt1>30))";
319  string mllcut="(mumu_m*(mumu_m>0&&mumu_pt1>30)+elel_m*(elel_m>0&&elel_pt1>30))>80&&(mumu_m*(mumu_m>0&&mumu_pt1>30)+elel_m*(elel_m>0&&elel_pt1>30))<100";
320  // ttbar
321  pm.Push<Hist1D>(Axis(15, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
322  "nels==1&&nmus==1&&ht>300&&met>100&&njets>=2&&njets<=3&&met<400&&nbm<3&&nbm>=1&&((leps_pt[0]>30&&leps_eta[0]<2.1&&leps_eta[0]>-2.1)||(leps_pt[1]>30&&leps_eta[1]<2.1&&leps_eta[1]>-2.1))",
323  full_trig_skim_2l, all_plot_types);
324  pm.Push<Hist1D>(Axis(15, 0., 500., "fjets14_m", "m_{J} [GeV]", {400.}),
325  "nels==1&&nmus==1&&ht>300&&met>100&&njets>=2&&njets<=3&&met<400&&nbm<3&&nbm>=1&&((leps_pt[0]>30&&leps_eta[0]<2.1&&leps_eta[0]>-2.1)||(leps_pt[1]>30&&leps_eta[1]<2.1&&leps_eta[1]>-2.1))",
326  full_trig_skim_2l, all_plot_types);
327  pm.Push<Hist1D>(Axis(15, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
328  "nels==1&&nmus==1&&ht>300&&met>100&&njets>=4&&met<400&&nbm<3&&nbm>=1&&((leps_pt[0]>30&&leps_eta[0]<2.1&&leps_eta[0]>-2.1)||(leps_pt[1]>30&&leps_eta[1]<2.1&&leps_eta[1]>-2.1))",
329  full_trig_skim_2l, all_plot_types);
330  pm.Push<Hist1D>(Axis(15, 0., 500., "fjets14_m", "m_{J} [GeV]", {400.}),
331  "nels==1&&nmus==1&&ht>300&&met>100&&njets>=4&&met<400&&nbm<3&&nbm>=1&&((leps_pt[0]>30&&leps_eta[0]<2.1&&leps_eta[0]>-2.1)||(leps_pt[1]>30&&leps_eta[1]<2.1&&leps_eta[1]>-2.1))",
332  full_trig_skim_2l, all_plot_types);
333  // DY
334  pm.Push<Hist1D>(Axis(15, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
335  "(nmus>=2||nels>=2)&&ht>350&&njets>=2&&njets<=3"&&mllcut,
336  full_trig_skim_2l, all_plot_types);
337  pm.Push<Hist1D>(Axis(15, 0., 500., "fjets14_m", "m_{J} [GeV]", {400.}),
338  "(nmus>=2||nels>=2)&&ht>350&&njets>=2&&njets<=3"&&mllcut,
339  full_trig_skim_2l, all_plot_types);
340  pm.Push<Hist1D>(Axis(15, 0., 1500., "mj14", "M_{J} [GeV]", {400.}),
341  "(nmus>=2||nels>=2)&&ht>350&&njets>=4"&&mllcut,
342  full_trig_skim_2l, all_plot_types);
343  pm.Push<Hist1D>(Axis(15, 0., 500., "fjets14_m", "m_{J} [GeV]", {400.}),
344  "(nmus>=2||nels>=2)&&ht>350&&njets>=4"&&mllcut,
345  full_trig_skim_2l, all_plot_types);
346 
347  pm.MakePlots(lumi);
348 
349 }
PlotOpt & Stack(PlotOptTypes::StackType stack_type)
Definition: plot_opt.cpp:120
PlotOpt & YAxis(PlotOptTypes::YAxisType y_axis_type)
Definition: plot_opt.cpp:102
STL namespace.
Combines a callable function taking a Baby and returning a scalar or vector with its string represent...
Definition: named_func.hpp:13
FigureType & Push(Args &&...args)
Definition: plot_maker.hpp:24
Definition: axis.hpp:12
Organizes efficient production of plots with single loop over each process.
Definition: plot_maker.hpp:14
PlotOpt & Bottom(PlotOptTypes::BottomType bottom_type)
Definition: plot_opt.cpp:93
PlotOpt & ShowBackgroundError(bool show_background_error)
Definition: plot_opt.cpp:386
A full 1D plot with stacked/overlayed histograms.
Definition: hist1d.hpp:23
void MakePlots(double luminosity, const std::string &subdir="")
Prints all added plots with given luminosity.
Definition: plot_maker.cpp:54
PlotOpt & Title(PlotOptTypes::TitleType title_type)
Definition: plot_opt.cpp:111
int main()
Definition: plot_datamc.cxx:20
Loads colors from a text configuration file.
Definition: palette.hpp:8