20#include "BDSGlobalConstants.hh"
21#include "BDSHitEnergyDepositionGlobal.hh"
22#include "BDSSDVolumeExit.hh"
25#include "G4SDManager.hh"
26#include "G4StepPoint.hh"
27#include "G4StepStatus.hh"
30BDSSDVolumeExit::BDSSDVolumeExit(G4String name,
32 G4VSensitiveDetector(
"volume_exit/" + name),
37 collectionName.insert(name);
39 statusToMatch = worldExitIn ? G4StepStatus::fWorldBoundary : fGeomBoundary;
42void BDSSDVolumeExit::Initialize(G4HCofThisEvent* HCE)
46 {
HCIDve = G4SDManager::GetSDMpointer()->GetCollectionID(
hits);}
50 G4cout << __METHOD_NAME__ <<
"Hits Collection ID: " <<
HCIDve << G4endl;
54G4bool BDSSDVolumeExit::ProcessHits(G4Step* aStep,
57 G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
61 G4double totalEnergy = postStepPoint->GetTotalEnergy();
62 G4double preStepKineticEnergy = aStep->GetPreStepPoint()->GetKineticEnergy();
63 G4double postStepKineticEnergy = postStepPoint->GetKineticEnergy();
64 G4double stepLength = aStep->GetStepLength();
65 G4ThreeVector position = postStepPoint->GetPosition();
66 G4double T = postStepPoint->GetGlobalTime();
67 G4Track* track = aStep->GetTrack();
68 G4int pdgID = track->GetDefinition()->GetPDGEncoding();
69 G4int trackID = track->GetTrackID();
70 G4int parentID = track->GetParentID();
71 G4double weight = track->GetWeight();
76 postStepKineticEnergy,
static BDSGlobalConstants * Instance()
Access method.
Information recorded for a step leaving a volume.
G4int HCIDve
Hits collection ID for volume exit.
G4String colName
Name prepared for collection.
G4StepStatus statusToMatch
World or volume exit status cache.
BDSHitsCollectionEnergyDepositionGlobal * hits
Hits collection.
const char * GetName(int)
Name of element.