|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4FieldBuilder is a singleton manager class for building magnetic or other fields, using the configuration in G4FieldParameters. More...
#include <G4FieldBuilder.hh>
Public Member Functions | |
| ~G4FieldBuilder () | |
| G4FieldBuilder (const G4FieldBuilder &right)=delete | |
| G4FieldBuilder & | operator= (const G4FieldBuilder &right)=delete |
| G4FieldParameters * | CreateFieldParameters (const G4String &fieldVolName) |
| void | ConstructFieldSetup () |
| void | UpdateField () |
| void | Reinitialize () |
| void | SetFieldType (G4FieldType fieldType) |
| void | SetGlobalField (G4Field *field, G4bool warn=false) |
| void | SetLocalField (G4Field *field, G4LogicalVolume *lv, G4bool warn=false) |
| void | SetUserEquationOfMotion (G4EquationOfMotion *equation, const G4String &volumeName="") |
| void | SetUserStepper (G4MagIntegratorStepper *stepper, const G4String &volumeName="") |
| void | SetVerboseLevel (G4int value) |
| G4FieldParameters * | GetFieldParameters (const G4String &volumeName="") const |
Static Public Member Functions | |
| static G4FieldBuilder * | Instance () |
| static G4bool | IsInstance () |
G4FieldBuilder is a singleton manager class for building magnetic or other fields, using the configuration in G4FieldParameters.
Definition at line 75 of file G4FieldBuilder.hh.
| G4FieldBuilder::~G4FieldBuilder | ( | ) |
Destructor. Deletes associated messenger.
Definition at line 63 of file G4FieldBuilder.cc.
|
delete |
Copy constructor and assignment operator not allowed.
Referenced by G4FieldBuilder(), Instance(), and operator=().
| void G4FieldBuilder::ConstructFieldSetup | ( | ) |
Constructs the setup for all registered fields.
Definition at line 247 of file G4FieldBuilder.cc.
| G4FieldParameters * G4FieldBuilder::CreateFieldParameters | ( | const G4String & | fieldVolName | ) |
Creates the local magnetic field parameters (configuration) which can be then configured by the user via UI commands. The parameters are used in geometry only if a local magnetic field is associated with the volumes with the given name.
| [in] | fieldVolName | Volume name. |
Definition at line 232 of file G4FieldBuilder.cc.
| G4FieldParameters * G4FieldBuilder::GetFieldParameters | ( | const G4String & | volumeName = "" | ) | const |
Gets a pointer to the field parameters with the given 'volumeName'. Return global field parameters, if volume name is empty.
Definition at line 494 of file G4FieldBuilder.cc.
|
static |
Creates the class instance, if it does not exist; simply returns it on the next calls.
Definition at line 44 of file G4FieldBuilder.cc.
Referenced by G4RunManager::ReinitializeGeometry().
|
static |
Tells if the singleton instance exists.
Definition at line 85 of file G4FieldBuilder.cc.
Referenced by G4RunManager::ReinitializeGeometry().
|
delete |
| void G4FieldBuilder::Reinitialize | ( | ) |
Reinitialises if geometry has been modified. This method is called by G4RunManager during ReinitializeGeometry().
Definition at line 297 of file G4FieldBuilder.cc.
Referenced by G4RunManager::ReinitializeGeometry().
| void G4FieldBuilder::SetFieldType | ( | G4FieldType | fieldType | ) |
The default field type is set to "kMagnetic". This method should be called for other than magnetic field, in order to update the default equation and stepper types.
| [in] | fieldType | The field type-ID. |
Definition at line 341 of file G4FieldBuilder.cc.
Sets or resets the global field. It updates the field objects, if the field was already constructed.
| [in] | field | Pointer to the global field. |
| [in] | warn | If flag is true, issues a warning if the previous field is deleted. |
Definition at line 366 of file G4FieldBuilder.cc.
| void G4FieldBuilder::SetLocalField | ( | G4Field * | field, |
| G4LogicalVolume * | lv, | ||
| G4bool | warn = false ) |
Registers the local field in the map. It updates the field objects, if the field was already constructed. The field is propagated to all volume daughters regardless if they have already assigned a field manager or not. When multiple local fields are defined (by calling this method multiple times), they will be applied in the order they were set.
| [in] | field | Pointer to the global field. |
| [in] | lv | Pointer to the logical volume. |
| [in] | warn | If flag is true, issues a warning if the previous field is deleted. |
Definition at line 390 of file G4FieldBuilder.cc.
| void G4FieldBuilder::SetUserEquationOfMotion | ( | G4EquationOfMotion * | equation, |
| const G4String & | volumeName = "" ) |
Sets the user equation of motion.
| [in] | equation | Pointer to the equation of motion algorithm. |
| [in] | volumeName | Optional volume name. |
Definition at line 452 of file G4FieldBuilder.cc.
| void G4FieldBuilder::SetUserStepper | ( | G4MagIntegratorStepper * | stepper, |
| const G4String & | volumeName = "" ) |
Sets the user stepper.
| [in] | stepper | Pointer to the stepper algorithm. |
| [in] | volumeName | Optional volume name. |
Definition at line 473 of file G4FieldBuilder.cc.
| void G4FieldBuilder::SetVerboseLevel | ( | G4int | value | ) |
Sets the verbosity level.
Definition at line 97 of file G4FieldBuilder.cc.
| void G4FieldBuilder::UpdateField | ( | ) |
Updates the magnetic field. It must be called if the field parameters were changed in other than PreInit> phase.
Definition at line 273 of file G4FieldBuilder.cc.