37 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: Creating an instance";
40 static constexpr
double tol1 = 0.01 * dd4hep::mm;
75 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
76 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
78 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
82 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
85 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
90 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
91 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
94 <<
waferPart_.size() <<
" partial modules\nDDHGCalMixRotatedLayer:Full Modules:";
95 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
96 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
97 std::ostringstream st1;
99 for (
unsigned int i =
i1;
i <
i2; ++
i)
103 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: Partial Modules:";
104 i1max =
static_cast<unsigned int>(
waferPart_.size());
105 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
106 std::ostringstream st1;
108 for (
unsigned int i =
i1;
i <
i2; ++
i)
114 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
115 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
116 thick_ =
args.value<std::vector<double>>(
"Thickness");
120 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
129 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
131 <<
" with " <<
layers_[
i] <<
" layers";
148 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 164 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
170 <<
" types of volumes in the top part";
197 <<
" elements for cassette shifts";
199 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
200 std::ostringstream st1;
201 unsigned int j2 =
std::min((j1 + 6), j1max);
202 for (
unsigned int j = j1;
j < j2; ++
j)
232 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: NameSpace " << ns.name();
234 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalMixRotatedLayer...";
240 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
246 for (
int ly = laymin; ly < laymax; ++ly) {
256 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: Layer " << ly <<
":" <<
ii <<
" Front " 266 std::vector<double> pgonZ, pgonRin, pgonRout;
281 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
284 pgonRout[isec] = rmax;
286 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
290 ns.addSolidNS(ns.prepend(
name), solid);
292 ns.addVolumeNS(glog);
297 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
306 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
307 ns.addSolidNS(ns.prepend(
name), solid);
309 ns.addVolumeNS(glog);
312 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: " << solid.name() <<
" Tubs made of " 316 <<
", 0.0, 360.0 and positioned in: " << glog.name() <<
" number " <<
copy;
322 mother.placeVolume(glog,
copy,
r1);
325 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: " << glog.name() <<
" number " <<
copy 327 <<
") with no rotation";
337 <<
": thickness of all its components **** ERROR ****";
340 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
346 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedLayer: " <<
copies_.size() <<
" different wafer copy numbers";
348 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
352 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalMixRotatedLayer construction...";
std::vector< int > tileIndex_
Log< level::Info, true > LogVerbatim
std::vector< int > layerTypeTop_
std::vector< double > thick_
std::vector< int > waferIndex_
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
std::vector< int > layerSense_
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::vector< int > tileLayerStart_
std::string to_string(const V &value)
std::vector< int > copyNumber_
std::vector< int > copyNumberTop_
std::vector< double > cassetteShift_
Log< level::Error, false > LogError
static constexpr double tol2_
std::vector< double > zFrontB_
int32_t waferOrient(const int32_t property)
std::vector< int > waferProperty_
std::vector< double > layerThickTop_
std::vector< std::string > materialTop_
std::vector< double > rMaxFront_
std::vector< std::string > namesTop_
Cos< T >::type cos(const T &t)
std::vector< int > tilePhis_
std::vector< double > tileRMax_
Abs< T >::type abs(const T &t)
std::vector< int > waferLayerStart_
std::vector< double > layerThick_
int32_t waferThick(const int32_t property)
std::vector< double > slopeT_
std::unordered_set< int > copies_
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
std::vector< int > layers_
std::vector< double > zFrontT_
std::vector< int > layerOrient_
std::vector< std::string > waferPart_
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::vector< int > layerType_
std::vector< double > tileRMin_
int32_t waferPartial(const int32_t property)
std::vector< double > slopeB_
int32_t waferV(const int32_t index)
std::vector< std::string > waferFull_
Log< level::Warning, false > LogWarning
static int32_t layerType(int type)
std::vector< std::string > names_
std::vector< double > rMinFront_
std::vector< std::string > materials_
void setParameter(int cassette, const std::vector< double > &shifts)