BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Attributes
BDSFieldMagMultipoleOuter Class Reference

A simple parameterisation of N-Pole outer yoke magnetic field. More...

#include <BDSFieldMagMultipoleOuter.hh>

Inheritance diagram for BDSFieldMagMultipoleOuter:
Inheritance graph
Collaboration diagram for BDSFieldMagMultipoleOuter:
Collaboration graph

Public Member Functions

 BDSFieldMagMultipoleOuter (G4int orderIn, G4double poleTipRadius, const BDSFieldMag *innerFieldIn, G4bool kPositive, G4double bRho, G4double arbitraryScaling=1.0)
 
virtual G4ThreeVector GetField (const G4ThreeVector &position, const double t=0) const
 Access the field value. More...
 
- Public Member Functions inherited from BDSFieldMag
 BDSFieldMag ()
 
 BDSFieldMag (G4Transform3D transformIn)
 
virtual G4ThreeVector GetField (const G4ThreeVector &position, const G4double t=0) const =0
 
virtual void GetFieldValue (const G4double point[4], G4double *field) const
 
virtual G4ThreeVector GetFieldTransformed (const G4ThreeVector &position, const G4double t) const
 Get the field value after applying transform for local offset. More...
 
virtual void SetTransform (const G4Transform3D &transformIn)
 
G4bool FiniteStrength () const
 Accessor. More...
 

Private Attributes

const G4int order
 N-poles / 2. More...
 
G4double phiOffset
 Tilt in XY calculated from B vector of inner field. if B0=(0,1,0), phiOffset=0. More...
 
G4double spatialLimit
 Radius from any current source within which the field is artificially saturated. More...
 
G4double normalisation
 Storage of the overall normalisation factor. More...
 
G4bool positiveField
 Sign of magnetic field. More...
 
G4int poleNOffset
 Offset for pole to start at - in effect this flips the sign of the field. More...
 
G4double poleTipRadius
 Radius of transition between inner and outer fields. More...
 
std::vector< G4TwoVector > currents
 Locations of infinite wire current sources. More...
 
G4double maxField
 Any field beyond this will curtailed to this value. More...
 
G4bool initialisationPhase
 Need a way to control cludge normalisation behaviour during initial normalisation calculation. More...
 

Additional Inherited Members

- Protected Attributes inherited from BDSFieldMag
G4bool finiteStrength
 Flag to cache whether finite nor not. More...
 
G4Transform3D transform
 Transform to apply for the field relative to the local coordinates of the geometry. More...
 

Detailed Description

A simple parameterisation of N-Pole outer yoke magnetic field.

Field that roughly approximates the field in a yoke of an n-pole magnet. The field is generated by the linear sum of infinitely long wire current sources along +-z (local) placed at a radius of poleTipRadius according to the order of the magnet. Note, these current sources are placed exactly in between the pole will be for each type of magnet. The field is normalised to the field at the pole tip radius given innerFieldIn.

If a point close (< 6mm) to a pole is queried, the field is capped at the normalised value at the pole tip - assumed to be the highest value.

This field of course does not accurately represent the field in the yoke of a magnet as it neglects the permeability and the geometry, however, it is a 1st order approximation.

Does not own or delete the BDSFieldMag* innerFieldIn argument.

Author
Laurie Nevay

Definition at line 55 of file BDSFieldMagMultipoleOuter.hh.

Constructor & Destructor Documentation

◆ BDSFieldMagMultipoleOuter()

BDSFieldMagMultipoleOuter::BDSFieldMagMultipoleOuter ( G4int  orderIn,
G4double  poleTipRadius,
const BDSFieldMag innerFieldIn,
G4bool  kPositive,
G4double  bRho,
G4double  arbitraryScaling = 1.0 
)

Definition at line 33 of file BDSFieldMagMultipoleOuter.cc.

◆ ~BDSFieldMagMultipoleOuter()

virtual BDSFieldMagMultipoleOuter::~BDSFieldMagMultipoleOuter ( )
inlinevirtual

Definition at line 65 of file BDSFieldMagMultipoleOuter.hh.

Member Function Documentation

◆ GetField()

G4ThreeVector BDSFieldMagMultipoleOuter::GetField ( const G4ThreeVector &  position,
const double  t = 0 
) const
virtual

Access the field value.

Definition at line 131 of file BDSFieldMagMultipoleOuter.cc.

References currents, initialisationPhase, maxField, normalisation, poleNOffset, positiveField, and spatialLimit.

Referenced by BDSFieldMagMultipoleOuterDual::GetField().

Here is the caller graph for this function:

Field Documentation

◆ currents

std::vector<G4TwoVector> BDSFieldMagMultipoleOuter::currents
private

Locations of infinite wire current sources.

Definition at line 79 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().

◆ initialisationPhase

G4bool BDSFieldMagMultipoleOuter::initialisationPhase
private

Need a way to control cludge normalisation behaviour during initial normalisation calculation.

Definition at line 81 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().

◆ maxField

G4double BDSFieldMagMultipoleOuter::maxField
private

Any field beyond this will curtailed to this value.

Definition at line 80 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().

◆ normalisation

G4double BDSFieldMagMultipoleOuter::normalisation
private

Storage of the overall normalisation factor.

Definition at line 75 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().

◆ order

const G4int BDSFieldMagMultipoleOuter::order
private

N-poles / 2.

Definition at line 72 of file BDSFieldMagMultipoleOuter.hh.

◆ phiOffset

G4double BDSFieldMagMultipoleOuter::phiOffset
private

Tilt in XY calculated from B vector of inner field. if B0=(0,1,0), phiOffset=0.

Definition at line 73 of file BDSFieldMagMultipoleOuter.hh.

◆ poleNOffset

G4int BDSFieldMagMultipoleOuter::poleNOffset
private

Offset for pole to start at - in effect this flips the sign of the field.

Definition at line 77 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().

◆ poleTipRadius

G4double BDSFieldMagMultipoleOuter::poleTipRadius
private

Radius of transition between inner and outer fields.

Definition at line 78 of file BDSFieldMagMultipoleOuter.hh.

◆ positiveField

G4bool BDSFieldMagMultipoleOuter::positiveField
private

Sign of magnetic field.

Definition at line 76 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().

◆ spatialLimit

G4double BDSFieldMagMultipoleOuter::spatialLimit
private

Radius from any current source within which the field is artificially saturated.

Definition at line 74 of file BDSFieldMagMultipoleOuter.hh.

Referenced by GetField().


The documentation for this class was generated from the following files: