9 #include "core/baby.hpp" 22 gErrorIgnoreLevel = 6000;
26 string mc_amcatnlo_lo =
"/homes/cawest/links/TTJets_TuneCUETP8M1_13TeV-madgraphMLM/";
27 string mc_powheg =
"/homes/cawest/links/TT_TuneCUETP8M1_13TeV-powheg-pythia8/";
28 string mc_amcatnlo_nlo =
"/homes/cawest/links/TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/";
30 Palette colors(
"txt/colors.txt",
"default");
34 {mc_amcatnlo_lo+
"*TTJets_TuneCUETP8M1*madgraphMLM*.root"});
37 {mc_powheg+
"*_TT_*powheg*.root"});
38 tt_powheg->SetLineStyle(2);
41 {mc_amcatnlo_nlo+
"*TTJets_TuneCUETP8M1*amcatnlo*.root"});
42 tt_amcatnlo_nlo->SetLineStyle(3);
44 vector<shared_ptr<Process> > tt_sams = {tt_amcatnlo_lo, tt_powheg, tt_amcatnlo_nlo};
47 PlotOpt log_lumi(
"txt/plot_styles.txt",
"CMSPaper");
48 log_lumi.
Title(TitleType::preliminary)
50 .
YAxis(YAxisType::log)
51 .
Stack(StackType::data_norm)
58 PlotOpt lin_shapes = log_shapes().
YAxis(YAxisType::linear);
59 PlotOpt log_lumi_info = log_lumi().
Title(TitleType::info);
60 PlotOpt lin_lumi_info = lin_lumi().
Title(TitleType::info);
61 PlotOpt log_shapes_info = log_shapes().
Title(TitleType::info).
Bottom(BottomType::ratio).
Stack(StackType::data_norm);
62 PlotOpt lin_shapes_info = lin_shapes().
Title(TitleType::info).
Bottom(BottomType::ratio).
Stack(StackType::data_norm);
63 vector<PlotOpt> plot_types = {log_shapes};
67 NamedFunc rpv_wgt(
"weight*w_pu_rpv/eff_trig");
71 "nleps==0", tt_sams, plot_types).Weight(rpv_wgt);
73 "nleps==0", tt_sams, plot_types).Weight(rpv_wgt);
75 "nleps==0", tt_sams, plot_types).Weight(rpv_wgt);
77 "nleps==0", tt_sams, plot_types).Weight(rpv_wgt);
80 "nleps==0&&ht>1500&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
82 "nleps==0&&ht>1500&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
84 "nleps==0&&ht>1500&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
86 "nleps==0&&ht>1500&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
89 "nleps==0&&ht>1500&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
91 "nleps==0&&ht>1500&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
93 "nleps==0&&ht>1500&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
95 "nleps==0&&ht>1500&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
99 "nleps==1", tt_sams, plot_types).Weight(rpv_wgt);
101 "nleps==1", tt_sams, plot_types).Weight(rpv_wgt);
103 "nleps==1", tt_sams, plot_types).Weight(rpv_wgt);
105 "nleps==1", tt_sams, plot_types).Weight(rpv_wgt);
108 "nleps==1&&ht>1200&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
110 "nleps==1&&ht>1200&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
112 "nleps==1&&ht>1200&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
114 "nleps==1&&ht>1200&&njets>=4&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
117 "nleps==1&&ht>1200&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
119 "nleps==1&&ht>1200&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
121 "nleps==1&&ht>1200&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
123 "nleps==1&&ht>1200&&njets>=8&&mj>500&&nbm>=1", tt_sams, plot_types).Weight(rpv_wgt);
PlotOpt & Stack(PlotOptTypes::StackType stack_type)
PlotOpt & FileExtensions(const std::set< std::string > &file_extensions)
PlotOpt & YAxis(PlotOptTypes::YAxisType y_axis_type)
Combines a callable function taking a Baby and returning a scalar or vector with its string represent...
FigureType & Push(Args &&...args)
Organizes efficient production of plots with single loop over each process.
PlotOpt & Bottom(PlotOptTypes::BottomType bottom_type)
PlotOpt & ShowBackgroundError(bool show_background_error)
A full 1D plot with stacked/overlayed histograms.
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.