19#include "BDSDimensionType.hh"
20#include "BDSFieldEMInterpolated1D.hh"
21#include "BDSInterpolator1D.hh"
23#include "G4ThreeVector.hh"
28BDSFieldEMInterpolated1D::BDSFieldEMInterpolated1D(
BDSInterpolator1D* eInterpolatorIn,
30 const G4Transform3D& offset,
34 eInterpolator(eInterpolatorIn),
35 bInterpolator(bInterpolatorIn),
36 eDimensionIndex((eInterpolatorIn->FirstDimension()).underlying()),
37 eTime((eInterpolatorIn->FirstDimension()).underlying() > 2),
38 bDimensionIndex((bInterpolatorIn->FirstDimension()).underlying()),
39 bTime((bInterpolatorIn->FirstDimension()).underlying() > 2)
42BDSFieldEMInterpolated1D::~BDSFieldEMInterpolated1D()
49 const G4double t)
const
51 G4double eCoordinate = 0;
56 G4double bCoordinate = 0;
63 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.