31 #include <unordered_set> 62 static constexpr
double tol1_ = 0.01;
63 static constexpr
double tol2_ = 0.00001;
122 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Creating an instance";
131 waferTypes_ =
static_cast<int>(nArgs[
"WaferTypes"]);
132 passiveTypes_ =
static_cast<int>(nArgs[
"PassiveTypes"]);
133 facingTypes_ =
static_cast<int>(nArgs[
"FacingTypes"]);
134 orientationTypes_ =
static_cast<int>(nArgs[
"OrientationTypes"]);
135 partialTypes_ =
static_cast<int>(nArgs[
"PartialTypes"]);
136 placeOffset_ =
static_cast<int>(nArgs[
"PlaceOffset"]);
137 phiBinsScint_ =
static_cast<int>(nArgs[
"NPhiBinScint"]);
139 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette::Number of types of wafers: " << waferTypes_
140 <<
" passives: " << passiveTypes_ <<
" facings: " << facingTypes_
141 <<
" Orientations: " << orientationTypes_ <<
" PartialTypes: " << partialTypes_
142 <<
" PlaceOffset: " << placeOffset_ <<
"; number of cells along phi " << phiBinsScint_;
144 firstLayer_ = (
int)(nArgs[
"FirstLayer"]);
145 absorbMode_ = (
int)(nArgs[
"AbsorberMode"]);
146 sensitiveMode_ = (
int)(nArgs[
"SensitiveMode"]);
148 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette::First Layer " << firstLayer_ <<
" and " 149 <<
"Absober:Sensitive mode " << absorbMode_ <<
":" << sensitiveMode_;
151 zMinBlock_ = nArgs[
"zMinBlock"];
152 waferSize_ = nArgs[
"waferSize"];
153 waferSepar_ = nArgs[
"SensorSeparation"];
154 sectors_ =
static_cast<int>(nArgs[
"Sectors"]);
155 cassettes_ =
static_cast<int>(nArgs[
"Cassettes"]);
156 alpha_ = (1._pi) / sectors_;
157 cosAlpha_ =
cos(alpha_);
159 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: zStart " << zMinBlock_ <<
" wafer width " << waferSize_
160 <<
" separations " << waferSepar_ <<
" sectors " << sectors_ <<
":" 161 <<
convertRadToDeg(alpha_) <<
":" << cosAlpha_ <<
" with " << cassettes_
164 slopeB_ = vArgs[
"SlopeBottom"];
165 zFrontB_ = vArgs[
"ZFrontBottom"];
166 rMinFront_ = vArgs[
"RMinFront"];
167 slopeT_ = vArgs[
"SlopeTop"];
168 zFrontT_ = vArgs[
"ZFrontTop"];
169 rMaxFront_ = vArgs[
"RMaxFront"];
171 for (
unsigned int i = 0;
i < slopeB_.size(); ++
i)
172 edm::LogVerbatim(
"HGCalGeom") <<
"Bottom Block [" <<
i <<
"] Zmin " << zFrontB_[
i] <<
" Rmin " << rMinFront_[
i]
173 <<
" Slope " << slopeB_[
i];
174 for (
unsigned int i = 0;
i < slopeT_.size(); ++
i)
175 edm::LogVerbatim(
"HGCalGeom") <<
"Top Block [" <<
i <<
"] Zmin " << zFrontT_[
i] <<
" Rmax " << rMaxFront_[
i]
176 <<
" Slope " << slopeT_[
i];
178 waferFull_ = vsArgs[
"WaferNamesFull"];
179 waferPart_ = vsArgs[
"WaferNamesPartial"];
181 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << waferFull_.size() <<
" full and " 182 << waferPart_.size() <<
" partial modules\nDDHGCalMixRotatedCassette:Full Modules:";
183 unsigned int i1max =
static_cast<unsigned int>(waferFull_.size());
184 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
185 std::ostringstream st1;
187 for (
unsigned int i =
i1;
i <
i2; ++
i)
188 st1 <<
" [" <<
i <<
"] " << waferFull_[
i];
191 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Partial Modules:";
192 i1max =
static_cast<unsigned int>(waferPart_.size());
193 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
194 std::ostringstream st1;
196 for (
unsigned int i =
i1;
i <
i2; ++
i)
197 st1 <<
" [" <<
i <<
"] " << waferPart_[
i];
201 passiveFull_ = vsArgs[
"PassiveNamesFull"];
202 passivePart_ = vsArgs[
"PassiveNamesPartial"];
204 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << passiveFull_.size() <<
" full and " 205 << passivePart_.size() <<
" partial passive modules";
206 i1max =
static_cast<unsigned int>(passiveFull_.size());
207 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
208 std::ostringstream st1;
210 for (
unsigned int i =
i1;
i <
i2; ++
i)
211 st1 <<
" [" <<
i <<
"] " << passiveFull_[
i];
214 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
215 i1max =
static_cast<unsigned int>(passivePart_.size());
216 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
217 std::ostringstream st1;
219 for (
unsigned int i =
i1;
i <
i2; ++
i)
220 st1 <<
" [" <<
i <<
"] " << passivePart_[
i];
224 materials_ = vsArgs[
"MaterialNames"];
225 names_ = vsArgs[
"VolumeNames"];
226 thick_ = vArgs[
"Thickness"];
227 copyNumber_.resize(materials_.size(), 1);
229 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << materials_.size() <<
" types of volumes";
230 for (
unsigned int i = 0;
i < names_.size(); ++
i)
231 edm::LogVerbatim(
"HGCalGeom") <<
"Volume [" <<
i <<
"] " << names_[
i] <<
" of thickness " << thick_[
i]
232 <<
" filled with " << materials_[
i] <<
" first copy number " << copyNumber_[
i];
235 layerThick_ = vArgs[
"LayerThick"];
237 edm::LogVerbatim(
"HGCalGeom") <<
"There are " << layers_.size() <<
" blocks";
238 for (
unsigned int i = 0;
i < layers_.size(); ++
i)
239 edm::LogVerbatim(
"HGCalGeom") <<
"Block [" <<
i <<
"] of thickness " << layerThick_[
i] <<
" with " << layers_[
i]
243 layerSense_ =
dbl_to_int(vArgs[
"LayerSense"]);
244 layerOrient_ =
dbl_to_int(vArgs[
"LayerTypes"]);
245 for (
unsigned int k = 0;
k < layerOrient_.size(); ++
k)
248 for (
unsigned int i = 0;
i < layerOrient_.size(); ++
i)
251 if (firstLayer_ > 0) {
252 for (
unsigned int i = 0;
i < layerType_.size(); ++
i) {
253 if (layerSense_[
i] != 0) {
254 int ii = layerType_[
i];
255 copyNumber_[
ii] = firstLayer_;
257 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 258 << materials_[
ii] <<
" changed to " << copyNumber_[
ii];
266 edm::LogVerbatim(
"HGCalGeom") <<
"There are " << layerType_.size() <<
" layers";
267 for (
unsigned int i = 0;
i < layerType_.size(); ++
i)
268 edm::LogVerbatim(
"HGCalGeom") <<
"Layer [" <<
i <<
"] with material type " << layerType_[
i] <<
" sensitive class " 271 materialTop_ = vsArgs[
"TopMaterialNames"];
272 namesTop_ = vsArgs[
"TopVolumeNames"];
273 layerThickTop_ = vArgs[
"TopLayerThickness"];
274 layerTypeTop_ =
dbl_to_int(vArgs[
"TopLayerType"]);
275 copyNumberTop_.resize(materialTop_.size(), firstLayer_);
276 coverTypeTop_ =
static_cast<int>(nArgs[
"TopCoverLayerType"]);
277 copyNumberCoverTop_ = firstLayer_;
279 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << materialTop_.size()
280 <<
" types of volumes in the top part; cover Type " << coverTypeTop_
281 <<
" with initial copy number " << copyNumberCoverTop_;
282 for (
unsigned int i = 0;
i < materialTop_.size(); ++
i)
283 edm::LogVerbatim(
"HGCalGeom") <<
"Volume [" <<
i <<
"] " << namesTop_[
i] <<
" of thickness " << layerThickTop_[
i]
284 <<
" filled with " << materialTop_[
i] <<
" first copy number " << copyNumberTop_[
i];
285 edm::LogVerbatim(
"HGCalGeom") <<
"There are " << layerTypeTop_.size() <<
" layers in the top part";
286 for (
unsigned int i = 0;
i < layerTypeTop_.size(); ++
i)
287 edm::LogVerbatim(
"HGCalGeom") <<
"Layer [" <<
i <<
"] with material type " << layerTypeTop_[
i];
289 waferIndex_ =
dbl_to_int(vArgs[
"WaferIndex"]);
290 waferProperty_ =
dbl_to_int(vArgs[
"WaferProperties"]);
291 waferLayerStart_ =
dbl_to_int(vArgs[
"WaferLayerStart"]);
292 cassetteShift_ = vArgs[
"CassetteShift"];
294 edm::LogVerbatim(
"HGCalGeom") <<
"waferProperties with " << waferIndex_.size() <<
" entries in " 295 << waferLayerStart_.size() <<
" layers";
296 for (
unsigned int k = 0;
k < waferLayerStart_.size(); ++
k)
298 for (
unsigned int k = 0;
k < waferIndex_.size(); ++
k)
306 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << cassetteShift_.size()
307 <<
" elements for cassette shifts";
308 unsigned int j1max = cassetteShift_.size();
309 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
310 std::ostringstream st1;
311 unsigned int j2 =
std::min((j1 + 6), j1max);
312 for (
unsigned int j = j1;
j < j2; ++
j)
313 st1 <<
" [" <<
j <<
"] " << std::setw(9) << cassetteShift_[
j];
317 tileRMin_ = vArgs[
"TileRMin"];
318 tileRMax_ = vArgs[
"TileRMax"];
319 tileIndex_ =
dbl_to_int(vArgs[
"TileLayerRings"]);
320 tilePhis_ =
dbl_to_int(vArgs[
"TilePhiRange"]);
321 tileLayerStart_ =
dbl_to_int(vArgs[
"TileLayerStart"]);
323 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette:: with " << tileRMin_.size() <<
" rings";
324 for (
unsigned int k = 0;
k < tileRMin_.size(); ++
k)
325 edm::LogVerbatim(
"HGCalGeom") <<
"Ring[" <<
k <<
"] " << tileRMin_[
k] <<
" : " << tileRMax_[
k];
326 edm::LogVerbatim(
"HGCalGeom") <<
"TileProperties with " << tileIndex_.size() <<
" entries in " 327 << tileLayerStart_.size() <<
" layers";
328 for (
unsigned int k = 0;
k < tileLayerStart_.size(); ++
k)
330 for (
unsigned int k = 0;
k < tileIndex_.size(); ++
k)
340 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: NameSpace " << nameSpace_ <<
":";
342 cassette_.setParameter(cassettes_, cassetteShift_);
351 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalMixRotatedCassette...";
356 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << copies_.size() <<
" different wafer copy numbers";
358 for (std::unordered_set<int>::const_iterator itr = copies_.begin(); itr != copies_.end(); ++itr, ++
k) {
362 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalMixRotatedCassette construction...";
367 double zi(zMinBlock_);
369 for (
unsigned int i = 0;
i < layers_.size();
i++) {
370 double zo = zi + layerThick_[
i];
372 int laymax = laymin + layers_[
i];
375 for (
int ly = laymin; ly < laymax; ++ly) {
376 int ii = layerType_[ly];
377 int copy = copyNumber_[
ii];
378 double hthick = 0.5 * thick_[
ii];
381 thickTot += thick_[
ii];
385 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " << ly <<
":" <<
ii <<
" Front " << zi <<
", " 386 << routF <<
" Back " << zo <<
", " << rinB <<
" superlayer thickness " 392 if (layerSense_[ly] == 0) {
393 std::vector<double> pgonZ, pgonRin, pgonRout;
408 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
410 if (layerSense_[ly] == 0 || absorbMode_ == 0)
411 pgonRout[isec] = rmax;
413 pgonRout[isec] = pgonRout[isec] * cosAlpha_ - tol1_;
419 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << solid.
name() <<
" polyhedra of " << sectors_
421 <<
convertRadToDeg(-alpha_ + 2._pi) <<
" with " << pgonZ.size() <<
" sections";
422 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
423 edm::LogVerbatim(
"HGCalGeom") <<
"[" <<
k <<
"] z " << pgonZ[
k] <<
" R " << pgonRin[
k] <<
":" << pgonRout[
k];
426 int mode = (layerSense_[ly] > 0) ? sensitiveMode_ : absorbMode_;
432 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << solid.
name() <<
" Tubs made of " << matName
433 <<
" of dimensions " << rinB <<
":" << rins <<
", " << routF <<
":" << routs
434 <<
", " << hthick <<
", 0.0, 360.0 and positioned in: " << glog.
name()
435 <<
" number " <<
copy;
437 positionMix(glog,
name,
copy, thick_[
ii], matter, -layerSense_[ly], cpv);
445 <<
" positioned in " <<
module.name() <<
" at " << r1 <<
" with no rotation";
452 if (
std::abs(thickTot - layerThick_[
i]) >= tol2_) {
453 if (thickTot > layerThick_[
i]) {
454 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << layerThick_[
i] <<
" is smaller than " << thickTot
455 <<
": thickness of all its components **** ERROR ****";
457 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " << layerThick_[
i] <<
" does not match with " 458 << thickTot <<
" of the components";
474 for (
unsigned int ly = 0; ly < layerTypeTop_.size(); ++ly) {
475 int ii = layerTypeTop_[ly];
476 copyNumberTop_[
ii] = copyM;
478 double hthick = 0.5 * thick;
479 double dphi = (2._pi) / phiBinsScint_;
480 double thickTot(0), zpos(-hthick);
482 for (
unsigned int ly = 0; ly < layerTypeTop_.size(); ++ly) {
483 int ii = layerTypeTop_[ly];
484 int copy = copyNumberTop_[
ii];
485 int layer =
copy - firstLayer_;
486 double hthickl = 0.5 * layerThickTop_[
ii];
487 thickTot += layerThickTop_[
ii];
492 int firstTile = tileLayerStart_[layer];
493 int lastTile = ((layer + 1 <
static_cast<int>(tileLayerStart_.size())) ? tileLayerStart_[layer + 1]
494 :
static_cast<int>(tileIndex_.size()));
496 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " << ly <<
":" <<
ii <<
" Copy " <<
copy 497 <<
" Tiles " << firstTile <<
":" << lastTile;
499 for (
int ti = firstTile; ti < lastTile; ++ti) {
505 double phi1 = dphi * (fimin - 1);
506 double phi2 = dphi * (fimax - fimin + 1);
507 auto cshift = cassette_.getShift(layer + 1, 1, cassette);
510 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " <<
copy <<
":" << (layer + 1) <<
" iR " 513 <<
r2 <<
" Thick " << (2.0 * hthickl) <<
" phi " << fimin <<
":" << fimax <<
":" 515 << cassette <<
":" << cassette0 <<
" Shift " << cshift.first <<
":" 523 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << glog1.
name() <<
" Tubs made of " << matName
524 <<
" of dimensions " << r1 <<
", " <<
r2 <<
", " << hthickl <<
", " 531 <<
" in " << glog.
name() <<
" at " << tran <<
" with no rotation";
534 ++copyNumberTop_[
ii];
537 if (
std::abs(thickTot - thick) >= tol2_) {
538 if (thickTot > thick) {
539 edm::LogError(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Thickness of the partition " << thick
540 <<
" is smaller than " << thickTot
541 <<
": thickness of all its components in the top part **** ERROR ****";
543 edm::LogWarning(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Thickness of the partition " << thick
544 <<
" does not match with " << thickTot <<
" of the components in top part";
548 int ii = coverTypeTop_;
549 int copy = copyNumberCoverTop_;
550 int layer =
copy - firstLayer_;
551 double hthickl = 0.5 * layerThickTop_[
ii];
556 int firstTile = tileLayerStart_[layer];
557 int lastTile = ((layer + 1 <
static_cast<int>(tileLayerStart_.size())) ? tileLayerStart_[layer + 1]
558 :
static_cast<int>(tileIndex_.size()));
560 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " << layer <<
":" <<
ii <<
" Copy " <<
copy 561 <<
" Tiles " << firstTile <<
":" << lastTile;
563 for (
int ti = firstTile; ti < lastTile; ++ti) {
569 double phi1 = dphi * (fimin - 1);
570 double phi2 = dphi * (fimax - fimin + 1);
571 auto cshift = cassette_.getShift(layer + 1, 1, cassette);
574 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Layer " <<
copy <<
":" << (layer + 1) <<
" iR " 577 <<
r2 <<
" Thick " << (2.0 * hthickl) <<
" phi " << fimin <<
":" << fimax <<
":" 579 <<
":" << cassette0 <<
" Shift " << cshift.first <<
":" << cshift.second;
586 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: " << glog1.
name() <<
" Tubs made of " << matName
587 <<
" of dimensions " << r1 <<
", " <<
r2 <<
", " << hthickl <<
", " 594 <<
" in " << glog.
name() <<
" at " << tran <<
" with no rotation";
597 ++copyNumberCoverTop_;
602 int layer = (copyM - firstLayer_);
603 static const double sqrt3 =
std::sqrt(3.0);
604 int layercenter = layerOrient_[layer];
606 int firstWafer = waferLayerStart_[layer];
607 int lastWafer = ((layer + 1 <
static_cast<int>(waferLayerStart_.size())) ? waferLayerStart_[layer + 1]
608 :
static_cast<int>(waferIndex_.size()));
609 double delx = 0.5 * (waferSize_ + waferSepar_);
610 double dely = 2.0 * delx / sqrt3;
611 double dy = 0.75 * dely;
612 const auto& xyoff = geomTools_.shiftXY(layercenter, (waferSize_ + waferSepar_));
614 int ium(0), ivm(0), kount(0);
615 std::vector<int> ntype(3, 0);
616 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette::Bottom: " << glog.
ddname() <<
" r " << delx <<
" R " 617 << dely <<
" dy " <<
dy <<
" Shift " << xyoff.first <<
":" << xyoff.second
618 <<
" WaferSize " << (waferSize_ + waferSepar_) <<
" index " << firstWafer <<
":" 619 << (lastWafer - 1) <<
" Copy " << copyM <<
":" << layer;
621 for (
int k = firstWafer;
k < lastWafer; ++
k) {
637 <<
"DDHGCalMixRotatedCassette::index:Property:layertype:type:part:orien:cassette:place:offsets:ind " <<
k <<
":" 638 << waferProperty_[
k] <<
":" << layertype <<
":" <<
type <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" 641 auto cshift = cassette_.getShift(layer + 1, -1, cassette);
642 double xpos = xyoff.first - cshift.first + nc * delx;
643 double ypos = xyoff.second + cshift.second +
nr *
dy;
645 double xorig = xyoff.first + nc * delx;
646 double yorig = xyoff.second +
nr *
dy;
647 double angle = std::atan2(yorig, xorig);
648 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette::Wafer: layer " << layer + 1 <<
" cassette " << cassette
649 <<
" Shift " << cshift.first <<
":" << cshift.second <<
" Original " << xorig <<
":" 656 i =
type * facingTypes_ * orientationTypes_ + place - placeOffset_;
658 edm::LogVerbatim(
"HGCalGeom") <<
" FullWafer type:place:ind " <<
type <<
":" << place <<
":" <<
i <<
":" 659 << waferFull_.size();
661 wafer = waferFull_[
i];
665 i = (
part - partoffset) * facingTypes_ * orientationTypes_ +
668 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:type:part:orien:cassette:place:offsets:ind " << layertype <<
":" 669 <<
type <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" << place <<
":" 671 << waferPart_.size();
673 wafer = waferPart_[
i];
679 wafer = passiveFull_[
i];
681 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:abstype:part:orien:cassette:offsets:ind " << layertype <<
":" 682 << absType <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" 683 <<
":" << partialTypes_ <<
":" << orientationTypes_ <<
" passive " <<
i <<
":" 690 i = (
part - partoffset) * facingTypes_ * orientationTypes_ +
691 (absType - 1) * facingTypes_ * orientationTypes_ * partialTypes_ + place - placeOffset_;
693 edm::LogVerbatim(
"HGCalGeom") <<
" layertype:abstype:part:orien:cassette:3Types:offset:ind " << layertype <<
":" 694 << absType <<
":" <<
part <<
":" << orien <<
":" << cassette <<
":" 695 << partialTypes_ <<
":" << facingTypes_ <<
":" << orientationTypes_ <<
":" 696 << partoffset <<
":" <<
i <<
":" << passivePart_.size();
698 wafer = passivePart_[
i];
704 <<
" Wafer " << wafer <<
" number " <<
copy <<
" type :part:orien:ind " <<
type <<
":" 705 <<
part <<
":" << orien <<
":" <<
i <<
" layer:u:v " << (layer + firstLayer_) <<
":" 712 if (copies_.count(
copy) == 0)
713 copies_.insert(
copy);
721 << layertype <<
":" <<
type <<
" positioned in " << glog.
ddname() <<
" at " << tran
722 <<
" with no rotation";
726 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedCassette: Maximum # of u " << ium <<
" # of v " << ivm <<
" and " 727 << kount <<
" wafers (" << ntype[0] <<
":" << ntype[1] <<
":" << ntype[2] <<
") for " Log< level::Info, true > LogVerbatim
static AlgebraicMatrix initialize()
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
std::vector< double > rMinFront_
static constexpr int32_t WaferPartLDOffset
std::vector< double > layerThickTop_
std::vector< int > tileLayerStart_
std::unordered_set< int > copies_
std::vector< int > layerOrient_
std::vector< double > slopeT_
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
static constexpr int32_t WaferTypeOffset[3]
std::vector< int > layerType_
DDMaterial is used to define and access material information.
void positionMix(const DDLogicalPart &glog, const std::string &nameM, int copyM, double thick, const DDMaterial &matter, int absType, DDCompactView &cpv)
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
constexpr NumType convertRadToDeg(NumType radians)
std::vector< int > waferLayerStart_
void execute(DDCompactView &cpv) override
void constructLayers(const DDLogicalPart &, DDCompactView &cpv)
DDName is used to identify DDD entities uniquely.
std::vector< std::string > names_
static std::string & ns()
Log< level::Error, false > LogError
Compact representation of the geometrical detector hierarchy.
int32_t waferOrient(const int32_t property)
std::vector< int > waferProperty_
A DDSolid represents the shape of a part.
static std::string to_string(const XMLCh *ch)
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
int32_t waferCassette(const int32_t property)
std::vector< int > waferIndex_
static constexpr int32_t WaferFull
Cos< T >::type cos(const T &t)
std::vector< std::string > namesTop_
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< double > thick_
Abs< T >::type abs(const T &t)
void constructLayers(const cms::DDNamespace &ns, const std::vector< std::string > &wafers, const std::vector< std::string > &covers, const std::vector< int > &layerType, const std::vector< int > &layerSense, const std::vector< int > &maxModule, const std::vector< std::string > &names, const std::vector< std::string > &materials, std::vector< int > ©Number, const std::vector< double > &layerThick, const double &absorbW, const double &absorbH, const double &waferTot, const double &rMax, const double &rMaxFine, std::unordered_set< int > &copies, int firstLayer, int lastLayer, double zFront, double totalWidth, bool ignoreCenter, dd4hep::Volume &module)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< std::string > waferFull_
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
int32_t waferThick(const int32_t property)
std::vector< int > layers_
std::vector< double > rMaxFront_
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< int > layerSense_
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
std::vector< int > layerTypeTop_
std::vector< double > cassetteShift_
static constexpr int32_t WaferPartHDOffset
std::vector< std::string > passivePart_
std::vector< int > copyNumber_
std::vector< double > zFrontB_
std::vector< std::string > materialTop_
std::vector< std::string > passiveFull_
std::vector< double > tileRMax_
int32_t waferPartial(const int32_t property)
DDHGCalMixRotatedCassette()
HGCalGeomTools geomTools_
std::vector< double > tileRMin_
int32_t waferV(const int32_t index)
std::vector< int > copyNumberTop_
static int32_t packTypeUV(int type, int u, int v)
std::vector< double > zFrontT_
static constexpr int32_t WaferHDTop
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< double > slopeB_
std::vector< int > tileIndex_
Log< level::Warning, false > LogWarning
static int32_t layerType(int type)
std::vector< std::string > materials_
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< std::string > waferPart_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)
static int32_t layerFrontBack(int32_t layerOrient)
std::vector< double > layerThick_
static int cassetteType(int det, int zside, int cassette)
std::vector< int > tilePhis_
T angle(T x1, T y1, T z1, T x2, T y2, T z2)