The GField framework is a plugin-driven module that provides magnetic-field support for GEMC simulations. Users configure one or more magnetic fields through options (typically YAML-derived), and the framework:
The application attaches a G4FieldManager to a volume by looking up the desired field name.
Architecture
Design notes
Plugin boundary: concrete fields are implemented in shared libraries and must export a C symbol named GFieldFactory.
Configuration model: field configuration is stored as strings in field_parameters to preserve unit expressions; the concrete implementation parses/caches values in load_field_definitions().
Stepping:create_FieldManager() creates the stepping components: G4Mag_UsualEqRhs, an integration stepper, a G4ChordFinder, and finally the G4FieldManager.
Field evaluation and Geant4 volume attachment
Available Options and their usage
This module reads the following option keys from the runtime option provider:
gmultipoles
Type: sequence of maps
Meaning: define one or more ideal multipole fields (each entry becomes one named field)