40#ifndef G4FIELDBUILDER_HH
41#define G4FIELDBUILDER_HH
160 G4FieldBuilder(
const G4FieldBuilder& right) =
delete;
162 G4FieldBuilder& operator=(
const G4FieldBuilder& right) =
delete;
174 void CreateFieldSetup(
G4Field* field,
178 void ConstructGlobalField();
181 void ConstructLocalFields();
184 void UpdateFieldSetups();
187 std::vector<G4FieldSetup*>& GetFieldSetups();
188 std::vector<std::pair<G4LogicalVolume*, G4Field*>>& GetLocalFields();
199 std::vector<G4FieldParameters*> fFieldParameters;
214 G4int fVerboseLevel = 1;
228 fVerboseLevel = value;
231inline std::vector<G4FieldSetup*>& G4FieldBuilder::GetFieldSetups()
234 return *fFieldSetups.
Get();
237inline std::vector<std::pair<G4LogicalVolume*, G4Field*>>& G4FieldBuilder::GetLocalFields()
240 return *fLocalFields.Get();
Definition of the G4FieldParameters class.
G4FieldType
The available fields in Geant4.
Messenger class that defines commands for G4FieldBuilder.
G4FieldParameters * CreateFieldParameters(const G4String &fieldVolName)
void SetUserStepper(G4MagIntegratorStepper *stepper, G4String volumeName="")
Set user stepper.
void ConstructFieldSetup()
Construct setups for all registered fields.
G4FieldParameters * GetFieldParameters(const G4String &volumeName="") const
void SetLocalField(G4Field *field, G4LogicalVolume *lv, G4bool warn=false)
static G4bool IsInstance()
Return the information if an instance exists.
static G4FieldBuilder * Instance()
~G4FieldBuilder()
Destructor.
void SetFieldType(G4FieldType fieldType)
void SetVerboseLevel(G4int value)
Set verbose level.
void SetGlobalField(G4Field *field, G4bool warn=false)
void SetUserEquationOfMotion(G4EquationOfMotion *equation, G4String volumeName="")
Set user equation of motion.
The magnetic field parameters.
The class for constructing magnetic, electromagnetic and gravity fields which strength is defined via...