CMS 3D CMS Logo

MFGrid.h
Go to the documentation of this file.
1 #ifndef MFGrid_h
2 #define MFGrid_h
3 
14 
15 struct Dimensions {
16  int w;
17  int h;
18  int d;
19 };
20 
21 struct Indexes {
22  int i;
23  int j;
24  int k;
25 };
26 
27 class MFGrid : public MagProviderInterpol {
28 public:
33 
34  explicit MFGrid(const GloballyPositioned<float>& vol) : frame_(vol) {}
35 
36  ~MFGrid() override {}
37 
39  LocalVector valueInTesla(const LocalPoint& p) const override = 0;
40 
41  virtual void dump() const {}
42 
44  virtual void toGridFrame(const LocalPoint& p, double& a, double& b, double& c) const = 0;
45 
47  virtual LocalPoint fromGridFrame(double a, double b, double c) const = 0;
48 
49  virtual Dimensions dimensions() const = 0;
50 
52  virtual LocalPoint nodePosition(int i, int j, int k) const = 0;
53 
55  virtual LocalVector nodeValue(int i, int j, int k) const = 0;
56 
57  virtual Indexes index(const LocalPoint& p) const { return Indexes(); }
58 
60  const GloballyPositioned<float>& frame() const { return frame_; }
61 
62 private:
64 };
65 
66 #endif
Vector3DBase< float, LocalTag >
MagProviderInterpol.h
GloballyPositioned
Definition: GloballyPositioned.h:18
mps_fire.i
i
Definition: mps_fire.py:428
Indexes
Definition: MFGrid.h:21
MFGrid
Definition: MFGrid.h:27
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
MFGrid::LocalVector
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
MagneticFieldProvider< float >
MFGrid::frame
const GloballyPositioned< float > & frame() const
Local reference frame.
Definition: MFGrid.h:60
MFGrid::frame_
GloballyPositioned< float > frame_
Definition: MFGrid.h:63
Dimensions::w
int w
Definition: MFGrid.h:16
MFGrid::index
virtual Indexes index(const LocalPoint &p) const
Definition: MFGrid.h:57
GloballyPositioned.h
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
MFGrid::nodeValue
virtual LocalVector nodeValue(int i, int j, int k) const =0
Field value at node.
a
double a
Definition: hdecay.h:119
Indexes::i
int i
Definition: MFGrid.h:22
Indexes::k
int k
Definition: MFGrid.h:24
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
MFGrid::fromGridFrame
virtual LocalPoint fromGridFrame(double a, double b, double c) const =0
find grid coordinates for point. For debugging and validation only.
MFGrid::nodePosition
virtual LocalPoint nodePosition(int i, int j, int k) const =0
Position of node in local frame.
MFGrid::dump
virtual void dump() const
Definition: MFGrid.h:41
MFGrid::dimensions
virtual Dimensions dimensions() const =0
MFGrid::MFGrid
MFGrid(const GloballyPositioned< float > &vol)
Definition: MFGrid.h:34
MFGrid::GlobalVector
GloballyPositioned< float >::GlobalVector GlobalVector
Definition: MFGrid.h:30
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.
Dimensions::h
int h
Definition: MFGrid.h:17
Dimensions::d
int d
Definition: MFGrid.h:18
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Indexes::j
int j
Definition: MFGrid.h:23
MFGrid::~MFGrid
~MFGrid() override
Definition: MFGrid.h:36
MFGrid::valueInTesla
LocalVector valueInTesla(const LocalPoint &p) const override=0
Interpolated field value at given point.
MFGrid::GlobalPoint
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MFGrid.h:29
Dimensions
Definition: MFGrid.h:15