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
TrackHistos.h
Go to the documentation of this file.
1#ifndef TRACKHISTOS_H
2#define TRACKHISTOS_H
3
4#include "HistoManager.h"
5#include "Track.h"
6#include "TrackerHit.h"
7#include "Vertex.h"
8#include "Particle.h"
9#include <string>
10#include <vector>
11
17class TrackHistos : public HistoManager {
18
19 public:
25 TrackHistos(const std::string& inputName) : HistoManager(inputName) {
26 m_name = inputName;
27 BuildAxes();
28 }
29
34 virtual void Define3DHistos(){};
35
40 virtual void Define2DHistos();
41
46 void BuildAxes();
47
52 void DefineTrkHitHistos();
53
61 void Fill1DTrack(Track* track, float weight = 1., const std::string& trkname = "");
62
70 void Fill2DTrack(Track* track, float weight = 1., const std::string& trkname = "");
71
82 void FillResidualHistograms(Track* track, int ly, double res, double sigma);
83
90 void Fill1DVertex(Vertex* vtx, float weight = 1.);
91
104 void Fill1DVertex(Vertex* vtx, Particle* ele, Particle* pos, Track* ele_trk, Track* pos_trk, float weight = 1.);
105
113 void Fill1DHistograms(Track* track = nullptr, Vertex* vtx = nullptr, float weight = 1.);
114
121 void Fill2DHistograms(Vertex* vtx = nullptr, float weight = 1.);
122
130 void Fill1DTrackTruth(Track* track, Track* truth_track, float weight=1., const std::string& = "");
131
139 void FillTrackComparisonHistograms(Track* track_x, Track* track_y, float weight = 1.);
140
146 void doTrackComparisonPlots(bool doplots) { doTrkCompPlots = doplots; };
147
148 private:
150 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"};
151
153 bool doTrkCompPlots{false};
154
155};
156
157#endif //TRACKHISTOS_H
Class used to encapsulate information about a particle.
Class used to encapsulate track information.
Class used to encapsulate tracker hit information.
Class used to encapsulate Vertex information.
description
std::string m_name
description
description
Definition TrackHistos.h:17
virtual void Define3DHistos()
description
Definition TrackHistos.h:34
void FillTrackComparisonHistograms(Track *track_x, Track *track_y, float weight=1.)
description
TrackHistos(const std::string &inputName)
Constructor.
Definition TrackHistos.h:25
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 Fill1DHistograms(Track *track=nullptr, Vertex *vtx=nullptr, float weight=1.)
Fill 1D histograms.
void BuildAxes()
description
bool doTrkCompPlots
void Fill1DVertex(Vertex *vtx, float weight=1.)
description
void doTrackComparisonPlots(bool doplots)
Compare tracks.
virtual void Define2DHistos()
description
void Fill1DTrackTruth(Track *track, Track *truth_track, float weight=1., const std::string &="")
Truth comparison.
void Fill2DHistograms(Vertex *vtx=nullptr, float weight=1.)
Fill 2D histograms.
std::vector< std::string > vPs
void Fill1DTrack(Track *track, float weight=1., const std::string &trkname="")
Fill 1D track.
void DefineTrkHitHistos()
description
Definition Track.h:32