19 hcalConstants(hcons) {
21 edm::LogInfo(
"HCalGeom") <<
"Creating HcalNumberingFromDDD\n";
27 edm::LogInfo(
"HCalGeom") <<
"Deleting HcalNumberingFromDDD\n";
37 double hx = point.x();
38 double hy = point.y();
39 double hz = point.z();
40 double hR =
sqrt(hx*hx+hy*hy+hz*hz);
42 double hsintheta =
sin(htheta);
43 double hphi = (hR*hsintheta == 0. ? 0. :atan2(hy,hx));
44 double heta = (fabs(hsintheta) == 1.? 0. : -
log(fabs(
tan(htheta/2.))) );
52 hR =
sqrt(hx*hx+hy*hy);
53 etaR = (heta >= 0. ? hR : -hR);
66 <<
" det " << det <<
":" << hsubdet <<
" eta/R " 67 << etaR <<
" phi " << hphi <<
" depth " << depth
70 return unitID(hsubdet,etaR,hphi,depth,lay);
77 return unitID(detEta.first,detEta.second,fi,depth,lay);
87 double hetaR = fabs(etaR);
91 int nphi =
int((2._pi+0.1*ficons.second)/ficons.second);
92 int zside = etaR>0 ? 1: 0;
93 double hphi = phi+ficons.first;
94 if (hphi < 0) hphi += (2._pi);
95 int iphi =
int(hphi/ficons.second) + 1;
96 if (iphi > nphi) iphi = 1;
100 <<
" : " << zside <<
"/" << ieta <<
" phi " 101 << hphi <<
" : " << iphi << std::endl;
103 return unitID(det,zside,depth,ieta,iphi,lay);
112 if (det == static_cast<int>(
HcalBarrel) && lay > 17)
121 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: phi units= " << units
122 <<
" iphi_skip= " << iphi_skip;
127 edm::LogVerbatim(
"HCalGeom") <<
"HcalNumberingFromDDD: det = " << det <<
" " 129 <<
" depth = " << tmp.
depth <<
" eta/R = " 130 << tmp.
etaR <<
" phi = " << tmp.
phi 131 <<
" layer = " << tmp.
lay;
Sin< T >::type sin(const T &t)
std::pair< int, double > getDetEta(const double &eta, const int &depth) const
int phiNumber(const int &phi, const int &unit) const
HcalNumberingFromDDD(const HcalDDDSimConstants *hcons)
double getEtaHO(const double &etaR, const double &x, const double &y, const double &z) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
int unitPhi(const int &det, const int &etaR) const
Tan< T >::type tan(const T &t)
HcalID unitID(int det, const math::XYZVectorD &pos, int depth, int lay=-1) const
const HcalDDDSimConstants * hcalConstants
int getEta(const int &det, const int &lay, const double &hetaR) const
std::vector< std::vector< double > > tmp
TString units(TString variable, Char_t axis)
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
std::pair< double, double > getPhiCons(const int &det, const int &ieta) const
*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