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;
95 int det,
int zside,
int depth,
int etaR,
int phi,
int lay)
const {
96 if (det == static_cast<int>(
HcalBarrel) && lay > 17)
102 if ((lay == 1) && (etaR == 16))
108 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: phi units= " <<
units <<
" iphi_skip= " << iphi_skip;
113 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: det = " << det <<
" " <<
tmp.subdet <<
" zside = " <<
tmp.zside
114 <<
" depth = " <<
tmp.depth <<
" eta/R = " <<
tmp.etaR <<
" phi = " <<
tmp.phi
115 <<
" layer = " <<
tmp.lay;
Log< level::Info, true > LogVerbatim
int getEta(const int &det, const int &lay, const double &hetaR) const
double getEtaHO(const double &etaR, const double &x, const double &y, const double &z) const
Sin< T >::type sin(const T &t)
HcalNumberingFromDDD(const HcalDDDSimConstants *hcons)
std::pair< double, double > getPhiCons(const int &det, const int &ieta) const
std::pair< int, double > getDetEta(const double &eta, const int &depth) const
int phiNumber(const int &phi, const int &unit) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
Tan< T >::type tan(const T &t)
int unitPhi(const int &det, const int &etaR) const
const HcalDDDSimConstants * hcalConstants
HcalID unitID(int det, const math::XYZVectorD &pos, int depth, int lay=-1) const
TString units(TString variable, Char_t axis)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)