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();
91 php.
dzs_.emplace_back(dz);
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()) {
162 const std::string name{fv.name().data(), fv.name().size()};
168 const std::vector<double>& paras = fv.parameters();
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;
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
std::vector< std::string > lvNames_
std::vector< std::string > getStringArray(const std::string &, const DDsvalues_type &)
std::vector< int > etaBaskets_
Volume worldVolume() const
Handle to the world volume containing everything.
void filter(DDSpecParRefs &, std::string_view, std::string_view) const
std::vector< double > dzs_
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
std::string_view noNamespace(std::string_view)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
void myPrint(std::string value, const std::vector< T > &vec)
A DDSolid represents the shape of a part.
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< std::string > matNames_
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
bool next()
set current node to the next node in the filtered tree
DDSolidShape shape(void) const
The type of the solid.
bool build(const DDCompactView *, const std::string &name, EcalSimulationParameters &)
constexpr NumType convertCmToMm(NumType centimeters)
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
std::vector< const DDSpecPar * > DDSpecParRefs
DDsvalues_type mergedSpecifics() const
DDSpecParRegistry const & specpars() const
char data[epos_bytes_allocation]
bool firstChild()
set the current node to the first child ...
const std::string & name() const
Returns the name.
bool buildParameters(const EcalSimulationParameters &)
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
const cms::DDDetector * detector() const