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

Overlay of 4D array that provides uniform only spatial coordinate mapping. More...

#include <BDSArray4DCoords.hh>

Inheritance diagram for BDSArray4DCoords:
Inheritance graph
Collaboration diagram for BDSArray4DCoords:
Collaboration graph

Public Member Functions

 BDSArray4DCoords ()=delete
 
 BDSArray4DCoords (G4int nXIn, G4int nYIn, G4int nZIn, G4int nTIn, G4double xMinIn, G4double xMaxIn, G4double yMinIn, G4double yMaxIn, G4double zMinIn, G4double zMaxIn, G4double tMinIn, G4double tMaxIn, BDSDimensionType xDimensionIn=BDSDimensionType::x, BDSDimensionType yDimensionIn=BDSDimensionType::y, BDSDimensionType zDimensionIn=BDSDimensionType::z, BDSDimensionType tDimensionIn=BDSDimensionType::t)
 
G4double SmallestSpatialStep () const
 
virtual G4bool OutsideCoords (G4double x, G4double y, G4double z, G4double t) const
 Whether the spatial coordinates lie outside the range of the array or not. More...
 
virtual void OutsideCoordsWarn (G4double x, G4double y, G4double z, G4double t) const
 
BDSFourVector< G4double > ArrayCoordsFromXYZT (G4double x, G4double y, G4double z, G4double t) const
 Convenience function to easily get array coords in all dimensions at once. More...
 
BDSFourVector< G4double > XYZTFromArrayCoords (G4double x, G4double y, G4double z, G4double t) const
 
BDSFourVector< G4int > NearestXYZT (G4double x, G4double y, G4double z, G4double t) const
 Return the index of the nearest field value in space. More...
 
BDSFourVector< G4int > NearestXYZT (const BDSFourVector< G4double > &pos) const
 Return the index of the nearest field value in space via four-vector. More...
 
virtual void ExtractSection2x2x2x2 (G4double x, G4double y, G4double z, G4double t, BDSFieldValue(&localData)[2][2][2][2], G4double &xFrac, G4double &yFrac, G4double &zFrac, G4double &tFrac) const
 Extract 2x2x2x2 points lying around coordinate x. More...
 
virtual void ExtractSection4x4x4x4 (G4double x, G4double y, G4double z, G4double t, BDSFieldValue(&localData)[4][4][4][4], G4double &xFrac, G4double &yFrac, G4double &zFrac, G4double &tFrac) const
 Extract 4x4x4x4 points lying around coordinate x. More...
 
virtual BDSFieldValue ExtractNearest (G4double x, G4double y=0, G4double z=0, G4double t=0) const
 Extract nearest field value from array. More...
 
virtual std::ostream & Print (std::ostream &out) const
 
virtual BDSExtent Extent () const
 Return the SPATIAL (only) extent of this field without any offset. Ignores time. More...
 
G4double XMin () const
 
G4double YMin () const
 
G4double ZMin () const
 
G4double TMin () const
 
G4double XMax () const
 
G4double YMax () const
 
G4double ZMax () const
 
G4double TMax () const
 
G4int DimensionIndex (BDSDimensionType spatialDimension) const
 
std::array< G4int, 4 > ArrayToSpatialDimensionIndices () const
 Access all indices at once. More...
 
G4double XStep () const
 The distance in spatial coordinates between any two points in the array. More...
 
G4double YStep () const
 The distance in spatial coordinates between any two points in the array. More...
 
G4double ZStep () const
 The distance in spatial coordinates between any two points in the array. More...
 
G4double TStep () const
 The distance in spatial coordinates between any two points in the array. More...
 
virtual G4double ArrayCoordsFromX (G4double x) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
virtual G4double ArrayCoordsFromY (G4double y) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
virtual G4double ArrayCoordsFromZ (G4double z) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
virtual G4double ArrayCoordsFromT (G4double t) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
void ArrayCoordsFromXY (G4double &x, G4double &xArr, G4double &y, G4double &yArr) const
 Utility version to forward to individual function. More...
 
void ArrayCoordsFromXYZ (G4double &x, G4double &xArr, G4double &y, G4double &yArr, G4double &z, G4double &zArr) const
 Utility version to forward to individual function. More...
 
void ArrayCoordsFromXYZT (G4double &x, G4double &xArr, G4double &y, G4double &yArr, G4double &z, G4double &zArr, G4double &t, G4double &tArr) const
 Utility version to forward to individual function. More...
 
G4double XFromArrayCoords (G4double xCoord) const
 Return spatial value from a continuous array coordinate in one dimension. More...
 
G4double YFromArrayCoords (G4double yCoord) const
 Return spatial value from a continuous array coordinate in one dimension. More...
 
G4double ZFromArrayCoords (G4double zCoord) const
 Return spatial value from a continuous array coordinate in one dimension. More...
 
G4double TFromArrayCoords (G4double tCoord) const
 Return spatial value from a continuous array coordinate in one dimension. More...
 
virtual G4int NearestX (G4double x) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
virtual G4int NearestY (G4double y) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
virtual G4int NearestZ (G4double z) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
virtual G4int NearestT (G4double t) const
 Not much point in being both virtual and inline (in our use case) but has to be virtual. More...
 
BDSDimensionType FirstDimension () const
 Accessor for each dimension label. e.g. array 'x' = spatial z. More...
 
BDSDimensionType SecondDimension () const
 Accessor for each dimension label. e.g. array 'x' = spatial z. More...
 
BDSDimensionType ThirdDimension () const
 Accessor for each dimension label. e.g. array 'x' = spatial z. More...
 
BDSDimensionType FourthDimension () const
 Accessor for each dimension label. e.g. array 'x' = spatial z. More...
 
- Public Member Functions inherited from BDSArray4D
 BDSArray4D ()=delete
 
 BDSArray4D (G4int nXIn, G4int nYIn, G4int nZIn, G4int nTIn)
 
virtual BDSFieldValueoperator() (G4int x, G4int y=0, G4int z=0, G4int t=0)
 Setter & (technically, a non-const) accessor. More...
 
const BDSFieldValueoperator() (BDSFourVector< G4int > &pos)
 Convenience accessor to operator(). More...
 
virtual const BDSFieldValueGetConst (G4int x, G4int y=0, G4int z=0, G4int t=0) const
 
virtual const BDSFieldValueoperator() (G4int x, G4int y=0, G4int z=0, G4int t=0) const
 Convenience shortcut to GetConst(). More...
 
const BDSFieldValueoperator() (const BDSFourVector< G4int > &pos) const
 Convenience accessor to operator(). More...
 
virtual G4bool Outside (G4int x, G4int y, G4int z, G4int t) const
 Return whether the indices are valid and lie within the array boundaries or not. More...
 
virtual void OutsideWarn (G4int x, G4int y, G4int z, G4int t) const
 Use Outside() but warn and exit if the coordinates requested are outside the array. More...
 
virtual std::ostream & Print (std::ostream &out) const
 
G4int NX () const
 Access the number of elements in a given dimension. More...
 
G4int NY () const
 Access the number of elements in a given dimension. More...
 
G4int NZ () const
 Access the number of elements in a given dimension. More...
 
G4int NT () const
 Access the number of elements in a given dimension. More...
 
BDSFourVector< G4int > NXYZT () const
 Access the number of elements in a given dimension. More...
 

Protected Member Functions

void BuildDimensionIndex ()
 Build up an array of ints based on the order of dimensions stored in the array. More...
 

Protected Attributes

G4double smallestSpatialStep
 
BDSDimensionType xDimension
 
BDSDimensionType yDimension
 
BDSDimensionType zDimension
 
BDSDimensionType tDimension
 
std::array< G4int, 4 > dimensions
 
G4double xMin
 Dimension parameter - protected for derived class access. More...
 
G4double xMax
 Dimension parameter - protected for derived class access. More...
 
G4double yMin
 Dimension parameter - protected for derived class access. More...
 
G4double yMax
 Dimension parameter - protected for derived class access. More...
 
G4double zMin
 Dimension parameter - protected for derived class access. More...
 
G4double zMax
 Dimension parameter - protected for derived class access. More...
 
G4double tMin
 Dimension parameter - protected for derived class access. More...
 
G4double tMax
 Dimension parameter - protected for derived class access. More...
 
G4double xStep
 Dimension parameter - protected for derived class access. More...
 
G4double yStep
 Dimension parameter - protected for derived class access. More...
 
G4double zStep
 Dimension parameter - protected for derived class access. More...
 
G4double tStep
 Dimension parameter - protected for derived class access. More...
 
- Protected Attributes inherited from BDSArray4D
BDSFieldValue defaultValue
 Need to store a default value so it can be return by reference. More...
 
const G4int nX
 Dimension. More...
 
const G4int nY
 Dimension. More...
 
const G4int nZ
 Dimension. More...
 
const G4int nT
 Dimension. More...
 

Static Private Member Functions

static void CheckStep (G4double step, const G4String &name)
 

Friends

std::ostream & operator<< (std::ostream &out, BDSArray4DCoords const &a)
 Output stream. More...
 

Detailed Description

Overlay of 4D array that provides uniform only spatial coordinate mapping.

This class overlays (through inheritance) a BDSArray4D instance and provides a mapping from array index coordinates to real spatial coordinates that are real numbers.

Various interfaces are provided to find the nearest entry in an array or convert to the coordinate system. This may seem a little more complicated than is perhaps required, but the flexibility is required for interpolators that will need to query the array in both array and spatial coordinates.

Author
Laurie Nevay

Definition at line 48 of file BDSArray4DCoords.hh.

Constructor & Destructor Documentation

◆ BDSArray4DCoords() [1/2]

BDSArray4DCoords::BDSArray4DCoords ( )
delete

No default constructor as the array is not adjustable after construction and therefore the size must be known at construction time.

◆ BDSArray4DCoords() [2/2]

BDSArray4DCoords::BDSArray4DCoords ( G4int  nXIn,
G4int  nYIn,
G4int  nZIn,
G4int  nTIn,
G4double  xMinIn,
G4double  xMaxIn,
G4double  yMinIn,
G4double  yMaxIn,
G4double  zMinIn,
G4double  zMaxIn,
G4double  tMinIn,
G4double  tMaxIn,
BDSDimensionType  xDimensionIn = BDSDimensionType::x,
BDSDimensionType  yDimensionIn = BDSDimensionType::y,
BDSDimensionType  zDimensionIn = BDSDimensionType::z,
BDSDimensionType  tDimensionIn = BDSDimensionType::t 
)

Constructor similar to BDSArray4D but with spatial limits in each dimension. The distance between the UNIFORMLY spaced data in spatial coordinates is calculated using the extents and the number of entries.

Definition at line 36 of file BDSArray4DCoords.cc.

References BuildDimensionIndex(), BDSArray4D::nT, BDSArray4D::nX, BDSArray4D::nY, BDSArray4D::nZ, tMax, tMin, tStep, xMax, xMin, xStep, yMax, yMin, yStep, zMax, zMin, and zStep.

Here is the call graph for this function:

◆ ~BDSArray4DCoords()

virtual BDSArray4DCoords::~BDSArray4DCoords ( )
inlinevirtual

Definition at line 68 of file BDSArray4DCoords.hh.

Member Function Documentation

◆ ArrayCoordsFromT()

virtual G4double BDSArray4DCoords::ArrayCoordsFromT ( G4double  t) const
inlinevirtual

Not much point in being both virtual and inline (in our use case) but has to be virtual.

Definition at line 97 of file BDSArray4DCoords.hh.

References tMin, and tStep.

Referenced by ArrayCoordsFromXYZT(), and BDSArray4DCoordsTransformed::ExtractSection2x2x2x2().

Here is the caller graph for this function:

◆ ArrayCoordsFromX()

virtual G4double BDSArray4DCoords::ArrayCoordsFromX ( G4double  x) const
inlinevirtual

◆ ArrayCoordsFromXY()

void BDSArray4DCoords::ArrayCoordsFromXY ( G4double &  x,
G4double &  xArr,
G4double &  y,
G4double &  yArr 
) const
inline

Utility version to forward to individual function.

Definition at line 101 of file BDSArray4DCoords.hh.

References ArrayCoordsFromX(), and ArrayCoordsFromY().

Referenced by BDSArray2DCoords::ExtractSection2x2(), BDSArray2DCoordsTransformed::ExtractSection2x2(), and BDSArray2DCoords::ExtractSection4x4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayCoordsFromXYZ()

void BDSArray4DCoords::ArrayCoordsFromXYZ ( G4double &  x,
G4double &  xArr,
G4double &  y,
G4double &  yArr,
G4double &  z,
G4double &  zArr 
) const
inline

Utility version to forward to individual function.

Definition at line 104 of file BDSArray4DCoords.hh.

References ArrayCoordsFromX(), ArrayCoordsFromY(), and ArrayCoordsFromZ().

Referenced by BDSArray3DCoords::ExtractSection2x2x2(), BDSArray3DCoordsTransformed::ExtractSection2x2x2(), and BDSArray3DCoords::ExtractSection4x4x4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayCoordsFromXYZT() [1/2]

void BDSArray4DCoords::ArrayCoordsFromXYZT ( G4double &  x,
G4double &  xArr,
G4double &  y,
G4double &  yArr,
G4double &  z,
G4double &  zArr,
G4double &  t,
G4double &  tArr 
) const
inline

Utility version to forward to individual function.

Definition at line 108 of file BDSArray4DCoords.hh.

References ArrayCoordsFromT(), ArrayCoordsFromX(), ArrayCoordsFromY(), and ArrayCoordsFromZ().

Referenced by ExtractSection2x2x2x2(), ExtractSection4x4x4x4(), and BDSArray4DCoordsTransformed::ExtractSection4x4x4x4().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArrayCoordsFromXYZT() [2/2]

BDSFourVector< G4double > BDSArray4DCoords::ArrayCoordsFromXYZT ( G4double  x,
G4double  y,
G4double  z,
G4double  t 
) const
inline

Convenience function to easily get array coords in all dimensions at once.

Definition at line 116 of file BDSArray4DCoords.hh.

References ArrayCoordsFromT(), ArrayCoordsFromX(), ArrayCoordsFromY(), and ArrayCoordsFromZ().

Here is the call graph for this function:

◆ ArrayCoordsFromY()

virtual G4double BDSArray4DCoords::ArrayCoordsFromY ( G4double  y) const
inlinevirtual

Not much point in being both virtual and inline (in our use case) but has to be virtual.

Reimplemented in BDSArray2DCoordsRDipole, and BDSArray2DCoordsRQuad.

Definition at line 95 of file BDSArray4DCoords.hh.

References yMin, and yStep.

Referenced by ArrayCoordsFromXY(), ArrayCoordsFromXYZ(), ArrayCoordsFromXYZT(), BDSArray4DCoordsTransformed::ExtractSection2x2x2x2(), BDSArray2DCoordsTransformed::ExtractSection4x4(), and BDSArray3DCoordsTransformed::ExtractSection4x4x4().

Here is the caller graph for this function:

◆ ArrayCoordsFromZ()

virtual G4double BDSArray4DCoords::ArrayCoordsFromZ ( G4double  z) const
inlinevirtual

Not much point in being both virtual and inline (in our use case) but has to be virtual.

Definition at line 96 of file BDSArray4DCoords.hh.

References zMin, and zStep.

Referenced by ArrayCoordsFromXYZ(), ArrayCoordsFromXYZT(), BDSArray4DCoordsTransformed::ExtractSection2x2x2x2(), and BDSArray3DCoordsTransformed::ExtractSection4x4x4().

Here is the caller graph for this function:

◆ ArrayToSpatialDimensionIndices()

std::array< G4int, 4 > BDSArray4DCoords::ArrayToSpatialDimensionIndices ( ) const
inline

Access all indices at once.

Definition at line 234 of file BDSArray4DCoords.hh.

◆ BuildDimensionIndex()

void BDSArray4DCoords::BuildDimensionIndex ( )
protected

Build up an array of ints based on the order of dimensions stored in the array.

Definition at line 232 of file BDSArray4DCoords.cc.

References FirstDimension(), FourthDimension(), SecondDimension(), ThirdDimension(), and BDSTypeSafeEnum< def, inner >::underlying().

Referenced by BDSArray4DCoords().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckStep()

void BDSArray4DCoords::CheckStep ( G4double  step,
const G4String &  name 
)
staticprivate

Definition at line 94 of file BDSArray4DCoords.cc.

◆ DimensionIndex()

G4int BDSArray4DCoords::DimensionIndex ( BDSDimensionType  spatialDimension) const

Return the index to be used in array arguments for a given spatial dimension. e.g. DimensionIndex((spatial) z) -> index 0 for 1D array holding spatial z.

Definition at line 240 of file BDSArray4DCoords.cc.

References BDSTypeSafeEnum< def, inner >::underlying().

Referenced by BDSFieldLoader::CreateOperators().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Extent()

BDSExtent BDSArray4DCoords::Extent ( ) const
virtual

Return the SPATIAL (only) extent of this field without any offset. Ignores time.

Reimplemented in BDSArray1DCoords, and BDSArray2DCoords.

Definition at line 227 of file BDSArray4DCoords.cc.

References xMax, xMin, yMax, yMin, zMax, and zMin.

Referenced by BDSInterpolator3D::Extent(), and BDSInterpolator4D::Extent().

Here is the caller graph for this function:

◆ ExtractNearest()

BDSFieldValue BDSArray4DCoords::ExtractNearest ( G4double  x,
G4double  y = 0,
G4double  z = 0,
G4double  t = 0 
) const
virtual

Extract nearest field value from array.

Reimplemented in BDSArray1DCoords, BDSArray1DCoordsTransformed, BDSArray2DCoords, BDSArray2DCoordsTransformed, BDSArray3DCoords, BDSArray3DCoordsTransformed, and BDSArray4DCoordsTransformed.

Definition at line 200 of file BDSArray4DCoords.cc.

References BDSArray4D::GetConst(), NearestT(), NearestX(), NearestY(), and NearestZ().

Referenced by BDSInterpolator4DNearest::GetInterpolatedValueT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExtractSection2x2x2x2()

void BDSArray4DCoords::ExtractSection2x2x2x2 ( G4double  x,
G4double  y,
G4double  z,
G4double  t,
BDSFieldValue(&)  localData[2][2][2][2],
G4double &  xFrac,
G4double &  yFrac,
G4double &  zFrac,
G4double &  tFrac 
) const
virtual

Extract 2x2x2x2 points lying around coordinate x.

Reimplemented in BDSArray4DCoordsTransformed.

Definition at line 130 of file BDSArray4DCoords.cc.

References ArrayCoordsFromXYZT(), and BDSArray4D::GetConst().

Referenced by BDSInterpolator4DLinear::GetInterpolatedValueT(), and BDSInterpolator4DLinearMag::GetInterpolatedValueT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExtractSection4x4x4x4()

void BDSArray4DCoords::ExtractSection4x4x4x4 ( G4double  x,
G4double  y,
G4double  z,
G4double  t,
BDSFieldValue(&)  localData[4][4][4][4],
G4double &  xFrac,
G4double &  yFrac,
G4double &  zFrac,
G4double &  tFrac 
) const
virtual

Extract 4x4x4x4 points lying around coordinate x.

Reimplemented in BDSArray4DCoordsTransformed.

Definition at line 165 of file BDSArray4DCoords.cc.

References ArrayCoordsFromXYZT(), and BDSArray4D::GetConst().

Referenced by BDSInterpolator4DCubic::GetInterpolatedValueT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FirstDimension()

BDSDimensionType BDSArray4DCoords::FirstDimension ( ) const
inline

Accessor for each dimension label. e.g. array 'x' = spatial z.

Definition at line 223 of file BDSArray4DCoords.hh.

References xDimension.

Referenced by BuildDimensionIndex(), BDSInterpolator1D::FirstDimension(), BDSInterpolator2D::FirstDimension(), and BDSInterpolator3D::FirstDimension().

Here is the caller graph for this function:

◆ FourthDimension()

BDSDimensionType BDSArray4DCoords::FourthDimension ( ) const
inline

Accessor for each dimension label. e.g. array 'x' = spatial z.

Definition at line 226 of file BDSArray4DCoords.hh.

Referenced by BuildDimensionIndex().

Here is the caller graph for this function:

◆ NearestT()

virtual G4int BDSArray4DCoords::NearestT ( G4double  t) const
inlinevirtual

Not much point in being both virtual and inline (in our use case) but has to be virtual.

Definition at line 151 of file BDSArray4DCoords.hh.

References tMin, and tStep.

Referenced by ExtractNearest(), and NearestXYZT().

Here is the caller graph for this function:

◆ NearestX()

virtual G4int BDSArray4DCoords::NearestX ( G4double  x) const
inlinevirtual

◆ NearestXYZT() [1/2]

BDSFourVector< G4int > BDSArray4DCoords::NearestXYZT ( const BDSFourVector< G4double > &  pos) const
inline

Return the index of the nearest field value in space via four-vector.

Definition at line 167 of file BDSArray4DCoords.hh.

References NearestT(), NearestX(), NearestY(), and NearestZ().

Here is the call graph for this function:

◆ NearestXYZT() [2/2]

BDSFourVector< G4int > BDSArray4DCoords::NearestXYZT ( G4double  x,
G4double  y,
G4double  z,
G4double  t 
) const
inline

Return the index of the nearest field value in space.

Definition at line 155 of file BDSArray4DCoords.hh.

References NearestT(), NearestX(), NearestY(), and NearestZ().

Here is the call graph for this function:

◆ NearestY()

virtual G4int BDSArray4DCoords::NearestY ( G4double  y) const
inlinevirtual

Not much point in being both virtual and inline (in our use case) but has to be virtual.

Reimplemented in BDSArray2DCoordsRDipole, and BDSArray2DCoordsRQuad.

Definition at line 149 of file BDSArray4DCoords.hh.

References yMin, and yStep.

Referenced by BDSArray2DCoords::ExtractNearest(), BDSArray2DCoordsTransformed::ExtractNearest(), BDSArray3DCoords::ExtractNearest(), BDSArray3DCoordsTransformed::ExtractNearest(), ExtractNearest(), BDSArray4DCoordsTransformed::ExtractNearest(), and NearestXYZT().

Here is the caller graph for this function:

◆ NearestZ()

virtual G4int BDSArray4DCoords::NearestZ ( G4double  z) const
inlinevirtual

Not much point in being both virtual and inline (in our use case) but has to be virtual.

Definition at line 150 of file BDSArray4DCoords.hh.

References zMin, and zStep.

Referenced by BDSArray3DCoords::ExtractNearest(), BDSArray3DCoordsTransformed::ExtractNearest(), ExtractNearest(), and NearestXYZT().

Here is the caller graph for this function:

◆ OutsideCoords()

G4bool BDSArray4DCoords::OutsideCoords ( G4double  x,
G4double  y,
G4double  z,
G4double  t 
) const
virtual

Whether the spatial coordinates lie outside the range of the array or not.

Reimplemented in BDSArray2DCoordsRDipole, and BDSArray2DCoordsRQuad.

Definition at line 103 of file BDSArray4DCoords.cc.

References tMax, xMax, yMax, and zMax.

Referenced by OutsideCoordsWarn().

Here is the caller graph for this function:

◆ OutsideCoordsWarn()

void BDSArray4DCoords::OutsideCoordsWarn ( G4double  x,
G4double  y,
G4double  z,
G4double  t 
) const
virtual

Whether the spatial coordinates lie outside the range of the array or not and warn and exit if so. Uses OutsideCoords but warns and exits if the coordinates are outside the array.

Definition at line 115 of file BDSArray4DCoords.cc.

References OutsideCoords().

Here is the call graph for this function:

◆ Print()

std::ostream & BDSArray4DCoords::Print ( std::ostream &  out) const
virtual

Overloaded output function from BDSArray4D. Prints spatial map parameters, then underlying array.

Reimplemented from BDSArray4D.

Reimplemented in BDSArray1DCoordsTransformed, BDSArray2DCoordsRDipole, BDSArray2DCoordsRQuad, BDSArray2DCoordsTransformed, BDSArray3DCoordsTransformed, and BDSArray4DCoordsTransformed.

Definition at line 213 of file BDSArray4DCoords.cc.

References BDSArray4D::Print(), tMax, tMin, xMax, xMin, yMax, yMin, zMax, and zMin.

Referenced by BDSArray1DCoordsTransformed::Print(), BDSArray2DCoordsRDipole::Print(), BDSArray2DCoordsRQuad::Print(), BDSArray2DCoordsTransformed::Print(), BDSArray3DCoordsTransformed::Print(), and BDSArray4DCoordsTransformed::Print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SecondDimension()

BDSDimensionType BDSArray4DCoords::SecondDimension ( ) const
inline

Accessor for each dimension label. e.g. array 'x' = spatial z.

Definition at line 224 of file BDSArray4DCoords.hh.

Referenced by BuildDimensionIndex(), BDSInterpolator2D::SecondDimension(), and BDSInterpolator3D::SecondDimension().

Here is the caller graph for this function:

◆ SmallestSpatialStep()

G4double BDSArray4DCoords::SmallestSpatialStep ( ) const
inline

Definition at line 77 of file BDSArray4DCoords.hh.

◆ TFromArrayCoords()

G4double BDSArray4DCoords::TFromArrayCoords ( G4double  tCoord) const
inline

Return spatial value from a continuous array coordinate in one dimension.

Definition at line 131 of file BDSArray4DCoords.hh.

References tMin, and tStep.

Referenced by XYZTFromArrayCoords().

Here is the caller graph for this function:

◆ ThirdDimension()

BDSDimensionType BDSArray4DCoords::ThirdDimension ( ) const
inline

Accessor for each dimension label. e.g. array 'x' = spatial z.

Definition at line 225 of file BDSArray4DCoords.hh.

Referenced by BuildDimensionIndex(), and BDSInterpolator3D::ThirdDimension().

Here is the caller graph for this function:

◆ TMax()

G4double BDSArray4DCoords::TMax ( ) const
inline

Definition at line 220 of file BDSArray4DCoords.hh.

◆ TMin()

G4double BDSArray4DCoords::TMin ( ) const
inline

Definition at line 216 of file BDSArray4DCoords.hh.

◆ TStep()

G4double BDSArray4DCoords::TStep ( ) const
inline

The distance in spatial coordinates between any two points in the array.

Definition at line 74 of file BDSArray4DCoords.hh.

References tStep.

◆ XFromArrayCoords()

G4double BDSArray4DCoords::XFromArrayCoords ( G4double  xCoord) const
inline

Return spatial value from a continuous array coordinate in one dimension.

Definition at line 128 of file BDSArray4DCoords.hh.

References xMin, and xStep.

Referenced by XYZTFromArrayCoords().

Here is the caller graph for this function:

◆ XMax()

G4double BDSArray4DCoords::XMax ( ) const
inline

Definition at line 217 of file BDSArray4DCoords.hh.

◆ XMin()

G4double BDSArray4DCoords::XMin ( ) const
inline

Definition at line 213 of file BDSArray4DCoords.hh.

◆ XStep()

G4double BDSArray4DCoords::XStep ( ) const
inline

The distance in spatial coordinates between any two points in the array.

Definition at line 71 of file BDSArray4DCoords.hh.

References xStep.

Referenced by BDSFieldLoader::LoadPoissonSuperFishBQuad().

Here is the caller graph for this function:

◆ XYZTFromArrayCoords()

BDSFourVector< G4double > BDSArray4DCoords::XYZTFromArrayCoords ( G4double  x,
G4double  y,
G4double  z,
G4double  t 
) const
inline

Convenience function to get the spatial coordinates from continuous array coordinates for all dimensions at once.

Definition at line 136 of file BDSArray4DCoords.hh.

References TFromArrayCoords(), XFromArrayCoords(), YFromArrayCoords(), and ZFromArrayCoords().

Here is the call graph for this function:

◆ YFromArrayCoords()

G4double BDSArray4DCoords::YFromArrayCoords ( G4double  yCoord) const
inline

Return spatial value from a continuous array coordinate in one dimension.

Definition at line 129 of file BDSArray4DCoords.hh.

References yMin, and yStep.

Referenced by XYZTFromArrayCoords().

Here is the caller graph for this function:

◆ YMax()

G4double BDSArray4DCoords::YMax ( ) const
inline

Definition at line 218 of file BDSArray4DCoords.hh.

◆ YMin()

G4double BDSArray4DCoords::YMin ( ) const
inline

Definition at line 214 of file BDSArray4DCoords.hh.

◆ YStep()

G4double BDSArray4DCoords::YStep ( ) const
inline

The distance in spatial coordinates between any two points in the array.

Definition at line 72 of file BDSArray4DCoords.hh.

References yStep.

Referenced by BDSFieldLoader::LoadPoissonSuperFishBQuad().

Here is the caller graph for this function:

◆ ZFromArrayCoords()

G4double BDSArray4DCoords::ZFromArrayCoords ( G4double  zCoord) const
inline

Return spatial value from a continuous array coordinate in one dimension.

Definition at line 130 of file BDSArray4DCoords.hh.

References zMin, and zStep.

Referenced by XYZTFromArrayCoords().

Here is the caller graph for this function:

◆ ZMax()

G4double BDSArray4DCoords::ZMax ( ) const
inline

Definition at line 219 of file BDSArray4DCoords.hh.

◆ ZMin()

G4double BDSArray4DCoords::ZMin ( ) const
inline

Definition at line 215 of file BDSArray4DCoords.hh.

◆ ZStep()

G4double BDSArray4DCoords::ZStep ( ) const
inline

The distance in spatial coordinates between any two points in the array.

Definition at line 73 of file BDSArray4DCoords.hh.

References zStep.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
BDSArray4DCoords const &  a 
)
friend

Output stream.

Definition at line 222 of file BDSArray4DCoords.cc.

Field Documentation

◆ dimensions

std::array<G4int, 4> BDSArray4DCoords::dimensions
protected

Definition at line 264 of file BDSArray4DCoords.hh.

◆ smallestSpatialStep

G4double BDSArray4DCoords::smallestSpatialStep
protected

Definition at line 256 of file BDSArray4DCoords.hh.

◆ tDimension

BDSDimensionType BDSArray4DCoords::tDimension
protected

Definition at line 263 of file BDSArray4DCoords.hh.

◆ tMax

G4double BDSArray4DCoords::tMax
protected

Dimension parameter - protected for derived class access.

Definition at line 248 of file BDSArray4DCoords.hh.

Referenced by BDSArray4DCoords(), BDSArray2DCoordsRDipole::OutsideCoords(), BDSArray2DCoordsRQuad::OutsideCoords(), OutsideCoords(), and Print().

◆ tMin

G4double BDSArray4DCoords::tMin
protected

Dimension parameter - protected for derived class access.

Definition at line 247 of file BDSArray4DCoords.hh.

Referenced by ArrayCoordsFromT(), BDSArray4DCoords(), NearestT(), Print(), and TFromArrayCoords().

◆ tStep

G4double BDSArray4DCoords::tStep
protected

Dimension parameter - protected for derived class access.

Definition at line 253 of file BDSArray4DCoords.hh.

Referenced by ArrayCoordsFromT(), BDSArray4DCoords(), NearestT(), TFromArrayCoords(), and TStep().

◆ xDimension

BDSDimensionType BDSArray4DCoords::xDimension
protected

Which dimension the contained data represents spatially. Always referred to locally as 'x' but may represent another dimension.

Definition at line 260 of file BDSArray4DCoords.hh.

Referenced by FirstDimension().

◆ xMax

G4double BDSArray4DCoords::xMax
protected

◆ xMin

G4double BDSArray4DCoords::xMin
protected

◆ xStep

G4double BDSArray4DCoords::xStep
protected

◆ yDimension

BDSDimensionType BDSArray4DCoords::yDimension
protected

Definition at line 261 of file BDSArray4DCoords.hh.

◆ yMax

G4double BDSArray4DCoords::yMax
protected

◆ yMin

G4double BDSArray4DCoords::yMin
protected

Dimension parameter - protected for derived class access.

Definition at line 243 of file BDSArray4DCoords.hh.

Referenced by BDSArray2DCoordsRQuad::ArrayCoordsFromY(), ArrayCoordsFromY(), BDSArray4DCoords(), BDSArray2DCoords::Extent(), Extent(), NearestY(), Print(), and YFromArrayCoords().

◆ yStep

G4double BDSArray4DCoords::yStep
protected

◆ zDimension

BDSDimensionType BDSArray4DCoords::zDimension
protected

Definition at line 262 of file BDSArray4DCoords.hh.

◆ zMax

G4double BDSArray4DCoords::zMax
protected

Dimension parameter - protected for derived class access.

Definition at line 246 of file BDSArray4DCoords.hh.

Referenced by BDSArray4DCoords(), Extent(), BDSArray2DCoordsRDipole::OutsideCoords(), BDSArray2DCoordsRQuad::OutsideCoords(), OutsideCoords(), and Print().

◆ zMin

G4double BDSArray4DCoords::zMin
protected

Dimension parameter - protected for derived class access.

Definition at line 245 of file BDSArray4DCoords.hh.

Referenced by ArrayCoordsFromZ(), BDSArray4DCoords(), Extent(), NearestZ(), Print(), and ZFromArrayCoords().

◆ zStep

G4double BDSArray4DCoords::zStep
protected

Dimension parameter - protected for derived class access.

Definition at line 252 of file BDSArray4DCoords.hh.

Referenced by ArrayCoordsFromZ(), BDSArray4DCoords(), NearestZ(), ZFromArrayCoords(), and ZStep().


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