37 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Creating an instance";
40 static constexpr
double tol1 = 0.01 * dd4hep::mm;
79 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
80 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
82 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
86 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
89 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
94 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
95 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
98 <<
waferPart_.size() <<
" partial modules\nDDHGCalMixRotatedCassette:Full Modules:";
99 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
100 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
101 std::ostringstream st1;
103 for (
unsigned int i =
i1;
i <
i2; ++
i)
107 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Partial Modules:";
108 i1max =
static_cast<unsigned int>(
waferPart_.size());
109 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
110 std::ostringstream st1;
112 for (
unsigned int i =
i1;
i <
i2; ++
i)
123 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
124 std::ostringstream st1;
126 for (
unsigned int i =
i1;
i <
i2; ++
i)
130 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
132 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
133 std::ostringstream st1;
135 for (
unsigned int i =
i1;
i <
i2; ++
i)
141 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
142 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
143 thick_ =
args.value<std::vector<double>>(
"Thickness");
147 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
156 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
158 <<
" with " <<
layers_[
i] <<
" layers";
175 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 190 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
198 <<
" types of volumes in the top part; cover Type " <<
coverTypeTop_ 226 <<
" elements for cassette shifts";
228 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
229 std::ostringstream st1;
230 unsigned int j2 =
std::min((j1 + 6), j1max);
231 for (
unsigned int j = j1;
j < j2; ++
j)
261 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: NameSpace " << ns.name();
263 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalMixRotatedCassette...";
269 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
275 for (
int ly = laymin; ly < laymax; ++ly) {
285 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " << ly <<
":" <<
ii <<
" Front " 295 std::vector<double> pgonZ, pgonRin, pgonRout;
310 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
313 pgonRout[isec] = rmax;
315 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
319 ns.addSolidNS(ns.prepend(
name), solid);
321 ns.addVolumeNS(glog);
326 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
334 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
335 ns.addSolidNS(ns.prepend(
name), solid);
337 ns.addVolumeNS(glog);
340 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << solid.name() <<
" Tubs made of " 344 <<
", 0.0, 360.0 and positioned in: " << glog.name() <<
" number " <<
copy;
350 mother.placeVolume(glog,
copy,
r1);
353 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << glog.name() <<
" number " <<
copy 355 <<
") with no rotation";
365 <<
": thickness of all its components **** ERROR ****";
368 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
374 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " <<
copies_.size() <<
" different wafer copy numbers";
376 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
380 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalMixRotatedCassette construction...";
Log< level::Info, true > LogVerbatim
std::vector< double > rMinFront_
std::vector< int > copyNumber_
std::vector< double > tileRMin_
std::unordered_set< int > copies_
void positionMix(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, const std::string &nameM, int copyM, double thick, const dd4hep::Material &matter, int absType)
std::vector< int > tileLayerStart_
std::vector< std::string > namesTop_
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
std::vector< int > tilePhis_
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::vector< std::string > names_
std::vector< std::string > waferPart_
std::vector< double > slopeB_
std::vector< double > layerThickTop_
std::vector< double > tileRMax_
Log< level::Error, false > LogError
int32_t waferOrient(const int32_t property)
static std::string to_string(const XMLCh *ch)
std::vector< double > thick_
std::vector< std::string > materialTop_
std::vector< int > layerOrient_
std::vector< double > zFrontB_
std::vector< double > cassetteShift_
std::vector< int > waferIndex_
std::vector< int > layerSense_
std::vector< double > layerThick_
std::vector< int > copyNumberTop_
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::vector< std::string > waferFull_
int32_t waferThick(const int32_t property)
std::vector< std::string > passivePart_
std::vector< int > layerTypeTop_
std::vector< int > layers_
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
std::vector< int > tileIndex_
static constexpr double tol2_
std::vector< int > waferProperty_
std::vector< int > waferLayerStart_
std::vector< double > zFrontT_
int32_t waferPartial(const int32_t property)
int32_t waferV(const int32_t index)
std::vector< int > layerType_
std::vector< double > rMaxFront_
Log< level::Warning, false > LogWarning
static int32_t layerType(int type)
std::vector< std::string > materials_
std::vector< double > slopeT_
void setParameter(int cassette, const std::vector< double > &shifts)
std::vector< std::string > passiveFull_