BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
BDSBeamPipeFactoryBase Class Referenceabstract

Abstract base class for beampipe factory classes. More...

#include <BDSBeamPipeFactoryBase.hh>

Inheritance diagram for BDSBeamPipeFactoryBase:
Inheritance graph
Collaboration diagram for BDSBeamPipeFactoryBase:
Collaboration graph

Public Member Functions

virtual BDSBeamPipeCreateBeamPipe (const G4String &nameIn, G4double lengthIn, G4double aper1=0, G4double aper2=0, G4double aper3=0, G4double aper4=0, G4Material *vacuumMaterialIn=nullptr, G4double beamPipeThicknessIn=0, G4Material *beamPipeMaterialIn=nullptr, const G4String &pointsFileIn="", const G4String &pointsUnitIn="")=0
 create a flat ended beampipe More...
 
virtual BDSBeamPipeCreateBeamPipe (const G4String &nameIn, G4double lengthIn, const G4ThreeVector &inputFaceNormalIn, const G4ThreeVector &outputFaceNormalIn, G4double aper1=0, G4double aper2=0, G4double aper3=0, G4double aper4=0, G4Material *vacuumMaterialIn=nullptr, G4double beamPipeThicknessIn=0, G4Material *beamPipeMaterialIn=nullptr, const G4String &pointsFileIn="", const G4String &pointsUnitIn="")=0
 
virtual ~BDSBeamPipeFactoryBase ()
 Virtual base destructor. More...
 
- Public Member Functions inherited from BDSFactoryBase
virtual void FactoryBaseCleanUp ()
 Empty containers for next use - factories are never deleted so can't rely on scope. More...
 

Protected Member Functions

 BDSBeamPipeFactoryBase ()
 base constructor More...
 
void CleanUpBase ()
 
virtual void CleanUp ()
 
void CommonConstruction (const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn, G4double length)
 finalise beampipe construction More...
 
BDSBeamPipeBuildBeamPipeAndRegisterVolumes (BDSExtent extent, G4double containerRadius, G4bool containerIsCircular=false)
 build beampipe and register logical volumes More...
 
virtual void BuildLogicalVolumes (const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn)
 build logical volumes More...
 
virtual void SetVisAttributes (G4Material *beamPipeMaterialIn)
 Set visual attributes. More...
 
virtual void SetUserLimits (G4double length)
 Set user limits. More...
 
virtual void PlaceComponents (const G4String &nameIn)
 Place volumes. More...
 

Static Protected Member Functions

static void CheckAngledVolumeCanBeBuilt (G4double length, const G4ThreeVector &inputfaceAngle, const G4ThreeVector &outputfaceAngle, G4double horizontalWidth, const G4String &name)
 check if a beam pipe volume with angled faces can be constructed More...
 

Protected Attributes

G4bool sensitiveBeamPipe
 Whether the beam pipe will record energy deposition. More...
 
G4bool sensitiveVacuum
 Whether the vacuum will record any energy deposition. More...
 
G4bool storeApertureImpacts
 Whether to store aperture impacts. More...
 
G4VSolid * vacuumSolid
 
G4VSolid * beamPipeSolid
 
G4VSolid * containerSolid
 
G4VSolid * containerSubtractionSolid
 Longer (in length) version of container solid for unambiguous subtraction. More...
 
G4LogicalVolume * vacuumLV
 
G4LogicalVolume * beamPipeLV
 
G4LogicalVolume * containerLV
 
G4PVPlacement * vacuumPV
 
G4PVPlacement * beamPipePV
 
G4ThreeVector inputFaceNormal
 For recording the face normals in the finished pipe component. More...
 
G4ThreeVector outputFaceNormal
 For recording the face normals in the finished pipe component. More...
 
- Protected Attributes inherited from BDSFactoryBase
std::set< G4LogicalVolume * > allLogicalVolumes
 
std::set< G4VPhysicalVolume * > allPhysicalVolumes
 
std::set< G4RotationMatrix * > allRotationMatrices
 
std::set< G4UserLimits * > allUserLimits
 
std::set< G4VSolid * > allSolids
 
std::set< G4VisAttributes * > allVisAttributes
 
G4double lengthSafety
 Cache of global constants variable. More...
 
G4double lengthSafetyLarge
 Cache of global constants variable. More...
 
G4bool checkOverlaps
 Cache of global constants variable. More...
 
G4bool visDebug
 Cache of global constants variable. More...
 
G4double nSegmentsPerCircle
 Cache of global constants variable. More...
 
G4VisAttributes * containerVisAttr
 Cache of global constants variable. More...
 
G4UserLimits * defaultUserLimits
 Cache of global constants variable. More...
 

Detailed Description

Abstract base class for beampipe factory classes.

Abstract base class that defines the interface of each factory to build any type of beampipe required. There are four general possibilities apart from the shape (each derived class will give a different cross-section) and these dictate the angled faces.

Uses Geant4 default units by default, ie mm, rad (not metres)

Note, any type of aperture (in MADX) requires up to 4 parameters

Default values in constructors result in global defaults being used ie beampipe material will be steel - the default from options.

'In' in argument variables is used to distinguish between that and possible internal member variables with the same name - avoiding 'itsVariable'

Author
Laurie Nevay

Definition at line 57 of file BDSBeamPipeFactoryBase.hh.

Constructor & Destructor Documentation

◆ ~BDSBeamPipeFactoryBase()

virtual BDSBeamPipeFactoryBase::~BDSBeamPipeFactoryBase ( )
inlinevirtual

Virtual base destructor.

Definition at line 92 of file BDSBeamPipeFactoryBase.hh.

◆ BDSBeamPipeFactoryBase()

BDSBeamPipeFactoryBase::BDSBeamPipeFactoryBase ( )
protected

base constructor

Definition at line 40 of file BDSBeamPipeFactoryBase.cc.

References CleanUpBase(), BDSGlobalConstants::Instance(), sensitiveBeamPipe, sensitiveVacuum, and storeApertureImpacts.

Here is the call graph for this function:

Member Function Documentation

◆ BuildBeamPipeAndRegisterVolumes()

BDSBeamPipe * BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes ( BDSExtent  extent,
G4double  containerRadius,
G4bool  containerIsCircular = false 
)
protected

◆ BuildLogicalVolumes()

void BDSBeamPipeFactoryBase::BuildLogicalVolumes ( const G4String &  nameIn,
G4Material *  vacuumMaterialIn,
G4Material *  beamPipeMaterialIn 
)
protectedvirtual

build logical volumes

Reimplemented in BDSBeamPipeFactoryLHCDetailed.

Definition at line 88 of file BDSBeamPipeFactoryBase.cc.

References BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), and BDSMaterials::Instance().

Referenced by BDSBeamPipeFactoryLHCDetailed::BuildLogicalVolumes(), and CommonConstruction().

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

◆ CheckAngledVolumeCanBeBuilt()

void BDSBeamPipeFactoryBase::CheckAngledVolumeCanBeBuilt ( G4double  length,
const G4ThreeVector &  inputfaceAngle,
const G4ThreeVector &  outputfaceAngle,
G4double  horizontalWidth,
const G4String &  name 
)
staticprotected

◆ CleanUp()

void BDSBeamPipeFactoryBase::CleanUp ( )
protectedvirtual

◆ CleanUpBase()

void BDSBeamPipeFactoryBase::CleanUpBase ( )
protected

Initialiser and can be used to reset factory pointers after use. Non-virtual as it's used in the constructor to avoid duplication of code, but it can't be virtual there.

Definition at line 54 of file BDSBeamPipeFactoryBase.cc.

References containerSubtractionSolid, BDSFactoryBase::FactoryBaseCleanUp(), inputFaceNormal, and outputFaceNormal.

Referenced by BDSBeamPipeFactoryBase().

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

◆ CommonConstruction()

void BDSBeamPipeFactoryBase::CommonConstruction ( const G4String &  nameIn,
G4Material *  vacuumMaterialIn,
G4Material *  beamPipeMaterialIn,
G4double  length 
)
protected

◆ CreateBeamPipe() [1/2]

virtual BDSBeamPipe * BDSBeamPipeFactoryBase::CreateBeamPipe ( const G4String &  nameIn,
G4double  lengthIn,
const G4ThreeVector &  inputFaceNormalIn,
const G4ThreeVector &  outputFaceNormalIn,
G4double  aper1 = 0,
G4double  aper2 = 0,
G4double  aper3 = 0,
G4double  aper4 = 0,
G4Material *  vacuumMaterialIn = nullptr,
G4double  beamPipeThicknessIn = 0,
G4Material *  beamPipeMaterialIn = nullptr,
const G4String &  pointsFileIn = "",
const G4String &  pointsUnitIn = "" 
)
pure virtual

Create a beam pipe with angled faces as described by unit normal vectors. The input face normal vector must have a negative z component and the output face a positive z component.

Implemented in BDSBeamPipeFactoryCircular, BDSBeamPipeFactoryCircularVacuum, BDSBeamPipeFactoryElliptical, BDSBeamPipeFactoryLHC, BDSBeamPipeFactoryLHCDetailed, BDSBeamPipeFactoryRectangular, BDSBeamPipeFactoryRectEllipse, and BDSBeamPipeFactoryPoints.

◆ CreateBeamPipe() [2/2]

virtual BDSBeamPipe * BDSBeamPipeFactoryBase::CreateBeamPipe ( const G4String &  nameIn,
G4double  lengthIn,
G4double  aper1 = 0,
G4double  aper2 = 0,
G4double  aper3 = 0,
G4double  aper4 = 0,
G4Material *  vacuumMaterialIn = nullptr,
G4double  beamPipeThicknessIn = 0,
G4Material *  beamPipeMaterialIn = nullptr,
const G4String &  pointsFileIn = "",
const G4String &  pointsUnitIn = "" 
)
pure virtual

◆ PlaceComponents()

void BDSBeamPipeFactoryBase::PlaceComponents ( const G4String &  nameIn)
protectedvirtual

Place volumes.

Reimplemented in BDSBeamPipeFactoryLHCDetailed.

Definition at line 142 of file BDSBeamPipeFactoryBase.cc.

References BDSFactoryBase::checkOverlaps.

Referenced by CommonConstruction(), and BDSBeamPipeFactoryLHCDetailed::PlaceComponents().

Here is the caller graph for this function:

◆ SetUserLimits()

void BDSBeamPipeFactoryBase::SetUserLimits ( G4double  length)
protectedvirtual

Set user limits.

Reimplemented in BDSBeamPipeFactoryLHCDetailed.

Definition at line 122 of file BDSBeamPipeFactoryBase.cc.

References BDS::CreateUserLimits(), and BDSGlobalConstants::Instance().

Referenced by CommonConstruction(), and BDSBeamPipeFactoryLHCDetailed::SetUserLimits().

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

◆ SetVisAttributes()

void BDSBeamPipeFactoryBase::SetVisAttributes ( G4Material *  beamPipeMaterialIn)
protectedvirtual

Set visual attributes.

Reimplemented in BDSBeamPipeFactoryLHCDetailed.

Definition at line 109 of file BDSBeamPipeFactoryBase.cc.

References BDSColourFromMaterial::GetColourWithDefault(), BDSColourFromMaterial::Instance(), BDSColours::Instance(), BDSGlobalConstants::Instance(), and BDSFactoryBase::nSegmentsPerCircle.

Referenced by CommonConstruction(), and BDSBeamPipeFactoryLHCDetailed::SetVisAttributes().

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

Field Documentation

◆ beamPipeLV

G4LogicalVolume* BDSBeamPipeFactoryBase::beamPipeLV
protected

Definition at line 146 of file BDSBeamPipeFactoryBase.hh.

◆ beamPipePV

G4PVPlacement* BDSBeamPipeFactoryBase::beamPipePV
protected

Definition at line 149 of file BDSBeamPipeFactoryBase.hh.

◆ beamPipeSolid

G4VSolid* BDSBeamPipeFactoryBase::beamPipeSolid
protected

Definition at line 141 of file BDSBeamPipeFactoryBase.hh.

◆ containerLV

G4LogicalVolume* BDSBeamPipeFactoryBase::containerLV
protected

Definition at line 147 of file BDSBeamPipeFactoryBase.hh.

◆ containerSolid

G4VSolid* BDSBeamPipeFactoryBase::containerSolid
protected

Definition at line 142 of file BDSBeamPipeFactoryBase.hh.

◆ containerSubtractionSolid

G4VSolid* BDSBeamPipeFactoryBase::containerSubtractionSolid
protected

◆ inputFaceNormal

G4ThreeVector BDSBeamPipeFactoryBase::inputFaceNormal
protected

◆ outputFaceNormal

G4ThreeVector BDSBeamPipeFactoryBase::outputFaceNormal
protected

◆ sensitiveBeamPipe

G4bool BDSBeamPipeFactoryBase::sensitiveBeamPipe
protected

Whether the beam pipe will record energy deposition.

Definition at line 137 of file BDSBeamPipeFactoryBase.hh.

Referenced by BDSBeamPipeFactoryBase(), BuildBeamPipeAndRegisterVolumes(), and BDSBeamPipeFactoryLHCDetailed::CommonFinalConstruction().

◆ sensitiveVacuum

G4bool BDSBeamPipeFactoryBase::sensitiveVacuum
protected

Whether the vacuum will record any energy deposition.

Definition at line 138 of file BDSBeamPipeFactoryBase.hh.

Referenced by BDSBeamPipeFactoryBase(), and BuildBeamPipeAndRegisterVolumes().

◆ storeApertureImpacts

G4bool BDSBeamPipeFactoryBase::storeApertureImpacts
protected

Whether to store aperture impacts.

Definition at line 139 of file BDSBeamPipeFactoryBase.hh.

Referenced by BDSBeamPipeFactoryBase(), and BuildBeamPipeAndRegisterVolumes().

◆ vacuumLV

G4LogicalVolume* BDSBeamPipeFactoryBase::vacuumLV
protected

Definition at line 145 of file BDSBeamPipeFactoryBase.hh.

◆ vacuumPV

G4PVPlacement* BDSBeamPipeFactoryBase::vacuumPV
protected

Definition at line 148 of file BDSBeamPipeFactoryBase.hh.

◆ vacuumSolid

G4VSolid* BDSBeamPipeFactoryBase::vacuumSolid
protected

Definition at line 140 of file BDSBeamPipeFactoryBase.hh.


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