BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A simple parameterisation of N-Pole outer yoke magnetic field. More...
#include <BDSFieldMagMultipoleOuter.hh>
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. | |
![]() | |
BDSFieldMag () | |
BDSFieldMag (G4Transform3D transformIn) | |
virtual G4ThreeVector | GetField (const G4ThreeVector &position, const G4double t=0) const =0 |
virtual G4bool | TimeVarying () const |
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. | |
virtual void | SetTransform (const G4Transform3D &transformIn) |
void | SetModulator (BDSModulator *modulatorIn) |
Set the optional modulator. | |
G4bool | FiniteStrength () const |
Accessor. | |
Private Attributes | |
const G4int | order |
N-poles / 2. | |
G4double | phiOffset |
Tilt in XY calculated from B vector of inner field. if B0=(0,1,0), phiOffset=0. | |
G4double | spatialLimit |
Radius from any current source within which the field is artificially saturated. | |
G4double | normalisation |
Storage of the overall normalisation factor. | |
G4bool | positiveField |
Sign of magnetic field. | |
G4int | poleNOffset |
Offset for pole to start at - in effect this flips the sign of the field. | |
G4double | poleTipRadius |
Radius of transition between inner and outer fields. | |
std::vector< G4TwoVector > | currents |
Locations of infinite wire current sources. | |
G4double | maxField |
Any field beyond this will curtailed to this value. | |
G4bool | initialisationPhase |
Need a way to control cludge normalisation behaviour during initial normalisation calculation. | |
Additional Inherited Members | |
![]() | |
G4bool | finiteStrength |
Flag to cache whether finite nor not. | |
G4Transform3D | transform |
Transform to apply for the field relative to the local coordinates of the geometry. | |
G4bool | transformIsNotIdentity |
Cache of whether to use transform at all. | |
BDSModulator * | modulator |
Optional modulator;. | |
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.
Definition at line 55 of file BDSFieldMagMultipoleOuter.hh.
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.
|
inlinevirtual |
Definition at line 65 of file BDSFieldMagMultipoleOuter.hh.
|
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().
|
private |
Locations of infinite wire current sources.
Definition at line 79 of file BDSFieldMagMultipoleOuter.hh.
Referenced by GetField().
|
private |
Need a way to control cludge normalisation behaviour during initial normalisation calculation.
Definition at line 81 of file BDSFieldMagMultipoleOuter.hh.
Referenced by GetField().
|
private |
Any field beyond this will curtailed to this value.
Definition at line 80 of file BDSFieldMagMultipoleOuter.hh.
Referenced by GetField().
|
private |
Storage of the overall normalisation factor.
Definition at line 75 of file BDSFieldMagMultipoleOuter.hh.
Referenced by GetField().
|
private |
N-poles / 2.
Definition at line 72 of file BDSFieldMagMultipoleOuter.hh.
|
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.
|
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().
|
private |
Radius of transition between inner and outer fields.
Definition at line 78 of file BDSFieldMagMultipoleOuter.hh.
|
private |
Sign of magnetic field.
Definition at line 76 of file BDSFieldMagMultipoleOuter.hh.
Referenced by GetField().
|
private |
Radius from any current source within which the field is artificially saturated.
Definition at line 74 of file BDSFieldMagMultipoleOuter.hh.
Referenced by GetField().