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