256 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4hep)::build called with " 257 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
262 std::vector<std::string> tempS;
263 std::vector<double> tempD;
264 bool ok = fv.firstChild();
265 tempS = fv.get<std::vector<std::string> >(
name2,
"GeometryMode");
267 tempS = fv.get<std::vector<std::string> >(
name,
"GeometryMode");
269 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
298 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
300 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
301 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
315 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
319 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
321 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
324 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
326 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
330 tempD = fv.get<std::vector<double> >(
name,
"LayerRotation");
332 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
337 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";
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,
"SensorSizeOffset");
364 tempD = fv.get<std::vector<double> >(namet,
"GuardRingOffset");
366 tempD = fv.get<std::vector<double> >(namet,
"MouseBite");
368 tempD = fv.get<std::vector<double> >(namet,
"UseOffset");
384 for (
int k = 0;
k < 2; ++
k)
390 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
392 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
394 geom->loadCellParsHexagon(vmap, php);
400 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
402 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
404 geom->loadWaferHexagon(php);
406 geom->loadCellParsHexagon(vmap, 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->loadGeometryHexagon8(cpv, php,
name, 1);
426 geom->loadWaferHexagon8(php);
430 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
432 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
436 geom->loadWaferHexagon8(php);
443 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
445 tempD = fv.get<std::vector<double> >(
name,
"FirstLayer");
447 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
449 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
451 tempD = fv.get<std::vector<double> >(
name,
"WaferThickness");
453 tempD = fv.get<std::vector<double> >(
name,
"MinimumTileSize");
459 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
461 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
465 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
470 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
482 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
486 geom->loadCellTrapezoid(php);
488 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
491 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
494 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
495 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
499 <<
" 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
WaferMode getGeometryWaferMode(const char *s, const DDsvalues_type &sv)
static constexpr int siliconCassetteHE
std::vector< double > cellSize_
static constexpr int siliconCassetteEE
GeometryMode getGeometryMode(const char *s, const DDsvalues_type &sv)
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)
static constexpr int scintillatorFineCell