LDMX Software
EventReadout.h
Go to the documentation of this file.
1
8#ifndef TRIGSCINT_EVENT_EVENTREADOUT_H
9#define TRIGSCINT_EVENT_EVENTREADOUT_H
10
11/*~~~~~~~~~~~*/
12/* Event */
13/*~~~~~~~~~~~*/
14#include "TrigScint/Event/TrigScintQIEDigis.h"
15
16namespace trigscint {
17
25 public:
29 EventReadout() = default;
30
34 ~EventReadout() = 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 early_pedestal_; }
56
63 void setEarlyPedestal(const float earlyPed) { early_pedestal_ = earlyPed; };
64
66
67 float getPedestal() const { return pedestal_; }
68
74 void setNoise(const float noise) { noise_ = noise; };
75
77
78 float getNoise() const { return noise_; }
79
89 void setQualityFlag(const uint flag) { this->flag_ = flag; };
90
92
93 float getQualityFlag() const { return flag_; }
94
99 void setQ(const std::vector<float> q) { qs_ = q; }
100
104 std::vector<float> getQ() const { return qs_; }
105
110 void setQError(const std::vector<float> qErr) { q_errs_ = qErr; }
111
115 std::vector<float> getQError() const { return q_errs_; }
116
122 void setTotQ(const float totQ) { tot_q_ = totQ; };
123
125 float getTotQ() const { return tot_q_; }
126
132 void setAvgQ(const float avgQ) { avg_q_ = avgQ; };
133
135
136 float getAvgQ() const { return avg_q_; }
137
143 void setMinQ(const float minQ) { min_q_ = minQ; };
144
146
147 float getMinQ() const { return min_q_; }
148
154 void setMaxQ(const float maxQ) { max_q_ = maxQ; };
155
157
158 float getMaxQ() const { return max_q_; }
159
165 void setMedQ(const float medQ) { med_q_ = medQ; };
166
168
169 float getMedQ() const { return med_q_; }
170
176 void setTimeOffset(const int timeOffset) { time_offset_ = timeOffset; };
177
179
180 int getTimeOffset() const { return time_offset_; }
181
187 void setFiberNb(const int fiberNb) { fiber_nb_ = fiberNb; };
188
190
191 int getFiberNb() const { return fiber_nb_; }
192
197 bool operator<(const EventReadout &rhs) const {
198 return this->chan_id_ < rhs.chan_id_;
199 }
200
201 private:
203 std::vector<float> qs_;
204 std::vector<float> q_errs_;
205
206 float pedestal_{-999.};
207 float early_pedestal_{-999.};
208 float noise_{-1.};
209 float tot_q_{-999.};
210 float avg_q_{-999.};
211 float min_q_{-999.};
212 float max_q_{-999.};
213 float med_q_{-999.};
214 int time_offset_{0};
215 int fiber_nb_{-1};
216
217 uint flag_{0};
218 ClassDef(EventReadout, 2);
219
220}; // EventReadout
221
222} // namespace trigscint
223
224#endif // TRIGSCINT_EVENT_EVENTREADOUT_H
This class represents the linearised QIE output from the trigger scintillator, in charge (fC).
void setMedQ(const float medQ)
Set channel (linearized, charge-equiv) median charge.
void setFiberNb(const int fiberNb)
Set channel readout fiber number.
void setTimeOffset(const int timeOffset)
Set channel readout itme offset (in units of samples)
float getEarlyPedestal() const
Get the pedestal calculated only from first N time samples.
float getPedestal() const
Get the pedestal.
void setMinQ(const float minQ)
Set channel (linearized, charge-equiv) minimum charge.
std::vector< float > getQ() const
Get charges of all time samples.
void setQError(const std::vector< float > qErr)
Store charge quantization errors of all time samples.
float getQualityFlag() const
Get the channel data quality flag.
void setNoise(const float noise)
Set channel (linearized, charge-equiv) noise.
float getNoise() const
Get the channel noise.
void setTotQ(const float totQ)
Set channel (linearized, charge-equiv) average charge.
std::vector< float > getQError() const
Get charges of all time samples.
bool operator<(const EventReadout &rhs) const
A dummy operator overloading.
float getTotQ() const
Get the channel totQ.
EventReadout()=default
Class constructor.
float getMedQ() const
Get the channel medQ.
float getMaxQ() const
Get the channel maxQ.
void setQualityFlag(const uint flag)
Set channel data quality flag.
void setPedestal(const float pedestal)
Set channel (linearized.
void setAvgQ(const float avgQ)
Set channel (linearized, charge-equiv) average charge.
int getTimeOffset() const
Get the channel timeOffset.
float getMinQ() const
Get the channel minQ.
void setMaxQ(const float maxQ)
Set channel (linearized, charge-equiv) maximum charge.
int getFiberNb() const
Get the channel fiberNb.
void setQ(const std::vector< float > q)
Store charges of all time samples.
std::vector< float > qs_
analog to digital counts
float getAvgQ() const
Get the channel avgQ.
~EventReadout()=default
Class destructor.
void setEarlyPedestal(const float earlyPed)
Set channel (linearized.
void print(Option_t *option="") const
Print out the object.
void clear(Option_t *option="")
Clear the data in the object.
class for storing QIE output