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

BDSTunnelSectionCreateTunnelSection (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.
 
BDSTunnelSectionCreateTunnelSectionAngledIn (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)
 
BDSTunnelSectionCreateTunnelSectionAngledOut (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)
 
BDSTunnelSectionCreateTunnelSectionAngledInOut (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.
 
BDSTunnelSectionCreateTunnelSectionAngled (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 BDSTunnelFactoryInstance ()
 singleton pattern
 

Private Member Functions

 BDSTunnelFactory ()
 Private constructor as a singleton.
 
BDSTunnelFactoryBaseGetAppropriateFactory (BDSTunnelType tunnelType)
 Accessor method to dispatch to appropriate derived factory.
 

Private Attributes

BDSTunnelFactoryBasecircular
 Factory instance.
 
BDSTunnelFactoryBaseelliptical
 Factory instance.
 
BDSTunnelFactoryBaserectangular
 Factory instance.
 
BDSTunnelFactoryBasesquare
 Factory instance.
 
BDSTunnelFactoryBaserectaboveground
 Factory instance.
 

Static Private Attributes

static BDSTunnelFactoryinstance = 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 43 of file BDSTunnelFactory.hh.

Constructor & Destructor Documentation

◆ ~BDSTunnelFactory()

BDSTunnelFactory::~BDSTunnelFactory ( )

Definition at line 51 of file BDSTunnelFactory.cc.

◆ BDSTunnelFactory()

BDSTunnelFactory::BDSTunnelFactory ( )
private

Private constructor as a singleton.

Definition at line 42 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 87 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 171 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 107 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 149 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 128 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 61 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 35 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 140 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ elliptical

BDSTunnelFactoryBase* BDSTunnelFactory::elliptical
private

Factory instance.

Definition at line 141 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ instance

BDSTunnelFactory * BDSTunnelFactory::instance = nullptr
staticprivate

Singleton instance.

Definition at line 134 of file BDSTunnelFactory.hh.

Referenced by Instance().

◆ rectaboveground

BDSTunnelFactoryBase* BDSTunnelFactory::rectaboveground
private

Factory instance.

Definition at line 144 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ rectangular

BDSTunnelFactoryBase* BDSTunnelFactory::rectangular
private

Factory instance.

Definition at line 142 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().

◆ square

BDSTunnelFactoryBase* BDSTunnelFactory::square
private

Factory instance.

Definition at line 143 of file BDSTunnelFactory.hh.

Referenced by BDSTunnelFactory(), and GetAppropriateFactory().


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