10#ifndef TRKVALHISTUTILS_PLOTBASE_H
11#define TRKVALHISTUTILS_PLOTBASE_H
22#include "TProfile2D.h"
24#include "TEfficiency.h"
31typedef std::pair<TTree*, std::string>
TreeData;
54 TH1D*
Book1D(
const std::string & name,
const std::string & labels,
int nBins,
float start,
float end,
bool prependDir =
true);
56 TH1D*
Book1D(
const std::string & name, TH1* refHist,
const std::string & labels,
bool prependDir =
true);
59 TH2F*
Book2D(
const std::string & name,
const std::string & labels,
int nBinsX,
float startX,
float endX,
int nBinsY,
float startY,
float endY,
bool prependDir =
true);
61 TH2F*
Book2D(
const std::string & name, TH2* refHist,
const std::string & labels,
bool prependDir =
true);
63 TH2F*
Book2D(
const std::string & name,
const std::string & labels,
int nBinsX, Double_t* binsX,
int nBinsY, Double_t startY, Double_t endY,
bool prependDir =
true);
66 TH3F*
Book3D(
const std::string & name,
const std::string & labels,
int nBinsX,
float startX,
float endX,
int nBinsY,
float startY,
float endY,
int nBinsZ,
float startZ,
float endZ,
bool prependDir =
true);
68 TH3F*
Book3D(
const std::string & name, TH3* refHist,
const std::string & labels,
bool prependDir =
true);
71 TProfile*
BookTProfile(
const std::string &name,
const std::string & labels,
int nBinsX,
float startX,
float endX,
float startY=-1,
float endY=-1,
bool prependDir =
true,
bool useRMS=
false);
73 TProfile*
BookTProfile(
const std::string &name,
const std::string & labels,
int nBinsX,
float* binsX,
bool prependDir =
true);
75 TProfile*
BookTProfileRangeY(
const std::string &name,
const std::string & labels,
int nBinsX,
double* binsX,
double startY,
double endY,
bool prependDir =
true);
77 TProfile2D *
BookTProfile2D(
const std::string &name,
const std::string & labels,
const int nBinsX,
const double xlo,
const double xhi,
const int nBinsY,
const double ylo,
const double yhi,
bool prependDir=
true,
bool useRMS=
false);
79 TProfile2D *
BookTProfile2D(
const std::string &name,
const std::string &labels,
const int nBinsX,
double* binsX,
const int nBinsY,
double* binsY,
bool prependDir=
true,
bool useRMS=
false);
81 TEfficiency *
BookTEfficiency(
const std::string &name,
const std::string & labels,
const int nBinsX,
const float xlo,
const float xhi,
const bool prependDir =
true);
83 TEfficiency *
BookTEfficiency(
const std::string &name,
const std::string & labels,
const int nBinsX,
const float xlo,
const float xhi,
const int nBinsy,
const float ylo,
const float yhi,
const bool prependDir =
true);
86 TTree*
BookTree(
const std::string & name,
bool prependDir =
true);
std::pair< TEfficiency *, std::string > EfficiencyData
std::pair< TH1 *, std::string > HistData
std::pair< TTree *, std::string > TreeData
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
std::vector< EfficiencyData > retrieveBookedEfficiencies()
Retrieve all booked efficiency objects.
std::vector< PlotBase * > m_vSubNodes
static std::string constructPrefix(std::string dir, bool prependDir)
std::vector< HistData > retrieveBookedHistograms()
Retrieve all booked histograms.
std::vector< EfficiencyData > m_vBookedEfficiencies
void setDetailLevel(int iDetailLevel)
const std::string & getDirectory()
PlotBase(PlotBase *parent, const std::string &sDir)
TH3F * Book3D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, int nBinsZ, float startZ, float endZ, bool prependDir=true)
Book a TH3F histogram.
virtual void initializePlots()
std::vector< HistData > m_vBookedHistograms
virtual void finalizePlots()
TProfile * BookTProfile(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
std::vector< TreeData > retrieveBookedTrees()
Retrieve all booked trees.
void RegisterSubPlot(PlotBase *pPlotBase)
TProfile * BookTProfileRangeY(const std::string &name, const std::string &labels, int nBinsX, double *binsX, double startY, double endY, bool prependDir=true)
Book a TProfile histogram with variable binning in x-axis and limits in y-values.
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
TTree * BookTree(const std::string &name, bool prependDir=true)
Book a TTree.
TEfficiency * BookTEfficiency(const std::string &name, const std::string &labels, const int nBinsX, const float xlo, const float xhi, const bool prependDir=true)
Book a (1-D) TEfficiency histogram.
TProfile2D * BookTProfile2D(const std::string &name, const std::string &labels, const int nBinsX, const double xlo, const double xhi, const int nBinsY, const double ylo, const double yhi, bool prependDir=true, bool useRMS=false)
Book a TProfile 2D histogram with variable binning in x-axis and limits in y-values.
std::vector< TreeData > m_vBookedTrees