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

A perfect magetic dipole in 3D, normal field inside 1/2 poleTipRadius. More...

#include <BDSFieldMagDipoleOuter.hh>

Inheritance diagram for BDSFieldMagDipoleOuter:
Inheritance graph
Collaboration diagram for BDSFieldMagDipoleOuter:
Collaboration graph

Public Member Functions

 BDSFieldMagDipoleOuter (const BDSMagnetStrength *strength, const G4double &poleTipRadius, 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

G4double spatialLimit
 Limit for getting too close to a current source. More...
 
G4double poleTipRadius
 Used as radial limit for returning normal field. More...
 
G4double normalisation
 Storage of the overal normalisation factor. More...
 
G4ThreeVector localField
 Nominal dipole field. More...
 
G4ThreeVector m
 Dipole moment as unit vector of field direction. 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...
 

Static Private Attributes

static G4double transitionLengthScale = 1*CLHEP::cm
 

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 perfect magetic dipole in 3D, normal field inside 1/2 poleTipRadius.

Field for the far field of a pure magnetic dipole. Inside 0.5*poleTipRadius, the nominal uniform field is returned and tanh is used as a sigmoid function to smoothly vary between the two on a length scale of transitionLengthScale, which is 1cm by default.

Author
Laurie Nevay

Definition at line 44 of file BDSFieldMagDipoleOuter.hh.

Constructor & Destructor Documentation

◆ BDSFieldMagDipoleOuter()

BDSFieldMagDipoleOuter::BDSFieldMagDipoleOuter ( const BDSMagnetStrength strength,
const G4double &  poleTipRadius,
G4double  arbitraryScaling = 1.0 
)

Definition at line 34 of file BDSFieldMagDipoleOuter.cc.

◆ ~BDSFieldMagDipoleOuter()

virtual BDSFieldMagDipoleOuter::~BDSFieldMagDipoleOuter ( )
inlinevirtual

Definition at line 51 of file BDSFieldMagDipoleOuter.hh.

Member Function Documentation

◆ GetField()

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

Field Documentation

◆ initialisationPhase

G4bool BDSFieldMagDipoleOuter::initialisationPhase
private

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

Definition at line 64 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ localField

G4ThreeVector BDSFieldMagDipoleOuter::localField
private

Nominal dipole field.

Definition at line 61 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ m

G4ThreeVector BDSFieldMagDipoleOuter::m
private

Dipole moment as unit vector of field direction.

Definition at line 62 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ maxField

G4double BDSFieldMagDipoleOuter::maxField
private

Any field beyond this will curtailed to this value.

Definition at line 63 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ normalisation

G4double BDSFieldMagDipoleOuter::normalisation
private

Storage of the overal normalisation factor.

Definition at line 60 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ poleTipRadius

G4double BDSFieldMagDipoleOuter::poleTipRadius
private

Used as radial limit for returning normal field.

Definition at line 59 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ spatialLimit

G4double BDSFieldMagDipoleOuter::spatialLimit
private

Limit for getting too close to a current source.

Definition at line 58 of file BDSFieldMagDipoleOuter.hh.

Referenced by GetField().

◆ transitionLengthScale

G4double BDSFieldMagDipoleOuter::transitionLengthScale = 1*CLHEP::cm
staticprivate

Definition at line 65 of file BDSFieldMagDipoleOuter.hh.


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