122{
123
124
125
126#ifdef G4VERBOSE
127 if (verboseLevel > 0) {
128 fVerbose->NewStep();
129 }
130 else if (verboseLevel == -1) {
132 }
133 else {
135 }
136#endif
137
138
139
140
141 fStep->CopyPostToPreStepPoint();
142 fStep->ResetTotalEnergyDeposit();
143
144
145
146 fTrack->SetTouchableHandle(fTrack->GetNextTouchableHandle());
147
148
149
150 fN2ndariesAtRestDoIt = 0;
151 fN2ndariesAlongStepDoIt = 0;
152 fN2ndariesPostStepDoIt = 0;
153
154
155
156 fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
157
158
159
160 fStep->SetPointerToVectorOfAuxiliaryPoints(nullptr);
161
162
163
164
165
167 if (MAXofAtRestLoops > 0) {
168 InvokeAtRestDoItProcs();
170 fStep->GetPostStepPoint()->SetStepStatus(fStepStatus);
171
172#ifdef G4VERBOSE
173 if (verboseLevel > 0) fVerbose->AtRestDoItInvoked();
174#endif
175 }
176
177
179 }
180
181
182
183
184
185 else {
186
187 DefinePhysicalStepLength();
188
189
190 fStep->SetStepLength(PhysicalStep);
191 fTrack->SetStepLength(PhysicalStep);
192 G4double GeomStepLength = PhysicalStep;
193
194
195 fStep->GetPostStepPoint()->SetStepStatus(fStepStatus);
196
197
198 InvokeAlongStepDoItProcs();
199
200
201
202 fStepStatus = fStep->GetPostStepPoint()->GetStepStatus();
203
204
205 fStep->UpdateTrack();
206
207
208 endpointSafOrigin = fPostStepPoint->GetPosition();
209
210 endpointSafety = std::max(proposedSafety - GeomStepLength, kCarTolerance);
211
212 fStep->GetPostStepPoint()->SetSafety(endpointSafety);
213
214#ifdef G4VERBOSE
215 if (verboseLevel > 0) fVerbose->AlongStepDoItAllDone();
216#endif
217
218
219 InvokePostStepDoItProcs();
220
221#ifdef G4VERBOSE
222 if (verboseLevel > 0) fVerbose->PostStepDoItAllDone();
223#endif
224 }
225
226
227
228
229
230
231
232 fTrack->AddTrackLength(fStep->GetStepLength());
233 fPreviousStepSize = fStep->GetStepLength();
234 fStep->SetTrack(fTrack);
235
236#ifdef G4VERBOSE
237 if (verboseLevel > 0) fVerbose->StepInfo();
238#endif
239
240
241
242 fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
243 StepControlFlag = fStep->GetControlFlag();
245 fSensitive = fStep->GetPreStepPoint()->GetSensitiveDetector();
246 if (fSensitive != nullptr) {
247 fSensitive->Hit(fStep);
248 }
249 }
250
251
252
253 if (fUserSteppingAction != nullptr) {
254 fUserSteppingAction->UserSteppingAction(fStep);
255 }
256
257 G4UserSteppingAction* regionalAction =
258 fCurrentVolume->GetLogicalVolume()->GetRegion()->GetRegionalSteppingAction();
259
261
262
263
264 return fStepStatus;
265}
virtual void UserSteppingAction(const G4Step *)
static void SetSilent(G4int fSilent)