gfields
Loading...
Searching...
No Matches
GField module

Plugin-driven magnetic-field framework. More...

Collaboration diagram for GField module:

Topics

 GField examples
 Example programs demonstrating how to configure and use the GField module.
 GField ASCII-map factory
 Generic ASCII field-map plugin (dipole, cylindrical, phi-segmented, cartesian 3D).
 GField multipoles factory
 Multipole magnetic-field plugin implementation.

Namespaces

namespace  gfields

Data Structures

struct  GFieldDefinition
 Lightweight configuration carrier used to load and configure a GField plugin. More...
class  GField
 Abstract base class representing a magnetic field. More...
class  GMagneto
 Manager for magnetic fields and their associated G4FieldManager objects. More...
constexpr char gfields::GFIELD_DEFAULT_INTEGRATION_STEPPER [] = "G4DormandPrince745"
 Default integration stepper name used when the requested stepper is unsupported.
constexpr char gfields::GFIELD_DEFAULT_MINIMUM_STEP [] = "1.0*mm"
 Default minimum step for the chord finder (string with Geant4 units).
constexpr char gfields::GFIELD_DEFAULT_MAXIMUM_STEP [] = "0*mm"
 Default maximum acceptable field step for Geant4 propagation.
constexpr char gfields::GFIELD_DEFAULT_VERTEX [] = "0*mm"
 Default origin coordinate component for multipole fields (string with Geant4 units).
constexpr char gfields::GFIELD_DEFAULT_ROTANGLE [] = "0*deg"
 Default multipole roll rotation angle (string with Geant4 units).
constexpr char gfields::GFIELD_DEFAULT_VERBOSITY [] = "0"
 Default verbosity level (string) for field-related configuration.
constexpr char gfields::GLOBAL_FIELD_OPTION [] = "global_field"
 Command-line option name used to associate a field with the ROOT world volume.
constexpr char gfields::NO_FIELD_OPTION [] = "no_field"
 Command-line option name used to reset (remove) field associations.
constexpr char gfields::MAX_FIELD_STEP_OPTION [] = "max_field_step"
 Command-line option name used to set the global maximum acceptable field step.
constexpr char gfields::NO_FIELD_ALL [] = "all"
 Special gfields::NO_FIELD_OPTION value that resets all fields, including gfields::GLOBAL_FIELD_OPTION.
constexpr int gfields::ERR_WRONG_FIELD_ROTATION = 1201
constexpr int gfields::ERR_WRONG_FIELD_NOT_FOUND = 1202
constexpr int gfields::ERR_STEPPER_NOT_FOUND = 1203
constexpr int gfields::ERR_WRONG_POLE_NUMBER = 1204
constexpr int gfields::ERR_WRONG_FIELD_SYMMETRY = 1205
constexpr int gfields::ERR_WRONG_COORDINATE_DEF = 1206
constexpr int gfields::ERR_MAP_FILE_NOT_FOUND = 1207

Detailed Description

The module provides:

  • A common abstract interface for magnetic fields (GField),
  • A lightweight configuration carrier (GFieldDefinition),
  • A manager that loads plugins and builds G4FieldManager instances (GMagneto),
  • Option definitions for fields implemented in this module (namespace gfields).

The actual magnetic-field behavior is implemented in plugins (shared libraries) that expose a C factory symbol (see instantiate()).

Variable Documentation

◆ ERR_MAP_FILE_NOT_FOUND

int gfields::ERR_MAP_FILE_NOT_FOUND = 1207
inlineconstexpr

Definition at line 90 of file gfieldConventions.h.

◆ ERR_STEPPER_NOT_FOUND

int gfields::ERR_STEPPER_NOT_FOUND = 1203
inlineconstexpr

Definition at line 86 of file gfieldConventions.h.

◆ ERR_WRONG_COORDINATE_DEF

int gfields::ERR_WRONG_COORDINATE_DEF = 1206
inlineconstexpr

Definition at line 89 of file gfieldConventions.h.

◆ ERR_WRONG_FIELD_NOT_FOUND

int gfields::ERR_WRONG_FIELD_NOT_FOUND = 1202
inlineconstexpr

Definition at line 85 of file gfieldConventions.h.

◆ ERR_WRONG_FIELD_ROTATION

int gfields::ERR_WRONG_FIELD_ROTATION = 1201
inlineconstexpr

Definition at line 84 of file gfieldConventions.h.

◆ ERR_WRONG_FIELD_SYMMETRY

int gfields::ERR_WRONG_FIELD_SYMMETRY = 1205
inlineconstexpr

Definition at line 88 of file gfieldConventions.h.

◆ ERR_WRONG_POLE_NUMBER

int gfields::ERR_WRONG_POLE_NUMBER = 1204
inlineconstexpr

Definition at line 87 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_INTEGRATION_STEPPER

char gfields::GFIELD_DEFAULT_INTEGRATION_STEPPER[] = "G4DormandPrince745"
inlineconstexpr

This is a Geant4 stepper class name expressed as a string.

Definition at line 15 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_MAXIMUM_STEP

char gfields::GFIELD_DEFAULT_MAXIMUM_STEP[] = "0*mm"
inlineconstexpr

A value less than or equal to zero leaves the Geant4 propagator default unchanged.

Definition at line 29 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_MINIMUM_STEP

char gfields::GFIELD_DEFAULT_MINIMUM_STEP[] = "1.0*mm"
inlineconstexpr

This value is stored as a string to preserve unit expressions and is parsed later.

Definition at line 22 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_ROTANGLE

char gfields::GFIELD_DEFAULT_ROTANGLE[] = "0*deg"
inlineconstexpr

Definition at line 41 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_VERBOSITY

char gfields::GFIELD_DEFAULT_VERBOSITY[] = "0"
inlineconstexpr

Definition at line 46 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_VERTEX

char gfields::GFIELD_DEFAULT_VERTEX[] = "0*mm"
inlineconstexpr

Definition at line 36 of file gfieldConventions.h.

◆ GLOBAL_FIELD_OPTION

char gfields::GLOBAL_FIELD_OPTION[] = "global_field"
inlineconstexpr

The value is the name of a configured field (see gmultipoles / gfields). The corresponding G4FieldManager is installed on the ROOT world volume and propagated to all daughters, acting as a global field wherever a more specific per-volume field is not set.

Definition at line 55 of file gfieldConventions.h.

◆ MAX_FIELD_STEP_OPTION

char gfields::MAX_FIELD_STEP_OPTION[] = "max_field_step"
inlineconstexpr

The value is parsed as a Geant4 length and passed to G4PropagatorInField::SetLargestAcceptableStep() when positive. This controls the largest field propagation step accepted by Geant4 transportation.

Definition at line 74 of file gfieldConventions.h.

◆ NO_FIELD_ALL

char gfields::NO_FIELD_ALL[] = "all"
inlineconstexpr

Definition at line 80 of file gfieldConventions.h.

◆ NO_FIELD_OPTION

char gfields::NO_FIELD_OPTION[] = "no_field"
inlineconstexpr

The value is either a single gvolume name, a whitespace/comma-separated list of gvolume names, or the special value gfields::NO_FIELD_ALL. A listed volume that was associated with a field has that association removed; gfields::NO_FIELD_ALL removes every per-volume field as well as the gfields::GLOBAL_FIELD_OPTION. Fields that end up unused as a result are never loaded (their plugins and maps are skipped).

Definition at line 66 of file gfieldConventions.h.