15 SetCylindricalGeometry();
37 float rg = sqrt(xg*xg+yg*yg);
39 if( fabs(zg)<=15 ) theta_twr = 0;
40 else if( zg>15 ) theta_twr = atan2(zg-15,rg);
41 else theta_twr = atan2(zg+15,rg);
42 float theta_tr = atan2(zg-fVz,rg);
43 theta = fabs(theta_tr - theta_twr);
246 float logE = log(0.1);
247 if( E>0.1 ) logE = log(E);
251 float phi = 0.002 - 0.001*logE;
252 xC = xA*cos(phi) - yA*sin(phi);
253 yC = xA*sin(phi) + yA*cos(phi);
257 float rA = sqrt(xA*xA + yA*yA);
260 if( fabs(zA)<=15 ) theta_twr = 0;
261 else if( zA>15 ) theta_twr = atan2(zA-15,rA);
262 else theta_twr = atan2(zA+15,rA);
264 float theta_tr = atan2(zA-fVz,rA);
265 float L = -1.3 + 0.7*logE;
266 float dz = L*sin(theta_tr-theta_twr)/cos(theta_twr);
308 const float c0 = 0.950;
313 float& xc,
float& yc)
321 float xZero, yZero, bx, by;
328 if (Energy < 0.01)
return;
339 float sin2Tx = sinTx * sinTx;
340 float sin2Ty = sinTy * sinTy;
343 xZero = -0.417 * sinTx - 1.500 * sin2Tx;
345 xZero = -0.417 * sinTx + 1.500 * sin2Tx;
348 yZero = -0.417 * sinTy - 1.500 * sin2Ty;
350 yZero = -0.417 * sinTy + 1.500 * sin2Ty;
352 t = 0.98 + 0.98 * sqrt(Energy);
353 bx = 0.15 + t * sin2Tx;
354 by = 0.15 + t * sin2Ty;
361 x0 = (ix0 - xZero) + bx * asinh(2. * (x0 - ix0) * sinh(0.5 / bx));
366 cout <<
"????? Something wrong in BEmcRecCEMC::CorrectPosition: x = "
367 << x <<
" dx = " << x0 - ix0 << endl;
371 int ix8 =
int(x + 0.5) / 8;
372 float x8 = x + 0.5 - ix8 * 8 - 4;
373 float dx = 0.10 * x8 / 4.;
374 if (fabs(x8) > 3.3) dx = 0;
378 while (xc < -0.5) xc += float(fNx);
379 while (xc >= fNx - 0.5) xc -= float(fNx);
386 y0 = (iy0 - yZero) + by * asinh(2. * (y0 - iy0) * sinh(0.5 / by));
391 cout <<
"????? Something wrong in BEmcRecCEMC::CorrectPosition: y = "
392 << y <<
"dy = " << y0 - iy0 << endl;