BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A simple paramaterisation of N-Pole outer yoke magnetic field. More...
#include <BDSFieldMagMultipoleOuterOld.hh>
Public Member Functions | |
BDSFieldMagMultipoleOuterOld (G4int orderIn, G4double poleTipRadius, const BDSFieldMag *innerFieldIn, G4bool kPositive, 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 | normalisation |
Storage of the overal normalisation factor. | |
G4bool | positiveField |
Sign of magnetic field. | |
G4double | poleTipRadius |
Radius of transition between inner and outer fields. | |
std::vector< G4TwoVector > | currents |
Locations of inifite wire current sources. | |
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 paramaterisation 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 exaclty 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 BDSFieldMagMultipoleOuterOld.hh.
BDSFieldMagMultipoleOuterOld::BDSFieldMagMultipoleOuterOld | ( | G4int | orderIn, |
G4double | poleTipRadius, | ||
const BDSFieldMag * | innerFieldIn, | ||
G4bool | kPositive, | ||
G4double | arbitraryScaling = 1.0 |
||
) |
Definition at line 31 of file BDSFieldMagMultipoleOuterOld.cc.
|
inlinevirtual |
Definition at line 64 of file BDSFieldMagMultipoleOuterOld.hh.
|
virtual |
Access the field value.
Definition at line 74 of file BDSFieldMagMultipoleOuterOld.cc.
References currents, normalisation, and positiveField.
Referenced by BDSFieldMagMultipoleOuterDualOld::GetField().
|
private |
Locations of inifite wire current sources.
Definition at line 75 of file BDSFieldMagMultipoleOuterOld.hh.
Referenced by GetField().
|
private |
Storage of the overal normalisation factor.
Definition at line 72 of file BDSFieldMagMultipoleOuterOld.hh.
Referenced by GetField().
|
private |
N-poles / 2.
Definition at line 71 of file BDSFieldMagMultipoleOuterOld.hh.
|
private |
Radius of transition between inner and outer fields.
Definition at line 74 of file BDSFieldMagMultipoleOuterOld.hh.
|
private |
Sign of magnetic field.
Definition at line 73 of file BDSFieldMagMultipoleOuterOld.hh.
Referenced by GetField().