ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
table_rpv_cutflow.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include <string>
3 #include <vector>
4 #include <memory>
5 
6 #include <unistd.h>
7 #include <getopt.h>
8 
9 #include "TError.h"
10 #include "TColor.h"
11 
12 #include "core/baby.hpp"
13 #include "core/process.hpp"
14 #include "core/named_func.hpp"
15 #include "core/plot_maker.hpp"
16 #include "core/plot_opt.hpp"
17 #include "core/palette.hpp"
18 #include "core/table.hpp"
19 
20 using namespace std;
21 using namespace PlotOptTypes;
22 
23 int main(){
24  gErrorIgnoreLevel = 6000;
25 
26  double lumi = 2.7;
27 
28  string mc_folder = "/net/cms29/cms29r0/cawest/skims/ht1200/";
29  string sig_folder = "/net/cms9/cms9r0/rohan/babies/2016_07_13/T1tbs/split/renorm/";
30 
31  Palette colors("txt/colors.txt", "default");
32 
33  // Background samples
34  auto tt = Process::MakeShared<Baby_full>("t#bar{t}", Process::Type::background, colors("tt_1l"),
35  {mc_folder+"*TTJets*Lept*"},
36  "ntruleps>=1");
37 
38  auto qcd = Process::MakeShared<Baby_full>("QCD", Process::Type::background, colors("tt_1l"),
39  {mc_folder+"*QCD_HT*",mc_folder+"*TTJets_TuneCUETP8M1_13TeV-madgraphMLM*"},
40  "ntruleps==0");
41 
42  auto wjets = Process::MakeShared<Baby_full>("W+Jets", Process::Type::background, colors("tt_1l"),
43  {mc_folder+"*WJetsToLNu_HT-600ToInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8*"});
44 
45  auto singlet = Process::MakeShared<Baby_full>("Single t", Process::Type::background, colors("tt_1l"),
46  {mc_folder+"*ST_s-channel_4f_leptonDecays_13TeV-amcatnlo-pythia8_TuneCUETP8M1*",mc_folder+"*ST_t-channel_antitop_4f_leptonDecays_13TeV-powheg-pythia8_TuneCUETP8M1*",
47  mc_folder+"*ST_t-channel_top_4f_leptonDecays_13TeV-powheg-pythia8_TuneCUETP8M1*", mc_folder+"*ST_tW_antitop_5f_inclusiveDecays_13TeV-powheg-pythia8_TuneCUETP8M1*",
48  mc_folder+"*ST_tW_top_5f_inclusiveDecays_13TeV-powheg-pythia8_TuneCUETP8M1*"});
49 
50  auto other = Process::MakeShared<Baby_full>("Other", Process::Type::background, colors("tt_1l"),
51  {mc_folder+"*DYJetsToLL_M-50_HT-600toInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8*",mc_folder+"*TTWJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-madspin-pythia8*",
52  mc_folder+"*TTWJetsToQQ_TuneCUETP8M1_13TeV-amcatnloFXFX-madspin-pythia8*",mc_folder+"*TTZToQQ_TuneCUETP8M1_13TeV-amcatnlo-pythia8*",
53  mc_folder+"*TTZToLLNuNu_M-10_TuneCUETP8M1_13TeV-amcatnlo-pythia8*",mc_folder+"*ttHJetTobb_M125_13TeV_amcatnloFXFX_madspin_pythia8*",
54  mc_folder+"*TTTT_TuneCUETP8M1_13TeV-amcatnlo-pythia8*",mc_folder+"*WJetsToQQ_HT-600ToInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8*",
55  mc_folder+"*ZJetsToQQ_HT600toInf_13TeV-madgraph*"});
56 
57  //Signal Samples
58  auto tbs750 = Process::MakeShared<Baby_full>("m_{glu}=750$ GeV$", Process::Type::signal, colors("tt_1l"),
59  {sig_folder+"*RPV_mGluino-750*"});
60 
61  auto tbs1200 = Process::MakeShared<Baby_full>("m_{glu}=1200$ GeV$", Process::Type::signal, colors("tt_1l"),
62  {sig_folder+"*RPV_mGluino-1200*"});
63 
64  auto tbs1500 = Process::MakeShared<Baby_full>("m_{glu}=1500$ GeV$", Process::Type::signal, colors("tt_1l"),
65  {sig_folder+"*RPV_mGluino-1500*"});
66 
67  vector<shared_ptr<Process> > samples = {other, singlet, wjets, qcd, tt, tbs750, tbs1200, tbs1500};
68 
69  PlotMaker pm;
70  pm.Push<Table>("rpv_cutflow", vector<TableRow>{
71  TableRow("$N_{leps}=0$"),
72  TableRow("$H_{T}>1500$","nleps==0&&ht>1500",0,0,"weight*w_pu_rpv/eff_trig"),
73  TableRow("$N_{b}\\geq1$","nleps==0&&ht>1500&&nbm>=1",0,0,"weight*w_pu_rpv/eff_trig"),
74  TableRow("$N_{jets}\\geq4$","nleps==0&&ht>1500&&nbm>=1&&njets>=4",0,0,"weight*w_pu_rpv/eff_trig"),
75  TableRow("$M_{J}>500$","nleps==0&&ht>1500&&nbm>=1&&njets>=4&&mj>500",0,1,"weight*w_pu_rpv/eff_trig"),
76  TableRow("$M_{J}>800$","nleps==0&&ht>1500&&nbm>=1&&njets>=4&&mj>800",0,0,"weight*w_pu_rpv/eff_trig"),
77  TableRow("$N_{jets}\\geq10$","nleps==0&&ht>1500&&nbm>=1&&njets>=10&&mj>800",0,0,"weight*w_pu_rpv/eff_trig"),
78  TableRow("$N_{b}\\geq3$","nleps==0&&ht>1500&&nbm>=3&&njets>=8&&mj>800",0,1,"weight*w_pu_rpv/eff_trig"),
79  TableRow("$N_{leps}=1$"),
80  TableRow("$H_{T}>1200$","nleps==1&&ht>1200",1,0,"weight*w_pu_rpv/eff_trig"),
81  TableRow("$N_{b}\\geq1$","nleps==1&&ht>1200&&nbm>=1",0,0,"weight*w_pu_rpv/eff_trig"),
82  TableRow("$N_{jets}\\geq4$","nleps==1&&ht>1200&&nbm>=1&&njets>=4",0,0,"weight*w_pu_rpv/eff_trig"),
83  TableRow("$M_{J}>500$","nleps==1&&ht>1200&&nbm>=1&&njets>=4&&mj>500",0,1,"weight*w_pu_rpv/eff_trig"),
84  TableRow("$M_{J}>800$","nleps==1&&ht>1200&&nbm>=1&&njets>=4&&mj>800",0,0,"weight*w_pu_rpv/eff_trig"),
85  TableRow("$N_{jets}\\geq8$","nleps==1&&ht>1200&&nbm>=1&&njets>=8&&mj>800",0,0,"weight*w_pu_rpv/eff_trig"),
86  TableRow("$N_{b}\\geq3$","nleps==1&&ht>1200&&nbm>=3&&njets>=8&&mj>800",0,1,"weight*w_pu_rpv/eff_trig"),
87  },samples,false,true);
88 
89  pm.MakePlots(lumi);
90 }
int main()
STL namespace.
FigureType & Push(Args &&...args)
Definition: plot_maker.hpp:24
Organizes efficient production of plots with single loop over each process.
Definition: plot_maker.hpp:14
Definition: table.hpp:15
void MakePlots(double luminosity, const std::string &subdir="")
Prints all added plots with given luminosity.
Definition: plot_maker.cpp:54
Loads colors from a text configuration file.
Definition: palette.hpp:8