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

Class that provides the magnetic strength in a quadrupole. More...

#include <BDSFieldMagUndulator.hh>

Inheritance diagram for BDSFieldMagUndulator:
Inheritance graph
Collaboration diagram for BDSFieldMagUndulator:
Collaboration graph

Public Member Functions

 BDSFieldMagUndulator (BDSMagnetStrength const *strength, G4double beamPipeRadiusIn)
 
virtual G4ThreeVector GetField (const G4ThreeVector &position, const G4double 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 Member Functions

 BDSFieldMagUndulator ()
 Private default constructor to force use of supplied constructor.
 

Private Attributes

G4double B
 The peak field. More...
 
G4double wavenumber
 The undulator wavenumber. More...
 
G4double limit
 
G4double beamPipeRadius
 Cache of beam pipe radius to know maximum valid extent of field. More...
 

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

Class that provides the magnetic strength in a quadrupole.

The magnetic field is calculated from the quadrupole strength parameter "k1" and a design rigidity (brho).

Definition at line 36 of file BDSFieldMagUndulator.hh.

Constructor & Destructor Documentation

◆ BDSFieldMagUndulator()

BDSFieldMagUndulator::BDSFieldMagUndulator ( BDSMagnetStrength const *  strength,
G4double  beamPipeRadiusIn 
)

Definition at line 32 of file BDSFieldMagUndulator.cc.

◆ ~BDSFieldMagUndulator()

virtual BDSFieldMagUndulator::~BDSFieldMagUndulator ( )
inlinevirtual

Definition at line 42 of file BDSFieldMagUndulator.hh.

Member Function Documentation

◆ GetField()

G4ThreeVector BDSFieldMagUndulator::GetField ( const G4ThreeVector &  position,
const G4double  t = 0 
) const
virtual

Access the field value.

Implements BDSFieldMag.

Definition at line 46 of file BDSFieldMagUndulator.cc.

References B, beamPipeRadius, limit, and wavenumber.

Field Documentation

◆ B

G4double BDSFieldMagUndulator::B
private

The peak field.

Definition at line 53 of file BDSFieldMagUndulator.hh.

Referenced by GetField().

◆ beamPipeRadius

G4double BDSFieldMagUndulator::beamPipeRadius
private

Cache of beam pipe radius to know maximum valid extent of field.

Definition at line 63 of file BDSFieldMagUndulator.hh.

Referenced by GetField().

◆ limit

G4double BDSFieldMagUndulator::limit
private

Limit to clip the field at as it's unbounded with hyperbolic functions but must remain bounded.

Definition at line 60 of file BDSFieldMagUndulator.hh.

Referenced by GetField().

◆ wavenumber

G4double BDSFieldMagUndulator::wavenumber
private

The undulator wavenumber.

Definition at line 56 of file BDSFieldMagUndulator.hh.

Referenced by GetField().


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