BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A sinusoidal electric (only) field that doesn't vary with position. Uses cosine. More...
#include <BDSFieldESinusoid.hh>
Public Member Functions | |
BDSFieldESinusoid (BDSMagnetStrength const *strength, G4double brho) | |
Construct with a BDSMagnetStrength instance for convenience. | |
BDSFieldESinusoid (G4double eFieldAmplitude, const G4ThreeVector &unitDirectionIn, G4double frequencyIn, G4double phaseOffsetIn) | |
Construct from E amplitude, unit direction vector, frequency (G4Units) and phase. | |
virtual G4bool | TimeVarying () const |
virtual G4ThreeVector | GetField (const G4ThreeVector &position, const G4double t) const |
Accessor for field value. | |
![]() | |
BDSFieldE () | |
BDSFieldE (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. | |
Protected Attributes | |
G4double | eField |
Amplitude of electric field in V/m. | |
const G4ThreeVector | unitDirection |
Unit vector for direction of field. | |
![]() | |
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;. | |
Private Attributes | |
G4double | angularFrequency |
Angular frequency of field. | |
G4double | phase |
Phase in radians. | |
A sinusoidal electric (only) field that doesn't vary with position. Uses cosine.
The default phase is 0 so cosine is used to give acceleration by default.
Definition at line 38 of file BDSFieldESinusoid.hh.
BDSFieldESinusoid::BDSFieldESinusoid | ( | BDSMagnetStrength const * | strength, |
G4double | brho | ||
) |
Construct with a BDSMagnetStrength instance for convenience.
Definition at line 30 of file BDSFieldESinusoid.cc.
References eField.
BDSFieldESinusoid::BDSFieldESinusoid | ( | G4double | eFieldAmplitude, |
const G4ThreeVector & | unitDirectionIn, | ||
G4double | frequencyIn, | ||
G4double | phaseOffsetIn | ||
) |
Construct from E amplitude, unit direction vector, frequency (G4Units) and phase.
Definition at line 41 of file BDSFieldESinusoid.cc.
References eField, BDSFieldE::finiteStrength, and BDS::IsFinite().
|
inlinevirtual |
Definition at line 52 of file BDSFieldESinusoid.hh.
|
virtual |
Accessor for field value.
Implements BDSFieldE.
Definition at line 53 of file BDSFieldESinusoid.cc.
References angularFrequency, eField, phase, and unitDirection.
|
inlinevirtual |
Each derived class should override this if needs be. Used to warn about time modulation with a time-varying field.
Reimplemented from BDSFieldE.
Definition at line 54 of file BDSFieldESinusoid.hh.
|
private |
Angular frequency of field.
Definition at line 69 of file BDSFieldESinusoid.hh.
Referenced by GetField().
|
protected |
Amplitude of electric field in V/m.
Definition at line 62 of file BDSFieldESinusoid.hh.
Referenced by BDSFieldESinusoid(), and GetField().
|
private |
|
protected |
Unit vector for direction of field.
Definition at line 65 of file BDSFieldESinusoid.hh.
Referenced by GetField().