hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
|
description More...
#include <HistoManager.h>
Public Member Functions | |
HistoManager () | |
default constructor | |
HistoManager (const std::string &inputName) | |
Constructor. | |
virtual | ~HistoManager () |
TH3F * | get3dHisto (const std::string &str) |
description | |
TH2F * | get2dHisto (const std::string &str) |
description | |
TH1F * | get1dHisto (const std::string &str) |
description | |
TH1F * | plot1D (const std::string &name, const std::string &xtitle, int nbinsX, float xmin, float xmax) |
description | |
TH1F * | plot1D (const std::string &name, const std::string &xtitle, int nbinsX, double *axisX) |
description | |
TH2F * | plot2D (std::string name, std::string xtitle, int nbinsX, float xmin, float xmax, std::string ytitle, int nbinsY, float ymin, float ymax) |
description | |
TH2F * | plot2D (std::string name, std::string xtitle, int nbinsX, double *axisX, std::string ytitle, int nbinsY, double *axisY) |
description | |
TH2F * | plot2D (std::string name, std::string xtitle, int nbinsX, const double *axisX, std::string ytitle, int nbinsY, const double *axisY) |
description | |
TH2F * | plot2D (std::string name, std::string xtitle, int nbinsX, double *axisX, std::string ytitle, int nbinsY, float ymin, float ymax) |
description | |
TH3F * | plot3D (std::string name, std::string xtitle, int nbinsX, float xmin, float xmax, std::string ytitle, int nbinsY, float ymin, float ymax, std::string ztitle, int nbinsZ, float zmin, float zmax) |
description | |
TH3F * | plot3D (std::string name, std::string xtitle, int nbinsX, double *axisX, std::string ytitle, int nbinsY, double *axisY, std::string ztitle, int nbinsZ, double *axisZ) |
description | |
virtual void | Define3DHistos () |
define additional 3D histo by hand | |
virtual void | Define2DHistos () |
define additional 2D histo by hand | |
virtual void | Define1DHistos () |
define additional 1D histo by hand | |
virtual void | DefineHistos () |
Definition of histograms from json config. | |
virtual void | DefineHistos (std::vector< std::string > histoCopyNames, std::string makeCopyJsonTag="default=single_copy") |
Definition of histograms from json config. | |
void | Fill1DHisto (const std::string &histoName, float value, float weight=1.) |
description | |
void | Fill2DHisto (const std::string &histoName, float valuex, float valuey, float weight=1.) |
description | |
void | Fill3DHisto (const std::string &histoName, float valuex, float valuey, float valuez, float weight=1.) |
description | |
virtual void | GetHistosFromFile (TFile *inFile, const std::string &name, const std::string &folder="") |
Get histograms from input file. | |
virtual void | saveHistos (TFile *outF=nullptr, std::string folder="") |
save histograms | |
virtual void | loadHistoConfig (const std::string histoConfigFile) |
load histogram config | |
virtual void | sumw2 () |
description | |
virtual void | Clear () |
description | |
virtual std::string | getName () |
get name | |
void | debugMode (bool debug) |
set debug | |
Public Attributes | |
std::vector< std::string > | histos1dNamesfromTFile |
description | |
std::vector< std::string > | histos2dNamesfromTFile |
description | |
std::vector< std::string > | histos1dNamesfromJson |
description | |
Protected Types | |
typedef std::map< std::string, TH1F * >::iterator | it1d |
description | |
typedef std::map< std::string, TH2F * >::iterator | it2d |
description | |
typedef std::map< std::string, TH3F * >::iterator | it3d |
description | |
Protected Attributes | |
std::string | m_name |
description | |
std::map< std::string, std::vector< double > > | Axes |
description | |
std::map< std::string, TH1F * > | histos1d |
description | |
std::map< std::string, TH2F * > | histos2d |
description | |
std::map< std::string, TH3F * > | histos3d |
description | |
bool | debug_ {false} |
description | |
json | _h_configs |
description | |
int | maxWarnings_ {10} |
description | |
int | printWarnings_ {0} |
description | |
bool | doPrintWarnings_ {true} |
description | |
|
protected |
description
Definition at line 334 of file HistoManager.h.
|
protected |
description
Definition at line 336 of file HistoManager.h.
|
protected |
description
Definition at line 338 of file HistoManager.h.
HistoManager | ( | ) |
default constructor
Definition at line 9 of file HistoManager.cxx.
HistoManager | ( | const std::string & | inputName | ) |
|
virtual |
desfault destructor
Definition at line 49 of file HistoManager.cxx.
|
virtual |
description
Definition at line 18 of file HistoManager.cxx.
|
inline |
|
inlinevirtual |
define additional 1D histo by hand
Reimplemented in ClusterHistos, MCAnaHistos, and RecoHitAnaHistos.
Definition at line 223 of file HistoManager.h.
|
inlinevirtual |
define additional 2D histo by hand
Reimplemented in ClusterHistos, MCAnaHistos, RecoHitAnaHistos, ThreeProngHistos, TrackEfficHistos, TrackHistos, TridentHistos, and ZBiHistos.
Definition at line 217 of file HistoManager.h.
|
inlinevirtual |
define additional 3D histo by hand
Reimplemented in ClusterHistos, MCAnaHistos, RecoHitAnaHistos, ThreeProngHistos, TrackEfficHistos, TrackHistos, TridentHistos, and ZBiHistos.
Definition at line 211 of file HistoManager.h.
|
virtual |
Definition of histograms from json config.
Reimplemented in RawSvtHitHistos, Svt2DBlHistos, and TridentHistos.
Definition at line 51 of file HistoManager.cxx.
|
virtual |
Definition of histograms from json config.
histoCopyNames | |
makeCopyJsonTag |
Definition at line 111 of file HistoManager.cxx.
void Fill1DHisto | ( | const std::string & | histoName, |
float | value, | ||
float | weight = 1. |
||
) |
void Fill2DHisto | ( | const std::string & | histoName, |
float | valuex, | ||
float | valuey, | ||
float | weight = 1. |
||
) |
description
histoName | |
valuex | |
valuey | |
weight |
Definition at line 328 of file HistoManager.cxx.
void Fill3DHisto | ( | const std::string & | histoName, |
float | valuex, | ||
float | valuey, | ||
float | valuez, | ||
float | weight = 1. |
||
) |
description
histoName | |
valuex | |
valuey | |
valuez | |
weight |
Definition at line 344 of file HistoManager.cxx.
|
inline |
|
inline |
|
inline |
|
virtual |
Get histograms from input file.
inFile | |
name | |
folder |
Definition at line 171 of file HistoManager.cxx.
|
inlinevirtual |
|
virtual |
TH1F * plot1D | ( | const std::string & | name, |
const std::string & | xtitle, | ||
int | nbinsX, | ||
double * | axisX | ||
) |
description
name | |
xtitle | |
nbinsX | |
axisX |
Definition at line 196 of file HistoManager.cxx.
TH1F * plot1D | ( | const std::string & | name, |
const std::string & | xtitle, | ||
int | nbinsX, | ||
float | xmin, | ||
float | xmax | ||
) |
description
name | |
xtitle | |
nbinsX | |
xmin | |
xmax |
Definition at line 189 of file HistoManager.cxx.
TH2F * plot2D | ( | std::string | name, |
std::string | xtitle, | ||
int | nbinsX, | ||
const double * | axisX, | ||
std::string | ytitle, | ||
int | nbinsY, | ||
const double * | axisY | ||
) |
description
name | |
xtitle | |
nbinsX | |
axisX | |
ytitle | |
nbinsY | |
axisY |
Definition at line 229 of file HistoManager.cxx.
TH2F * plot2D | ( | std::string | name, |
std::string | xtitle, | ||
int | nbinsX, | ||
double * | axisX, | ||
std::string | ytitle, | ||
int | nbinsY, | ||
double * | axisY | ||
) |
description
name | |
xtitle | |
nbinsX | |
axisX | |
ytitle | |
nbinsY | |
axisY |
Definition at line 216 of file HistoManager.cxx.
TH2F * plot2D | ( | std::string | name, |
std::string | xtitle, | ||
int | nbinsX, | ||
double * | axisX, | ||
std::string | ytitle, | ||
int | nbinsY, | ||
float | ymin, | ||
float | ymax | ||
) |
description
name | |
xtitle | |
nbinsX | |
axisX | |
ytitle | |
nbinsY | |
ymin | |
ymax |
Definition at line 244 of file HistoManager.cxx.
TH2F * plot2D | ( | std::string | name, |
std::string | xtitle, | ||
int | nbinsX, | ||
float | xmin, | ||
float | xmax, | ||
std::string | ytitle, | ||
int | nbinsY, | ||
float | ymin, | ||
float | ymax | ||
) |
description
name | |
xtitle | |
nbinsX | |
xmin | |
xmax | |
ytitle | |
nbinsY | |
ymin | |
ymax |
Definition at line 203 of file HistoManager.cxx.
TH3F * plot3D | ( | std::string | name, |
std::string | xtitle, | ||
int | nbinsX, | ||
double * | axisX, | ||
std::string | ytitle, | ||
int | nbinsY, | ||
double * | axisY, | ||
std::string | ztitle, | ||
int | nbinsZ, | ||
double * | axisZ | ||
) |
description
name | |
xtitle | |
nbinsX | |
axisX | |
ytitle | |
nbinsY | |
axisY | |
ztitle | |
nbinsZ | |
axisZ |
Definition at line 258 of file HistoManager.cxx.
TH3F * plot3D | ( | std::string | name, |
std::string | xtitle, | ||
int | nbinsX, | ||
float | xmin, | ||
float | xmax, | ||
std::string | ytitle, | ||
int | nbinsY, | ||
float | ymin, | ||
float | ymax, | ||
std::string | ztitle, | ||
int | nbinsZ, | ||
float | zmin, | ||
float | zmax | ||
) |
description
name | |
xtitle | |
nbinsX | |
xmin | |
xmax | |
ytitle | |
nbinsY | |
ymin | |
ymax | |
ztitle | |
nbinsZ | |
zmin | |
zmax |
Definition at line 280 of file HistoManager.cxx.
|
virtual |
save histograms
outF | |
folder |
Reimplemented in TridentHistos.
Definition at line 395 of file HistoManager.cxx.
|
virtual |
description
Definition at line 300 of file HistoManager.cxx.
|
protected |
description
Definition at line 341 of file HistoManager.h.
|
protected |
description
Definition at line 332 of file HistoManager.h.
|
protected |
description
Definition at line 340 of file HistoManager.h.
|
protected |
description
Definition at line 344 of file HistoManager.h.
|
protected |
description
Definition at line 333 of file HistoManager.h.
std::vector<std::string> histos1dNamesfromJson |
description
Definition at line 327 of file HistoManager.h.
std::vector<std::string> histos1dNamesfromTFile |
description
Definition at line 325 of file HistoManager.h.
|
protected |
description
Definition at line 335 of file HistoManager.h.
std::vector<std::string> histos2dNamesfromTFile |
description
Definition at line 326 of file HistoManager.h.
|
protected |
description
Definition at line 337 of file HistoManager.h.
|
protected |
description
Definition at line 331 of file HistoManager.h.
|
protected |
description
Definition at line 342 of file HistoManager.h.
|
protected |
description
Definition at line 343 of file HistoManager.h.