260 G4double geometryStepLength(-1.0), newSafety(-1.0);
262 State(fParticleIsLooping) = false;
263 State(fEndGlobalTimeComputed) = false;
264 State(fGeometryLimitedStep) = false;
281 G4ThreeVector startMomentumDir = pParticle->GetMomentumDirection();
291 G4double MagSqShift = OriginShift.mag2();
303 G4double particleCharge = pParticle->GetCharge();
312 G4bool fieldExertsForce =
false;
313 if ((particleCharge != 0.0))
334 if (!fieldExertsForce)
341 geometryStepLength = currentMinimumStep;
342 State(fGeometryLimitedStep) =
false;
368 State(fTransportEndPosition));
373 currentSafety = newSafety;
375 State(fGeometryLimitedStep) = (linearStepLength <= currentMinimumStep);
376 if (
State(fGeometryLimitedStep))
379 geometryStepLength = linearStepLength;
384 geometryStepLength = currentMinimumStep;
387 State(fEndPointDistance) = geometryStepLength;
391 State(fTransportEndPosition) = startPosition
392 + geometryStepLength * startMomentumDir;
396 State(fTransportEndMomentumDir) = startMomentumDir;
399 State(fParticleIsLooping) =
false;
400 State(fMomentumChanged) =
false;
401 State(fEndGlobalTimeComputed) =
true;
402 State(theInteractionTimeLeft) =
State(fEndPointDistance)
404 State(fCandidateEndGlobalTime) =
State(theInteractionTimeLeft)
422 <<
"ITTransportation does not support external fields.";
424 <<
" If you are dealing with a tradiational MC simulation, ";
425 exceptionDescription <<
"please use G4Transportation.";
427 G4Exception(
"G4ITTransportation::AlongStepGetPhysicalInteractionLength",
583 if (currentMinimumStep == 0.0)
585 if (currentSafety == 0.0)
587 State(fGeometryLimitedStep) =
true;
597 if (currentSafety <
State(fEndPointDistance))
602 if (particleCharge != 0.0)
606 State(fTransportEndPosition));
607 currentSafety = endSafety;
620 State(fTransportEndPosition));
626 currentSafety +=
State(fEndPointDistance);
628 #ifdef G4DEBUG_TRANSPORT
630 G4cout <<
"***G4Transportation::AlongStepGPIL ** " <<
G4endl;
631 G4cout <<
" Called Navigator->ComputeSafety at "
632 <<
State(fTransportEndPosition)
633 <<
" and it returned safety= " << endSafety <<
G4endl;
634 G4cout <<
" Adding endpoint distance " <<
State(fEndPointDistance)
635 <<
" to obtain pseudo-safety= " << currentSafety <<
G4endl;
645 return geometryStepLength;
const G4ThreeVector & GetPolarization() const
std::ostringstream G4ExceptionDescription
G4bool fShortStepOptimisation
G4double GetVelocity() const
G4ITNavigator * fLinearNavigator
virtual void ConfigureForTrack(const G4Track *)
G4IT * GetIT(const G4Track *track)
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
G4PropagatorInField * fFieldPropagator
virtual void ResetTrackState()
G4double GetGlobalTime() const
G4FieldManager * FindAndSetFieldManager(G4VPhysicalVolume *pCurrentPhysVol)
G4ITSafetyHelper * fpSafetyHelper
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4TrackingInformation * GetTrackingInfo()
#define fPreviousSftOrigin
G4VPhysicalVolume * GetVolume() const
const G4Field * GetDetectorField() const
void SetCurrentSafety(G4double val, const G4ThreeVector &pos)
virtual void LoadTrackState(G4TrackStateManager &manager)