LDMX Software
SimSiStripHit.h
1
2#ifndef TRACKING_EVENT_SIMSISTRIPHIT_H_
3#define TRACKING_EVENT_SIMSISTRIPHIT_H_
4
5//----------------------//
6// C++ Standard Lib //
7//----------------------//
8#include <iostream>
9#include <vector>
10
11//----------//
12// LDMX //
13//----------//
14#include "Tracking/Event/SiStripHit.h"
15
16namespace ldmx {
17
27class SimSiStripHit : public SiStripHit {
28 public:
30 SimSiStripHit() = default;
31
46 SimSiStripHit(int layer_id, int strip_id, std::vector<short> samples,
47 long time, int track_id = -1, int pdg_id = 0,
48 int sim_hit_id = -1, float edep = 0.f);
49
55 virtual ~SimSiStripHit() = default;
56
62 void clear() override;
63
65 int getLayerID() const { return layer_id_; }
66
68 int getStripID() const { return strip_id_; }
69
72 int getTrackID() const { return track_id_; }
73
76 int getPdgID() const { return pdg_id_; }
77
79 int getSimHitID() const { return sim_hit_id_; }
80
82 float getEdep() const { return edep_; }
83
85 void setLayerID(int v) { layer_id_ = v; }
87 void setStripID(int v) { strip_id_ = v; }
89 void setTrackID(int v) { track_id_ = v; }
91 void setPdgID(int v) { pdg_id_ = v; }
93 void setSimHitID(int v) { sim_hit_id_ = v; }
95 void setEdep(float v) { edep_ = v; }
96
108 friend std::ostream& operator<<(std::ostream& output,
109 const SimSiStripHit& hit);
110
111 protected:
113 int layer_id_{-1};
114
116 int strip_id_{-1};
117
118 // Truth information (for MC truth matching; -1/0 means not set)
120 int track_id_{-1};
122 int pdg_id_{0};
124 int sim_hit_id_{-1};
126 float edep_{0.f};
127
130
131}; // SimSiStripHit
132} // namespace ldmx
133
134#endif // TRACKING_EVENT_SIMSISTRIPHIT_H_
Abstract base class for a silicon strip detector hit.
Definition SiStripHit.h:27
Truth (Monte Carlo) representation of a digitized silicon strip detector hit.
virtual ~SimSiStripHit()=default
Destructor.
int getTrackID() const
Get the Geant4 track ID of the particle that created this hit (-1 if unknown).
void setSimHitID(int v)
Set the detector ID of the originating SimTrackerHit.
void setEdep(float v)
Set the energy deposited by the parent SimTrackerHit [MeV].
int getSimHitID() const
Get the detector ID of the originating SimTrackerHit (-1 if unknown).
float getEdep() const
Get the energy deposited by the parent SimTrackerHit [MeV] (0 if unknown).
void setPdgID(int v)
Set the PDG particle ID of the particle that created this 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.
void setLayerID(int v)
Set the sensor layer identifier.
friend std::ostream & operator<<(std::ostream &output, const SimSiStripHit &hit)
Overload the stream insertion operator to output a string representation of this SimSiStripHit.
int layer_id_
Sensor layer identifier (from tracking geometry).
void setStripID(int v)
Set the readout strip index within the sensor.
ClassDefOverride(SimSiStripHit, 1)
Class declaration needed by the ROOT dictionary.
int getPdgID() const
Get the PDG particle ID of the particle that created this hit (0 if unknown).
int pdg_id_
PDG particle ID of the particle that created this hit.
void setTrackID(int v)
Set the Geant4 track ID of the particle that created this hit.
int getLayerID() const
Get the sensor layer identifier.
int getStripID() const
Get the readout strip index within the sensor.
SimSiStripHit()=default
Default constructor.
int sim_hit_id_
Detector ID of the originating SimTrackerHit.