LDMX Software
ldmx::RawSiStripHit Class Reference

Implementation of a raw digitized hit from a silicon strip detector. More...

#include <RawSiStripHit.h>

Public Member Functions

 RawSiStripHit ()=default
 Default constructor.
 
 RawSiStripHit (uint8_t channel, std::vector< short > samples, long time)
 Constructor.
 
virtual ~RawSiStripHit ()=default
 Destructor.
 
void clear () override
 Clear the samples, time stamp and electronics/quality fields.
 
uint8_t getChannel () const
 
uint8_t getApvId () const
 
uint8_t getHybridId () const
 
uint8_t getFebId () const
 
uint16_t getApvTrigger () const
 
uint8_t getReadError () const
 
uint8_t getHead () const
 
uint8_t getTail () const
 
uint8_t getFilter () const
 
void setChannel (uint8_t v)
 
void setApvId (uint8_t v)
 
void setHybridId (uint8_t v)
 
void setFebId (uint8_t v)
 
void setApvTrigger (uint16_t v)
 
void setReadError (uint8_t v)
 
void setHead (uint8_t v)
 
void setTail (uint8_t v)
 
void setFilter (uint8_t v)
 
- Public Member Functions inherited from ldmx::SiStripHit
 SiStripHit ()=default
 Default constructor.
 
virtual ~SiStripHit ()=default
 Destructor.
 
std::vector< short > getSamples () const
 Get the digitized (ADC) samples composing this hit.
 
long getTime () const
 Get the time stamp of this hit.
 
bool operator< (const SiStripHit &rhs) const
 When the less than operator is used for comparison, return true if this hit's time is less than the hit we are comparing against.
 

Protected Member Functions

 ClassDefOverride (RawSiStripHit, 4)
 Class declaration needed by the ROOT dictionary.
 
- Protected Member Functions inherited from ldmx::SiStripHit
 SiStripHit (std::vector< short > samples, long time)
 Constructor used by derived classes to initialize the shared fields.
 
void clearBase ()
 Clear the fields owned by the base class.
 
 ClassDef (SiStripHit, 1)
 Class declaration needed by the ROOT dictionary.
 

Protected Attributes

uint8_t channel_ {0}
 
uint8_t apv_id_ {0}
 
uint8_t hybrid_id_ {0}
 
uint8_t feb_id_ {0}
 
uint16_t apv_trigger_ {0}
 
uint8_t read_error_ {0}
 
uint8_t head_ {0}
 
uint8_t tail_ {0}
 
uint8_t filter_ {0}
 
- Protected Attributes inherited from ldmx::SiStripHit
std::vector< short > samples_
 16 bit ADC samples associated with this hit.
 
long time_ {0}
 The hit time stamp in units of ns.
 

Friends

std::ostream & operator<< (std::ostream &output, const RawSiStripHit &hit)
 Overload the stream insertion operator to output a string representation of this RawSiStripHit.
 

Detailed Description

Implementation of a raw digitized hit from a silicon strip detector.

This class encapsulates the reco-level (real data) information for a silicon strip hit: in addition to the ADC samples and time stamp held by the SiStripHit base class, it carries the electronics identifiers (channel, APV, hybrid, FEB) and quality/error flags read out of the raw Rogue frame. The truth-level counterpart is SimSiStripHit.

Definition at line 28 of file RawSiStripHit.h.

Constructor & Destructor Documentation

◆ RawSiStripHit()

ldmx::RawSiStripHit::RawSiStripHit ( uint8_t channel,
std::vector< short > samples,
long time )

Constructor.

The remaining electronics and quality fields are populated through the dedicated setters.

Parameters
[in]channelThe readout channel of this hit.
[in]samplesThe ADC samples composing this hit. For now, the size of a sample is assumed to be 16 bits.
[in]timeThe timestamp of this hit as set by the data acquisition system.

Definition at line 8 of file RawSiStripHit.cxx.

10 : SiStripHit(samples, time), channel_(channel) {}
SiStripHit()=default
Default constructor.

◆ ~RawSiStripHit()

virtual ldmx::RawSiStripHit::~RawSiStripHit ( )
virtualdefault

Destructor.

Currently, the destructor does nothing.

Member Function Documentation

◆ clear()

void ldmx::RawSiStripHit::clear ( )
overridevirtual

Clear the samples, time stamp and electronics/quality fields.

This method is needed by ROOT when building the dictionary.

Implements ldmx::SiStripHit.

Definition at line 12 of file RawSiStripHit.cxx.

12 {
13 clearBase();
14 channel_ = 0;
15 apv_id_ = 0;
16 hybrid_id_ = 0;
17 feb_id_ = 0;
18 apv_trigger_ = 0;
19 read_error_ = 0;
20 head_ = 0;
21 tail_ = 0;
22 filter_ = 0;
23}
void clearBase()
Clear the fields owned by the base class.
Definition SiStripHit.h:94

References ldmx::SiStripHit::clearBase().

◆ getApvId()

uint8_t ldmx::RawSiStripHit::getApvId ( ) const
inline

Definition at line 62 of file RawSiStripHit.h.

62{ return apv_id_; }

◆ getApvTrigger()

uint16_t ldmx::RawSiStripHit::getApvTrigger ( ) const
inline

Definition at line 65 of file RawSiStripHit.h.

65{ return apv_trigger_; }

◆ getChannel()

uint8_t ldmx::RawSiStripHit::getChannel ( ) const
inline

Definition at line 61 of file RawSiStripHit.h.

61{ return channel_; }

◆ getFebId()

uint8_t ldmx::RawSiStripHit::getFebId ( ) const
inline

Definition at line 64 of file RawSiStripHit.h.

64{ return feb_id_; }

◆ getFilter()

uint8_t ldmx::RawSiStripHit::getFilter ( ) const
inline

Definition at line 69 of file RawSiStripHit.h.

69{ return filter_; }

◆ getHead()

uint8_t ldmx::RawSiStripHit::getHead ( ) const
inline

Definition at line 67 of file RawSiStripHit.h.

67{ return head_; }

◆ getHybridId()

uint8_t ldmx::RawSiStripHit::getHybridId ( ) const
inline

Definition at line 63 of file RawSiStripHit.h.

63{ return hybrid_id_; }

◆ getReadError()

uint8_t ldmx::RawSiStripHit::getReadError ( ) const
inline

Definition at line 66 of file RawSiStripHit.h.

66{ return read_error_; }

◆ getTail()

uint8_t ldmx::RawSiStripHit::getTail ( ) const
inline

Definition at line 68 of file RawSiStripHit.h.

68{ return tail_; }

◆ setApvId()

void ldmx::RawSiStripHit::setApvId ( uint8_t v)
inline

Definition at line 72 of file RawSiStripHit.h.

72{ apv_id_ = v; }

◆ setApvTrigger()

void ldmx::RawSiStripHit::setApvTrigger ( uint16_t v)
inline

Definition at line 75 of file RawSiStripHit.h.

75{ apv_trigger_ = v; }

◆ setChannel()

void ldmx::RawSiStripHit::setChannel ( uint8_t v)
inline

Definition at line 71 of file RawSiStripHit.h.

71{ channel_ = v; }

◆ setFebId()

void ldmx::RawSiStripHit::setFebId ( uint8_t v)
inline

Definition at line 74 of file RawSiStripHit.h.

74{ feb_id_ = v; }

◆ setFilter()

void ldmx::RawSiStripHit::setFilter ( uint8_t v)
inline

Definition at line 79 of file RawSiStripHit.h.

79{ filter_ = v; }

◆ setHead()

void ldmx::RawSiStripHit::setHead ( uint8_t v)
inline

Definition at line 77 of file RawSiStripHit.h.

77{ head_ = v; }

◆ setHybridId()

void ldmx::RawSiStripHit::setHybridId ( uint8_t v)
inline

Definition at line 73 of file RawSiStripHit.h.

73{ hybrid_id_ = v; }

◆ setReadError()

void ldmx::RawSiStripHit::setReadError ( uint8_t v)
inline

Definition at line 76 of file RawSiStripHit.h.

76{ read_error_ = v; }

◆ setTail()

void ldmx::RawSiStripHit::setTail ( uint8_t v)
inline

Definition at line 78 of file RawSiStripHit.h.

78{ tail_ = v; }

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & output,
const RawSiStripHit & hit )
friend

Overload the stream insertion operator to output a string representation of this RawSiStripHit.

Parameters
[in]outputThe output stream where the string representation will be inserted.
[in]hitThe RawSiStripHit to output.
Returns
An ostream object with the string representation of RawSiStripHit inserted.

Definition at line 25 of file RawSiStripHit.cxx.

25 {
26 output << "[ RawSiStripHit ]: Samples: { ";
27 for (auto isample{0}; isample < (hit.samples_.size() - 1); ++isample)
28 output << hit.samples_[isample] << ", ";
29 output << hit.samples_[hit.samples_.size() - 1] << " } "
30 << "Time: " << hit.time_ << " Ch: " << static_cast<int>(hit.channel_)
31 << " APV: " << static_cast<int>(hit.apv_id_)
32 << " Hybrid: " << static_cast<int>(hit.hybrid_id_)
33 << " FEB: " << static_cast<int>(hit.feb_id_)
34 << " Trig: " << hit.apv_trigger_
35 << " Err: " << static_cast<int>(hit.read_error_) << std::endl;
36
37 return output;
38}

Member Data Documentation

◆ apv_id_

uint8_t ldmx::RawSiStripHit::apv_id_ {0}
protected

Definition at line 97 of file RawSiStripHit.h.

97{0};

◆ apv_trigger_

uint16_t ldmx::RawSiStripHit::apv_trigger_ {0}
protected

Definition at line 100 of file RawSiStripHit.h.

100{0};

◆ channel_

uint8_t ldmx::RawSiStripHit::channel_ {0}
protected

Definition at line 96 of file RawSiStripHit.h.

96{0};

◆ feb_id_

uint8_t ldmx::RawSiStripHit::feb_id_ {0}
protected

Definition at line 99 of file RawSiStripHit.h.

99{0};

◆ filter_

uint8_t ldmx::RawSiStripHit::filter_ {0}
protected

Definition at line 104 of file RawSiStripHit.h.

104{0};

◆ head_

uint8_t ldmx::RawSiStripHit::head_ {0}
protected

Definition at line 102 of file RawSiStripHit.h.

102{0};

◆ hybrid_id_

uint8_t ldmx::RawSiStripHit::hybrid_id_ {0}
protected

Definition at line 98 of file RawSiStripHit.h.

98{0};

◆ read_error_

uint8_t ldmx::RawSiStripHit::read_error_ {0}
protected

Definition at line 101 of file RawSiStripHit.h.

101{0};

◆ tail_

uint8_t ldmx::RawSiStripHit::tail_ {0}
protected

Definition at line 103 of file RawSiStripHit.h.

103{0};

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