Project

General

Profile

Geant4 Particle Transportation » History » Version 4

« Previous - Version 4/11 (diff) - Next » - Current version
Soon Jun, 05/21/2015 06:41 PM


Geant4 Particle Transportation

Top-Down Transportation Chain:

  1. test the existence of a magnetic field and whether the particle is charged
    if(charged particle && non-zero-BField) G4PropagatorInField::ComputeStep in http://www-geant4.kek.jp/lxr/source/geometry/navigation/src/G4PropagatorInField.cc
    else G4Navigator::ComputeStep in http://www-geant4.kek.jp/lxr/source/geometry/navigation/src/G4Navigator.cc
  2. do-while loop inside G4PropagatorInField::ComputeStep
    until sum(s_i) < step where
    s_i = G4ChordFinder::AdvanceChordLimited in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4ChordFinder.cc
    and find the crossing point if the resultant chord intersects with a geometrical boundary with
    IntersectChord in http://www-geant4.kek.jp/lxr/source/geometry/navigation/src/G4MultiLevelLocator.cc
  3. test for a quick advance or an accurate advance inside G4ChordFinder::AdvanceChordLimited
    do while QuickAdvance if (delta < delta0) where delta is the shortest distance to chord
    then if (step possible x elsilon) > epsilon0) invoke G4MagInt_Driver::AccurateAdvance in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4MagIntegratorDriver.cc
  4. G4MagInt_Driver::AccurateAdvance test for h < hmin (do-while loop for sum(x_i) < hstep where x_i from either
    G4MagInt_Driver::QuickAdvance or G4MagInt_Driver::OneGoodStep
  5. G4MagInt_Driver::QuickAdvance
    OneGoodStep loops over the Stepper and evaluates the truncation error (for-loop test epsilon<epsilon0 before break) (and then adjust the step size control if necessary)
    G4MagInt_Driver::QuickAdvance call Stepper and DistanceChord
    default Stepper: G4ClassicalRK4::DumbStepper in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4ClassicalRK4.cc
  6. G4ClassicalRK4::Stepper calls G4EquationOfMotion::EvaluateRhsReturnB in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4EquationOfMotion.cc
  7. G4EquationOfMotion::EvaluateRhsReturnB calls G4MagneticField::GetFieldValue (pure virtual) in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/include/G4MagneticField.hh

Soon's (scratch) Diagram: