172 fIsTrackingTime =
true;
175 fParallelWorldNavigators.clear();
176 fParallelWorldNavigatorIndeces.clear();
177 fParallelWorldSafeties.clear();
178 fParallelWorldIsLimiting.clear();
179 fParallelWorldWasLimiting.clear();
180 fCurrentVolumes.clear();
181 fPreviousVolumes.clear();
182 for (
auto parallelWorld : fParallelWorlds )
184 fParallelWorldNavigators.push_back( fTransportationManager->GetNavigator( parallelWorld ) );
185 fParallelWorldNavigatorIndeces.push_back( fTransportationManager->ActivateNavigator( fParallelWorldNavigators.back() ) );
186 fParallelWorldSafeties.push_back( 0.0 );
187 fParallelWorldIsLimiting.push_back(
false );
188 fParallelWorldWasLimiting.push_back(
false );
193 for (
auto navigatorIndex : fParallelWorldNavigatorIndeces )
195 fPreviousVolumes.push_back(
nullptr );
196 fCurrentVolumes .push_back( fPathFinder->GetLocatedVolume( navigatorIndex ) );
200 fParallelWorldSafety = 0.0;
201 for ( std::size_t i = 0 ; i < fParallelWorldNavigatorIndeces.size() ; ++i )
203 fParallelWorldSafeties[i] = 0.0;
258 if (!eLimited_MT) eLimited_MT =
new ELimited;
264 if ( previousStepSize > 0.0 )
266 for (
auto& parallelWorldSafety : fParallelWorldSafeties )
268 parallelWorldSafety -= previousStepSize;
269 if ( parallelWorldSafety < 0. ) { parallelWorldSafety = 0.0; }
270 fParallelWorldSafety = parallelWorldSafety < fParallelWorldSafety
271 ? parallelWorldSafety : fParallelWorldSafety;
278 if ( ( currentMinimumStep <= fParallelWorldSafety )
279 && ( currentMinimumStep > 0. ) )
283 returnedStep = currentMinimumStep;
284 proposedSafety = fParallelWorldSafety - currentMinimumStep;
289 G4double smallestReturnedStep = -1.0;
291 for ( std::size_t i = 0 ; i < fParallelWorldNavigatorIndeces.size() ; ++i )
294 if ( currentMinimumStep >= fParallelWorldSafeties[i] )
297 G4double tmpReturnedStep = fPathFinder->ComputeStep(fFieldTrack,
299 fParallelWorldNavigatorIndeces[i],
301 fParallelWorldSafeties[i],
304 if ( ( smallestReturnedStep < 0.0 ) || ( tmpReturnedStep <= smallestReturnedStep ) )
306 smallestReturnedStep = tmpReturnedStep;
307 eLimitedForSmallestStep = eLimited;
313 fParallelWorldSafeties[i] = fParallelWorldNavigators[i]->ComputeSafety(endTrack.
GetPosition());
314 fParallelWorldIsLimiting[i] =
false;
318 fParallelWorldIsLimiting[i] =
true;
323 fParallelWorldSafety = fParallelWorldSafeties[i] < fParallelWorldSafety
324 ? fParallelWorldSafeties[i] : fParallelWorldSafety;
329 if ( eLimitedForSmallestStep ==
kDoNot )
331 returnedStep = currentMinimumStep;
334 if ( eLimitedForSmallestStep ==
kUnique ||
338 returnedStep = smallestReturnedStep;
343 returnedStep = smallestReturnedStep* (1.0 + 1.0e-9);
347 proposedSafety = fParallelWorldSafety ;
const G4String & GetParticleName() const
virtual void Initialize(const G4Track &)