# # Macro file for the test of field01 example # # It creates the default geometry (simple absorber cylinder ) # /tracking/verbose 1 /run/verbose 1 /control/verbose 2 #/control/cout/ignoreThreadsExcept 0 # # ****** Start of initialisation of classes for field propagation # Change the type of stepper used to integrate the ODE of motion # # Recommended and default since Geant4 10.4 (Dec 2017) - Dormand Prince (7) 4/5 /field/stepperType DormandPrince745 # High efficiency 5th order embedded stepper - Tsitouras # /field/stepperType TsitourasRK45 # Higher order Dormand Prince stepper - 6th order (for smoothest fields & long steps) # /field/stepperType DormandPrinceRK56 # # # Different types of steppers can be chosen for integration in B-field: # # 745 - Dormand Prince 745 : established, efficient embedded method # recommended in literature, e.g. Hairer, Numerical Recipes # Used in several RK programs (e.g. DOPRI5 code) # # 45 - Bogacki Shampine 4/5 : more efficient 4/5 embedded stepper # 13 - Nystrom RK4 : stepper with few field calls & analytic estimate of error # # Good choices for reasonably smooth fields - available since Geant4 1.0 # 8 - Cash Karp RKF 45 : 'embedded' RK method - 4th/5th faster, robust # ( uses difference of 4th & 5th order for error estimate ) # # Default - good choice for unknown fields # 4 - ClassicalRK4 : original Runge-Kutta method, very robust but slower ) # ( obtains error estimate by doing 2 half steps ) # # Good choices for non-smooth fields: # 3 - SimpleHeum : low order, with error obtained from half-steps # 23 - BogackiShampine23 : lower order embedded method (new in 10.3-beta) # # # Control the mininum step size for integration in field # with a value of 10 um ==> accept any amount of integration error in smaller steps! # /field/setMinimumStep 0.01 mm # # Control the (relative) accuracy of the integration. # --------------------------------------------------- # 1. DeltaOneStep: ## Errors of this size in an integration sub-step are acceptable except when # it is limited by the relative integration error limits (epsilon_min/max) # /field/setDeltaOneStep 2.0e-05 mm # # DeltaOneStep is used to obtain a relative accuracy for the step: # relative_eps = DeltaOneStep / step-length # To ensure robustness the value of this is kept within the following limits: # 2. Epsilon Min: the minimum value of the relative integration error (EpsilonMin) - # /field/setMinimumEpsilonStep 5.0e-06 # # This Limit to ensure that large steps do NOT result in a very low value of relative_eps # (ie very high accuracy) that would result in integration requiring many steps and CPU cycles. # Note: it is a dimensionless number # # 3. Epsilon Max: # /field/setMaximumEpsilonStep 5.0e-04 # # A minimum value of the relative integration error (EpsilonMax). Also a dimensionless number"); # This Limit serves to ensure that a very small step does NOT result in a large relative error # (ie low accuracy) and unreliable results."); # # # ****** Initialisation of classes for field propagation is done # /run/initialize /field/printParameters # # /run/particle/dumpCutValues # /gun/particle e- # # /gun/particle proton # /gun/particle chargedgeantino # /gun/energy 500.0 MeV /run/beamOn 1 # /gun/energy 250.0 MeV /run/beamOn 1 # /gun/energy 200.0 MeV /run/beamOn 1 # /gun/energy 100.0 MeV /run/beamOn 1 # /gun/energy 50.0 MeV /run/beamOn 1 # # Change the value of the B-field # /field01/setField 0.1 0 0 tesla /run/beamOn 1 # /gun/energy 500.0 MeV /tracking/verbose 0 /run/printProgress 10 /run/beamOn 100 # # Test commands defined in this example /control/verbose 2 # /calor/setAbsMat Xe20CO2 # default Air /calor/setWorldMat Kr20CO2 # default Air /calor/setAbsThick 0.8 mm # default 1 mm /calor/setAbsRad 1900 mm # default 20000.*mm /calor/setAbsZpos 20990 mm # default 21990.0*mm /calor/setWorldZ 45000 mm # default 44000.*mm /calor/setWorldR 23000 mm # default 22000.*mm /field01/setField 0 0 1.0 kG # default field 3*tesla in Z-direction # /gun/random on # default "off" /gun/xvertex 100 mm # default 0 /gun/yvertex 100 mm # default 0 /gun/zvertex 100 mm # default 0 # /run/beamOn 1