21 int color,
const set<string> &files,
const string &cut =
"1"){
22 return make_shared<Process>(process_name, type, color,
23 unique_ptr<Baby>(
new T(files)),
28 gErrorIgnoreLevel = 6000;
32 string trig_skim_mc =
"/net/cms27/cms27r0/babymaker/2016_04_29/mc/merged_baseline/";
33 string trig_skim_data =
"/net/cms27/cms27r0/babymaker/2016_04_29/mc/T1tttt/skim_baseline/";
35 Palette colors(
"txt/colors.txt",
"default");
38 {trig_skim_mc+
"*_TTJets*Lept*.root", trig_skim_mc+
"*_TTJets_HT*.root"},
42 {trig_skim_data+
"*SMS-T1tttt_mGluino-1800_mLSP-200_*.root"});
44 {trig_skim_data+
"*SMS-T1tttt_mGluino-1400_mLSP-1000_*.root"});
45 t1tttt_c->SetLineStyle(2);
47 vector<shared_ptr<Process> > full_trig_skim = {t1tttt_nc, t1tttt_c, tt};
49 PlotOpt log_lumi(
"txt/plot_styles.txt",
"CMSPaper");
50 log_lumi.
Title(TitleType::preliminary)
52 .
YAxis(YAxisType::log)
53 .
Stack(StackType::data_norm)
59 PlotOpt lin_shapes = log_shapes().
YAxis(YAxisType::linear);
60 PlotOpt log_lumi_info = log_lumi().
Title(TitleType::info);
61 PlotOpt lin_lumi_info = lin_lumi().
Title(TitleType::info);
62 PlotOpt log_shapes_info = log_shapes().
Title(TitleType::info);
63 PlotOpt lin_shapes_info = lin_shapes().
Title(TitleType::info);
64 vector<PlotOpt> all_plot_types = {log_lumi, lin_lumi, log_shapes, lin_shapes,
65 log_lumi_info, lin_lumi_info, log_shapes_info, lin_shapes_info};
68 pm.AddPlot(HistoDef(30, 0., 1500.,
"mj",
"M_{J}^{R=1.2} [GeV]",
69 "nleps==1&&ht>500&&met>200&&njets>=6&&nbm>=1",
"weight", {250., 400.}),
70 full_trig_skim, all_plot_types);
71 pm.AddPlot(HistoDef(30, 0., 1500.,
"mj14",
"M_{J}^{R=1.4} [GeV]",
72 "nleps==1&&ht>500&&met>200&&njets>=6&&nbm>=1",
"weight", {250., 400.}),
73 full_trig_skim, all_plot_types);
PlotOpt & Stack(PlotOptTypes::StackType stack_type)
PlotOpt & FileExtensions(const std::set< std::string > &file_extensions)
PlotOpt & YAxis(PlotOptTypes::YAxisType y_axis_type)
shared_ptr< Process > Proc(const string process_name, Process::Type type, int color, const set< string > &files, const string &cut="1")
Organizes efficient production of plots with single loop over each process.
PlotOpt & Bottom(PlotOptTypes::BottomType bottom_type)
PlotOpt & ShowBackgroundError(bool show_background_error)
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.