38 static constexpr
double tol1 = 0.01 * dd4hep::mm;
71 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
72 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
74 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
78 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
81 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
86 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
87 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
90 <<
" partial modules\nDDHGCalMixLayer:Full Modules:";
91 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
92 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
93 std::ostringstream st1;
95 for (
unsigned int i =
i1;
i <
i2; ++
i)
100 i1max =
static_cast<unsigned int>(
waferPart_.size());
101 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
102 std::ostringstream st1;
104 for (
unsigned int i =
i1;
i <
i2; ++
i)
110 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
111 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
112 thick_ =
args.value<std::vector<double>>(
"Thickness");
116 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
125 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
127 <<
" with " <<
layers_[
i] <<
" layers";
144 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 160 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
215 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: NameSpace " << ns.name();
223 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
229 for (
int ly = laymin; ly < laymax; ++ly) {
239 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: Layer " << ly <<
":" <<
ii <<
" Front " 249 std::vector<double> pgonZ, pgonRin, pgonRout;
264 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
267 pgonRout[isec] = rmax;
269 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
273 ns.addSolidNS(ns.prepend(
name), solid);
275 ns.addVolumeNS(glog);
280 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
289 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
290 ns.addSolidNS(ns.prepend(
name), solid);
292 ns.addVolumeNS(glog);
295 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: " << solid.name() <<
" Tubs made of " << matter.name()
298 <<
cms::convert2mm(hthick) <<
", 0.0, 360.0 and positioned in: " << glog.name()
299 <<
" number " <<
copy;
305 mother.placeVolume(glog,
copy,
r1);
308 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixLayer: " << glog.name() <<
" number " <<
copy <<
" positioned in " 319 <<
": thickness of all its components **** ERROR ****";
322 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
330 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
334 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalMixLayer construction...";
std::vector< int > copyNumberTop_
std::vector< int > layerOrient_
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::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)
static std::string to_string(const XMLCh *ch)
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_
int32_t waferV(const int32_t index)
std::unordered_set< int > copies_
Log< level::Warning, false > LogWarning
static int32_t layerType(int type)
std::vector< double > layerThickTop_
std::vector< int > tileIndex_