BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Abstract base class for tunnel factory classes. More...
#include <BDSTunnelFactoryBase.hh>
Public Member Functions | |
virtual BDSTunnelSection * | CreateTunnelSection (G4String name, G4double length, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)=0 |
Create a tunnel section with flat input and output faces. Pure virtual. More... | |
virtual BDSTunnelSection * | CreateTunnelSectionAngledIn (G4String name, G4double length, G4double angleIn, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible) |
virtual BDSTunnelSection * | CreateTunnelSectionAngledOut (G4String name, G4double length, G4double angleOut, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible) |
virtual BDSTunnelSection * | CreateTunnelSectionAngledInOut (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) |
virtual BDSTunnelSection * | CreateTunnelSectionAngled (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)=0 |
Create a tunnel section with an angled input and output face. Pure virtual. More... | |
virtual | ~BDSTunnelFactoryBase () |
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 | |
BDSTunnelFactoryBase () | |
protected default constructor so only derived classes can use it More... | |
void | CommontTestInputParameters (G4double &length, G4double &tunnelThickness, G4double &tunnelSoilThickness, G4Material *&tunnelMaterial, G4Material *&tunnelSoilMaterial) |
virtual void | CommonConstruction (G4String name, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4double length, G4double containerXRadius, G4double contianerYRadius, G4bool visible) |
virtual void | BuildLogicalVolumes (G4String name, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial) |
Build logical volumes from solids + materials. More... | |
virtual void | SetVisAttributes (G4bool visible) |
Set the visual attributes for each logical volume. More... | |
virtual void | SetUserLimits () |
Set user limits for all logical volumes in the tunnel section. More... | |
virtual void | PrepareGeometryComponent (G4double containerXRadius, G4double containerYRadius, G4double containerZRadius) |
Prepare the assembled geometry component. More... | |
virtual void | PrepareTunnelSection (G4String name, G4double chordLength) |
Prepare the output BDSTunnelSection instance. More... | |
virtual void | SetSensitiveVolumes () |
Set the sensitive volumes. More... | |
virtual void | PlaceComponents (G4String name) |
Place components in container volume. More... | |
virtual void | CleanUp () |
Protected Attributes | |
BDSGeometryComponent * | tunnelComponent |
BDSTunnelSection * | tunnelSection |
G4VSolid * | containerSolid |
G4VSolid * | tunnelSolid |
G4VSolid * | soilSolid |
G4VSolid * | floorSolid |
G4VSolid * | intersectionSolid |
G4LogicalVolume * | containerLV |
G4LogicalVolume * | tunnelLV |
G4LogicalVolume * | soilLV |
G4LogicalVolume * | floorLV |
G4ThreeVector | floorDisplacement |
BDSTunnelInfo * | defaultModel |
G4double | cumulativeAngle |
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... | |
Abstract base class for tunnel factory classes.
Abstract base class that defines the interface of each factory to build any type of tunnel 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 - no derived classes record the 'angle' parameter for BDSAcceleratorComponent correctly in the BDSTunnelSection instances. This is only acceptable as the tunnel beam line is manually made not using the internal accumulation of coordinates of BDSBeamline. It's also in part necessary as each tunnel segment doesn't obey the no double bending rule of accerlator components so can't be used with angle and arc length accurately.
Definition at line 59 of file BDSTunnelFactoryBase.hh.
|
inlinevirtual |
Virtual base destructor.
Definition at line 139 of file BDSTunnelFactoryBase.hh.
|
protected |
protected default constructor so only derived classes can use it
Definition at line 43 of file BDSTunnelFactoryBase.cc.
References BDSGlobalConstants::Instance().
|
protectedvirtual |
Build logical volumes from solids + materials.
Definition at line 154 of file BDSTunnelFactoryBase.cc.
References BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), and BDSMaterials::Instance().
|
protectedvirtual |
Reset factory members for next usage - avoids previously constructed parts being accidently used in new object
Reimplemented in BDSTunnelFactoryRectAboveGround.
Definition at line 319 of file BDSTunnelFactoryBase.cc.
References cumulativeAngle, and BDSFactoryBase::FactoryBaseCleanUp().
Referenced by BDSTunnelFactoryRectAboveGround::CleanUp(), BDSTunnelFactoryCircular::CreateTunnelSection(), BDSTunnelFactoryElliptical::CreateTunnelSection(), BDSTunnelFactoryRectangular::CreateTunnelSection(), BDSTunnelFactoryCircular::CreateTunnelSectionAngled(), BDSTunnelFactoryElliptical::CreateTunnelSectionAngled(), and BDSTunnelFactoryRectangular::CreateTunnelSectionAngled().
|
protectedvirtual |
Definition at line 136 of file BDSTunnelFactoryBase.cc.
|
protected |
General basic viability tests for input parameters - these are only basic tests and not dependent on the accelerator model, other components or specific tunnel model in the derived factory class
Definition at line 117 of file BDSTunnelFactoryBase.cc.
References BDSFactoryBase::lengthSafety.
Referenced by BDSTunnelFactoryRectAboveGround::TestInputParameters(), BDSTunnelFactoryCircular::TestInputParameters(), BDSTunnelFactorySquare::TestInputParameters(), BDSTunnelFactoryElliptical::TestInputParameters(), and BDSTunnelFactoryRectangular::TestInputParameters().
|
pure virtual |
Create a tunnel section with flat input and output faces. Pure virtual.
Implemented in BDSTunnelFactoryCircular, BDSTunnelFactoryElliptical, BDSTunnelFactoryRectAboveGround, BDSTunnelFactoryRectangular, and BDSTunnelFactorySquare.
Referenced by BDSTunnelFactory::CreateTunnelSection(), and BDSTunnelFactorySquare::CreateTunnelSection().
|
pure virtual |
Create a tunnel section with an angled input and output face. Pure virtual.
Implemented in BDSTunnelFactoryCircular, BDSTunnelFactoryElliptical, BDSTunnelFactoryRectAboveGround, BDSTunnelFactoryRectangular, and BDSTunnelFactorySquare.
Referenced by BDSTunnelFactory::CreateTunnelSectionAngled(), BDSTunnelFactorySquare::CreateTunnelSectionAngled(), and CreateTunnelSectionAngledInOut().
|
virtual |
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 61 of file BDSTunnelFactoryBase.cc.
References CreateTunnelSectionAngledInOut().
Referenced by BDSTunnelFactory::CreateTunnelSectionAngledIn().
|
virtual |
Calculates the face normal vectors that all construction uses and then passes along to the also public function CreateTunnelSectionAngled. This allows flexibility in the way the tunnel segments are created - whether in a fairly flat 2d approach along the beam line with only bending the horizontal plane (angles) or in 3d (vectors).
Definition at line 97 of file BDSTunnelFactoryBase.cc.
References BDS::CalculateFaces(), and CreateTunnelSectionAngled().
Referenced by CreateTunnelSectionAngledIn(), BDSTunnelFactory::CreateTunnelSectionAngledInOut(), and CreateTunnelSectionAngledOut().
|
virtual |
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 79 of file BDSTunnelFactoryBase.cc.
References CreateTunnelSectionAngledInOut().
Referenced by BDSTunnelFactory::CreateTunnelSectionAngledOut().
|
protectedvirtual |
Place components in container volume.
Definition at line 282 of file BDSTunnelFactoryBase.cc.
References BDSFactoryBase::checkOverlaps.
|
protectedvirtual |
Prepare the assembled geometry component.
Definition at line 219 of file BDSTunnelFactoryBase.cc.
References BDSGeometryComponent::RegisterLogicalVolume(), BDSGeometryComponent::RegisterSolid(), BDSGeometryComponent::RegisterVisAttributes(), and BDSGeometryComponent::SetExtent().
|
protectedvirtual |
Prepare the output BDSTunnelSection instance.
Definition at line 243 of file BDSTunnelFactoryBase.cc.
References cumulativeAngle, BDSAcceleratorComponentRegistry::Instance(), and BDSAcceleratorComponentRegistry::RegisterTunnelComponent().
|
protectedvirtual |
Set the sensitive volumes.
Definition at line 257 of file BDSTunnelFactoryBase.cc.
References BDSGeometryComponent::RegisterSensitiveVolume().
|
protectedvirtual |
Set user limits for all logical volumes in the tunnel section.
Definition at line 270 of file BDSTunnelFactoryBase.cc.
References BDSGlobalConstants::Instance().
|
protectedvirtual |
Set the visual attributes for each logical volume.
Definition at line 183 of file BDSTunnelFactoryBase.cc.
References BDSColours::Instance(), and BDSGlobalConstants::Instance().
|
protected |
Definition at line 200 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 195 of file BDSTunnelFactoryBase.hh.
|
protected |
The total angle by which the coordinates turn by (horizontally) after going through the tunnel - only really needed to fulfill BDSAcceleratorComponent inheritance - unsed further downstream.
Definition at line 210 of file BDSTunnelFactoryBase.hh.
Referenced by CleanUp(), and PrepareTunnelSection().
|
protected |
Definition at line 205 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 204 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 203 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 198 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 199 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 202 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 197 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 192 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 201 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 193 of file BDSTunnelFactoryBase.hh.
|
protected |
Definition at line 196 of file BDSTunnelFactoryBase.hh.