CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
MFGrid3D Class Referenceabstract

#include <MFGrid3D.h>

Inheritance diagram for MFGrid3D:
MFGrid MagneticFieldProvider< float > RectangularCartesianMFGrid RectangularCylindricalMFGrid SpecialCylindricalMFGrid TrapezoidalCartesianMFGrid TrapezoidalCylindricalMFGrid

Public Member Functions

Dimensions dimensions (void) const override
 
Indexes index (const LocalPoint &p) const override
 
 MFGrid3D (const GloballyPositioned< float > &vol)
 
LocalPoint nodePosition (int i, int j, int k) const override
 Position of node in local frame. More...
 
LocalVector nodeValue (int i, int j, int k) const override
 Field value at node. More...
 
virtual LocalVector uncheckedValueInTesla (const LocalPoint &p) const =0
 Interpolated field value at given point; does not check for exceptions. More...
 
LocalVector valueInTesla (const LocalPoint &p) const override
 Interpolated field value at given point. More...
 
- Public Member Functions inherited from MFGrid
virtual void dump () const
 
const GloballyPositioned< float > & frame () const
 Local reference frame. More...
 
virtual LocalPoint fromGridFrame (double a, double b, double c) const =0
 find grid coordinates for point. For debugging and validation only. More...
 
 MFGrid (const GloballyPositioned< float > &vol)
 
virtual void toGridFrame (const LocalPoint &p, double &a, double &b, double &c) const =0
 find grid coordinates for point. For debugging and validation only. More...
 
 ~MFGrid () override
 
- Public Member Functions inherited from MagneticFieldProvider< float >
virtual LocalVectorType derivativeInTeslaPerMeter (const LocalPointType &p, int N) const
 
virtual int hasDerivatives () const
 
virtual LocalVectorType valueInTesla (const LocalPointType &p) const=0
 
virtual ~MagneticFieldProvider ()
 

Protected Types

using BVector = Grid3D::BVector
 
using GridType = Grid3D
 

Protected Member Functions

void setGrid (const GridType &grid)
 

Protected Attributes

GridType grid_
 

Additional Inherited Members

- Public Types inherited from MFGrid
typedef GloballyPositioned< float >::GlobalPoint GlobalPoint
 
typedef GloballyPositioned< float >::GlobalVector GlobalVector
 
typedef GloballyPositioned< float >::LocalPoint LocalPoint
 
typedef GloballyPositioned< float >::LocalVector LocalVector
 
- Public Types inherited from MagneticFieldProvider< float >
typedef Point3DBase< float, GlobalTagGlobalPointType
 
typedef Vector3DBase< float, GlobalTagGlobalVectorType
 
typedef Point3DBase< float, LocalTagLocalPointType
 
typedef Vector3DBase< float, LocalTagLocalVectorType
 

Detailed Description

Generic virtual implementation of a MFGrid for a 3D underlying regular grid.

Author
T. Todorov

Definition at line 17 of file MFGrid3D.h.

Member Typedef Documentation

◆ BVector

Definition at line 57 of file MFGrid3D.h.

◆ GridType

using MFGrid3D::GridType = Grid3D
protected

Definition at line 56 of file MFGrid3D.h.

Constructor & Destructor Documentation

◆ MFGrid3D()

MFGrid3D::MFGrid3D ( const GloballyPositioned< float > &  vol)
inlineexplicit

Definition at line 19 of file MFGrid3D.h.

19 : MFGrid(vol) {}

Member Function Documentation

◆ dimensions()

Dimensions MFGrid3D::dimensions ( void  ) const
inlineoverridevirtual

Implements MFGrid.

Definition at line 21 of file MFGrid3D.h.

21  {
23  tmp.w = grid_.grida().nodes();
24  tmp.h = grid_.gridb().nodes();
25  tmp.d = grid_.gridc().nodes();
26  return tmp;
27  }

References createJobs::tmp.

◆ index()

Indexes MFGrid3D::index ( const LocalPoint p) const
inlineoverridevirtual

Reimplemented from MFGrid.

Definition at line 40 of file MFGrid3D.h.

40  {
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  }

References a, b, c, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, and MFGrid::toGridFrame().

Referenced by BeautifulSoup.PageElement::insert().

◆ nodePosition()

LocalPoint MFGrid3D::nodePosition ( int  i,
int  j,
int  k 
) const
inlineoverridevirtual

Position of node in local frame.

Implements MFGrid.

Definition at line 30 of file MFGrid3D.h.

30  {
32  }

References MFGrid::fromGridFrame(), mps_fire::i, dqmiolumiharvest::j, and dqmdumpme::k.

◆ nodeValue()

LocalVector MFGrid3D::nodeValue ( int  i,
int  j,
int  k 
) const
inlineoverridevirtual

Field value at node.

must check range here: FIX ME !!!!

Implements MFGrid.

Definition at line 35 of file MFGrid3D.h.

35  {
37  return MFGrid::LocalVector(grid_(i, j, k));
38  }

References mps_fire::i, dqmiolumiharvest::j, and dqmdumpme::k.

◆ setGrid()

void MFGrid3D::setGrid ( const GridType grid)
inlineprotected

Definition at line 61 of file MFGrid3D.h.

61 { grid_ = grid; }

References getRunAppsInfo::grid.

◆ uncheckedValueInTesla()

virtual LocalVector MFGrid3D::uncheckedValueInTesla ( const LocalPoint p) const
pure virtual

Interpolated field value at given point; does not check for exceptions.

Implemented in SpecialCylindricalMFGrid, TrapezoidalCartesianMFGrid, TrapezoidalCylindricalMFGrid, RectangularCartesianMFGrid, and RectangularCylindricalMFGrid.

Referenced by valueInTesla().

◆ valueInTesla()

MFGrid::LocalVector MFGrid3D::valueInTesla ( const LocalPoint p) const
overridevirtual

Interpolated field value at given point.

Implements MFGrid.

Definition at line 5 of file MFGrid3D.cc.

5  {
6  try {
7  return uncheckedValueInTesla(p);
8  } catch (GridInterpolator3DException& outside) {
9  double* limits = outside.limits();
10  LocalPoint lower = fromGridFrame(limits[0], limits[1], limits[2]);
12  throw MagVolumeOutsideValidity(lower, upper);
13  }
14 }

References MFGrid::fromGridFrame(), GridInterpolator3DException::limits(), TH2PolyOfflineMaps::limits, AlCaHLTBitMon_ParallelJobs::p, uncheckedValueInTesla(), and pileupCalc::upper.

Member Data Documentation

◆ grid_

GridType MFGrid3D::grid_
protected
mps_fire.i
i
Definition: mps_fire.py:428
Indexes
Definition: MFGrid.h:21
MFGrid::LocalVector
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
getRunAppsInfo.grid
grid
Definition: getRunAppsInfo.py:92
Grid1D::nodes
int nodes() const
Definition: Grid1D.h:21
GridInterpolator3DException
Definition: MagExceptions.h:32
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
MFGrid3D::grid_
GridType grid_
Definition: MFGrid3D.h:59
Grid1D::index
int index(Scalar a, Scalar &f) const
Definition: Grid1D.h:29
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, LocalTag >
b
double b
Definition: hdecay.h:118
MFGrid3D::uncheckedValueInTesla
virtual LocalVector uncheckedValueInTesla(const LocalPoint &p) const =0
Interpolated field value at given point; does not check for exceptions.
a
double a
Definition: hdecay.h:119
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Grid3D::grida
const Grid1D & grida() const
Definition: Grid3D.h:59
GridInterpolator3DException::limits
double * limits(void)
Definition: MagExceptions.h:37
MFGrid::fromGridFrame
virtual LocalPoint fromGridFrame(double a, double b, double c) const =0
find grid coordinates for point. For debugging and validation only.
TH2PolyOfflineMaps.limits
limits
Definition: TH2PolyOfflineMaps.py:44
MFGrid::MFGrid
MFGrid(const GloballyPositioned< float > &vol)
Definition: MFGrid.h:34
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.
MagVolumeOutsideValidity
Definition: MagVolumeOutsideValidity.h:7
pileupCalc.upper
upper
Definition: pileupCalc.py:213
Grid1D::node
Scalar node(int i) const
Definition: Grid1D.h:24
mps_fire.result
result
Definition: mps_fire.py:311
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Grid3D::gridb
const Grid1D & gridb() const
Definition: Grid3D.h:60
Grid3D::gridc
const Grid1D & gridc() const
Definition: Grid3D.h:61
Dimensions
Definition: MFGrid.h:15