19#include "BDSFieldESinusoid.hh"
20#include "BDSMagnetStrength.hh"
21#include "BDSUtilities.hh"
23#include "G4ThreeVector.hh"
26#include "CLHEP/Units/SystemOfUnits.h"
33 G4ThreeVector( (*strength)[
"ex"], (*strength)[
"ey"], (*strength)[
"ez"]),
34 (*strength)[
"frequency"],
37 G4int sign = BDS::Sign(brho);
41BDSFieldESinusoid::BDSFieldESinusoid(G4double eFieldAmplitudeIn,
42 const G4ThreeVector& unitDirectionIn,
44 G4double phaseOffsetIn):
45 eField(eFieldAmplitudeIn),
46 unitDirection(unitDirectionIn.unit()),
47 angularFrequency(CLHEP::twopi*frequencyIn),
54 const G4double t)
const
A sinusoidal electric (only) field that doesn't vary with position. Uses cosine.
G4double angularFrequency
Angular frequency of field.
virtual G4ThreeVector GetField(const G4ThreeVector &position, const G4double t) const
Accessor for field value.
G4double eField
Amplitude of electric field in V/m.
const G4ThreeVector unitDirection
Unit vector for direction of field.
G4double phase
Phase in radians.
G4bool finiteStrength
Flag to cache whether finite nor not.
Efficient storage of magnet strengths.
G4bool IsFinite(G4double value, G4double tolerance=std::numeric_limits< double >::epsilon())