CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MFGrid.h
Go to the documentation of this file.
1 #ifndef MFGrid_h
2 #define MFGrid_h
3 
16 
17 struct Dimensions
18 {
19  int w;
20  int h;
21  int d;
22 };
23 
24 struct Indexes
25 {
26  int i;
27  int j;
28  int k;
29 };
30 
31 class MFGrid : public MagProviderInterpol {
32 public:
33 
38 
39  explicit MFGrid( const GloballyPositioned<float>& vol) : frame_(vol) {}
40 
41  virtual ~MFGrid() {}
42 
44  virtual LocalVector valueInTesla( const LocalPoint& p) const = 0;
45 
46  virtual void dump() const {}
47 
49  virtual void toGridFrame( const LocalPoint& p, double& a, double& b, double& c) const = 0;
50 
52  virtual LocalPoint fromGridFrame( double a, double b, double c) const = 0;
53 
54  virtual Dimensions dimensions() const = 0;
55 
57  virtual LocalPoint nodePosition( int i, int j, int k) const = 0;
58 
60  virtual LocalVector nodeValue( int i, int j, int k) const = 0;
61 
62  virtual Indexes index( const LocalPoint& p) const {return Indexes();}
63 
65  const GloballyPositioned<float>& frame() const { return frame_;}
66 
67 private:
68 
70 
71 };
72 
73 #endif
int i
Definition: DBlmapReader.cc:9
virtual Indexes index(const LocalPoint &p) const
Definition: MFGrid.h:62
int j
Definition: MFGrid.h:27
int i
Definition: MFGrid.h:26
Definition: MFGrid.h:24
GloballyPositioned< float >::GlobalVector GlobalVector
Definition: MFGrid.h:35
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MFGrid.h:36
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:28
virtual ~MFGrid()
Definition: MFGrid.h:41
int w
Definition: MFGrid.h:19
virtual LocalVector nodeValue(int i, int j, int k) const =0
Field value at node.
virtual LocalPoint nodePosition(int i, int j, int k) const =0
Position of node in local frame.
GloballyPositioned< float > frame_
Definition: MFGrid.h:69
virtual Dimensions dimensions() const =0
int j
Definition: DBlmapReader.cc:9
virtual LocalPoint fromGridFrame(double a, double b, double c) const =0
find grid coordinates for point. For debugging and validation only.
int k[5][pyjets_maxn]
virtual LocalVector valueInTesla(const LocalPoint &p) const =0
Interpolated field value at given point.
virtual void dump() const
Definition: MFGrid.h:46
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MFGrid.h:34
MFGrid(const GloballyPositioned< float > &vol)
Definition: MFGrid.h:39
double b
Definition: hdecay.h:120
Definition: MFGrid.h:31
int d
Definition: MFGrid.h:21
int h
Definition: MFGrid.h:20
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:37
double a
Definition: hdecay.h:121
const GloballyPositioned< float > & frame() const
Local reference frame.
Definition: MFGrid.h:65