gfields
Loading...
Searching...
No Matches
gfields Namespace Reference

Functions

std::vector< GFieldDefinitionget_GFieldDefinition (const std::shared_ptr< GOptions > &gopts)
 Build the list of field definitions from the provided options.
GOptions defineOptions ()
 Define all options used by the GField module and its built-in field factories.
bool runFieldQueries (const std::shared_ptr< GOptions > &gopts)
 Evaluate configured fields from fieldAt and fieldMapPoints options, if requested.

Variables

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

Function Documentation

◆ defineOptions()

GOptions gfields::defineOptions ( )
Returns
A GOptions instance containing module option definitions and logger registrations.

This function registers:

  • options for field plugins implemented in this module (currently gmultipoles),
  • and the loggers used by the module (gfield, gmagneto, and plugin).

Definition at line 202 of file gfield_options.cc.

◆ get_GFieldDefinition()

std::vector< GFieldDefinition > gfields::get_GFieldDefinition ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsShared options container that holds user configuration (e.g. YAML-derived data).
Returns
Vector of field definitions describing which field plugins to load and how to configure them.

The returned vector is typically consumed by GMagneto() during construction.

Definition at line 114 of file gfield_options.cc.

◆ runFieldQueries()

bool gfields::runFieldQueries ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsShared options container with field definitions and query options.
Returns
True when at least one query option was present and processed.

The query options are intended for command-line inspection workflows:

  • fieldAt accepts one coordinate triplet with units, for example "10*cm 0*mm 2*m".
  • fieldMapPoints accepts an ASCII file with one x y z coordinate triplet per line.

Definition at line 307 of file gfield_options.cc.