BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSArray2DCoordsRQuad.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSARRAY2DCOORDSRQUAD_H
19#define BDSARRAY2DCOORDSRQUAD_H
20
21#include "BDSArray2DCoords.hh"
22#include "BDSFieldValue.hh"
23
24#include "G4Types.hh"
25
26#include <ostream>
27
65{
66public:
67 BDSArray2DCoordsRQuad() = delete;
69 explicit BDSArray2DCoordsRQuad(BDSArray2DCoords* arrayIn);
70 virtual ~BDSArray2DCoordsRQuad(){;}
71
73 virtual G4bool OutsideCoords(G4double x,
74 G4double y,
75 G4double z,
76 G4double t) const;
77
78 virtual G4double ArrayCoordsFromX(G4double x) const;
79 virtual G4double ArrayCoordsFromY(G4double y) const;
80
81 virtual G4int NearestX(G4double x) const;
82 virtual G4int NearestY(G4double y) const;
84
86 virtual const BDSFieldValue& GetConst(G4int x,
87 G4int y,
88 G4int z = 0,
89 G4int t = 0) const;
90
91 virtual G4bool Outside(G4int x,
92 G4int y,
93 G4int z,
94 G4int t) const;
96
99 virtual std::ostream& Print(std::ostream& out) const;
100
102 friend std::ostream& operator<< (std::ostream& out, BDSArray2DCoordsRQuad const &a);
103
104private:
108};
109
110#endif
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.
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.
friend std::ostream & operator<<(std::ostream &out, BDSArray2DCoordsRQuad const &a)
Delegate function to call polymorphic Print().
virtual std::ostream & Print(std::ostream &out) const
2D array with spatial mapping derived from BDSArray4DCoords.