15 auto const& m_tiltAngle =
args.value<
double>(
"tiltAngle");
16 auto const& m_rMin =
args.value<
double>(
"rMin");
17 auto const& m_rMax =
args.value<
double>(
"rMax");
18 auto const& m_zoffset =
args.value<
double>(
"zoffset");
19 auto const& m_xyoffset =
args.value<
double>(
"xyoffset");
20 auto const& m_startCopyNo =
args.value<
int>(
"startCopyNo");
21 auto const& m_incrCopyNo =
args.value<
int>(
"incrCopyNo");
24 edm::LogVerbatim(
"HGCalGeom") <<
"Tilt Angle " << m_tiltAngle <<
" R " << m_rMin <<
":" << m_rMax <<
" Offset "
25 << m_zoffset <<
":" << m_xyoffset <<
" Copy " << m_startCopyNo <<
":" << m_incrCopyNo
26 <<
" Child " << m_childName;
28 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalNoTaperEndcap: NameSpace " << ns.name() <<
"\tParent " <<
args.parentName();
34 const int ix[4] = {1, -1, -1, 1};
35 const int iy[4] = {1, 1, -1, -1};
36 int copyNo = m_startCopyNo;
37 for (
int i = 0;
i < 4; ++
i) {
38 int xQuadrant = ix[
i];
39 int yQuadrant = iy[
i];
41 edm::LogVerbatim(
"HGCalGeom") <<
"Create quarter " << xQuadrant <<
":" << yQuadrant;
43 double tiltAngle = m_tiltAngle;
44 double xphi = xQuadrant * tiltAngle;
45 double yphi = yQuadrant * tiltAngle;
46 double theta = 90._deg;
49 double phiZ = 3 *
theta;
50 double offsetZ = m_zoffset;
51 double offsetXY = m_xyoffset;
52 double offsetX = xQuadrant * 0.5 * offsetXY;
53 double offsetY = yQuadrant * 0.5 * offsetXY;
56 int rowmax(0), column(0);
67 double limit1 =
sqrt((offsetX + 0.5 * xQuadrant * offsetXY) * (offsetX + 0.5 * xQuadrant * offsetXY) +
68 (offsetY + 0.5 * yQuadrant * offsetXY) * (offsetY + 0.5 * yQuadrant * offsetXY));
69 double limit2 =
sqrt((offsetX - 0.5 * xQuadrant * offsetXY) * (offsetX - 0.5 * xQuadrant * offsetXY) +
70 (offsetY - 0.5 * yQuadrant * offsetXY) * (offsetY - 0.5 * yQuadrant * offsetXY));
72 if (limit2 > m_rMin && limit1 < m_rMax) {
74 edm::LogVerbatim(
"HGCalGeom") << m_childName <<
" copyNo = " << copyNo <<
" (" << column <<
"," << row
75 <<
"): offsetX,Y = " << offsetX <<
"," << offsetY <<
" limit=" << limit1 <<
":"
76 << limit2 <<
" rMin, rMax = " << m_rMin <<
"," << m_rMax;
88 copyNo += m_incrCopyNo;
91 edm::LogVerbatim(
"HGCalGeom") <<
" (" << column <<
"," << row <<
"): offsetX,Y = " << offsetX <<
","
92 << offsetY <<
" is out of limit=" << limit1 <<
":" << limit2
93 <<
" rMin, rMax = " << m_rMin <<
"," << m_rMax;
96 yphi += yQuadrant * 2. * tiltAngle;
97 offsetY += yQuadrant * offsetXY;
103 xphi += xQuadrant * 2. * tiltAngle;
104 yphi = yQuadrant * tiltAngle;
105 offsetY = yQuadrant * 0.5 * offsetXY;
106 offsetX += xQuadrant * offsetXY;
109 edm::LogVerbatim(
"HGCalGeom") << rowmax <<
" rows and " << column <<
" columns in quadrant " << xQuadrant <<
":"