BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSArray3DCoordsTransformed.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 BDSARRAY3DCOORDSTRANSFORMED_H
20#define BDSARRAY3DCOORDSTRANSFORMED_H
21
22#include "BDSArray3DCoords.hh"
23#include "BDSDimensionType.hh"
24#include "BDSFieldValue.hh"
25
26#include "G4Types.hh"
27
28#include <ostream>
29
32class BDSExtent;
33
43{
44public:
49 BDSArrayOperatorIndex* indexOperatorIn,
50 BDSArrayOperatorValue* valueOperatorIn);
52
55 virtual void ExtractSection2x2x2(G4double x,
56 G4double y,
57 G4double z,
58 BDSFieldValue (&localData)[2][2][2],
59 G4double& xFrac,
60 G4double& yFrac,
61 G4double& zFrac) const;
62
65 virtual void ExtractSection4x4x4(G4double x,
66 G4double y,
67 G4double z,
68 BDSFieldValue (&localData)[4][4][4],
69 G4double& xFrac,
70 G4double& yFrac,
71 G4double& zFrac) const;
72
75 virtual BDSFieldValue ExtractNearest(G4double x,
76 G4double y = 0,
77 G4double z = 0,
78 G4double t = 0) const;
79
80 virtual std::ostream& Print(std::ostream& out) const;
81
83 friend std::ostream& operator<< (std::ostream& out, BDSArray3DCoordsTransformed const &a);
84
85private:
86 BDSArrayOperatorIndex* indexOperator;
87 BDSArrayOperatorValue* valueOperator;
88
92};
93
94#endif
Wrapped BDSArray3DCoords with possible transformation to extend field.
virtual void ExtractSection2x2x2(G4double x, G4double y, G4double z, BDSFieldValue(&localData)[2][2][2], G4double &xFrac, G4double &yFrac, G4double &zFrac) const
virtual BDSFieldValue ExtractNearest(G4double x, G4double y=0, G4double z=0, G4double t=0) const
BDSArray3DCoordsTransformed()=delete
No default constructor.
virtual std::ostream & Print(std::ostream &out) const
virtual void ExtractSection4x4x4(G4double x, G4double y, G4double z, BDSFieldValue(&localData)[4][4][4], G4double &xFrac, G4double &yFrac, G4double &zFrac) const
friend std::ostream & operator<<(std::ostream &out, BDSArray3DCoordsTransformed const &a)
Delegate function to call polymorphic Print().
3D array with spatial mapping derived from BDSArray4DCoords.
Interface for modifying by reference array indices.
Interface for modifying field values.
Holder for +- extents in 3 dimensions.
Definition: BDSExtent.hh:39