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

Abstract base class for rf cavity geometry factories. More...

#include <BDSCavityFactoryBase.hh>

Inheritance diagram for BDSCavityFactoryBase:
Inheritance graph
Collaboration diagram for BDSCavityFactoryBase:
Collaboration graph

Public Member Functions

BDSCavityCreateCavity (G4String name, G4double totalChordLength, const BDSCavityInfo *info, G4Material *vacuumMaterial)
 
- 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

virtual void CleanUp ()
 Ensure all internal members are reset before reuse. Calls CleanUpBase. More...
 
void CleanUpBase ()
 Non-virtual clean up that can be used in the constructor safely. More...
 
virtual G4double CreateSolids (G4String name, G4double totalChordLength, const BDSCavityInfo *info)=0
 Create vacuumSolid and cavitySolid. Must return the container radius. More...
 
virtual void CreateLogicalVolumes (G4String name, const BDSCavityInfo *info, G4Material *vacuumMaterial)
 Create vacuumLV, cavityLV and containerLV. More...
 
virtual void SetUserLimits (G4double length)
 
virtual void SetVisAttributes (G4String colourName="rfcavity")
 Set vis attributes for cavityLV, vacuumLV and containerLV. More...
 
virtual void PlaceComponents (G4String name)
 Place the vacuum and cavity centrally in the container logical volume. More...
 
virtual BDSCavityBuildCavityAndRegisterObjects (const BDSExtent &extent)
 Construct output object and register all temporary objects from vectors. More...
 

Protected Attributes

std::map< G4LogicalVolume *, BDSSDTypesensitiveVolumes
 Map to sensitivity for volumes. More...
 
G4bool sensitiveBeamPipe
 Whether the beam pipe will record energy deposition. More...
 
G4bool sensitiveVacuum
 Whether the vacuum will record energy deposition. More...
 
G4VSolid * vacuumSolid
 Cache of particular solid or lv for common functionality in this class. More...
 
G4VSolid * cavitySolid
 Cache of particular solid or lv for common functionality in this class. More...
 
G4VSolid * containerSolid
 Cache of particular solid or lv for common functionality in this class. More...
 
G4LogicalVolume * vacuumLV
 Cache of particular solid or lv for common functionality in this class. More...
 
G4LogicalVolume * cavityLV
 Cache of particular solid or lv for common functionality in this class. More...
 
G4LogicalVolume * containerLV
 Cache of particular solid or lv for common functionality in this class. More...
 
G4Material * emptyMaterial
 Cache of variable from BDSGlobalConstants. 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 rf cavity geometry factories.

Author
Laurie Nevay

Definition at line 49 of file BDSCavityFactoryBase.hh.

Constructor & Destructor Documentation

◆ ~BDSCavityFactoryBase()

virtual BDSCavityFactoryBase::~BDSCavityFactoryBase ( )
inlinevirtual

Definition at line 52 of file BDSCavityFactoryBase.hh.

◆ BDSCavityFactoryBase()

BDSCavityFactoryBase::BDSCavityFactoryBase ( )
protected

Definition at line 45 of file BDSCavityFactoryBase.cc.

Member Function Documentation

◆ BuildCavityAndRegisterObjects()

BDSCavity * BDSCavityFactoryBase::BuildCavityAndRegisterObjects ( const BDSExtent extent)
protectedvirtual

◆ CleanUp()

void BDSCavityFactoryBase::CleanUp ( )
protectedvirtual

Ensure all internal members are reset before reuse. Calls CleanUpBase.

Definition at line 72 of file BDSCavityFactoryBase.cc.

References CleanUpBase().

Referenced by CreateCavity().

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

◆ CleanUpBase()

void BDSCavityFactoryBase::CleanUpBase ( )
protected

Non-virtual clean up that can be used in the constructor safely.

Definition at line 77 of file BDSCavityFactoryBase.cc.

References cavityLV, cavitySolid, containerLV, containerSolid, BDSFactoryBase::FactoryBaseCleanUp(), vacuumLV, and vacuumSolid.

Referenced by CleanUp().

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

◆ CreateCavity()

BDSCavity * BDSCavityFactoryBase::CreateCavity ( G4String  name,
G4double  totalChordLength,
const BDSCavityInfo info,
G4Material *  vacuumMaterial 
)

Method that calls protected virtual methods in order. Sets general recipe of construction - in order below.

Definition at line 54 of file BDSCavityFactoryBase.cc.

References BuildCavityAndRegisterObjects(), CleanUp(), CreateLogicalVolumes(), CreateSolids(), PlaceComponents(), SetUserLimits(), and SetVisAttributes().

Referenced by BDSCavityFactory::CreateCavity().

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

◆ CreateLogicalVolumes()

void BDSCavityFactoryBase::CreateLogicalVolumes ( G4String  name,
const BDSCavityInfo info,
G4Material *  vacuumMaterial 
)
protectedvirtual

Create vacuumLV, cavityLV and containerLV.

Definition at line 89 of file BDSCavityFactoryBase.cc.

References cavityLV, cavitySolid, containerLV, containerSolid, emptyMaterial, BDSCavityInfo::material, sensitiveVacuum, sensitiveVolumes, vacuumLV, and vacuumSolid.

Referenced by CreateCavity().

Here is the caller graph for this function:

◆ CreateSolids()

virtual G4double BDSCavityFactoryBase::CreateSolids ( G4String  name,
G4double  totalChordLength,
const BDSCavityInfo info 
)
protectedpure virtual

Create vacuumSolid and cavitySolid. Must return the container radius.

Implemented in BDSCavityFactoryElliptical, BDSCavityFactoryPillBox, and BDSCavityFactoryRectangular.

Referenced by CreateCavity().

Here is the caller graph for this function:

◆ PlaceComponents()

void BDSCavityFactoryBase::PlaceComponents ( G4String  name)
protectedvirtual

Place the vacuum and cavity centrally in the container logical volume.

Definition at line 140 of file BDSCavityFactoryBase.cc.

References cavityLV, BDSFactoryBase::checkOverlaps, containerLV, and vacuumLV.

Referenced by CreateCavity().

Here is the caller graph for this function:

◆ SetUserLimits()

void BDSCavityFactoryBase::SetUserLimits ( G4double  length)
protectedvirtual

If the length is shorter than the default user limits in global constants, create a new user limits object and apply to all lvs in allLogicalVolumes.

Definition at line 111 of file BDSCavityFactoryBase.cc.

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

Referenced by CreateCavity().

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

◆ SetVisAttributes()

void BDSCavityFactoryBase::SetVisAttributes ( G4String  colourName = "rfcavity")
protectedvirtual

Set vis attributes for cavityLV, vacuumLV and containerLV.

Reimplemented in BDSCavityFactoryElliptical.

Definition at line 124 of file BDSCavityFactoryBase.cc.

References cavityLV, containerLV, BDSColours::GetColour(), BDSColours::Instance(), BDSGlobalConstants::Instance(), BDSFactoryBase::nSegmentsPerCircle, and vacuumLV.

Referenced by CreateCavity(), and BDSCavityFactoryElliptical::SetVisAttributes().

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

Field Documentation

◆ cavityLV

G4LogicalVolume* BDSCavityFactoryBase::cavityLV
protected

Cache of particular solid or lv for common functionality in this class.

Definition at line 100 of file BDSCavityFactoryBase.hh.

Referenced by CleanUpBase(), CreateLogicalVolumes(), PlaceComponents(), and SetVisAttributes().

◆ cavitySolid

G4VSolid* BDSCavityFactoryBase::cavitySolid
protected

Cache of particular solid or lv for common functionality in this class.

Definition at line 97 of file BDSCavityFactoryBase.hh.

Referenced by CleanUpBase(), CreateLogicalVolumes(), BDSCavityFactoryElliptical::CreateSolids(), BDSCavityFactoryPillBox::CreateSolids(), and BDSCavityFactoryRectangular::CreateSolids().

◆ containerLV

G4LogicalVolume* BDSCavityFactoryBase::containerLV
protected

Cache of particular solid or lv for common functionality in this class.

Definition at line 101 of file BDSCavityFactoryBase.hh.

Referenced by BuildCavityAndRegisterObjects(), CleanUpBase(), CreateLogicalVolumes(), PlaceComponents(), and SetVisAttributes().

◆ containerSolid

G4VSolid* BDSCavityFactoryBase::containerSolid
protected

◆ emptyMaterial

G4Material* BDSCavityFactoryBase::emptyMaterial
protected

Cache of variable from BDSGlobalConstants.

Definition at line 105 of file BDSCavityFactoryBase.hh.

Referenced by CreateLogicalVolumes().

◆ sensitiveBeamPipe

G4bool BDSCavityFactoryBase::sensitiveBeamPipe
protected

Whether the beam pipe will record energy deposition.

Definition at line 107 of file BDSCavityFactoryBase.hh.

Referenced by BuildCavityAndRegisterObjects().

◆ sensitiveVacuum

G4bool BDSCavityFactoryBase::sensitiveVacuum
protected

Whether the vacuum will record energy deposition.

Definition at line 108 of file BDSCavityFactoryBase.hh.

Referenced by CreateLogicalVolumes().

◆ sensitiveVolumes

std::map<G4LogicalVolume*, BDSSDType> BDSCavityFactoryBase::sensitiveVolumes
protected

Map to sensitivity for volumes.

Definition at line 93 of file BDSCavityFactoryBase.hh.

Referenced by BuildCavityAndRegisterObjects(), and CreateLogicalVolumes().

◆ vacuumLV

G4LogicalVolume* BDSCavityFactoryBase::vacuumLV
protected

Cache of particular solid or lv for common functionality in this class.

Definition at line 99 of file BDSCavityFactoryBase.hh.

Referenced by BuildCavityAndRegisterObjects(), CleanUpBase(), CreateLogicalVolumes(), PlaceComponents(), and SetVisAttributes().

◆ vacuumSolid

G4VSolid* BDSCavityFactoryBase::vacuumSolid
protected

Cache of particular solid or lv for common functionality in this class.

Definition at line 96 of file BDSCavityFactoryBase.hh.

Referenced by CleanUpBase(), CreateLogicalVolumes(), BDSCavityFactoryElliptical::CreateSolids(), BDSCavityFactoryPillBox::CreateSolids(), and BDSCavityFactoryRectangular::CreateSolids().


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