34 float rg = std::sqrt(xg * xg + yg * yg);
36 if (std::fabs(zg) <= 15)
42 theta_twr = std::atan2(zg - 15, rg);
46 theta_twr = std::atan2(zg + 15, rg);
48 float theta_tr = std::atan2(zg -
fVz, rg);
49 theta = std::fabs(theta_tr - theta_twr);
252 float logE = log(0.1);
260 float phi = 0.002 - 0.001 * logE;
261 xC = xA * std::cos(phi) - yA * std::sin(phi);
262 yC = xA * std::sin(phi) + yA * std::cos(phi);
266 float rA = std::sqrt(xA * xA + yA * yA);
269 if (std::fabs(zA) <= 15)
275 theta_twr = std::atan2(zA - 15, rA);
279 theta_twr = std::atan2(zA + 15, rA);
282 float theta_tr = std::atan2(zA -
fVz, rA);
283 float L = -1.3 + 0.7 * logE;
284 float dz = L * std::sin(theta_tr - theta_twr) / std::cos(theta_twr);
326 const float c0 = 0.950;
331 float& xc,
float& yc)
360 float sin2Tx = sinTx * sinTx;
361 float sin2Ty = sinTy * sinTy;
365 xZero = -0.417 * sinTx - 1.500 * sin2Tx;
369 xZero = -0.417 * sinTx + 1.500 * sin2Tx;
374 yZero = -0.417 * sinTy - 1.500 * sin2Ty;
378 yZero = -0.417 * sinTy + 1.500 * sin2Ty;
381 t = 0.98 + 0.98 * std::sqrt(Energy);
382 bx = 0.15 + t * sin2Tx;
383 by = 0.15 + t * sin2Ty;
390 x0 = (ix0 -
xZero) + bx * asinh(2. * (x0 - ix0) * sinh(0.5 / bx));
395 std::cout <<
"????? Something wrong in BEmcRecCEMC::CorrectPosition: x = "
396 << x <<
" dx = " << x0 - ix0 << std::endl;
400 int ix8 = int(x + 0.5) / 8;
401 float x8 = x + 0.5 - ix8 * 8 - 4;
402 float dx = 0.10 * x8 / 4.;
403 if (std::fabs(x8) > 3.3)
414 while (xc >=
fNx - 0.5)
424 y0 = (iy0 -
yZero) + by * asinh(2. * (y0 - iy0) * sinh(0.5 / by));
429 std::cout <<
"????? Something wrong in BEmcRecCEMC::CorrectPosition: y = "
430 << y <<
"dy = " << y0 - iy0 << std::endl;