10#ifndef VXD_SIMULATION_SENSORTRAVERSAL_H
11#define VXD_SIMULATION_SENSORTRAVERSAL_H
13#include <G4ThreeVector.hh>
33 StepInformation(
const G4ThreeVector& stepPosition,
const G4ThreeVector& stepMomentum,
double stepElectrons,
double stepTime,
56 typedef std::pair<iterator, iterator>
range;
68 void add(
const G4ThreeVector& position,
const G4ThreeVector& momentum,
double electrons,
double time,
double length)
Class to keep track of the traversal of the sensitive volume for one track.
int getPDGCode() const
get PDG code of the particle
double getElectrons() const
get total number of deposited electrons so far
void setInitial(int trackID, int pdgCode, bool primary)
set initial values for a new track
int m_trackID
Geant4 Track ID.
SensorTraversal()=default
Use default constructor.
bool isPrimary() const
return whether the track belongs to a primary particle
void hasLeft()
indicate that the track left the current volume
int getTrackID() const
get Geant4 trackID
double m_electrons
Total number of electrons deposited by this track.
void add(const G4ThreeVector &position, const G4ThreeVector &momentum, double electrons, double time, double length)
add a new step
double m_length
length of the sensor traversal
int m_pdgCode
PDG code for the particle.
void reset()
reset to be used again
void hasEntered()
indicate that the track originated outisde the current volume
bool m_primary
Indication whether track is from a primary particle.
bool m_contained
Indication wether the track is completely contained inside the volume.
bool isContained() const
return whether the track was contained in the volume so far
std::pair< iterator, iterator > range
Iterator pair for a set of points.
double getLength() const
get flight length so far
Abstract base class for different kinds of events.