20 edm::LogInfo(
"HCalGeom") <<
"Creating HcalNumberingFromDDD\n";
26 edm::LogInfo(
"HCalGeom") <<
"Deleting HcalNumberingFromDDD\n";
34 double hx =
point.x();
35 double hy =
point.y();
36 double hz =
point.z();
37 double hR =
sqrt(hx * hx + hy * hy + hz * hz);
38 double htheta = (hR == 0. ? 0. : acos(
std::max(
std::min(hz / hR, 1.0), -1.0)));
39 double hsintheta =
sin(htheta);
40 double hphi = (hR * hsintheta == 0. ? 0. : atan2(hy, hx));
41 double heta = (fabs(hsintheta) == 1. ? 0. : -
log(fabs(
tan(htheta / 2.))));
49 hR =
sqrt(hx * hx + hy * hy);
50 etaR = (heta >= 0. ? hR : -hR);
62 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: point = " <<
point <<
" det " << det <<
":" << hsubdet
63 <<
" eta/R " << etaR <<
" phi " << hphi <<
" depth " <<
depth <<
" layer " << lay;
70 return unitID(detEta.first, detEta.second, fi,
depth, lay);
74 double hetaR = fabs(etaR);
78 int nphi =
int((2._pi + 0.1 * ficons.second) / ficons.second);
79 int zside = etaR > 0 ? 1 : 0;
80 double hphi =
phi + ficons.first;
83 int iphi =
int(hphi / ficons.second) + 1;
89 << hphi <<
" : " <<
iphi << std::endl;
95 int det,
int zside,
int depth,
int etaR,
int phi,
int lay)
const {
96 if (det == static_cast<int>(
HcalBarrel) && lay > 17)
105 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: phi units= " <<
units <<
" iphi_skip= " << iphi_skip;
110 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: det = " << det <<
" " <<
tmp.subdet <<
" zside = " <<
tmp.zside
111 <<
" depth = " <<
tmp.depth <<
" eta/R = " <<
tmp.etaR <<
" phi = " <<
tmp.phi
112 <<
" layer = " <<
tmp.lay;