LDMX Software
RawSiStripHit.cxx
1
2#include "Tracking/Event/RawSiStripHit.h"
3
4namespace ldmx {
5
6RawSiStripHit::RawSiStripHit(int layer_id, int strip_id,
7 std::vector<short> samples, long time,
8 int track_id, int pdg_id, int sim_hit_id,
9 float edep)
10 : layer_id_(layer_id),
11 strip_id_(strip_id),
12 samples_(samples),
13 time_(time),
14 track_id_(track_id),
15 pdg_id_(pdg_id),
16 sim_hit_id_(sim_hit_id),
17 edep_(edep) {}
18
20 layer_id_ = -1;
21 strip_id_ = -1;
22 samples_.clear();
23 time_ = 0;
24 track_id_ = -1;
25 pdg_id_ = 0;
26 sim_hit_id_ = -1;
27 edep_ = 0.f;
28}
29
30std::ostream &operator<<(std::ostream &output, const RawSiStripHit &hit) {
31 output << "[ RawSiStripHit ]: layer=" << hit.layer_id_
32 << " strip=" << hit.strip_id_ << " Samples: { ";
33 for (auto isample{0}; isample < (int)(hit.samples_.size() - 1); ++isample)
34 output << hit.samples_[isample] << ", ";
35 output << hit.samples_[hit.samples_.size() - 1] << " } "
36 << "Time: " << hit.time_ << " track_id=" << hit.track_id_
37 << " pdg_id=" << hit.pdg_id_ << " sim_hit_id=" << hit.sim_hit_id_
38 << " edep=" << hit.edep_ << " MeV" << std::endl;
39
40 return output;
41}
42
43} // namespace ldmx
Implementation of a raw digitized hit from a silicon strip detector.
long time_
The hit time stamp in units of ns.
int layer_id_
Sensor layer identifier (from tracking geometry).
int track_id_
Geant4 track ID of the particle that created this hit.
RawSiStripHit()=default
Default constructor.
void clear()
Clear the vector of samples and set the timestamp to 0.
int sim_hit_id_
Detector ID of the originating SimTrackerHit.
std::vector< short > samples_
16 bit ADC samples associated with this hit.
int strip_id_
Readout strip index within the sensor.
float edep_
Energy deposited by the parent SimTrackerHit [MeV].
int pdg_id_
PDG particle ID of the particle that created this hit.