18#include "BDSArray2DCoordsRQuad.hh"
19#include "BDSFieldValue.hh"
40 G4bool rz = z < zMin || z >
zMax;
41 G4bool rt = t < tMin || t >
tMax;
42 return rx || ry || rz || rt;
94 xi =
nX - 1 - x; xr = -1;
95 yi =
nY - 1 - y; yr = -1;
100 yi = y -
nY + 1; yr = -1;
107 xi = x -
nX + 1; xr = -1;
117 G4bool swapResult =
false;
144 G4bool rx = x < 0 || x > 2*(
nX-1);
145 G4bool ry = y < 0 || y > 2*(
nY-1);
146 G4bool rz = z < 0 || z >
nZ-1;
147 G4bool rt = t < 0 || t >
nT-1;
148 return rx || ry || rz || rt;
155 out2 << G4endl <<
"REFLECTED VERSION" << G4endl;
157 for (G4int t = 0; t <
nT; t++)
159 for (G4int z = 0; z <
nZ; z++)
161 for (G4int y = 0; y < 2*
nY; y++)
163 for (G4int x = 0; x < 2*
nX; x++)
164 {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.