18 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersFromDD: " << vec.size() <<
" entries for " <<
value <<
":";
20 for (
const auto&
e : vec) {
29 <<
"Inside EcalSimParametersFromDD::build(const DDCompactView*, const std::string&, EcalSimulationParameters&)";
40 std::vector<double> tempD = getDDDArray(
"EnergyWeight",
sv);
45 tempD = getDDDArray(
"nxtalEta",
sv);
49 php.
nxtalEta_ = static_cast<int>(tempD[0]);
50 tempD = getDDDArray(
"nxtalPhi",
sv);
54 php.
nxtalPhi_ = static_cast<int>(tempD[0]);
55 tempD = getDDDArray(
"PhiBaskets",
sv);
61 tempD = getDDDArray(
"ncrys",
sv);
65 php.
ncrys_ = static_cast<int>(tempD[0]);
66 tempD = getDDDArray(
"nmods",
sv);
70 php.
nmods_ = static_cast<int>(tempD[0]);
72 std::vector<std::string> tempS = getStringArray(
"Depth1Name",
sv);
77 tempS = getStringArray(
"Depth2Name",
sv);
89 const std::vector<double>& paras = sol.
parameters();
95 return this->buildParameters(php);
102 edm::LogVerbatim(
"EcalGeom") <<
"Inside EcalSimParametersFromDD::build(const cms::DDCompactView*, const std::string, "
103 "EcalSimulationParameters&)";
110 std::string specName = ((
name ==
"EcalHitsEE") ?
"ecal_ee" : ((
name ==
"EcalHitsES") ?
"ecal_sf" :
"ecal_eb"));
113 std::vector<double> tempD = fv.get<std::vector<double> >(specName,
"EnergyWeight");
114 if (!tempD.empty()) {
118 tempD = fv.get<std::vector<double> >(specName,
"nxtalEta");
122 php.
nxtalEta_ = static_cast<int>(tempD[0]);
123 tempD = fv.get<std::vector<double> >(specName,
"nxtalPhi");
127 php.
nxtalPhi_ = static_cast<int>(tempD[0]);
128 tempD = fv.get<std::vector<double> >(specName,
"PhiBaskets");
134 tempD = fv.get<std::vector<double> >(specName,
"ncrys");
138 php.
ncrys_ = static_cast<int>(tempD[0]);
139 tempD = fv.get<std::vector<double> >(specName,
"nmods");
143 php.
nmods_ = static_cast<int>(tempD[0]);
145 std::vector<std::string> tempS = fv.get<std::vector<std::string> >(specName,
"Depth1Name");
150 tempS = fv.get<std::vector<std::string> >(specName,
"Depth2Name");
159 mypar.filter(refs, attribute,
name);
160 fv.mergedSpecifics(refs);
161 while (fv.firstChild()) {
163 const std::string matName{dd4hep::dd::noNamespace(fv.materialName()).
data(),
164 dd4hep::dd::noNamespace(fv.materialName()).
size()};
168 const std::vector<double>& paras = fv.parameters();
169 double dz = (dd4hep::isA<dd4hep::Trap>(fv.solid())) ?
convertCmToMm(2 * paras[0]) : 0.0;
170 php.
dzs_.emplace_back(
dz);
174 return this->buildParameters(php);
185 << php.
matNames_.size() <<
" matNames and " << php.
dzs_.size() <<
"dzs";
200 const std::vector<double>& fvec =
value.doubles();
203 std::vector<double> fvec;
210 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersFromDD:getStringArray called for " <<
str;
217 const std::vector<std::string>& fvec =
value.strings();
220 std::vector<std::string> fvec;