BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Attributes
BDSFieldEInterpolated3D Class Reference

A 3D field from an interpolated array with any interpolation. More...

#include <BDSFieldEInterpolated3D.hh>

Inheritance diagram for BDSFieldEInterpolated3D:
Inheritance graph
Collaboration diagram for BDSFieldEInterpolated3D:
Collaboration graph

Public Member Functions

 BDSFieldEInterpolated3D (BDSInterpolator3D *interpolatorIn, const G4Transform3D &offset=G4Transform3D::Identity, G4double eScalingIn=1.0)
 
virtual G4ThreeVector GetField (const G4ThreeVector &position, const G4double t=0) const
 Return the interpolated field value at a given point. More...
 
const BDSInterpolator3DInterpolator () const
 
- Public Member Functions inherited from BDSFieldEInterpolated
 BDSFieldEInterpolated (const BDSInterpolator *interpolator, const G4Transform3D &offset, G4double eScalingIn=1.0)
 
G4double EScaling () const
 
void SetEScaling (G4double eScalingIn)
 
BDSExtent ExtentNoOffset () const
 Extent of field without any offset (ie in its own coordinate frame). More...
 
BDSExtent Extent () const
 For now, we will ignore any rotation of the transform. TODO. More...
 
G4double SmallestSpatialStep () const
 
- Public Member Functions inherited from BDSFieldE
 BDSFieldE ()
 
 BDSFieldE (G4Transform3D transformIn)
 
virtual G4ThreeVector GetField (const G4ThreeVector &position, const G4double t=0) const =0
 
virtual void GetFieldValue (const G4double point[4], G4double *field) const
 
virtual G4ThreeVector GetFieldTransformed (const G4ThreeVector &position, const G4double t) const
 Get the field value after applying transform for local offset. More...
 
virtual void SetTransform (const G4Transform3D &transformIn)
 
G4bool FiniteStrength () const
 Accessor. More...
 

Private Attributes

BDSInterpolator3Dinterpolator
 Interpolator the field is based on. More...
 
const G4int firstDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool firstTime
 Cache of whether to use time coordinate. More...
 
const G4int secondDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool secondTime
 Cache of whether to use time coordinate. More...
 
const G4int thirdDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool thirdTime
 Cache of whether to use time coordinate. More...
 

Additional Inherited Members

- Protected Attributes inherited from BDSFieldE
G4bool finiteStrength
 Flag to cache whether finite nor not. More...
 
G4Transform3D transform
 Transform to apply for the field relative to the local coordinates of the geometry. More...
 

Detailed Description

A 3D field from an interpolated array with any interpolation.

Owns interpolator.

This provides a simple interface for electric fields to use a 3D interpolator irrespective of which type of interpolator it is.

Author
Laurie Nevay

Definition at line 39 of file BDSFieldEInterpolated3D.hh.

Constructor & Destructor Documentation

◆ BDSFieldEInterpolated3D()

BDSFieldEInterpolated3D::BDSFieldEInterpolated3D ( BDSInterpolator3D interpolatorIn,
const G4Transform3D &  offset = G4Transform3D::Identity,
G4double  eScalingIn = 1.0 
)
explicit

Definition at line 26 of file BDSFieldEInterpolated3D.cc.

◆ ~BDSFieldEInterpolated3D()

BDSFieldEInterpolated3D::~BDSFieldEInterpolated3D ( )
virtual

Definition at line 39 of file BDSFieldEInterpolated3D.cc.

Member Function Documentation

◆ GetField()

G4ThreeVector BDSFieldEInterpolated3D::GetField ( const G4ThreeVector &  position,
const G4double  t = 0 
) const
virtual

Return the interpolated field value at a given point.

Implements BDSFieldE.

Definition at line 44 of file BDSFieldEInterpolated3D.cc.

References firstDimensionIndex, firstTime, BDSInterpolator3D::GetInterpolatedValue(), interpolator, secondDimensionIndex, secondTime, thirdDimensionIndex, and thirdTime.

Here is the call graph for this function:

◆ Interpolator()

const BDSInterpolator3D * BDSFieldEInterpolated3D::Interpolator ( ) const
inline

Definition at line 53 of file BDSFieldEInterpolated3D.hh.

Field Documentation

◆ firstDimensionIndex

const G4int BDSFieldEInterpolated3D::firstDimensionIndex
private

Integer index to dimension to use.

Definition at line 57 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().

◆ firstTime

const G4bool BDSFieldEInterpolated3D::firstTime
private

Cache of whether to use time coordinate.

Definition at line 58 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().

◆ interpolator

BDSInterpolator3D* BDSFieldEInterpolated3D::interpolator
private

Interpolator the field is based on.

Definition at line 56 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().

◆ secondDimensionIndex

const G4int BDSFieldEInterpolated3D::secondDimensionIndex
private

Integer index to dimension to use.

Definition at line 59 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().

◆ secondTime

const G4bool BDSFieldEInterpolated3D::secondTime
private

Cache of whether to use time coordinate.

Definition at line 60 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().

◆ thirdDimensionIndex

const G4int BDSFieldEInterpolated3D::thirdDimensionIndex
private

Integer index to dimension to use.

Definition at line 61 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().

◆ thirdTime

const G4bool BDSFieldEInterpolated3D::thirdTime
private

Cache of whether to use time coordinate.

Definition at line 62 of file BDSFieldEInterpolated3D.hh.

Referenced by GetField().


The documentation for this class was generated from the following files: