ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
table_rpv_regions.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 tbs1000 = Process::MakeShared<Baby_full>("m_{glu}=1000$ GeV$", Process::Type::signal, colors("tt_1l"),
59  {sig_folder+"*RPV_mGluino-1000*"});
60 
61  auto tbs1400 = Process::MakeShared<Baby_full>("m_{glu}=1400$ GeV$", Process::Type::signal, colors("tt_1l"),
62  {sig_folder+"*RPV_mGluino-1400*"});
63 
64  vector<shared_ptr<Process> > samples = {other, singlet, wjets, qcd, tt, tbs1000, tbs1400};
65 
66  PlotMaker pm;
67  pm.Push<Table>("rpv_regions", vector<TableRow>{
68  //0-lepton
69  TableRow("$N_{leps}=0$, $H_{T}>1500$, $N_{b}\\geq1$"),
70  TableRow("Baseline"),
71  TableRow("$M_{J}>500$, $N_{jets}\\geq4$", "nleps==0&&ht>1500&&nbm>=1&&mj>500&&njets>=4",0,0,"weight*w_pu_rpv/eff_trig"),
72  TableRow("Control Regions"),
73  TableRow("$500<M_{J}\\leq800$, $4\\leq N_{jets}\\leq5$", "nleps==0&&ht>1500&&nbm>=1&&mj>500&&mj<=800&&njets>=4&&njets<=5",0,0,"weight*w_pu_rpv/eff_trig"),
74  TableRow("$500<M_{J}\\leq800$, $6\\leq N_{jets}\\leq7$", "nleps==0&&ht>1500&&nbm>=1&&mj>500&&mj<=800&&njets>=6&&njets<=7",0,0,"weight*w_pu_rpv/eff_trig"),
75  TableRow("$M_{J}\\geq800$, $4\\leq N_{jets}\\leq5$", "nleps==0&&ht>1500&&nbm>=1&&mj>800&&njets>=4&&njets<=5",0,0,"weight*w_pu_rpv/eff_trig"),
76  TableRow("$M_{J}\\geq800$, $6\\leq N_{jets}\\leq7$", "nleps==0&&ht>1500&&nbm>=1&&mj>800&&njets>=6&&njets<=7",0,0,"weight*w_pu_rpv/eff_trig"),
77  TableRow("Signal Regions"),
78  TableRow("$500<M_{J}\\leq800$, $8\\leq N_{jets}\\leq9$", "nleps==0&&ht>1500&&nbm>=1&&mj>500&&mj<=800&&njets>=8&&njets<=9",0,0,"weight*w_pu_rpv/eff_trig"),
79  TableRow("$500<M_{J}\\leq800$, $N_{jets}\\geq10$", "nleps==0&&ht>1500&&nbm>=1&&mj>500&&mj<=800&&njets>=10",0,0,"weight*w_pu_rpv/eff_trig"),
80  TableRow("$M_{J}\\geq800$, $8\\leq N_{jets}\\leq9$", "nleps==0&&ht>1500&&nbm>=1&&mj>800&&njets>=8&&njets<=9",0,0,"weight*w_pu_rpv/eff_trig"),
81  TableRow("$M_{J}>800$, $N_{jets}\\geq10$", "nleps==0&&ht>1500&&nbm>=1&&mj>800&&njets>=10",0,1,"weight*w_pu_rpv/eff_trig"),
82  TableRow("$\\quad N_{b}=1$", "nleps==0&&ht>1500&&nbm==1&&mj>800&&njets>=10",0,0,"weight*w_pu_rpv/eff_trig"),
83  TableRow("$\\quad N_{b}=2$", "nleps==0&&ht>1500&&nbm==2&&mj>800&&njets>=10",0,0,"weight*w_pu_rpv/eff_trig"),
84  TableRow("$\\quad N_{b}=3$", "nleps==0&&ht>1500&&nbm==3&&mj>800&&njets>=10",0,0,"weight*w_pu_rpv/eff_trig"),
85  TableRow("$\\quad N_{b}\\geq4$", "nleps==0&&ht>1500&&nbm>=4&&mj>800&&njets>=10",0,1,"weight*w_pu_rpv/eff_trig"),
86 
87  //1-lepton
88  TableRow("$N_{leps}=1$, $H_{T}>1200$, $N_{b}\\geq1$"),
89  TableRow("Baseline"),
90  TableRow("$M_{J}>500$, $N_{jets}\\geq4$", "nleps==1&&ht>1200&&nbm>=1&&mj>500&&njets>=4",0,0,"weight*w_pu_rpv/eff_trig"),
91  TableRow("Control Regions"),
92  TableRow("$500<M_{J}\\leq800$, $4\\leq N_{jets}\\leq5$", "nleps==1&&ht>1200&&nbm>=1&&mj>500&&mj<=800&&njets>=4&&njets<=5",0,0,"weight*w_pu_rpv/eff_trig"),
93  TableRow("$M_{J}\\geq800$, $4\\leq N_{jets}\\leq5$", "nleps==1&&ht>1200&&nbm>=1&&mj>800&&njets>=4&&njets<=5",0,0,"weight*w_pu_rpv/eff_trig"),
94  TableRow("Signal Regions"),
95  TableRow("$500<M_{J}\\leq800$, $6\\leq N_{jets}\\leq7$", "nleps==1&&ht>1200&&nbm>=1&&mj>500&&mj<=800&&njets>=6&&njets<=7",0,0,"weight*w_pu_rpv/eff_trig"),
96  TableRow("$500<M_{J}\\leq800$, $N_{jets}\\geq8$", "nleps==1&&ht>1200&&nbm>=1&&mj>500&&mj<=800&&njets>=8",0,0,"weight*w_pu_rpv/eff_trig"),
97  TableRow("$M_{J}\\geq800$, $6\\leq N_{jets}\\leq7$", "nleps==1&&ht>1200&&nbm>=1&&mj>800&&njets>=6&&njets<=7",0,0,"weight*w_pu_rpv/eff_trig"),
98  TableRow("$M_{J}>800$, $N_{jets}\\geq8$", "nleps==1&&ht>1200&&nbm>=1&&mj>800&&njets>=8",0,1,"weight*w_pu_rpv/eff_trig"),
99  TableRow("$\\quad N_{b}=1$", "nleps==1&&ht>1200&&nbm==1&&mj>800&&njets>=8",0,0,"weight*w_pu_rpv/eff_trig"),
100  TableRow("$\\quad N_{b}=2$", "nleps==1&&ht>1200&&nbm==2&&mj>800&&njets>=8",0,0,"weight*w_pu_rpv/eff_trig"),
101  TableRow("$\\quad N_{b}=3$", "nleps==1&&ht>1200&&nbm==3&&mj>800&&njets>=8",0,0,"weight*w_pu_rpv/eff_trig"),
102  TableRow("$\\quad N_{b}\\geq4$", "nleps==1&&ht>1200&&nbm>=4&&mj>800&&njets>=8",0,0,"weight*w_pu_rpv/eff_trig"),
103  },samples,false);
104 
105  pm.MakePlots(lumi);
106 }
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