BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSArray1DCoordsTransformed.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 BDSARRAY1DCOORDSTRANSFORMED_H
19#define BDSARRAY1DCOORDSTRANSFORMED_H
20
21#include "BDSArray1DCoords.hh"
22#include "BDSDimensionType.hh"
23#include "BDSFieldValue.hh"
24
25#include "G4Types.hh"
26
27#include <ostream>
28
31
45{
46public:
51 BDSArrayOperatorIndex* indexOperatorIn,
52 BDSArrayOperatorValue* valueOperatorIn);
54
57 virtual void ExtractSection2(G4double x,
58 BDSFieldValue (&localData)[2],
59 G4double& xFrac) const;
60
63 virtual void ExtractSection4(G4double x,
64 BDSFieldValue (&localData)[4],
65 G4double& xFrac) const;
66
68 virtual BDSFieldValue ExtractNearest(G4double x,
69 G4double y = 0,
70 G4double z = 0,
71 G4double t = 0) const;
72
73 virtual std::ostream& Print(std::ostream& out) const;
74
76 friend std::ostream& operator<< (std::ostream& out, BDSArray1DCoordsTransformed const &a);
77
78private:
79 BDSArrayOperatorIndex* indexOperator;
80 BDSArrayOperatorValue* valueOperator;
81
85};
86
87#endif
Wrapped BDSArray1DCoords with possible transformation to extend field.
friend std::ostream & operator<<(std::ostream &out, BDSArray1DCoordsTransformed const &a)
Delegate function to call polymorphic Print().
virtual std::ostream & Print(std::ostream &out) const
virtual void ExtractSection2(G4double x, BDSFieldValue(&localData)[2], G4double &xFrac) const
virtual void ExtractSection4(G4double x, BDSFieldValue(&localData)[4], G4double &xFrac) const
virtual BDSFieldValue ExtractNearest(G4double x, G4double y=0, G4double z=0, G4double t=0) const
Extract nearest field value from array. y,z,t ignored but required for overload.
BDSArray1DCoordsTransformed()=delete
No default constructor.
1D array with spatial mapping derived from BDSArray4DCoords.
Interface for modifying by reference array indices.
Interface for modifying field values.