3#include "G4StepPoint.hh"
4#include "G4ThreeVector.hh"
7#include "G4UnitsTable.hh"
8#include "G4VProcess.hh"
9#include "G4SystemOfUnits.hh"
21 G4StepPoint* postStep = currentStep->GetPostStepPoint();
22 G4ThreeVector currentPosition = postStep->GetPosition();
23 G4Track* currentTrack = currentStep->GetTrack();
24 if(std::abs(currentPosition.x()) > 263.5*cm||
25 std::abs(currentPosition.y()) > 263.5*cm||
26 std::abs(currentPosition.z()) > 287.5*cm){
27 G4cout<<
"Out of World!!!"<<G4endl;
28 currentTrack->SetTrackStatus(fKillTrackAndSecondaries);
29 }
else if(currentTrack->GetCurrentStepNumber()>=20000){
30 G4cout<<
"StepNumber>=20000 !!!"<<G4endl;
31 currentTrack->SetTrackStatus(fKillTrackAndSecondaries);
void UserSteppingAction(const G4Step *)