18{
19
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);
31 }
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76}