BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Factory class for outer volume of magnets. Produces magnets with 2N-poles around the beampipe with a yoke of various shapes. More...
#include <BDSMagnetOuterFactoryPolesBase.hh>
Public Member Functions | |
BDSMagnetOuterFactoryPolesBase (G4double poleStopFactorIn) | |
virtual BDSMagnetOuter * | CreateSectorBend (G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
sector bend outer volume More... | |
virtual BDSMagnetOuter * | CreateRectangularBend (G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
rectangular bend outer volume More... | |
virtual BDSMagnetOuter * | CreateQuadrupole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
quadrupole outer volume More... | |
virtual BDSMagnetOuter * | CreateSextupole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
sextupole outer volume More... | |
virtual BDSMagnetOuter * | CreateOctupole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
octupole outer volume More... | |
virtual BDSMagnetOuter * | CreateDecapole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
decapole outer volume More... | |
virtual BDSMagnetOuter * | CreateSolenoid (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
solenoid outer volume More... | |
virtual BDSMagnetOuter * | CreateMultipole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
general multipole outer volume - could be any 2N order multipole More... | |
virtual BDSMagnetOuter * | CreateRfCavity (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
RF cavity outer volume. More... | |
virtual BDSMagnetOuter * | CreateMuonSpoiler (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe) |
muon spoiler outer volume More... | |
virtual BDSMagnetOuter * | CreateKicker (G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, G4bool vertical) |
horizontal and vertical kicker outer volume More... | |
![]() | |
virtual BDSMagnetOuter * | CreateSectorBend (G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
sector bend outer volume More... | |
virtual BDSMagnetOuter * | CreateRectangularBend (G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
rectangular bend outer volume More... | |
virtual BDSMagnetOuter * | CreateQuadrupole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
quadrupole outer volume More... | |
virtual BDSMagnetOuter * | CreateSextupole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
sextupole outer volume More... | |
virtual BDSMagnetOuter * | CreateOctupole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
octupole outer volume More... | |
virtual BDSMagnetOuter * | CreateDecapole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
decapole outer volume More... | |
virtual BDSMagnetOuter * | CreateSolenoid (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
solenoid outer volume More... | |
virtual BDSMagnetOuter * | CreateMultipole (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
general multipole outer volume - could be any 2N order multipole More... | |
virtual BDSMagnetOuter * | CreateRfCavity (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
RF cavity outer volume. More... | |
virtual BDSMagnetOuter * | CreateMuonSpoiler (G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)=0 |
muon spoiler outer volume More... | |
virtual BDSMagnetOuter * | CreateKicker (G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, G4bool vertical)=0 |
horizontal and vertical kicker outer volume More... | |
virtual void | CleanUp () |
Empty containers for next use - factories are never deleted so can't rely on scope. More... | |
void | CleanUpBase () |
Non-virtual clean up that can be used in the constructor. More... | |
virtual | ~BDSMagnetOuterFactoryBase () |
Virtual base destructor. More... | |
![]() | |
virtual void | FactoryBaseCleanUp () |
Empty containers for next use - factories are never deleted so can't rely on scope. More... | |
Protected Member Functions | |
virtual void | CleanUp () |
Empty containers for next use - this class is never deleted so can't rely on scope. More... | |
void | CleanUpPolesBase () |
Non-virtual clean up to be used in constructor. More... | |
virtual BDSMagnetOuter * | CommonConstructor (const G4String &name, G4double length, BDSBeamPipe *beamPipe, G4int order, G4double magnetContainerLength, const BDSMagnetOuterInfo *recipe) |
Common construction tasks to all methods - assemble yoke and poles in container. More... | |
virtual void | CalculatePoleAndYoke (G4double horizontalWidth, BDSBeamPipe *beamPipe, G4int order) |
virtual void | CreatePoleSolid (const G4String &name, G4double length, G4int order) |
virtual void | CreateCoilSolids (const G4String &name, G4double length) |
Create the coil solids corresponding to the pole solid. More... | |
virtual void | CreateCoilPoints () |
Create all the points that make up the extruded solid of the pole. More... | |
virtual void | CreateYokeAndContainerSolid (const G4String &name, G4double length, G4int order, G4double magnetContainerLength, G4double magnetContainerRadiusIn) |
virtual void | IntersectPoleWithYoke (const G4String &name, G4double length, G4int order) |
Chop off the top of the pole to match the appropriate yoke geometry. More... | |
virtual void | CreateLogicalVolumes (const G4String &name, G4Colour *colour, G4Material *outerMaterial) |
virtual void | CreateLogicalVolumesCoil (const G4String &name) |
virtual void | CreateEndPiece (const G4String &name) |
virtual void | PlaceComponents (const G4String &name, G4int order) |
Place the poles and yoke in the container volume. More... | |
virtual void | PlaceComponentsCoils (const G4String &name, G4int order) |
If we're building coils, place two coils for each pole. More... | |
void | TestCoilFractions (G4double &coilWidthFraction, G4double &coilHeightFraction) |
void | DipoleCommonPreConstruction (const G4String &name, G4double angleIn, G4double angleOut, G4double length, G4double &horizontalWidth, G4Material *&material, G4double &vhRatio) |
void | DipoleCalculations (G4bool hStyle, G4bool buildVertically, const BDSBeamPipe *beamPipe, G4double length, G4double horizontalWidth, G4double angleIn, G4double angleOut, G4double yokeThicknessFraction, G4double vhRatio, G4double coilWidthFraction, G4double coilHeightFraction, G4double &cShapeOuterEdge, G4double &poleHalfGap, G4double &poleWidth, G4double &poleHeight, G4double &yokeWidth, G4double &yokeHalfHeight, G4double &yokeThickness, G4double &yokeOverHang, G4double &coilWidth, G4double &coilHeightIn, G4double &coilToYokeGap, G4double &coilToPoleGap, G4double &sLength, G4double &containerSLength, G4double &intersectionRadius) |
std::vector< G4ThreeVector > | CalculateCoilDisplacements (G4double poleHalfWidthIn, G4double poleHalfGapIn, G4double coilWidthIn, G4double coilHeightIn, G4double cDY, G4double &coilDY) |
BDSMagnetOuter * | CreateDipoleC (const G4String &name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, G4bool buildVertically) |
BDSMagnetOuter * | CreateDipoleH (const G4String &name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, G4bool buildVertically) |
Routine to construct an H shaped dipole magnet and can optionally be built vertically. More... | |
BDSMagnetOuter * | DipoleCommonConstruction (const G4String &name, G4double horizontalWidth, G4bool buildEndPiece, G4double coilWidth, G4double length, G4double containerLength, G4double sLength, G4double angleIn, G4double angleOut, G4Colour *colour, G4Material *material, std::vector< G4ThreeVector > &coilDisps, G4bool buildVertically, BDSExtent &ext, G4double poleHalfWidth, G4double poleHalfGap, G4double cDY, G4double coilDY, G4double intersectionRadius) |
![]() | |
virtual void | CreateLogicalVolumes (const G4String &name, G4Colour *colour, G4Material *outerMaterial) |
virtual void | SetUserLimits () |
Attach default user limits to all logical volumes. More... | |
void | BuildMagnetContainerSolidAngled (const G4String &name, G4double magnetContainerLength, G4double magnetContainerRadius, G4bool flatFaces=false) |
void | BuildMagnetContainerSolidStraight (const G4String &name, G4double magnetContainerLength, G4double magnetContainerRadius) |
void | CreateMagnetContainerComponent () |
void | SetFaceNormals (BDSMagnetOuter *outer) |
Copy face normals from members to an instance of outer. More... | |
Protected Attributes | |
const G4double | poleFraction |
const G4double | poleAngularFraction |
Fraction of 2pi/Npoles that the pole will occupy - always < 1. More... | |
const G4double | poleTipFraction |
const G4double | poleAnnulusFraction |
const G4double | bendHeightFraction |
const G4double | poleStopFactor |
G4double | yokeStartRadius |
Start radius of yoke geometry from magnet cetnre. More... | |
G4double | yokeFinishRadius |
Finish radius of yoke geometry from magnet centre - less than horizontalWidth. More... | |
G4double | magnetContainerRadius |
Radius of the container solid for the outer geometry. More... | |
G4bool | buildPole |
Whether or not to build poles (and therefore coils). More... | |
G4double | poleStartRadius |
Start radius of the pole from magnet centre. More... | |
G4double | poleFinishRadius |
Finish radius of the pole from magnet centre. More... | |
G4double | poleSquareWidth |
Full width of pole in constant width section. More... | |
G4double | poleSquareStartRadius |
Radius from magnet centre that constant width section starts. More... | |
G4double | segmentAngle |
2PI / # of poles - angle per segment allocated for each pole. More... | |
G4double | poleAngle |
The angle allowed for the pole to occupy - less than segmentAngle. More... | |
G4ThreeVector | poleTranslation |
Offste of pole for placement from magnet centre. More... | |
G4double | coilHeight |
Height along y for coil for coil beside 1 upgright pole aligned with y axis. More... | |
G4double | coilCentreRadius |
Radius from magnet centre that the centre of the coils exist at. More... | |
G4double | endPieceLength |
Length of the coil end piece along what will be curvilinear S. More... | |
G4double | endPieceInnerR |
Inner radius for end piece container. More... | |
G4double | endPieceOuterR |
Outer radius for end piece container. More... | |
G4VSolid * | poleIntersectionSolid |
Solid used to chop off pole. More... | |
G4VSolid * | coilLeftSolid |
Left coil solid for one pole built upright along y axis. More... | |
G4VSolid * | coilRightSolid |
Right coil solid. More... | |
G4VSolid * | endPieceContainerSolid |
End piece container solid. More... | |
G4LogicalVolume * | coilLeftLV |
Logical volume for left coil. More... | |
G4LogicalVolume * | coilRightLV |
Logical volume for right coil. More... | |
G4LogicalVolume * | endPieceCoilLV |
Logical volume for end piece single coil piece. More... | |
G4LogicalVolume * | endPieceContainerLV |
Logical volume for end piece container. More... | |
BDSSimpleComponent * | endPiece |
Fully constructed end piece. More... | |
std::vector< G4TwoVector > | leftPoints |
Vector of 2D points for left coil. More... | |
std::vector< G4TwoVector > | rightPoints |
Vector of 2D points for right coil. More... | |
std::vector< G4TwoVector > | endPiecePoints |
Vector of 2D points for end piece looking from above down z. More... | |
BDSMagnetOuterFactoryBase * | cylindrical |
Default factory to fall back to. More... | |
![]() | |
G4VSolid * | poleSolid |
Solid for an individual pole that will be placed multiple times. More... | |
G4VSolid * | yokeSolid |
Solid for outer part that connects all poles. More... | |
G4VSolid * | containerSolid |
G4VSolid * | magnetContainerSolid |
G4LogicalVolume * | poleLV |
G4LogicalVolume * | yokeLV |
G4LogicalVolume * | containerLV |
G4LogicalVolume * | magnetContainerLV |
G4VPhysicalVolume * | yokePV |
G4VisAttributes * | outerVisAttributes |
BDSExtent | magContExtent |
BDSGeometryComponent * | magnetContainer |
G4ThreeVector | inputFaceNormal |
G4ThreeVector | outputFaceNormal |
G4bool | sensitiveOuter |
Cache of global constants variable. More... | |
![]() | |
std::set< G4LogicalVolume * > | allLogicalVolumes |
std::set< G4VPhysicalVolume * > | allPhysicalVolumes |
std::set< G4RotationMatrix * > | allRotationMatrices |
std::set< G4UserLimits * > | allUserLimits |
std::set< G4VSolid * > | allSolids |
std::set< G4VisAttributes * > | allVisAttributes |
G4double | lengthSafety |
Cache of global constants variable. More... | |
G4double | lengthSafetyLarge |
Cache of global constants variable. More... | |
G4bool | checkOverlaps |
Cache of global constants variable. More... | |
G4bool | visDebug |
Cache of global constants variable. More... | |
G4double | nSegmentsPerCircle |
Cache of global constants variable. More... | |
G4VisAttributes * | containerVisAttr |
Cache of global constants variable. More... | |
G4UserLimits * | defaultUserLimits |
Cache of global constants variable. More... | |
Factory class for outer volume of magnets. Produces magnets with 2N-poles around the beampipe with a yoke of various shapes.
Most magnets are 2N poles, but sector and r-bends as well as muon spoilers, and h/v kickers are unique.
NOTE this is a base class in that there are derived classes with different outer shapes - all have poles, but the return yoke can for example, circular, square or faceted (with 4N facets)
Definition at line 49 of file BDSMagnetOuterFactoryPolesBase.hh.
BDSMagnetOuterFactoryPolesBase::BDSMagnetOuterFactoryPolesBase | ( | ) |
Definition at line 58 of file BDSMagnetOuterFactoryPolesBase.cc.
|
explicit |
Definition at line 70 of file BDSMagnetOuterFactoryPolesBase.cc.
|
virtual |
Definition at line 65 of file BDSMagnetOuterFactoryPolesBase.cc.
|
protected |
Calculate the placement offsets for each of the four coil placements. Common to both dipole construction routines.
Definition at line 956 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSFactoryBase::lengthSafetyLarge.
Referenced by CreateDipoleC(), and CreateDipoleH().
|
protectedvirtual |
Calculate the length of the pole and yoke radii based on the design. This is only responsible for calculating the gross proportions of the yoke and pole, not all the geometrical parameters that may be required for the final geometry.
Definition at line 302 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, BDSBeamPipe::GetContainerRadius(), BDSFactoryBase::lengthSafety, BDSFactoryBase::lengthSafetyLarge, magnetContainerRadius, poleAngle, poleAngularFraction, poleFinishRadius, poleFraction, poleSquareWidth, poleStartRadius, segmentAngle, yokeFinishRadius, and yokeStartRadius.
Referenced by CommonConstructor().
|
protectedvirtual |
Empty containers for next use - this class is never deleted so can't rely on scope.
Reimplemented from BDSMagnetOuterFactoryBase.
Reimplemented in BDSMagnetOuterFactoryPolesSquare.
Definition at line 85 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::CleanUp(), and CleanUpPolesBase().
Referenced by BDSMagnetOuterFactoryPolesSquare::CleanUp(), CommonConstructor(), and DipoleCommonPreConstruction().
|
protected |
Non-virtual clean up to be used in constructor.
Definition at line 91 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, coilCentreRadius, coilHeight, coilLeftLV, coilLeftSolid, coilRightLV, coilRightSolid, endPiece, endPieceCoilLV, endPieceContainerLV, endPieceContainerSolid, endPieceInnerR, endPieceLength, endPieceOuterR, endPiecePoints, leftPoints, magnetContainerRadius, poleAngle, poleFinishRadius, poleIntersectionSolid, poleSquareStartRadius, poleSquareWidth, poleStartRadius, poleTranslation, rightPoints, segmentAngle, yokeFinishRadius, and yokeStartRadius.
Referenced by CleanUp().
|
protectedvirtual |
Common construction tasks to all methods - assemble yoke and poles in container.
functions below here are private to this particular factory
Reimplemented in BDSMagnetOuterFactoryPolesSquare.
Definition at line 233 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, CalculatePoleAndYoke(), CleanUp(), CreateCoilSolids(), CreateEndPiece(), CreateLogicalVolumes(), CreatePoleSolid(), CreateYokeAndContainerSolid(), endPiece, BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), IntersectPoleWithYoke(), BDSFactoryBase::lengthSafety, magnetContainerRadius, PlaceComponents(), PlaceComponentsCoils(), BDSGeometryComponent::RegisterLogicalVolume(), BDSGeometryComponent::RegisterPhysicalVolume(), BDSGeometryComponent::RegisterRotationMatrix(), BDSGeometryComponent::RegisterSensitiveVolume(), BDSGeometryComponent::RegisterVisAttributes(), BDSMagnetOuterFactoryBase::sensitiveOuter, BDSMagnetOuterFactoryBase::SetFaceNormals(), and BDSMagnetOuterFactoryBase::SetUserLimits().
Referenced by BDSMagnetOuterFactoryPolesSquare::CommonConstructor(), CreateDecapole(), CreateOctupole(), CreateQuadrupole(), and CreateSextupole().
|
protectedvirtual |
Create all the points that make up the extruded solid of the pole.
Definition at line 443 of file BDSMagnetOuterFactoryPolesBase.cc.
References coilCentreRadius, coilHeight, endPieceInnerR, endPieceLength, endPieceOuterR, endPiecePoints, leftPoints, BDSFactoryBase::lengthSafetyLarge, poleFinishRadius, poleSquareStartRadius, poleSquareWidth, rightPoints, segmentAngle, and yokeStartRadius.
Referenced by CreateCoilSolids().
|
protectedvirtual |
Create the coil solids corresponding to the pole solid.
Definition at line 416 of file BDSMagnetOuterFactoryPolesBase.cc.
References coilLeftSolid, coilRightSolid, CreateCoilPoints(), leftPoints, BDSFactoryBase::lengthSafety, and rightPoints.
Referenced by CommonConstructor().
|
virtual |
decapole outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 174 of file BDSMagnetOuterFactoryPolesBase.cc.
References CommonConstructor().
|
protected |
Routine to construct a C shaped dipole magnet with the yoke either to the left or right and can optionally be built vertically.
Definition at line 979 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, CalculateCoilDisplacements(), coilHeight, DipoleCalculations(), DipoleCommonPreConstruction(), BDSFactoryBase::lengthSafety, BDSFactoryBase::lengthSafetyLarge, BDS::Rotate(), TestCoilFractions(), and BDSMagnetOuterFactoryBase::yokeSolid.
Referenced by CreateKicker(), CreateRectangularBend(), and CreateSectorBend().
|
protected |
Routine to construct an H shaped dipole magnet and can optionally be built vertically.
Definition at line 1217 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, CalculateCoilDisplacements(), coilHeight, DipoleCalculations(), DipoleCommonPreConstruction(), BDSFactoryBase::lengthSafetyLarge, BDS::Rotate(), TestCoilFractions(), and BDSMagnetOuterFactoryBase::yokeSolid.
Referenced by CreateKicker(), CreateRectangularBend(), and CreateSectorBend().
|
protectedvirtual |
Create the solids, logical volumes for the end piece - everything but the placement. Also, create the geometry component now.
Definition at line 714 of file BDSMagnetOuterFactoryPolesBase.cc.
References coilHeight, coilLeftLV, BDSFactoryBase::defaultUserLimits, endPiece, endPieceCoilLV, endPieceContainerLV, endPieceContainerSolid, endPieceInnerR, endPieceLength, endPieceOuterR, endPiecePoints, BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), BDSGeometryComponent::RegisterLogicalVolume(), BDSGeometryComponent::RegisterSensitiveVolume(), BDSGeometryComponent::RegisterSolid(), BDSGeometryComponent::RegisterVisAttributes(), BDSMagnetOuterFactoryBase::sensitiveOuter, and BDSGeometryComponent::SetInnerExtent().
Referenced by CommonConstructor().
|
virtual |
horizontal and vertical kicker outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 219 of file BDSMagnetOuterFactoryPolesBase.cc.
References CreateDipoleC(), CreateDipoleH(), and BDSMagnetOuterInfo::hStyle.
|
protectedvirtual |
Create logical volumes for yoke, container and magnet container - derived classes can override to extend as they need.
Reimplemented from BDSMagnetOuterFactoryBase.
Reimplemented in BDSMagnetOuterFactoryPolesSquare.
Definition at line 552 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::CreateLogicalVolumes(), and CreateLogicalVolumesCoil().
Referenced by CommonConstructor().
|
protectedvirtual |
Discretise the coil logical volumes as even though derived factories from this one may complete override CreateLogicalVolumes as the poles can be individually unique, the coils will be the same and this allows reuse of code and lack of duplication.
Definition at line 560 of file BDSMagnetOuterFactoryPolesBase.cc.
References coilLeftLV, coilLeftSolid, coilRightLV, coilRightSolid, BDSFactoryBase::defaultUserLimits, BDSColours::GetColour(), BDSMaterials::GetMaterial(), BDSColours::Instance(), and BDSMaterials::Instance().
Referenced by CreateLogicalVolumes(), and BDSMagnetOuterFactoryPolesSquare::CreateLogicalVolumes().
|
virtual |
general multipole outer volume - could be any 2N order multipole
Implements BDSMagnetOuterFactoryBase.
Definition at line 192 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::CreateMultipole(), and cylindrical.
|
virtual |
muon spoiler outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 210 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::CreateMuonSpoiler(), and cylindrical.
|
virtual |
octupole outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 165 of file BDSMagnetOuterFactoryPolesBase.cc.
References CommonConstructor().
|
protectedvirtual |
Create pole for magnet of order N where npoles = Nx2. This contains some calcultion of geometrical parameters pertinent to the exact geometry being required. NOTE the poles are not joined (boolean union) to the outer yoke - there is a gap of length safety. This won't affect physics results and speeds up tracking as the solid is not a boolean of order Npoles + 1.
Definition at line 341 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSFactoryBase::lengthSafety, poleAngle, poleFinishRadius, BDSMagnetOuterFactoryBase::poleSolid, poleSquareStartRadius, poleSquareWidth, poleStartRadius, poleStopFactor, and poleTipFraction.
Referenced by CommonConstructor().
|
virtual |
quadrupole outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 147 of file BDSMagnetOuterFactoryPolesBase.cc.
References CommonConstructor().
|
virtual |
rectangular bend outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 135 of file BDSMagnetOuterFactoryPolesBase.cc.
References CreateDipoleC(), CreateDipoleH(), and BDSMagnetOuterInfo::hStyle.
|
virtual |
RF cavity outer volume.
Implements BDSMagnetOuterFactoryBase.
Definition at line 201 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::CreateRfCavity(), and cylindrical.
|
virtual |
sector bend outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 123 of file BDSMagnetOuterFactoryPolesBase.cc.
References CreateDipoleC(), CreateDipoleH(), and BDSMagnetOuterInfo::hStyle.
|
virtual |
sextupole outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 156 of file BDSMagnetOuterFactoryPolesBase.cc.
References CommonConstructor().
|
virtual |
solenoid outer volume
Implements BDSMagnetOuterFactoryBase.
Definition at line 183 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::CreateSolenoid(), and cylindrical.
|
protectedvirtual |
Create yoke that connects poles and container to put them in. Also create the poleIntersectionSolid that will be used to chop the extended pole in IntersectPoleWithYoke().
Reimplemented in BDSMagnetOuterFactoryPolesFacetCommon, and BDSMagnetOuterFactoryPolesSquare.
Definition at line 504 of file BDSMagnetOuterFactoryPolesBase.cc.
References BDSMagnetOuterFactoryBase::BuildMagnetContainerSolidStraight(), BDSFactoryBase::lengthSafety, BDSFactoryBase::lengthSafetyLarge, poleIntersectionSolid, poleStartRadius, yokeFinishRadius, BDSMagnetOuterFactoryBase::yokeSolid, and yokeStartRadius.
Referenced by CommonConstructor().
|
protected |
Common calculations to both dipole construction routines in one place. Pass by reference to modify variables declared in each function.
Definition at line 807 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, BDS::CalculateSafeAngledVolumeLength(), BDSGeometryComponent::GetExtent(), and BDSFactoryBase::lengthSafetyLarge.
Referenced by CreateDipoleC(), and CreateDipoleH().
|
protected |
Definition at line 1429 of file BDSMagnetOuterFactoryPolesBase.cc.
|
protected |
Common task to both dipole construction routines. Clean up, test inputs and check if faces will intersect and warn user. Note reference to material pointer so it can be fixed if needs be to the default.
Definition at line 771 of file BDSMagnetOuterFactoryPolesBase.cc.
References CleanUp(), BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), and BDS::WillIntersect().
Referenced by CreateDipoleC(), and CreateDipoleH().
|
protectedvirtual |
Chop off the top of the pole to match the appropriate yoke geometry.
Reimplemented in BDSMagnetOuterFactoryPolesSquare.
Definition at line 542 of file BDSMagnetOuterFactoryPolesBase.cc.
References poleIntersectionSolid, and BDSMagnetOuterFactoryBase::poleSolid.
Referenced by CommonConstructor().
|
protectedvirtual |
Place the poles and yoke in the container volume.
Reimplemented in BDSMagnetOuterFactoryPolesSquare.
Definition at line 610 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, BDSFactoryBase::checkOverlaps, poleTranslation, and segmentAngle.
Referenced by CommonConstructor().
|
protectedvirtual |
If we're building coils, place two coils for each pole.
Definition at line 648 of file BDSMagnetOuterFactoryPolesBase.cc.
References buildPole, BDSFactoryBase::checkOverlaps, coilCentreRadius, coilLeftLV, coilRightLV, endPiece, endPieceCoilLV, endPieceContainerLV, endPieceLength, BDSGeometryComponent::RegisterPhysicalVolume(), BDSGeometryComponent::RegisterRotationMatrix(), and segmentAngle.
Referenced by CommonConstructor().
|
protected |
Ensure the coil fractions lie with [0.05, 0.98] and if they're negative set them to a provided default. -ve is assumed to require the default parameter and allows different usages of the function (in C and H dipoles) to control the defaults.
Definition at line 586 of file BDSMagnetOuterFactoryPolesBase.cc.
Referenced by CreateDipoleC(), and CreateDipoleH().
|
protected |
Bends are often wider in the bending plane. As we only have one parameter to pass which is outerDimaeter, make the non bending dimension a fixed (< 1) fraction of the outerDimaeter.
Definition at line 154 of file BDSMagnetOuterFactoryPolesBase.hh.
|
protected |
Whether or not to build poles (and therefore coils).
Definition at line 164 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), CommonConstructor(), CreateDipoleC(), CreateDipoleH(), DipoleCalculations(), PlaceComponents(), BDSMagnetOuterFactoryPolesSquare::PlaceComponents(), and PlaceComponentsCoils().
|
protected |
Radius from magnet centre that the centre of the coils exist at.
Definition at line 173 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and PlaceComponentsCoils().
|
protected |
Height along y for coil for coil beside 1 upgright pole aligned with y axis.
Definition at line 172 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), CreateDipoleC(), CreateDipoleH(), and CreateEndPiece().
|
protected |
Logical volume for left coil.
Definition at line 182 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateEndPiece(), CreateLogicalVolumesCoil(), and PlaceComponentsCoils().
|
protected |
Left coil solid for one pole built upright along y axis.
Definition at line 179 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilSolids(), and CreateLogicalVolumesCoil().
|
protected |
Logical volume for right coil.
Definition at line 183 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateLogicalVolumesCoil(), and PlaceComponentsCoils().
|
protected |
Right coil solid.
Definition at line 180 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilSolids(), and CreateLogicalVolumesCoil().
|
protected |
Default factory to fall back to.
Definition at line 356 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CreateMultipole(), CreateMuonSpoiler(), CreateRfCavity(), and CreateSolenoid().
|
protected |
Fully constructed end piece.
Definition at line 186 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CommonConstructor(), CreateEndPiece(), and PlaceComponentsCoils().
|
protected |
Logical volume for end piece single coil piece.
Definition at line 184 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateEndPiece(), and PlaceComponentsCoils().
|
protected |
Logical volume for end piece container.
Definition at line 185 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateEndPiece(), and PlaceComponentsCoils().
|
protected |
End piece container solid.
Definition at line 181 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), and CreateEndPiece().
|
protected |
Inner radius for end piece container.
Definition at line 175 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and CreateEndPiece().
|
protected |
Length of the coil end piece along what will be curvilinear S.
Definition at line 174 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), CreateEndPiece(), and PlaceComponentsCoils().
|
protected |
Outer radius for end piece container.
Definition at line 176 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and CreateEndPiece().
|
protected |
Vector of 2D points for end piece looking from above down z.
Definition at line 190 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and CreateEndPiece().
|
protected |
Vector of 2D points for left coil.
Definition at line 188 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and CreateCoilSolids().
|
protected |
Radius of the container solid for the outer geometry.
Definition at line 163 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), and CommonConstructor().
|
protected |
The angle allowed for the pole to occupy - less than segmentAngle.
Definition at line 170 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), and CreatePoleSolid().
|
protected |
Fraction of 2pi/Npoles that the pole will occupy - always < 1.
Definition at line 141 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke().
|
protected |
Fraction of length from pole tip to outerDiamter that the expanding section of the pole will take up. There's the tip, this bit, then a straight bit.
Definition at line 149 of file BDSMagnetOuterFactoryPolesBase.hh.
|
protected |
Finish radius of the pole from magnet centre.
Definition at line 166 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), CreateCoilPoints(), and CreatePoleSolid().
|
protected |
The fraction of the distance from the beam pipe to the horizontalWidth/2 that each pole will take - always < 1
Definition at line 138 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke().
|
protected |
Solid used to chop off pole.
Definition at line 178 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateYokeAndContainerSolid(), BDSMagnetOuterFactoryPolesFacetCommon::CreateYokeAndContainerSolid(), BDSMagnetOuterFactoryPolesSquare::CreateYokeAndContainerSolid(), IntersectPoleWithYoke(), and BDSMagnetOuterFactoryPolesSquare::IntersectPoleWithYoke().
|
protected |
Radius from magnet centre that constant width section starts.
Definition at line 168 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and CreatePoleSolid().
|
protected |
Full width of pole in constant width section.
Definition at line 167 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), CreateCoilPoints(), and CreatePoleSolid().
|
protected |
Start radius of the pole from magnet centre.
Definition at line 165 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), CreatePoleSolid(), CreateYokeAndContainerSolid(), BDSMagnetOuterFactoryPolesFacetCommon::CreateYokeAndContainerSolid(), and BDSMagnetOuterFactoryPolesSquare::CreateYokeAndContainerSolid().
|
protected |
Factor by which the pole length is multiplied for the raw pole length before it's intersected with the inside of the yoke. Where the pole would normally stop at yokeStartRadius - lengthSaftey, it runs to yokeStartRadius x poleStopFactor.
Definition at line 159 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CreatePoleSolid().
|
protected |
Fraction of length from pole tip to horizontalWidth that pole tip ellisoid will take up
Definition at line 145 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CreatePoleSolid().
|
protected |
Offste of pole for placement from magnet centre.
Definition at line 171 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), and PlaceComponents().
|
protected |
Vector of 2D points for right coil.
Definition at line 189 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CleanUpPolesBase(), CreateCoilPoints(), and CreateCoilSolids().
|
protected |
2PI / # of poles - angle per segment allocated for each pole.
Definition at line 169 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), BDSMagnetOuterFactoryPolesFacetCommon::CalculateStartAngles(), BDSMagnetOuterFactoryPolesFacetCrop::CalculateStartAngles(), CleanUpPolesBase(), CreateCoilPoints(), BDSMagnetOuterFactoryPolesSquare::IntersectPoleWithYoke(), PlaceComponents(), BDSMagnetOuterFactoryPolesSquare::PlaceComponents(), and PlaceComponentsCoils().
|
protected |
Finish radius of yoke geometry from magnet centre - less than horizontalWidth.
Definition at line 162 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), CreateYokeAndContainerSolid(), BDSMagnetOuterFactoryPolesFacetCommon::CreateYokeAndContainerSolid(), and BDSMagnetOuterFactoryPolesSquare::CreateYokeAndContainerSolid().
|
protected |
Start radius of yoke geometry from magnet cetnre.
Definition at line 161 of file BDSMagnetOuterFactoryPolesBase.hh.
Referenced by CalculatePoleAndYoke(), CleanUpPolesBase(), CreateCoilPoints(), CreateYokeAndContainerSolid(), BDSMagnetOuterFactoryPolesFacetCommon::CreateYokeAndContainerSolid(), and BDSMagnetOuterFactoryPolesSquare::CreateYokeAndContainerSolid().