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);
112 php.
levelZSide_ = static_cast<int>(getDDDValue(
"LevelZSide",
sv));
119 php.
waferZSide_ = static_cast<int>(getDDDValue(
"WaferZside",
sv));
126 attribute =
"OnlyForHGCalNumbering";
134 mode = getGeometryWaferMode(
"WaferMode", sv2);
135 php.
nCellsFine_ = static_cast<int>(getDDDValue(
"NumberOfCellsFine", sv2));
136 php.
nCellsCoarse_ = static_cast<int>(getDDDValue(
"NumberOfCellsCoarse", sv2));
152 for (
int k = 0;
k < 2; ++
k)
153 getCellPosition(php,
k);
159 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
161 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
163 geom->loadCellParsHexagon(cpv, php);
169 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
171 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
173 geom->loadWaferHexagon(php);
175 geom->loadCellParsHexagon(cpv, php);
180 geom->loadSpecParsHexagon8(fv, php);
182 geom->loadGeometryHexagon8(fv, php, 1);
186 geom->loadWaferHexagon8(php);
189 geom->loadSpecParsHexagon8(fv, php);
191 geom->loadGeometryHexagon8(fv, php, 1);
195 geom->loadWaferHexagon8(php);
207 php.
waferZSide_ = static_cast<int>(getDDDValue(
"WaferZside",
sv));
215 geom->loadSpecParsTrapezoid(fv, php);
219 geom->loadCellTrapezoid(php);
221 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
224 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
227 edm::LogError(
"HGCalGeom") <<
" Attribute " <<
val <<
" not found but needed.";
228 throw cms::Exception(
"DDException") <<
"Attribute " <<
val <<
" not found but needed.";
232 <<
" with flag " <<
ok;
245 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4Hep)::build called with "
246 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet;
251 std::vector<std::string> tempS;
252 std::vector<double> tempD;
254 tempS = fv.
get<std::vector<std::string> >(
name2,
"GeometryMode");
256 tempS = fv.
get<std::vector<std::string> >(
name,
"GeometryMode");
257 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
261 php.
mode_ = getGeometryMode(
sv);
271 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
273 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
274 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
275 mode = getGeometryWaferMode(sv2);
287 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
291 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
293 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
296 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
298 tempD = fv.
get<std::vector<double> >(
name,
"WaferZside");
307 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
308 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
309 mode = getGeometryWaferMode(sv2);
310 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsFine");
312 tempD = fv.
get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
314 tempD = fv.
get<std::vector<double> >(namet,
"WaferSize");
316 tempD = fv.
get<std::vector<double> >(namet,
"WaferThickness");
318 tempD = fv.
get<std::vector<double> >(namet,
"SensorSeparation");
320 tempD = fv.
get<std::vector<double> >(namet,
"MouseBite");
333 for (
int k = 0;
k < 2; ++
k)
334 getCellPosition(php,
k);
339 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
341 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
343 geom->loadCellParsHexagon(vmap, php);
349 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
351 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
353 geom->loadWaferHexagon(php);
355 geom->loadCellParsHexagon(vmap, php);
360 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
362 geom->loadGeometryHexagon8(cpv, php,
name, 1);
366 geom->loadWaferHexagon8(php);
369 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
371 geom->loadGeometryHexagon8(cpv, php,
name, 1);
375 geom->loadWaferHexagon8(php);
379 tempD = fv.
get<std::vector<double> >(
name,
"LevelZSide");
382 tempD = fv.
get<std::vector<double> >(
name,
"FirstLayer");
384 tempD = fv.
get<std::vector<double> >(
name,
"FirstMixedLayer");
386 tempD = fv.
get<std::vector<double> >(
name,
"DetectorType");
388 tempD = fv.
get<std::vector<double> >(
name,
"WaferThickness");
390 tempD = fv.
get<std::vector<double> >(
name,
"MinimumTileSize");
394 tempD = fv.
get<std::vector<double> >(
name,
"WaferMaskMode");
396 tempD = fv.
get<std::vector<double> >(
name,
"WaferZside");
406 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
410 geom->loadCellTrapezoid(php);
412 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
415 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
418 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
419 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
423 <<
" with flag " <<
ok;
438 std::vector<int> indtypes;
442 double r = 0.5 *
R *
sqrt(3.0);
445 for (
int u = 0; u < 2 *
N; ++u) {
446 for (
int v = 0;
v < 2 *
N; ++
v) {
447 if (((
v - u) <
N) && (u -
v) <=
N) {
448 double yp = (u - 0.5 *
v - n2) * 2 *
r;
449 double xp = (1.5 * (
v -
N) + 1.0) *
R;
450 int id =
v * 100 + u;
452 indtypes.emplace_back(
id);
461 cellIndex[
id] = ipos;
475 int id = indtypes[
k];
482 int id = indtypes[
k];
493 const std::vector<double>& fvec =
val.doubles();
506 const std::vector<double>& fvec =
val.doubles();