38 static constexpr
double tol1 = 0.01 * dd4hep::mm;
70 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
71 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
73 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
77 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
80 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
85 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
86 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
89 <<
" partial modules\nDDHGCalMixLayer:Full Modules:";
90 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
91 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
92 std::ostringstream st1;
94 for (
unsigned int i =
i1;
i <
i2; ++
i)
99 i1max =
static_cast<unsigned int>(
waferPart_.size());
100 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
101 std::ostringstream st1;
103 for (
unsigned int i =
i1;
i <
i2; ++
i)
109 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
110 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
111 thick_ =
args.value<std::vector<double>>(
"Thickness");
115 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
124 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
126 <<
" with " <<
layers_[
i] <<
" layers";
141 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 157 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
212 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: NameSpace " << ns.name();
220 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
226 for (
int ly = laymin; ly < laymax; ++ly) {
236 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: Layer " << ly <<
":" <<
ii <<
" Front " 246 std::vector<double> pgonZ, pgonRin, pgonRout;
261 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
264 pgonRout[isec] = rmax;
266 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
270 ns.addSolidNS(ns.prepend(
name), solid);
272 ns.addVolumeNS(glog);
277 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
286 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
287 ns.addSolidNS(ns.prepend(
name), solid);
289 ns.addVolumeNS(glog);
292 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: " << solid.name() <<
" Tubs made of " << matter.name()
295 <<
cms::convert2mm(hthick) <<
", 0.0, 360.0 and positioned in: " << glog.name()
296 <<
" number " <<
copy;
302 mother.placeVolume(glog,
copy,
r1);
305 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: " << glog.name() <<
" number " <<
copy <<
" positioned in " 316 <<
": thickness of all its components **** ERROR ****";
319 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
327 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
331 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalMixLayer construction...";
std::vector< int > copyNumberTop_
Log< level::Info, true > LogVerbatim
std::vector< double > tileRMin_
static constexpr double tol2_
std::vector< int > layerTypeTop_
std::vector< std::string > namesTop_
std::vector< std::string > materialTop_
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::string to_string(const V &value)
std::vector< double > tileRMax_
std::vector< double > layerThick_
std::vector< std::string > waferFull_
std::vector< int > waferLayerStart_
Log< level::Error, false > LogError
std::vector< int > layerSense_
std::vector< int > copyNumber_
int32_t waferOrient(const int32_t property)
std::vector< double > slopeB_
std::vector< int > waferIndex_
std::vector< double > rMinFront_
std::vector< double > zFrontB_
std::vector< int > tilePhis_
std::vector< int > layers_
std::vector< int > tileLayerStart_
Cos< T >::type cos(const T &t)
std::vector< std::string > waferPart_
std::vector< std::string > materials_
Abs< T >::type abs(const T &t)
int32_t waferThick(const int32_t property)
std::vector< int > layerType_
std::vector< int > waferProperty_
std::vector< double > rMaxFront_
void positionMix(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, const std::string &nameM, int copyM, double thick, const dd4hep::Material &matter)
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
std::vector< std::string > names_
std::vector< double > thick_
std::vector< double > slopeT_
int32_t waferPartial(const int32_t property)
std::vector< double > zFrontT_
std::vector< int > layerTypes_
int32_t waferV(const int32_t index)
std::unordered_set< int > copies_
Log< level::Warning, false > LogWarning
std::vector< double > layerThickTop_
std::vector< int > tileIndex_