BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Factory for simple lhc aperture model beam pipes. More...
#include <BDSBeamPipeFactoryLHC.hh>
Public Member Functions | |
virtual BDSBeamPipe * | 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="") |
create a flat ended beampipe More... | |
virtual BDSBeamPipe * | 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="") |
![]() | |
virtual BDSBeamPipe * | 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="")=0 |
create a flat ended beampipe More... | |
virtual BDSBeamPipe * | 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="")=0 |
virtual | ~BDSBeamPipeFactoryBase () |
Virtual base destructor. More... | |
![]() | |
virtual void | FactoryBaseCleanUp () |
Empty containers for next use - factories are never deleted so can't rely on scope. More... | |
Private Member Functions | |
BDSBeamPipe * | CommonFinalConstruction (const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn, G4double lengthIn, G4double widthIn, G4double heightIn) |
void | CreateGeneralAngledSolids (const G4String &nameIn, G4double lengthIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double beamPipeThicknessIn, const G4ThreeVector &inputfaceIn, const G4ThreeVector &outputfaceIn) |
void | CreateContainerSubtractionSolid (const G4String &nameIn, G4double &lengthIn, G4double &beamPipeThicknessIn, G4double &aper1In, G4double &aper2In, G4double &aper3In) |
function to create the container subtraction solid and avoid passing aper1,2,3 around further More... | |
Additional Inherited Members | |
![]() | |
BDSBeamPipeFactoryBase () | |
base constructor More... | |
void | CleanUpBase () |
virtual void | CleanUp () |
void | CommonConstruction (const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn, G4double length) |
finalise beampipe construction More... | |
BDSBeamPipe * | BuildBeamPipeAndRegisterVolumes (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 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... | |
![]() | |
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... | |
![]() | |
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... | |
Factory for simple lhc aperture model beam pipes.
Definition at line 31 of file BDSBeamPipeFactoryLHC.hh.
BDSBeamPipeFactoryLHC::BDSBeamPipeFactoryLHC | ( | ) |
Definition at line 38 of file BDSBeamPipeFactoryLHC.cc.
|
inlinevirtual |
Definition at line 35 of file BDSBeamPipeFactoryLHC.hh.
|
private |
Abstract common build features to one function use member variables unique to this factory to pass them around. only the solids are unique, once we have those, the logical volumes and placement in the container are the same. group all this functionality together
Definition at line 181 of file BDSBeamPipeFactoryLHC.cc.
References BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), and BDSBeamPipeFactoryBase::CommonConstruction().
Referenced by CreateBeamPipe().
|
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.
Implements BDSBeamPipeFactoryBase.
Definition at line 149 of file BDSBeamPipeFactoryLHC.cc.
References CommonFinalConstruction(), CreateContainerSubtractionSolid(), CreateGeneralAngledSolids(), BDSBeamPipeFactoryBase::inputFaceNormal, BDSFactoryBase::lengthSafetyLarge, and BDSBeamPipeFactoryBase::outputFaceNormal.
|
virtual |
create a flat ended beampipe
Implements BDSBeamPipeFactoryBase.
Definition at line 41 of file BDSBeamPipeFactoryLHC.cc.
References CommonFinalConstruction(), CreateContainerSubtractionSolid(), BDSFactoryBase::lengthSafety, and BDSFactoryBase::lengthSafetyLarge.
|
private |
function to create the container subtraction solid and avoid passing aper1,2,3 around further
Definition at line 308 of file BDSBeamPipeFactoryLHC.cc.
References BDSBeamPipeFactoryBase::containerSubtractionSolid, and BDSFactoryBase::lengthSafetyLarge.
Referenced by CreateBeamPipe().
|
private |
the angled ones have degeneracy in the geant4 solids they used so we can avoid code duplication by grouping common construction tasks
Definition at line 201 of file BDSBeamPipeFactoryLHC.cc.
References BDSFactoryBase::lengthSafety, and BDSFactoryBase::lengthSafetyLarge.
Referenced by CreateBeamPipe().