File indexing completed on 2024-04-06 12:22:32
0001 #include "ZReflectedMFGrid.h"
0002 #include "MagneticField/VolumeGeometry/interface/MagExceptions.h"
0003
0004 #include <iostream>
0005
0006 using namespace std;
0007
0008 ZReflectedMFGrid::ZReflectedMFGrid(const GloballyPositioned<float>& vol, MFGrid* sectorGrid)
0009 : MFGrid(vol),
0010 theSectorGrid(sectorGrid)
0011
0012 {}
0013
0014 ZReflectedMFGrid::~ZReflectedMFGrid() { delete theSectorGrid; }
0015
0016 MFGrid::LocalVector ZReflectedMFGrid::valueInTesla(const LocalPoint& p) const {
0017
0018 LocalPoint mirrorp(p.x(), p.y(), -p.z());
0019 LocalVector mirrorB = theSectorGrid->valueInTesla(mirrorp);
0020 return LocalVector(-mirrorB.x(), -mirrorB.y(), mirrorB.z());
0021 }
0022
0023 void ZReflectedMFGrid::throwUp(const char* message) const {
0024 std::cout << "Throwing exception " << message << std::endl;
0025 throw MagGeometryError(message);
0026 }
0027 void ZReflectedMFGrid::toGridFrame(const LocalPoint& p, double& a, double& b, double& c) const {
0028 throwUp("Not implemented yet");
0029 }
0030
0031 MFGrid::LocalPoint ZReflectedMFGrid::fromGridFrame(double a, double b, double c) const {
0032 throwUp("Not implemented yet");
0033 return LocalPoint();
0034 }
0035
0036 Dimensions ZReflectedMFGrid::dimensions() const { return theSectorGrid->dimensions(); }
0037
0038 MFGrid::LocalPoint ZReflectedMFGrid::nodePosition(int i, int j, int k) const {
0039 throwUp("Not implemented yet");
0040 return LocalPoint();
0041 }
0042
0043 MFGrid::LocalVector ZReflectedMFGrid::nodeValue(int i, int j, int k) const {
0044 throwUp("Not implemented yet");
0045 return LocalVector();
0046 }