BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSArray4DCoordsTransformed.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 BDSARRAY4DCOORDSTRANSFORMED_H
19#define BDSARRAY4DCOORDSTRANSFORMED_H
20
21#include "BDSArray4DCoords.hh"
22#include "BDSFieldValue.hh"
23#include "BDSFourVector.hh"
24
25#include "globals.hh"
26
27#include <ostream>
28
31class BDSExtent;
32
42{
43public:
48 BDSArrayOperatorIndex* indexOperatorIn,
49 BDSArrayOperatorValue* valueOperatorIn);
51
54 virtual void ExtractSection2x2x2x2(G4double x,
55 G4double y,
56 G4double z,
57 G4double t,
58 BDSFieldValue (&localData)[2][2][2][2],
59 G4double& xFrac,
60 G4double& yFrac,
61 G4double& zFrac,
62 G4double& tFrac) const;
63
66 virtual void ExtractSection4x4x4x4(G4double x,
67 G4double y,
68 G4double z,
69 G4double t,
70 BDSFieldValue (&localData)[4][4][4][4],
71 G4double& xFrac,
72 G4double& yFrac,
73 G4double& zFrac,
74 G4double& tFrac) const;
75
78 virtual BDSFieldValue ExtractNearest(G4double x,
79 G4double y = 0,
80 G4double z = 0,
81 G4double t = 0) const;
82
83 virtual std::ostream& Print(std::ostream& out) const;
84
86 friend std::ostream& operator<< (std::ostream& out, BDSArray4DCoordsTransformed const &a);
87
88private:
89 BDSArrayOperatorIndex* indexOperator;
90 BDSArrayOperatorValue* valueOperator;
91
95};
96
97#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:38