LDMX Software
BeamElectronTruth.h
Go to the documentation of this file.
1
9#ifndef RECON_EVENT_BEAMELECTRONTRUTH_H_
10#define RECON_EVENT_BEAMELECTRONTRUTH_H_
11
12// ROOT
13#include "TObject.h" //ClassDef
14
15// STL
16#include <iostream>
17
18namespace ldmx {
19
25 public:
29 BeamElectronTruth() = default;
30
34 virtual ~BeamElectronTruth(){};
35
39 void Print() const;
40
44 void Clear();
45
50 void setX(double x) { x_ = x; }
51
56 void setY(double y) { y_ = y; }
57
62 void setZ(double z) { z_ = z; }
63
71 void setXYZ(double x, double y, double z) {
72 x_ = x;
73 y_ = y;
74 z_ = z;
75 }
76
81 double getX() { return x_; }
82
87 double getY() { return y_; }
88
93 double getZ() { return z_; }
94
95 // binned coordinates, according to some detector granularity. here, assume TS
96
101 void setBinnedX(double x) { binnedX_ = x; }
102
107 void setBinnedY(double y) { binnedY_ = y; }
108
114 void setBinnedXY(double x, double y) {
115 binnedX_ = x;
116 binnedY_ = y;
117 }
118
123 double getBinnedX() { return binnedX_; }
124
129 double getBinnedY() { return binnedY_; }
130
131 // repeat for bar numbers instead of a spatial (bar center) coordinate
132
137 void setBarX(double x) { barX_ = x; }
138
143 void setBarY(double y) { barY_ = y; }
144
150 void setBarXY(double x, double y) {
151 barX_ = x;
152 barY_ = y;
153 }
154
159 double getBarX() { return barX_; }
160
165 double getBarY() { return barY_; }
166
167 // TODO could add separate setters for each momentum component
168
175 void setThreeMomentum(double px, double py, double pz);
176
181 double getPx() { return px_; }
182
187 double getPy() { return py_; }
188
193 double getPz() { return pz_; }
194
199 bool operator<(BeamElectronTruth &rhs) { return this->getZ() < rhs.getZ(); }
200
201 private:
202 /* Algorithm variable results from simhit associations. */
203
205 double x_{-999};
206
208 double y_{-999};
209
211 double z_{-9999};
212
214 double binnedX_{-999};
215
217 double binnedY_{-999};
218
220 double barX_{-1};
221
223 double barY_{-1};
224
226 double px_{-999};
228 double py_{-999};
230 double pz_{-999};
231
232 ClassDef(BeamElectronTruth, 1);
233}; // class BeamElectronTruth
234} // namespace ldmx
235
236#endif
Represents the truth information on beam electrons at the target.
double binnedX_
x coordinate (with TS resolution)
void Print() const
Print a description of this object.
double getX()
Get x coordinate of the beam electron.
virtual ~BeamElectronTruth()
Class destructor.
void setBarX(double x)
Set x bar number of the found beam electron.
double pz_
z momentum component
void setBinnedY(double y)
SetBinned y coordinate of the found beam electron.
double barY_
TS horizontal bar number overlapping with y coordinate.
double binnedY_
y coordinate (with TS resolution)
double getBarX()
Get x bar number of the found beam electron.
double getBarY()
Get y bar number of the found beam electron.
void setY(double y)
Set y coordinate of the found beam electron.
double getBinnedY()
GetBinned y coordinate of the beam electron.
double px_
x momentum component
void setBinnedXY(double x, double y)
Set all three binned spatial coordinates at once.
bool operator<(BeamElectronTruth &rhs)
some sorting operator is mandatory sort on hit Z coordinate
double getBinnedX()
Get binned x coordinate of the beam electron.
double getPy()
Get py component of the beam electron momentum.
double getPx()
Get px component of the beam electron momentum.
double py_
y momentum component
BeamElectronTruth()=default
Class constructor.
void setThreeMomentum(double px, double py, double pz)
Set the entire three-momentum at once.
void setXYZ(double x, double y, double z)
Set all three spatial coordinates at once.
double z_
z coordinate ("truth" resolution, in practice, set to taget z = 0
void setBarXY(double x, double y)
Set both bar number coordinates at once.
double getZ()
Get z coordinate of the beam electron.
void setZ(double z)
Set z coordinate of the found beam electron.
double getPz()
Get pz component of the beam electron momentum.
double x_
x coordinate ("truth" resolution, but within merging tolerance)
double y_
y coordinate ("truth" resolution, but within merging tolerance)
double barX_
TS vertical bar number overlapping with x coordinate.
void setX(double x)
Set x coordinate of the found beam electron.
double getY()
Get y coordinate of the beam electron.
void setBarY(double y)
Set y bar number of the found beam electron.
void setBinnedX(double x)
SetBinned x coordinate of the found beam electron.
void Clear()
Clear the data in the object.