LDMX Software
TrigScintTrack.h
1
2#ifndef TRIGSCINT_EVENT_TRIGSCINTTRACK_H_
3#define TRIGSCINT_EVENT_TRIGSCINTTRACK_H_
4
5// ROOT
6#include "TObject.h" //For ClassDef
7
8// STL
9#include <iostream>
10
11// ldmx
13#include "TrigScint/Event/TrigScintCluster.h"
14
15namespace ldmx {
16
22 public:
27
31 virtual ~TrigScintTrack(){};
32
36 void Print() const; // Option_t *option) const;
37
41 void Clear(); // Option_t *option);
42
47 float getCentroid() const { return centroid_; };
48
53 float getCentroidX() const { return centroidX_; };
54
59 float getCentroidY() const { return centroidY_; };
60
65 float getCentroidZ() const { return centroidZ_; };
66
71 float getResidual() const { return residual_; };
72
77 float getResidualX() const { return residualX_; };
78
83 float getResidualY() const { return residualY_; };
84
89 float getResidualZ() const { return residualZ_; };
90
95 float getPE() const { return PE_; };
96
101 int getNclusters() const { return nClusters_; };
102
107 float getX() const { return x_; };
108
113 float getY() const { return y_; };
114
119 float getSigmaX() const { return sx_; };
120
125 float getSigmaY() const { return sy_; };
126
131 std::vector<ldmx::TrigScintCluster> getConstituents() const {
132 return constituents_;
133 };
134
140 std::vector<double> getMomentum() const { return {px_, py_, pz_}; };
141
143 float getBeamEfrac() const { return beamEfrac_; }
144
145 // setters
146
148 void setBeamEfrac(float e) { beamEfrac_ = e; }
149
153 void setCentroid(float centroid) { centroid_ = centroid; };
154
158 void setCentroidX(float centroid) { centroidX_ = centroid; };
159
163 void setCentroidY(float centroid) { centroidY_ = centroid; };
164
168 void setCentroidZ(float centroid) { centroidZ_ = centroid; };
169
173 void setResidual(float resid) { residual_ = resid; };
174
178 void setResidualX(float resid) { residualX_ = resid; };
179
183 void setResidualY(float resid) { residualY_ = resid; };
184
188 void setResidualZ(float resid) { residualZ_ = resid; };
189
193 void setPE(float pe) { PE_ = pe; };
194
198 void setNclusters(uint nCl) { nClusters_ = nCl; };
199
203 void addConstituent(TrigScintCluster cl) { constituents_.push_back(cl); };
204
210 void setPosition(const float x, const float y) {
211 x_ = x;
212 y_ = y;
213 };
214
220 void setSigmaXY(const float sx, const float sy) {
221 sx_ = sx;
222 sy_ = sy;
223 }
224
229 void setSigmaX(const float sx) { sx_ = sx; }
230
235 void setSigmaY(const float sy) { sy_ = sy; }
236
244 void setMomentum(const float px, const float py, const float pz);
245
249 bool operator<(const TrigScintTrack &rhs) const {
250 return this->getResidual() < rhs.getResidual();
251 }
252
253 private:
257 float centroid_{-1};
258
262 float centroidX_{-1};
263
267 float centroidY_{-1};
268
272 float centroidZ_{-99999};
273
277 float residual_{0};
278
282 float residualX_{0};
283
287 float residualY_{0};
288
292 float residualZ_{0};
293
298
302 std::vector<ldmx::TrigScintCluster> constituents_{0};
303
310 float beamEfrac_{0.};
311
315 float PE_{0.};
316
320 float x_{-99999.};
321
325 float y_{-99999.};
326
330 float sx_{-9999.};
331
335 float sy_{-9999.};
336
337 // these below here i don't think i'll use.
338
342 float px_{0};
343
347 float py_{0};
348
352 float pz_{0};
353
357 float z_{0};
358
363
364}; // TrigScintTrack
365
366} // namespace ldmx
367
368#endif // TRIGSCINT_EVENT_TRIGSCINTTRACK_H_
Class providing string constants for the event model.
Stores cluster information from the trigger scintillator pads.
Represents a track of trigger scintillator clusters.
void setSigmaX(const float sx)
Set the uncertainty on the position of the track [mm].
void setSigmaY(const float sy)
Set the uncertainty on the position of the track [mm].
float pz_
The Z momentum.
float PE_
The average pe count of the clusters making up the track.
float centroid_
The detector centroid.
float getBeamEfrac() const
Get beam energy fraction of hit.
float centroidY_
The detector y coordinate centroid.
void setCentroidX(float centroid)
Set the x centroid of the track.
void setResidual(float resid)
Set the detector ID residual of the track.
int nClusters_
The number of clusters forming the track.
float getCentroidX() const
Get the x centroid of the track.
void setSigmaXY(const float sx, const float sy)
Set the uncertainty on the position of the track [mm].
void setCentroidY(float centroid)
Set the y centroid of the track.
void setPosition(const float x, const float y)
Set the position of the track [mm].
void setPE(float pe)
Set the average cluster pe of the track.
float beamEfrac_
The fraction of the energy deposited in the track constituents that was deposited by a beam electron.
float centroidX_
The detector x coordinate centroid.
float y_
The Y position.
float getResidualZ() const
Get the z residual of the track.
float sy_
The uncertainty on the Y position.
float getCentroid() const
Get the detector ID centroid of the track.
void Print() const
Print a description of this object.
void addConstituent(TrigScintCluster cl)
Add a cluster to the list of track constituents.
float getX() const
Get the x coordinate of the track.
float getCentroidZ() const
Get the z centroid of the track.
float py_
The Y momentum.
std::vector< double > getMomentum() const
Get the XYZ momentum of the particle at the position at which the track took place [MeV].
int getNclusters() const
Get the number of clusters forming the track.
void setCentroid(float centroid)
Set the detector ID centroid of the track.
float getSigmaY() const
Get the uncertainty on the y coordinate of the track.
float sx_
The uncertainty on the X position.
TrigScintTrack()
Class constructor.
void setResidualY(float resid)
Set the y residual of the track.
float residualX_
The x coordinate residual.
float z_
The Z position.
void Clear()
Reset the TrigScintTrack object.
float x_
The X position.
float residual_
The detector residual.
float px_
The X momentum.
std::vector< ldmx::TrigScintCluster > constituents_
The list of clusters constituting the track.
void setMomentum(const float px, const float py, const float pz)
Set the momentum of the particle at the position at which the track took place [GeV].
void setBeamEfrac(float e)
Set beam energy fraction of hit.
float getY() const
Get the y coordinate of the track.
void setNclusters(uint nCl)
Set the number of clusters forming the track.
std::vector< ldmx::TrigScintCluster > getConstituents() const
Get the cluster constituents of the track.
float getSigmaX() const
Get the uncertainty on the x coordinate of the track.
void setResidualX(float resid)
Set the x residual of the track.
float getResidualY() const
Get the y residual of the track.
ClassDef(TrigScintTrack, 2)
The ROOT class definition.
float getCentroidY() const
Get the y centroid of the track.
float residualY_
The y coordinate residual.
float getPE() const
Get the (average) pe of the track.
float centroidZ_
The detector z coordinate centroid.
void setCentroidZ(float centroid)
Set the z centroid of the track.
float getResidualX() const
Get the x residual of the track.
float residualZ_
The z coordinate residual.
void setResidualZ(float resid)
Set the z residual of the track.
bool operator<(const TrigScintTrack &rhs) const
Sort by track residual.
float getResidual() const
Get the detector ID residual of the track.
virtual ~TrigScintTrack()
Class destructor.