19#ifndef BDSBEAMPIPEFACTORYPOINTS_H
20#define BDSBEAMPIPEFACTORYPOINTS_H
22#include "BDSBeamPipeFactoryBase.hh"
23#include "BDSBeamPipe.hh"
26#include "G4TwoVector.hh"
60 G4Material* vacuumMaterialIn,
61 G4double beamPipeThicknessIn,
62 G4Material* beamPipeMaterialIn,
63 const G4String& pointsFileIn =
"",
64 const G4String& pointsUnitIn =
"");
69 const G4ThreeVector& inputFaceNormalIn,
70 const G4ThreeVector& outputFaceNormalIn,
75 G4Material* vacuumMaterialIn,
76 G4double beamPipeThicknessIn,
77 G4Material* beamPipeMaterialIn,
78 const G4String& pointsFileIn =
"",
79 const G4String& pointsUnitIn =
"");
89 G4double beamPipeThickness,
90 G4int pointsPerTwoPi = 40) = 0;
101 G4double beamPipeThickness) = 0;
106 void AppendPoint(std::vector<G4TwoVector>& vec,
114 G4double finishAngle,
117 G4double xOffset = 0,
118 G4double yOffset = 0);
123 G4double finishAngle,
127 G4double xOffset = 0,
128 G4double yOffset = 0);
177 G4bool buildLongForIntersection =
false);
182 const G4ThreeVector& inputFace,
183 const G4ThreeVector& outputFace);
188 G4Material* vacuumMaterialIn,
189 G4Material* beamPipeMaterialIn,
Abstract base class for beampipe factory classes.
Factory for beam pipes defined by a series of x,y points that are extruded.
G4VSolid * beamPipeInnerSolid
Solid for inner surface of beam pipe.
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.
virtual void CleanUp()
Clear member vectors and run base class clean up to clear pointers between runs.
G4VSolid * beamPipeOuterSolid
Solid for outer surface of beam pipe.
virtual void GeneratePoints(G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness, G4int pointsPerTwoPi=40)=0
G4double extentY
Extents prepared by GeneratePoints function as only it knows the extents.
virtual G4double CalculateIntersectionRadius(G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness)=0
void CleanUpPoints()
Actual clean up here for this class only.
virtual BDSBeamPipe * CommonFinalConstruction(const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn, G4double lengthIn)
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.
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.
void CreateSolidsAngled(const G4String &name, G4double length, const G4ThreeVector &inputFace, const G4ThreeVector &outputFace)
Create angled solids. Uses CreateSolids() method.
void AppendAngle(std::vector< G4TwoVector > &vec, G4double startAngle, G4double finishAngle, G4double radius, G4int nPoints=10, G4double xOffset=0, G4double yOffset=0)
void CreateSolids(const G4String &name, G4double length, G4bool buildLongForIntersection=false)
G4String pointsFile
Temporary copy of input variables.
G4double intersectionRadius
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.
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.
A holder class for a piece of beam pipe geometry.