BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Abstract base class for rf cavity geometry factories. More...
#include <BDSCavityFactoryBase.hh>
Public Member Functions | |
BDSCavity * | CreateCavity (G4String name, G4double totalChordLength, const BDSCavityInfo *info, G4Material *vacuumMaterial) |
![]() | |
virtual void | FactoryBaseCleanUp () |
Empty containers for next use - factories are never deleted so can't rely on scope. | |
Protected Member Functions | |
virtual void | CleanUp () |
Ensure all internal members are reset before reuse. Calls CleanUpBase. | |
void | CleanUpBase () |
Non-virtual clean up that can be used in the constructor safely. | |
virtual G4double | CreateSolids (G4String name, G4double totalChordLength, const BDSCavityInfo *info)=0 |
Create vacuumSolid and cavitySolid. Must return the container radius. | |
virtual void | CreateLogicalVolumes (G4String name, const BDSCavityInfo *info, G4Material *vacuumMaterial) |
Create vacuumLV, cavityLV and containerLV. | |
virtual void | SetUserLimits (G4double length) |
virtual void | SetVisAttributes (G4String colourName="rfcavity") |
Set vis attributes for cavityLV, vacuumLV and containerLV. | |
virtual void | PlaceComponents (G4String name) |
Place the vacuum and cavity centrally in the container logical volume. | |
virtual BDSCavity * | BuildCavityAndRegisterObjects (const BDSExtent &extent) |
Construct output object and register all temporary objects from vectors. | |
Protected Attributes | |
std::map< G4LogicalVolume *, BDSSDType > | sensitiveVolumes |
Map to sensitivity for volumes. | |
G4bool | sensitiveBeamPipe |
Whether the beam pipe will record energy deposition. | |
G4bool | sensitiveVacuum |
Whether the vacuum will record energy deposition. | |
G4VSolid * | vacuumSolid |
Cache of particular solid or lv for common functionality in this class. | |
G4VSolid * | cavitySolid |
Cache of particular solid or lv for common functionality in this class. | |
G4VSolid * | containerSolid |
Cache of particular solid or lv for common functionality in this class. | |
G4LogicalVolume * | vacuumLV |
Cache of particular solid or lv for common functionality in this class. | |
G4LogicalVolume * | cavityLV |
Cache of particular solid or lv for common functionality in this class. | |
G4LogicalVolume * | containerLV |
Cache of particular solid or lv for common functionality in this class. | |
G4Material * | emptyMaterial |
Cache of variable from BDSGlobalConstants. | |
![]() | |
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. | |
G4double | lengthSafetyLarge |
Cache of global constants variable. | |
G4bool | checkOverlaps |
Cache of global constants variable. | |
G4bool | visDebug |
Cache of global constants variable. | |
G4int | nSegmentsPerCircle |
Cache of global constants variable. | |
G4VisAttributes * | containerVisAttr |
Cache of global constants variable. | |
G4UserLimits * | defaultUserLimits |
Cache of global constants variable. | |
Abstract base class for rf cavity geometry factories.
Definition at line 49 of file BDSCavityFactoryBase.hh.
|
inlinevirtual |
Definition at line 52 of file BDSCavityFactoryBase.hh.
|
protected |
Definition at line 45 of file BDSCavityFactoryBase.cc.
|
protectedvirtual |
Construct output object and register all temporary objects from vectors.
Definition at line 163 of file BDSCavityFactoryBase.cc.
References containerLV, containerSolid, BDSGeometryComponent::RegisterLogicalVolume(), BDSGeometryComponent::RegisterPhysicalVolume(), BDSGeometryComponent::RegisterRotationMatrix(), BDSGeometryComponent::RegisterSensitiveVolume(), BDSGeometryComponent::RegisterSolid(), BDSGeometryComponent::RegisterUserLimits(), BDSGeometryComponent::RegisterVisAttributes(), sensitiveBeamPipe, sensitiveVolumes, and vacuumLV.
Referenced by CreateCavity().
|
protectedvirtual |
Ensure all internal members are reset before reuse. Calls CleanUpBase.
Definition at line 72 of file BDSCavityFactoryBase.cc.
References CleanUpBase().
Referenced by CreateCavity().
|
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().
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().
|
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().
|
protectedpure virtual |
Create vacuumSolid and cavitySolid. Must return the container radius.
Implemented in BDSCavityFactoryElliptical, BDSCavityFactoryPillBox, and BDSCavityFactoryRectangular.
Referenced by CreateCavity().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
protected |
Cache of particular solid or lv for common functionality in this class.
Definition at line 98 of file BDSCavityFactoryBase.hh.
Referenced by BuildCavityAndRegisterObjects(), CleanUpBase(), CreateLogicalVolumes(), BDSCavityFactoryElliptical::CreateSolids(), BDSCavityFactoryPillBox::CreateSolids(), and BDSCavityFactoryRectangular::CreateSolids().
|
protected |
Cache of variable from BDSGlobalConstants.
Definition at line 105 of file BDSCavityFactoryBase.hh.
Referenced by CreateLogicalVolumes().
|
protected |
Whether the beam pipe will record energy deposition.
Definition at line 107 of file BDSCavityFactoryBase.hh.
Referenced by BuildCavityAndRegisterObjects().
|
protected |
Whether the vacuum will record energy deposition.
Definition at line 108 of file BDSCavityFactoryBase.hh.
Referenced by CreateLogicalVolumes().
|
protected |
Map to sensitivity for volumes.
Definition at line 93 of file BDSCavityFactoryBase.hh.
Referenced by BuildCavityAndRegisterObjects(), and CreateLogicalVolumes().
|
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().
|
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().