13 #include <Geant4/G4ParticleDefinition.hh>
14 #include <Geant4/G4Step.hh>
15 #include <Geant4/G4StepPoint.hh>
16 #include <Geant4/G4StepStatus.hh>
17 #include <Geant4/G4String.hh>
18 #include <Geant4/G4SystemOfUnits.hh>
19 #include <Geant4/G4ThreeVector.hh>
20 #include <Geant4/G4TouchableHandle.hh>
21 #include <Geant4/G4Track.hh>
22 #include <Geant4/G4TrackStatus.hh>
23 #include <Geant4/G4Types.hh>
24 #include <Geant4/G4VTouchable.hh>
25 #include <Geant4/G4VUserTrackInformation.hh>
57 G4VPhysicalVolume* volume = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
60 G4double edep = aStep->GetTotalEnergyDeposit() /
GeV;
62 const G4Track* aTrack = aStep->GetTrack();
68 bool geantino =
false;
72 if (aTrack->GetParticleDefinition()->GetPDGEncoding() == 0 &&
73 aTrack->GetParticleDefinition()->GetParticleName().find(
"geantino") != string::npos)
77 G4StepPoint* prePoint = aStep->GetPreStepPoint();
78 G4StepPoint* postPoint = aStep->GetPostStepPoint();
82 switch (prePoint->GetStepStatus())
91 hit->
set_x(0, prePoint->GetPosition().x() /
cm);
92 hit->
set_y(0, prePoint->GetPosition().y() /
cm);
93 hit->
set_z(0, prePoint->GetPosition().z() /
cm);
95 hit->
set_t(0, prePoint->GetGlobalTime() / nanosecond);
101 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
118 hit->
set_x(1, postPoint->GetPosition().x() /
cm);
119 hit->
set_y(1, postPoint->GetPosition().y() /
cm);
120 hit->
set_z(1, postPoint->GetPosition().z() /
cm);
122 hit->
set_t(1, postPoint->GetGlobalTime() / nanosecond);
131 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
146 if (postPoint->GetStepStatus() == fGeomBoundary || postPoint->GetStepStatus() == fWorldBoundary || aTrack->GetTrackStatus() == fStopAndKill)
191 hits_ = findNode::getClass<PHG4HitContainer>(topNode, hitnodename);
196 std::cout <<
"PHG4ConeSteppingAction::SetTopNode - unable to find " << hitnodename << std::endl;