252 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4hep)::build called with " 253 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
258 std::vector<std::string> tempS;
259 std::vector<double> tempD;
260 bool ok = fv.firstChild();
261 tempS = fv.get<std::vector<std::string> >(
name2,
"GeometryMode");
263 tempS = fv.get<std::vector<std::string> >(
name,
"GeometryMode");
265 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
293 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
295 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
296 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
310 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
314 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
316 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
319 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
321 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
325 tempD = fv.get<std::vector<double> >(
name,
"LayerRotation");
327 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
332 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
344 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
345 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
347 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsFine");
349 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
351 tempD = fv.get<std::vector<double> >(namet,
"WaferSize");
353 tempD = fv.get<std::vector<double> >(namet,
"WaferThickness");
355 tempD = fv.get<std::vector<double> >(namet,
"SensorSeparation");
357 tempD = fv.get<std::vector<double> >(namet,
"SensorSizeOffset");
359 tempD = fv.get<std::vector<double> >(namet,
"GuardRingOffset");
361 tempD = fv.get<std::vector<double> >(namet,
"MouseBite");
363 tempD = fv.get<std::vector<double> >(namet,
"UseOffset");
379 for (
int k = 0;
k < 2; ++
k)
385 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
387 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
389 geom->loadCellParsHexagon(vmap, php);
395 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
397 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
399 geom->loadWaferHexagon(php);
401 geom->loadCellParsHexagon(vmap, php);
406 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
408 geom->loadGeometryHexagon8(cpv, php,
name, 1);
412 geom->loadWaferHexagon8(php);
415 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
417 geom->loadGeometryHexagon8(cpv, php,
name, 1);
421 geom->loadWaferHexagon8(php);
425 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
427 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
431 geom->loadWaferHexagon8(php);
437 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
439 tempD = fv.get<std::vector<double> >(
name,
"FirstLayer");
441 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
443 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
445 tempD = fv.get<std::vector<double> >(
name,
"WaferThickness");
447 tempD = fv.get<std::vector<double> >(
name,
"MinimumTileSize");
453 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
455 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
458 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
462 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
474 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
478 geom->loadCellTrapezoid(php);
480 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
483 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
486 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
487 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
491 <<
" 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)