CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MFGrid3D.h
Go to the documentation of this file.
1 #ifndef MFGrid3D_h
2 #define MFGrid3D_h
3 
13 #include "Grid1D.h"
14 #include "Grid3D.h"
16 
17 class dso_internal MFGrid3D : public MFGrid {
18 public:
19  explicit MFGrid3D(const GloballyPositioned<float>& vol) : MFGrid(vol) {}
20 
21  Dimensions dimensions(void) const override {
23  tmp.w = grid_.grida().nodes();
24  tmp.h = grid_.gridb().nodes();
25  tmp.d = grid_.gridc().nodes();
26  return tmp;
27  }
28 
30  LocalPoint nodePosition(int i, int j, int k) const override {
31  return fromGridFrame(grid_.grida().node(i), grid_.gridb().node(j), grid_.gridc().node(k));
32  }
33 
35  LocalVector nodeValue(int i, int j, int k) const override {
37  return MFGrid::LocalVector(grid_(i, j, k));
38  }
39 
40  Indexes index(const LocalPoint& p) const override {
42  double a, b, c;
43  toGridFrame(p, a, b, c);
44  result.i = grid_.grida().index(a);
45  result.j = grid_.gridb().index(b);
46  result.k = grid_.gridc().index(c);
47  return result;
48  }
49 
50  LocalVector valueInTesla(const LocalPoint& p) const override;
51 
53  virtual LocalVector uncheckedValueInTesla(const LocalPoint& p) const = 0;
54 
55 protected:
56  using GridType = Grid3D;
58 
59  GridType grid_; // should become private...
60 
61  void setGrid(const GridType& grid) { grid_ = grid; }
62 };
63 
64 #endif
const edm::EventSetup & c
MFGrid3D(const GloballyPositioned< float > &vol)
Definition: MFGrid3D.h:19
LocalVector nodeValue(int i, int j, int k) const override
Field value at node.
Definition: MFGrid3D.h:35
int j
Definition: MFGrid.h:23
int i
Definition: MFGrid.h:22
Dimensions dimensions(void) const override
Definition: MFGrid3D.h:21
Definition: MFGrid.h:21
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MFGrid.h:31
virtual void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const =0
find grid coordinates for point. For debugging and validation only.
int k
Definition: MFGrid.h:24
int w
Definition: MFGrid.h:16
tuple result
Definition: mps_fire.py:311
#define dso_internal
Definition: Visibility.h:13
Definition: Grid3D.h:28
virtual LocalPoint fromGridFrame(double a, double b, double c) const =0
find grid coordinates for point. For debugging and validation only.
GridType grid_
Definition: MFGrid3D.h:59
double b
Definition: hdecay.h:118
Definition: MFGrid.h:27
int d
Definition: MFGrid.h:18
int h
Definition: MFGrid.h:17
LocalVector valueInTesla(const LocalPoint &p) const override=0
Interpolated field value at given point.
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
BStorageArray BVector
Definition: Grid3D.h:35
LocalPoint nodePosition(int i, int j, int k) const override
Position of node in local frame.
Definition: MFGrid3D.h:30
double a
Definition: hdecay.h:119
Indexes index(const LocalPoint &p) const override
Definition: MFGrid3D.h:40
void setGrid(const GridType &grid)
Definition: MFGrid3D.h:61
tmp
align.sh
Definition: createJobs.py:716