Project

General

Profile

Geant4 Particle Transportation » History » Version 5

Rodrigo Castro, 06/17/2015 11:14 AM
corrected few typos

1 1 Soon Jun
h1. Geant4 Particle Transportation
2 1 Soon Jun
3 1 Soon Jun
h2. Top-Down Transportation Chain:
4 1 Soon Jun
5 1 Soon Jun
## test the existence of a magnetic field and whether the particle is charged  
6 1 Soon Jun
   if(charged particle && non-zero-BField)  G4PropagatorInField::ComputeStep in http://www-geant4.kek.jp/lxr/source/geometry/navigation/src/G4PropagatorInField.cc
7 1 Soon Jun
   else                                      G4Navigator::ComputeStep        in http://www-geant4.kek.jp/lxr/source/geometry/navigation/src/G4Navigator.cc                             
8 1 Soon Jun
## do-while loop inside G4PropagatorInField::ComputeStep
9 1 Soon Jun
   until sum(s_i) < step where
10 1 Soon Jun
   s_i =  G4ChordFinder::AdvanceChordLimited in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4ChordFinder.cc
11 1 Soon Jun
   and find the crossing point if the resultant chord intersects with a geometrical boundary with
12 1 Soon Jun
   IntersectChord in http://www-geant4.kek.jp/lxr/source/geometry/navigation/src/G4MultiLevelLocator.cc 
13 1 Soon Jun
## test for a quick advance or an accurate advance inside G4ChordFinder::AdvanceChordLimited
14 1 Soon Jun
   do while QuickAdvance if (delta < delta0) where delta is the shortest distance to chord  
15 5 Rodrigo Castro
   then if (step possible x epsilon) > epsilon0) invoke G4MagInt_Driver::AccurateAdvance in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4MagIntegratorDriver.cc
16 1 Soon Jun
## G4MagInt_Driver::AccurateAdvance test for h < hmin (do-while loop for sum(x_i) < hstep where x_i from either
17 1 Soon Jun
   G4MagInt_Driver::QuickAdvance or G4MagInt_Driver::OneGoodStep
18 1 Soon Jun
## G4MagInt_Driver::QuickAdvance 
19 1 Soon Jun
   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)
20 1 Soon Jun
   G4MagInt_Driver::QuickAdvance call Stepper and DistanceChord
21 1 Soon Jun
   default Stepper: G4ClassicalRK4::DumbStepper in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4ClassicalRK4.cc 
22 1 Soon Jun
## G4ClassicalRK4::Stepper calls G4EquationOfMotion::EvaluateRhsReturnB in http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/src/G4EquationOfMotion.cc
23 4 Soon Jun
## G4EquationOfMotion::EvaluateRhsReturnB calls G4MagneticField::GetFieldValue (pure virtual) in  http://www-geant4.kek.jp/lxr/source/geometry/magneticfield/include/G4MagneticField.hh 
24 2 Soon Jun
25 3 Soon Jun
h2. Soon's (scratch) Diagram: