BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Factory for octagonal aperture model beampipes. More...
#include <BDSBeamPipeFactoryOctagonal.hh>
Private Member Functions | |
virtual void | GeneratePoints (G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness, G4int pointsPerTwoPi=40) |
virtual G4double | CalculateIntersectionRadius (G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness) |
Calculate the radius of the solid used for intersection for angled faces. | |
void | GenerateOctagonal (std::vector< G4TwoVector > &vec, G4double x1, G4double y1, G4double x2, G4double y2) |
Append 2D points on an octagon in a clockwise direction into the vector argument. | |
BDS::FourPoints | ExpandOctagon (G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double distance) |
Additional Inherited Members | |
![]() | |
virtual BDSBeamPipe * | CreateBeamPipe (const G4String &nameIn, G4double lengthIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4Material *vacuumMaterialIn, G4double beamPipeThicknessIn, G4Material *beamPipeMaterialIn, const G4String &pointsFileIn="", const G4String &pointsUnitIn="") |
Required overloaded method from BDSBeamPipeFactoryBase to build straight piece of beam pipe. | |
virtual BDSBeamPipe * | CreateBeamPipe (const G4String &nameIn, G4double lengthIn, const G4ThreeVector &inputFaceNormalIn, const G4ThreeVector &outputFaceNormalIn, G4double aper1In, G4double aper2In, G4double aper3In, G4double aper4In, G4Material *vacuumMaterialIn, G4double beamPipeThicknessIn, G4Material *beamPipeMaterialIn, const G4String &pointsFileIn="", const G4String &pointsUnitIn="") |
Required overloaded method from BDSBeamPipeFactoryBase to build angled piece of beam pipe. | |
![]() | |
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 | |
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. | |
![]() | |
virtual void | FactoryBaseCleanUp () |
Empty containers for next use - factories are never deleted so can't rely on scope. | |
![]() | |
virtual void | GeneratePoints (G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness, G4int pointsPerTwoPi=40)=0 |
virtual G4double | CalculateIntersectionRadius (G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness)=0 |
virtual void | CleanUp () |
Clear member vectors and run base class clean up to clear pointers between runs. | |
void | AppendPoint (std::vector< G4TwoVector > &vec, G4double x, G4double y) |
void | AppendAngle (std::vector< G4TwoVector > &vec, G4double startAngle, G4double finishAngle, G4double radius, G4int nPoints=10, G4double xOffset=0, G4double yOffset=0) |
void | AppendAngleEllipse (std::vector< G4TwoVector > &vec, G4double startAngle, G4double finishAngle, G4double radiusA, G4double radiusB, G4int nPoints=10, G4double xOffset=0, G4double yOffset=0) |
Generate 2-vector points (and append them) about an ellipse. | |
![]() | |
BDSBeamPipeFactoryBase () | |
base constructor | |
void | CleanUpBase () |
virtual void | CleanUp () |
void | CommonConstruction (const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn, G4double length) |
finalise beampipe construction | |
BDSBeamPipe * | BuildBeamPipeAndRegisterVolumes (BDSExtent extent, G4double containerRadius, G4bool containerIsCircular=false) |
build beampipe and register logical volumes | |
virtual void | BuildLogicalVolumes (const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn) |
build logical volumes | |
virtual void | SetVisAttributes (G4Material *beamPipeMaterialIn, G4Material *vacuumMaterialIn) |
Set visual attributes. | |
virtual void | SetUserLimits (G4double length) |
Set user limits. | |
virtual void | PlaceComponents (const G4String &nameIn) |
Place volumes. | |
![]() | |
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 | |
![]() | |
std::vector< G4TwoVector > | vacuumEdge |
Vector of x,y coordinates for vacuum extruded solid edge. | |
std::vector< G4TwoVector > | beamPipeInnerEdge |
Vector of x,y coordinates for beam pipe inner edge. | |
std::vector< G4TwoVector > | beamPipeOuterEdge |
Vector of x,y coordinates for beam pipe outer edge. | |
std::vector< G4TwoVector > | containerEdge |
Vector of x,y coordinates for the container volume. | |
std::vector< G4TwoVector > | containerSubtractionEdge |
Vector of x,y coordinates for the container subtraction volume. | |
G4double | extentX |
Extents prepared by GeneratePoints function as only it knows the extents. | |
G4double | extentY |
Extents prepared by GeneratePoints function as only it knows the extents. | |
G4String | pointsFile |
Temporary copy of input variables. | |
G4String | pointsUnit |
Temporary copy of input variables. | |
![]() | |
G4bool | sensitiveBeamPipe |
Whether the beam pipe will record energy deposition. | |
G4bool | sensitiveVacuum |
Whether the vacuum will record any energy deposition. | |
G4bool | storeApertureImpacts |
Whether to store aperture impacts. | |
G4VSolid * | vacuumSolid |
G4VSolid * | beamPipeSolid |
G4VSolid * | containerSolid |
G4VSolid * | containerSubtractionSolid |
Longer (in length) version of container solid for unambiguous subtraction. | |
G4LogicalVolume * | vacuumLV |
G4LogicalVolume * | beamPipeLV |
G4LogicalVolume * | containerLV |
G4PVPlacement * | vacuumPV |
G4PVPlacement * | beamPipePV |
G4ThreeVector | inputFaceNormal |
For recording the face normals in the finished pipe component. | |
G4ThreeVector | outputFaceNormal |
For recording the face normals in the finished pipe component. | |
![]() | |
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. | |
Factory for octagonal aperture model beampipes.
This is a rectangular aperture with faceted flat corners. In the positive quadrant (+ve x & y) the user specifies (x,y) of the full width in the horizontal and the full height in the vertical. A second set of (x,y) coordinates specify the x and y points of the cut points. Therefore, the second x,y are always < than the first ones. This is reflected in all four quadrants. Practically, a G4ExtrudedSolid is used where simply points are defined and this shape is extruded.
aper1,2 are used to represent x1,y1 and aper3,4 are x2,y2 respectively.
Definition at line 51 of file BDSBeamPipeFactoryOctagonal.hh.
BDSBeamPipeFactoryOctagonal::BDSBeamPipeFactoryOctagonal | ( | ) |
Definition at line 28 of file BDSBeamPipeFactoryOctagonal.cc.
|
inlinevirtual |
Definition at line 55 of file BDSBeamPipeFactoryOctagonal.hh.
|
privatevirtual |
Calculate the radius of the solid used for intersection for angled faces.
Implements BDSBeamPipeFactoryPoints.
Definition at line 92 of file BDSBeamPipeFactoryOctagonal.cc.
References ExpandOctagon(), and BDSFactoryBase::lengthSafetyLarge.
|
private |
Calculate the corresponding aper1234 values if the octagonal beam pipe shape were to be expanded by "distance". This calculates the points, then works out the corresponding x,y coordinates for the expanded points such that each side of the octagon is expanded by "distance". The aper1234 parameterisation is then calculated from these x,y, coordinates.
Definition at line 47 of file BDSBeamPipeFactoryOctagonal.cc.
Referenced by CalculateIntersectionRadius(), and GeneratePoints().
|
private |
Append 2D points on an octagon in a clockwise direction into the vector argument.
Definition at line 31 of file BDSBeamPipeFactoryOctagonal.cc.
Referenced by GeneratePoints().
|
privatevirtual |
Generate quarters of a circle to represent the edges joined by straight lines. Overloaded (required) from BDSBeamPipeFactoryPoints
Implements BDSBeamPipeFactoryPoints.
Definition at line 71 of file BDSBeamPipeFactoryOctagonal.cc.
References BDSBeamPipeFactoryPoints::beamPipeInnerEdge, BDSBeamPipeFactoryPoints::beamPipeOuterEdge, BDSBeamPipeFactoryPoints::containerEdge, BDSBeamPipeFactoryPoints::containerSubtractionEdge, ExpandOctagon(), BDSBeamPipeFactoryPoints::extentX, BDSBeamPipeFactoryPoints::extentY, GenerateOctagonal(), BDSFactoryBase::lengthSafetyLarge, and BDSBeamPipeFactoryPoints::vacuumEdge.