19#include "BDSArray2DCoordsRDipole.hh"
20#include "BDSFieldValue.hh"
41 G4bool rz = z < zMin || z >
zMax;
42 G4bool rt = t < tMin || t >
tMax;
43 return rx || ry || rz || rt;
99 xi =
nX - 1 - x; xr = -1;
107 xi = x -
nX; xr = -1;
130 G4bool rx = x < 0 || x > 2*(
nX-1);
131 G4bool ry = y < 0 || y > 2*(
nY-1);
132 G4bool rz = z < 0 || z >
nZ-1;
133 G4bool rt = t < 0 || t >
nT-1;
134 return rx || ry || rz || rt;
141 out2 << G4endl <<
"REFLECTED VERSION" << G4endl;
143 for (G4int t = 0; t <
nT; t++)
145 for (G4int z = 0; z <
nZ; z++)
147 for (G4int y = 0; y < 2*
nY; y++)
149 for (G4int x = 0; x < 2*
nX; x++)
150 {out2 <<
GetConst(x,y,z,t) << G4endl;}
A wrapper to achieve 2D reflection of a minimal dipole field solve.
virtual G4double ArrayCoordsFromY(G4double y) const
Overridden from BDSArray4DCoords.
virtual G4bool OutsideCoords(G4double x, G4double y, G4double z, G4double t) const
Overridden from BDSArray4DCoords.
virtual G4double ArrayCoordsFromX(G4double x) const
Overridden from BDSArray4DCoords.
virtual G4int NearestX(G4double x) const
Overridden from BDSArray4DCoords.
virtual G4bool Outside(G4int x, G4int y, G4int z, G4int t) const
Overridden from BDSArray4D.
virtual const BDSFieldValue & GetConst(G4int x, G4int y, G4int z=0, G4int t=0) const
Overridden from BDSArray4D.
virtual G4int NearestY(G4double y) const
Overridden from BDSArray4DCoords.
virtual std::ostream & Print(std::ostream &out) const
BDSFieldValue returnValue
2D array with spatial mapping derived from BDSArray4DCoords.
G4double yStep
Dimension parameter - protected for derived class access.
G4double zMax
Dimension parameter - protected for derived class access.
G4double xStep
Dimension parameter - protected for derived class access.
G4double yMax
Dimension parameter - protected for derived class access.
G4double xMax
Dimension parameter - protected for derived class access.
G4double tMax
Dimension parameter - protected for derived class access.
BDSFieldValue defaultValue
Need to store a default value so it can be return by reference.
virtual const BDSFieldValue & GetConst(G4int x, G4int y=0, G4int z=0, G4int t=0) const
virtual std::ostream & Print(std::ostream &out) const
const T & x() const
Accessor by name.
const T & y() const
Accessor by name.