15 #include "core/baby.hpp" 33 int main(
int argc,
char *argv[]){
35 string hostname =
execute(
"echo $HOSTNAME");
37 bfolder =
"/net/cms2";
38 gErrorIgnoreLevel = 6000;
43 string trig_skim_mc =
"/cms2r0/babymaker/babies/2016_08_10/mc/merged_higmc_higloose/";
44 string trig_skim_signal =
"/cms2r0/babymaker/babies/2016_08_10/TChiHH/merged_higmc_higloose/";
46 Palette colors(
"txt/colors.txt",
"default");
48 {trig_skim_signal+
"*TChiHH_mGluino-127*.root"});
50 {trig_skim_signal+
"*TChiHH_mGluino-300*.root"});
52 {trig_skim_signal+
"*TChiHH_mGluino-400*.root"});
54 {trig_skim_signal+
"*TChiHH_mGluino-500*.root"});
56 {trig_skim_signal+
"*TChiHH_mGluino-600*.root"});
58 {trig_skim_signal+
"*TChiHH_mGluino-700*.root"});
60 {trig_skim_signal+
"*TChiHH_mGluino-850*.root"});
62 {trig_skim_signal+
"*TChiHH_mGluino-1000*.root"});
64 vector<shared_ptr<Process> > full_trig_skim = {tchi127, tchi300, tchi400, tchi500, tchi600, tchi700, tchi850, tchi1000};
66 PlotOpt log_lumi(
"txt/plot_styles.txt",
"CMSPaper");
67 log_lumi.
Title(TitleType::preliminary)
69 .
YAxis(YAxisType::log)
70 .
Stack(StackType::data_norm);
74 PlotOpt lin_shapes = log_shapes().
YAxis(YAxisType::linear);
75 PlotOpt log_lumi_info = log_lumi().
Title(TitleType::info);
76 PlotOpt lin_lumi_info = lin_lumi().
Title(TitleType::info);
77 PlotOpt log_shapes_info = log_shapes().
Title(TitleType::info);
78 PlotOpt lin_shapes_info = lin_shapes().
Title(TitleType::info);
79 vector<PlotOpt> all_plot_types = {log_lumi_info, log_shapes_info};
83 vector<TString> nbcuts;
84 nbcuts.push_back(
" nbt >= 2 && nbl <= 3");
85 nbcuts.push_back(
" nbt >= 2 && nbl >= 4");
86 TString metskim(
"njets>=4&&njets<=5&&met>100&&nvleps==0");
87 TString trkskim(
"njets>=4&&njets<=5&&met>250&&nvleps==0");
88 TString
skim(
"njets>=4&&njets<=5&&met>250&&nvleps==0&&ntks==0");
90 TString DeltaR(
"hig_drmax < 2.2");
91 TString AverageM(
"hig_am > 100 && hig_am < 140");
92 TString DeltaM(
"hig_dm < 40");
93 TString LDP(
"!low_dphi");
95 pm.
Push<
Hist1D>(
Axis(40,100,1700,
"met",
"E_{T}^{miss} [GeV]", {150., 250.}),
96 metskim, full_trig_skim, all_plot_types);
98 pm.
Push<
Table>(
"TChiMass_cutflow", vector<TableRow>{
99 TableRow(
"$MET > 100$, $\\text{2M b-tags}$, $\\text{4 or 5 jets}$, $0\\ell$",
"1"),
100 TableRow(
"$\\Delta\\phi_{\\text{min}}$", LDP),
101 TableRow(
"$\\Delta m < 40$", DeltaM+A+LDP,1,0),
102 TableRow(
"$\\left< m \\right> \\in (100,140)$", AverageM+A+LDP),
103 TableRow(
"$\\Delta R_{\\text{max}} < 2.2$", DeltaR+A+LDP)
104 },full_trig_skim, 0);
113 static struct option long_options[] = {
114 {
"single_thread", no_argument, 0,
's'},
120 opt = getopt_long(argc, argv,
"s", long_options, &option_index);
122 if( opt == -1)
break;
130 optname = long_options[option_index].name;
133 printf(
"Bad option! Found option name %s\n", optname.c_str());
137 printf(
"Bad option! getopt_long returned character code 0%o\n", opt);
PlotOpt & Stack(PlotOptTypes::StackType stack_type)
PlotOpt & YAxis(PlotOptTypes::YAxisType y_axis_type)
bool Contains(const std::string &str, const std::string &pat)
std::string execute(const std::string &cmd)
FigureType & Push(Args &&...args)
Organizes efficient production of plots with single loop over each process.
PlotOpt & Bottom(PlotOptTypes::BottomType bottom_type)
void GetOptions(int argc, char *argv[])
PlotOpt & ShowBackgroundError(bool show_background_error)
A full 1D plot with stacked/overlayed histograms.
int main(int argc, char *argv[])
void MakePlots(double luminosity, const std::string &subdir="")
Prints all added plots with given luminosity.
PlotOpt & Title(PlotOptTypes::TitleType title_type)
Loads colors from a text configuration file.