BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Class that provides the magnetic strength in a quadrupole. More...
#include <BDSFieldMagMultipole.hh>
Public Member Functions | |
BDSFieldMagMultipole (BDSMagnetStrength const *strength, G4double const brho, G4int const orderIn=12) | |
virtual G4ThreeVector | GetField (const G4ThreeVector &position, const G4double 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 Member Functions | |
BDSFieldMagMultipole () | |
Private default constructor to force use of supplied constructor. | |
Private Attributes | |
G4int | order |
Order up to which field components are considered. | |
G4int | maximumNonZeroOrder |
std::vector< G4double > | normalComponents |
Normal field components (normal - ie not skew) = kn * brho. | |
std::vector< G4double > | skewComponents |
Skew field components = kns * brho. | |
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;. | |
Class that provides the magnetic strength in a quadrupole.
The magnetic field is calculated from the strength parameters "kn" up to a specified order and a design rigidity (brho).
Definition at line 38 of file BDSFieldMagMultipole.hh.
BDSFieldMagMultipole::BDSFieldMagMultipole | ( | BDSMagnetStrength const * | strength, |
G4double const | brho, | ||
G4int const | orderIn = 12 |
||
) |
Definition at line 30 of file BDSFieldMagMultipole.cc.
|
inlinevirtual |
Definition at line 45 of file BDSFieldMagMultipole.hh.
|
virtual |
Access the field value.
Implements BDSFieldMag.
Definition at line 67 of file BDSFieldMagMultipole.cc.
References BDS::IsFiniteStrength(), maximumNonZeroOrder, normalComponents, and skewComponents.
|
private |
Identify which is the maximum non-zero order in either normal or skew components and only sum up to this in the field calculation. Just an optimisation to save addition.
Definition at line 61 of file BDSFieldMagMultipole.hh.
Referenced by GetField().
|
private |
Normal field components (normal - ie not skew) = kn * brho.
Definition at line 64 of file BDSFieldMagMultipole.hh.
Referenced by GetField().
|
private |
Order up to which field components are considered.
Definition at line 56 of file BDSFieldMagMultipole.hh.
|
private |
Skew field components = kns * brho.
Definition at line 67 of file BDSFieldMagMultipole.hh.
Referenced by GetField().