Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
|
The class for constructing magnetic, electromagnetic and gravity fields which strength is defined via G4Field. More...
#include <G4FieldSetup.hh>
Public Member Functions | |
G4FieldSetup (const G4FieldParameters ¶meters, G4Field *field, G4LogicalVolume *lv=nullptr) | |
Standard constructor. | |
~G4FieldSetup () | |
Destructor. | |
void | Clear () |
Clear previously created setup. | |
void | Update () |
Update field setup with new field parameters. | |
void | PrintInfo (G4int verboseLevel, const G4String about="created") |
Print information. | |
void | SetG4Field (G4Field *field) |
Set G4 field. | |
G4Field * | GetG4Field () const |
Return the instantiated field. | |
G4LogicalVolume * | GetLogicalVolume () const |
Return the logical vol;ume. | |
G4EquationOfMotion * | GetEquation () const |
Return the equation of motion. | |
G4MagIntegratorStepper * | GetStepper () const |
Return the magnetic integrator stepper. | |
G4VIntegrationDriver * | GetIntegrationDriver () const |
Return the magnetic integrator driver. | |
The class for constructing magnetic, electromagnetic and gravity fields which strength is defined via G4Field.
The equation of motion of a particle in a field and the integration method is set according to the selection in G4FieldParameters, as well as other accuracy parameters. The default values in G4FieldParameters correspond to defaults set in Geant4 (taken from Geant4 9.3 release.) As Geant4 classes to not provide access methods for these defaults, the defaults have to be checked with each new Geant4 release. TO DO: unify defaults in G4 classes and G4 parameters
Definition at line 69 of file G4FieldSetup.hh.
G4FieldSetup::G4FieldSetup | ( | const G4FieldParameters & | parameters, |
G4Field * | field, | ||
G4LogicalVolume * | lv = nullptr ) |
Standard constructor.
Definition at line 85 of file G4FieldSetup.cc.
Referenced by G4FieldSetup(), and GetIntegrationDriver().
G4FieldSetup::~G4FieldSetup | ( | ) |
Destructor.
Definition at line 108 of file G4FieldSetup.cc.
void G4FieldSetup::Clear | ( | ) |
Clear previously created setup.
Definition at line 450 of file G4FieldSetup.cc.
Referenced by Update().
|
inline |
Return the equation of motion.
Definition at line 184 of file G4FieldSetup.hh.
|
inline |
Return the instantiated field.
Definition at line 172 of file G4FieldSetup.hh.
G4VIntegrationDriver * G4FieldSetup::GetIntegrationDriver | ( | ) | const |
Return the magnetic integrator driver.
|
inline |
Return the logical vol;ume.
Definition at line 178 of file G4FieldSetup.hh.
|
inline |
Return the magnetic integrator stepper.
Definition at line 190 of file G4FieldSetup.hh.
Print information.
Definition at line 489 of file G4FieldSetup.cc.
|
inline |
Set G4 field.
Definition at line 166 of file G4FieldSetup.hh.
void G4FieldSetup::Update | ( | ) |
Update field setup with new field parameters.
Definition at line 472 of file G4FieldSetup.cc.