18#ifndef BDSBEAMPIPEFACTORYPOINTS_H
19#define BDSBEAMPIPEFACTORYPOINTS_H
21#include "BDSBeamPipeFactoryBase.hh"
22#include "BDSBeamPipe.hh"
25#include "G4TwoVector.hh"
59 G4Material* vacuumMaterialIn,
60 G4double beamPipeThicknessIn,
61 G4Material* beamPipeMaterialIn,
62 const G4String& pointsFileIn =
"",
63 const G4String& pointsUnitIn =
"");
68 const G4ThreeVector& inputFaceNormalIn,
69 const G4ThreeVector& outputFaceNormalIn,
74 G4Material* vacuumMaterialIn,
75 G4double beamPipeThicknessIn,
76 G4Material* beamPipeMaterialIn,
77 const G4String& pointsFileIn =
"",
78 const G4String& pointsUnitIn =
"");
88 G4double beamPipeThickness,
89 G4int pointsPerTwoPi = 40) = 0;
100 G4double beamPipeThickness) = 0;
105 void AppendPoint(std::vector<G4TwoVector>& vec,
113 G4double finishAngle,
116 G4double xOffset = 0,
117 G4double yOffset = 0);
122 G4double finishAngle,
126 G4double xOffset = 0,
127 G4double yOffset = 0);
176 G4bool buildLongForIntersection =
false);
181 const G4ThreeVector& inputFace,
182 const G4ThreeVector& outputFace);
187 G4Material* vacuumMaterialIn,
188 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.