BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSArray4DCoordsTransformed.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 BDSARRAY4DCOORDSTRANSFORMED_H
20#define BDSARRAY4DCOORDSTRANSFORMED_H
21
22#include "BDSArray4DCoords.hh"
23#include "BDSFieldValue.hh"
24#include "BDSFourVector.hh"
25
26#include "globals.hh"
27
28#include <ostream>
29
32class BDSExtent;
33
43{
44public:
49 BDSArrayOperatorIndex* indexOperatorIn,
50 BDSArrayOperatorValue* valueOperatorIn);
52
55 virtual void ExtractSection2x2x2x2(G4double x,
56 G4double y,
57 G4double z,
58 G4double t,
59 BDSFieldValue (&localData)[2][2][2][2],
60 G4double& xFrac,
61 G4double& yFrac,
62 G4double& zFrac,
63 G4double& tFrac) const;
64
67 virtual void ExtractSection4x4x4x4(G4double x,
68 G4double y,
69 G4double z,
70 G4double t,
71 BDSFieldValue (&localData)[4][4][4][4],
72 G4double& xFrac,
73 G4double& yFrac,
74 G4double& zFrac,
75 G4double& tFrac) const;
76
79 virtual BDSFieldValue ExtractNearest(G4double x,
80 G4double y = 0,
81 G4double z = 0,
82 G4double t = 0) const;
83
84 virtual std::ostream& Print(std::ostream& out) const;
85
87 friend std::ostream& operator<< (std::ostream& out, BDSArray4DCoordsTransformed const &a);
88
89private:
90 BDSArrayOperatorIndex* indexOperator;
91 BDSArrayOperatorValue* valueOperator;
92
96};
97
98#endif
Wrapped BDSArray4DCoords with possible transformation to extend field.
BDSArray4DCoordsTransformed()=delete
No default constructor.
virtual void ExtractSection4x4x4x4(G4double x, G4double y, G4double z, G4double t, BDSFieldValue(&localData)[4][4][4][4], G4double &xFrac, G4double &yFrac, G4double &zFrac, G4double &tFrac) const
friend std::ostream & operator<<(std::ostream &out, BDSArray4DCoordsTransformed const &a)
Delegate function to call polymorphic Print().
virtual BDSFieldValue ExtractNearest(G4double x, G4double y=0, G4double z=0, G4double t=0) const
virtual std::ostream & Print(std::ostream &out) const
virtual void ExtractSection2x2x2x2(G4double x, G4double y, G4double z, G4double t, BDSFieldValue(&localData)[2][2][2][2], G4double &xFrac, G4double &yFrac, G4double &zFrac, G4double &tFrac) const
Overlay of 4D array that provides uniform only spatial coordinate mapping.
Interface for modifying by reference array indices.
Interface for modifying field values.
Holder for +- extents in 3 dimensions.
Definition: BDSExtent.hh:39