Class to keep track of the traversal of the sensitive volume for one track.
More...
#include <SensorTraversal.h>
|
void | add (const G4ThreeVector &position, double depEnergy, double visibleEnergy, double length) |
| add a new step
|
|
int | getTrackID () const |
| get Geant4 trackID
|
|
int | getLadderID () const |
| get the ladder ID
|
|
int | getSensorID () const |
| get the sensor ID
|
|
int | getPDGCode () const |
| get PDG code of the particle
|
|
double | getDepEnergy () const |
| get total energy deposition
|
|
double | getVisibleEnergy () const |
| get visible energy deposition
|
|
double | getLength () const |
| get flight length so far
|
|
double | getEntryTime () const |
| get entry time
|
|
const G4ThreeVector & | getEntryMomentum () const |
| get entry momentum
|
|
const G4ThreeVector & | getEntryPosition () const |
| get entry position
|
|
const G4ThreeVector & | getExitPosition () const |
| get exit position
|
|
bool | isContained () const |
| return whether the track was contained in the volume so far
|
|
bool | isPrimary () const |
| return whether the track belongs to a primary particle
|
|
void | hasEntered () |
| indicate that the track originated outside the current volume
|
|
void | hasLeft () |
| indicate that the track left the current volume
|
|
void | setInitial (int trackID, int ladderID, int sensorID, int pdgCode, bool primary, const G4ThreeVector &position, const G4ThreeVector &momentum, double time) |
| set initial values for a new track
|
|
void | reset () |
| reset to be used again
|
|
bool | check (int trackID, int ladderID, int sensorID) |
| check if a track belongs to this object
|
|
Class to keep track of the traversal of the sensitive volume for one track.
This class keeps the necessary information to create consolidated SimHit objects after a particle finishes its traversal of the sensitive detector
Definition at line 25 of file SensorTraversal.h.
◆ add()
void add |
( |
const G4ThreeVector & | position, |
|
|
double | depEnergy, |
|
|
double | visibleEnergy, |
|
|
double | length ) |
|
inline |
add a new step
- Parameters
-
position | position of the step |
depEnergy | energy deposition |
visibleEnergy | visible energy deposition |
length | flight length so far |
Definition at line 33 of file SensorTraversal.h.
34 {
35 m_depEnergy += depEnergy;
36 m_visibleEnergy += visibleEnergy;
37 m_length += length;
38 m_exitPosition = position;
39 }
◆ check()
bool check |
( |
int | trackID, |
|
|
int | ladderID, |
|
|
int | sensorID ) |
|
inline |
check if a track belongs to this object
Definition at line 104 of file SensorTraversal.h.
105 {
106
107 if (m_trackID == 0) return true;
108 return (trackID == m_trackID && ladderID == m_ladderID && sensorID == m_sensorID);
109 }
◆ getDepEnergy()
double getDepEnergy |
( |
| ) |
const |
|
inline |
get total energy deposition
Definition at line 50 of file SensorTraversal.h.
50{ return m_depEnergy; }
◆ getEntryMomentum()
const G4ThreeVector & getEntryMomentum |
( |
| ) |
const |
|
inline |
get entry momentum
Definition at line 58 of file SensorTraversal.h.
58{ return m_entryMomentum; }
◆ getEntryPosition()
const G4ThreeVector & getEntryPosition |
( |
| ) |
const |
|
inline |
get entry position
Definition at line 60 of file SensorTraversal.h.
60{ return m_entryPosition; }
◆ getEntryTime()
double getEntryTime |
( |
| ) |
const |
|
inline |
◆ getExitPosition()
const G4ThreeVector & getExitPosition |
( |
| ) |
const |
|
inline |
get exit position
Definition at line 62 of file SensorTraversal.h.
62{ return m_exitPosition; }
◆ getLadderID()
int getLadderID |
( |
| ) |
const |
|
inline |
◆ getLength()
double getLength |
( |
| ) |
const |
|
inline |
◆ getPDGCode()
◆ getSensorID()
int getSensorID |
( |
| ) |
const |
|
inline |
◆ getTrackID()
◆ getVisibleEnergy()
double getVisibleEnergy |
( |
| ) |
const |
|
inline |
get visible energy deposition
Definition at line 52 of file SensorTraversal.h.
52{ return m_visibleEnergy; }
◆ hasEntered()
indicate that the track originated outside the current volume
Definition at line 70 of file SensorTraversal.h.
70{ m_contained = false; }
◆ hasLeft()
indicate that the track left the current volume
Definition at line 72 of file SensorTraversal.h.
72{ m_contained = false; }
◆ isContained()
bool isContained |
( |
| ) |
const |
|
inline |
return whether the track was contained in the volume so far
Definition at line 65 of file SensorTraversal.h.
65{ return m_contained; }
◆ isPrimary()
return whether the track belongs to a primary particle
Definition at line 67 of file SensorTraversal.h.
◆ reset()
reset to be used again
Definition at line 89 of file SensorTraversal.h.
90 {
91 m_trackID = 0;
92 m_ladderID = 0;
93 m_sensorID = 0;
94 m_pdgCode = 0;
95 m_depEnergy = 0;
96 m_visibleEnergy = 0;
97 m_length = 0;
98 m_contained = true;
99 m_primary = false;
100 m_entryTime = 0;
101 }
◆ setInitial()
void setInitial |
( |
int | trackID, |
|
|
int | ladderID, |
|
|
int | sensorID, |
|
|
int | pdgCode, |
|
|
bool | primary, |
|
|
const G4ThreeVector & | position, |
|
|
const G4ThreeVector & | momentum, |
|
|
double | time ) |
|
inline |
set initial values for a new track
Definition at line 75 of file SensorTraversal.h.
77 {
78 m_trackID = trackID;
79 m_ladderID = ladderID;
80 m_sensorID = sensorID;
81 m_pdgCode = pdgCode;
82 m_primary = primary;
83 m_entryPosition = position;
84 m_entryMomentum = momentum;
85 m_entryTime = time;
86 }
◆ m_contained
Indication whether the track is completely contained inside the volume.
Definition at line 135 of file SensorTraversal.h.
◆ m_depEnergy
◆ m_entryMomentum
G4ThreeVector m_entryMomentum |
|
private |
◆ m_entryPosition
G4ThreeVector m_entryPosition |
|
private |
◆ m_entryTime
◆ m_exitPosition
G4ThreeVector m_exitPosition |
|
private |
◆ m_ladderID
◆ m_length
◆ m_pdgCode
◆ m_primary
Indication whether track is from a primary particle.
Definition at line 137 of file SensorTraversal.h.
◆ m_sensorID
◆ m_trackID
◆ m_visibleEnergy
double m_visibleEnergy {0} |
|
private |
The documentation for this class was generated from the following file: