13 #include "Geant4/G4HCofThisEvent.hh" 14 #include "Geant4/G4TouchableHistory.hh" 15 #include "Geant4/G4Step.hh" 16 #include "Geant4/G4StepPoint.hh" 17 #include "Geant4/G4ThreeVector.hh" 29 : G4VSensitiveDetector(name)
31 , fAuxDetSensitive(svNum)
63 G4double energyDeposited = step->GetTotalEnergyDeposit()/CLHEP::GeV;
65 G4ThreeVector startG4(step->GetPreStepPoint()->GetPosition() );
66 double startWorld[3] = {startG4.getX()/CLHEP::cm,
67 startG4.getY()/CLHEP::cm,
68 startG4.getZ()/CLHEP::cm};
70 double startTime = step->GetPreStepPoint()->GetGlobalTime()/CLHEP::ns;
72 G4ThreeVector stopG4( step->GetPostStepPoint()->GetPosition());
73 double stopWorld[3] = {stopG4.getX()/CLHEP::cm,
74 stopG4.getY()/CLHEP::cm,
75 stopG4.getZ()/CLHEP::cm};
77 G4ThreeVector stopG4Momentum( step->GetPostStepPoint()->GetMomentum());
78 double stopWorldMomVector[3] = {stopG4Momentum.getX()/CLHEP::GeV,
79 stopG4Momentum.getY()/CLHEP::GeV,
80 stopG4Momentum.getZ()/CLHEP::GeV};
82 double stopTime = step->GetPostStepPoint()->GetGlobalTime()/CLHEP::ns;
94 stopWorldMomVector[0],
95 stopWorldMomVector[1],
105 float inputEnergyDeposited,
114 float inputExitMomentumX,
115 float inputExitMomentumY,
116 float inputExitMomentumZ){
119 auxDetIDE.
trackID = inputTrackID;
121 auxDetIDE.
entryX = inputEntryX;
122 auxDetIDE.
entryY = inputEntryY;
123 auxDetIDE.
entryZ = inputEntryZ;
124 auxDetIDE.
entryT = inputEntryT;
125 auxDetIDE.
exitX = inputExitX;
126 auxDetIDE.
exitY = inputExitY;
127 auxDetIDE.
exitZ = inputExitZ;
128 auxDetIDE.
exitT = inputExitT;
138 IDEitr->energyDeposited += inputEnergyDeposited;
139 IDEitr->exitX = inputExitX;
140 IDEitr->exitY = inputExitY;
141 IDEitr->exitZ = inputExitZ;
142 IDEitr->exitT = inputExitT;
143 IDEitr->exitMomentumX = inputExitMomentumX;
144 IDEitr->exitMomentumY = inputExitMomentumY;
145 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