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.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TridentHistos Class Reference

#include <TridentHistos.h>

Inheritance diagram for TridentHistos:
HistoManager

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)
 
- Public Member Functions inherited from HistoManager
 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

- Public Attributes inherited from HistoManager
std::vector< std::string > histos1dNamesfromTFile
 description
 
std::vector< std::string > histos2dNamesfromTFile
 description
 
std::vector< std::string > histos1dNamesfromJson
 description
 
- Protected Types inherited from HistoManager
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 inherited from HistoManager
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
 

Detailed Description

Definition at line 14 of file TridentHistos.h.

Constructor & Destructor Documentation

◆ TridentHistos()

TridentHistos ( const std::string &  inputName)
inline

Definition at line 18 of file TridentHistos.h.

Member Function Documentation

◆ AssignLayerCode()

void AssignLayerCode ( Track ele_trk,
Track pos_trk 
)

Definition at line 128 of file TridentHistos.cxx.

◆ BuildAxes()

void BuildAxes ( )

Definition at line 7 of file TridentHistos.cxx.

◆ Define2DHistos()

void Define2DHistos ( )
virtual

define additional 2D histo by hand

Reimplemented from HistoManager.

Definition at line 124 of file TridentHistos.cxx.

◆ Define3DHistos()

virtual void Define3DHistos ( )
inlinevirtual

define additional 3D histo by hand

Reimplemented from HistoManager.

Definition at line 25 of file TridentHistos.h.

◆ DefineHistos()

void DefineHistos ( )
virtual

Definition of histograms from json config.

Reimplemented from HistoManager.

Definition at line 9 of file TridentHistos.cxx.

◆ DefineHistosFromTemplateOnly()

void DefineHistosFromTemplateOnly ( std::vector< std::string >  histoCopyNames,
std::string  makeCopyJsonTag = "default=single_copy" 
)
privatevirtual

Definition at line 1258 of file TridentHistos.cxx.

◆ DefineOneTimeHistos()

void DefineOneTimeHistos ( )
privatevirtual

Definition at line 1328 of file TridentHistos.cxx.

◆ doTrackComparisonPlots()

void doTrackComparisonPlots ( bool  doplots)
inline

Definition at line 56 of file TridentHistos.h.

◆ Fill1DHistograms()

void Fill1DHistograms ( Track track = nullptr,
Vertex vtx = nullptr,
float  weight = 1. 
)

Definition at line 506 of file TridentHistos.cxx.

◆ Fill1DTrack()

void Fill1DTrack ( Track track,
double  trkTimeOffset,
float  weight = 1.,
const std::string &  trkname = "" 
)

Definition at line 393 of file TridentHistos.cxx.

◆ Fill1DTrackTruth()

void Fill1DTrackTruth ( Track track,
Track truth_track,
float  weight = 1.,
const std::string &  trkname = "" 
)

Definition at line 520 of file TridentHistos.cxx.

◆ Fill1DVertex() [1/2]

void Fill1DVertex ( Vertex vtx,
float  weight = 1. 
)

Definition at line 1086 of file TridentHistos.cxx.

◆ Fill1DVertex() [2/2]

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.

◆ Fill2DHistograms()

void Fill2DHistograms ( Vertex vtx = nullptr,
float  weight = 1. 
)

Definition at line 576 of file TridentHistos.cxx.

◆ Fill2DTrack()

void Fill2DTrack ( Track track,
float  weight = 1.,
const std::string &  trkname = "" 
)

Definition at line 340 of file TridentHistos.cxx.

◆ FillResidualHistograms()

void FillResidualHistograms ( Track track,
int  ly,
double  res,
double  sigma 
)

Definition at line 627 of file TridentHistos.cxx.

◆ FillTrackClusterHistos()

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.

◆ FillTrackComparisonHistograms()

void FillTrackComparisonHistograms ( Track track_x,
Track track_y,
float  weight = 1. 
)

Definition at line 605 of file TridentHistos.cxx.

◆ FillWABHistos()

void FillWABHistos ( std::pair< CalCluster *, Track * >  ele,
CalCluster gamma,
double  weight 
)

Definition at line 1072 of file TridentHistos.cxx.

◆ getLayerCodeFromHistoName()

std::string getLayerCodeFromHistoName ( std::string  name)

Definition at line 1165 of file TridentHistos.cxx.

◆ getLayerCodeFromTrack()

std::string getLayerCodeFromTrack ( Track trk)

Definition at line 1191 of file TridentHistos.cxx.

◆ getTrackClusterPair()

std::pair< CalCluster *, Track * > getTrackClusterPair ( Track trk,
std::vector< CalCluster * > &  clusters,
float  weight 
)

Definition at line 664 of file TridentHistos.cxx.

◆ isLayerCode()

bool isLayerCode ( std::string  histoName,
int  nLayers,
int  ptr 
)

Definition at line 1178 of file TridentHistos.cxx.

◆ saveHistos()

void saveHistos ( TFile *  outF,
std::string  folder 
)
virtual

save histograms

Parameters
outF
folder

Reimplemented from HistoManager.

Definition at line 1095 of file TridentHistos.cxx.

◆ setBeamEnergy()

void setBeamEnergy ( double  ebeam)
inline

Definition at line 62 of file TridentHistos.h.

◆ setOutputDir()

void setOutputDir ( TFile *  outF,
std::string  folder,
std::string  histoName 
)

Definition at line 1139 of file TridentHistos.cxx.

◆ splitByElePosLayerCombos()

std::string splitByElePosLayerCombos ( std::string  histoName)

Definition at line 1225 of file TridentHistos.cxx.

Member Data Documentation

◆ doTrkCompPlots

bool doTrkCompPlots {false}
private

Definition at line 69 of file TridentHistos.h.

◆ eBeam_

double eBeam_
private

Definition at line 75 of file TridentHistos.h.

◆ layerCode

std::string layerCode
private

Definition at line 67 of file TridentHistos.h.

◆ stdBeamEnergy_

double stdBeamEnergy_ =4.5
private

Definition at line 76 of file TridentHistos.h.

◆ vPs

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"}
private

Definition at line 66 of file TridentHistos.h.


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