24 unsigned int numberOfCells =
topology.totalGeomModules();
25 unsigned int numberExpected =
topology.allGeomModules();
28 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()
49 for (
unsigned itr = 0; itr <
topology.dddConstants().getTrFormN(); ++itr) {
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()) {
89 int ring =
topology.dddConstants().getParameter()->iradMinBH_[indx];
92 for (
int md =
topology.dddConstants().getParameter()->firstModule_[indx];
93 md <=
topology.dddConstants().getParameter()->lastModule_[indx];
98 if (typm.first >= 0) {
99 id.setType(typm.first);
100 id.setSiPM(typm.second);
106 << typm.second <<
" Test " <<
test <<
":" <<
ok <<
" ID " <<
id;
111 double xx = (
zside > 0) ?
w.first : -
w.first;
112 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
113 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
116 <<
"HGCalGeometryLoader::rad:phi:type " <<
ring *
zside <<
":" <<
iphi <<
":" <<
type <<
" DetId " 118 << ht3d.getTranslation() <<
" R " << ht3d.getTranslation().perp() <<
" and " << ht3d.getRotation();
140 for (
int wafer = 0; wafer <
topology.dddConstants().sectors(); ++wafer) {
141 if (
topology.dddConstants().waferInLayer(wafer,
layer,
true)) {
142 int copy =
topology.dddConstants().getParameter()->waferCopy_[wafer];
149 const auto&
w =
topology.dddConstants().waferPosition(
layer, u,
v,
true,
true);
150 double xx = (
zside > 0) ?
w.first : -
w.first;
151 CLHEP::Hep3Vector h3v(
xx,
w.second, mytr.
h3v.z());
152 const HepGeom::Transform3D ht3d(mytr.
hr, h3v);
155 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId " 157 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
159 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalGeometryLoader::Wafer:Type " << wafer <<
":" <<
type <<
" DetId " 161 <<
" trans " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
183 if (
counter != numberExpected) {
185 edm::LogVerbatim(
"HGCalGeom") <<
"Inconsistent # of cells: expected " << numberExpected <<
":" << numberOfCells
188 edm::LogError(
"HGCalGeom") <<
"Inconsistent # of cells: expected " << numberExpected <<
":" << numberOfCells
210 GlobalPoint front(0.25 * (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x()),
211 0.25 * (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y()),
212 0.25 * (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z()));
214 GlobalPoint back(0.25 * (corners[4].
x() + corners[5].
x() + corners[6].
x() + corners[7].
x()),
215 0.25 * (corners[4].
y() + corners[5].
y() + corners[6].
y() + corners[7].
y()),
216 0.25 * (corners[4].
z() + corners[5].
z() + corners[6].
z() + corners[7].
z()));
222 geom->newCell(front, back, corners[0], parmPtr,
detId);
232 (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x() + corners[4].
x() + corners[5].
x()),
234 (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y() + corners[4].
y() + corners[5].
y()),
236 (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z() + corners[4].
z() + corners[5].
z()));
240 (corners[6].
x() + corners[7].
x() + corners[8].
x() + corners[9].
x() + corners[10].
x() + corners[11].
x()),
242 (corners[6].
y() + corners[7].
y() + corners[8].
y() + corners[9].
y() + corners[10].
y() + corners[11].
y()),
244 (corners[6].
z() + corners[7].
z() + corners[8].
z() + corners[9].
z() + corners[10].
z() + corners[11].
z()));
251 geom->newCell(front, back, corners[0], parmPtr,
detId);
static constexpr unsigned int k_NumberOfShapes
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Log< level::Info, true > LogVerbatim
static constexpr unsigned int ncornerBy2_
int32_t waferU(const int32_t index)
HGCalGeometry * build(const HGCalTopology &)
static constexpr uint32_t k_Theta
static constexpr uint32_t k_Cell
static constexpr uint32_t k_dY1
Log< level::Error, false > LogError
CaloCellGeometry::CCGFloat CCGFloat
void swap(Association< C > &lhs, Association< C > &rhs)
static constexpr unsigned int ncorner_
static constexpr unsigned int ncorner_
static constexpr uint32_t k_R
static constexpr uint32_t k_r
static constexpr uint32_t k_dX1
static constexpr unsigned int k_NumberOfParametersPerTrd
static constexpr uint32_t k_dY2
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
static constexpr uint32_t k_dX4
static constexpr unsigned int k_NumberOfParametersPerHex
static constexpr unsigned int ncornerBy2_
static constexpr uint32_t k_dZ
static constexpr uint32_t k_Phi
static constexpr unsigned int k_NumberOfShapesTrd
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
static std::atomic< unsigned int > counter
int32_t waferV(const int32_t index)
static constexpr uint32_t k_dZ
std::vector< float > ParmVec
static constexpr uint32_t k_Alp1
std::vector< float > ParmVec
CaloCellGeometry::CCGFloat CCGFloat
static constexpr uint32_t k_dX3
void buildGeom(const ParmVec &, const HepGeom::Transform3D &, const DetId &, HGCalGeometry *, int mode)
static constexpr uint32_t k_dX2
static constexpr double oneBySix_
static constexpr uint32_t k_Alp2