19#include "BDSFieldEMInterpolated3D.hh"
20#include "BDSInterpolator3D.hh"
22#include "G4ThreeVector.hh"
27BDSFieldEMInterpolated3D::BDSFieldEMInterpolated3D(
BDSInterpolator3D* eInterpolatorIn,
29 const G4Transform3D& offset,
33 eInterpolator(eInterpolatorIn),
34 bInterpolator(bInterpolatorIn),
35 eFirstDimensionIndex((eInterpolatorIn->FirstDimension()).underlying()),
36 eFirstTime((eInterpolatorIn->FirstDimension()).underlying() > 2),
37 eSecondDimensionIndex((eInterpolatorIn->SecondDimension()).underlying()),
38 eSecondTime((eInterpolatorIn->SecondDimension()).underlying() > 2),
39 eThirdDimensionIndex((eInterpolatorIn->ThirdDimension()).underlying()),
40 eThirdTime((eInterpolatorIn->ThirdDimension()).underlying() > 2),
41 bFirstDimensionIndex((bInterpolatorIn->FirstDimension()).underlying()),
42 bFirstTime((bInterpolatorIn->FirstDimension()).underlying() > 2),
43 bSecondDimensionIndex((bInterpolatorIn->SecondDimension()).underlying()),
44 bSecondTime((bInterpolatorIn->SecondDimension()).underlying() > 2),
45 bThirdDimensionIndex((bInterpolatorIn->ThirdDimension()).underlying()),
46 bThirdTime((bInterpolatorIn->ThirdDimension()).underlying() > 2)
49BDSFieldEMInterpolated3D::~BDSFieldEMInterpolated3D()
56 const G4double t)
const
58 G4double eFCoordinate = 0;
63 G4double eSCoordinate = 0;
68 G4double eTCoordinate = 0;
73 G4double bFCoordinate = 0;
78 G4double bSCoordinate = 0;
83 G4double bTCoordinate = 0;
95 return std::make_pair(b,e);
const G4int bFirstDimensionIndex
Integer index to dimension to use.
const G4bool eFirstTime
Cache of whether to use time coordinate.
const G4bool eSecondTime
Cache of whether to use time coordinate.
const G4int eFirstDimensionIndex
Integer index to dimension to use.
const G4bool eThirdTime
Cache of whether to use time coordinate.
const G4bool bThirdTime
Cache of whether to use time coordinate.
BDSInterpolator3D * eInterpolator
E Interplator 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 eThirdDimensionIndex
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 G4int eSecondDimensionIndex
Integer index to dimension to use.
BDSInterpolator3D * bInterpolator
B Interpolator the field is based on.
const G4int bThirdDimensionIndex
Integer index to dimension to use.
const G4int bSecondDimensionIndex
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 3D interpolators.
G4ThreeVector GetInterpolatedValue(G4double x, G4double y, G4double z) const
Public interface to a 3D interpolator. Returns Geant4 type as that's what will be needed.