19#ifndef BDSFIELDBUILDER_H
20#define BDSFIELDBUILDER_H
60 G4LogicalVolume* logicalVolume,
61 const G4bool propagateToDaughters =
false,
63 const G4String& scalingKey =
"none");
67 const std::vector<G4LogicalVolume*>& logicalVolumes,
68 const G4bool propagateToDaughters =
false,
70 const G4String& scalingKey =
"none");
74 const std::set<G4LogicalVolume*>& logicalVolumes,
75 const G4bool propagateToDaughters =
false,
77 const G4String& scalingKey =
"none");
79 std::vector<BDSFieldObjects*> CreateAndAttachAll();
89 std::vector<const BDSFieldInfo*>
infos;
90 std::vector<std::vector<G4LogicalVolume*> >
lvs;
Register for all fields to be built and volumes to be attached to.
std::map< G4int, G4String > scalingKeys
Optional register of scaling strengths and keys.
std::vector< const BDSFieldInfo * > infos
Register of components to build.
std::map< G4int, const BDSMagnetStrength * > scalingStrengths
Optional register of scaling strengths and keys.
std::vector< G4bool > propagators
Register of components to build.
void RegisterFieldForConstruction(const BDSFieldInfo *info, G4LogicalVolume *logicalVolume, const G4bool propagateToDaughters=false, const BDSMagnetStrength *magnetStrengthForScaling=nullptr, const G4String &scalingKey="none")
std::vector< std::vector< G4LogicalVolume * > > lvs
Register of components to build.
static BDSFieldBuilder * instance
Singleton instance.
BDSFieldBuilder()
Private default constructor to enforce singleton pattern.
static BDSFieldBuilder * Instance()
Singleton pattern accessor.
All info required to build complete field of any type.
A holder for all the Geant4 field related objects.
Efficient storage of magnet strengths.