20#include "BDSExtent.hh"
21#include "BDSMagnetOuterFactoryPolesFacetCommon.hh"
24#include "G4Polyhedra.hh"
25#include "G4SubtractionSolid.hh"
34 poleIntersectionStartAngle(0),
38BDSMagnetOuterFactoryPolesFacetCommon::~BDSMagnetOuterFactoryPolesFacetCommon()
50 G4double magnetContainerLength,
51 G4double magnetContainerRadiusIn)
53 G4double zPlanesMagCont[2] = {-magnetContainerLength*0.5, magnetContainerLength*0.5};
54 G4double zPlanesCont[2] = {-length*0.5, length*0.5};
56 G4double zPlanesLong[2] = {-length, length};
59 G4double zeroRadii[2] = {0,0};
61 G4double poleEndRadii[2] = {poleEnd, poleEnd};
62 G4int numberOfSides = (G4int)
factor*2*order;
68 yokeSolid =
new G4Polyhedra(name +
"_yoke_solid",
88 G4double contInnerRadii[2] = {0, 0};
90 G4VSolid* containerOuterSolid =
new G4Polyhedra(name +
"_container_outer_solid",
99 G4VSolid* containerInnerSolid =
new G4Tubs(name +
"_container_solid",
106 allSolids.insert(containerOuterSolid);
107 allSolids.insert(containerInnerSolid);
109 containerSolid =
new G4SubtractionSolid(name +
"_container_solid",
111 containerInnerSolid);
113 G4double magContOuterRadii[2] = {magnetContainerRadiusIn, magnetContainerRadiusIn};
114 magnetContainerSolid =
new G4Polyhedra(name +
"_container_solid",
124 magContExtent =
BDSExtent(magnetContainerRadiusIn,
125 magnetContainerRadiusIn,
126 magnetContainerLength*0.5);
Holder for +- extents in 3 dimensions.
G4double lengthSafety
Cache of global constants variable.
G4double lengthSafetyLarge
Cache of global constants variable.
G4VSolid * yokeSolid
Solid for outer part that connects all poles.
Factory class for outer volume of magnets. Produces magnets with 2N-poles around the beampipe with a ...
G4double yokeFinishRadius
Finish radius of yoke geometry from magnet centre - less than horizontalWidth.
G4double segmentAngle
2PI / # of poles - angle per segment allocated for each pole.
G4VSolid * poleIntersectionSolid
Solid used to chop off pole.
G4double poleStartRadius
Start radius of the pole from magnet centre.
G4double yokeStartRadius
Start radius of yoke geometry from magnet cetnre.
BDSMagnetOuterFactoryPolesFacetCommon()
Private constructor to force use of supplied one.
G4double polyStartAngle
Start angle for polyhedra.
virtual void CreateYokeAndContainerSolid(const G4String &name, G4double length, G4int order, G4double magnetContainerLength, G4double magnetContainerRadiusIn)
Create yoke that connects poles and container to put them in.
virtual void CalculateStartAngles()
Calculate start angle of polyhedra based on order and segment angle.
G4double factor
Factor by which number of polyhedra vertices is multiplied by.
G4double poleIntersectionStartAngle
Start angle for pole intersection.