|
|
Go to the documentation of this file.
15 }
else if (gridType == 6) {
18 cout <<
"ERROR wrong SpecialCylindricalMFGrid type " << gridType << endl;
23 inFile >> n1 >> n2 >> n3;
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) {
40 inFile >> Bx >> By >> Bz;
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);
121 sinPhi =
cos(
gp.phi());
123 sinPhi =
sin(
gp.phi());
133 cout <<
"toGridFrame: sinPhi ";
135 cout <<
"toGridFrame: cosPhi ";
137 cout << sinPhi <<
" LocalPoint " <<
p <<
" GlobalPoint " <<
gp << endl
138 <<
" a " <<
a <<
" b " <<
b <<
" c " <<
c << endl;
GloballyPositioned< float >::LocalVector LocalVector
LocalPoint fromGridFrame(double a, double b, double c) const override
find grid coordinates for point. For debugging and validation only.
const GloballyPositioned< float > & frame() const
Local reference frame.
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
double stepSize(double sinPhi) const
GloballyPositioned< float >::LocalPoint LocalPoint
void dump() const override
void toGridFrame(const LocalPoint &p, double &a, double &b, double &c) const override
find grid coordinates for point. For debugging and validation only.
SpecialCylindricalMFGrid(binary_ifstream &istr, const GloballyPositioned< float > &vol, int gridType)
LocalPoint toLocal(const GlobalPoint &gp) const
ReturnType interpolate(Scalar a, Scalar b, Scalar c)
LocalVector uncheckedValueInTesla(const LocalPoint &p) const override
Interpolated field value at given point; does not check for exceptions.
GlobalPoint toGlobal(const LocalPoint &lp) const
GloballyPositioned< float >::GlobalPoint GlobalPoint
double startingPoint(double sinPhi) const