15 }
else if (gridType == 6) {
18 cout <<
"ERROR wrong SpecialCylindricalMFGrid type " << gridType << endl;
25 cout <<
"n1 " << n1 <<
" n2 " << n2 <<
" n3 " << n3 << endl;
27 double xref, yref, zref;
28 inFile >> xref >> yref >> zref;
29 double stepx, stepy, stepz;
30 inFile >> stepx >> stepy >> stepz;
32 double RParAsFunOfPhi[4];
33 inFile >> RParAsFunOfPhi[0] >> RParAsFunOfPhi[1] >> RParAsFunOfPhi[2] >> RParAsFunOfPhi[3];
35 vector<BVector> fieldValues;
38 fieldValues.reserve(
nLines);
39 for (
int iLine = 0; iLine <
nLines; ++iLine) {
48 fieldValues.push_back(
BVector(lB.
x(), lB.
y(), lB.
z()));
53 if (lastEntry !=
"complete") {
54 cout <<
"ERROR during file reading: file is not complete" << endl;
61 cout <<
"Grid reference point in grid system: " << xref <<
"," << yref <<
"," << zref << endl;
62 cout <<
"Grid reference point in global x,y,z: " << grefp << endl;
63 cout <<
"Grid reference point in local x,y,z: " << lrefp << endl;
64 cout <<
"steps " << stepx <<
"," << stepy <<
"," << stepz << endl;
65 cout <<
"RParAsFunOfPhi[0...4] = ";
66 for (
int i = 0;
i < 4; ++
i)
67 cout << RParAsFunOfPhi[
i] <<
" ";
71 Grid1D gridX(0, n1 - 1, n1);
72 Grid1D gridY(yref, yref + stepy * (n2 - 1), n2);
73 Grid1D gridZ(grefp.z(), grefp.z() + stepz * (n3 - 1), n3);
77 stepConstTerm_ = (RParAsFunOfPhi[0] - RParAsFunOfPhi[2]) / (n1 - 1);
78 stepPhiTerm_ = (RParAsFunOfPhi[1] - RParAsFunOfPhi[3]) / (n1 - 1);
133 cout <<
"toGridFrame: sinPhi ";
135 cout <<
"toGridFrame: cosPhi ";
137 cout <<
sinPhi <<
" LocalPoint " <<
p <<
" GlobalPoint " <<
gp << endl
138 <<
" a " <<
a <<
" b " <<
b <<
" c " <<
c << endl;
GlobalPoint toGlobal(const LocalPoint &lp) const
LocalVector uncheckedValueInTesla(const LocalPoint &p) const override
Interpolated field value at given point; does not check for exceptions.
Sin< T >::type sin(const T &t)
GloballyPositioned< float >::LocalPoint LocalPoint
ReturnType interpolate(Scalar a, Scalar b, Scalar c)
double stepSize(double sinPhi) const
LocalPoint toLocal(const GlobalPoint &gp) const
void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const override
find grid coordinates for point. For debugging and validation only.
Cos< T >::type cos(const T &t)
const GloballyPositioned< float > & frame() const
Local reference frame.
SpecialCylindricalMFGrid(binary_ifstream &istr, const GloballyPositioned< float > &vol, int gridType)
GloballyPositioned< float >::GlobalPoint GlobalPoint
void dump() const override
GloballyPositioned< float >::LocalVector LocalVector
double startingPoint(double sinPhi) const
LocalPoint fromGridFrame(double a, double b, double c) const override
find grid coordinates for point. For debugging and validation only.