19 int ringNo =
args.value<
int>(
"RingNo");
20 bool isStereo =
args.value<
int>(
"isStereo") == 1;
21 bool isRing6 = (ringNo == 6);
23 args.value<
double>(
"RPos");
24 double posCorrectionPhi = isStereo ?
args.value<
double>(
"PosCorrectionPhi")
26 string standardRot =
args.value<
string>(
28 string genMat =
args.value<
string>(
"GeneralMaterial");
29 double moduleThick =
args.value<
double>(
"ModuleThick");
30 double detTilt =
args.value<
double>(
"DetTilt");
31 double fullHeight =
args.value<
double>(
"FullHeight");
32 double dlTop =
args.value<
double>(
"DlTop");
33 double dlBottom =
args.value<
double>(
"DlBottom");
34 double dlHybrid =
args.value<
double>(
"DlHybrid");
35 double frameWidth =
args.value<
double>(
"FrameWidth");
36 double frameThick =
args.value<
double>(
"FrameThick");
37 double frameOver =
args.value<
double>(
"FrameOver");
38 string topFrameMat =
args.value<
string>(
"TopFrameMaterial");
39 double topFrameHeight =
args.value<
double>(
"TopFrameHeight");
40 double topFrameThick =
args.value<
double>(
"TopFrameThick");
41 double topFrameTopWidth =
args.value<
double>(
"TopFrameTopWidth");
42 double topFrameBotWidth =
args.value<
double>(
"TopFrameBotWidth");
43 double topFrame2Width = isStereo ?
args.value<
double>(
"TopFrame2Width") : 0e0;
44 double topFrame2LHeight = isStereo ?
args.value<
double>(
"TopFrame2LHeight") : 0e0;
45 double topFrame2RHeight = isStereo ?
args.value<
double>(
"TopFrame2RHeight") : 0e0;
46 double topFrameZ =
args.value<
double>(
"TopFrameZ");
48 double resizeH = 0.96;
49 string sideFrameMat =
args.value<
string>(
"SideFrameMaterial");
50 double sideFrameThick =
args.value<
double>(
"SideFrameThick");
51 double sideFrameLWidth =
args.value<
double>(
"SideFrameLWidth");
52 double sideFrameLWidthLow = isStereo ?
args.value<
double>(
"SideFrameLWidthLow")
54 double sideFrameLHeight = resizeH *
args.value<
double>(
"SideFrameLHeight");
55 double sideFrameLtheta =
args.value<
double>(
"SideFrameLtheta");
56 double sideFrameRWidth =
args.value<
double>(
"SideFrameRWidth");
57 double sideFrameRWidthLow = isStereo ?
args.value<
double>(
"SideFrameRWidthLow")
59 double sideFrameRHeight = resizeH *
args.value<
double>(
"SideFrameRHeight");
60 double sideFrameRtheta =
args.value<
double>(
"SideFrameRtheta");
61 vector<double> siFrSuppBoxWidth =
args.value<vector<double> >(
"SiFrSuppBoxWidth");
62 vector<double> siFrSuppBoxHeight =
args.value<vector<double> >(
"SiFrSuppBoxHeight");
63 vector<double> siFrSuppBoxYPos =
args.value<vector<double> >(
65 double sideFrameZ =
args.value<
double>(
"SideFrameZ");
66 double siFrSuppBoxThick =
args.value<
double>(
"SiFrSuppBoxThick");
67 string siFrSuppBoxMat =
args.value<
string>(
"SiFrSuppBoxMaterial");
68 string waferMat =
args.value<
string>(
"WaferMaterial");
69 double waferPosition =
args.value<
double>(
71 double sideWidthTop =
args.value<
double>(
"SideWidthTop");
72 double sideWidthBottom =
args.value<
double>(
"SideWidthBottom");
73 string waferRot =
args.value<
string>(
"WaferRotation");
74 string activeMat =
args.value<
string>(
"ActiveMaterial");
75 double activeHeight =
args.value<
double>(
"ActiveHeight");
77 string activeRot =
args.value<
string>(
"ActiveRotation");
78 double activeZ =
args.value<
double>(
"ActiveZ");
79 double backplaneThick =
args.value<
double>(
"BackPlaneThick");
80 double inactiveDy = ringNo > 3 ?
args.value<
double>(
"InactiveDy") : 0e0;
81 double inactivePos = ringNo > 3 ?
args.value<
double>(
"InactivePos") : 0e0;
82 string inactiveMat = ringNo > 3 ?
args.value<
string>(
"InactiveMaterial") :
string();
83 string hybridMat =
args.value<
string>(
"HybridMaterial");
84 double hybridHeight =
args.value<
double>(
"HybridHeight");
85 double hybridWidth =
args.value<
double>(
"HybridWidth");
86 double hybridThick =
args.value<
double>(
"HybridThick");
87 double hybridZ =
args.value<
double>(
"HybridZ");
88 string pitchMat =
args.value<
string>(
"PitchMaterial");
89 double pitchWidth =
args.value<
double>(
"PitchWidth");
90 double pitchHeight =
args.value<
double>(
"PitchHeight");
91 double pitchThick =
args.value<
double>(
"PitchThick");
92 double pitchZ =
args.value<
double>(
"PitchZ");
93 string pitchRot =
args.value<
string>(
"PitchRotation");
94 string bridgeMat =
args.value<
string>(
"BridgeMaterial");
95 double bridgeWidth =
args.value<
double>(
"BridgeWidth");
96 double bridgeThick =
args.value<
double>(
"BridgeThick");
97 double bridgeHeight =
args.value<
double>(
"BridgeHeight");
98 double bridgeSep =
args.value<
double>(
"BridgeSeparation");
99 vector<double> siReenforceHeight =
args.value<vector<double> >(
"SiReenforcementHeight");
100 vector<double> siReenforceWidth =
args.value<vector<double> >(
"SiReenforcementWidth");
101 vector<double> siReenforceYPos =
args.value<vector<double> >(
"SiReenforcementPosY");
102 double siReenforceThick =
args.value<
double>(
"SiReenforcementThick");
103 string siReenforceMat =
args.value<
string>(
"SiReenforcementMaterial");
106 <<
" Height " << fullHeight <<
" dl(Top) " << dlTop <<
" dl(Bottom) " << dlBottom
107 <<
" dl(Hybrid) " << dlHybrid <<
" rPos " << rPos <<
" standrad rotation " << standardRot;
108 edm::LogVerbatim(
"TECGeom") <<
"debug: Frame Width " << frameWidth <<
" Thickness " << frameThick <<
" Overlap " 110 edm::LogVerbatim(
"TECGeom") <<
"debug: Top Frame Material " << topFrameMat <<
" Height " << topFrameHeight
111 <<
" Top Width " << topFrameTopWidth <<
" Bottom Width " << topFrameTopWidth
112 <<
" Thickness " << topFrameThick <<
" positioned at" << topFrameZ;
113 edm::LogVerbatim(
"TECGeom") <<
"debug : Side Frame Material " << sideFrameMat <<
" Thickness " << sideFrameThick
114 <<
" left Leg's Width: " << sideFrameLWidth <<
" left Leg's Height: " << sideFrameLHeight
115 <<
" left Leg's tilt(theta): " << sideFrameLtheta
116 <<
" right Leg's Width: " << sideFrameRWidth
117 <<
" right Leg's Height: " << sideFrameRHeight
118 <<
" right Leg's tilt(theta): " << sideFrameRtheta
119 <<
"Supplies Box's Material: " << siFrSuppBoxMat <<
" positioned at" << sideFrameZ;
120 for (
int i = 0;
i < (
int)(siFrSuppBoxWidth.size());
i++)
121 edm::LogVerbatim(
"TECGeom") <<
" Supplies Box" <<
i <<
"'s Width: " << siFrSuppBoxWidth[
i] <<
" Supplies Box" <<
i 122 <<
"'s Height: " << siFrSuppBoxHeight[
i] <<
" Supplies Box" <<
i 123 <<
"'s y Position: " << siFrSuppBoxYPos[
i];
124 edm::LogVerbatim(
"TECGeom") <<
"debug: Wafer Material " << waferMat <<
" Side Width Top" << sideWidthTop
125 <<
" Side Width Bottom" << sideWidthBottom <<
" and positioned at " << waferPosition
126 <<
" positioned with rotation" 127 <<
" matrix:" << waferRot;
128 edm::LogVerbatim(
"TECGeom") <<
"debug: Active Material " << activeMat <<
" Height " << activeHeight <<
" rotated by " 129 << activeRot <<
" translated by (0,0," << -0.5 * backplaneThick <<
")" 130 <<
" Thickness/Z" <<
waferThick - backplaneThick <<
"/" << activeZ;
131 edm::LogVerbatim(
"TECGeom") <<
"debug: Hybrid Material " << hybridMat <<
" Height " << hybridHeight <<
" Width " 132 << hybridWidth <<
" Thickness " << hybridThick <<
" Z" << hybridZ;
133 edm::LogVerbatim(
"TECGeom") <<
"debug: Pitch Adapter Material " << pitchMat <<
" Height " << pitchHeight
134 <<
" Thickness " << pitchThick <<
" position with " 135 <<
" rotation " << pitchRot <<
" at Z" << pitchZ;
136 edm::LogVerbatim(
"TECGeom") <<
"debug: Bridge Material " << bridgeMat <<
" Width " << bridgeWidth <<
" Thickness " 137 << bridgeThick <<
" Height " << bridgeHeight <<
" Separation " << bridgeSep;
138 edm::LogVerbatim(
"TECGeom") <<
"FALTBOOT DDTECModuleAlgo debug : Si-Reenforcement Material " << sideFrameMat
139 <<
" Thickness " << siReenforceThick;
140 for (
int i = 0;
i < (
int)(siReenforceWidth.size());
i++)
141 edm::LogVerbatim(
"TECGeom") <<
" SiReenforcement" <<
i <<
"'s Width: " << siReenforceWidth[
i] <<
" SiReenforcement" 142 <<
i <<
"'s Height: " << siReenforceHeight[
i] <<
" SiReenforcement" <<
i 143 <<
"'s y Position: " << siReenforceYPos[
i];
146 edm::LogVerbatim(
"TECGeom") <<
"This is a normal module, in ring " << ringNo <<
"!";
148 edm::LogVerbatim(
"TECGeom") <<
"This is a stereo module, in ring " << ringNo <<
"!";
149 edm::LogVerbatim(
"TECGeom") <<
"Phi Position corrected by " << posCorrectionPhi <<
"*rad";
150 edm::LogVerbatim(
"TECGeom") <<
"debug: stereo Top Frame 2nd Part left Heigt " << topFrame2LHeight
151 <<
" right Height " << topFrame2RHeight <<
" Width " << topFrame2Width;
152 edm::LogVerbatim(
"TECGeom") <<
" left Leg's lower Width: " << sideFrameLWidthLow
153 <<
" right Leg's lower Width: " << sideFrameRWidthLow;
167 const double topFrameEndZ = 0.5 * (-waferPosition + fullHeight) + pitchHeight + hybridHeight - topFrameHeight;
168 string idName = ns.noNamespace(mother.name());
169 edm::LogVerbatim(
"TECGeom") <<
"idName: " <<
idName <<
" parent " << mother.name() <<
" namespace " << ns.name();
173 Material matter = ns.material(genMat);
174 double dzdif = fullHeight + topFrameHeight;
176 dzdif += 0.5 * (topFrame2LHeight + topFrame2RHeight);
178 double dxbot = 0.5 * dlBottom + frameWidth - frameOver;
179 double dxtop = 0.5 * dlHybrid + frameWidth - frameOver;
183 dxtop = 0.5 * dlTop + frameWidth - frameOver;
186 double dxdif = dxtop - dxbot;
191 double h1 = 0.5 * sideFrameThick;
192 double dz = 0.5 * sideFrameLHeight;
193 double bl1 = 0.5 * sideFrameLWidth;
195 double thet = sideFrameLtheta;
198 bl1 = 0.5 * sideFrameLWidthLow;
199 solid = Trap(
dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
200 ns.addSolidNS(ns.prepend(
name), solid);
201 edm::LogVerbatim(
"TECGeom") <<
"Solid: " <<
name <<
" " << solid.name() <<
" Trap made of " << sideFrameMat
202 <<
" of dimensions " <<
dz <<
", " << thet <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
203 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
204 Volume sideFrameLeft(ns.prepend(
name), solid, ns.material(sideFrameMat));
205 ns.addVolumeNS(sideFrameLeft);
207 double xpos = -0.5 * topFrameBotWidth + bl2 +
tan(fabs(thet)) *
dz;
208 double ypos = sideFrameZ;
209 double zpos = topFrameEndZ -
dz;
213 xpos -= 2 *
tan(fabs(thet)) *
dz;
217 xpos = -0.5 * topFrameBotWidth + bl2 *
cos(detTilt) +
dz *
sin(fabs(thet) + detTilt) /
cos(fabs(thet));
219 zpos = topFrameEndZ - topFrame2LHeight - 0.5 *
sin(detTilt) * (topFrameBotWidth - topFrame2Width) -
220 dz *
cos(detTilt + fabs(thet)) /
cos(fabs(thet)) + bl2 *
sin(detTilt) - 0.1 * dd4hep::mm;
226 dd4hep::Transform3D(ns.rotation(waferRot),
227 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
231 h1 = 0.5 * sideFrameThick;
232 dz = 0.5 * sideFrameRHeight;
233 bl1 = bl2 = 0.5 * sideFrameRWidth;
234 thet = sideFrameRtheta;
236 bl1 = 0.5 * sideFrameRWidthLow;
237 solid = Trap(
dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
238 ns.addSolidNS(ns.prepend(
name), solid);
239 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << sideFrameMat
240 <<
" of dimensions " <<
dz <<
", " << thet <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
241 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
242 Volume sideFrameRight(ns.prepend(
name), solid, ns.material(sideFrameMat));
243 ns.addVolumeNS(sideFrameRight);
245 xpos = 0.5 * topFrameBotWidth - bl2 -
tan(fabs(thet)) *
dz;
247 zpos = topFrameEndZ -
dz;
250 xpos += 2 *
tan(fabs(thet)) *
dz;
253 xpos = 0.5 * topFrameBotWidth - bl2 *
cos(detTilt) -
dz *
sin(fabs(detTilt - fabs(thet))) /
cos(fabs(thet));
255 zpos = topFrameEndZ - topFrame2RHeight + 0.5 *
sin(detTilt) * (topFrameBotWidth - topFrame2Width) -
256 dz *
cos(detTilt - fabs(thet)) /
cos(fabs(thet)) - bl2 *
sin(detTilt) - 0.1 * dd4hep::mm;
262 dd4hep::Transform3D(ns.rotation(waferRot),
263 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
265 matter = ns.material(siFrSuppBoxMat);
266 for (
int i = 0;
i < (
int)(siFrSuppBoxWidth.size());
i++) {
269 h1 = 0.5 * siFrSuppBoxThick;
270 dz = 0.5 * siFrSuppBoxHeight[
i];
271 bl1 = bl2 = 0.5 * siFrSuppBoxWidth[
i];
272 thet = sideFrameRtheta;
274 thet = -atan(fabs(sideFrameRWidthLow - sideFrameRWidth) / (2 * sideFrameRHeight) -
tan(fabs(thet)));
277 solid = Trap(
dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
278 ns.addSolidNS(ns.prepend(
name), solid);
279 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << siFrSuppBoxMat
280 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 281 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
282 Volume siFrSuppBox(ns.prepend(
name), solid, matter);
283 ns.addVolumeNS(siFrSuppBox);
285 xpos = 0.5 * topFrameBotWidth - sideFrameRWidth - bl1 - siFrSuppBoxYPos[
i] *
tan(fabs(thet));
287 (0.5 + (siFrSuppBoxThick / sideFrameThick));
288 zpos = topFrameEndZ - siFrSuppBoxYPos[
i];
290 xpos += 2 * fabs(
tan(thet)) * siFrSuppBoxYPos[
i];
294 xpos = 0.5 * topFrameBotWidth - (sideFrameRWidth + bl1) *
cos(detTilt) -
295 sin(fabs(detTilt - fabs(thet))) *
296 (siFrSuppBoxYPos[
i] +
dz * (1 /
cos(thet) -
cos(detTilt)) + bl1 *
sin(detTilt));
298 zpos = topFrameEndZ - topFrame2RHeight - 0.5 *
sin(detTilt) * (topFrameBotWidth - topFrame2Width) -
299 siFrSuppBoxYPos[
i] -
sin(detTilt) * sideFrameRWidth;
302 mother.placeVolume(siFrSuppBox,
305 ns.rotation(waferRot),
306 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
311 double dx = 0.5 * hybridWidth;
312 double dy = 0.5 * hybridThick;
313 dz = 0.5 * hybridHeight;
315 ns.addSolidNS(ns.prepend(
name), solid);
316 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Box made of " << hybridMat
317 <<
" of dimensions " <<
dx <<
", " <<
dy <<
", " <<
dz;
322 zpos = 0.5 * (-waferPosition + fullHeight + hybridHeight) + pitchHeight;
329 dd4hep::Transform3D(ns.rotation(standardRot),
334 bl1 = 0.5 * dlBottom;
337 dz = 0.5 * fullHeight;
338 solid = Trap(
dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
339 ns.addSolidNS(ns.prepend(
name), solid);
340 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << waferMat
341 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 342 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
343 Volume wafer(
name, solid, ns.material(waferMat));
346 zpos = -0.5 * waferPosition;
353 dd4hep::Transform3D(ns.rotation(waferRot),
358 bl1 -= sideWidthBottom;
361 h1 = 0.5 * activeHeight;
367 solid = Trap(
dz, 0, 0, h1, bl2, bl1, 0, h1, bl2, bl1, 0);
368 ns.addSolidNS(ns.prepend(
name), solid);
369 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << activeMat
370 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0, " 371 << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0";
372 Volume active(ns.prepend(
name), solid, ns.material(activeMat));
373 ns.addVolumeNS(active);
376 active, 1, dd4hep::Transform3D(ns.rotation(activeRot),
dd4hep::Position(0., -0.5 * backplaneThick, 0.)));
380 inactivePos -= fullHeight - activeHeight;
382 bl1 = 0.5 * dlBottom - sideWidthBottom +
383 ((0.5 * dlTop - sideWidthTop - 0.5 * dlBottom + sideWidthBottom) / activeHeight) *
384 (activeHeight - inactivePos - inactiveDy);
385 bl2 = 0.5 * dlBottom - sideWidthBottom +
386 ((0.5 * dlTop - sideWidthTop - 0.5 * dlBottom + sideWidthBottom) / activeHeight) *
387 (activeHeight - inactivePos + inactiveDy);
395 solid = Trap(
dz, 0, 0, h1, bl2, bl1, 0, h1, bl2, bl1, 0);
396 ns.addSolidNS(ns.prepend(
name), solid);
397 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << inactiveMat
398 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0, " 399 << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0";
400 Volume inactive(ns.prepend(
name), solid, ns.material(inactiveMat));
401 ns.addVolumeNS(inactive);
402 ypos = inactivePos - 0.5 * activeHeight;
410 dx = 0.5 * pitchWidth;
411 dy = 0.5 * pitchThick;
412 dz = 0.5 * pitchHeight;
414 ns.addSolidNS(
name, solid);
415 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Box made of " << pitchMat
416 <<
" of dimensions " <<
dx <<
", " <<
dy <<
", " <<
dz;
418 dz = 0.5 * pitchWidth;
419 h1 = 0.5 * pitchThick;
420 bl1 = 0.5 * pitchHeight + 0.5 *
dz *
sin(detTilt);
421 bl2 = 0.5 * pitchHeight - 0.5 *
dz *
sin(detTilt);
422 thet = atan((bl1 - bl2) / (2. *
dz));
423 solid = Trap(
dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
424 ns.addSolidNS(
name, solid);
425 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << pitchMat
426 <<
" of dimensions " <<
dz <<
", " <<
convertRadToDeg(thet) <<
", 0, " << h1 <<
", " 427 << bl1 <<
", " << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
431 zpos = 0.5 * (-waferPosition + fullHeight + pitchHeight);
435 xpos = 0.5 * fullHeight *
sin(detTilt);
437 Volume pa(
name, solid, ns.material(pitchMat));
439 mother.placeVolume(pa,
441 dd4hep::Transform3D(ns.rotation(pitchRot),
444 mother.placeVolume(pa, 1, dd4hep::Transform3D(ns.rotation(standardRot),
dd4hep::Position(zpos + rPos, xpos, ypos)));
448 h1 = 0.5 * topFrameThick;
449 dz = 0.5 * topFrameHeight;
450 bl1 = 0.5 * topFrameBotWidth;
451 bl2 = 0.5 * topFrameTopWidth;
453 bl1 = 0.5 * topFrameTopWidth;
454 bl2 = 0.5 * topFrameBotWidth;
457 solid = Trap(
dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
458 ns.addSolid(ns.prepend(
name), solid);
459 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << topFrameMat
460 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 461 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
462 Volume topFrame(ns.prepend(
name), solid, ns.material(topFrameMat));
463 ns.addVolumeNS(topFrame);
468 dz = 0.5 * topFrame2Width;
469 h1 = 0.5 * topFrameThick;
470 bl1 = 0.5 * topFrame2LHeight;
471 bl2 = 0.5 * topFrame2RHeight;
472 thet = atan((bl1 - bl2) / (2. *
dz));
474 constexpr
double minDimension = 5.e-8;
475 if (bl2 < minDimension) {
479 solid = Trap(
dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
480 ns.addSolid(ns.prepend(
name), solid);
481 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << topFrameMat
482 <<
" of dimensions " <<
dz <<
", " <<
convertRadToDeg(thet) <<
", 0, " << h1 <<
", " 483 << bl1 <<
", " << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
488 zpos = 0.5 * (-waferPosition + fullHeight - topFrameHeight) + pitchHeight + hybridHeight;
496 dd4hep::Transform3D(ns.rotation(standardRot),
500 Volume topFrame2(
name, solid, ns.material(topFrameMat));
501 zpos -= 0.5 * (topFrameHeight + 0.5 * (topFrame2LHeight + topFrame2RHeight));
505 dd4hep::Transform3D(ns.rotation(pitchRot),
dd4hep::Position(zpos + rPos, rPos *
sin(posCorrectionPhi), ypos)));
509 matter = ns.material(siReenforceMat);
510 for (
int i = 0;
i < (
int)(siReenforceWidth.size());
i++) {
512 h1 = 0.5 * siReenforceThick;
513 dz = 0.5 * siReenforceHeight[
i];
514 bl1 = bl2 = 0.5 * siReenforceWidth[
i];
515 solid = Trap(
dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
516 ns.addSolid(ns.prepend(
name), solid);
517 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << matter.name()
518 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 519 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
520 Volume siReenforce(ns.prepend(
name), solid, matter);
521 ns.addVolumeNS(siReenforce);
525 zpos = topFrameEndZ -
dz - siReenforceYPos[
i];
530 xpos = (-siReenforceYPos[
i] + 0.5 * fullHeight) *
sin(detTilt);
534 zpos -= topFrame2RHeight +
sin(fabs(detTilt)) * 0.5 * topFrame2Width;
537 mother.placeVolume(siReenforce,
540 ns.rotation(waferRot),
541 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
545 if (bridgeMat !=
"None") {
547 bl2 = 0.5 * bridgeSep + bridgeWidth;
548 bl1 = bl2 - bridgeHeight * dxdif / dzdif;
549 h1 = 0.5 * bridgeThick;
550 dz = 0.5 * bridgeHeight;
551 solid = Trap(
dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
552 ns.addSolid(ns.prepend(
name), solid);
553 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Trap made of " << bridgeMat
554 <<
" of dimensions " <<
dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 555 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
556 Volume bridge(ns.prepend(
name), solid, ns.material(bridgeMat));
557 ns.addVolumeNS(bridge);
560 bl1 = 0.5 * bridgeSep;
561 solid = Box(bl1, h1,
dz);
562 ns.addSolid(ns.prepend(
name), solid);
563 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" <<
name <<
" " << solid.name() <<
" Box made of " << genMat
564 <<
" of dimensions " << bl1 <<
", " << h1 <<
", " <<
dz;
565 Volume bridgeGap(ns.prepend(
name), solid, ns.material(genMat));
566 ns.addVolumeNS(bridgeGap);
567 bridge.placeVolume(bridgeGap, 1);
568 edm::LogVerbatim(
"TECGeom") <<
"Solid: " << bridgeGap.name() <<
" number 1 positioned in " << bridge.name()
569 <<
" at (0,0,0) with no rotation";
571 edm::LogVerbatim(
"TECGeom") <<
"<<== End of DDTECModuleAlgo construction ...";
Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
std::string to_string(const V &value)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
int32_t waferThick(const int32_t property)