10 #include "Geant4/G4Step.hh" 11 #include "Geant4/G4StepPoint.hh" 12 #include "Geant4/G4ThreeVector.hh" 20 : G4VSensitiveDetector(name), fAuxDet(adNum), fAuxDetSensitive(svNum)
50 G4double energyDeposited = step->GetTotalEnergyDeposit() / CLHEP::GeV;
52 G4ThreeVector startG4(step->GetPreStepPoint()->GetPosition());
53 double startWorld[3] = {
54 startG4.getX() / CLHEP::cm, startG4.getY() / CLHEP::cm, startG4.getZ() / CLHEP::cm};
56 double startTime = step->GetPreStepPoint()->GetGlobalTime() / CLHEP::ns;
58 G4ThreeVector stopG4(step->GetPostStepPoint()->GetPosition());
59 double stopWorld[3] = {
60 stopG4.getX() / CLHEP::cm, stopG4.getY() / CLHEP::cm, stopG4.getZ() / CLHEP::cm};
62 G4ThreeVector stopG4Momentum(step->GetPostStepPoint()->GetMomentum());
63 double stopWorldMomVector[3] = {stopG4Momentum.getX() / CLHEP::GeV,
64 stopG4Momentum.getY() / CLHEP::GeV,
65 stopG4Momentum.getZ() / CLHEP::GeV};
67 double stopTime = step->GetPostStepPoint()->GetGlobalTime() / CLHEP::ns;
79 stopWorldMomVector[0],
80 stopWorldMomVector[1],
81 stopWorldMomVector[2]);
88 float inputEnergyDeposited,
97 float inputExitMomentumX,
98 float inputExitMomentumY,
99 float inputExitMomentumZ)
103 auxDetIDE.
trackID = inputTrackID;
105 auxDetIDE.
entryX = inputEntryX;
106 auxDetIDE.
entryY = inputEntryY;
107 auxDetIDE.
entryZ = inputEntryZ;
108 auxDetIDE.
entryT = inputEntryT;
109 auxDetIDE.
exitX = inputExitX;
110 auxDetIDE.
exitY = inputExitY;
111 auxDetIDE.
exitZ = inputExitZ;
112 auxDetIDE.
exitT = inputExitT;
122 IDEitr->energyDeposited += inputEnergyDeposited;
123 IDEitr->exitX = inputExitX;
124 IDEitr->exitY = inputExitY;
125 IDEitr->exitZ = inputExitZ;
126 IDEitr->exitT = inputExitT;
127 IDEitr->exitMomentumX = inputExitMomentumX;
128 IDEitr->exitMomentumY = inputExitMomentumY;
129 IDEitr->exitMomentumZ = inputExitMomentumZ;
AuxDetReadout(std::string const &name, unsigned int adNum, unsigned int svNum)
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)
int trackID
Geant4 supplied track ID.
float exitMomentumZ
Exit Z-Momentum of particle.
virtual void EndOfEvent(G4HCofThisEvent *)
float exitY
Exit position Y of particle.
Collection of particles crossing one auxiliary detector cell.
uint32_t fAuxDet
which AuxDet this AuxDetReadout corresponds to
Use Geant4's user "hooks" to maintain a list of particles generated by Geant4.
float entryT
Entry time of particle.
float exitMomentumX
Exit X-Momentum of particle.
float exitT
Exit time of particle.
float exitZ
Exit position Z of particle.
float entryZ
Entry position Z of particle.
float exitX
Exit position X of particle.
float energyDeposited
total energy deposited for this track ID and time
float entryX
Entry position X of particle.
float entryY
Entry position Y of particle.
virtual void AddParticleStep(int inputTrackID, float inputEnergyDeposited, float inputEntryX, float inputEntryY, float inputEntryZ, float inputEntryT, float inputExitX, float inputExitY, float inputExitZ, float inputExitT, float inputExitMomentumX, float inputExitMomentumY, float inputExitMomentumZ)
MC truth information to make RawDigits and do back tracking.
static int GetCurrentTrackID()
sim::AuxDetSimChannel fAuxDetSimChannel
Contains the sim::AuxDetSimChannel for this AuxDet.
std::vector< sim::AuxDetIDE > fAuxDetIDEs
list of IDEs in one channel
float exitMomentumY
Exit Y-Momentum of particle.
virtual void Initialize(G4HCofThisEvent *)
A Geant4 sensitive detector that accumulates information.
uint32_t fAuxDetSensitive
which sensitive volume of the AuxDet this AuxDetReadout corresponds to