26 unsigned int numberOfCells =
topology.totalGeomModules();
27 unsigned int numberExpected =
topology.allGeomModules();
30 uint32_t numberOfShapes =
33 edm::LogVerbatim(
"HGCalGeom") <<
"Number of Cells " << numberOfCells <<
":" << numberExpected <<
" for sub-detector "
37 geom->allocateCorners(numberOfCells);
45 <<
"transformation matrices " <<
topology.dddConstants().getTrFormN() <<
" and "
46 <<
topology.dddConstants().volumes() <<
":" <<
topology.dddConstants().sectors()
54 unsigned int kount(0);
59 for (
int wafer = 0; wafer <
topology.dddConstants().sectors(); ++wafer) {
61 if (
topology.dddConstants().waferInLayer(wafer, layer,
true)) {
66 const auto&
w =
topology.dddConstants().waferPosition(wafer,
true);
67 double xx = (
zside > 0) ?
w.first : -
w.first;
68 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
69 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
71 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader:: Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
73 <<
" transf " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
87 }
else if (
topology.tileTrapezoid()) {
88 int indx =
topology.dddConstants().layerIndex(layer,
true);
89 int irad =
topology.dddConstants().getParameter()->iradMinBH_[indx];
90 int nphi =
topology.dddConstants().getParameter()->scintCells(layer);
91 int type =
topology.dddConstants().getParameter()->scintType(layer);
92 for (
int md =
topology.dddConstants().getParameter()->firstModule_[indx];
93 md <=
topology.dddConstants().getParameter()->lastModule_[indx];
97 const auto&
w =
topology.dddConstants().locateCellTrap(layer, irad,
iphi,
true);
98 double xx = (
zside > 0) ?
w.first : -
w.first;
99 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
100 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
104 << detId.
rawId() <<
std::dec <<
" transf " << ht3d.getTranslation() <<
" and "
105 << ht3d.getRotation();
126 for (
int wafer = 0; wafer <
topology.dddConstants().sectors(); ++wafer) {
127 if (
topology.dddConstants().waferInLayer(wafer, layer,
true)) {
128 int copy =
topology.dddConstants().getParameter()->waferCopy_[wafer];
134 const auto&
w =
topology.dddConstants().waferPosition(layer, u,
v,
true);
135 double xx = (
zside > 0) ?
w.first : -
w.first;
136 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
137 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
140 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
142 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
144 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
146 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
168 if (
counter != numberExpected) {
169 edm::LogError(
"HGCalGeom") <<
"Inconsistent # of cells: expected " << numberExpected <<
":" << numberOfCells
190 GlobalPoint front(0.25 * (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x()),
191 0.25 * (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y()),
192 0.25 * (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z()));
194 GlobalPoint back(0.25 * (corners[4].
x() + corners[5].
x() + corners[6].
x() + corners[7].
x()),
195 0.25 * (corners[4].
y() + corners[5].
y() + corners[6].
y() + corners[7].
y()),
196 0.25 * (corners[4].
z() + corners[5].
z() + corners[6].
z() + corners[7].
z()));
202 geom->newCell(front, back, corners[0], parmPtr, detId);
212 (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x() + corners[4].
x() + corners[5].
x()),
214 (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y() + corners[4].
y() + corners[5].
y()),
216 (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z() + corners[4].
z() + corners[5].
z()));
220 (corners[6].
x() + corners[7].
x() + corners[8].
x() + corners[9].
x() + corners[10].
x() + corners[11].
x()),
222 (corners[6].
y() + corners[7].
y() + corners[8].
y() + corners[9].
y() + corners[10].
y() + corners[11].
y()),
224 (corners[6].
z() + corners[7].
z() + corners[8].
z() + corners[9].
z() + corners[10].
z() + corners[11].
z()));
231 geom->newCell(front, back, corners[0], parmPtr, detId);