13 #include <Geant4/G4Step.hh>
14 #include <Geant4/G4StepPoint.hh>
15 #include <Geant4/G4StepStatus.hh>
16 #include <Geant4/G4SystemOfUnits.hh>
17 #include <Geant4/G4ThreeVector.hh>
18 #include <Geant4/G4TouchableHandle.hh>
19 #include <Geant4/G4Track.hh>
20 #include <Geant4/G4Types.hh>
21 #include <Geant4/G4VTouchable.hh>
22 #include <Geant4/G4VUserTrackInformation.hh>
27 class G4VPhysicalVolume;
42 G4VPhysicalVolume*
volume = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
45 G4double edep = aStep->GetTotalEnergyDeposit() /
GeV;
46 if (edep == 0.)
return;
48 const G4Track* aTrack = aStep->GetTrack();
54 G4StepPoint* prePoint = aStep->GetPreStepPoint();
55 G4StepPoint* postPoint = aStep->GetPostStepPoint();
56 cout <<
"track id " << aTrack->GetTrackID() << endl;
57 cout <<
"time prepoint: " << prePoint->GetGlobalTime() << endl;
58 cout <<
"time postpoint: " << postPoint->GetGlobalTime() << endl;
59 switch (prePoint->GetStepStatus())
65 hit->
set_x(0, prePoint->GetPosition().x() /
cm);
66 hit->
set_y(0, prePoint->GetPosition().y() /
cm);
67 hit->
set_z(0, prePoint->GetPosition().z() /
cm);
69 hit->
set_t(0, prePoint->GetGlobalTime() / nanosecond);
73 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
90 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
106 hit->
set_x(1, postPoint->GetPosition().x() /
cm);
107 hit->
set_y(1, postPoint->GetPosition().y() /
cm);
108 hit->
set_z(1, postPoint->GetPosition().z() /
cm);
110 hit->
set_t(1, postPoint->GetGlobalTime() / nanosecond);
129 hits_ = findNode::getClass<PHG4HitContainer>(topNode, hitnodename.c_str());
134 std::cout <<
"PHG4FPbScRegionSteppingAction::SetTopNode - unable to find " << hitnodename << std::endl;