18 const std::vector<std::string>& fvec =
val.strings();
38 const std::vector<std::string>& fvec =
val.strings();
64 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DDD)::build called with "
65 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet;
79 php.
mode_ = getGeometryMode(
"GeometryMode",
sv);
92 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
94 attribute =
"OnlyForHGCalNumbering";
102 mode = getGeometryWaferMode(
"WaferMode", sv2);
115 php.
levelZSide_ = static_cast<int>(getDDDValue(
"LevelZSide",
sv));
122 php.
waferZSide_ = static_cast<int>(getDDDValue(
"WaferZside",
sv));
132 attribute =
"OnlyForHGCalNumbering";
140 mode = getGeometryWaferMode(
"WaferMode", sv2);
141 php.
nCellsFine_ = static_cast<int>(getDDDValue(
"NumberOfCellsFine", sv2));
142 php.
nCellsCoarse_ = static_cast<int>(getDDDValue(
"NumberOfCellsCoarse", sv2));
158 for (
int k = 0;
k < 2; ++
k)
159 getCellPosition(php,
k);
165 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
167 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
169 geom->loadCellParsHexagon(cpv, php);
175 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
177 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
179 geom->loadWaferHexagon(php);
181 geom->loadCellParsHexagon(cpv, php);
186 geom->loadSpecParsHexagon8(fv, php);
188 geom->loadGeometryHexagon8(fv, php, 1);
192 geom->loadWaferHexagon8(php);
195 geom->loadSpecParsHexagon8(fv, php);
197 geom->loadGeometryHexagon8(fv, php, 1);
201 geom->loadWaferHexagon8(php);
204 geom->loadSpecParsHexagon8(fv, php);
206 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
210 geom->loadWaferHexagon8(php);
223 php.
waferZSide_ = static_cast<int>(getDDDValue(
"WaferZside",
sv));
231 geom->loadSpecParsTrapezoid(fv, php);
235 geom->loadCellTrapezoid(php);
237 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
240 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
243 edm::LogError(
"HGCalGeom") <<
" Attribute " <<
val <<
" not found but needed.";
244 throw cms::Exception(
"DDException") <<
"Attribute " <<
val <<
" not found but needed.";
248 <<
" with flag " <<
ok;
261 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4Hep)::build called with "
262 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
267 std::vector<std::string> tempS;
268 std::vector<double> tempD;
270 tempS = fv.
get<std::vector<std::string> >(
name2,
"GeometryMode");
272 tempS = fv.
get<std::vector<std::string> >(
name,
"GeometryMode");
274 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
278 php.
mode_ = getGeometryMode(
sv);
291 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
293 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
294 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
295 mode = getGeometryWaferMode(sv2);
307 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
311 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
313 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
316 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
318 tempD = fv.
get<std::vector<double> >(
name,
"WaferZside");
321 tempD = fv.
get<std::vector<double> >(
name,
"LayerRotation");
332 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
333 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
334 mode = getGeometryWaferMode(sv2);
335 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsFine");
337 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
339 tempD = fv.
get<std::vector<double> >(namet,
"WaferSize");
341 tempD = fv.
get<std::vector<double> >(namet,
"WaferThickness");
343 tempD = fv.
get<std::vector<double> >(namet,
"SensorSeparation");
345 tempD = fv.
get<std::vector<double> >(namet,
"MouseBite");
358 for (
int k = 0;
k < 2; ++
k)
359 getCellPosition(php,
k);
364 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
366 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
368 geom->loadCellParsHexagon(vmap, php);
374 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
376 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
378 geom->loadWaferHexagon(php);
380 geom->loadCellParsHexagon(vmap, php);
385 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
387 geom->loadGeometryHexagon8(cpv, php,
name, 1);
391 geom->loadWaferHexagon8(php);
394 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
396 geom->loadGeometryHexagon8(cpv, php,
name, 1);
400 geom->loadWaferHexagon8(php);
403 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
405 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
409 geom->loadWaferHexagon8(php);
414 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
417 tempD = fv.
get<std::vector<double> >(
name,
"FirstLayer");
419 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
421 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
423 tempD = fv.
get<std::vector<double> >(
name,
"WaferThickness");
425 tempD = fv.
get<std::vector<double> >(
name,
"MinimumTileSize");
429 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
431 tempD = fv.
get<std::vector<double> >(
name,
"WaferZside");
441 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
445 geom->loadCellTrapezoid(php);
447 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
450 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
453 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
454 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
458 <<
" with flag " <<
ok;
473 std::vector<int> indtypes;
477 double r = 0.5 *
R *
sqrt(3.0);
480 for (
int u = 0; u < 2 *
N; ++u) {
481 for (
int v = 0;
v < 2 *
N; ++
v) {
482 if (((
v - u) <
N) && (u -
v) <=
N) {
483 double yp = (u - 0.5 *
v -
n2) * 2 *
r;
484 double xp = (1.5 * (
v -
N) + 1.0) *
R;
485 int id =
v * 100 + u;
487 indtypes.emplace_back(
id);
496 cellIndex[
id] = ipos;
510 int id = indtypes[
k];
517 int id = indtypes[
k];
528 const std::vector<double>& fvec =
val.doubles();
541 const std::vector<double>& fvec =
val.doubles();