20#include "BDSBeamPipeFactoryOctagonal.hh"
21#include "BDSBeamPipeFactoryPoints.hh"
24#include "G4TwoVector.hh"
28BDSBeamPipeFactoryOctagonal::BDSBeamPipeFactoryOctagonal()
37 AppendPoint(vec, x1, y2 );
38 AppendPoint(vec, x1, -y2);
39 AppendPoint(vec, x2, -y1);
40 AppendPoint(vec, -x2, -y1);
41 AppendPoint(vec, -x1, -y2);
42 AppendPoint(vec, -x1, y2 );
43 AppendPoint(vec, -x2, y1 );
44 AppendPoint(vec, x2, y1 );
54 G4TwoVector p1 = G4TwoVector(aper3, aper2);
55 G4TwoVector p1Unit = p1.unit();
56 G4TwoVector p1New = distance*p1Unit;
58 G4TwoVector p2 = G4TwoVector(aper1, aper4);
59 G4TwoVector p2Unit = p2.unit();
60 G4TwoVector p2New = distance*p2Unit;
62 G4double a1 = aper1 + distance;
63 G4double a2 = aper2 + distance;
64 G4double a3 = aper3 + p1New.x();
65 G4double a4 = aper4 + p2New.y();
75 G4double beamPipeThickness,
96 G4double beamPipeThickness)
104 G4double maxXY = std::max(acs.aper1, acs.aper2);
105 G4double r1 = std::hypot(acs.aper1, acs.aper4);
106 G4double r2 = std::hypot(acs.aper2,acs.aper3);
107 G4double result = std::max({maxXY, r1,r2});
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)
std::vector< G4TwoVector > containerSubtractionEdge
Vector of x,y coordinates for the container subtraction volume.
std::vector< G4TwoVector > beamPipeInnerEdge
Vector of x,y coordinates for beam pipe inner edge.
G4double extentY
Extents prepared by GeneratePoints function as only it knows the extents.
G4double extentX
Extents prepared by GeneratePoints function as only it knows the extents.
std::vector< G4TwoVector > vacuumEdge
Vector of x,y coordinates for vacuum extruded solid edge.
std::vector< G4TwoVector > containerEdge
Vector of x,y coordinates for the container volume.
std::vector< G4TwoVector > beamPipeOuterEdge
Vector of x,y coordinates for beam pipe outer edge.
G4double lengthSafetyLarge
Cache of global constants variable.