21 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalTBParametersFromDD (DDD)::build called with " 22 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet;
46 std::unique_ptr<HGCalTBGeomParameters>
geom = std::make_unique<HGCalTBGeomParameters>();
48 attribute =
"OnlyForHGCalNumbering";
66 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
68 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
70 geom->loadCellParsHexagon(cpv, php);
75 geom->loadSpecParsHexagon(fv, php, cpv, namew, namec);
77 geom->loadGeometryHexagon(fv, php,
name, cpv, namew, namec,
mode);
79 geom->loadWaferHexagon(php);
81 geom->loadCellParsHexagon(cpv, php);
85 edm::LogError(
"HGCalGeom") <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew
88 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " <<
name <<
":" << namew <<
":" << namec;
91 edm::LogError(
"HGCalGeom") <<
" Attribute " <<
val <<
" not found but needed.";
92 throw cms::Exception(
"DDException") <<
"Attribute " <<
val <<
" not found but needed.";
95 edm::LogVerbatim(
"HGCalGeom") <<
"Return from HGCalTBParametersFromDD::build" 96 <<
" with flag " <<
ok;
109 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalTBParametersFromDD (DD4hep)::build called with " 110 <<
"names " <<
name <<
":" << namew <<
":" << namec <<
":" << namet <<
":" <<
name2;
115 std::vector<std::string> tempS;
116 std::vector<double> tempD;
118 tempS = fv.
get<std::vector<std::string> >(
name2,
"GeometryMode");
120 tempS = fv.
get<std::vector<std::string> >(
name,
"GeometryMode");
122 std::string sv = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Hexagon8Full";
137 std::unique_ptr<HGCalTBGeomParameters>
geom = std::make_unique<HGCalTBGeomParameters>();
139 tempS = fv.
get<std::vector<std::string> >(namet,
"WaferMode");
140 std::string sv2 = (!tempS.empty()) ? tempS[0] :
"HGCalGeometryMode::Polyhedra";
150 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
152 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
154 geom->loadCellParsHexagon(vmap, php);
160 geom->loadSpecParsHexagon(fv, php,
name, namew, namec,
name2);
162 geom->loadGeometryHexagon(cpv, php,
name, namew, namec,
mode);
164 geom->loadWaferHexagon(php);
166 geom->loadCellParsHexagon(vmap, php);
171 edm::LogError(
"HGCalGeom") <<
" Attribute Volume:" <<
name <<
" not found but needed.";
172 throw cms::Exception(
"DDException") <<
"Attribute Volume:" <<
name <<
" not found but needed.";
175 edm::LogVerbatim(
"HGCalGeom") <<
"Return from HGCalTBParametersFromDD::build" 176 <<
" with flag " <<
ok;
184 const std::vector<double>& fvec =
val.doubles();
186 throw cms::Exception(
"HGCalGeom") <<
"getDDDValue::Failed to get " <<
s <<
" tag.";
190 throw cms::Exception(
"HGCalGeom") <<
"getDDDValue::Failed to fetch " <<
s <<
" tag";
197 const std::vector<double>& fvec =
val.doubles();
199 throw cms::Exception(
"HGCalGeom") <<
"getDDDArray::Failed to get " <<
s <<
" tag.";
203 throw cms::Exception(
"HGCalGeom") <<
"getDDDArray:Failed to fetch " <<
s <<
" tag";
Log< level::Info, true > LogVerbatim
bool build(const DDCompactView *cpv, HGCalTBParameters &php, const std::string &name, const std::string &namew, const std::string &namec, const std::string &namet)
double getDDDValue(const char *s, const DDsvalues_type &sv)
const cms::DDDetector * detector() const
Log< level::Error, false > LogError
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
WaferMode getGeometryWaferMode(const char *s, const DDsvalues_type &sv)
std::vector< double > getDDDArray(const char *s, const DDsvalues_type &sv)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
GeometryMode getGeometryMode(const char *s, const DDsvalues_type &sv)
HGCalGeometryMode::GeometryMode mode_
bool firstChild()
set the current node to the first child
DDsvalues_type mergedSpecifics() const
T get(const std::string &)
extract attribute value
bool firstChild()
set the current node to the first child ...
cms::DDVectorsMap const & vectors() const