270 if (!endTrack_G4MT_TLS_) endTrack_G4MT_TLS_ =
new G4FieldTrack (
'0') ;
274 if (!eLimited_G4MT_TLS_) eLimited_G4MT_TLS_ =
new ELimited ;
275 ELimited &eLimited = *eLimited_G4MT_TLS_;
281 if ( previousStepSize > 0.0 )
283 for (
auto& parallelWorldSafety : fParallelWorldSafeties )
285 parallelWorldSafety -= previousStepSize;
286 if ( parallelWorldSafety < 0. ) parallelWorldSafety = 0.0;
287 fParallelWorldSafety = parallelWorldSafety < fParallelWorldSafety ? parallelWorldSafety : fParallelWorldSafety ;
295 if ( ( currentMinimumStep <= fParallelWorldSafety ) && ( currentMinimumStep > 0. ) )
299 returnedStep = currentMinimumStep;
300 proposedSafety = fParallelWorldSafety - currentMinimumStep;
305 G4double smallestReturnedStep = -1.0;
307 for (
size_t i = 0 ; i < fParallelWorldNavigatorIndeces.size() ; i++ )
310 if ( currentMinimumStep >= fParallelWorldSafeties[i] )
315 fParallelWorldNavigatorIndeces[i],
317 fParallelWorldSafeties[i],
322 if ( ( smallestReturnedStep < 0.0 ) || ( tmpReturnedStep <= smallestReturnedStep ) )
324 smallestReturnedStep = tmpReturnedStep;
325 eLimitedForSmallestStep = eLimited;
331 fParallelWorldSafeties[i] = fParallelWorldNavigators[i]->ComputeSafety(endTrack.GetPosition());
332 fParallelWorldIsLimiting[i] =
false;
336 fParallelWorldIsLimiting[i] =
true;
341 fParallelWorldSafety = fParallelWorldSafeties[i] < fParallelWorldSafety ? fParallelWorldSafeties[i] : fParallelWorldSafety ;
346 if ( eLimitedForSmallestStep ==
kDoNot )
348 returnedStep = currentMinimumStep;
351 if ( eLimitedForSmallestStep ==
kUnique ||
355 returnedStep = smallestReturnedStep;
359 returnedStep = smallestReturnedStep* (1.0 + 1.0e-9);
363 proposedSafety = fParallelWorldSafety ;
G4int GetCurrentStepNumber() const
G4double ComputeStep(const G4FieldTrack &pFieldTrack, G4double pCurrentProposedStepLength, G4int navigatorId, G4int stepNo, G4double &pNewSafety, ELimited &limitedStep, G4FieldTrack &EndState, G4VPhysicalVolume *currentVolume)
G4VPhysicalVolume * GetVolume() const
static void Update(G4FieldTrack *, const G4Track *)