9#ifndef SENSORTRAVERSAL_H
10#define SENSORTRAVERSAL_H
12#include <G4ThreeVector.hh>
32 void add(
const G4ThreeVector& position,
double depEnergy,
double length)
75 void setInitial(
int trackID,
int ladderID,
int sensorID,
int pdgCode,
bool primary,
const G4ThreeVector& position,
76 const G4ThreeVector& localposition,
const G4ThreeVector& momentum,
double time)
104 bool check(
int trackID,
int ladderID,
int sensorID)
Class to keep track of the traversal of the sensitive volume for one track.
int getPDGCode() const
get PDG code of the particle
int getLadderID() const
get the ladder ID
G4ThreeVector m_entryMomentum
Entry Position.
double m_entryTime
time the track entered the volume
void add(const G4ThreeVector &position, double depEnergy, double length)
add a new step
int m_trackID
Geant4 Track ID.
bool check(int trackID, int ladderID, int sensorID)
check if a track belongs to this object
int getSensorID() const
get the sensor ID
const G4ThreeVector & getEntryMomentum() const
get entry momentum
bool isPrimary() const
return whether the track belongs to a primary particle
const G4ThreeVector & getExitPosition() const
get exit position
G4ThreeVector m_entryPosition
Entry Position.
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 &localposition, const G4ThreeVector &momentum, double time)
set initial values for a new track
const G4ThreeVector & getEntryPosition() const
get entry position
const G4ThreeVector & getLocalEntryPosition() const
get local entry position
int getTrackID() const
get Geant4 trackID
double m_depEnergy
Total deposited energy by this track.
double getEntryTime() const
get entry time
double getDepEnergy() const
get total energy deposition
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
G4ThreeVector m_localentryPosition
Local Entry Position.
G4ThreeVector m_exitPosition
Exit Position.
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
double getLength() const
get flight length so far
Abstract base class for different kinds of events.