BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes
BDSTunnelFactory Class Reference

A singleton class that provides an interface to all tunnel factories. More...

#include <BDSTunnelFactory.hh>

Collaboration diagram for BDSTunnelFactory:
Collaboration graph

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.
 

Detailed Description

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.

Author
Laurie Nevay

Definition at line 42 of file BDSTunnelFactory.hh.

Constructor & Destructor Documentation

◆ ~BDSTunnelFactory()

BDSTunnelFactory::~BDSTunnelFactory ( )

Definition at line 50 of file BDSTunnelFactory.cc.

◆ BDSTunnelFactory()

BDSTunnelFactory::BDSTunnelFactory ( )
private

Private constructor as a singleton.

Definition at line 41 of file BDSTunnelFactory.cc.

References circular, elliptical, rectaboveground, rectangular, and square.

Referenced by Instance().

Here is the caller graph for this function:

Member Function Documentation

◆ CreateTunnelSection()

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 86 of file BDSTunnelFactory.cc.

References BDSTunnelFactoryBase::CreateTunnelSection(), and GetAppropriateFactory().

Referenced by BDSTunnelBuilder::BuildTunnelSections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateTunnelSectionAngled()

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 170 of file BDSTunnelFactory.cc.

References BDSTunnelFactoryBase::CreateTunnelSectionAngled(), and GetAppropriateFactory().

Referenced by BDSTunnelBuilder::BuildTunnelSections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateTunnelSectionAngledIn()

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 106 of file BDSTunnelFactory.cc.

References BDSTunnelFactoryBase::CreateTunnelSectionAngledIn(), and GetAppropriateFactory().

Here is the call graph for this function:

◆ CreateTunnelSectionAngledInOut()

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 148 of file BDSTunnelFactory.cc.

References BDSTunnelFactoryBase::CreateTunnelSectionAngledInOut(), and GetAppropriateFactory().

Here is the call graph for this function:

◆ CreateTunnelSectionAngledOut()

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 127 of file BDSTunnelFactory.cc.

References BDSTunnelFactoryBase::CreateTunnelSectionAngledOut(), and GetAppropriateFactory().

Here is the call graph for this function:

◆ GetAppropriateFactory()

BDSTunnelFactoryBase * BDSTunnelFactory::GetAppropriateFactory ( BDSTunnelType  tunnelType)
private

Accessor method to dispatch to appropriate derived factory.

Definition at line 60 of file BDSTunnelFactory.cc.

References circular, elliptical, rectaboveground, rectangular, square, and BDSTypeSafeEnum< def, inner >::underlying().

Referenced by CreateTunnelSection(), CreateTunnelSectionAngled(), CreateTunnelSectionAngledIn(), CreateTunnelSectionAngledInOut(), and CreateTunnelSectionAngledOut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Instance()

BDSTunnelFactory * BDSTunnelFactory::Instance ( )
static

singleton pattern

Definition at line 34 of file BDSTunnelFactory.cc.

References BDSTunnelFactory(), and instance.

Referenced by BDSTunnelBuilder::BuildTunnelSections().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ circular

BDSTunnelFactoryBase* BDSTunnelFactory::circular
private

Factory instance.

Definition at line 139 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ elliptical

BDSTunnelFactoryBase* BDSTunnelFactory::elliptical
private

Factory instance.

Definition at line 140 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ instance

BDSTunnelFactory * BDSTunnelFactory::instance = nullptr
staticprivate

Singleton instance.

Definition at line 133 of file BDSTunnelFactory.hh.

Referenced by Instance().

◆ rectaboveground

BDSTunnelFactoryBase* BDSTunnelFactory::rectaboveground
private

Factory instance.

Definition at line 143 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ rectangular

BDSTunnelFactoryBase* BDSTunnelFactory::rectangular
private

Factory instance.

Definition at line 141 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ square

BDSTunnelFactoryBase* BDSTunnelFactory::square
private

Factory instance.

Definition at line 142 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().


The documentation for this class was generated from the following files: