61{
62
63
64
65 fpTrack = apValueG4Track;
66 EventIsAborted = false;
67
68
69
71 delete itr;
72 }
74
76
77
78
79 fpSteppingManager->SetInitialStep(fpTrack);
80
81
82
83 fpTrajectory = nullptr;
84 if (fpUserTrackingAction != nullptr) {
85 fpUserTrackingAction->PreUserTrackingAction(fpTrack);
86 }
87
88
89
90 {
91#ifdef G4_STORE_TRAJECTORY
92
93
94 if ((StoreTrajectory != 0) && (fpTrajectory == nullptr)) {
95
96 switch (StoreTrajectory) {
97 default:
98 case 1:
99 fpTrajectory = new G4Trajectory(fpTrack);
100 break;
101 case 2:
102 fpTrajectory = new G4SmoothTrajectory(fpTrack);
103 break;
104 case 3:
105 fpTrajectory = new G4RichTrajectory(fpTrack);
106 break;
107 case 4:
108 fpTrajectory = new G4RichTrajectory(fpTrack);
109 break;
110 }
111 }
112#endif
113
114
115 fpSteppingManager->GetProcessNumber();
116
117
118 fpTrack->SetStep(fpSteppingManager->GetStep());
119
120
121 fpTrack->GetDefinition()->GetProcessManager()->StartTracking(fpTrack);
122
123
124
125 while ((fpTrack->GetTrackStatus() ==
fAlive) || (fpTrack->GetTrackStatus() ==
fStopButAlive)) {
126 fpTrack->IncrementCurrentStepNumber();
127 fpSteppingManager->Stepping();
128#ifdef G4_STORE_TRAJECTORY
129 if (StoreTrajectory != 0) {
130 fpTrajectory->AppendStep(fpSteppingManager->GetStep());
131 }
132#endif
133 if (EventIsAborted) {
135 }
136 }
137
138 fpTrack->GetDefinition()->GetProcessManager()->EndTracking();
139 }
140
141
142 if (fpUserTrackingAction != nullptr) {
143 fpUserTrackingAction->PostUserTrackingAction(fpTrack);
144 }
145
146
147#ifdef G4VERBOSE
148 if ((StoreTrajectory != 0) && verboseLevel > 10) {
149 fpTrajectory->ShowTrajectory();
150 }
151#endif
152 if ((StoreTrajectory == 0) && (fpTrajectory != nullptr)) {
153 delete fpTrajectory;
154 fpTrajectory = nullptr;
155 }
156}
G4TrackVector * GimmeSecondaries() const