5 #include <common/sand.h>
25 explicit EDEPHit(
const TG4HitSegment& hit,
int i = -1)
31 contrib_(hit.Contrib.at(0)),
46 const sand::vec_4d& stop,
47 double energy_deposit,
48 double secondary_deposit,
55 energy_deposit_(energy_deposit),
56 secondary_deposit_(secondary_deposit),
57 track_length_(track_length),
59 primary_id_(primary_id),
70 const sand::vec_4d&
GetStart()
const {
return start_; };
76 const sand::vec_4d&
GetStop()
const {
return stop_; };
112 const int&
GetId()
const {
return h_index; };
115 sand::vec_4d start_{};
116 sand::vec_4d stop_{};
117 double energy_deposit_{};
118 double secondary_deposit_{};
119 double track_length_{};
128 using EDEPHitsMap = std::map<sand::subdetector_t, std::vector<EDEPHit>>;
Represents a hit in a detector.
Definition: EDEPHit.h:17
EDEPHit()=default
Constructor for EDEPHit.
const double & GetTrackLength() const
Get the track length of the hit.
Definition: EDEPHit.h:94
const int & GetId() const
Get the ID of the hit.
Definition: EDEPHit.h:112
const sand::vec_4d & GetStart() const
Get the start position of the hit.
Definition: EDEPHit.h:70
const sand::vec_4d & GetStop() const
Get the stop position of the hit.
Definition: EDEPHit.h:76
EDEPHit(const sand::vec_4d &start, const sand::vec_4d &stop, double energy_deposit, double secondary_deposit, double track_length, int contrib, int primary_id, int i)
Constructor for EDEPHit.
Definition: EDEPHit.h:45
const double & GetSecondaryDeposit() const
Get the secondary deposition of the hit.
Definition: EDEPHit.h:88
~EDEPHit()
Destructor for EDEPHit.
Definition: EDEPHit.h:64
const double & GetEnergyDeposit() const
Get the energy deposited by the hit.
Definition: EDEPHit.h:82
const int & GetPrimaryId() const
Get the ID of the primary particle generating the hit.
Definition: EDEPHit.h:106
const int & GetContrib() const
Get the main contributor to the hit.
Definition: EDEPHit.h:100