LDMX Software
SimSiStripHit.cxx
1
2#include "Tracking/Event/SimSiStripHit.h"
3
4ClassImp(ldmx::SimSiStripHit);
5
6namespace ldmx {
7
8SimSiStripHit::SimSiStripHit(int layer_id, int strip_id,
9 std::vector<short> samples, long time,
10 int track_id, int pdg_id, int sim_hit_id,
11 float edep)
12 : SiStripHit(samples, time),
13 layer_id_(layer_id),
14 strip_id_(strip_id),
15 track_id_(track_id),
16 pdg_id_(pdg_id),
17 sim_hit_id_(sim_hit_id),
18 edep_(edep) {}
19
21 clearBase();
22 layer_id_ = -1;
23 strip_id_ = -1;
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 SimSiStripHit& hit) {
31 output << "[ SimSiStripHit ]: 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
Abstract base class for a silicon strip detector hit.
Definition SiStripHit.h:27
long time_
The hit time stamp in units of ns.
Definition SiStripHit.h:103
void clearBase()
Clear the fields owned by the base class.
Definition SiStripHit.h:94
std::vector< short > samples_
16 bit ADC samples associated with this hit.
Definition SiStripHit.h:100
Truth (Monte Carlo) representation of a digitized silicon strip detector hit.
float edep_
Energy deposited by the parent SimTrackerHit [MeV].
void clear() override
Clear the samples, time stamp, sensor position and truth fields.
int strip_id_
Readout strip index within the sensor.
int track_id_
Geant4 track ID of the particle that created this hit.
int layer_id_
Sensor layer identifier (from tracking geometry).
int pdg_id_
PDG particle ID of the particle that created this hit.
SimSiStripHit()=default
Default constructor.
int sim_hit_id_
Detector ID of the originating SimTrackerHit.