ra4_macros  bede988c286599a3a84b77a4d788ac0a971e89f9
plot_mj_isr.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include <vector>
3 
4 #include "TString.h"
5 
6 #include "utilities_macros.cpp"
7 
8 using namespace std;
9 
10 int main(){
11 
12  TString folder="/cms2r0/babymaker/babies/2015_11_28/mc/skim_1lht500met200/";
13  string hostname = execute("echo $HOSTNAME");
14  if(Contains(hostname, "cms") || Contains(hostname, "compute-")) folder = "/net/cms2"+folder;
15  if(Contains(hostname, "lxplus"))
16  folder="/afs/cern.ch/user/m/manuelf/work/babies/2015_11_28/mc/skim_1lht500met200/";
17 
18  vector<TString> s_tt, s_t4t_nc;
19  s_tt.push_back(folder+"*TTJets*Lept*");
20  s_tt.push_back(folder+"*TTJets*HT*");
21  s_t4t_nc.push_back(folder+"*T1tttt*1500*100*.root");
22 
23  // Reading ntuples
24  vector<sfeats> Samples;
25  Samples.push_back(sfeats(s_t4t_nc, "#scale[0.92]{#tilde{g}#kern[0.2]{#tilde{g}}, #tilde{g}#rightarrowt#bar{t}#tilde{#chi}#lower[0.2]{#scale[0.85]{^{0}}}#kern[-1.3]{#scale[0.85]{_{1}}} (1500,100)}",ra4::c_t1tttt,7, "stitch"));
26  Samples.push_back(sfeats(s_tt, "t#bar{t}, 1 true lepton",dps::c_tt_1l,1,"ntruleps==1&&stitch"));
27  Samples.push_back(sfeats(s_tt, "t#bar{t}, 2 true leptons", dps::c_tt_2l,1,"ntruleps==2&&stitch"));
28 
29 
30  vector<int> mjisr;
31  mjisr.push_back(0);
32  mjisr.push_back(1);
33  mjisr.push_back(2);
34 
35  TString cuts = "ht>500&&met>200&&nleps>=1&&pass";
36 
37  vector<hfeats> vars;
38 
39  vars.push_back(hfeats("mj",25,0,1000, mjisr,"M_{J} [GeV]",cuts+"&&abs(isr_tru_pt)<10"));
40  vars.back().whichPlots = "4";
41  vars.push_back(hfeats("mj",25,0,1000, mjisr,"M_{J} [GeV]",cuts+"&&abs(isr_tru_pt)>100"));
42  vars.back().whichPlots = "4";
43 
44  //NOTE: Make sure RohanHack is turned off
45  plot_distributions(Samples, vars, "2.2", ".pdf", "CMSPaperNoRatio","mj_isr",false);
46 }
void plot_distributions(std::vector< sfeats > Samples, std::vector< hfeats > vars, TString luminosity="10", TString filetype=".eps", TString namestyle="LargeLabels", TString dir="1d", bool doRatio=false, bool showcuts=false)
int main()
Definition: plot_mj_isr.cxx:10
bool Contains(const std::string &text, const std::string &pattern)
STL namespace.
std::string execute(const std::string &cmd)