242 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4hep)::build called with " 243 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
248 std::vector<std::string> tempS;
249 std::vector<double> tempD;
250 bool ok = fv.firstChild();
251 tempS = fv.get<std::vector<std::string> >(
name2,
"GeometryMode");
253 tempS = fv.get<std::vector<std::string> >(
name,
"GeometryMode");
255 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
278 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
280 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
281 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
295 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
299 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
301 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
304 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
306 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
309 tempD = fv.get<std::vector<double> >(
name,
"LayerRotation");
311 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
316 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
328 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
329 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
331 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsFine");
333 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
335 tempD = fv.get<std::vector<double> >(namet,
"WaferSize");
337 tempD = fv.get<std::vector<double> >(namet,
"WaferThickness");
339 tempD = fv.get<std::vector<double> >(namet,
"SensorSeparation");
341 tempD = fv.get<std::vector<double> >(namet,
"SensorSizeOffset");
343 tempD = fv.get<std::vector<double> >(namet,
"GuardRingOffset");
345 tempD = fv.get<std::vector<double> >(namet,
"MouseBite");
347 tempD = fv.get<std::vector<double> >(namet,
"UseOffset");
361 for (
int k = 0;
k < 2; ++
k)
367 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
369 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
371 geom->loadCellParsHexagon(vmap, php);
377 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
379 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
381 geom->loadWaferHexagon(php);
383 geom->loadCellParsHexagon(vmap, php);
388 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
390 geom->loadGeometryHexagon8(cpv, php,
name, 1);
394 geom->loadWaferHexagon8(php);
397 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
399 geom->loadGeometryHexagon8(cpv, php,
name, 1);
403 geom->loadWaferHexagon8(php);
406 geom->loadSpecParsHexagon8(fv, vmap, php,
name);
408 geom->loadGeometryHexagonModule(cpv, php,
name, namec, 1);
412 geom->loadWaferHexagon8(php);
418 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
421 tempD = fv.get<std::vector<double> >(
name,
"FirstLayer");
423 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
425 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
427 tempD = fv.get<std::vector<double> >(
name,
"WaferThickness");
429 tempD = fv.get<std::vector<double> >(
name,
"MinimumTileSize");
434 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
436 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
439 tempD = fv.get<std::vector<double> >(
name,
"UseSimWt");
443 tempD = fv.get<std::vector<double> >(
name,
"Cassettes");
455 geom->loadSpecParsTrapezoid(fv, vmap, php,
name);
459 geom->loadCellTrapezoid(php);
461 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
464 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
467 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
468 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
472 <<
" 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)