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.
Loading...
Searching...
No Matches
TrackHistos Class Reference

description More...

#include <TrackHistos.h>

Inheritance diagram for TrackHistos:
HistoManager

Public Member Functions

 TrackHistos (const std::string &inputName)
 Constructor.
virtual void Define3DHistos ()
 description
virtual void Define2DHistos ()
 description
void BuildAxes ()
 description
void DefineTrkHitHistos ()
 description
void Fill1DTrack (Track *track, float weight=1., const std::string &trkname="")
 Fill 1D track.
void Fill2DTrack (Track *track, float weight=1., const std::string &trkname="")
 Fill 2D track.
void FillResidualHistograms (Track *track, int ly, double res, double sigma)
 Fill residual histograms.
void Fill1DVertex (Vertex *vtx, float weight=1.)
 description
void Fill1DVertex (Vertex *vtx, Particle *ele, Particle *pos, Track *ele_trk, Track *pos_trk, float weight=1.)
 description
void Fill1DHistograms (Track *track=nullptr, Vertex *vtx=nullptr, float weight=1.)
 Fill 1D histograms.
void Fill2DHistograms (Vertex *vtx=nullptr, float weight=1.)
 Fill 2D histograms.
void Fill1DTrackTruth (Track *track, Track *truth_track, float weight=1., const std::string &="")
 Truth comparison.
void FillTrackComparisonHistograms (Track *track_x, Track *track_y, float weight=1.)
 description
void doTrackComparisonPlots (bool doplots)
 Compare tracks.
Public Member Functions inherited from HistoManager
 HistoManager ()
 default constructor
 HistoManager (const std::string &inputName)
 Constructor.
virtual ~HistoManager ()
TH3 * get3dHisto (const std::string &str)
 description
TH2 * get2dHisto (const std::string &str)
 description
TH1 * 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 ()
 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

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"}
bool doTrkCompPlots {false}

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, TH1 * >::iterator it1d
 description
typedef std::map< std::string, TH2 * >::iterator it2d
 description
typedef std::map< std::string, TH3 * >::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, TH1 * > histos1d
 description
std::map< std::string, TH2 * > histos2d
 description
std::map< std::string, TH3 * > histos3d
 description
bool debug_ {false}
 description
json _h_configs
 description
int maxWarnings_ {10}
 description
int printWarnings_ {0}
 description
bool doPrintWarnings_ {true}
 description

Detailed Description

description

details

Definition at line 17 of file TrackHistos.h.

Constructor & Destructor Documentation

◆ TrackHistos()

TrackHistos ( const std::string & inputName)
inline

Constructor.

Parameters
inputName

Definition at line 25 of file TrackHistos.h.

Member Function Documentation

◆ BuildAxes()

void BuildAxes ( )

description

Definition at line 6 of file TrackHistos.cxx.

◆ Define2DHistos()

void Define2DHistos ( )
virtual

description

Reimplemented from HistoManager.

Definition at line 62 of file TrackHistos.cxx.

◆ Define3DHistos()

virtual void Define3DHistos ( )
inlinevirtual

description

Reimplemented from HistoManager.

Definition at line 34 of file TrackHistos.h.

◆ DefineTrkHitHistos()

void DefineTrkHitHistos ( )

description

Definition at line 8 of file TrackHistos.cxx.

◆ doTrackComparisonPlots()

void doTrackComparisonPlots ( bool doplots)
inline

Compare tracks.

Parameters
doplots

Definition at line 146 of file TrackHistos.h.

◆ Fill1DHistograms()

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

Fill 1D histograms.

Parameters
track
vtx
weight

Definition at line 346 of file TrackHistos.cxx.

◆ Fill1DTrack()

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

Fill 1D track.

Parameters
track
weight
trkname

Definition at line 228 of file TrackHistos.cxx.

◆ Fill1DTrackTruth()

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

Truth comparison.

Parameters
track
truth_track
weight

Definition at line 360 of file TrackHistos.cxx.

◆ Fill1DVertex() [1/2]

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

description

Parameters
vtx
weight

Definition at line 313 of file TrackHistos.cxx.

◆ Fill1DVertex() [2/2]

void Fill1DVertex ( Vertex * vtx,
Particle * ele,
Particle * pos,
Track * ele_trk,
Track * pos_trk,
float weight = 1. )

description

Todo
change this
Parameters
vtx
ele
pos
ele_trk
pos_trk
weight

Definition at line 92 of file TrackHistos.cxx.

◆ Fill2DHistograms()

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

Fill 2D histograms.

Parameters
vtx
weight

Definition at line 416 of file TrackHistos.cxx.

◆ Fill2DTrack()

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

Fill 2D track.

Parameters
track
weight
trkname

Definition at line 203 of file TrackHistos.cxx.

◆ FillResidualHistograms()

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

Fill residual histograms.

Todo
This should probably go somewhere else
Parameters
track
ly
res
sigma

Definition at line 467 of file TrackHistos.cxx.

◆ FillTrackComparisonHistograms()

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

description

Parameters
track_xx-axis
track_yy-axis
weight

Definition at line 445 of file TrackHistos.cxx.

Member Data Documentation

◆ doTrkCompPlots

bool doTrkCompPlots {false}
private

description

Definition at line 153 of file TrackHistos.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

Vertices

Definition at line 150 of file TrackHistos.h.


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