LDMX Software
TestBeamHit.h
Go to the documentation of this file.
1
8#ifndef TRIGSCINT_EVENT_TESTBEAMHIT_H
9#define TRIGSCINT_EVENT_TESTBEAMHIT_H
10
11/*~~~~~~~~~~~*/
12/* Event */
13/*~~~~~~~~~~~*/
14#include "TrigScint/Event/TrigScintHit.h"
15
16namespace trigscint {
17
25 public:
29 TestBeamHit() = default;
30
34 ~TestBeamHit() = default;
35
39 void Clear(Option_t *option = "");
40
44 void Print(Option_t *option = "") const;
45
51 void setPedestal(const float pedestal) { pedestal_ = pedestal; };
52
54
55 float getEarlyPedestal() const { return earlyPedestal_; }
56
63 void setEarlyPedestal(const float earlyPed) { earlyPedestal_ = earlyPed; };
64
66
67 float getPedestal() const { return pedestal_; }
68
73 void setQ(const float q) { pulseQ_ = q; }
74
78 float getQ() const { return pulseQ_; }
79
84 // void setPE(const float pe) { PE_ = pe; }
85
89 // float getPE() const { return PE_; }
90
96 void setStartSample(const int startSample) { startSample_ = startSample; };
97
99
100 int getStartSample() const { return startSample_; }
101
108 void setSampAbovePed(const int sampAbovePed) {
109 sampAbovePed_ = sampAbovePed;
110 };
111
113 int getSampAbovePed() const { return sampAbovePed_; }
114
121 void setSampAboveThr(const int sampAboveThr) {
122 sampAboveThr_ = sampAboveThr;
123 };
124
126 int getSampAboveThr() const { return sampAboveThr_; }
127
134 void setHitQuality(const int isClean) { passHitQuality_ = isClean; };
135
137 int getHitQuality() const { return passHitQuality_; }
138
148 void setQualityFlag(const uint flag) { this->flag_ = flag; };
149
151
152 float getQualityFlag() const { return flag_; }
153
159 void setPulseWidth(const int pulseWidth) { pulseWidth_ = pulseWidth; };
160
162 int getPulseWidth() const { return pulseWidth_; }
163
168 bool operator<(const TestBeamHit &rhs) const {
169 return this->pulseQ_ < rhs.pulseQ_;
170 }
171
172 private:
173 float pedestal_{
174 -999.}; // assumed/average channel pedestal used in subtraction [fC]
175 float earlyPedestal_{
176 -999.}; // early pedestal (average over first 5 time samples) [fC]
177 float pulseQ_{-999.}; // integrated, ped subtracted charge over pulse [fC]
178 // float PE_{-1.}; // number of photoelectrons in the hit (override from
179 // trigscinthit which seems unreliable)
180 int startSample_{-1}; // start sample
181 int pulseWidth_{-1}; // specified pulse width (in number of samples)
182 int sampAbovePed_{-1}; // actual number of consecutive samples above pedestal
183 // after start sample
184 int sampAboveThr_{-1}; // actual number of consecutive samples above
185 // threshold after start sample
186 // bool passHitQuality_{false}; //track if hit has been checked for and
187 // passed quality criteria
188 int passHitQuality_{
189 0}; // track if hit has been checked for and passed quality criteria
190
191 uint flag_{0}; // more elaborate quality flag (binary sum)
192
193 // - nPulses -- TODO, when running in continuous mode
194 /*
195 - total Q // this is an event readout property
196 - ped subtracted total Q // so is this
197 - PE value // already property of trigscinthit
198 - max amplitude in pulse // so is this
199 - store material assumption? isLYSO? -- no, this is a bar property, not a hit
200 property
201 */
202
203 ClassDef(TestBeamHit, 3);
204
205}; // TestBeamHit
206
207} // namespace trigscint
208
209#endif // TRIGSCINT_EVENT_TESTBEAMHIT_H
This class represents the linearised QIE output from the trigger scintillator, in charge (fC).
Definition TestBeamHit.h:24
int getStartSample() const
Get the pulse/hit startSample.
float getQ() const
Get hit charge.
Definition TestBeamHit.h:78
void setQualityFlag(const uint flag)
Set hit data quality flag.
void setHitQuality(const int isClean)
Set whether hit has been checked for and passed quality criteria.
~TestBeamHit()=default
Class destructor.
bool operator<(const TestBeamHit &rhs) const
A dummy operator overloading.
float getQualityFlag() const
Get the hit data quality flag.
TestBeamHit()=default
Class constructor.
void setSampAbovePed(const int sampAbovePed)
Set number of samples above pedestal in pulse/hit.
void setQ(const float q)
Store total charge.
Definition TestBeamHit.h:73
void setSampAboveThr(const int sampAboveThr)
Set number of samples above threshold in pulse/hit.
int getSampAbovePed() const
Get the pulse/hit sampAbovePed.
void Clear(Option_t *option="")
Clear the data in the object.
int getHitQuality() const
Get the pulse/hit isClean.
void setPulseWidth(const int pulseWidth)
Set width used to integrate pulse/hit (in time samples)
void setPedestal(const float pedestal)
Set channel (linearized.
Definition TestBeamHit.h:51
void setEarlyPedestal(const float earlyPed)
Set channel (linearized.
Definition TestBeamHit.h:63
int getPulseWidth() const
Get the pulse/hit pulseWidth.
void Print(Option_t *option="") const
Print out the object.
void setStartSample(const int startSample)
Store total charge.
Definition TestBeamHit.h:96
float getEarlyPedestal() const
Get the pedestal calculated only from first N time samples.
Definition TestBeamHit.h:55
float getPedestal() const
Get the pedestal.
Definition TestBeamHit.h:67
int getSampAboveThr() const
Get the pulse/hit sampAboveThr.