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

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

#include <BDSFieldMagInterpolated1D.hh>

Inheritance diagram for BDSFieldMagInterpolated1D:
Inheritance graph
Collaboration diagram for BDSFieldMagInterpolated1D:
Collaboration graph

Public Member Functions

 BDSFieldMagInterpolated1D (BDSInterpolator1D *interpolatorIn, const G4Transform3D &offset=G4Transform3D::Identity, G4double scalingIn=1.0)
 
virtual G4ThreeVector GetField (const G4ThreeVector &position, const G4double t=0) const
 Return the interpolated field value at a given point. More...
 
const BDSInterpolator1DInterpolator () const
 
- Public Member Functions inherited from BDSFieldMagInterpolated
 BDSFieldMagInterpolated (const BDSInterpolator *interpolator, const G4Transform3D &offset, G4double scalingIn=1.0)
 
G4double Scaling () const
 
void SetScaling (G4double scalingIn)
 
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 BDSFieldMag
 BDSFieldMag ()
 
 BDSFieldMag (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

BDSInterpolator1Dinterpolator
 Interpolator field is based on. More...
 
const G4int dimensionIndex
 Integer index to dimension to use. More...
 
const G4bool time
 Cache of whether to use time coordinate. More...
 

Additional Inherited Members

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

Owns interpolator.

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

Optional dimension index to specify which dimension in space to vary with.

Author
Laurie Nevay

Definition at line 42 of file BDSFieldMagInterpolated1D.hh.

Constructor & Destructor Documentation

◆ BDSFieldMagInterpolated1D()

BDSFieldMagInterpolated1D::BDSFieldMagInterpolated1D ( BDSInterpolator1D interpolatorIn,
const G4Transform3D &  offset = G4Transform3D::Identity,
G4double  scalingIn = 1.0 
)
explicit

Definition at line 25 of file BDSFieldMagInterpolated1D.cc.

◆ ~BDSFieldMagInterpolated1D()

BDSFieldMagInterpolated1D::~BDSFieldMagInterpolated1D ( )
virtual

Definition at line 34 of file BDSFieldMagInterpolated1D.cc.

Member Function Documentation

◆ GetField()

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

Return the interpolated field value at a given point.

Implements BDSFieldMag.

Definition at line 39 of file BDSFieldMagInterpolated1D.cc.

References dimensionIndex, BDSInterpolator1D::GetInterpolatedValue(), interpolator, and time.

Here is the call graph for this function:

◆ Interpolator()

const BDSInterpolator1D * BDSFieldMagInterpolated1D::Interpolator ( ) const
inline

Definition at line 56 of file BDSFieldMagInterpolated1D.hh.

Field Documentation

◆ dimensionIndex

const G4int BDSFieldMagInterpolated1D::dimensionIndex
private

Integer index to dimension to use.

Definition at line 60 of file BDSFieldMagInterpolated1D.hh.

Referenced by GetField().

◆ interpolator

BDSInterpolator1D* BDSFieldMagInterpolated1D::interpolator
private

Interpolator field is based on.

Definition at line 59 of file BDSFieldMagInterpolated1D.hh.

Referenced by GetField().

◆ time

const G4bool BDSFieldMagInterpolated1D::time
private

Cache of whether to use time coordinate.

Definition at line 61 of file BDSFieldMagInterpolated1D.hh.

Referenced by GetField().


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