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 friend std::ostream &operator<<(std::ostream &o, const TestBeamHit &d);
45
51 void setPedestal(const float pedestal) { pedestal_ = pedestal; };
52
54
55 float getEarlyPedestal() const { return early_pedestal_; }
56
63 void setEarlyPedestal(const float earlyPed) { early_pedestal_ = earlyPed; };
64
66
67 float getPedestal() const { return pedestal_; }
68
73 void setQ(const float q) { pulse_q_ = q; }
74
78 float getQ() const { return pulse_q_; }
79
84 // void setPE(const float pe) { PE_ = pe; }
85
89 // float getPE() const { return PE_; }
90
96 void setStartSample(const int startSample) { start_sample_ = startSample; };
97
99
100 int getStartSample() const { return start_sample_; }
101
108 void setSampAbovePed(const int sampAbovePed) {
109 samp_above_ped_ = sampAbovePed;
110 };
111
113 int getSampAbovePed() const { return samp_above_ped_; }
114
121 void setSampAboveThr(const int sampAboveThr) {
122 samp_above_thr_ = sampAboveThr;
123 };
124
126 int getSampAboveThr() const { return samp_above_thr_; }
127
134 void setHitQuality(const int isClean) { pass_hit_quality_ = isClean; };
135
137 int getHitQuality() const { return pass_hit_quality_; }
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) { pulse_width_ = pulseWidth; };
160
162 int getPulseWidth() const { return pulse_width_; }
163
168 bool operator<(const TestBeamHit &rhs) const {
169 return this->pulse_q_ < rhs.pulse_q_;
170 }
171
172 private:
173 float pedestal_{-999.};
174 // assumed/average channel pedestal used in subtraction [fC]
175 float early_pedestal_{-999.};
176 // early pedestal (average over first 5 time samples) [fC]
177 float pulse_q_{-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 start_sample_{-1}; // start sample
181 int pulse_width_{-1}; // specified pulse width (in number of samples)
182 int samp_above_ped_{-1}; // actual number of consecutive samples above
183 // pedestal after start sample
184 int samp_above_thr_{-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 pass_hit_quality_{0};
189 // 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, 5);
204
205}; // TestBeamHit
206
207} // namespace trigscint
208
209#endif // TRIGSCINT_EVENT_TESTBEAMHIT_H
void clear()
Clear the data in the object.
Definition HcalHit.cxx:9
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.
friend std::ostream & operator<<(std::ostream &o, const TestBeamHit &d)
Print out the object.
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.
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 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.