280 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4hep)::build called with " 281 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
286 std::vector<std::string> tempS;
287 std::vector<double> tempD;
288 bool ok = fv.firstChild();
289 tempS = fv.get<std::vector<std::string> >(
name2,
"GeometryMode");
291 tempS = fv.get<std::vector<std::string> >(
name,
"GeometryMode");
293 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
300 php.
mode_ = getGeometryMode(
sv);
316 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
318 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
319 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
320 mode = getGeometryWaferMode(sv2);
333 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
337 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
339 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
342 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
344 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
347 tempD = fv.get<std::vector<double> >(
name,
"LayerRotation");
349 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
354 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
366 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
367 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
368 mode = getGeometryWaferMode(sv2);
369 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsFine");
371 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
373 tempD = fv.get<std::vector<double> >(namet,
"WaferSize");
375 tempD = fv.get<std::vector<double> >(namet,
"WaferThickness");
377 tempD = fv.get<std::vector<double> >(namet,
"SensorSeparation");
379 tempD = fv.get<std::vector<double> >(namet,
"MouseBite");
392 for (
int k = 0;
k < 2; ++
k)
398 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
400 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
402 geom->loadCellParsHexagon(vmap, php);
408 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
410 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
412 geom->loadWaferHexagon(php);
414 geom->loadCellParsHexagon(vmap, php);
419 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
421 geom->loadGeometryHexagon8(cpv, php,
name, 1);
425 geom->loadWaferHexagon8(php);
428 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
430 geom->loadGeometryHexagon8(cpv, php,
name, 1);
434 geom->loadWaferHexagon8(php);
437 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
439 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
443 geom->loadWaferHexagon8(php);
449 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
452 tempD = fv.get<std::vector<double> >(
name,
"FirstLayer");
454 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
456 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
458 tempD = fv.get<std::vector<double> >(
name,
"WaferThickness");
460 tempD = fv.get<std::vector<double> >(
name,
"MinimumTileSize");
464 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
466 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
469 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
473 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
485 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
489 geom->loadCellTrapezoid(php);
491 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
494 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
497 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
498 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
502 <<
" with flag " <<
ok;
Log< level::Info, true > LogVerbatim
static constexpr int scintillatorCassette
constexpr NumType convertRadToDeg(NumType radians)
const cms::DDDetector * detector() const
Log< level::Error, false > LogError
HGCalGeometryMode::GeometryMode mode_
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
static constexpr int siliconCassetteHE
std::vector< double > cellSize_
static constexpr int siliconCassetteEE
static constexpr double k_ScaleFromDD4hep
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
static constexpr double k_ScaleToDDD
std::vector< int > levelT_
cms::DDVectorsMap const & vectors() const
static constexpr double tan30deg_
void getCellPosition(HGCalParameters &php, int type)