18#ifndef BDSFIELDBUILDER_H
19#define BDSFIELDBUILDER_H
59 G4LogicalVolume* logicalVolume,
60 const G4bool propagateToDaughters =
false,
62 const G4String& scalingKey =
"none");
66 const std::vector<G4LogicalVolume*>& logicalVolumes,
67 const G4bool propagateToDaughters =
false,
69 const G4String& scalingKey =
"none");
73 const std::set<G4LogicalVolume*>& logicalVolumes,
74 const G4bool propagateToDaughters =
false,
76 const G4String& scalingKey =
"none");
78 std::vector<BDSFieldObjects*> CreateAndAttachAll();
88 std::vector<const BDSFieldInfo*>
infos;
89 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.