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);
89 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
91 attribute =
"OnlyForHGCalNumbering";
99 mode = getGeometryWaferMode(
"WaferMode", sv2);
110 php.
levelZSide_ = static_cast<int>(getDDDValue(
"LevelZSide",
sv));
123 attribute =
"OnlyForHGCalNumbering";
131 mode = getGeometryWaferMode(
"WaferMode", sv2);
132 php.
nCellsFine_ = static_cast<int>(getDDDValue(
"NumberOfCellsFine", sv2));
133 php.
nCellsCoarse_ = static_cast<int>(getDDDValue(
"NumberOfCellsCoarse", sv2));
149 for (
int k = 0;
k < 2; ++
k)
150 getCellPosition(php,
k);
156 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
158 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
160 geom->loadCellParsHexagon(cpv, php);
166 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
168 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
170 geom->loadWaferHexagon(php);
172 geom->loadCellParsHexagon(cpv, php);
177 geom->loadSpecParsHexagon8(fv, php);
179 geom->loadGeometryHexagon8(fv, php, 1);
183 geom->loadWaferHexagon8(php);
186 geom->loadSpecParsHexagon8(fv, php);
188 geom->loadGeometryHexagon8(fv, php, 1);
192 geom->loadWaferHexagon8(php);
212 geom->loadSpecParsTrapezoid(fv, php);
216 geom->loadCellTrapezoid(php);
218 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
221 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
224 edm::LogError(
"HGCalGeom") <<
" Attribute " <<
val <<
" not found but needed.";
225 throw cms::Exception(
"DDException") <<
"Attribute " <<
val <<
" not found but needed.";
229 <<
" with flag " <<
ok;
242 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4Hep)::build called with "
243 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet;
248 std::vector<std::string> tempS;
249 std::vector<double> tempD;
251 tempS = fv.
get<std::vector<std::string> >(
name2,
"GeometryMode");
253 tempS = fv.
get<std::vector<std::string> >(
name,
"GeometryMode");
254 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
258 php.
mode_ = getGeometryMode(
sv);
268 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
270 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
271 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
272 mode = getGeometryWaferMode(sv2);
282 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
286 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
288 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
291 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
301 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
302 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
303 mode = getGeometryWaferMode(sv2);
304 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsFine");
306 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
308 tempD = fv.
get<std::vector<double> >(namet,
"WaferSize");
310 tempD = fv.
get<std::vector<double> >(namet,
"WaferThickness");
312 tempD = fv.
get<std::vector<double> >(namet,
"SensorSeparation");
314 tempD = fv.
get<std::vector<double> >(namet,
"MouseBite");
327 for (
int k = 0;
k < 2; ++
k)
328 getCellPosition(php,
k);
333 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
335 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
337 geom->loadCellParsHexagon(vmap, php);
343 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
345 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
347 geom->loadWaferHexagon(php);
349 geom->loadCellParsHexagon(vmap, php);
354 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
356 geom->loadGeometryHexagon8(cpv, php,
name, 1);
360 geom->loadWaferHexagon8(php);
363 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
365 geom->loadGeometryHexagon8(cpv, php,
name, 1);
369 geom->loadWaferHexagon8(php);
373 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
376 tempD = fv.
get<std::vector<double> >(
name,
"FirstLayer");
378 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
380 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
382 tempD = fv.
get<std::vector<double> >(
name,
"WaferThickness");
384 tempD = fv.
get<std::vector<double> >(
name,
"MinimumTileSize");
388 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
398 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
402 geom->loadCellTrapezoid(php);
404 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
407 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
410 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
411 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
415 <<
" with flag " <<
ok;
430 std::vector<int> indtypes;
434 double r = 0.5 *
R *
sqrt(3.0);
437 for (
int u = 0; u < 2 *
N; ++u) {
438 for (
int v = 0;
v < 2 *
N; ++
v) {
439 if (((
v - u) <
N) && (u -
v) <=
N) {
440 double yp = (u - 0.5 *
v - n2) * 2 *
r;
441 double xp = (1.5 * (
v -
N) + 1.0) *
R;
442 int id =
v * 100 + u;
444 indtypes.emplace_back(
id);
453 cellIndex[
id] = ipos;
467 int id = indtypes[
k];
474 int id = indtypes[
k];
485 const std::vector<double>& fvec =
val.doubles();
498 const std::vector<double>& fvec =
val.doubles();