ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Hist2D Class Reference

#include <hist2d.hpp>

Inheritance diagram for Hist2D:
Figure

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
 
Hist2Doperator= (Hist2D &&)=default
 
 ~Hist2D ()=default
 
void Print (double luminosity, const std::string &subdir) override
 
std::set< const Process * > GetProcesses () const override
 
FigureComponentGetComponent (const Process *process) override
 
std::string Name () const
 
Hist2DWeight (const NamedFunc &weight)
 
Hist2DTag (const std::string &tag)
 
- Public Member Functions inherited from Figure
 Figure ()=default
 
 Figure (const Figure &)=default
 
Figureoperator= (const Figure &)=default
 
 Figure (Figure &&)=default
 
Figureoperator= (Figure &&)=default
 
virtual ~Figure ()=default
 

Public Attributes

Axis xaxis_
 
Axis yaxis_
 
NamedFunc cut_
 
NamedFunc weight_
 
std::string tag_
 
std::vector< PlotOptplot_options_
 

Private Member Functions

 Hist2D (const Hist2D &)=delete
 
Hist2Doperator= (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_
 

Detailed Description

Definition at line 15 of file hist2d.hpp.

Constructor & Destructor Documentation

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()} 
)
Hist2D::Hist2D ( Hist2D &&  )
default
Hist2D::~Hist2D ( )
default
Hist2D::Hist2D ( const Hist2D )
privatedelete
Hist2D::Hist2D ( )
privatedelete

Member Function Documentation

void Hist2D::AddEntry ( TLegend &  l,
const SingleHist2D h,
const TGraph &  g 
) const
private
TH2D Hist2D::GetBkgHist ( bool  bkg_is_hist) const
private
Figure::FigureComponent * Hist2D::GetComponent ( const Process process)
overridevirtual

Implements Figure.

Definition at line 410 of file hist2d.cpp.

References DBG, GetComponentList(), and Process::name_.

const vector< unique_ptr< Hist2D::SingleHist2D > > & Hist2D::GetComponentList ( const Process process)
private
vector< TGraph > Hist2D::GetGraphs ( const std::vector< std::unique_ptr< SingleHist2D > > &  components,
bool  lumi_weighted 
) const
private

Definition at line 289 of file hist2d.cpp.

References luminosity_.

Referenced by MakeOnePlot().

vector< shared_ptr< TLatex > > Hist2D::GetLabels ( bool  bkg_is_hist) const
private
vector< TLine > Hist2D::GetLines ( ) const
private

Definition at line 299 of file hist2d.cpp.

References Axis::Bins(), Axis::cut_vals_, xaxis_, and yaxis_.

Referenced by MakeOnePlot().

set< const Process * > Hist2D::GetProcesses ( ) const
overridevirtual

Implements Figure.

Definition at line 396 of file hist2d.cpp.

References backgrounds_, datas_, and signals_.

void Hist2D::MakeOnePlot ( const std::string &  subdir)
private
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().

Hist2D& Hist2D::operator= ( Hist2D &&  )
default
Hist2D& Hist2D::operator= ( const Hist2D )
privatedelete
void Hist2D::Print ( double  luminosity,
const std::string &  subdir 
)
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_.

Hist2D & Hist2D::Weight ( const NamedFunc weight)

Definition at line 360 of file hist2d.cpp.

References weight_.

Member Data Documentation

std::vector<std::unique_ptr<SingleHist2D> > Hist2D::backgrounds_
private

Definition at line 64 of file hist2d.hpp.

Referenced by GetBkgHist(), GetComponentList(), GetProcesses(), Hist2D(), and MakeOnePlot().

TH2D Hist2D::blank_
staticprivate

Definition at line 70 of file hist2d.hpp.

NamedFunc Hist2D::cut_

Definition at line 59 of file hist2d.hpp.

Referenced by Name().

std::vector<std::unique_ptr<SingleHist2D> > Hist2D::datas_
private

Definition at line 66 of file hist2d.hpp.

Referenced by GetComponentList(), GetProcesses(), Hist2D(), and MakeOnePlot().

double Hist2D::luminosity_
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().

std::vector<std::unique_ptr<SingleHist2D> > Hist2D::signals_
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.

Referenced by Name(), and Tag().

PlotOpt Hist2D::this_opt_
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().


The documentation for this class was generated from the following files: