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 friend std::ostream &operator<<(std::ostream &o, const TrigScintTrack &d);
37
41 void clear(); // Option_t *option);
42
47 float getCentroid() const { return centroid_; };
48
53 float getCentroidX() const { return centroid_x_; };
54
59 float getCentroidY() const { return centroid_y_; };
60
65 float getCentroidZ() const { return centroid_z_; };
66
71 float getResidual() const { return residual_; };
72
77 float getResidualX() const { return residual_x_; };
78
83 float getResidualY() const { return residual_y_; };
84
89 float getResidualZ() const { return residual_z_; };
90
95 float getPE() const { return pe_; };
96
101 int getNclusters() const { return n_clusters_; };
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 beam_efrac_; }
144
145 // setters
146
148 void setBeamEfrac(float e) { beam_efrac_ = e; }
149
153 void setCentroid(float centroid) { centroid_ = centroid; };
154
158 void setCentroidX(float centroid) { centroid_x_ = centroid; };
159
163 void setCentroidY(float centroid) { centroid_y_ = centroid; };
164
168 void setCentroidZ(float centroid) { centroid_z_ = centroid; };
169
173 void setResidual(float resid) { residual_ = resid; };
174
178 void setResidualX(float resid) { residual_x_ = resid; };
179
183 void setResidualY(float resid) { residual_y_ = resid; };
184
188 void setResidualZ(float resid) { residual_z_ = resid; };
189
193 void setPE(float pe) { pe_ = pe; };
194
198 void setNclusters(uint nCl) { n_clusters_ = 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 centroid_x_{-1};
263
267 float centroid_y_{-1};
268
272 float centroid_z_{-99999};
273
277 float residual_{0};
278
282 float residual_x_{0};
283
287 float residual_y_{0};
288
292 float residual_z_{0};
293
298
302 std::vector<ldmx::TrigScintCluster> constituents_{0};
303
310 float beam_efrac_{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.
float pe_
The average pe count of the clusters making up the track.
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 residual_y_
The y coordinate residual.
float centroid_
The detector centroid.
int n_clusters_
The number of clusters forming the track.
float getBeamEfrac() const
Get beam energy fraction of hit.
float residual_x_
The x coordinate residual.
float centroid_z_
The detector z coordinate centroid.
ClassDef(TrigScintTrack, 4)
The ROOT class definition.
void setCentroidX(float centroid)
Set the x centroid of the track.
void setResidual(float resid)
Set the detector ID residual of 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 centroid_x_
The detector x coordinate centroid.
void clear()
Reset the TrigScintTrack object.
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 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].
float centroid_y_
The detector y coordinate centroid.
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 residual_z_
The z coordinate residual.
float z_
The Z position.
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.
float beam_efrac_
The fraction of the energy deposited in the track constituents that was deposited by a beam electron.
void setResidualX(float resid)
Set the x residual of the track.
float getResidualY() const
Get the y residual of the track.
friend std::ostream & operator<<(std::ostream &o, const TrigScintTrack &d)
Print a description of this object.
float getCentroidY() const
Get the y centroid of the track.
float getPE() const
Get the (average) pe of the track.
void setCentroidZ(float centroid)
Set the z centroid of the track.
float getResidualX() const
Get the x residual of the track.
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.