19#include "BDSArray2DCoordsRQuad.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;
95 xi =
nX - 1 - x; xr = -1;
96 yi =
nY - 1 - y; yr = -1;
101 yi = y -
nY + 1; yr = -1;
108 xi = x -
nX + 1; xr = -1;
118 G4bool swapResult =
false;
145 G4bool rx = x < 0 || x > 2*(
nX-1);
146 G4bool ry = y < 0 || y > 2*(
nY-1);
147 G4bool rz = z < 0 || z >
nZ-1;
148 G4bool rt = t < 0 || t >
nT-1;
149 return rx || ry || rz || rt;
156 out2 << G4endl <<
"REFLECTED VERSION" << G4endl;
158 for (G4int t = 0; t <
nT; t++)
160 for (G4int z = 0; z <
nZ; z++)
162 for (G4int y = 0; y < 2*
nY; y++)
164 for (G4int x = 0; x < 2*
nX; x++)
165 {out2 <<
GetConst(x,y,z,t) << G4endl;}
A wrapper to achieve 2D reflection of a minimal quadrupole field solve.
virtual G4int NearestX(G4double x) const
Overridden from BDSArray4DCoords.
virtual G4int NearestY(G4double y) const
Overridden from BDSArray4DCoords.
BDSFieldValue returnValue
virtual G4double ArrayCoordsFromY(G4double y) const
Overridden from BDSArray4DCoords.
virtual const BDSFieldValue & GetConst(G4int x, G4int y, G4int z=0, G4int t=0) const
Overridden from BDSArray4D.
virtual G4double ArrayCoordsFromX(G4double x) const
Overridden from BDSArray4DCoords.
virtual G4bool Outside(G4int x, G4int y, G4int z, G4int t) const
Overridden from BDSArray4D.
virtual G4bool OutsideCoords(G4double x, G4double y, G4double z, G4double t) const
Overridden from BDSArray4DCoords.
virtual std::ostream & Print(std::ostream &out) const
2D array with spatial mapping derived from BDSArray4DCoords.
G4double xMin
Dimension parameter - protected for derived class access.
G4double yMin
Dimension parameter - protected for derived class access.
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 & z() const
Accessor by name.
const T & x() const
Accessor by name.
const T & y() const
Accessor by name.