1 #ifndef Point5MaterialMap_cc
2 #define Point5MaterialMap_cc
11 inline int inPlug(
double vx,
double vy,
double vz,
28 if (std::fabs(vz) < 26548. &&
sqrt((vx*1.1576)*(vx*1.1576) + vy*vy) < 15460. &&
29 vy > -8762)
return Air;
39 if (vx > -2400. && vx < 2400. && vz-Z_PX56 >= -9800. && vz-
Z_PX56 < -7000. )
45 sqrt((vx-26600.)*(vx-26600.) + (vz-30100.-
Z_PX56)*(vz-30100.-
Z_PX56)) < 6050.)
52 sqrt((vx-18220.)*(vx-18220.) + (vz+24227.-
Z_PX56)*(vz+24227.-
Z_PX56)) < 3550.)
56 if (vz > -22050. && vz < 62050. &&
57 sqrt((vx-29550.)*(vx-29550.) + (vy-3233.)*(vy-3233.)) < 9050. &&
58 vy > -3650.)
return Air;
61 if (((vz >= -29278. && vz < -26548.) || (vz >= 26548 && vz <= 29278.)) &&
62 sqrt(vy*vy + vx*vx) < 800.)
return Air;
65 if (vx > 10000. && vx < 20500.+3050. &&
66 vz > 14460. && vz < 16260. &&
67 vy > -8680. && vy < -1507.)
return Air;
69 if (vx > 10000. && vx < 16500. &&
70 vy > -8680. && vy < -1507. &&
71 vz > 14460.-1865.*(16500.-vx)/(3200.) && vz <= 14460.)
return Air;
73 if (vx > 13300. && vx < 20500.+3050. &&
74 vz > 14460. && vz < 16260. &&
75 vy > -8680. && vy < -1507.)
return Air;
77 if (vx > 26600-6050. && vx < 20500.+3050. &&
78 vz > 14460. && vz < 16260. &&
79 vy >= -1507. && vy < 1000.)
return Air;
82 if (vz > -85000. && vz <= -29278. &&
83 sqrt(vy*vy + (vx-350.)*(vx-350.)) < 1900. &&
84 vy > -1000.)
return Air;
87 if (vz >= 29278. && vz < 63000. &&
88 sqrt(vy*vy + (vx-350.)*(vx-350.)) < 1900. &&
89 vy > -1000.)
return Air;
92 if (vz > -58875. && vz < -33927. &&
93 sqrt(vy*vy + (vx-4450.)*(vx-4450.)) < 6750. && vy > -1000. &&
94 !(vx > 2250. && vx < 4250. && (vz > -(33927.+18000.) || vz < -(33927.+19500.))) &&
95 !(vx >= 4250. && vx < 6650. && vz > -(33927.+18000.) && vz < -(33927.+16000.)))
99 if (vx > 9000. && vx < 18220. &&
101 && vy > -1000.)
return Air;
111 if (std::fabs(vz-
Z_PX56) < 30000. && std::fabs(vx) < 10950)
return Wall;
113 if (std::fabs(vz-
Z_PX56) < 9000. && std::fabs(vx) >= 10950 && std::fabs(vx) < 16950)
118 if (std::fabs(vz) < 29278. &&
sqrt((vx*1.1576)*(vx*1.1576) + vy*vy) < 16830. &&
119 vy > -11762.)
return Wall;
128 < 6050.+2150./10250.*6050.)
return Wall;
133 < 6050.+2150./10250.*6050. +1800.)
return Wall;
140 < 3550.+2150./10250.*3550.)
return Wall;
143 < 3550.+2150./10250.*3550. +1800.)
return Wall;
146 if (vz > -(22050.+1150.) && vz < (62050.+1150.) &&
147 sqrt((vx-29550.)*(vx-29550.) + (vy-3233.)*(vy-3233.)) < 9050.+950. &&
148 vy > -3650.-2000.)
return Wall;
151 if (vz > -29278.+1000. && vz < 29278.+1000.) {
152 if (vy > -17985. && vy < 10410. && vx > 13300. && vx < 20500.)
155 if (vy > 0. && vy < 10410. && vx > 10000. && vx <= 13300.)
158 if (vy > -3650.-2000. && vy < -3233. &&
159 vx > 20000. && vx < 24000.)
return Wall;
160 if (vy > -11762. && vy < -5000. &&
161 vx > 10500. && vx < 14000.)
return Wall;
164 if (vy > -14000. && vy < -1450. &&
165 vz > 13460. && vz < 17260. && vx >= 20500. && vx < 24550.)
169 if (vz > -85000. && vz < -28510.) {
170 if (
sqrt(vy*vy + (vx-350.)*(vx-350.)) < 2250.)
return Wall;
174 if (vz > 26550. && vz < 63000. &&
175 sqrt(vy*vy + (vx-350.)*(vx-350.)) < 2250.)
return Wall;
178 if (vz > -(58875.+500.) && vz < -(33927.-500.) &&
179 sqrt(vy*vy + (vx-4450.)*(vx-4450.)) < (6750.+500.) && vy > -3650.)
183 if (vx > 9000. && vx < 18220. &&
185 && vy > -3650.)
return Wall;
234 inline int inMat(
double vx,
double vy,
double vz,
239 if (
inPlug(vx, vy, vz, PlugVx, PlugVz))
return Plug;
256 std::cout <<
"Point5MaterialMap.h: Warning! No Material recognised for point: vx="
257 << vx <<
" vy=" << vy <<
" vz=" << vz << std::endl;
const double PlugOnShaftVz
const double PlugNoseZlength
const double PlugNoseXlength
int inAirAfterPlug(double vx, double vy, double vz)
const double SurfaceOfEarth
const double PlugOnShaftVx
int inPlug(double vx, double vy, double vz, double PlugVx=PlugOnShaftVx, double PlugVz=PlugOnShaftVz)
int inClayOrRockAfterWall(double vx, double vy, double vz, double ClayWidth)
int inClayAfterWall(double vx, double vy, double vz, double ClayWidth)
int inRockAfterClay(double vx, double vy, double vz, double ClayWidth)
int inWallAfterAir(double vx, double vy, double vz)
int inMat(double vx, double vy, double vz, double PlugVx=PlugOnShaftVx, double PlugVz=PlugOnShaftVz, double ClayWidth=DefaultClayWidth)
const double DefaultClayWidth