BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Pill box cavity electromagnetic field. More...
#include <BDSFieldEMRFCavity.hh>
Public Member Functions | |
BDSFieldEMRFCavity (BDSMagnetStrength const *strength, G4double brho) | |
BDSFieldEMRFCavity (G4double eFieldAmplitude, G4double frequency, G4double phaseOffset, G4double cavityRadius) | |
virtual std::pair< G4ThreeVector, G4ThreeVector > | GetField (const G4ThreeVector &position, const G4double t) const |
Accessor to get B and E field. | |
virtual G4bool | TimeVarying () const |
![]() | |
BDSFieldEM () | |
BDSFieldEM (G4Transform3D transformIn) | |
virtual std::pair< G4ThreeVector, 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 std::pair< G4ThreeVector, 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) |
virtual G4bool | DoesFieldChangeEnergy () const |
Required overload by Geant4. | |
void | SetModulator (BDSModulator *modulatorIn) |
Set the optional modulator. | |
G4bool | FiniteStrength () const |
Accessor. | |
Private Member Functions | |
BDSFieldEMRFCavity () | |
Private constructor to force use of provided one. | |
Private Attributes | |
G4double | eFieldMax |
Maximum field in V/m. | |
G4double | phase |
Phase offset of the oscillator. | |
G4double | cavityRadius |
Radius at maximum extent of cavity. | |
G4double | wavelength |
const G4double | normalisedCavityRadius |
Pre-calculated normalised calculated radius w.r.t. bessel first 0. | |
const G4double | angularFrequency |
Angular frequency calculated from frequency - cached to avoid repeated calculation. | |
Static Private Attributes | |
static const G4double | j0FirstZero = 2.404825557695772768622 |
X coordinate of first 0 point for bessel J0. | |
static const G4double | Z0 = CLHEP::mu0 * CLHEP::c_light |
Impedance of free space. | |
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;. | |
Pill box cavity electromagnetic field.
Definition at line 38 of file BDSFieldEMRFCavity.hh.
BDSFieldEMRFCavity::BDSFieldEMRFCavity | ( | BDSMagnetStrength const * | strength, |
G4double | brho | ||
) |
Definition at line 39 of file BDSFieldEMRFCavity.cc.
BDSFieldEMRFCavity::BDSFieldEMRFCavity | ( | G4double | eFieldAmplitude, |
G4double | frequency, | ||
G4double | phaseOffset, | ||
G4double | cavityRadius | ||
) |
Definition at line 49 of file BDSFieldEMRFCavity.cc.
|
inlinevirtual |
Definition at line 49 of file BDSFieldEMRFCavity.hh.
|
virtual |
Accessor to get B and E field.
Implements BDSFieldEM.
Definition at line 65 of file BDSFieldEMRFCavity.cc.
References angularFrequency, eFieldMax, j0FirstZero, normalisedCavityRadius, phase, and Z0.
|
inlinevirtual |
Each derived class should override this if needs be. Used to warn about time modulation with a time-varying field.
Reimplemented from BDSFieldEM.
Definition at line 55 of file BDSFieldEMRFCavity.hh.
|
private |
Angular frequency calculated from frequency - cached to avoid repeated calculation.
Definition at line 77 of file BDSFieldEMRFCavity.hh.
Referenced by GetField().
|
private |
Radius at maximum extent of cavity.
Definition at line 64 of file BDSFieldEMRFCavity.hh.
|
private |
Maximum field in V/m.
Definition at line 62 of file BDSFieldEMRFCavity.hh.
Referenced by GetField().
|
staticprivate |
X coordinate of first 0 point for bessel J0.
Definition at line 68 of file BDSFieldEMRFCavity.hh.
Referenced by GetField().
|
private |
Pre-calculated normalised calculated radius w.r.t. bessel first 0.
Definition at line 74 of file BDSFieldEMRFCavity.hh.
Referenced by GetField().
|
private |
Phase offset of the oscillator.
Definition at line 63 of file BDSFieldEMRFCavity.hh.
Referenced by GetField().
|
private |
Definition at line 65 of file BDSFieldEMRFCavity.hh.
|
staticprivate |
Impedance of free space.
Definition at line 71 of file BDSFieldEMRFCavity.hh.
Referenced by GetField().