26 unsigned int numberOfCells =
topology.totalGeomModules();
27 unsigned int numberExpected =
topology.allGeomModules();
31 uint32_t numberOfShapes =
34 edm::LogVerbatim(
"HGCalGeom") <<
"Number of Cells " << numberOfCells <<
":" << numberExpected <<
" for sub-detector "
38 geom->allocateCorners(numberOfCells);
46 <<
"transformation matrices " <<
topology.dddConstants().getTrFormN() <<
" and "
47 <<
topology.dddConstants().volumes() <<
":" <<
topology.dddConstants().sectors()
55 unsigned int kount(0);
60 for (
int wafer = 0; wafer <
topology.dddConstants().sectors(); ++wafer) {
62 if (
topology.dddConstants().waferInLayer(wafer, layer,
true)) {
67 const auto&
w =
topology.dddConstants().waferPosition(wafer,
true);
68 double xx = (
zside > 0) ?
w.first : -
w.first;
69 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
70 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
72 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader:: Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
74 <<
" transf " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
89 int indx =
topology.dddConstants().layerIndex(layer,
true);
90 int irad =
topology.dddConstants().getParameter()->iradMinBH_[indx];
91 int nphi =
topology.dddConstants().getParameter()->scintCells(layer);
92 int type =
topology.dddConstants().getParameter()->scintType(layer);
93 for (
int md =
topology.dddConstants().getParameter()->firstModule_[indx];
94 md <=
topology.dddConstants().getParameter()->lastModule_[indx];
98 const auto&
w =
topology.dddConstants().locateCellTrap(layer, irad,
iphi,
true);
99 double xx = (
zside > 0) ?
w.first : -
w.first;
100 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
101 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
105 << detId.
rawId() <<
std::dec <<
" transf " << ht3d.getTranslation() <<
" and "
106 << ht3d.getRotation();
127 for (
int wafer = 0; wafer <
topology.dddConstants().sectors(); ++wafer) {
128 if (
topology.dddConstants().waferInLayer(wafer, layer,
true)) {
129 int copy =
topology.dddConstants().getParameter()->waferCopy_[wafer];
135 const auto&
w =
topology.dddConstants().waferPosition(layer, u,
v,
true);
136 double xx = (
zside > 0) ?
w.first : -
w.first;
137 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
138 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
141 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
143 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
145 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId "
147 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
169 if (
counter != numberExpected) {
170 edm::LogError(
"HGCalGeom") <<
"Inconsistent # of cells: expected " << numberExpected <<
":" << numberOfCells
191 GlobalPoint front(0.25 * (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x()),
192 0.25 * (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y()),
193 0.25 * (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z()));
195 GlobalPoint back(0.25 * (corners[4].
x() + corners[5].
x() + corners[6].
x() + corners[7].
x()),
196 0.25 * (corners[4].
y() + corners[5].
y() + corners[6].
y() + corners[7].
y()),
197 0.25 * (corners[4].
z() + corners[5].
z() + corners[6].
z() + corners[7].
z()));
203 geom->newCell(front, back, corners[0], parmPtr, detId);
213 (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x() + corners[4].
x() + corners[5].
x()),
215 (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y() + corners[4].
y() + corners[5].
y()),
217 (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z() + corners[4].
z() + corners[5].
z()));
221 (corners[6].
x() + corners[7].
x() + corners[8].
x() + corners[9].
x() + corners[10].
x() + corners[11].
x()),
223 (corners[6].
y() + corners[7].
y() + corners[8].
y() + corners[9].
y() + corners[10].
y() + corners[11].
y()),
225 (corners[6].
z() + corners[7].
z() + corners[8].
z() + corners[9].
z() + corners[10].
z() + corners[11].
z()));
232 geom->newCell(front, back, corners[0], parmPtr, detId);