20 unsigned int numberOfCells =
topology.totalGeomModules();
21 unsigned int numberExpected =
topology.allGeomModules();
25 edm::LogVerbatim(
"HGCalGeom") <<
"Number of Cells " << numberOfCells <<
":" << numberExpected <<
" for sub-detector " 28 geom->allocateCorners(numberOfCells);
36 <<
"transformation matrices " <<
topology.dddConstants().getTrFormN() <<
" and " 37 <<
topology.dddConstants().volumes() <<
":" <<
topology.dddConstants().sectors()
40 for (
unsigned itr = 0; itr <
topology.dddConstants().getTrFormN(); ++itr) {
45 unsigned int kount(0);
50 for (
int wafer = 0; wafer <
topology.dddConstants().sectors(); ++wafer) {
52 if (
topology.dddConstants().waferInLayer(wafer,
layer,
true)) {
57 const auto&
w =
topology.dddConstants().waferPosition(wafer,
true);
58 double xx = (
zside > 0) ?
w.first : -
w.first;
59 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
60 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
62 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalTBGeometryLoader:: Wafer:Type " << wafer <<
":" <<
type <<
" DetId " 64 << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
85 if (
counter != numberExpected) {
86 edm::LogError(
"HGCalGeom") <<
"Inconsistent # of cells: expected " << numberExpected <<
":" << numberOfCells
94 const HepGeom::Transform3D& ht3d,
109 (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x() + corners[4].
x() + corners[5].
x()),
111 (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y() + corners[4].
y() + corners[5].
y()),
113 (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z() + corners[4].
z() + corners[5].
z()));
117 (corners[6].
x() + corners[7].
x() + corners[8].
x() + corners[9].
x() + corners[10].
x() + corners[11].
x()),
119 (corners[6].
y() + corners[7].
y() + corners[8].
y() + corners[9].
y() + corners[10].
y() + corners[11].
y()),
121 (corners[6].
z() + corners[7].
z() + corners[8].
z() + corners[9].
z() + corners[10].
z() + corners[11].
z()));
128 geom->newCell(front, back, corners[0], parmPtr,
detId);
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Log< level::Info, true > LogVerbatim
static constexpr unsigned int k_NumberOfParametersPerHex
HGCalTBGeometry * build(const HGCalTBTopology &)
Log< level::Error, false > LogError
void swap(Association< C > &lhs, Association< C > &rhs)
static constexpr unsigned int ncorner_
void buildGeom(const ParmVec &, const HepGeom::Transform3D &, const DetId &, HGCalTBGeometry *)
std::vector< float > ParmVec
static constexpr uint32_t k_R
static constexpr uint32_t k_r
std::vector< float > ParmVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
CaloCellGeometry::CCGFloat CCGFloat
static constexpr unsigned int ncornerBy2_
static constexpr uint32_t k_dZ
static std::atomic< unsigned int > counter
static constexpr unsigned int k_NumberOfShapes
static constexpr double oneBySix_
CaloCellGeometry::CCGFloat CCGFloat