BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A singleton class that provides an interface to all tunnel factories. More...
#include <BDSTunnelFactory.hh>
Public Member Functions | |
BDSTunnelSection * | CreateTunnelSection (BDSTunnelType tunnelType, G4String name, G4double length, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible=true) |
Create a tunnel section with straight input and output face. | |
BDSTunnelSection * | CreateTunnelSectionAngledIn (BDSTunnelType tunnelType, G4String name, G4double length, G4double angleIn, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible=true) |
BDSTunnelSection * | CreateTunnelSectionAngledOut (BDSTunnelType tunnelType, G4String name, G4double length, G4double angleOut, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible=true) |
BDSTunnelSection * | CreateTunnelSectionAngledInOut (BDSTunnelType tunnelType, G4String name, G4double length, G4double angleIn, G4double angleOut, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible=true) |
Create a tunnel section with an angled input and output face. | |
BDSTunnelSection * | CreateTunnelSectionAngled (BDSTunnelType tunnelType, G4String name, G4double length, G4ThreeVector inputFaceIn, G4ThreeVector outputFaceIn, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible=true) |
Static Public Member Functions | |
static BDSTunnelFactory * | Instance () |
singleton pattern | |
Private Member Functions | |
BDSTunnelFactory () | |
Private constructor as a singleton. | |
BDSTunnelFactoryBase * | GetAppropriateFactory (BDSTunnelType tunnelType) |
Accessor method to dispatch to appropriate derived factory. | |
Private Attributes | |
BDSTunnelFactoryBase * | circular |
Factory instance. | |
BDSTunnelFactoryBase * | elliptical |
Factory instance. | |
BDSTunnelFactoryBase * | rectangular |
Factory instance. | |
BDSTunnelFactoryBase * | square |
Factory instance. | |
BDSTunnelFactoryBase * | rectaboveground |
Factory instance. | |
Static Private Attributes | |
static BDSTunnelFactory * | instance = nullptr |
Singleton instance. | |
A singleton class that provides an interface to all tunnel factories.
Each function of a BDSTunnelFactoryBase derived class is implemented here, but with the wrapper for BDSTunnelType which is used in this class to utilise the appropriate factory. Note, this class does not own the other factories or keep references to them - they are accessed through (global) singleton accessors.
Definition at line 43 of file BDSTunnelFactory.hh.
BDSTunnelFactory::~BDSTunnelFactory | ( | ) |
Definition at line 51 of file BDSTunnelFactory.cc.
|
private |
Private constructor as a singleton.
Definition at line 42 of file BDSTunnelFactory.cc.
References circular, elliptical, rectaboveground, rectangular, and square.
Referenced by Instance().
BDSTunnelSection * BDSTunnelFactory::CreateTunnelSection | ( | BDSTunnelType | tunnelType, |
G4String | name, | ||
G4double | length, | ||
G4double | tunnelThickness, | ||
G4double | tunnelSoilThickness, | ||
G4Material * | tunnelMaterial, | ||
G4Material * | tunnelSoilMaterial, | ||
G4bool | tunnelFloor, | ||
G4double | tunnelFloorOffset, | ||
G4double | tunnel1, | ||
G4double | tunnel2, | ||
G4bool | visible = true |
||
) |
Create a tunnel section with straight input and output face.
Definition at line 87 of file BDSTunnelFactory.cc.
References BDSTunnelFactoryBase::CreateTunnelSection(), and GetAppropriateFactory().
Referenced by BDSTunnelBuilder::BuildTunnelSections().
BDSTunnelSection * BDSTunnelFactory::CreateTunnelSectionAngled | ( | BDSTunnelType | tunnelType, |
G4String | name, | ||
G4double | length, | ||
G4ThreeVector | inputFaceIn, | ||
G4ThreeVector | outputFaceIn, | ||
G4double | tunnelThickness, | ||
G4double | tunnelSoilThickness, | ||
G4Material * | tunnelMaterial, | ||
G4Material * | tunnelSoilMaterial, | ||
G4bool | tunnelFloor, | ||
G4double | tunnelFloorOffset, | ||
G4double | tunnel1, | ||
G4double | tunnel2, | ||
G4bool | visible = true |
||
) |
Create a tunnel section with two angled faces as defined by normal vectors for each face.
Definition at line 171 of file BDSTunnelFactory.cc.
References BDSTunnelFactoryBase::CreateTunnelSectionAngled(), and GetAppropriateFactory().
Referenced by BDSTunnelBuilder::BuildTunnelSections().
BDSTunnelSection * BDSTunnelFactory::CreateTunnelSectionAngledIn | ( | BDSTunnelType | tunnelType, |
G4String | name, | ||
G4double | length, | ||
G4double | angleIn, | ||
G4double | tunnelThickness, | ||
G4double | tunnelSoilThickness, | ||
G4Material * | tunnelMaterial, | ||
G4Material * | tunnelSoilMaterial, | ||
G4bool | tunnelFloor, | ||
G4double | tunnelFloorOffset, | ||
G4double | tunnel1, | ||
G4double | tunnel2, | ||
G4bool | visible = true |
||
) |
Create a tunnel section with an angled input face and flat output face. Note, this is implemented in this base class as a dispatch to the AngledInOut function.
Definition at line 107 of file BDSTunnelFactory.cc.
References BDSTunnelFactoryBase::CreateTunnelSectionAngledIn(), and GetAppropriateFactory().
BDSTunnelSection * BDSTunnelFactory::CreateTunnelSectionAngledInOut | ( | BDSTunnelType | tunnelType, |
G4String | name, | ||
G4double | length, | ||
G4double | angleIn, | ||
G4double | angleOut, | ||
G4double | tunnelThickness, | ||
G4double | tunnelSoilThickness, | ||
G4Material * | tunnelMaterial, | ||
G4Material * | tunnelSoilMaterial, | ||
G4bool | tunnelFloor, | ||
G4double | tunnelFloorOffset, | ||
G4double | tunnel1, | ||
G4double | tunnel2, | ||
G4bool | visible = true |
||
) |
Create a tunnel section with an angled input and output face.
Definition at line 149 of file BDSTunnelFactory.cc.
References BDSTunnelFactoryBase::CreateTunnelSectionAngledInOut(), and GetAppropriateFactory().
BDSTunnelSection * BDSTunnelFactory::CreateTunnelSectionAngledOut | ( | BDSTunnelType | tunnelType, |
G4String | name, | ||
G4double | length, | ||
G4double | angleOut, | ||
G4double | tunnelThickness, | ||
G4double | tunnelSoilThickness, | ||
G4Material * | tunnelMaterial, | ||
G4Material * | tunnelSoilMaterial, | ||
G4bool | tunnelFloor, | ||
G4double | tunnelFloorOffset, | ||
G4double | tunnel1, | ||
G4double | tunnel2, | ||
G4bool | visible = true |
||
) |
Create a tunnel section with an angled output face and flat input face. Note, this is implemented in this base class as a dispatch to the AngledInOut function.
Definition at line 128 of file BDSTunnelFactory.cc.
References BDSTunnelFactoryBase::CreateTunnelSectionAngledOut(), and GetAppropriateFactory().
|
private |
Accessor method to dispatch to appropriate derived factory.
Definition at line 61 of file BDSTunnelFactory.cc.
References circular, elliptical, rectaboveground, rectangular, square, and BDSTypeSafeEnum< def, inner >::underlying().
Referenced by CreateTunnelSection(), CreateTunnelSectionAngled(), CreateTunnelSectionAngledIn(), CreateTunnelSectionAngledInOut(), and CreateTunnelSectionAngledOut().
|
static |
singleton pattern
Definition at line 35 of file BDSTunnelFactory.cc.
References BDSTunnelFactory(), and instance.
Referenced by BDSTunnelBuilder::BuildTunnelSections().
|
private |
Factory instance.
Definition at line 140 of file BDSTunnelFactory.hh.
Referenced by BDSTunnelFactory(), and GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 141 of file BDSTunnelFactory.hh.
Referenced by BDSTunnelFactory(), and GetAppropriateFactory().
|
staticprivate |
|
private |
Factory instance.
Definition at line 144 of file BDSTunnelFactory.hh.
Referenced by BDSTunnelFactory(), and GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 142 of file BDSTunnelFactory.hh.
Referenced by BDSTunnelFactory(), and GetAppropriateFactory().
|
private |
Factory instance.
Definition at line 143 of file BDSTunnelFactory.hh.
Referenced by BDSTunnelFactory(), and GetAppropriateFactory().