10 #include "Geant4/G4Step.hh"
11 #include "Geant4/G4StepPoint.hh"
12 #include "Geant4/G4ThreeVector.hh"
22 : G4VSensitiveDetector(name)
24 , fAuxDetSensitive(svNum)
56 G4double energyDeposited = step->GetTotalEnergyDeposit()/
CLHEP::GeV;
58 G4ThreeVector startG4(step->GetPreStepPoint()->GetPosition() );
59 double startWorld[3] = {startG4.getX()/CLHEP::cm,
60 startG4.getY()/CLHEP::cm,
61 startG4.getZ()/CLHEP::cm};
63 double startTime = step->GetPreStepPoint()->GetGlobalTime()/CLHEP::ns;
65 G4ThreeVector stopG4( step->GetPostStepPoint()->GetPosition());
66 double stopWorld[3] = {stopG4.getX()/CLHEP::cm,
67 stopG4.getY()/CLHEP::cm,
68 stopG4.getZ()/CLHEP::cm};
70 G4ThreeVector stopG4Momentum( step->GetPostStepPoint()->GetMomentum());
71 double stopWorldMomVector[3] = {stopG4Momentum.getX()/
CLHEP::GeV,
75 double stopTime = step->GetPostStepPoint()->GetGlobalTime()/CLHEP::ns;
87 stopWorldMomVector[0],
88 stopWorldMomVector[1],
98 float inputEnergyDeposited,
107 float inputExitMomentumX,
108 float inputExitMomentumY,
109 float inputExitMomentumZ){
112 auxDetIDE.
trackID = inputTrackID;
114 auxDetIDE.
entryX = inputEntryX;
115 auxDetIDE.
entryY = inputEntryY;
116 auxDetIDE.
entryZ = inputEntryZ;
117 auxDetIDE.
entryT = inputEntryT;
118 auxDetIDE.
exitX = inputExitX;
119 auxDetIDE.
exitY = inputExitY;
120 auxDetIDE.
exitZ = inputExitZ;
121 auxDetIDE.
exitT = inputExitT;
126 std::vector<sim::AuxDetIDE>::iterator IDEitr
131 IDEitr->energyDeposited += inputEnergyDeposited;
132 IDEitr->exitX = inputExitX;
133 IDEitr->exitY = inputExitY;
134 IDEitr->exitZ = inputExitZ;
135 IDEitr->exitT = inputExitT;
136 IDEitr->exitMomentumX = inputExitMomentumX;
137 IDEitr->exitMomentumY = inputExitMomentumY;
138 IDEitr->exitMomentumZ = inputExitMomentumZ;
AuxDetReadout(std::string const &name, unsigned int adNum, unsigned int svNum)
util::quantities::gigaelectronvolt GeV
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