18#include "BDSDimensionType.hh"
19#include "BDSFieldEMInterpolated1D.hh"
20#include "BDSInterpolator1D.hh"
22#include "G4ThreeVector.hh"
27BDSFieldEMInterpolated1D::BDSFieldEMInterpolated1D(
BDSInterpolator1D* eInterpolatorIn,
29 const G4Transform3D& offset,
33 eInterpolator(eInterpolatorIn),
34 bInterpolator(bInterpolatorIn),
35 eDimensionIndex((eInterpolatorIn->FirstDimension()).underlying()),
36 eTime((eInterpolatorIn->FirstDimension()).underlying() > 2),
37 bDimensionIndex((bInterpolatorIn->FirstDimension()).underlying()),
38 bTime((bInterpolatorIn->FirstDimension()).underlying() > 2)
41BDSFieldEMInterpolated1D::~BDSFieldEMInterpolated1D()
48 const G4double t)
const
50 G4double eCoordinate = 0;
55 G4double bCoordinate = 0;
62 return std::make_pair(b,e);
BDSInterpolator1D * eInterpolator
E Inteprolator the field is based on.
virtual std::pair< G4ThreeVector, G4ThreeVector > GetField(const G4ThreeVector &position, const G4double t=0) const
Return the interpolated field value at a given point.
const G4bool eTime
E Cache of whether to use time coordinate.
const G4bool bTime
B Cache of whether to use time coordinate.
const G4int bDimensionIndex
B Integer index to dimension to use.
BDSInterpolator1D * bInterpolator
B Interpolator the field is based on.
const G4int eDimensionIndex
E Integer index to dimension to use.
Class to provide scaling and a base class pointer for interpolator fields.
G4double EScaling() const
Accessor.
G4double BScaling() const
Accessor.
Interface for all 1D interpolators.
G4ThreeVector GetInterpolatedValue(G4double x) const
Public interface to a 1D interpolator. Returns Geant4 type as that's what will be needed.