1 #include "DD4hep/DetFactoryHelper.h" 18 int ringNo = args.
value<
int>(
"RingNo");
19 bool isStereo = args.
value<
int>(
"isStereo") == 1;
20 bool isRing6 = (ringNo == 6);
22 args.
value<
double>(
"RPos");
23 double posCorrectionPhi = isStereo ? args.
value<
double>(
"PosCorrectionPhi")
25 string standardRot = args.
value<
string>(
27 string genMat = args.
value<
string>(
"GeneralMaterial");
28 double moduleThick = args.
value<
double>(
"ModuleThick");
29 double detTilt = args.
value<
double>(
"DetTilt");
30 double fullHeight = args.
value<
double>(
"FullHeight");
31 double dlTop = args.
value<
double>(
"DlTop");
32 double dlBottom = args.
value<
double>(
"DlBottom");
33 double dlHybrid = args.
value<
double>(
"DlHybrid");
34 double frameWidth = args.
value<
double>(
"FrameWidth");
35 double frameThick = args.
value<
double>(
"FrameThick");
36 double frameOver = args.
value<
double>(
"FrameOver");
37 string topFrameMat = args.
value<
string>(
"TopFrameMaterial");
38 double topFrameHeight = args.
value<
double>(
"TopFrameHeight");
39 double topFrameThick = args.
value<
double>(
"TopFrameThick");
40 double topFrameTopWidth = args.
value<
double>(
"TopFrameTopWidth");
41 double topFrameBotWidth = args.
value<
double>(
"TopFrameBotWidth");
42 double topFrame2Width = isStereo ? args.
value<
double>(
"TopFrame2Width") : 0e0;
43 double topFrame2LHeight = isStereo ? args.
value<
double>(
"TopFrame2LHeight") : 0e0;
44 double topFrame2RHeight = isStereo ? args.
value<
double>(
"TopFrame2RHeight") : 0e0;
45 double topFrameZ = args.
value<
double>(
"TopFrameZ");
47 double resizeH = 0.96;
48 string sideFrameMat = args.
value<
string>(
"SideFrameMaterial");
49 double sideFrameThick = args.
value<
double>(
"SideFrameThick");
50 double sideFrameLWidth = args.
value<
double>(
"SideFrameLWidth");
51 double sideFrameLWidthLow = isStereo ? args.
value<
double>(
"SideFrameLWidthLow")
53 double sideFrameLHeight = resizeH * args.
value<
double>(
"SideFrameLHeight");
54 double sideFrameLtheta = args.
value<
double>(
"SideFrameLtheta");
55 double sideFrameRWidth = args.
value<
double>(
"SideFrameRWidth");
56 double sideFrameRWidthLow = isStereo ? args.
value<
double>(
"SideFrameRWidthLow")
58 double sideFrameRHeight = resizeH * args.
value<
double>(
"SideFrameRHeight");
59 double sideFrameRtheta = args.
value<
double>(
"SideFrameRtheta");
60 vector<double> siFrSuppBoxWidth = args.
value<vector<double> >(
"SiFrSuppBoxWidth");
61 vector<double> siFrSuppBoxHeight = args.
value<vector<double> >(
"SiFrSuppBoxHeight");
62 vector<double> siFrSuppBoxYPos = args.
value<vector<double> >(
64 double sideFrameZ = args.
value<
double>(
"SideFrameZ");
65 double siFrSuppBoxThick = args.
value<
double>(
"SiFrSuppBoxThick");
66 string siFrSuppBoxMat = args.
value<
string>(
"SiFrSuppBoxMaterial");
67 string waferMat = args.
value<
string>(
"WaferMaterial");
68 double waferPosition = args.
value<
double>(
70 double sideWidthTop = args.
value<
double>(
"SideWidthTop");
71 double sideWidthBottom = args.
value<
double>(
"SideWidthBottom");
72 string waferRot = args.
value<
string>(
"WaferRotation");
73 string activeMat = args.
value<
string>(
"ActiveMaterial");
74 double activeHeight = args.
value<
double>(
"ActiveHeight");
75 double waferThick = args.
value<
double>(
"WaferThick");
76 string activeRot = args.
value<
string>(
"ActiveRotation");
77 double activeZ = args.
value<
double>(
"ActiveZ");
78 double backplaneThick = args.
value<
double>(
"BackPlaneThick");
79 double inactiveDy = ringNo > 3 ? args.
value<
double>(
"InactiveDy") : 0e0;
80 double inactivePos = ringNo > 3 ? args.
value<
double>(
"InactivePos") : 0e0;
81 string inactiveMat = ringNo > 3 ? args.
value<
string>(
"InactiveMaterial") :
string();
82 string hybridMat = args.
value<
string>(
"HybridMaterial");
83 double hybridHeight = args.
value<
double>(
"HybridHeight");
84 double hybridWidth = args.
value<
double>(
"HybridWidth");
85 double hybridThick = args.
value<
double>(
"HybridThick");
86 double hybridZ = args.
value<
double>(
"HybridZ");
87 string pitchMat = args.
value<
string>(
"PitchMaterial");
88 double pitchWidth = args.
value<
double>(
"PitchWidth");
89 double pitchHeight = args.
value<
double>(
"PitchHeight");
90 double pitchThick = args.
value<
double>(
"PitchThick");
91 double pitchZ = args.
value<
double>(
"PitchZ");
92 string pitchRot = args.
value<
string>(
"PitchRotation");
93 string bridgeMat = args.
value<
string>(
"BridgeMaterial");
94 double bridgeWidth = args.
value<
double>(
"BridgeWidth");
95 double bridgeThick = args.
value<
double>(
"BridgeThick");
96 double bridgeHeight = args.
value<
double>(
"BridgeHeight");
97 double bridgeSep = args.
value<
double>(
"BridgeSeparation");
98 vector<double> siReenforceHeight = args.
value<vector<double> >(
"SiReenforcementHeight");
99 vector<double> siReenforceWidth = args.
value<vector<double> >(
"SiReenforcementWidth");
100 vector<double> siReenforceYPos = args.
value<vector<double> >(
"SiReenforcementPosY");
101 double siReenforceThick = args.
value<
double>(
"SiReenforcementThick");
102 string siReenforceMat = args.
value<
string>(
"SiReenforcementMaterial");
105 <<
" Height " << fullHeight <<
" dl(Top) " << dlTop <<
" dl(Bottom) " << dlBottom
106 <<
" dl(Hybrid) " << dlHybrid <<
" rPos " << rPos <<
" standrad rotation " << standardRot;
107 edm::LogVerbatim(
"TECGeom") <<
"debug: Frame Width " << frameWidth <<
" Thickness " << frameThick <<
" Overlap " 109 edm::LogVerbatim(
"TECGeom") <<
"debug: Top Frame Material " << topFrameMat <<
" Height " << topFrameHeight
110 <<
" Top Width " << topFrameTopWidth <<
" Bottom Width " << topFrameTopWidth
111 <<
" Thickness " << topFrameThick <<
" positioned at" << topFrameZ;
112 edm::LogVerbatim(
"TECGeom") <<
"debug : Side Frame Material " << sideFrameMat <<
" Thickness " << sideFrameThick
113 <<
" left Leg's Width: " << sideFrameLWidth <<
" left Leg's Height: " << sideFrameLHeight
114 <<
" left Leg's tilt(theta): " << sideFrameLtheta
115 <<
" right Leg's Width: " << sideFrameRWidth
116 <<
" right Leg's Height: " << sideFrameRHeight
117 <<
" right Leg's tilt(theta): " << sideFrameRtheta
118 <<
"Supplies Box's Material: " << siFrSuppBoxMat <<
" positioned at" << sideFrameZ;
119 for (
int i = 0;
i < (
int)(siFrSuppBoxWidth.size());
i++)
120 edm::LogVerbatim(
"TECGeom") <<
" Supplies Box" <<
i <<
"'s Width: " << siFrSuppBoxWidth[
i] <<
" Supplies Box" <<
i 121 <<
"'s Height: " << siFrSuppBoxHeight[
i] <<
" Supplies Box" <<
i 122 <<
"'s y Position: " << siFrSuppBoxYPos[
i];
123 edm::LogVerbatim(
"TECGeom") <<
"debug: Wafer Material " << waferMat <<
" Side Width Top" << sideWidthTop
124 <<
" Side Width Bottom" << sideWidthBottom <<
" and positioned at " << waferPosition
125 <<
" positioned with rotation" 126 <<
" matrix:" << waferRot;
127 edm::LogVerbatim(
"TECGeom") <<
"debug: Active Material " << activeMat <<
" Height " << activeHeight <<
" rotated by " 128 << activeRot <<
" translated by (0,0," << -0.5 * backplaneThick <<
")" 129 <<
" Thickness/Z" << waferThick - backplaneThick <<
"/" << activeZ;
130 edm::LogVerbatim(
"TECGeom") <<
"debug: Hybrid Material " << hybridMat <<
" Height " << hybridHeight <<
" Width " 131 << hybridWidth <<
" Thickness " << hybridThick <<
" Z" << hybridZ;
132 edm::LogVerbatim(
"TECGeom") <<
"debug: Pitch Adapter Material " << pitchMat <<
" Height " << pitchHeight
133 <<
" Thickness " << pitchThick <<
" position with " 134 <<
" rotation " << pitchRot <<
" at Z" << pitchZ;
135 edm::LogVerbatim(
"TECGeom") <<
"debug: Bridge Material " << bridgeMat <<
" Width " << bridgeWidth <<
" Thickness " 136 << bridgeThick <<
" Height " << bridgeHeight <<
" Separation " << bridgeSep;
137 edm::LogVerbatim(
"TECGeom") <<
"FALTBOOT DDTECModuleAlgo debug : Si-Reenforcement Material " << sideFrameMat
138 <<
" Thickness " << siReenforceThick;
139 for (
int i = 0;
i < (
int)(siReenforceWidth.size());
i++)
140 edm::LogVerbatim(
"TECGeom") <<
" SiReenforcement" <<
i <<
"'s Width: " << siReenforceWidth[
i] <<
" SiReenforcement" 141 <<
i <<
"'s Height: " << siReenforceHeight[
i] <<
" SiReenforcement" <<
i 142 <<
"'s y Position: " << siReenforceYPos[
i];
145 edm::LogVerbatim(
"TECGeom") <<
"This is a normal module, in ring " << ringNo <<
"!";
147 edm::LogVerbatim(
"TECGeom") <<
"This is a stereo module, in ring " << ringNo <<
"!";
148 edm::LogVerbatim(
"TECGeom") <<
"Phi Position corrected by " << posCorrectionPhi <<
"*rad";
149 edm::LogVerbatim(
"TECGeom") <<
"debug: stereo Top Frame 2nd Part left Heigt " << topFrame2LHeight
150 <<
" right Height " << topFrame2RHeight <<
" Width " << topFrame2Width;
151 edm::LogVerbatim(
"TECGeom") <<
" left Leg's lower Width: " << sideFrameLWidthLow
152 <<
" right Leg's lower Width: " << sideFrameRWidthLow;
166 const double topFrameEndZ = 0.5 * (-waferPosition + fullHeight) + pitchHeight + hybridHeight - topFrameHeight;
168 edm::LogVerbatim(
"TECGeom") <<
"idName: " << idName <<
" parent " << mother.name() <<
" namespace " << ns.
name();
173 double dzdif = fullHeight + topFrameHeight;
175 dzdif += 0.5 * (topFrame2LHeight + topFrame2RHeight);
177 double dxbot = 0.5 * dlBottom + frameWidth - frameOver;
178 double dxtop = 0.5 * dlHybrid + frameWidth - frameOver;
182 dxtop = 0.5 * dlTop + frameWidth - frameOver;
185 double dxdif = dxtop - dxbot;
189 name = idName +
"SideFrameLeft";
190 double h1 = 0.5 * sideFrameThick;
191 double dz = 0.5 * sideFrameLHeight;
192 double bl1 = 0.5 * sideFrameLWidth;
194 double thet = sideFrameLtheta;
197 bl1 = 0.5 * sideFrameLWidthLow;
198 solid = Trap(dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
200 edm::LogVerbatim(
"TECGeom") <<
"Solid: " << name <<
" " << solid.name() <<
" Trap made of " << sideFrameMat
201 <<
" of dimensions " << dz <<
", " << thet <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
202 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
206 double xpos = -0.5 * topFrameBotWidth + bl2 +
tan(fabs(thet)) *
dz;
207 double ypos = sideFrameZ;
208 double zpos = topFrameEndZ -
dz;
212 xpos -= 2 *
tan(fabs(thet)) *
dz;
216 xpos = -0.5 * topFrameBotWidth + bl2 *
cos(detTilt) + dz *
sin(fabs(thet) + detTilt) /
cos(fabs(thet));
218 zpos = topFrameEndZ - topFrame2LHeight - 0.5 *
sin(detTilt) * (topFrameBotWidth - topFrame2Width) -
219 dz *
cos(detTilt + fabs(thet)) /
cos(fabs(thet)) + bl2 *
sin(detTilt) - 0.1_mm;
225 dd4hep::Transform3D(ns.
rotation(waferRot),
226 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
229 name = idName +
"SideFrameRight";
230 h1 = 0.5 * sideFrameThick;
231 dz = 0.5 * sideFrameRHeight;
232 bl1 = bl2 = 0.5 * sideFrameRWidth;
233 thet = sideFrameRtheta;
235 bl1 = 0.5 * sideFrameRWidthLow;
236 solid = Trap(dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
238 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << sideFrameMat
239 <<
" of dimensions " << dz <<
", " << thet <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
240 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
244 xpos = 0.5 * topFrameBotWidth - bl2 -
tan(fabs(thet)) *
dz;
246 zpos = topFrameEndZ -
dz;
249 xpos += 2 *
tan(fabs(thet)) *
dz;
252 xpos = 0.5 * topFrameBotWidth - bl2 *
cos(detTilt) - dz *
sin(fabs(detTilt - fabs(thet))) /
cos(fabs(thet));
254 zpos = topFrameEndZ - topFrame2RHeight + 0.5 *
sin(detTilt) * (topFrameBotWidth - topFrame2Width) -
255 dz *
cos(detTilt - fabs(thet)) /
cos(fabs(thet)) - bl2 *
sin(detTilt) - 0.1_mm;
261 dd4hep::Transform3D(ns.
rotation(waferRot),
262 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
264 matter = ns.
material(siFrSuppBoxMat);
265 for (
int i = 0;
i < (
int)(siFrSuppBoxWidth.size());
i++) {
266 name = idName +
"SuppliesBox" + std::to_string(
i);
268 h1 = 0.5 * siFrSuppBoxThick;
269 dz = 0.5 * siFrSuppBoxHeight[
i];
270 bl1 = bl2 = 0.5 * siFrSuppBoxWidth[
i];
271 thet = sideFrameRtheta;
273 thet = -atan(fabs(sideFrameRWidthLow - sideFrameRWidth) / (2 * sideFrameRHeight) -
tan(fabs(thet)));
276 solid = Trap(dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
277 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << siFrSuppBoxMat
278 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 279 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
280 Volume siFrSuppBox(name, solid, matter);
283 xpos = 0.5 * topFrameBotWidth - sideFrameRWidth - bl1 - siFrSuppBoxYPos[
i] *
tan(fabs(thet));
285 (0.5 + (siFrSuppBoxThick / sideFrameThick));
286 zpos = topFrameEndZ - siFrSuppBoxYPos[
i];
288 xpos += 2 * fabs(
tan(thet)) * siFrSuppBoxYPos[
i];
292 xpos = 0.5 * topFrameBotWidth - (sideFrameRWidth + bl1) *
cos(detTilt) -
293 sin(fabs(detTilt - fabs(thet))) *
294 (siFrSuppBoxYPos[
i] + dz * (1 /
cos(thet) -
cos(detTilt)) + bl1 *
sin(detTilt));
296 zpos = topFrameEndZ - topFrame2RHeight - 0.5 *
sin(detTilt) * (topFrameBotWidth - topFrame2Width) -
297 siFrSuppBoxYPos[
i] -
sin(detTilt) * sideFrameRWidth;
300 mother.placeVolume(siFrSuppBox,
304 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
308 name = idName +
"Hybrid";
309 double dx = 0.5 * hybridWidth;
310 double dy = 0.5 * hybridThick;
311 dz = 0.5 * hybridHeight;
312 solid = Box(dx, dy, dz);
314 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Box made of " << hybridMat
315 <<
" of dimensions " << dx <<
", " << dy <<
", " <<
dz;
320 zpos = 0.5 * (-waferPosition + fullHeight + hybridHeight) + pitchHeight;
327 dd4hep::Transform3D(ns.
rotation(standardRot),
328 dd4hep::Position(zpos + rPos, isStereo ? rPos *
sin(posCorrectionPhi) : 0., ypos)));
331 name = idName + tag +
"Wafer";
332 bl1 = 0.5 * dlBottom;
334 h1 = 0.5 * waferThick;
335 dz = 0.5 * fullHeight;
336 solid = Trap(dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
338 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << waferMat
339 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 340 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
344 zpos = -0.5 * waferPosition;
351 dd4hep::Transform3D(ns.
rotation(waferRot),
352 dd4hep::Position(zpos + rPos, isStereo ? rPos *
sin(posCorrectionPhi) : 0., ypos)));
355 name = idName + tag +
"Active";
356 bl1 -= sideWidthBottom;
358 dz = 0.5 * (waferThick - backplaneThick);
359 h1 = 0.5 * activeHeight;
365 solid = Trap(dz, 0, 0, h1, bl2, bl1, 0, h1, bl2, bl1, 0);
367 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << activeMat
368 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0, " 369 << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0";
374 active, 1, dd4hep::Transform3D(ns.
rotation(activeRot), dd4hep::Position(0., -0.5 * backplaneThick, 0.)));
378 inactivePos -= fullHeight - activeHeight;
379 name = idName + tag +
"Inactive";
380 bl1 = 0.5 * dlBottom - sideWidthBottom +
381 ((0.5 * dlTop - sideWidthTop - 0.5 * dlBottom + sideWidthBottom) / activeHeight) *
382 (activeHeight - inactivePos - inactiveDy);
383 bl2 = 0.5 * dlBottom - sideWidthBottom +
384 ((0.5 * dlTop - sideWidthTop - 0.5 * dlBottom + sideWidthBottom) / activeHeight) *
385 (activeHeight - inactivePos + inactiveDy);
386 dz = 0.5 * (waferThick - backplaneThick);
393 solid = Trap(dz, 0, 0, h1, bl2, bl1, 0, h1, bl2, bl1, 0);
395 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << inactiveMat
396 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0, " 397 << h1 <<
", " << bl2 <<
", " << bl1 <<
", 0";
400 ypos = inactivePos - 0.5 * activeHeight;
402 active.placeVolume(inactive, 1, dd4hep::Position(0., ypos, 0.));
405 name = idName +
"PA";
407 dx = 0.5 * pitchWidth;
408 dy = 0.5 * pitchThick;
409 dz = 0.5 * pitchHeight;
410 solid = Box(dx, dy, dz);
412 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Box made of " << pitchMat
413 <<
" of dimensions " << dx <<
", " << dy <<
", " <<
dz;
415 dz = 0.5 * pitchWidth;
416 h1 = 0.5 * pitchThick;
417 bl1 = 0.5 * pitchHeight + 0.5 * dz *
sin(detTilt);
418 bl2 = 0.5 * pitchHeight - 0.5 * dz *
sin(detTilt);
419 thet = atan((bl1 - bl2) / (2. * dz));
420 solid = Trap(dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
422 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << pitchMat
423 <<
" of dimensions " << dz <<
", " <<
convertRadToDeg(thet) <<
", 0, " << h1 <<
", " 424 << bl1 <<
", " << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
428 zpos = 0.5 * (-waferPosition + fullHeight + pitchHeight);
432 xpos = 0.5 * fullHeight *
sin(detTilt);
436 mother.placeVolume(
pa,
438 dd4hep::Transform3D(ns.
rotation(pitchRot),
439 dd4hep::Position(zpos + rPos, xpos + rPos *
sin(posCorrectionPhi), ypos)));
441 mother.placeVolume(
pa, 1, dd4hep::Transform3D(ns.
rotation(standardRot), dd4hep::Position(zpos + rPos, xpos, ypos)));
444 name = idName +
"TopFrame";
445 h1 = 0.5 * topFrameThick;
446 dz = 0.5 * topFrameHeight;
447 bl1 = 0.5 * topFrameBotWidth;
448 bl2 = 0.5 * topFrameTopWidth;
450 bl1 = 0.5 * topFrameTopWidth;
451 bl2 = 0.5 * topFrameBotWidth;
454 solid = Trap(dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
456 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << topFrameMat
457 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 458 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
463 name = idName +
"TopFrame2";
465 dz = 0.5 * topFrame2Width;
466 h1 = 0.5 * topFrameThick;
467 bl1 = 0.5 * topFrame2LHeight;
468 bl2 = 0.5 * topFrame2RHeight;
469 thet = atan((bl1 - bl2) / (2. * dz));
471 solid = Trap(dz, thet, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
473 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << topFrameMat
474 <<
" of dimensions " << dz <<
", " <<
convertRadToDeg(thet) <<
", 0, " << h1 <<
", " 475 << bl1 <<
", " << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
480 zpos = 0.5 * (-waferPosition + fullHeight - topFrameHeight) + pitchHeight + hybridHeight;
488 dd4hep::Transform3D(ns.
rotation(standardRot),
489 dd4hep::Position(zpos + rPos, isStereo ? rPos *
sin(posCorrectionPhi) : 0., ypos)));
493 zpos -= 0.5 * (topFrameHeight + 0.5 * (topFrame2LHeight + topFrame2RHeight));
497 dd4hep::Transform3D(ns.
rotation(pitchRot), dd4hep::Position(zpos + rPos, rPos *
sin(posCorrectionPhi), ypos)));
501 matter = ns.
material(siReenforceMat);
502 for (
int i = 0;
i < (
int)(siReenforceWidth.size());
i++) {
503 name = idName +
"SiReenforce" + std::to_string(
i);
504 h1 = 0.5 * siReenforceThick;
505 dz = 0.5 * siReenforceHeight[
i];
506 bl1 = bl2 = 0.5 * siReenforceWidth[
i];
507 solid = Trap(dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
508 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << matter.name()
509 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 510 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
511 Volume siReenforce(name, solid, matter);
516 zpos = topFrameEndZ - dz - siReenforceYPos[
i];
521 xpos = (-siReenforceYPos[
i] + 0.5 * fullHeight) *
sin(detTilt);
525 zpos -= topFrame2RHeight +
sin(fabs(detTilt)) * 0.5 * topFrame2Width;
528 mother.placeVolume(siReenforce,
532 dd4hep::Position(zpos + rPos, isStereo ? xpos + rPos *
sin(posCorrectionPhi) : xpos, ypos)));
536 if (bridgeMat !=
"None") {
537 name = idName +
"Bridge";
538 bl2 = 0.5 * bridgeSep + bridgeWidth;
539 bl1 = bl2 - bridgeHeight * dxdif / dzdif;
540 h1 = 0.5 * bridgeThick;
541 dz = 0.5 * bridgeHeight;
542 solid = Trap(dz, 0, 0, h1, bl1, bl1, 0, h1, bl2, bl2, 0);
543 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Trap made of " << bridgeMat
544 <<
" of dimensions " << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1 <<
", 0, " 545 << h1 <<
", " << bl2 <<
", " << bl2 <<
", 0";
549 name = idName +
"BridgeGap";
550 bl1 = 0.5 * bridgeSep;
551 solid = Box(bl1, h1, dz);
552 edm::LogVerbatim(
"TECGeom") <<
"Solid:\t" << name <<
" " << solid.name() <<
" Box made of " << genMat
553 <<
" of dimensions " << bl1 <<
", " << h1 <<
", " <<
dz;
556 bridge.placeVolume(bridgeGap, 1);
557 edm::LogVerbatim(
"TECGeom") <<
"Solid: " << bridgeGap.name() <<
" number 1 positioned in " << bridge.name()
558 <<
" at (0,0,0) with no rotation";
560 edm::LogVerbatim(
"TECGeom") <<
"<<== End of DDTECModuleAlgo construction ...";
dd4hep::Solid addSolidNS(const std::string &name, dd4hep::Solid solid) const
dd4hep::Volume volume(const std::string &name, bool exc=true) const
constexpr NumType convertRadToDeg(NumType radians)
dd4hep::Volume addVolumeNS(dd4hep::Volume vol) const
Sin< T >::type sin(const T &t)
T value(const std::string &name) const
std::string_view name() const
std::string realName(const std::string &) const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
dd4hep::Material material(const std::string &name) const
std::string prepend(const std::string &) const
Namespace of DDCMS conversion namespace.
static long algorithm(Detector &, cms::DDParsingContext &ctxt, xml_h e, SensitiveDetector &)
dd4hep::Solid addSolid(const std::string &name, dd4hep::Solid solid) const
const dd4hep::Rotation3D & rotation(const std::string &name) const
#define DECLARE_DDCMS_DETELEMENT(name, func)
std::string parentName() const
Access value of rParent child node.