261 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalParametersFromDD (DD4hep)::build called with "
262 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" << name2;
267 std::vector<std::string> tempS;
268 std::vector<double> tempD;
269 bool ok = fv.firstChild();
270 tempS = fv.get<std::vector<std::string> >(name2,
"GeometryMode");
272 tempS = fv.get<std::vector<std::string> >(
name,
"GeometryMode");
274 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
278 php.
mode_ = getGeometryMode(sv);
291 std::unique_ptr<HGCalGeomParameters>
geom = std::make_unique<HGCalGeomParameters>();
293 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
294 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
295 mode = getGeometryWaferMode(sv2);
307 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
311 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
313 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
316 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
318 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
321 tempD = fv.get<std::vector<double> >(
name,
"LayerRotation");
332 tempS = fv.get<std::vector<std::string> >(namet,
"WaferMode");
333 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::ExtrudedPolygon";
334 mode = getGeometryWaferMode(sv2);
335 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsFine");
337 tempD = fv.get<std::vector<double> >(namet,
"NumberOfCellsCoarse");
339 tempD = fv.get<std::vector<double> >(namet,
"WaferSize");
341 tempD = fv.get<std::vector<double> >(namet,
"WaferThickness");
343 tempD = fv.get<std::vector<double> >(namet,
"SensorSeparation");
345 tempD = fv.get<std::vector<double> >(namet,
"MouseBite");
358 for (
int k = 0;
k < 2; ++
k)
364 geom->loadSpecParsHexagon(fv, php, name, namew, namec, name2);
366 geom->loadGeometryHexagon(cpv, php, name, namew, namec,
mode);
368 geom->loadCellParsHexagon(vmap, php);
374 geom->loadSpecParsHexagon(fv, php, name, namew, namec, name2);
376 geom->loadGeometryHexagon(cpv, php, name, namew, namec,
mode);
378 geom->loadWaferHexagon(php);
380 geom->loadCellParsHexagon(vmap, php);
385 geom->loadSpecParsHexagon8(fv, vmap, php, name);
387 geom->loadGeometryHexagon8(cpv, php, name, 1);
391 geom->loadWaferHexagon8(php);
394 geom->loadSpecParsHexagon8(fv, vmap, php, name);
396 geom->loadGeometryHexagon8(cpv, php, name, 1);
400 geom->loadWaferHexagon8(php);
403 geom->loadSpecParsHexagon8(fv, vmap, php, name);
405 geom->loadGeometryHexagonModule(cpv, php, name, namec, 1);
409 geom->loadWaferHexagon8(php);
411 (php.
mode_ == HGCalGeometryMode::TrapezoidModule)) {
414 tempD = fv.get<std::vector<double> >(
name,
"LevelZSide");
417 tempD = fv.get<std::vector<double> >(
name,
"FirstLayer");
419 tempD = fv.get<std::vector<double> >(
name,
"FirstMixedLayer");
421 tempD = fv.get<std::vector<double> >(
name,
"DetectorType");
423 tempD = fv.get<std::vector<double> >(
name,
"WaferThickness");
425 tempD = fv.get<std::vector<double> >(
name,
"MinimumTileSize");
429 tempD = fv.get<std::vector<double> >(
name,
"WaferMaskMode");
431 tempD = fv.get<std::vector<double> >(
name,
"WaferZside");
441 geom->loadSpecParsTrapezoid(fv, vmap, php, name);
443 geom->loadGeometryHexagon8(cpv, php, name, php.
firstLayer_);
445 geom->loadCellTrapezoid(php);
447 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " << name <<
":" << namew
450 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " << name <<
":" << namew <<
":" << namec;
453 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" << name <<
" not found but needed.";
454 throw cms::Exception(
"DDException") <<
"Attribute Volume:" << name <<
" not found but needed.";
458 <<
" with flag " <<
ok;
std::unordered_map< std::string, std::vector< double >> DDVectorsMap
Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
cms::DDVectorsMap const & vectors() const
Log< level::Error, false > LogError
HGCalGeometryMode::GeometryMode mode_
std::vector< double > cellSize_
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_
const cms::DDDetector * detector() const
static constexpr double tan30deg_
void getCellPosition(HGCalParameters &php, int type)