270 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4hep)::build called with " 271 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
276 std::vector<std::string> tempS;
277 std::vector<double> tempD;
278 bool ok = fv.firstChild();
279 tempS = fv.get<std::vector<std::string> >(
name2,
"GeometryMode");
281 tempS = fv.get<std::vector<std::string> >(
name,
"GeometryMode");
283 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
287 php.
mode_ = getGeometryMode(
sv);
302 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
304 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
305 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
306 mode = getGeometryWaferMode(sv2);
319 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
323 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
325 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
328 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
330 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
333 tempD = fv.get<std::vector<double> >(
name,
"LayerRotation");
338 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
349 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
350 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
351 mode = getGeometryWaferMode(sv2);
352 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsFine");
354 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
356 tempD = fv.get<std::vector<double> >(namet,
"WaferSize");
358 tempD = fv.get<std::vector<double> >(namet,
"WaferThickness");
360 tempD = fv.get<std::vector<double> >(namet,
"SensorSeparation");
362 tempD = fv.get<std::vector<double> >(namet,
"MouseBite");
375 for (
int k = 0;
k < 2; ++
k)
381 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
383 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
385 geom->loadCellParsHexagon(vmap, php);
391 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
393 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
395 geom->loadWaferHexagon(php);
397 geom->loadCellParsHexagon(vmap, php);
402 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
404 geom->loadGeometryHexagon8(cpv, php,
name, 1);
408 geom->loadWaferHexagon8(php);
411 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
413 geom->loadGeometryHexagon8(cpv, php,
name, 1);
417 geom->loadWaferHexagon8(php);
420 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
422 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
426 geom->loadWaferHexagon8(php);
432 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
435 tempD = fv.get<std::vector<double> >(
name,
"FirstLayer");
437 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
439 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
441 tempD = fv.get<std::vector<double> >(
name,
"WaferThickness");
443 tempD = fv.get<std::vector<double> >(
name,
"MinimumTileSize");
447 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
449 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
452 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
463 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
467 geom->loadCellTrapezoid(php);
469 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
472 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
475 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
476 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
480 <<
" 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)