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...
 
#define GFIELD_DEFAULT_INTEGRATION_STEPPER   "G4DormandPrince745"
 Default integration stepper name used when the requested stepper is unsupported.
 
#define GFIELD_DEFAULT_MINIMUM_STEP   "1.0*mm"
 Default minimum step for the chord finder (string with Geant4 units).
 
#define GFIELD_DEFAULT_MAXIMUM_STEP   "0*mm"
 Default maximum acceptable field step for Geant4 propagation.
 
#define GFIELD_DEFAULT_VERTEX   "0*mm"
 Default origin coordinate component for multipole fields (string with Geant4 units).
 
#define GFIELD_DEFAULT_ROTANGLE   "0*deg"
 Default multipole roll rotation angle (string with Geant4 units).
 
#define GFIELD_DEFAULT_VERBOSITY   "0"
 Default verbosity level (string) for field-related configuration.
 
#define GLOBAL_FIELD_OPTION   "global_field"
 Command-line option name used to associate a field with the ROOT world volume.
 
#define NO_FIELD_OPTION   "no_field"
 Command-line option name used to reset (remove) field associations.
 
#define MAX_FIELD_STEP_OPTION   "max_field_step"
 Command-line option name used to set the global maximum acceptable field step.
 
#define NO_FIELD_ALL   "all"
 Special NO_FIELD_OPTION value that resets all fields, including GLOBAL_FIELD_OPTION.
 
#define ERR_WRONG_FIELD_ROTATION   1201
 
#define ERR_WRONG_FIELD_NOT_FOUND   1202
 
#define ERR_STEPPER_NOT_FOUND   1203
 
#define ERR_WRONG_POLE_NUMBER   1204
 
#define ERR_WRONG_FIELD_SYMMETRY   1205
 
#define ERR_WRONG_COORDINATE_DEF   1206
 
#define ERR_MAP_FILE_NOT_FOUND   1207
 

Detailed Description

The module provides:

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

Macro Definition Documentation

◆ ERR_MAP_FILE_NOT_FOUND

#define ERR_MAP_FILE_NOT_FOUND   1207

Definition at line 86 of file gfieldConventions.h.

◆ ERR_STEPPER_NOT_FOUND

#define ERR_STEPPER_NOT_FOUND   1203

Definition at line 82 of file gfieldConventions.h.

◆ ERR_WRONG_COORDINATE_DEF

#define ERR_WRONG_COORDINATE_DEF   1206

Definition at line 85 of file gfieldConventions.h.

◆ ERR_WRONG_FIELD_NOT_FOUND

#define ERR_WRONG_FIELD_NOT_FOUND   1202

Definition at line 81 of file gfieldConventions.h.

◆ ERR_WRONG_FIELD_ROTATION

#define ERR_WRONG_FIELD_ROTATION   1201

Definition at line 80 of file gfieldConventions.h.

◆ ERR_WRONG_FIELD_SYMMETRY

#define ERR_WRONG_FIELD_SYMMETRY   1205

Definition at line 84 of file gfieldConventions.h.

◆ ERR_WRONG_POLE_NUMBER

#define ERR_WRONG_POLE_NUMBER   1204

Definition at line 83 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_INTEGRATION_STEPPER

#define GFIELD_DEFAULT_INTEGRATION_STEPPER   "G4DormandPrince745"

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

Definition at line 13 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_MAXIMUM_STEP

#define GFIELD_DEFAULT_MAXIMUM_STEP   "0*mm"

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

Definition at line 27 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_MINIMUM_STEP

#define GFIELD_DEFAULT_MINIMUM_STEP   "1.0*mm"

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

Definition at line 20 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_ROTANGLE

#define GFIELD_DEFAULT_ROTANGLE   "0*deg"

Definition at line 39 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_VERBOSITY

#define GFIELD_DEFAULT_VERBOSITY   "0"

Definition at line 44 of file gfieldConventions.h.

◆ GFIELD_DEFAULT_VERTEX

#define GFIELD_DEFAULT_VERTEX   "0*mm"

Definition at line 34 of file gfieldConventions.h.

◆ GLOBAL_FIELD_OPTION

#define GLOBAL_FIELD_OPTION   "global_field"

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 53 of file gfieldConventions.h.

◆ MAX_FIELD_STEP_OPTION

#define MAX_FIELD_STEP_OPTION   "max_field_step"

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 71 of file gfieldConventions.h.

◆ NO_FIELD_ALL

#define NO_FIELD_ALL   "all"

Definition at line 76 of file gfieldConventions.h.

◆ NO_FIELD_OPTION

#define NO_FIELD_OPTION   "no_field"

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

Definition at line 63 of file gfieldConventions.h.