CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ZReflectedMFGrid Class Reference

#include <ZReflectedMFGrid.h>

Inheritance diagram for ZReflectedMFGrid:
MFGrid MagneticFieldProvider< float >

Public Member Functions

Dimensions dimensions () const override
 
LocalPoint fromGridFrame (double a, double b, double c) const override
 find grid coordinates for point. For debugging and validation only. More...
 
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...
 
void toGridFrame (const LocalPoint &p, double &a, double &b, double &c) const override
 find grid coordinates for point. For debugging and validation only. More...
 
LocalVector valueInTesla (const LocalPoint &p) const override
 Interpolated field value at given point. More...
 
 ZReflectedMFGrid (const GloballyPositioned< float > &vol, MFGrid *sectorGrid)
 
 ~ZReflectedMFGrid () override
 
- Public Member Functions inherited from MFGrid
virtual void dump () const
 
const GloballyPositioned< float > & frame () const
 Local reference frame. More...
 
virtual Indexes index (const LocalPoint &p) const
 
 MFGrid (const GloballyPositioned< float > &vol)
 
 ~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 ()
 

Private Member Functions

void throwUp (const char *message) const
 

Private Attributes

double theDelta
 
double thePhiMax
 
double thePhiMin
 
MFGridtheSectorGrid
 

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

Definition at line 7 of file ZReflectedMFGrid.h.

Constructor & Destructor Documentation

◆ ZReflectedMFGrid()

ZReflectedMFGrid::ZReflectedMFGrid ( const GloballyPositioned< float > &  vol,
MFGrid sectorGrid 
)

Definition at line 8 of file ZReflectedMFGrid.cc.

9  : MFGrid(vol),
10  theSectorGrid(sectorGrid)
11 
12 {}

◆ ~ZReflectedMFGrid()

ZReflectedMFGrid::~ZReflectedMFGrid ( )
override

Definition at line 14 of file ZReflectedMFGrid.cc.

14 { delete theSectorGrid; }

References theSectorGrid.

Member Function Documentation

◆ dimensions()

Dimensions ZReflectedMFGrid::dimensions ( void  ) const
overridevirtual

Implements MFGrid.

Definition at line 36 of file ZReflectedMFGrid.cc.

36 { return theSectorGrid->dimensions(); }

References MFGrid::dimensions(), and theSectorGrid.

◆ fromGridFrame()

MFGrid::LocalPoint ZReflectedMFGrid::fromGridFrame ( double  a,
double  b,
double  c 
) const
overridevirtual

find grid coordinates for point. For debugging and validation only.

Implements MFGrid.

Definition at line 31 of file ZReflectedMFGrid.cc.

31  {
32  throwUp("Not implemented yet");
33  return LocalPoint();
34 }

References throwUp().

◆ nodePosition()

MFGrid::LocalPoint ZReflectedMFGrid::nodePosition ( int  i,
int  j,
int  k 
) const
overridevirtual

Position of node in local frame.

Implements MFGrid.

Definition at line 38 of file ZReflectedMFGrid.cc.

38  {
39  throwUp("Not implemented yet");
40  return LocalPoint();
41 }

References throwUp().

◆ nodeValue()

MFGrid::LocalVector ZReflectedMFGrid::nodeValue ( int  i,
int  j,
int  k 
) const
overridevirtual

Field value at node.

Implements MFGrid.

Definition at line 43 of file ZReflectedMFGrid.cc.

43  {
44  throwUp("Not implemented yet");
45  return LocalVector();
46 }

References throwUp().

◆ throwUp()

void ZReflectedMFGrid::throwUp ( const char *  message) const
private

Definition at line 23 of file ZReflectedMFGrid.cc.

23  {
24  std::cout << "Throwing exception " << message << std::endl;
25  throw MagGeometryError(message);
26 }

References gather_cfg::cout.

Referenced by fromGridFrame(), nodePosition(), nodeValue(), and toGridFrame().

◆ toGridFrame()

void ZReflectedMFGrid::toGridFrame ( const LocalPoint p,
double &  a,
double &  b,
double &  c 
) const
overridevirtual

find grid coordinates for point. For debugging and validation only.

Implements MFGrid.

Definition at line 27 of file ZReflectedMFGrid.cc.

27  {
28  throwUp("Not implemented yet");
29 }

References throwUp().

◆ valueInTesla()

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

Interpolated field value at given point.

Implements MFGrid.

Definition at line 16 of file ZReflectedMFGrid.cc.

16  {
17  // Z reflection of point
18  LocalPoint mirrorp(p.x(), p.y(), -p.z());
19  LocalVector mirrorB = theSectorGrid->valueInTesla(mirrorp);
20  return LocalVector(-mirrorB.x(), -mirrorB.y(), mirrorB.z());
21 }

References AlCaHLTBitMon_ParallelJobs::p, theSectorGrid, and MFGrid::valueInTesla().

Member Data Documentation

◆ theDelta

double ZReflectedMFGrid::theDelta
private

Definition at line 29 of file ZReflectedMFGrid.h.

◆ thePhiMax

double ZReflectedMFGrid::thePhiMax
private

Definition at line 27 of file ZReflectedMFGrid.h.

◆ thePhiMin

double ZReflectedMFGrid::thePhiMin
private

Definition at line 26 of file ZReflectedMFGrid.h.

◆ theSectorGrid

MFGrid* ZReflectedMFGrid::theSectorGrid
private

Definition at line 28 of file ZReflectedMFGrid.h.

Referenced by dimensions(), valueInTesla(), and ~ZReflectedMFGrid().

Vector3DBase< float, LocalTag >
ZReflectedMFGrid::throwUp
void throwUp(const char *message) const
Definition: ZReflectedMFGrid.cc:23
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
MFGrid::LocalVector
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
ZReflectedMFGrid::theSectorGrid
MFGrid * theSectorGrid
Definition: ZReflectedMFGrid.h:28
MFGrid::LocalPoint
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MFGrid.h:31
Point3DBase< float, LocalTag >
MagGeometryError
Definition: MagExceptions.h:18
MFGrid::dimensions
virtual Dimensions dimensions() const =0
MFGrid::MFGrid
MFGrid(const GloballyPositioned< float > &vol)
Definition: MFGrid.h:34
MFGrid::valueInTesla
LocalVector valueInTesla(const LocalPoint &p) const override=0
Interpolated field value at given point.