19#include "BDSGlobalConstants.hh"
20#include "BDSHitEnergyDepositionGlobal.hh"
21#include "BDSSDVolumeExit.hh"
24#include "G4SDManager.hh"
25#include "G4StepPoint.hh"
26#include "G4StepStatus.hh"
29BDSSDVolumeExit::BDSSDVolumeExit(G4String name,
31 G4VSensitiveDetector(
"volume_exit/" + name),
36 collectionName.insert(name);
38 statusToMatch = worldExitIn ? G4StepStatus::fWorldBoundary : fGeomBoundary;
41void BDSSDVolumeExit::Initialize(G4HCofThisEvent* HCE)
45 {
HCIDve = G4SDManager::GetSDMpointer()->GetCollectionID(
hits);}
49 G4cout << __METHOD_NAME__ <<
"Hits Collection ID: " <<
HCIDve << G4endl;
53G4bool BDSSDVolumeExit::ProcessHits(G4Step* aStep,
56 G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
60 G4double totalEnergy = postStepPoint->GetTotalEnergy();
61 G4double preStepKineticEnergy = aStep->GetPreStepPoint()->GetKineticEnergy();
62 G4double postStepKineticEnergy = postStepPoint->GetKineticEnergy();
63 G4double stepLength = aStep->GetStepLength();
64 G4ThreeVector position = postStepPoint->GetPosition();
65 G4double T = postStepPoint->GetGlobalTime();
66 G4Track* track = aStep->GetTrack();
67 G4int pdgID = track->GetDefinition()->GetPDGEncoding();
68 G4int trackID = track->GetTrackID();
69 G4int parentID = track->GetParentID();
70 G4double weight = track->GetWeight();
75 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.