LDMX Software
TrigScintCluster.h
1
2#ifndef TRIGSCINT_EVENT_TRIGSCINTCLUSTER_H_
3#define TRIGSCINT_EVENT_TRIGSCINTCLUSTER_H_
4
5// STL
6#include <iostream>
7#include <set>
8
9// ldmx-sw
12#include "TrigScint/Event/TrigScintHit.h"
13
14namespace ldmx {
15
22 public:
26 TrigScintCluster() = default;
27
32
36 void Print(Option_t *option = "") const; // override;
37
41 void Clear(Option_t *option = ""); // override;
42
50 void addHit(uint idx, const ldmx::TrigScintHit *hit);
51
55 void setSeed(int idx) { seed_ = idx; }
56
61 void setEnergy(double energy) { energy_ = energy; }
62
67 void setPE(float PE) { PE_ = PE; }
68
73 void setNHits(int nHits) { nHits_ = nHits; }
74
79 void setIDs(std::vector<unsigned int> &hitIDs) { hitIDs_ = hitIDs; }
80
87 void setCentroidXYZ(double x, double y, double z) {
88 centroidX_ = x;
89 centroidY_ = y;
90 centroidZ_ = z;
91 }
92
96 void setCentroid(double centroid) { centroid_ = centroid; }
97
99 void setTime(float t) { time_ = t; }
100
102 float getTime() const { return time_; }
103
105 void setBeamEfrac(float e) { beamEfrac_ = e; }
106
108 float getBeamEfrac() const { return beamEfrac_; }
109
111 int getSeed() const { return seed_; }
112
114 double getEnergy() const { return energy_; }
115
117 double getPE() const { return PE_; }
118
120 int getNHits() const { return nHits_; }
121
123 double getCentroidX() const { return centroidX_; }
124
126 double getCentroidY() const { return centroidY_; }
127
129 double getCentroidZ() const { return centroidZ_; }
130
132 const std::vector<unsigned int> &getHitIDs() const { return hitIDs_; }
133
135 double getCentroid() const { return centroid_; }
136
137 bool operator<(const TrigScintCluster &rhs) const {
138 return this->getEnergy() < rhs.getEnergy();
139 }
140
141 private:
142 // hits forming the cluster
143 std::vector<unsigned int> hitIDs_;
144
145 // total cluster energy depostion
146 double energy_{0};
147
148 // number of hits forming the cluster
149 int nHits_{0};
150
151 // total cluster photoelectron count
152 float PE_{0};
153
154 // index of cluster seeding hit
155 int seed_{-1};
156
157 // hit centroid in units of channel nb: energy weighted average of the IDs of
158 // the hits forming the cluster
159 double centroid_{-1};
160
161 // hit centroid in x [mm] (not implemented)
162 double centroidX_{0};
163
164 // hit centroid in y [mm] (not implemented)
165 double centroidY_{0};
166
167 // hit centroid in z [mm] (not implemented)
168 double centroidZ_{0};
169
170 // fraction of cluster energy deposited in a sim hit associated with beam
171 // electrons
172 float beamEfrac_{0.};
173
174 // cluster time: energy weighted average of the times of the hits forming the
175 // cluster
176 float time_{0.};
177
182};
183} // namespace ldmx
184
185#endif // TRIGSCINT_EVENT_TRIGSCINTCLUSTER_H_
Class providing string constants for the event model.
Class that stores full reconstructed (linearized) readout QIE sample from the TS.
Stores cluster information from the trigger scintillator pads.
virtual ~TrigScintCluster()
Class destructor.
int getNHits() const
Get the number of hits constituting the cluster.
int getSeed() const
Get cluster seed channel nb.
double getPE() const
Get cluster total photoelectron count.
void setIDs(std::vector< unsigned int > &hitIDs)
The channel numbers of hits forming the cluster.
void setNHits(int nHits)
The number of hits forming the cluster.
TrigScintCluster()=default
Class constructor.
void setCentroidXYZ(double x, double y, double z)
The cluster centroid in x,y,z.
void setEnergy(double energy)
Set the cluster energy.
void Print(Option_t *option="") const
Print a description of this object.
void setCentroid(double centroid)
double getCentroidZ() const
Get cluster centroid in z [mm] (not implmented)
float getTime() const
Get time of hit.
const std::vector< unsigned int > & getHitIDs() const
Get vector of channel IDs of hits forming the cluster.
double getEnergy() const
Get cluster total energy deposition.
double getCentroidX() const
Get cluster centroid in x [mm] (not implmented)
void setPE(float PE)
Set the cluster photoelectron count (PE)
void setBeamEfrac(float e)
Set beam energy fraction of hit.
void setTime(float t)
Set time of hit.
double getCentroidY() const
Get cluster centroid in y [mm] (not implmented)
void Clear(Option_t *option="")
Reset the TrigScintCluster object.
float getBeamEfrac() const
Get beam energy fraction of hit.
ClassDef(TrigScintCluster, 1)
The ROOT class definition.
double getCentroid() const
Get the cluster centroid in units of channel nb.
void addHit(uint idx, const ldmx::TrigScintHit *hit)
Take in the hits that make up the cluster.