CMS 3D CMS Logo

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
Vector3DBase< float, LocalTag >
GloballyPositioned< float >
Visibility.h
mps_fire.i
i
Definition: mps_fire.py:428
MFGrid3D::index
Indexes index(const LocalPoint &p) const override
Definition: MFGrid3D.h:40
Indexes
Definition: MFGrid.h:21
MFGrid
Definition: MFGrid.h:27
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Basic3DVector.h
MFGrid::LocalVector
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
getRunAppsInfo.grid
grid
Definition: getRunAppsInfo.py:92
MFGrid3D::setGrid
void setGrid(const GridType &grid)
Definition: MFGrid3D.h:61
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
MFGrid3D::nodePosition
LocalPoint nodePosition(int i, int j, int k) const override
Position of node in local frame.
Definition: MFGrid3D.h:30
Grid3D
Definition: Grid3D.h:28
MFGrid3D::grid_
GridType grid_
Definition: MFGrid3D.h:59
MFGrid3D::nodeValue
LocalVector nodeValue(int i, int j, int k) const override
Field value at node.
Definition: MFGrid3D.h:35
MFGrid::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MFGrid.h:31
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, LocalTag >
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
MFGrid3D::MFGrid3D
MFGrid3D(const GloballyPositioned< float > &vol)
Definition: MFGrid3D.h:19
dso_internal
#define dso_internal
Definition: Visibility.h:13
MFGrid::fromGridFrame
virtual LocalPoint fromGridFrame(double a, double b, double c) const =0
find grid coordinates for point. For debugging and validation only.
Grid3D.h
BStorageArray
Definition: Grid3D.h:19
MFGrid::toGridFrame
virtual void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const =0
find grid coordinates for point. For debugging and validation only.
MFGrid.h
mps_fire.result
result
Definition: mps_fire.py:311
MFGrid3D::dimensions
Dimensions dimensions(void) const override
Definition: MFGrid3D.h:21
Grid1D.h
MFGrid3D
Definition: MFGrid3D.h:17
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Grid3D::BVector
BStorageArray BVector
Definition: Grid3D.h:35
MFGrid::valueInTesla
LocalVector valueInTesla(const LocalPoint &p) const override=0
Interpolated field value at given point.
Dimensions
Definition: MFGrid.h:15