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 }
void throwUp(const char *message) const
Dimensions dimensions() const override
LocalVector nodeValue(int i, int j, int k) const override
Field value at node.
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MFGrid.h:31
LocalVector valueInTesla(const LocalPoint &p) const override=0
Interpolated field value at given point.
LocalPoint fromGridFrame(double a, double b, double c) const override
find grid coordinates for point. For debugging and validation only.
LocalPoint nodePosition(int i, int j, int k) const override
Position of node in local frame.
~ZReflectedMFGrid() override
void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const override
find grid coordinates for point. For debugging and validation only.
LocalVector valueInTesla(const LocalPoint &p) const override
Interpolated field value at given point.
double b
Definition: hdecay.h:118
Definition: MFGrid.h:27
GloballyPositioned< float >::LocalVector LocalVector
Definition: MFGrid.h:32
double a
Definition: hdecay.h:119
ZReflectedMFGrid(const GloballyPositioned< float > &vol, MFGrid *sectorGrid)
virtual Dimensions dimensions() const =0