CMS 3D CMS Logo

ZReflectedMFGrid.cc
Go to the documentation of this file.
1 #include "ZReflectedMFGrid.h"
3 
4 #include <iostream>
5 
6 using namespace std;
7 
9  : MFGrid(vol),
10  theSectorGrid(sectorGrid)
11 
12 {}
13 
15 
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 }
22 
23 void ZReflectedMFGrid::throwUp(const char* message) const {
24  std::cout << "Throwing exception " << message << std::endl;
25  throw MagGeometryError(message);
26 }
27 void ZReflectedMFGrid::toGridFrame(const LocalPoint& p, double& a, double& b, double& c) const {
28  throwUp("Not implemented yet");
29 }
30 
31 MFGrid::LocalPoint ZReflectedMFGrid::fromGridFrame(double a, double b, double c) const {
32  throwUp("Not implemented yet");
33  return LocalPoint();
34 }
35 
37 
39  throwUp("Not implemented yet");
40  return LocalPoint();
41 }
42 
44  throwUp("Not implemented yet");
45  return LocalVector();
46 }
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MFGrid.h:31
LocalVector nodeValue(int i, int j, int k) const override
Field value at node.
void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const override
find grid coordinates for point. For debugging and validation only.
virtual Dimensions dimensions() const =0
~ZReflectedMFGrid() override
Dimensions dimensions() const override
LocalPoint fromGridFrame(double a, double b, double c) const override
find grid coordinates for point. For debugging and validation only.
double b
Definition: hdecay.h:118
Definition: MFGrid.h:27
LocalVector valueInTesla(const LocalPoint &p) const override=0
Interpolated field value at given point.
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
double a
Definition: hdecay.h:119
ZReflectedMFGrid(const GloballyPositioned< float > &vol, MFGrid *sectorGrid)
void throwUp(const char *message) const
LocalVector valueInTesla(const LocalPoint &p) const override
Interpolated field value at given point.
LocalPoint nodePosition(int i, int j, int k) const override
Position of node in local frame.