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
MCTrackerHit.h
Go to the documentation of this file.
1
7#ifndef _MCTRACKER_HIT_H_
8#define _MCTRACKER_HIT_H_
9
10//----------------//
11// C++ StdLib //
12//----------------//
13#include <iostream>
14
15//----------//
16// ROOT //
17//----------//
18#include <TObject.h>
19#include <TClonesArray.h>
20#include <TRefArray.h>
21
22class MCTrackerHit : public TObject {
23
24 public:
25
28
30 virtual ~MCTrackerHit();
31
33 void Clear(Option_t *option="");
34
40 void setPosition(const double* position, bool rotate = false);
41
43 std::vector<double> getPosition() const { return {x_, y_, z_}; };
44
45 void setMomentum(const float* momentum, bool rotate = false);
46 std::vector<float> getMomentum() const { return {px_, py_, pz_}; };
47
49 double getGlobalX() const {return x_;}
50
52 double getGlobalY() const {return y_;}
53
55 double getGlobalZ() const {return z_;}
56
62 void setTime(const double time) { time_ = time; };
63
65 double getTime() const { return time_; };
66
72 void setEdep(const double edep) { edep_ = edep; };
73
75 double getEdep() const { return edep_; };
76
77 void setModule(const int module ) {module_ = module;} ;
78
79 //** @return the tracker hit volume from the raw hit content */
80 int getModule() { return module_;} ;
81
82 //** set the tracker hit layer from the raw hit content */
83 void setLayer(const int layer) {layer_ = layer;};
84
85 //** @return the tracker hit layer from the raw hit content */
86 int getLayer() const {return layer_;};
87
88 //** set the pdg id of particle that made the hit */
89 void setPDG(const int pdg) {pdg_ = pdg;};
90
91 //** @return the pdg id of particle that made the hit */
92 int getPDG() const {return pdg_;};
93
94
96
97 private:
98
100 double x_{-999};
101
103 double y_{-999};
104
106 double z_{-999};
107
109 float px_{-999};
110 float py_{-999};
111 float pz_{-999};
112
114 double time_{-999};
115
117 int layer_{-999};
118
120 int module_{-999};
121
123 float edep_{-999};
124
126 int pdg_{-999};
127
128}; // MCTrackerHit
129
130#endif // _MCTRACKER_HIT_H_
double getGlobalY() const
void setLayer(const int layer)
int getLayer() const
void setPDG(const int pdg)
double getEdep() const
virtual ~MCTrackerHit()
void setModule(const int module)
double getGlobalZ() const
void setPosition(const double *position, bool rotate=false)
void setEdep(const double edep)
std::vector< double > getPosition() const
void Clear(Option_t *option="")
int getPDG() const
void setTime(const double time)
ClassDef(MCTrackerHit, 1)
double getGlobalX() const
double getTime() const
std::vector< float > getMomentum() const
void setMomentum(const float *momentum, bool rotate=false)