|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Class that provides the magnetic field due to a cylinder of current. More...
#include <BDSFieldMagSolenoidSheet.hh>


Public Member Functions | |
| BDSFieldMagSolenoidSheet (BDSMagnetStrength const *strength, G4double radiusIn, G4double toleranceIn=0.0) | |
| BDSFieldMagSolenoidSheet (G4double strength, G4bool strengthIsCurrent, G4double sheetRadius, G4double fullLength, G4double toleranceIn=0.0) | |
| virtual G4ThreeVector | GetField (const G4ThreeVector &position, const G4double t=0) const |
| Calculate the field value. | |
| G4double | GetB0 () const |
| Accessor. | |
| G4double | GetI () const |
| Accessor. | |
Public Member Functions inherited from BDSFieldMag | |
| BDSFieldMag () | |
| BDSFieldMag (G4Transform3D transformIn) | |
| 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 | |
| G4double | OnAxisBz (G4double zp, G4double zm) const |
Private Attributes | |
| G4double | a |
| G4double | halfLength |
| G4double | B0 |
| G4double | I |
| G4double | spatialLimit |
| G4double | normalisation |
| G4double | coilTolerance |
Additional Inherited Members | |
Protected Attributes inherited from BDSFieldMag | |
| 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 field due to a cylinder of current.
This follows the parameterisation and uses the algorithm for the generalised complete elliptical integral as described in:
Cylindrical Magnets and ideal Solenoids, N. Derby and S. Olbert, American Journal of Physics 78, 229 (2010); https://doi.org/10.1119/1.3256157 and also at https://arxiv.org/abs/0909.3880.
The field is calculated in cylindrical coordinates. A complete description is in the manual.
Definition at line 44 of file BDSFieldMagSolenoidSheet.hh.
| BDSFieldMagSolenoidSheet::BDSFieldMagSolenoidSheet | ( | BDSMagnetStrength const * | strength, |
| G4double | radiusIn, | ||
| G4double | toleranceIn = 0.0 |
||
| ) |
This constructor uses the "field" and "length" parameters from the BDSMagnetStrength instance and forwards to the next constructor.
Definition at line 34 of file BDSFieldMagSolenoidSheet.cc.
| BDSFieldMagSolenoidSheet::BDSFieldMagSolenoidSheet | ( | G4double | strength, |
| G4bool | strengthIsCurrent, | ||
| G4double | sheetRadius, | ||
| G4double | fullLength, | ||
| G4double | toleranceIn = 0.0 |
||
| ) |
More reasonable constructor for the internal parameterisation. 'strength' can be either B0 or I. This is interpreted via 'strengthIsCurrent'. Have to do this as the signature would be the same for either case.
Definition at line 39 of file BDSFieldMagSolenoidSheet.cc.
References BDSFieldMag::finiteStrength, and BDS::IsFinite().

|
inlinevirtual |
Definition at line 60 of file BDSFieldMagSolenoidSheet.hh.
|
inline |
Accessor.
Definition at line 67 of file BDSFieldMagSolenoidSheet.hh.
|
virtual |
Calculate the field value.
Implements BDSFieldMag.
Definition at line 72 of file BDSFieldMagSolenoidSheet.cc.
References BDS::CEL(), and OnAxisBz().

|
inline |
Accessor.
Definition at line 68 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Approximation for rho=0 Bz field. Brho=0 by definition. zp and zm are z+halfLength and z-halfLength. Returns Bz.
Definition at line 137 of file BDSFieldMagSolenoidSheet.cc.
Referenced by GetField().

|
private |
Definition at line 76 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Definition at line 78 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Definition at line 82 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Definition at line 77 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Definition at line 79 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Definition at line 81 of file BDSFieldMagSolenoidSheet.hh.
|
private |
Definition at line 80 of file BDSFieldMagSolenoidSheet.hh.