12 #include <Geant4/G4Step.hh>
13 #include <Geant4/G4StepPoint.hh>
14 #include <Geant4/G4SystemOfUnits.hh>
15 #include <Geant4/G4ThreeVector.hh>
16 #include <Geant4/G4TouchableHandle.hh>
17 #include <Geant4/G4Track.hh>
18 #include <Geant4/G4Types.hh>
19 #include <Geant4/G4VTouchable.hh>
20 #include <Geant4/G4VUserTrackInformation.hh>
27 class G4VPhysicalVolume;
40 G4VPhysicalVolume*
volume = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
49 if ((aStep->GetTotalEnergyDeposit() /
GeV) == 0.)
56 G4StepPoint* prePoint = aStep->GetPreStepPoint();
57 G4StepPoint* postPoint = aStep->GetPostStepPoint();
58 G4Track* aTrack = aStep->GetTrack();
60 G4double x_center, y_center, z_center;
63 prePoint->GetPosition().x() /
cm,
64 prePoint->GetPosition().y() /
cm,
65 prePoint->GetPosition().z() /
cm,
66 x_center, y_center, z_center);
71 mhit->
set_x(0, x_center);
72 mhit->
set_y(0, y_center);
73 mhit->
set_z(0, z_center);
77 postPoint->GetPosition().x() /
cm,
78 postPoint->GetPosition().y() /
cm,
79 postPoint->GetPosition().z() /
cm,
80 x_center, y_center, z_center);
85 mhit->
set_x(1, x_center);
86 mhit->
set_y(1, y_center);
87 mhit->
set_z(1, z_center);
88 mhit->
set_edep((aStep->GetTotalEnergyDeposit() /
GeV) + it->second->get_edep());
92 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
101 std::cout <<
"WARNING: Unknown UserTrackInformation stored in track" << std::endl;
108 aTrack->SetUserInformation(pv);
114 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
125 if (G4VUserTrackInformation*
p = aTrack->GetUserInformation())
141 hits_ = findNode::getClass<PHG4HitContainer>(topNode, hitnodename.c_str());
146 std::cout <<
"PHG4FPbScSteppingAction::SetTopNode - unable to find " << hitnodename.c_str() << std::endl;