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);
91 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
93 attribute =
"OnlyForHGCalNumbering";
101 mode = getGeometryWaferMode(
"WaferMode", sv2);
114 php.
levelZSide_ = static_cast<int>(getDDDValue(
"LevelZSide",
sv));
121 php.
waferZSide_ = static_cast<int>(getDDDValue(
"WaferZside",
sv));
128 attribute =
"OnlyForHGCalNumbering";
136 mode = getGeometryWaferMode(
"WaferMode", sv2);
137 php.
nCellsFine_ = static_cast<int>(getDDDValue(
"NumberOfCellsFine", sv2));
138 php.
nCellsCoarse_ = static_cast<int>(getDDDValue(
"NumberOfCellsCoarse", sv2));
154 for (
int k = 0;
k < 2; ++
k)
155 getCellPosition(php,
k);
161 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
163 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
165 geom->loadCellParsHexagon(cpv, php);
171 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
173 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
175 geom->loadWaferHexagon(php);
177 geom->loadCellParsHexagon(cpv, php);
182 geom->loadSpecParsHexagon8(fv, php);
184 geom->loadGeometryHexagon8(fv, php, 1);
188 geom->loadWaferHexagon8(php);
191 geom->loadSpecParsHexagon8(fv, php);
193 geom->loadGeometryHexagon8(fv, php, 1);
197 geom->loadWaferHexagon8(php);
200 geom->loadSpecParsHexagon8(fv, php);
202 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
206 geom->loadWaferHexagon8(php);
219 php.
waferZSide_ = static_cast<int>(getDDDValue(
"WaferZside",
sv));
227 geom->loadSpecParsTrapezoid(fv, php);
231 geom->loadCellTrapezoid(php);
233 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
236 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
239 edm::LogError(
"HGCalGeom") <<
" Attribute " <<
val <<
" not found but needed.";
240 throw cms::Exception(
"DDException") <<
"Attribute " <<
val <<
" not found but needed.";
244 <<
" with flag " <<
ok;
257 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4Hep)::build called with "
258 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
263 std::vector<std::string> tempS;
264 std::vector<double> tempD;
266 tempS = fv.
get<std::vector<std::string> >(
name2,
"GeometryMode");
268 tempS = fv.
get<std::vector<std::string> >(
name,
"GeometryMode");
270 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
274 php.
mode_ = getGeometryMode(
sv);
286 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
288 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
289 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
290 mode = getGeometryWaferMode(sv2);
302 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
306 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
308 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
311 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
313 tempD = fv.
get<std::vector<double> >(
name,
"WaferZside");
322 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
323 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
324 mode = getGeometryWaferMode(sv2);
325 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsFine");
327 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
329 tempD = fv.
get<std::vector<double> >(namet,
"WaferSize");
331 tempD = fv.
get<std::vector<double> >(namet,
"WaferThickness");
333 tempD = fv.
get<std::vector<double> >(namet,
"SensorSeparation");
335 tempD = fv.
get<std::vector<double> >(namet,
"MouseBite");
348 for (
int k = 0;
k < 2; ++
k)
349 getCellPosition(php,
k);
354 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
356 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
358 geom->loadCellParsHexagon(vmap, php);
364 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
366 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
368 geom->loadWaferHexagon(php);
370 geom->loadCellParsHexagon(vmap, php);
375 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
377 geom->loadGeometryHexagon8(cpv, php,
name, 1);
381 geom->loadWaferHexagon8(php);
384 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
386 geom->loadGeometryHexagon8(cpv, php,
name, 1);
390 geom->loadWaferHexagon8(php);
393 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
395 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
399 geom->loadWaferHexagon8(php);
404 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
407 tempD = fv.
get<std::vector<double> >(
name,
"FirstLayer");
409 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
411 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
413 tempD = fv.
get<std::vector<double> >(
name,
"WaferThickness");
415 tempD = fv.
get<std::vector<double> >(
name,
"MinimumTileSize");
419 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
421 tempD = fv.
get<std::vector<double> >(
name,
"WaferZside");
431 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
435 geom->loadCellTrapezoid(php);
437 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
440 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
443 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
444 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
448 <<
" with flag " <<
ok;
463 std::vector<int> indtypes;
467 double r = 0.5 *
R *
sqrt(3.0);
470 for (
int u = 0; u < 2 *
N; ++u) {
471 for (
int v = 0;
v < 2 *
N; ++
v) {
472 if (((
v - u) <
N) && (u -
v) <=
N) {
473 double yp = (u - 0.5 *
v - n2) * 2 *
r;
474 double xp = (1.5 * (
v -
N) + 1.0) *
R;
475 int id =
v * 100 + u;
477 indtypes.emplace_back(
id);
486 cellIndex[
id] = ipos;
500 int id = indtypes[
k];
507 int id = indtypes[
k];
518 const std::vector<double>& fvec =
val.doubles();
531 const std::vector<double>& fvec =
val.doubles();