7 #include <G4VProcess.hh>
10 using namespace G4XTankSimulatorAG;
25 fgParticleId = theStep->GetTrack()->GetDefinition()->GetPDGEncoding();
27 if (fgParticleId == 0) {
29 if (theStep->GetTrack()->GetNextVolume() != 0) {
31 if (theStep->GetTrack()->GetNextVolume()->GetName() ==
"top" ||
32 theStep->GetTrack()->GetNextVolume()->GetName() ==
"side" ||
33 theStep->GetTrack()->GetNextVolume()->GetName() ==
"bottom") {
45 G4Track * theTrack = theStep->GetTrack ( );
47 G4StepPoint * thePostPoint = theStep->GetPostStepPoint ( );
49 G4ParticleDefinition * particleType = theTrack->GetDefinition ( );
52 G4String process =
"Undefined";
53 if ( thePostPoint->GetProcessDefinedStep() != NULL)
54 process = thePostPoint->GetProcessDefinedStep()->GetProcessName();
56 G4double x = theStep->GetPostStepPoint()->GetPosition().x();
57 G4double y = theStep->GetPostStepPoint()->GetPosition().y();
58 G4double z = theStep->GetPostStepPoint()->GetPosition().z();
59 G4double z0 = theStep->GetPreStepPoint()->GetPosition().z();
60 G4VPhysicalVolume *thePrePV = theStep->GetPreStepPoint ( )->GetPhysicalVolume ( );
61 string prePVName = string (thePrePV->GetName());
62 string postPVName =
"OutOfWorld";
65 if( prePVName ==
"ground"){
72 if(z <= depth && z0 > depth && z > depth*2) {
74 G4int trackid = theTrack->GetTrackID();
89 fPData.Pname = particleType->GetParticleName();
90 fPData.PDGCode = particleType->GetPDGEncoding();
91 fPData.TrackID = trackid;
95 fPData.px = theStep->GetPreStepPoint()->GetMomentumDirection().x();
96 fPData.py = theStep->GetPreStepPoint()->GetMomentumDirection().y();
97 fPData.pz = theStep->GetPreStepPoint()->GetMomentumDirection().z();
98 fPData.KinE = theStep->GetPreStepPoint()->GetKineticEnergy();
99 fPData.Time = theStep->GetPreStepPoint()->GetGlobalTime();
101 fPartColl.push_back( fPData );
void UserSteppingAction(const G4Step *)