LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
trigscint::EventReadout Class Reference

This class represents the linearised QIE output from the trigger scintillator, in charge (fC). More...

#include <EventReadout.h>

Public Member Functions

 EventReadout ()=default
 Class constructor.
 
 ~EventReadout ()=default
 Class destructor.
 
void Clear (Option_t *option="")
 Clear the data in the object.
 
void Print (Option_t *option="") const
 Print out the object.
 
void setPedestal (const float pedestal)
 Set channel (linearized.
 
float getEarlyPedestal () const
 Get the pedestal calculated only from first N time samples.
 
void setEarlyPedestal (const float earlyPed)
 Set channel (linearized.
 
float getPedestal () const
 Get the pedestal.
 
void setNoise (const float noise)
 Set channel (linearized, charge-equiv) noise.
 
float getNoise () const
 Get the channel noise.
 
void setQualityFlag (const uint flag)
 Set channel data quality flag.
 
float getQualityFlag () const
 Get the channel data quality flag.
 
void setQ (const std::vector< float > q)
 Store charges of all time samples.
 
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.
 
std::vector< float > getQError () const
 Get charges of all time samples.
 
void setTotQ (const float totQ)
 Set channel (linearized, charge-equiv) average charge.
 
float getTotQ () const
 Get the channel totQ.
 
void setAvgQ (const float avgQ)
 Set channel (linearized, charge-equiv) average charge.
 
float getAvgQ () const
 Get the channel avgQ.
 
void setMinQ (const float minQ)
 Set channel (linearized, charge-equiv) minimum charge.
 
float getMinQ () const
 Get the channel minQ.
 
void setMaxQ (const float maxQ)
 Set channel (linearized, charge-equiv) maximum charge.
 
float getMaxQ () const
 Get the channel maxQ.
 
void setMedQ (const float medQ)
 Set channel (linearized, charge-equiv) median charge.
 
float getMedQ () const
 Get the channel medQ.
 
void setTimeOffset (const int timeOffset)
 Set channel readout itme offset (in units of samples)
 
int getTimeOffset () const
 Get the channel timeOffset.
 
void setFiberNb (const int fiberNb)
 Set channel readout fiber number.
 
int getFiberNb () const
 Get the channel fiberNb.
 
bool operator< (const EventReadout &rhs) const
 A dummy operator overloading.
 
- Public Member Functions inherited from trigscint::TrigScintQIEDigis
 TrigScintQIEDigis ()=default
 Default constructor.
 
virtual ~TrigScintQIEDigis ()=default
 Default destructor.
 
void Print (Option_t *option="") const
 Print ifo about the class.
 
void Clear (Option_t *option="")
 A dummy function.
 
bool operator< (const TrigScintQIEDigis &rhs) const
 A dummy operator overloading.
 
int getChanID () const
 Get channel ID.
 
int getElecID () const
 Get electronics ID.
 
std::vector< int > getADC () const
 Get ADCs of all time samples.
 
std::vector< int > getTDC () const
 Get tdcs of all time samples.
 
std::vector< int > getCID () const
 Get Cap IDs of all time samples.
 
void setTimeSinceSpill (const uint32_t timeSpill)
 Store the event time since spill counter.
 
uint32_t getTimeSinceSpill () const
 Store the event time since spill counter.
 
void setChanID (const int chanid)
 Store the channel ID.
 
void setElecID (const int elecid)
 Store the electronics ID.
 
void setADC (const std::vector< int > adc)
 Store adcs of all time samples.
 
void setTDC (const std::vector< int > tdc)
 Store tdcs of all time samples.
 
void setCID (const std::vector< int > cid)
 Store cids of all time samples.
 

Private Member Functions

 ClassDef (EventReadout, 1)
 

Private Attributes

std::vector< float > qs_
 analog to digital counts
 
std::vector< float > qErrs_
 
float pedestal_ {-999.}
 
float earlyPedestal_ {-999.}
 
float noise_ {-1.}
 
float totQ_ {-999.}
 
float avgQ_ {-999.}
 
float minQ_ {-999.}
 
float maxQ_ {-999.}
 
float medQ_ {-999.}
 
int timeOffset_ {0}
 
int fiberNb_ {-1}
 
uint flag_ {0}
 

Additional Inherited Members

- Protected Attributes inherited from trigscint::TrigScintQIEDigis
int chanID_
 channel ID
 
int elecID_ {-1}
 channel ID
 
std::vector< int > adcs_
 analog to digital counts
 
std::vector< int > tdcs_
 Time to Digital counts.
 
uint32_t timeSinceSpillCounter_
 Time since spill (a counter, to be divided by 125e6 or so)
 

Detailed Description

This class represents the linearised QIE output from the trigger scintillator, in charge (fC).

Definition at line 24 of file EventReadout.h.

Member Function Documentation

◆ Clear()

void trigscint::EventReadout::Clear ( Option_t *  option = "")

Clear the data in the object.

Definition at line 25 of file EventReadout.cxx.

25{}

◆ getAvgQ()

float trigscint::EventReadout::getAvgQ ( ) const
inline

Get the channel avgQ.

Definition at line 136 of file EventReadout.h.

136{ return avgQ_; }

◆ getEarlyPedestal()

float trigscint::EventReadout::getEarlyPedestal ( ) const
inline

Get the pedestal calculated only from first N time samples.

Definition at line 55 of file EventReadout.h.

55{ return earlyPedestal_; }

◆ getFiberNb()

int trigscint::EventReadout::getFiberNb ( ) const
inline

Get the channel fiberNb.

Definition at line 191 of file EventReadout.h.

191{ return fiberNb_; }

Referenced by trigscint::EventReadoutProducer::produce().

◆ getMaxQ()

float trigscint::EventReadout::getMaxQ ( ) const
inline

Get the channel maxQ.

Definition at line 158 of file EventReadout.h.

158{ return maxQ_; }

◆ getMedQ()

float trigscint::EventReadout::getMedQ ( ) const
inline

Get the channel medQ.

Definition at line 169 of file EventReadout.h.

169{ return medQ_; }

◆ getMinQ()

float trigscint::EventReadout::getMinQ ( ) const
inline

Get the channel minQ.

Definition at line 147 of file EventReadout.h.

147{ return minQ_; }

◆ getNoise()

float trigscint::EventReadout::getNoise ( ) const
inline

Get the channel noise.

Definition at line 78 of file EventReadout.h.

78{ return noise_; }

Referenced by trigscint::EventReadoutProducer::produce().

◆ getPedestal()

float trigscint::EventReadout::getPedestal ( ) const
inline

Get the pedestal.

Definition at line 67 of file EventReadout.h.

67{ return pedestal_; }

Referenced by trigscint::EventReadoutProducer::produce().

◆ getQ()

std::vector< float > trigscint::EventReadout::getQ ( ) const
inline

Get charges of all time samples.

Definition at line 104 of file EventReadout.h.

104{ return qs_; }
std::vector< float > qs_
analog to digital counts

References qs_.

◆ getQError()

std::vector< float > trigscint::EventReadout::getQError ( ) const
inline

Get charges of all time samples.

Definition at line 115 of file EventReadout.h.

115{ return qErrs_; }

◆ getQualityFlag()

float trigscint::EventReadout::getQualityFlag ( ) const
inline

Get the channel data quality flag.

Definition at line 93 of file EventReadout.h.

93{ return flag_; }

◆ getTimeOffset()

int trigscint::EventReadout::getTimeOffset ( ) const
inline

Get the channel timeOffset.

Definition at line 180 of file EventReadout.h.

180{ return timeOffset_; }

◆ getTotQ()

float trigscint::EventReadout::getTotQ ( ) const
inline

Get the channel totQ.

Definition at line 125 of file EventReadout.h.

125{ return totQ_; }

Referenced by trigscint::EventReadoutProducer::produce().

◆ operator<()

bool trigscint::EventReadout::operator< ( const EventReadout rhs) const
inline

A dummy operator overloading.

Note
required for declaring std::vector<> in EventDef.h

Definition at line 197 of file EventReadout.h.

197 {
198 return this->chanID_ < rhs.chanID_;
199 }

References trigscint::TrigScintQIEDigis::chanID_.

◆ Print()

void trigscint::EventReadout::Print ( Option_t *  option = "") const

Print out the object.

Definition at line 15 of file EventReadout.cxx.

15 {
16 std::cout << "EventReadout { "
17 << "chanID= " << chanID_ << ", "
18 << "ADC[0]= " << adcs_[0] << ", "
19 << "charge[0]= " << qs_[0] << ", "
20 << "pedestal= " << pedestal_ << ", "
21 << "noise= " << noise_ << ", "
22 << "}\n";
23}
std::vector< int > adcs_
analog to digital counts

References trigscint::TrigScintQIEDigis::adcs_, trigscint::TrigScintQIEDigis::chanID_, and qs_.

◆ setAvgQ()

void trigscint::EventReadout::setAvgQ ( const float  avgQ)
inline

Set channel (linearized, charge-equiv) average charge.

Parameters
avgQThe (time sample) average charge of the channel

Definition at line 132 of file EventReadout.h.

132{ avgQ_ = avgQ; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setEarlyPedestal()

void trigscint::EventReadout::setEarlyPedestal ( const float  earlyPed)
inline

Set channel (linearized.

charge) pedestal calculated from beginning of readout

Parameters
pedestalThe pedestal of the first N time samples in the channel

Definition at line 63 of file EventReadout.h.

63{ earlyPedestal_ = earlyPed; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setFiberNb()

void trigscint::EventReadout::setFiberNb ( const int  fiberNb)
inline

Set channel readout fiber number.

Parameters
fiberNbThe channel readout fiber number

Definition at line 187 of file EventReadout.h.

187{ fiberNb_ = fiberNb; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setMaxQ()

void trigscint::EventReadout::setMaxQ ( const float  maxQ)
inline

Set channel (linearized, charge-equiv) maximum charge.

Parameters
maxQThe (time sample) maximum charge of the channel

Definition at line 154 of file EventReadout.h.

154{ maxQ_ = maxQ; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setMedQ()

void trigscint::EventReadout::setMedQ ( const float  medQ)
inline

Set channel (linearized, charge-equiv) median charge.

Parameters
medQThe (time sample) median charge of the channel

Definition at line 165 of file EventReadout.h.

165{ medQ_ = medQ; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setMinQ()

void trigscint::EventReadout::setMinQ ( const float  minQ)
inline

Set channel (linearized, charge-equiv) minimum charge.

Parameters
minQThe (time sample) minimum charge of the channel

Definition at line 143 of file EventReadout.h.

143{ minQ_ = minQ; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setNoise()

void trigscint::EventReadout::setNoise ( const float  noise)
inline

Set channel (linearized, charge-equiv) noise.

Parameters
noiseThe noise of the channel

Definition at line 74 of file EventReadout.h.

74{ noise_ = noise; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setPedestal()

void trigscint::EventReadout::setPedestal ( const float  pedestal)
inline

Set channel (linearized.

charge) pedestal

Parameters
pedestalThe pedestal of the channel

Definition at line 51 of file EventReadout.h.

51{ pedestal_ = pedestal; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setQ()

void trigscint::EventReadout::setQ ( const std::vector< float >  q)
inline

Store charges of all time samples.

Parameters
q_array of qs

Definition at line 99 of file EventReadout.h.

99{ qs_ = q; }

References qs_.

Referenced by trigscint::EventReadoutProducer::produce().

◆ setQError()

void trigscint::EventReadout::setQError ( const std::vector< float >  qErr)
inline

Store charge quantization errors of all time samples.

Parameters
qErr_array of quantization errors

Definition at line 110 of file EventReadout.h.

110{ qErrs_ = qErr; }

Referenced by trigscint::EventReadoutProducer::produce().

◆ setQualityFlag()

void trigscint::EventReadout::setQualityFlag ( const uint  flag)
inline

Set channel data quality flag.

This is the binary combination of 4 flags: spike: 1 plateau: 10 long pulse: 100 (not implemented yet) oscillation: 1000

Parameters
flagThe quality flag of the channel

Definition at line 89 of file EventReadout.h.

89{ this->flag_ = flag; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setTimeOffset()

void trigscint::EventReadout::setTimeOffset ( const int  timeOffset)
inline

Set channel readout itme offset (in units of samples)

Parameters
timeOffsetThe (time sample) offset in channel readout

Definition at line 176 of file EventReadout.h.

176{ timeOffset_ = timeOffset; };

Referenced by trigscint::EventReadoutProducer::produce().

◆ setTotQ()

void trigscint::EventReadout::setTotQ ( const float  totQ)
inline

Set channel (linearized, charge-equiv) average charge.

Parameters
totQThe (time sample) average charge of the channel

Definition at line 122 of file EventReadout.h.

122{ totQ_ = totQ; };

Referenced by trigscint::EventReadoutProducer::produce().

Member Data Documentation

◆ avgQ_

float trigscint::EventReadout::avgQ_ {-999.}
private

Definition at line 210 of file EventReadout.h.

210{-999.};

◆ earlyPedestal_

float trigscint::EventReadout::earlyPedestal_ {-999.}
private

Definition at line 207 of file EventReadout.h.

207{-999.};

◆ fiberNb_

int trigscint::EventReadout::fiberNb_ {-1}
private

Definition at line 215 of file EventReadout.h.

215{-1};

◆ flag_

uint trigscint::EventReadout::flag_ {0}
private

Definition at line 217 of file EventReadout.h.

217{0};

◆ maxQ_

float trigscint::EventReadout::maxQ_ {-999.}
private

Definition at line 212 of file EventReadout.h.

212{-999.};

◆ medQ_

float trigscint::EventReadout::medQ_ {-999.}
private

Definition at line 213 of file EventReadout.h.

213{-999.};

◆ minQ_

float trigscint::EventReadout::minQ_ {-999.}
private

Definition at line 211 of file EventReadout.h.

211{-999.};

◆ noise_

float trigscint::EventReadout::noise_ {-1.}
private

Definition at line 208 of file EventReadout.h.

208{-1.};

◆ pedestal_

float trigscint::EventReadout::pedestal_ {-999.}
private

Definition at line 206 of file EventReadout.h.

206{-999.};

◆ qErrs_

std::vector<float> trigscint::EventReadout::qErrs_
private

Definition at line 204 of file EventReadout.h.

◆ qs_

std::vector<float> trigscint::EventReadout::qs_
private

analog to digital counts

Definition at line 203 of file EventReadout.h.

Referenced by getQ(), Print(), and setQ().

◆ timeOffset_

int trigscint::EventReadout::timeOffset_ {0}
private

Definition at line 214 of file EventReadout.h.

214{0};

◆ totQ_

float trigscint::EventReadout::totQ_ {-999.}
private

Definition at line 209 of file EventReadout.h.

209{-999.};

The documentation for this class was generated from the following files: