LDMX Software
RawSiStripHit.h
1
2#ifndef TRACKING_EVENT_RAWSISTRIPHIT_H_
3#define TRACKING_EVENT_RAWSISTRIPHIT_H_
4
5//----------------------//
6// C++ Standard Lib //
7//----------------------//
8#include <iostream>
9#include <vector>
10
11//----------//
12// ROOT //
13//----------//
14#include "TObject.h"
15
16namespace ldmx {
17
27 public:
29 RawSiStripHit() = default;
30
39 RawSiStripHit(std::vector<short> samples, long time);
40
46 virtual ~RawSiStripHit(){};
47
53 void Clear();
54
60 void Print() const { std::cout << this; }
61
73 std::vector<short> getSamples() const { return samples_; }
74
85 long getTime() const { return time_; }
86
96 bool operator<(const RawSiStripHit &rhs) const {
97 return getTime() < rhs.getTime();
98 }
99
111 friend std::ostream &operator<<(std::ostream &output,
112 const RawSiStripHit &hit);
113
114 protected:
116 std::vector<short> samples_;
117
119 long time_{0};
120
123
124}; // RawSiStripHit
125} // namespace ldmx
126
127#endif // TRACKING_EVENT_RAWSISTRIPHIT_H_
Implementation of a raw digitized hit from a silicon strip detector.
long getTime() const
Get the time stamp of this hit.
long time_
The hit time stamp in units of ns.
RawSiStripHit()=default
Default constructor.
virtual ~RawSiStripHit()
Destructor.
void Clear()
Clear the vector of samples and set the timestamp to 0.
void Print() const
Print the string representation of this object.
std::vector< short > samples_
16 bit ADC samples associated with this hit.
std::vector< short > getSamples() const
Get the digitized (ADC) samples composing this hit.
bool operator<(const RawSiStripHit &rhs) const
When the less than operator is used for comparison, return true if this hit's time is less than the h...
ClassDef(RawSiStripHit, 1)
Class declaration needed by the ROOT dictionary.
friend std::ostream & operator<<(std::ostream &output, const RawSiStripHit &hit)
Overload the stream insertion operator to output a string representation of this RawStripHit.