19#include "BDSAperturePointsLoader.hh"
20#include "BDSBeamPipeFactoryPointsFile.hh"
23#include "G4TwoVector.hh"
28BDSBeamPipeFactoryPointsFile::BDSBeamPipeFactoryPointsFile():
33 G4double beamPipeThickness, G4int)
41 vacuumEdge = std::vector<G4TwoVector>(rawPoints->begin(), rawPoints->end());
54 std::vector<G4TwoVector> vertexNormals;
64 for (G4int i = 0; i < (G4int)
vacuumEdge.size(); i++)
83 auto normal1 = v2 - v1;
84 auto normal2 = v3 - v2;
85 normal1.rotate(-CLHEP::halfpi);
86 normal2.rotate(-CLHEP::halfpi);
88 auto vertexNormal = (normal1 + normal2).unit();
90 vertexNormals.push_back(vertexNormal);
93 for (G4int i = 0; i < (G4int)
vacuumEdge.size(); i++)
95 auto ur = vertexNormals[i];
106 return maximumRadius*1.01;
110 const G4TwoVector& v2)
const
112 G4double det = v1.x()*v2.y() - v2.x()*v1.y();
G4double Determinant(const G4TwoVector &v1, const G4TwoVector &v2) const
Calculate the determinant of 2x G4TwoVectors.
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.
virtual void GeneratePoints(G4double, G4double, G4double, G4double, G4double beamPipeThickness, G4int=40)
Purely to fulfill interface - should not be used!
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.
std::vector< G4TwoVector > vacuumEdge
Vector of x,y coordinates for vacuum extruded solid edge.
G4String pointsFile
Temporary copy of input variables.
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.
G4String pointsUnit
Temporary copy of input variables.
G4double lengthSafetyLarge
Cache of global constants variable.
std::vector< G4TwoVector > * LoadAperturePoints(const G4String &fileName, const G4String &unit="")