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