ra4_draw
4bd0201e3d922d42bd545d4b045ed44db33454a4
|
#include <hist2d.hpp>
Classes | |
class | SingleHist2D |
Public Member Functions | |
Hist2D (const Axis &xaxis, const Axis &yaxis, const NamedFunc &cut, const std::vector< std::shared_ptr< Process > > &processes, const std::vector< PlotOpt > &plot_options={PlotOpt()}) | |
Hist2D (Hist2D &&)=default | |
Hist2D & | operator= (Hist2D &&)=default |
~Hist2D ()=default | |
void | Print (double luminosity, const std::string &subdir) override |
std::set< const Process * > | GetProcesses () const override |
FigureComponent * | GetComponent (const Process *process) override |
std::string | Name () const |
Hist2D & | Weight (const NamedFunc &weight) |
Hist2D & | Tag (const std::string &tag) |
![]() | |
Figure ()=default | |
Figure (const Figure &)=default | |
Figure & | operator= (const Figure &)=default |
Figure (Figure &&)=default | |
Figure & | operator= (Figure &&)=default |
virtual | ~Figure ()=default |
Public Attributes | |
Axis | xaxis_ |
Axis | yaxis_ |
NamedFunc | cut_ |
NamedFunc | weight_ |
std::string | tag_ |
std::vector< PlotOpt > | plot_options_ |
Private Member Functions | |
Hist2D (const Hist2D &)=delete | |
Hist2D & | operator= (const Hist2D &)=delete |
Hist2D ()=delete | |
void | MakeOnePlot (const std::string &subdir) |
TH2D | GetBkgHist (bool bkg_is_hist) const |
std::vector< TGraph > | GetGraphs (const std::vector< std::unique_ptr< SingleHist2D > > &components, bool lumi_weighted) const |
std::vector< TLine > | GetLines () const |
std::vector< std::shared_ptr< TLatex > > | GetLabels (bool bkg_is_hist) const |
void | AddEntry (TLegend &l, const SingleHist2D &h, const TGraph &g) const |
const std::vector< std::unique_ptr< SingleHist2D > > & | GetComponentList (const Process *process) |
Private Attributes | |
std::vector< std::unique_ptr< SingleHist2D > > | backgrounds_ |
std::vector< std::unique_ptr< SingleHist2D > > | signals_ |
std::vector< std::unique_ptr< SingleHist2D > > | datas_ |
PlotOpt | this_opt_ |
double | luminosity_ |
Static Private Attributes | |
static TH2D | blank_ |
Definition at line 15 of file hist2d.hpp.
Hist2D::Hist2D | ( | const Axis & | xaxis, |
const Axis & | yaxis, | ||
const NamedFunc & | cut, | ||
const std::vector< std::shared_ptr< Process > > & | processes, | ||
const std::vector< PlotOpt > & | plot_options = {PlotOpt()} |
||
) |
Definition at line 96 of file hist2d.cpp.
References Process::background, backgrounds_, Axis::Bins(), Process::data, datas_, Axis::Nbins(), Process::signal, signals_, Axis::title_, Axis::units_, xaxis_, and yaxis_.
|
default |
|
default |
|
privatedelete |
|
privatedelete |
|
private |
Definition at line 370 of file hist2d.cpp.
References Hist2D::SingleHist2D::clusterizer_, Clustering::Clusterizer::GetHistogram(), Figure::FigureComponent::process_, this_opt_, and PlotOpt::Title().
Referenced by MakeOnePlot().
|
private |
Definition at line 258 of file hist2d.cpp.
References Axis::AvgBinWidth(), backgrounds_, Axis::Bins(), PlotOpt::LabelSize(), PlotOpt::LogMinimum(), luminosity_, Axis::Nbins(), this_opt_, Axis::Title(), PlotOpt::TitleSize(), ToString(), Axis::units_, xaxis_, PlotOpt::XTitleOffset(), yaxis_, PlotOpt::YTitleOffset(), and PlotOpt::ZTitleOffset().
Referenced by MakeOnePlot().
|
overridevirtual |
Implements Figure.
Definition at line 410 of file hist2d.cpp.
References DBG, GetComponentList(), and Process::name_.
|
private |
Definition at line 421 of file hist2d.cpp.
References Process::background, backgrounds_, Process::data, datas_, ERROR, Process::signal, signals_, and Process::type_.
Referenced by GetComponent().
|
private |
|
private |
Definition at line 315 of file hist2d.cpp.
References ERROR, PlotOpt::Font(), PlotOpt::LeftMargin(), luminosity_, PlotOpt::RightMargin(), this_opt_, PlotOpt::Title(), and PlotOpt::TopMargin().
Referenced by MakeOnePlot().
|
private |
Definition at line 299 of file hist2d.cpp.
References Axis::Bins(), Axis::cut_vals_, xaxis_, and yaxis_.
Referenced by MakeOnePlot().
|
overridevirtual |
Implements Figure.
Definition at line 396 of file hist2d.cpp.
References backgrounds_, datas_, and signals_.
|
private |
Definition at line 162 of file hist2d.cpp.
References AddEntry(), backgrounds_, PlotOpt::BottomMargin(), PlotOpt::CanvasHeight(), PlotOpt::CanvasWidth(), datas_, PlotOpt::FileExtensions(), GetBkgHist(), GetGraphs(), GetLabels(), GetLines(), PlotOpt::LeftMargin(), Name(), PlotOpt::RightMargin(), signals_, PlotOpt::Stack(), this_opt_, PlotOpt::TopMargin(), and PlotOpt::TypeString().
Referenced by Print().
string Hist2D::Name | ( | ) | const |
Definition at line 346 of file hist2d.cpp.
References CodeToPlainText(), cut_, NamedFunc::Name(), tag_, Axis::var_, weight_, xaxis_, and yaxis_.
Referenced by MakeOnePlot().
|
overridevirtual |
Implements Figure.
Definition at line 149 of file hist2d.cpp.
References luminosity_, MakeOnePlot(), PlotOpt::MakeSane(), plot_options_, this_opt_, and PlotOpt::UseCMYK().
Hist2D & Hist2D::Tag | ( | const std::string & | tag | ) |
Definition at line 365 of file hist2d.cpp.
References run_2016-06-03_freeze_preapp_all_preds::tag, and tag_.
Definition at line 360 of file hist2d.cpp.
References weight_.
|
private |
Definition at line 64 of file hist2d.hpp.
Referenced by GetBkgHist(), GetComponentList(), GetProcesses(), Hist2D(), and MakeOnePlot().
|
staticprivate |
Definition at line 70 of file hist2d.hpp.
NamedFunc Hist2D::cut_ |
Definition at line 59 of file hist2d.hpp.
Referenced by Name().
|
private |
Definition at line 66 of file hist2d.hpp.
Referenced by GetComponentList(), GetProcesses(), Hist2D(), and MakeOnePlot().
|
mutableprivate |
Definition at line 69 of file hist2d.hpp.
Referenced by GetBkgHist(), GetGraphs(), GetLabels(), and Print().
std::vector<PlotOpt> Hist2D::plot_options_ |
Definition at line 61 of file hist2d.hpp.
Referenced by Print().
|
private |
Definition at line 65 of file hist2d.hpp.
Referenced by GetComponentList(), GetProcesses(), Hist2D(), and MakeOnePlot().
std::string Hist2D::tag_ |
Definition at line 60 of file hist2d.hpp.
|
mutableprivate |
Definition at line 68 of file hist2d.hpp.
Referenced by AddEntry(), GetBkgHist(), GetLabels(), MakeOnePlot(), and Print().
NamedFunc Hist2D::weight_ |
Definition at line 59 of file hist2d.hpp.
Referenced by Name(), Hist2D::SingleHist2D::RecordEvent(), and Weight().
Axis Hist2D::xaxis_ |
Definition at line 58 of file hist2d.hpp.
Referenced by GetBkgHist(), GetLines(), Hist2D(), Name(), and Hist2D::SingleHist2D::RecordEvent().
Axis Hist2D::yaxis_ |
Definition at line 58 of file hist2d.hpp.
Referenced by GetBkgHist(), GetLines(), Hist2D(), Name(), and Hist2D::SingleHist2D::RecordEvent().