LDMX Software
ldmx::SiStripHit Class Referenceabstract

Abstract base class for a silicon strip detector hit. More...

#include <SiStripHit.h>

Public Member Functions

 SiStripHit ()=default
 Default constructor.
 
virtual ~SiStripHit ()=default
 Destructor.
 
virtual void clear ()=0
 Clear the data in the object.
 
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

 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

std::vector< short > samples_
 16 bit ADC samples associated with this hit.
 
long time_ {0}
 The hit time stamp in units of ns.
 

Detailed Description

Abstract base class for a silicon strip detector hit.

This class holds the information that is common to both the raw (reco/data) and simulated (truth) representations of a silicon strip hit: the ADC samples and the hit time stamp. The reco-level electronics and quality information lives in RawSiStripHit; the truth-level (MC) information lives in SimSiStripHit.

Definition at line 27 of file SiStripHit.h.

Constructor & Destructor Documentation

◆ ~SiStripHit()

virtual ldmx::SiStripHit::~SiStripHit ( )
virtualdefault

Destructor.

Currently, the destructor does nothing.

◆ SiStripHit()

ldmx::SiStripHit::SiStripHit ( std::vector< short > samples,
long time )
inlineprotected

Constructor used by derived classes to initialize the shared fields.

Parameters
[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 90 of file SiStripHit.h.

91 : samples_(samples), time_(time) {}
long time_
The hit time stamp in units of ns.
Definition SiStripHit.h:103
std::vector< short > samples_
16 bit ADC samples associated with this hit.
Definition SiStripHit.h:100

Member Function Documentation

◆ clear()

virtual void ldmx::SiStripHit::clear ( )
pure virtual

Clear the data in the object.

Pure virtual so that SiStripHit cannot be instantiated on its own; each concrete hit type is responsible for clearing its own fields (and the shared base fields via clearBase()).

Implemented in ldmx::RawSiStripHit, and ldmx::SimSiStripHit.

◆ clearBase()

void ldmx::SiStripHit::clearBase ( )
inlineprotected

Clear the fields owned by the base class.

Definition at line 94 of file SiStripHit.h.

94 {
95 samples_.clear();
96 time_ = 0;
97 }

References samples_, and time_.

Referenced by ldmx::RawSiStripHit::clear(), and ldmx::SimSiStripHit::clear().

◆ getSamples()

std::vector< short > ldmx::SiStripHit::getSamples ( ) const
inline

Get the digitized (ADC) samples composing this hit.

This can be a single value or multiple values depending on the readout being used.

Returns
A std::vector of 16 bit samples.

Definition at line 56 of file SiStripHit.h.

56{ return samples_; }

References samples_.

◆ getTime()

long ldmx::SiStripHit::getTime ( ) const
inline

Get the time stamp of this hit.

This is the time stamp as set by the data acquisition system. This will typically be in units of ns.

Returns
The timestamp of this hit in ns.

Definition at line 66 of file SiStripHit.h.

66{ return time_; }

References time_.

Referenced by operator<().

◆ operator<()

bool ldmx::SiStripHit::operator< ( const SiStripHit & rhs) const
inline

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.

Parameters
[in]rhsThe SiStripHit on the right side of the comparison.
Returns
True if the timestamp of this hit is less than the hit being compared against.

Definition at line 77 of file SiStripHit.h.

77 {
78 return getTime() < rhs.getTime();
79 }
long getTime() const
Get the time stamp of this hit.
Definition SiStripHit.h:66

References getTime().

Member Data Documentation

◆ samples_

std::vector<short> ldmx::SiStripHit::samples_
protected

16 bit ADC samples associated with this hit.

Definition at line 100 of file SiStripHit.h.

Referenced by clearBase(), and getSamples().

◆ time_

long ldmx::SiStripHit::time_ {0}
protected

The hit time stamp in units of ns.

Definition at line 103 of file SiStripHit.h.

103{0};

Referenced by clearBase(), and getTime().


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