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&)";
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();
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()) {
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
std::vector< std::string > lvNames_
dd4hep::SpecParRefs DDSpecParRefs
std::vector< std::string > getStringArray(const std::string &, const DDsvalues_type &)
const cms::DDDetector * detector() const
std::vector< int > etaBaskets_
DDSpecParRegistry const & specpars() const
std::vector< double > dzs_
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
const std::string & name() const
Returns the name.
bool next()
set current node to the next node in the filtered tree
bool build(const DDCompactView *, const std::string &name, EcalSimulationParameters &)
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
DDsvalues_type mergedSpecifics() const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
dd4hep::Volume worldVolume() const
Handle to the world volume containing everything.
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
char data[epos_bytes_allocation]
bool firstChild()
set the current node to the first child ...
while(__syncthreads_or(more))
bool buildParameters(const EcalSimulationParameters &)