Strange behaviour of electrons trajectories in magnetic field

I have magnetic filed of 2.1 kilogauss and electrons beam with 31MeV energy. Sizes of magnetic field volume are 31x68.3 cm. Within field the trajectory of electrons refracts only 4 times for default settings. When I set for variable minStep in function G4ChordFinder(magField, minStep, stepper) very small value equals to 0.00001mm there is nothing changes: the number of refractions remains the same. How it’s possible to make trajectories more smooth ?

Here are the detector construction file:

DetectorConstruction.cc (11.8 KB)

Geant4 Version: v11.3.2
Operating System: 24.04.3 LTS
Compiler/Version: 13.3.0
CMake Version: 3.28.3


/vis/scene/add/trajectories smooth

(The actual track of the particle is smooth anyway. It’s just the trajectory records large steps unless you specify the above.)

1 Like