36 static constexpr double tol1 = 0.01 * dd4hep::mm;
37 static constexpr double tol2 = 0.00001 * dd4hep::mm;
40 wafers_ =
args.value<std::vector<std::string>>(
"WaferNames");
43 for (
unsigned int i = 0;
i <
wafers_.size(); ++
i)
46 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
47 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
48 thick_ =
args.value<std::vector<double>>(
"Thickness");
52 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
61 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
63 <<
" with " <<
layers_[
i] <<
" layers";
85 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 124 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
125 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
127 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
128 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
131 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
134 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
137 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: NameSpace " << ns.name();
147 for (
unsigned int i = 0;
i <
layers_.size(); ++
i) {
153 for (
int ly = laymin; ly < laymax; ++ly) {
163 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: Layer " << ly <<
":" <<
ii <<
" Front " 173 std::vector<double> pgonZ, pgonRin, pgonRout;
187 for (
unsigned int isec = 0;
isec < pgonZ.size(); ++
isec) {
190 pgonRout[
isec] = rmax;
195 ns.addSolidNS(ns.prepend(
name), solid);
197 ns.addVolumeNS(glog);
202 <<
" sections and filled with " << matter.name();
203 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
212 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
213 ns.addSolidNS(ns.prepend(
name), solid);
215 ns.addVolumeNS(glog);
218 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: " << solid.name() <<
" Tubs made of " << matter.name()
221 <<
cms::convert2mm(hthick) <<
", 0.0, 360.0 and position " << glog.name()
228 mother.placeVolume(glog,
copy,
r1);
231 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalEEFileAlgo: " << glog.name() <<
" number " <<
copy <<
" positioned in " 243 <<
": thickness of all its components **** ERROR ****";
246 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
254 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
258 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalEEFileAlgo construction...";
Log< level::Info, true > LogVerbatim
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, double rin, double rout, double zpos, int layertype, int layer)
int32_t waferU(const int32_t index)
std::vector< double > thick_
std::vector< double > layerThick_
int32_t waferLayer(const int32_t index)
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::vector< std::string > names_
Log< level::Error, false > LogError
std::vector< int > waferProperty_
int32_t waferOrient(const int32_t property)
static std::string to_string(const XMLCh *ch)
std::vector< double > slopeT_
std::vector< int > layerCenter_
std::vector< int > layerSense_
std::unordered_set< int > copies_
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
int32_t waferThick(const int32_t property)
std::vector< int > copyNumber_
std::vector< double > slopeB_
int32_t waferPartial(const int32_t property)
std::vector< double > zFrontT_
std::vector< int > layerType_
std::vector< int > waferIndex_
std::vector< double > rMinFront_
int32_t waferV(const int32_t index)
std::vector< double > rMaxFront_
Log< level::Warning, false > LogWarning
std::vector< double > zFrontB_
std::vector< std::string > materials_
std::vector< int > layers_
std::vector< std::string > wafers_