Advanced Example purging_magnet


Responsible Geant4 Collaborator: John Apostolakis, CERN, Switzerland.

Developer: S. Larsson, May 2004 with acknowledgments to the GEANT4 Collaboration, in particular to J. Apostolakis, J. Generowicz, G. Folger, V. Ivanchenko, M.G.Pia and S. Guatelli.

Short description

This example simulates electrons traveling through a 3D magnetic field. The Purging Magnet example is an application of Geant4 in a medical environment. It simulates a strong purging magnet in a treatment head. The geometry is very simplified. The major idea of this example is to implement an external magnetic field grid and test if the deviation of electrons are as expected in this particular field. The data (position, energy and momentum) are collected in a measurement volume.

The design of the magnetic field was made with the OPERA 3D package which is an electromagnetic finite element and finite difference analysis software. The deviation in the y-direction (ey in Ntuple 1) has also been calculated in the OPERA 3D module TOSCA for comparison.

  • TOSCA: deviation y-direction: 35.112 cm
  • GEANT4: deviation y-direction: 35.170 cm

Last updated: 05/02/2022 by S. Guatelli