BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
The main interface for using the magnet outer factories. More...
#include <BDSMagnetOuterFactory.hh>
Public Member Functions | |
BDSMagnetOuter * | CreateMagnetOuter (BDSMagnetType magnetType, BDSMagnetOuterInfo *outerInfo, G4double outerLength, G4double chordLength, BDSBeamPipe *beampipe) |
Static Public Member Functions | |
static BDSMagnetOuterFactory * | Instance () |
Singleton accessor. | |
Private Member Functions | |
BDSMagnetOuterFactoryBase * | GetAppropriateFactory (BDSMagnetGeometryType magnetTypeIn) |
Get the appropriate derived factory for the required magnet style. | |
BDSMagnetOuter * | CreateExternal (const G4String &name, BDSMagnetOuterInfo *info, G4double length, G4double magnetContainerLength, BDSBeamPipe *beampipe) |
BDSGeometryComponent * | CreateContainerForExternal (const G4String &name, G4double length, BDSGeometryExternal *external, BDSBeamPipe *beampipe) |
void | CheckOuterBiggerThanBeamPipe (const G4String &name, const BDSMagnetOuterInfo *outerInfo, const BDSBeamPipe *beamPipe) const |
Private Attributes | |
G4double | lengthSafetyLarge |
G4bool | sensitiveOuter |
Cache of global option. | |
BDSMagnetOuterFactoryBase * | none |
Factory instance. | |
BDSMagnetOuterFactoryBase * | cylindrical |
Factory instance. | |
BDSMagnetOuterFactoryBase * | polescircular |
Factory instance. | |
BDSMagnetOuterFactoryBase * | polessquare |
Factory instance. | |
BDSMagnetOuterFactoryBase * | polesfacet |
Factory instance. | |
BDSMagnetOuterFactoryBase * | polesfacetcrop |
Factory instance. | |
BDSMagnetOuterFactoryBase * | lhcright |
Factory instance. | |
BDSMagnetOuterFactoryBase * | lhcleft |
Factory instance. | |
Static Private Attributes | |
static BDSMagnetOuterFactory * | instance = nullptr |
Singleton instance. | |
The main interface for using the magnet outer factories.
Each function in this class mirrors one in BDSMagnetOuterFactoryBase but with the addition of a BDSMagnetGeometryType enum as an argument. This factory dispatches the call to the correct factory and should be the only one used by the caller.
Definition at line 45 of file BDSMagnetOuterFactory.hh.
BDSMagnetOuterFactory::~BDSMagnetOuterFactory | ( | ) |
Definition at line 78 of file BDSMagnetOuterFactory.cc.
|
private |
Definition at line 64 of file BDSMagnetOuterFactory.cc.
|
private |
Definition at line 324 of file BDSMagnetOuterFactory.cc.
|
private |
Create a container based on an external geometry component. Exists here as the using the external factory exists here and doesn't belong in a derived factory. Uses the beam pipe instance to get the surface normals as the container must match. Here, length is the full length of the final object desired.
Definition at line 274 of file BDSMagnetOuterFactory.cc.
References BDSGeometryComponent::GetExtent(), BDSMaterials::GetMaterial(), BDSBeamPipe::InputFaceNormal(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), BDSExtent::MaximumAbsTransverse(), BDSBeamPipe::OutputFaceNormal(), BDSExtent::XNeg(), BDSExtent::XPos(), BDSExtent::YNeg(), and BDSExtent::YPos().
Referenced by CreateExternal().
|
private |
Create the magnet yoke from externally provided geometry and create a suitable magnet container solid.
Definition at line 227 of file BDSMagnetOuterFactory.cc.
References BDSGeometryFactory::BuildGeometry(), CreateContainerForExternal(), BDSColours::GetColour(), BDSGeometryComponent::GetExtent(), BDSGeometryComponent::GetInnerExtent(), BDSColours::Instance(), BDSGeometryFactory::Instance(), sensitiveOuter, and BDSExtent::TransverselyLessThan().
Referenced by CreateMagnetOuter().
BDSMagnetOuter * BDSMagnetOuterFactory::CreateMagnetOuter | ( | BDSMagnetType | magnetType, |
BDSMagnetOuterInfo * | outerInfo, | ||
G4double | outerLength, | ||
G4double | chordLength, | ||
BDSBeamPipe * | beampipe | ||
) |
Main interface to creating a magnet outer piece of geometry. Specified by magnet type, the recipe, the length of the magnet outer section, the length of the appropriately fitting container volume that's also constructed and w.r.t. an already constructed beam pipe.
Definition at line 121 of file BDSMagnetOuterFactory.cc.
References BDSMagnetOuterFactoryBase::CreateDecapole(), CreateExternal(), BDSMagnetOuterFactoryBase::CreateKicker(), BDSMagnetOuterFactoryBase::CreateMultipole(), BDSMagnetOuterFactoryBase::CreateMuonSpoiler(), BDSMagnetOuterFactoryBase::CreateOctupole(), BDSMagnetOuterFactoryBase::CreateQuadrupole(), BDSMagnetOuterFactoryBase::CreateRectangularBend(), BDSMagnetOuterFactoryBase::CreateRfCavity(), BDSMagnetOuterFactoryBase::CreateSectorBend(), BDSMagnetOuterFactoryBase::CreateSextupole(), BDSMagnetOuterFactoryBase::CreateSolenoid(), BDSExtent::DZ(), GetAppropriateFactory(), BDSGeometryComponent::GetExtent(), and BDSTypeSafeEnum< def, inner >::underlying().
Referenced by BDSMagnet::BuildOuter().
|
private |
Get the appropriate derived factory for the required magnet style.
Definition at line 91 of file BDSMagnetOuterFactory.cc.
References cylindrical, lhcleft, lhcright, none, polescircular, polesfacet, polesfacetcrop, polessquare, and BDSTypeSafeEnum< def, inner >::underlying().
Referenced by CreateMagnetOuter().
|
static |
Singleton accessor.
Definition at line 57 of file BDSMagnetOuterFactory.cc.
References instance.
Referenced by BDSMagnet::BuildOuter().
|
private |
Factory instance.
Definition at line 93 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
staticprivate |
Singleton instance.
Definition at line 64 of file BDSMagnetOuterFactory.hh.
Referenced by Instance().
|
private |
Cache of global constant.
Definition at line 90 of file BDSMagnetOuterFactory.hh.
|
private |
Factory instance.
Definition at line 99 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 98 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 92 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 94 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 96 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 97 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 95 of file BDSMagnetOuterFactory.hh.
Referenced by GetAppropriateFactory().
|
private |
Cache of global option.
Definition at line 101 of file BDSMagnetOuterFactory.hh.
Referenced by CreateExternal().