19#include "BDSDimensionType.hh"
20#include "BDSFieldEMInterpolated2D.hh"
21#include "BDSInterpolator2D.hh"
23#include "G4ThreeVector.hh"
28BDSFieldEMInterpolated2D::BDSFieldEMInterpolated2D(
BDSInterpolator2D* eInterpolatorIn,
30 const G4Transform3D& offset,
34 eInterpolator(eInterpolatorIn),
35 bInterpolator(bInterpolatorIn),
36 eFirstDimensionIndex((eInterpolatorIn->FirstDimension()).underlying()),
37 eFirstTime((eInterpolatorIn->FirstDimension()).underlying() > 2),
38 eSecondDimensionIndex((eInterpolatorIn->SecondDimension()).underlying()),
39 eSecondTime((eInterpolatorIn->SecondDimension()).underlying() > 2),
40 bFirstDimensionIndex((bInterpolatorIn->FirstDimension()).underlying()),
41 bFirstTime((bInterpolatorIn->FirstDimension()).underlying() > 2),
42 bSecondDimensionIndex((bInterpolatorIn->SecondDimension()).underlying()),
43 bSecondTime((bInterpolatorIn->SecondDimension()).underlying() > 2)
46BDSFieldEMInterpolated2D::~BDSFieldEMInterpolated2D()
53 const G4double t)
const
55 G4double eFCoordinate = 0;
60 G4double eSCoordinate = 0;
65 G4double bFCoordinate = 0;
70 G4double bSCoordinate = 0;
79 return std::make_pair(b,e);
const G4int eFirstDimensionIndex
Integer index to dimension to use.
BDSInterpolator2D * eInterpolator
E Interpolator the field is based on.
const G4bool bFirstTime
Cache of whether to use time coordinate.
const G4bool bSecondTime
Cache of whether to use time coordinate.
const G4int eSecondDimensionIndex
Integer index to dimension to use.
BDSInterpolator2D * bInterpolator
B Interpolator the field is based on.
const G4bool eSecondTime
Cache of whether to use time coordinate.
const G4int bSecondDimensionIndex
Integer index to dimension to use.
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 eFirstTime
Cache of whether to use time coordinate.
const G4int bFirstDimensionIndex
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 2D interpolators.
G4ThreeVector GetInterpolatedValue(G4double x, G4double y) const
Public interface to a 2D interpolator. Returns Geant4 type as that's what will be needed.