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

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

#include <BDSFieldEMInterpolated2D.hh>

Inheritance diagram for BDSFieldEMInterpolated2D:
Inheritance graph
Collaboration diagram for BDSFieldEMInterpolated2D:
Collaboration graph

Public Member Functions

 BDSFieldEMInterpolated2D (BDSInterpolator2D *eInterpolatorIn, BDSInterpolator2D *bInterpolatorIn, const G4Transform3D &offset=G4Transform3D::Identity, G4double eScalingIn=1.0, G4double bScalingIn=1.0)
 
virtual std::pair< G4ThreeVector, G4ThreeVector > GetField (const G4ThreeVector &position, const G4double t=0) const
 Return the interpolated field value at a given point. More...
 
const BDSInterpolator2DEInterpolator () const
 
const BDSInterpolator2DBInterpolator () const
 
- Public Member Functions inherited from BDSFieldEMInterpolated
 BDSFieldEMInterpolated (const BDSInterpolator *eInterpolator, const BDSInterpolator *bInterpolator, const G4Transform3D &offset, G4double eScalingIn=1.0, G4double bScalingIn=1.0)
 
G4double SmallestSpatialStep () const
 
G4double EScaling () const
 Accessor. More...
 
G4double BScaling () const
 Accessor. More...
 
void SetEScaling (G4double eScalingIn)
 Setter. More...
 
void SetBScaling (G4double bScalingIn)
 Setter. More...
 
- Public Member Functions inherited from BDSFieldEM
 BDSFieldEM ()
 
 BDSFieldEM (G4Transform3D transformIn)
 
virtual std::pair< G4ThreeVector, G4ThreeVector > GetField (const G4ThreeVector &position, const G4double t=0) const =0
 
virtual void GetFieldValue (const G4double point[4], G4double *field) const
 
virtual std::pair< G4ThreeVector, 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)
 
virtual G4bool DoesFieldChangeEnergy () const
 Required overload by Geant4. More...
 
G4bool FiniteStrength () const
 Accessor. More...
 

Private Attributes

BDSInterpolator2DeInterpolator
 E Interpolator the field is based on. More...
 
BDSInterpolator2DbInterpolator
 B Interpolator the field is based on. More...
 
const G4int eFirstDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool eFirstTime
 Cache of whether to use time coordinate. More...
 
const G4int eSecondDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool eSecondTime
 Cache of whether to use time coordinate. More...
 
const G4int bFirstDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool bFirstTime
 Cache of whether to use time coordinate. More...
 
const G4int bSecondDimensionIndex
 Integer index to dimension to use. More...
 
const G4bool bSecondTime
 Cache of whether to use time coordinate. More...
 

Additional Inherited Members

- Protected Attributes inherited from BDSFieldEM
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 2D field from an interpolated array with any interpolation.

Owns interpolators.

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

Author
Laurie Nevay

Definition at line 42 of file BDSFieldEMInterpolated2D.hh.

Constructor & Destructor Documentation

◆ BDSFieldEMInterpolated2D()

BDSFieldEMInterpolated2D::BDSFieldEMInterpolated2D ( BDSInterpolator2D eInterpolatorIn,
BDSInterpolator2D bInterpolatorIn,
const G4Transform3D &  offset = G4Transform3D::Identity,
G4double  eScalingIn = 1.0,
G4double  bScalingIn = 1.0 
)

Definition at line 28 of file BDSFieldEMInterpolated2D.cc.

◆ ~BDSFieldEMInterpolated2D()

BDSFieldEMInterpolated2D::~BDSFieldEMInterpolated2D ( )
virtual

Definition at line 46 of file BDSFieldEMInterpolated2D.cc.

Member Function Documentation

◆ BInterpolator()

const BDSInterpolator2D * BDSFieldEMInterpolated2D::BInterpolator ( ) const
inline

Definition at line 59 of file BDSFieldEMInterpolated2D.hh.

◆ EInterpolator()

const BDSInterpolator2D * BDSFieldEMInterpolated2D::EInterpolator ( ) const
inline

Definition at line 58 of file BDSFieldEMInterpolated2D.hh.

◆ GetField()

std::pair< G4ThreeVector, G4ThreeVector > BDSFieldEMInterpolated2D::GetField ( const G4ThreeVector &  position,
const G4double  t = 0 
) const
virtual

Field Documentation

◆ bFirstDimensionIndex

const G4int BDSFieldEMInterpolated2D::bFirstDimensionIndex
private

Integer index to dimension to use.

Definition at line 68 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ bFirstTime

const G4bool BDSFieldEMInterpolated2D::bFirstTime
private

Cache of whether to use time coordinate.

Definition at line 69 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ bInterpolator

BDSInterpolator2D* BDSFieldEMInterpolated2D::bInterpolator
private

B Interpolator the field is based on.

Definition at line 63 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ bSecondDimensionIndex

const G4int BDSFieldEMInterpolated2D::bSecondDimensionIndex
private

Integer index to dimension to use.

Definition at line 70 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ bSecondTime

const G4bool BDSFieldEMInterpolated2D::bSecondTime
private

Cache of whether to use time coordinate.

Definition at line 71 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ eFirstDimensionIndex

const G4int BDSFieldEMInterpolated2D::eFirstDimensionIndex
private

Integer index to dimension to use.

Definition at line 64 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ eFirstTime

const G4bool BDSFieldEMInterpolated2D::eFirstTime
private

Cache of whether to use time coordinate.

Definition at line 65 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ eInterpolator

BDSInterpolator2D* BDSFieldEMInterpolated2D::eInterpolator
private

E Interpolator the field is based on.

Definition at line 62 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ eSecondDimensionIndex

const G4int BDSFieldEMInterpolated2D::eSecondDimensionIndex
private

Integer index to dimension to use.

Definition at line 66 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().

◆ eSecondTime

const G4bool BDSFieldEMInterpolated2D::eSecondTime
private

Cache of whether to use time coordinate.

Definition at line 67 of file BDSFieldEMInterpolated2D.hh.

Referenced by GetField().


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