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.
|
#include <TridentHistos.h>
Public Member Functions | |
TridentHistos (const std::string &inputName) | |
virtual void | Define3DHistos () |
define additional 3D histo by hand | |
virtual void | Define2DHistos () |
define additional 2D histo by hand | |
void | DefineHistos () |
Definition of histograms from json config. | |
void | saveHistos (TFile *outF, std::string folder) |
save histograms | |
void | AssignLayerCode (Track *ele_trk, Track *pos_trk) |
std::string | getLayerCodeFromHistoName (std::string name) |
bool | isLayerCode (std::string histoName, int nLayers, int ptr) |
void | setOutputDir (TFile *outF, std::string folder, std::string histoName) |
std::string | getLayerCodeFromTrack (Track *trk) |
std::string | splitByElePosLayerCombos (std::string histoName) |
void | BuildAxes () |
void | Fill1DTrack (Track *track, double trkTimeOffset, float weight=1., const std::string &trkname="") |
void | Fill2DTrack (Track *track, float weight=1., const std::string &trkname="") |
void | FillResidualHistograms (Track *track, int ly, double res, double sigma) |
void | Fill1DVertex (Vertex *vtx, float weight=1.) |
void | Fill1DVertex (Vertex *vtx, Particle *ele, Particle *pos, Track *ele_trk, Track *pos_trk, double trkTimeOffset, float weight=1.) |
void | Fill1DHistograms (Track *track=nullptr, Vertex *vtx=nullptr, float weight=1.) |
void | Fill2DHistograms (Vertex *vtx=nullptr, float weight=1.) |
void | Fill1DTrackTruth (Track *track, Track *truth_track, float weight=1., const std::string &="") |
std::pair< CalCluster *, Track * > | getTrackClusterPair (Track *trk, std::vector< CalCluster * > &clusters, float weight) |
void | FillTrackComparisonHistograms (Track *track_x, Track *track_y, float weight=1.) |
void | doTrackComparisonPlots (bool doplots) |
void | FillTrackClusterHistos (std::pair< CalCluster, Track * > ele, std::pair< CalCluster, Track * > posOrGamma, double calTimeOffset, double trkTimeOffset, double weight) |
void | FillWABHistos (std::pair< CalCluster *, Track * > ele, CalCluster *gamma, double weight) |
void | setBeamEnergy (double ebeam) |
![]() | |
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 | Define1DHistos () |
define additional 1D histo by hand | |
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 | 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 | |
Private Member Functions | |
virtual void | DefineHistosFromTemplateOnly (std::vector< std::string > histoCopyNames, std::string makeCopyJsonTag="default=single_copy") |
virtual void | DefineOneTimeHistos () |
Private Attributes | |
std::vector< std::string > | vPs {"vtx_chi2", "vtx_X", "vtx_Y", "vtx_Z", "vtx_sigma_X","vtx_sigma_Y","vtx_sigma_Z","vtx_InvM","vtx_InvMErr"} |
std::string | layerCode |
bool | doTrkCompPlots {false} |
double | eBeam_ |
double | stdBeamEnergy_ =4.5 |
Additional Inherited Members | |
![]() | |
std::vector< std::string > | histos1dNamesfromTFile |
description | |
std::vector< std::string > | histos2dNamesfromTFile |
description | |
std::vector< std::string > | histos1dNamesfromJson |
description | |
![]() | |
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 | |
![]() | |
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 | |
Definition at line 14 of file TridentHistos.h.
|
inline |
Definition at line 18 of file TridentHistos.h.
Definition at line 128 of file TridentHistos.cxx.
void BuildAxes | ( | ) |
Definition at line 7 of file TridentHistos.cxx.
|
virtual |
define additional 2D histo by hand
Reimplemented from HistoManager.
Definition at line 124 of file TridentHistos.cxx.
|
inlinevirtual |
define additional 3D histo by hand
Reimplemented from HistoManager.
Definition at line 25 of file TridentHistos.h.
|
virtual |
Definition of histograms from json config.
Reimplemented from HistoManager.
Definition at line 9 of file TridentHistos.cxx.
|
privatevirtual |
Definition at line 1258 of file TridentHistos.cxx.
|
privatevirtual |
Definition at line 1328 of file TridentHistos.cxx.
|
inline |
Definition at line 56 of file TridentHistos.h.
Definition at line 506 of file TridentHistos.cxx.
void Fill1DTrack | ( | Track * | track, |
double | trkTimeOffset, | ||
float | weight = 1. , |
||
const std::string & | trkname = "" |
||
) |
Definition at line 393 of file TridentHistos.cxx.
void Fill1DTrackTruth | ( | Track * | track, |
Track * | truth_track, | ||
float | weight = 1. , |
||
const std::string & | trkname = "" |
||
) |
Definition at line 520 of file TridentHistos.cxx.
void Fill1DVertex | ( | Vertex * | vtx, |
float | weight = 1. |
||
) |
Definition at line 1086 of file TridentHistos.cxx.
void Fill1DVertex | ( | Vertex * | vtx, |
Particle * | ele, | ||
Particle * | pos, | ||
Track * | ele_trk, | ||
Track * | pos_trk, | ||
double | trkTimeOffset, | ||
float | weight = 1. |
||
) |
Definition at line 135 of file TridentHistos.cxx.
void Fill2DHistograms | ( | Vertex * | vtx = nullptr , |
float | weight = 1. |
||
) |
Definition at line 576 of file TridentHistos.cxx.
void Fill2DTrack | ( | Track * | track, |
float | weight = 1. , |
||
const std::string & | trkname = "" |
||
) |
Definition at line 340 of file TridentHistos.cxx.
void FillResidualHistograms | ( | Track * | track, |
int | ly, | ||
double | res, | ||
double | sigma | ||
) |
Definition at line 627 of file TridentHistos.cxx.
void FillTrackClusterHistos | ( | std::pair< CalCluster, Track * > | ele, |
std::pair< CalCluster, Track * > | posOrGamma, | ||
double | calTimeOffset, | ||
double | trkTimeOffset, | ||
double | weight | ||
) |
Definition at line 713 of file TridentHistos.cxx.
Definition at line 605 of file TridentHistos.cxx.
void FillWABHistos | ( | std::pair< CalCluster *, Track * > | ele, |
CalCluster * | gamma, | ||
double | weight | ||
) |
Definition at line 1072 of file TridentHistos.cxx.
std::string getLayerCodeFromHistoName | ( | std::string | name | ) |
Definition at line 1165 of file TridentHistos.cxx.
std::string getLayerCodeFromTrack | ( | Track * | trk | ) |
Definition at line 1191 of file TridentHistos.cxx.
std::pair< CalCluster *, Track * > getTrackClusterPair | ( | Track * | trk, |
std::vector< CalCluster * > & | clusters, | ||
float | weight | ||
) |
Definition at line 664 of file TridentHistos.cxx.
bool isLayerCode | ( | std::string | histoName, |
int | nLayers, | ||
int | ptr | ||
) |
Definition at line 1178 of file TridentHistos.cxx.
|
virtual |
save histograms
outF | |
folder |
Reimplemented from HistoManager.
Definition at line 1095 of file TridentHistos.cxx.
|
inline |
Definition at line 62 of file TridentHistos.h.
void setOutputDir | ( | TFile * | outF, |
std::string | folder, | ||
std::string | histoName | ||
) |
Definition at line 1139 of file TridentHistos.cxx.
std::string splitByElePosLayerCombos | ( | std::string | histoName | ) |
Definition at line 1225 of file TridentHistos.cxx.
|
private |
Definition at line 69 of file TridentHistos.h.
|
private |
Definition at line 75 of file TridentHistos.h.
|
private |
Definition at line 67 of file TridentHistos.h.
|
private |
Definition at line 76 of file TridentHistos.h.
|
private |
Definition at line 66 of file TridentHistos.h.