15 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersFromDD: " << vec.size() <<
" entries for " << value <<
":";
17 for (
const auto&
e : vec) {
26 <<
"Inside EcalSimParametersFromDD::build(const DDCompactView*, const std::string&, EcalSimulationParameters&)";
37 std::vector<double> tempD =
getDDDArray(
"EnergyWeight", sv);
46 php.
nxtalEta_ = static_cast<int>(tempD[0]);
51 php.
nxtalPhi_ = static_cast<int>(tempD[0]);
62 php.
ncrys_ = static_cast<int>(tempD[0]);
67 php.
nmods_ = static_cast<int>(tempD[0]);
86 const std::vector<double>& paras = sol.
parameters();
88 php.
dzs_.emplace_back(dz);
99 edm::LogVerbatim(
"EcalGeom") <<
"Inside EcalSimParametersFromDD::build(const cms::DDCompactView*, const std::string, "
100 "EcalSimulationParameters&)";
107 std::string specName = ((name ==
"EcalHitsEE") ?
"ecal_ee" : ((name ==
"EcalHitsES") ?
"ecal_sf" :
"ecal_eb"));
110 std::vector<double> tempD = fv.get<std::vector<double> >(specName,
"EnergyWeight");
111 if (!tempD.empty()) {
115 tempD = fv.get<std::vector<double> >(specName,
"nxtalEta");
119 php.
nxtalEta_ = static_cast<int>(tempD[0]);
120 tempD = fv.get<std::vector<double> >(specName,
"nxtalPhi");
124 php.
nxtalPhi_ = static_cast<int>(tempD[0]);
125 tempD = fv.get<std::vector<double> >(specName,
"PhiBaskets");
131 tempD = fv.get<std::vector<double> >(specName,
"ncrys");
135 php.
ncrys_ = static_cast<int>(tempD[0]);
136 tempD = fv.get<std::vector<double> >(specName,
"nmods");
140 php.
nmods_ = static_cast<int>(tempD[0]);
142 std::vector<std::string> tempS = fv.get<std::vector<std::string> >(specName,
"Depth1Name");
147 tempS = fv.get<std::vector<std::string> >(specName,
"Depth2Name");
156 mypar.filter(refs, attribute, name);
157 fv.mergedSpecifics(refs);
158 while (fv.firstChild()) {
159 const std::string name{dd4hep::dd::noNamespace(fv.name()).
data(), dd4hep::dd::noNamespace(fv.name()).
size()};
160 const std::string matName{dd4hep::dd::noNamespace(fv.materialName()).
data(),
161 dd4hep::dd::noNamespace(fv.materialName()).
size()};
165 const std::vector<double>& paras = fv.parameters();
166 double dz = (dd4hep::isA<dd4hep::Trap>(fv.solid())) ? ((2.0 * paras[0]) / dd4hep::mm) : 0.0;
167 php.
dzs_.emplace_back(dz);
182 << php.
matNames_.size() <<
" matNames and " << php.
dzs_.size() <<
"dzs";
197 const std::vector<double>& fvec = value.
doubles();
200 std::vector<double> fvec;
207 edm::LogVerbatim(
"EcalGeom") <<
"EcalSimParametersFromDD:getStringArray called for " <<
str;
214 const std::vector<std::string>& fvec = value.
strings();
217 std::vector<std::string> fvec;
Log< level::Info, true > LogVerbatim
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_
dd4hep::SpecParRefs DDSpecParRefs
std::vector< std::string > getStringArray(const std::string &, const DDsvalues_type &)
std::vector< int > etaBaskets_
std::vector< double > dzs_
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
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.
dd4hep::SpecParRegistry DDSpecParRegistry
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 &)
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
dd4hep::Volume worldVolume() const
Handle to the world volume containing everything.
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
DDsvalues_type mergedSpecifics() const
DDSpecParRegistry const & specpars() const
char data[epos_bytes_allocation]
bool firstChild()
set the current node to the first child ...
while(__syncthreads_or(more))
const std::string & name() const
Returns the name.
tuple size
Write out results.
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