12#include <TGeoManager.h>
13#include <TGeoPhysicalNode.h>
15#include <TVirtualMC.h>
16#include <fairlogger/Logger.h>
33 createPadPlaneArray();
44 int sector = getSector(det);
45 float phi = 2.0 * TMath::Pi() / (float)
NSECTOR * ((
float)sector + 0.5);
47 glb[0] = loc[0] * TMath::Cos(phi) - loc[1] * TMath::Sin(phi);
48 glb[1] = loc[0] * TMath::Sin(phi) + loc[1] * TMath::Cos(phi);
61 for (
int ilayer = 0; ilayer <
NLAYER; ilayer++) {
62 for (
int istack = 0; istack <
NSTACK; istack++) {
63 createPadPlane(ilayer, istack);
69void Geometry::createPadPlane(
int ilayer,
int istack)
74 int ipp = getDetectorSec(ilayer, istack);
78 padPlane.setStack(istack);
80 padPlane.setRowSpacing(0.0);
81 padPlane.setColSpacing(0.0);
83 padPlane.setLengthRim(1.0);
84 padPlane.setWidthRim(0.5);
86 padPlane.setNcols(144);
88 padPlane.setAnodeWireOffset(0.25);
93 const float kTiltAngle = 2.0;
98 padPlane.setNrows(12);
99 padPlane.setLength(108.0);
100 padPlane.setLengthOPad(8.0);
101 padPlane.setLengthIPad(9.0);
104 padPlane.setNrows(16);
105 padPlane.setLength(122.0);
106 padPlane.setLengthOPad(7.5);
107 padPlane.setLengthIPad(7.5);
109 padPlane.setWidth(92.2);
110 padPlane.setWidthOPad(0.515);
111 padPlane.setWidthIPad(0.635);
112 padPlane.setTiltingAngle(-kTiltAngle);
117 padPlane.setNrows(12);
118 padPlane.setLength(108.0);
119 padPlane.setLengthOPad(8.0);
120 padPlane.setLengthIPad(9.0);
123 padPlane.setNrows(16);
124 padPlane.setLength(122.0);
125 padPlane.setLengthOPad(7.5);
126 padPlane.setLengthIPad(7.5);
128 padPlane.setWidth(96.6);
129 padPlane.setWidthOPad(0.585);
130 padPlane.setWidthIPad(0.665);
131 padPlane.setTiltingAngle(kTiltAngle);
136 padPlane.setNrows(12);
137 padPlane.setLength(108.0);
138 padPlane.setLengthOPad(8.0);
139 padPlane.setLengthIPad(9.0);
142 padPlane.setNrows(16);
143 padPlane.setLength(129.0);
144 padPlane.setLengthOPad(7.5);
145 padPlane.setLengthIPad(8.0);
147 padPlane.setWidth(101.1);
148 padPlane.setWidthOPad(0.705);
149 padPlane.setWidthIPad(0.695);
150 padPlane.setTiltingAngle(-kTiltAngle);
155 padPlane.setNrows(12);
156 padPlane.setLength(108.0);
157 padPlane.setLengthOPad(8.0);
158 padPlane.setLengthIPad(9.0);
161 padPlane.setNrows(16);
162 padPlane.setLength(136.0);
163 padPlane.setLengthOPad(7.5);
164 padPlane.setLengthIPad(8.5);
166 padPlane.setWidth(105.5);
167 padPlane.setWidthOPad(0.775);
168 padPlane.setWidthIPad(0.725);
169 padPlane.setTiltingAngle(kTiltAngle);
174 padPlane.setNrows(12);
175 padPlane.setLength(108.0);
176 padPlane.setLengthOPad(8.0);
179 padPlane.setNrows(16);
180 padPlane.setLength(143.0);
181 padPlane.setLengthOPad(7.5);
183 padPlane.setWidth(109.9);
184 padPlane.setWidthOPad(0.845);
185 padPlane.setLengthIPad(9.0);
186 padPlane.setWidthIPad(0.755);
187 padPlane.setTiltingAngle(-kTiltAngle);
192 padPlane.setNrows(12);
193 padPlane.setLength(108.0);
194 padPlane.setLengthOPad(8.0);
197 padPlane.setNrows(16);
198 padPlane.setLength(145.0);
199 padPlane.setLengthOPad(8.5);
201 padPlane.setWidth(114.4);
202 padPlane.setWidthOPad(0.965);
203 padPlane.setLengthIPad(9.0);
204 padPlane.setWidthIPad(0.785);
205 padPlane.setTiltingAngle(kTiltAngle);
214 float row =
CLENGTH[ilayer][istack] / 2.0 -
RPADW - padPlane.getLengthRim();
215 for (
int ir = 0;
ir < padPlane.getNrows();
ir++) {
216 padPlane.setPadRow(
ir,
row);
217 row -= padPlane.getRowSpacing();
219 row -= padPlane.getLengthOPad();
221 row -= padPlane.getLengthIPad();
227 float col = -
CWIDTH[ilayer] / 2.0 -
CROW + padPlane.getWidthRim();
228 for (
int ic = 0; ic < padPlane.getNcols(); ic++) {
229 padPlane.setPadCol(ic,
col);
230 col += padPlane.getColSpacing();
232 col += padPlane.getWidthOPad();
234 col += padPlane.getWidthIPad();
240 for (
int jstack = 0; jstack < istack; jstack++) {
241 rowTmp -=
CLENGTH[ilayer][jstack];
243 padPlane.setPadRowSMOffset(rowTmp -
CLENGTH[ilayer][istack] / 2.0);
246void Geometry::createVolume(
const char*
name,
const char* shape,
int nmed,
float* upar,
int np)
248 TVirtualMC::GetMC()->Gsvolu(
name, shape, nmed, upar, np);
252 if (
name[1] ==
'J' ||
name[1] ==
'K') {
253 mSensitiveVolumeNames.emplace_back(
name);
265 LOG(fatal) <<
"Geometry is not loaded";
268 createVolumes(idtmed);
271void Geometry::createVolumes(std::vector<int>
const& idtmed)
316 const int kNparTrd = 4;
317 const int kNparCha = 3;
323 float parTrd[kNparTrd];
324 float parCha[kNparCha];
326 const int kTag = 100;
343 createVolume(
"UTR1",
"TRD1", idtmed[2], parTrd, kNparTrd);
344 createVolume(
"UTR2",
"TRD1", idtmed[2], parTrd, kNparTrd);
345 createVolume(
"UTR3",
"TRD1", idtmed[2], parTrd, kNparTrd);
346 createVolume(
"UTR4",
"TRD1", idtmed[2], parTrd, kNparTrd);
352 createVolume(
"UTS1",
"TRD1", idtmed[1], parTrd, kNparTrd);
353 createVolume(
"UTS2",
"TRD1", idtmed[1], parTrd, kNparTrd);
354 createVolume(
"UTS3",
"TRD1", idtmed[1], parTrd, kNparTrd);
355 createVolume(
"UTS4",
"TRD1", idtmed[1], parTrd, kNparTrd);
362 createVolume(
"UTI1",
"TRD1", idtmed[2], parTrd, kNparTrd);
363 createVolume(
"UTI2",
"TRD1", idtmed[2], parTrd, kNparTrd);
364 createVolume(
"UTI3",
"TRD1", idtmed[2], parTrd, kNparTrd);
365 createVolume(
"UTI4",
"TRD1", idtmed[2], parTrd, kNparTrd);
373 createVolume(
"UTF1",
"TRD1", idtmed[2], parTrd, kNparTrd);
374 createVolume(
"UTF2",
"TRD1", idtmed[2], parTrd, kNparTrd);
376 for (
int istack = 0; istack <
NSTACK; istack++) {
377 for (
int ilayer = 0; ilayer <
NLAYER; ilayer++) {
378 int iDet = getDetectorSec(ilayer, istack);
382 snprintf(cTagV, kTag,
"UA%02d", iDet);
383 parCha[0] =
CWIDTH[ilayer] / 2.0;
385 parCha[2] =
CRAH / 2.0 +
CDRH / 2.0;
386 createVolume(cTagV,
"BOX ", idtmed[1], parCha, kNparCha);
391 snprintf(cTagV, kTag,
"UZ%02d", iDet);
395 createVolume(cTagV,
"BOX ", idtmed[1], parCha, kNparCha);
397 snprintf(cTagV, kTag,
"UP%02d", iDet);
398 parCha[0] =
CWSW / 2.0;
400 parCha[2] =
CWSH / 2.0;
401 createVolume(cTagV,
"BOX ", idtmed[7], parCha, kNparCha);
403 snprintf(cTagV, kTag,
"UB%02d", iDet);
407 createVolume(cTagV,
"BOX ", idtmed[7], parCha, kNparCha);
409 snprintf(cTagV, kTag,
"UX%02d", iDet);
412 parCha[2] =
CRAH / 2.0;
413 createVolume(cTagV,
"BOX ", idtmed[11], parCha, kNparCha);
415 snprintf(cTagV, kTag,
"UC%02d", iDet);
419 createVolume(cTagV,
"BOX ", idtmed[2], parCha, kNparCha);
423 snprintf(cTagV, kTag,
"UD%02d", iDet);
426 parCha[2] =
CAMH / 2.0;
427 createVolume(cTagV,
"BOX ", idtmed[7], parCha, kNparCha);
429 snprintf(cTagV, kTag,
"UE%02d", iDet);
433 createVolume(cTagV,
"BOX ", idtmed[2], parCha, kNparCha);
437 snprintf(cTagV, kTag,
"UF%02d", iDet);
440 parCha[2] =
CROH / 2.0;
441 createVolume(cTagV,
"BOX ", idtmed[1], parCha, kNparCha);
443 snprintf(cTagV, kTag,
"UG%02d", iDet);
447 createVolume(cTagV,
"BOX ", idtmed[2], parCha, kNparCha);
457 snprintf(cTagV, kTag,
"URMY%02d", iDet);
458 createVolume(cTagV,
"BOX ", idtmed[27], parCha, kNparCha);
463 snprintf(cTagV, kTag,
"URCB%02d", iDet);
464 createVolume(cTagV,
"BOX ", idtmed[26], parCha, kNparCha);
469 snprintf(cTagV, kTag,
"URGL%02d", iDet);
470 createVolume(cTagV,
"BOX ", idtmed[11], parCha, kNparCha);
475 snprintf(cTagV, kTag,
"URRH%02d", iDet);
476 createVolume(cTagV,
"BOX ", idtmed[15], parCha, kNparCha);
481 snprintf(cTagV, kTag,
"URFB%02d", iDet);
482 createVolume(cTagV,
"BOX ", idtmed[28], parCha, kNparCha);
488 snprintf(cTagV, kTag,
"UJ%02d", iDet);
489 createVolume(cTagV,
"BOX ", idtmed[9], parCha, kNparCha);
495 snprintf(cTagV, kTag,
"UK%02d", iDet);
496 createVolume(cTagV,
"BOX ", idtmed[9], parCha, kNparCha);
501 snprintf(cTagV, kTag,
"UW%02d", iDet);
502 createVolume(cTagV,
"BOX ", idtmed[3], parCha, kNparCha);
508 snprintf(cTagV, kTag,
"UPPD%02d", iDet);
509 createVolume(cTagV,
"BOX ", idtmed[5], parCha, kNparCha);
514 snprintf(cTagV, kTag,
"UPPP%02d", iDet);
515 createVolume(cTagV,
"BOX ", idtmed[13], parCha, kNparCha);
520 snprintf(cTagV, kTag,
"UPGL%02d", iDet);
521 createVolume(cTagV,
"BOX ", idtmed[11], parCha, kNparCha);
526 snprintf(cTagV, kTag,
"UPCB%02d", iDet);
527 createVolume(cTagV,
"BOX ", idtmed[26], parCha, kNparCha);
532 snprintf(cTagV, kTag,
"UPHC%02d", iDet);
533 createVolume(cTagV,
"BOX ", idtmed[10], parCha, kNparCha);
538 snprintf(cTagV, kTag,
"UPPC%02d", iDet);
539 createVolume(cTagV,
"BOX ", idtmed[13], parCha, kNparCha);
544 snprintf(cTagV, kTag,
"UPRB%02d", iDet);
545 createVolume(cTagV,
"BOX ", idtmed[6], parCha, kNparCha);
550 snprintf(cTagV, kTag,
"UPEL%02d", iDet);
551 createVolume(cTagV,
"BOX ", idtmed[4], parCha, kNparCha);
562 snprintf(cTagV, kTag,
"URMY%02d", iDet);
563 snprintf(cTagM, kTag,
"UC%02d", iDet);
564 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
566 snprintf(cTagV, kTag,
"URMY%02d", iDet);
567 snprintf(cTagM, kTag,
"UC%02d", iDet);
568 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
571 snprintf(cTagV, kTag,
"URCB%02d", iDet);
572 snprintf(cTagM, kTag,
"UC%02d", iDet);
573 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
575 snprintf(cTagV, kTag,
"URCB%02d", iDet);
576 snprintf(cTagM, kTag,
"UC%02d", iDet);
577 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
580 snprintf(cTagV, kTag,
"URGL%02d", iDet);
581 snprintf(cTagM, kTag,
"UC%02d", iDet);
582 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
584 snprintf(cTagV, kTag,
"URGL%02d", iDet);
585 snprintf(cTagM, kTag,
"UC%02d", iDet);
586 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
589 snprintf(cTagV, kTag,
"URRH%02d", iDet);
590 snprintf(cTagM, kTag,
"UC%02d", iDet);
591 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
593 snprintf(cTagV, kTag,
"URRH%02d", iDet);
594 snprintf(cTagM, kTag,
"UC%02d", iDet);
595 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
598 snprintf(cTagV, kTag,
"URFB%02d", iDet);
599 snprintf(cTagM, kTag,
"UC%02d", iDet);
600 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
604 snprintf(cTagV, kTag,
"UJ%02d", iDet);
605 snprintf(cTagM, kTag,
"UB%02d", iDet);
606 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
611 snprintf(cTagV, kTag,
"UK%02d", iDet);
612 snprintf(cTagM, kTag,
"UE%02d", iDet);
613 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
616 snprintf(cTagV, kTag,
"UW%02d", iDet);
617 snprintf(cTagM, kTag,
"UK%02d", iDet);
618 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
620 snprintf(cTagV, kTag,
"UW%02d", iDet);
621 snprintf(cTagM, kTag,
"UK%02d", iDet);
622 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
627 snprintf(cTagV, kTag,
"UPPD%02d", iDet);
628 snprintf(cTagM, kTag,
"UG%02d", iDet);
629 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
632 snprintf(cTagV, kTag,
"UPPP%02d", iDet);
633 snprintf(cTagM, kTag,
"UG%02d", iDet);
634 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
637 snprintf(cTagV, kTag,
"UPGL%02d", iDet);
638 snprintf(cTagM, kTag,
"UG%02d", iDet);
639 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
642 snprintf(cTagV, kTag,
"UPCB%02d", iDet);
643 snprintf(cTagM, kTag,
"UG%02d", iDet);
644 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
646 snprintf(cTagV, kTag,
"UPCB%02d", iDet);
647 snprintf(cTagM, kTag,
"UG%02d", iDet);
648 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
651 snprintf(cTagV, kTag,
"UPHC%02d", iDet);
652 snprintf(cTagM, kTag,
"UG%02d", iDet);
653 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
656 snprintf(cTagV, kTag,
"UPPC%02d", iDet);
657 snprintf(cTagM, kTag,
"UG%02d", iDet);
658 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
661 snprintf(cTagV, kTag,
"UPRB%02d", iDet);
662 snprintf(cTagM, kTag,
"UG%02d", iDet);
663 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
666 snprintf(cTagV, kTag,
"UPEL%02d", iDet);
667 snprintf(cTagM, kTag,
"UG%02d", iDet);
668 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
676 snprintf(cTagV, kTag,
"UC%02d", iDet);
677 snprintf(cTagM, kTag,
"UX%02d", iDet);
678 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
681 snprintf(cTagV, kTag,
"UX%02d", iDet);
682 snprintf(cTagM, kTag,
"UB%02d", iDet);
683 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
686 snprintf(cTagV, kTag,
"UB%02d", iDet);
687 snprintf(cTagM, kTag,
"UA%02d", iDet);
688 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
692 snprintf(cTagV, kTag,
"UE%02d", iDet);
693 snprintf(cTagM, kTag,
"UD%02d", iDet);
694 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
698 snprintf(cTagV, kTag,
"UG%02d", iDet);
699 snprintf(cTagM, kTag,
"UF%02d", iDet);
700 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
708 createServices(idtmed);
710 for (
int istack = 0; istack <
NSTACK; istack++) {
711 for (
int ilayer = 0; ilayer <
NLAYER; ilayer++) {
712 assembleChamber(ilayer, istack);
719 TVirtualMC::GetMC()->Gspos(
"UTI1", 1,
"UTS1", xpos, ypos, zpos, 0,
"ONLY");
720 TVirtualMC::GetMC()->Gspos(
"UTI2", 1,
"UTS2", xpos, ypos, zpos, 0,
"ONLY");
721 TVirtualMC::GetMC()->Gspos(
"UTI3", 1,
"UTS3", xpos, ypos, zpos, 0,
"ONLY");
722 TVirtualMC::GetMC()->Gspos(
"UTI4", 1,
"UTS4", xpos, ypos, zpos, 0,
"ONLY");
727 TVirtualMC::GetMC()->Gspos(
"UTS1", 1,
"UTR1", xpos, ypos, zpos, 0,
"ONLY");
728 TVirtualMC::GetMC()->Gspos(
"UTS2", 1,
"UTR2", xpos, ypos, zpos, 0,
"ONLY");
729 TVirtualMC::GetMC()->Gspos(
"UTS3", 1,
"UTR3", xpos, ypos, zpos, 0,
"ONLY");
730 TVirtualMC::GetMC()->Gspos(
"UTS4", 1,
"UTR4", xpos, ypos, zpos, 0,
"ONLY");
737 for (
int isector = 0; isector <
NSECTOR; isector++) {
738 if (getSMstatus(isector)) {
739 snprintf(cTagV, kTag,
"BTRD%d", isector);
743 TVirtualMC::GetMC()->Gspos(
"UTR4", 1, cTagV, xpos, ypos, zpos, 0,
"ONLY");
749 TVirtualMC::GetMC()->Gspos(
"UTR3", 1, cTagV, xpos, ypos, zpos, 0,
"ONLY");
754 TVirtualMC::GetMC()->Gspos(
"UTR2", 1, cTagV, xpos, ypos, zpos, 0,
"ONLY");
758 TVirtualMC::GetMC()->Gspos(
"UTR1", 1, cTagV, xpos, ypos, zpos, 0,
"ONLY");
768 for (
int isector = 0; isector <
NSECTOR; isector++) {
769 if (getSMstatus(isector)) {
770 snprintf(cTagV, kTag,
"BTRD%d", isector);
771 TVirtualMC::GetMC()->Gspos(
"UTF1", 1, cTagV, xpos, ypos, zpos, 0,
"ONLY");
772 TVirtualMC::GetMC()->Gspos(
"UTF2", 1, cTagV, xpos, -ypos, zpos, 0,
"ONLY");
783 gGeoManager->CheckGeometry();
787void Geometry::createFrame(std::vector<int>
const& idtmed)
806 const int kTag = 100;
810 const int kNparTRD = 4;
811 float parTRD[kNparTRD];
812 const int kNparBOX = 3;
813 float parBOX[kNparBOX];
814 const int kNparTRP = 11;
815 float parTRP[kNparTRP];
818 const int kNmatrix = 7;
819 int matrix[kNmatrix];
820 TVirtualMC::GetMC()->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
821 TVirtualMC::GetMC()->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0);
822 TVirtualMC::GetMC()->Matrix(matrix[2], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0);
823 TVirtualMC::GetMC()->Matrix(matrix[3], 90.0, 180.0, 0.0, 180.0, 90.0, 90.0);
824 TVirtualMC::GetMC()->Matrix(matrix[4], 170.0, 0.0, 80.0, 0.0, 90.0, 90.0);
825 TVirtualMC::GetMC()->Matrix(matrix[5], 170.0, 180.0, 80.0, 180.0, 90.0, 90.0);
826 TVirtualMC::GetMC()->Matrix(matrix[6], 180.0, 180.0, 90.0, 180.0, 90.0, 90.0);
832 const int kNparCrb = 3;
833 float parCrb[kNparCrb];
837 createVolume(
"USCR",
"BOX ", idtmed[26], parCrb, 0);
839 parCrb[0] = 77.49 / 2.0;
840 parCrb[1] = 104.60 / 2.0;
845 TVirtualMC::GetMC()->Gsposp(
"USCR", 1,
"UTS1", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
846 TVirtualMC::GetMC()->Gsposp(
"USCR", 2,
"UTS2", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
847 TVirtualMC::GetMC()->Gsposp(
"USCR", 3,
"UTS3", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
848 TVirtualMC::GetMC()->Gsposp(
"USCR", 4,
"UTS4", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
850 parCrb[0] = 77.49 / 2.0;
851 parCrb[1] = 55.80 / 2.0;
856 TVirtualMC::GetMC()->Gsposp(
"USCR", 5,
"UTS1", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
857 TVirtualMC::GetMC()->Gsposp(
"USCR", 6,
"UTS2", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
858 TVirtualMC::GetMC()->Gsposp(
"USCR", 7,
"UTS3", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
859 TVirtualMC::GetMC()->Gsposp(
"USCR", 8,
"UTS4", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
860 TVirtualMC::GetMC()->Gsposp(
"USCR", 9,
"UTS1", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
861 TVirtualMC::GetMC()->Gsposp(
"USCR", 10,
"UTS2", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
862 TVirtualMC::GetMC()->Gsposp(
"USCR", 11,
"UTS3", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
863 TVirtualMC::GetMC()->Gsposp(
"USCR", 12,
"UTS4", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
865 parCrb[0] = 77.49 / 2.0;
866 parCrb[1] = 56.00 / 2.0;
871 TVirtualMC::GetMC()->Gsposp(
"USCR", 13,
"UTS1", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
872 TVirtualMC::GetMC()->Gsposp(
"USCR", 14,
"UTS2", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
873 TVirtualMC::GetMC()->Gsposp(
"USCR", 15,
"UTS3", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
874 TVirtualMC::GetMC()->Gsposp(
"USCR", 16,
"UTS4", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
875 TVirtualMC::GetMC()->Gsposp(
"USCR", 17,
"UTS1", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
876 TVirtualMC::GetMC()->Gsposp(
"USCR", 18,
"UTS2", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
877 TVirtualMC::GetMC()->Gsposp(
"USCR", 19,
"UTS3", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
878 TVirtualMC::GetMC()->Gsposp(
"USCR", 20,
"UTS4", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
880 parCrb[0] = 77.49 / 2.0;
881 parCrb[1] = 118.00 / 2.0;
886 TVirtualMC::GetMC()->Gsposp(
"USCR", 21,
"UTS1", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
887 TVirtualMC::GetMC()->Gsposp(
"USCR", 22,
"UTS2", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
888 TVirtualMC::GetMC()->Gsposp(
"USCR", 23,
"UTS3", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
889 TVirtualMC::GetMC()->Gsposp(
"USCR", 24,
"UTS4", xpos, ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
890 TVirtualMC::GetMC()->Gsposp(
"USCR", 25,
"UTS1", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
891 TVirtualMC::GetMC()->Gsposp(
"USCR", 26,
"UTS2", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
892 TVirtualMC::GetMC()->Gsposp(
"USCR", 27,
"UTS3", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
893 TVirtualMC::GetMC()->Gsposp(
"USCR", 28,
"UTS4", xpos, -ypos, zpos, 0,
"ONLY", parCrb, kNparCrb);
895 parCrb[0] = 111.48 / 2.0;
896 parCrb[1] = 105.00 / 2.0;
901 TVirtualMC::GetMC()->Gsposp(
"USCR", 29,
"UTS2", xpos, ypos, -zpos, 0,
"ONLY", parCrb, kNparCrb);
902 TVirtualMC::GetMC()->Gsposp(
"USCR", 30,
"UTS3", xpos, ypos, -zpos, 0,
"ONLY", parCrb, kNparCrb);
904 parCrb[0] = 111.48 / 2.0;
905 parCrb[1] = 56.00 / 2.0;
910 TVirtualMC::GetMC()->Gsposp(
"USCR", 31,
"UTS2", xpos, ypos, -zpos, 0,
"ONLY", parCrb, kNparCrb);
911 TVirtualMC::GetMC()->Gsposp(
"USCR", 32,
"UTS3", xpos, ypos, -zpos, 0,
"ONLY", parCrb, kNparCrb);
912 TVirtualMC::GetMC()->Gsposp(
"USCR", 33,
"UTS2", xpos, -ypos, -zpos, 0,
"ONLY", parCrb, kNparCrb);
913 TVirtualMC::GetMC()->Gsposp(
"USCR", 34,
"UTS3", xpos, -ypos, -zpos, 0,
"ONLY", parCrb, kNparCrb);
919 const float kSRLhgt = 2.00;
920 const float kSRLwidA = 2.3;
921 const float kSRLwidB = 1.947;
922 const float kSRLdst = 1.135;
923 const int kNparSRL = 11;
924 float parSRL[kNparSRL];
929 parSRL[3] = kSRLhgt / 2.0;
930 parSRL[4] = kSRLwidB / 2.0;
931 parSRL[5] = kSRLwidA / 2.0;
933 parSRL[7] = kSRLhgt / 2.0;
934 parSRL[8] = kSRLwidB / 2.0;
935 parSRL[9] = kSRLwidA / 2.0;
937 createVolume(
"USRL",
"TRAP", idtmed[1], parSRL, kNparSRL);
942 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
943 xpos =
CWIDTH[ilayer] / 2.0 + kSRLwidA / 2.0 + kSRLdst;
947 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1,
"UTI1", xpos, ypos, zpos, matrix[2],
"ONLY");
948 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 +
NLAYER,
"UTI1", -xpos, ypos, zpos, matrix[3],
"ONLY");
949 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 + 2 *
NLAYER,
"UTI2", xpos, ypos, zpos, matrix[2],
"ONLY");
950 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 + 3 *
NLAYER,
"UTI2", -xpos, ypos, zpos, matrix[3],
"ONLY");
951 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 + 4 *
NLAYER,
"UTI3", xpos, ypos, zpos, matrix[2],
"ONLY");
952 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 + 5 *
NLAYER,
"UTI3", -xpos, ypos, zpos, matrix[3],
"ONLY");
953 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 + 6 *
NLAYER,
"UTI4", xpos, ypos, zpos, matrix[2],
"ONLY");
954 TVirtualMC::GetMC()->Gspos(
"USRL", ilayer + 1 + 7 *
NLAYER,
"UTI4", -xpos, ypos, zpos, matrix[3],
"ONLY");
961 const float kSCBwid = 1.0;
962 const float kSCBthk = 2.0;
963 const float kSCHhgt = 0.3;
965 const int kNparSCB = 3;
966 float parSCB[kNparSCB];
967 parSCB[1] = kSCBwid / 2.0;
968 parSCB[2] =
CH / 2.0 +
VSPACE / 2.0 - kSCHhgt;
970 const int kNparSCI = 3;
971 float parSCI[kNparSCI];
977 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
979 parSCB[0] =
CWIDTH[ilayer] / 2.0 + kSRLdst / 2.0;
980 snprintf(cTagV, kTag,
"USF%01d", ilayer);
981 createVolume(cTagV,
"BOX ", idtmed[1], parSCB, kNparSCB);
984 float thkSCB = kSCBthk;
988 parSCI[2] = parSCB[2] - thkSCB;
989 parSCI[0] = parSCB[0] / 4.0 - kSCBthk;
990 snprintf(cTagV, kTag,
"USI%01d", ilayer);
991 createVolume(cTagV,
"BOX ", idtmed[2], parSCI, kNparSCI);
993 snprintf(cTagV, kTag,
"USI%01d", ilayer);
994 snprintf(cTagM, kTag,
"USF%01d", ilayer);
997 xpos = parSCI[0] + thkSCB / 2.0;
998 TVirtualMC::GetMC()->Gspos(cTagV, 1, cTagM, xpos, ypos, zpos, 0,
"ONLY");
999 xpos = -parSCI[0] - thkSCB / 2.0;
1000 TVirtualMC::GetMC()->Gspos(cTagV, 2, cTagM, xpos, ypos, zpos, 0,
"ONLY");
1001 xpos = 3.0 * parSCI[0] + 1.5 * thkSCB;
1002 TVirtualMC::GetMC()->Gspos(cTagV, 3, cTagM, xpos, ypos, zpos, 0,
"ONLY");
1003 xpos = -3.0 * parSCI[0] - 1.5 * thkSCB;
1004 TVirtualMC::GetMC()->Gspos(cTagV, 4, cTagM, xpos, ypos, zpos, 0,
"ONLY");
1006 snprintf(cTagV, kTag,
"USF%01d", ilayer);
1011 TVirtualMC::GetMC()->Gspos(cTagV, 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1012 TVirtualMC::GetMC()->Gspos(cTagV, 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1013 TVirtualMC::GetMC()->Gspos(cTagV, 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1014 TVirtualMC::GetMC()->Gspos(cTagV, 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1017 TVirtualMC::GetMC()->Gspos(cTagV, 2,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1018 TVirtualMC::GetMC()->Gspos(cTagV, 4,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1019 TVirtualMC::GetMC()->Gspos(cTagV, 6,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1020 TVirtualMC::GetMC()->Gspos(cTagV, 8,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1027 const int kNparSCH = 3;
1028 float parSCH[kNparSCH];
1030 for (ilayer = 1; ilayer <
NLAYER - 1; ilayer++) {
1031 parSCH[0] =
CWIDTH[ilayer] / 2.0;
1035 parSCH[2] = kSCHhgt / 2.0;
1037 snprintf(cTagV, kTag,
"USH%01d", ilayer);
1038 createVolume(cTagV,
"BOX ", idtmed[1], parSCH, kNparSCH);
1040 ypos =
CLENGTH[ilayer][2] / 2.0 +
CLENGTH[ilayer][1] + parSCH[1];
1042 TVirtualMC::GetMC()->Gspos(cTagV, 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1043 TVirtualMC::GetMC()->Gspos(cTagV, 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1044 TVirtualMC::GetMC()->Gspos(cTagV, 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1045 TVirtualMC::GetMC()->Gspos(cTagV, 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1047 TVirtualMC::GetMC()->Gspos(cTagV, 2,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1048 TVirtualMC::GetMC()->Gspos(cTagV, 4,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1049 TVirtualMC::GetMC()->Gspos(cTagV, 6,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1050 TVirtualMC::GetMC()->Gspos(cTagV, 8,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1058 parTRD[0] = 87.60 / 2.0;
1059 parTRD[1] = 114.00 / 2.0;
1060 parTRD[2] = 1.20 / 2.0;
1061 parTRD[3] = 71.30 / 2.0;
1062 createVolume(
"USDB",
"TRD1", idtmed[1], parTRD, kNparTRD);
1064 parTRP[0] = 1.20 / 2.0;
1067 parTRP[3] = 27.00 / 2.0;
1068 parTRP[4] = 50.60 / 2.0;
1069 parTRP[5] = 5.00 / 2.0;
1071 parTRP[7] = 27.00 / 2.0;
1072 parTRP[8] = 50.60 / 2.0;
1073 parTRP[9] = 5.00 / 2.0;
1075 createVolume(
"USD1",
"TRAP", idtmed[2], parTRP, kNparTRP);
1078 zpos = 27.00 / 2.0 - 71.3 / 2.0;
1079 TVirtualMC::GetMC()->Gspos(
"USD1", 1,
"USDB", xpos, ypos, zpos, matrix[2],
"ONLY");
1081 parTRP[0] = 1.20 / 2.0;
1084 parTRP[3] = 33.00 / 2.0;
1085 parTRP[4] = 5.00 / 2.0;
1086 parTRP[5] = 62.10 / 2.0;
1088 parTRP[7] = 33.00 / 2.0;
1089 parTRP[8] = 5.00 / 2.0;
1090 parTRP[9] = 62.10 / 2.0;
1092 createVolume(
"USD2",
"TRAP", idtmed[2], parTRP, kNparTRP);
1095 zpos = 71.3 / 2.0 - 33.0 / 2.0;
1096 TVirtualMC::GetMC()->Gspos(
"USD2", 1,
"USDB", xpos, ypos, zpos, matrix[2],
"ONLY");
1098 parBOX[0] = 22.50 / 2.0;
1099 parBOX[1] = 1.20 / 2.0;
1100 parBOX[2] = 70.50 / 2.0;
1101 createVolume(
"USD3",
"BOX ", idtmed[2], parBOX, kNparBOX);
1105 TVirtualMC::GetMC()->Gspos(
"USD3", 1,
"USDB", xpos, ypos, zpos, 0,
"ONLY");
1107 parTRP[0] = 1.20 / 2.0;
1110 parTRP[3] = 25.50 / 2.0;
1111 parTRP[4] = 5.00 / 2.0;
1112 parTRP[5] = 65.00 / 2.0;
1114 parTRP[7] = 25.50 / 2.0;
1115 parTRP[8] = 5.00 / 2.0;
1116 parTRP[9] = 65.00 / 2.0;
1118 createVolume(
"USD4",
"TRAP", idtmed[2], parTRP, kNparTRP);
1122 TVirtualMC::GetMC()->Gspos(
"USD4", 1,
"USDB", xpos, ypos, zpos, matrix[6],
"ONLY");
1124 parTRP[0] = 1.20 / 2.0;
1127 parTRP[3] = 23.50 / 2.0;
1128 parTRP[4] = 63.50 / 2.0;
1129 parTRP[5] = 5.00 / 2.0;
1131 parTRP[7] = 23.50 / 2.0;
1132 parTRP[8] = 63.50 / 2.0;
1133 parTRP[9] = 5.00 / 2.0;
1135 createVolume(
"USD5",
"TRAP", idtmed[2], parTRP, kNparTRP);
1139 TVirtualMC::GetMC()->Gspos(
"USD5", 1,
"USDB", xpos, ypos, zpos, matrix[5],
"ONLY");
1141 parTRP[0] = 1.20 / 2.0;
1144 parTRP[3] = 70.50 / 2.0;
1145 parTRP[4] = 4.50 / 2.0;
1146 parTRP[5] = 16.50 / 2.0;
1148 parTRP[7] = 70.50 / 2.0;
1149 parTRP[8] = 4.50 / 2.0;
1150 parTRP[9] = 16.50 / 2.0;
1152 createVolume(
"USD6",
"TRAP", idtmed[2], parTRP, kNparTRP);
1156 TVirtualMC::GetMC()->Gspos(
"USD6", 1,
"USDB", xpos, ypos, zpos, matrix[2],
"ONLY");
1160 TVirtualMC::GetMC()->Gspos(
"USDB", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1161 TVirtualMC::GetMC()->Gspos(
"USDB", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1162 TVirtualMC::GetMC()->Gspos(
"USDB", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1163 TVirtualMC::GetMC()->Gspos(
"USDB", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1164 TVirtualMC::GetMC()->Gspos(
"USDB", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1165 TVirtualMC::GetMC()->Gspos(
"USDB", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1166 TVirtualMC::GetMC()->Gspos(
"USDB", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1167 TVirtualMC::GetMC()->Gspos(
"USDB", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1169 parBOX[0] = 95.00 / 2.0;
1170 parBOX[1] = 1.20 / 2.0;
1171 parBOX[2] = 3.00 / 2.0;
1172 createVolume(
"USD7",
"BOX ", idtmed[1], parBOX, kNparBOX);
1176 TVirtualMC::GetMC()->Gspos(
"USD7", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1177 TVirtualMC::GetMC()->Gspos(
"USD7", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1178 TVirtualMC::GetMC()->Gspos(
"USD7", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1179 TVirtualMC::GetMC()->Gspos(
"USD7", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1180 TVirtualMC::GetMC()->Gspos(
"USD7", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1181 TVirtualMC::GetMC()->Gspos(
"USD7", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1182 TVirtualMC::GetMC()->Gspos(
"USD7", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1183 TVirtualMC::GetMC()->Gspos(
"USD7", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1185 parBOX[0] = 90.22 / 2.0;
1186 parBOX[1] = 1.20 / 2.0;
1187 parBOX[2] = 1.74 / 2.0;
1188 createVolume(
"USD8",
"BOX ", idtmed[1], parBOX, kNparBOX);
1190 ypos =
CLENGTH[5][2] / 2.0 - 0.1;
1192 TVirtualMC::GetMC()->Gspos(
"USD8", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1193 TVirtualMC::GetMC()->Gspos(
"USD8", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1194 TVirtualMC::GetMC()->Gspos(
"USD8", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1195 TVirtualMC::GetMC()->Gspos(
"USD8", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1196 TVirtualMC::GetMC()->Gspos(
"USD8", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1197 TVirtualMC::GetMC()->Gspos(
"USD8", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1198 TVirtualMC::GetMC()->Gspos(
"USD8", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1199 TVirtualMC::GetMC()->Gspos(
"USD8", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1201 parBOX[0] = 82.60 / 2.0;
1202 parBOX[1] = 1.20 / 2.0;
1203 parBOX[2] = 1.40 / 2.0;
1204 createVolume(
"USD9",
"BOX ", idtmed[1], parBOX, kNparBOX);
1208 TVirtualMC::GetMC()->Gspos(
"USD9", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1209 TVirtualMC::GetMC()->Gspos(
"USD9", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1210 TVirtualMC::GetMC()->Gspos(
"USD9", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1211 TVirtualMC::GetMC()->Gspos(
"USD9", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1212 TVirtualMC::GetMC()->Gspos(
"USD9", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1213 TVirtualMC::GetMC()->Gspos(
"USD9", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1214 TVirtualMC::GetMC()->Gspos(
"USD9", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1215 TVirtualMC::GetMC()->Gspos(
"USD9", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1217 parTRP[0] = 0.10 / 2.0;
1220 parTRP[3] = 74.50 / 2.0;
1221 parTRP[4] = 31.70 / 2.0;
1222 parTRP[5] = 44.00 / 2.0;
1224 parTRP[7] = 74.50 / 2.0;
1225 parTRP[8] = 31.70 / 2.0;
1226 parTRP[9] = 44.00 / 2.0;
1228 createVolume(
"USDF",
"TRAP", idtmed[2], parTRP, kNparTRP);
1230 ypos =
CLENGTH[5][2] / 2.0 + 1.20 / 2.0 + 0.10 / 2.0;
1232 TVirtualMC::GetMC()->Gspos(
"USDF", 1,
"UTI1", xpos, ypos, zpos, matrix[2],
"ONLY");
1233 TVirtualMC::GetMC()->Gspos(
"USDF", 2,
"UTI1", xpos, -ypos, zpos, matrix[2],
"ONLY");
1234 TVirtualMC::GetMC()->Gspos(
"USDF", 3,
"UTI2", xpos, ypos, zpos, matrix[2],
"ONLY");
1235 TVirtualMC::GetMC()->Gspos(
"USDF", 4,
"UTI2", xpos, -ypos, zpos, matrix[2],
"ONLY");
1236 TVirtualMC::GetMC()->Gspos(
"USDF", 5,
"UTI3", xpos, ypos, zpos, matrix[2],
"ONLY");
1237 TVirtualMC::GetMC()->Gspos(
"USDF", 6,
"UTI3", xpos, -ypos, zpos, matrix[2],
"ONLY");
1238 TVirtualMC::GetMC()->Gspos(
"USDF", 7,
"UTI4", xpos, ypos, zpos, matrix[2],
"ONLY");
1239 TVirtualMC::GetMC()->Gspos(
"USDF", 8,
"UTI4", xpos, -ypos, zpos, matrix[2],
"ONLY");
1246 parTRD[0] = 90.00 / 2.0 - 0.1;
1247 parTRD[1] = 114.00 / 2.0 - 0.1;
1248 parTRD[2] = 1.50 / 2.0;
1249 parTRD[3] = 70.30 / 2.0;
1250 createVolume(
"USCB",
"TRD1", idtmed[1], parTRD, kNparTRD);
1252 parTRD[0] = 87.00 / 2.0;
1253 parTRD[1] = 10.00 / 2.0;
1254 parTRD[2] = 1.50 / 2.0;
1255 parTRD[3] = 26.35 / 2.0;
1256 createVolume(
"USC1",
"TRD1", idtmed[2], parTRD, kNparTRD);
1259 zpos = 26.35 / 2.0 - 70.3 / 2.0;
1260 TVirtualMC::GetMC()->Gspos(
"USC1", 1,
"USCB", xpos, ypos, zpos, 0,
"ONLY");
1262 parTRD[0] = 10.00 / 2.0;
1263 parTRD[1] = 111.00 / 2.0;
1264 parTRD[2] = 1.50 / 2.0;
1265 parTRD[3] = 35.05 / 2.0;
1266 createVolume(
"USC2",
"TRD1", idtmed[2], parTRD, kNparTRD);
1269 zpos = 70.3 / 2.0 - 35.05 / 2.0;
1270 TVirtualMC::GetMC()->Gspos(
"USC2", 1,
"USCB", xpos, ypos, zpos, 0,
"ONLY");
1272 parTRP[0] = 1.50 / 2.0;
1275 parTRP[3] = 37.60 / 2.0;
1276 parTRP[4] = 63.90 / 2.0;
1277 parTRP[5] = 8.86 / 2.0;
1279 parTRP[7] = 37.60 / 2.0;
1280 parTRP[8] = 63.90 / 2.0;
1281 parTRP[9] = 8.86 / 2.0;
1283 createVolume(
"USC3",
"TRAP", idtmed[2], parTRP, kNparTRP);
1287 TVirtualMC::GetMC()->Gspos(
"USC3", 1,
"USCB", xpos, ypos, zpos, matrix[4],
"ONLY");
1288 TVirtualMC::GetMC()->Gspos(
"USC3", 2,
"USCB", -xpos, ypos, zpos, matrix[5],
"ONLY");
1292 TVirtualMC::GetMC()->Gspos(
"USCB", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1293 TVirtualMC::GetMC()->Gspos(
"USCB", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1294 TVirtualMC::GetMC()->Gspos(
"USCB", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1295 TVirtualMC::GetMC()->Gspos(
"USCB", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1296 TVirtualMC::GetMC()->Gspos(
"USCB", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1297 TVirtualMC::GetMC()->Gspos(
"USCB", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1298 TVirtualMC::GetMC()->Gspos(
"USCB", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1299 TVirtualMC::GetMC()->Gspos(
"USCB", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1301 parBOX[0] = 95.00 / 2.0;
1302 parBOX[1] = 1.50 / 2.0;
1303 parBOX[2] = 3.00 / 2.0;
1304 createVolume(
"USC4",
"BOX ", idtmed[1], parBOX, kNparBOX);
1308 TVirtualMC::GetMC()->Gspos(
"USC4", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1309 TVirtualMC::GetMC()->Gspos(
"USC4", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1310 TVirtualMC::GetMC()->Gspos(
"USC4", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1311 TVirtualMC::GetMC()->Gspos(
"USC4", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1312 TVirtualMC::GetMC()->Gspos(
"USC4", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1313 TVirtualMC::GetMC()->Gspos(
"USC4", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1314 TVirtualMC::GetMC()->Gspos(
"USC4", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1315 TVirtualMC::GetMC()->Gspos(
"USC4", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1317 parBOX[0] = 90.22 / 2.0;
1318 parBOX[1] = 1.50 / 2.0;
1319 parBOX[2] = 2.00 / 2.0;
1320 createVolume(
"USC5",
"BOX ", idtmed[1], parBOX, kNparBOX);
1324 TVirtualMC::GetMC()->Gspos(
"USC5", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1325 TVirtualMC::GetMC()->Gspos(
"USC5", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1326 TVirtualMC::GetMC()->Gspos(
"USC5", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1327 TVirtualMC::GetMC()->Gspos(
"USC5", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1328 TVirtualMC::GetMC()->Gspos(
"USC5", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1329 TVirtualMC::GetMC()->Gspos(
"USC5", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1330 TVirtualMC::GetMC()->Gspos(
"USC5", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1331 TVirtualMC::GetMC()->Gspos(
"USC5", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1333 parBOX[0] = 82.60 / 2.0;
1334 parBOX[1] = 1.50 / 2.0;
1335 parBOX[2] = 1.60 / 2.0;
1336 createVolume(
"USC6",
"BOX ", idtmed[1], parBOX, kNparBOX);
1340 TVirtualMC::GetMC()->Gspos(
"USC6", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1341 TVirtualMC::GetMC()->Gspos(
"USC6", 2,
"UTI1", xpos, -ypos, zpos, 0,
"ONLY");
1342 TVirtualMC::GetMC()->Gspos(
"USC6", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1343 TVirtualMC::GetMC()->Gspos(
"USC6", 4,
"UTI2", xpos, -ypos, zpos, 0,
"ONLY");
1344 TVirtualMC::GetMC()->Gspos(
"USC6", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1345 TVirtualMC::GetMC()->Gspos(
"USC6", 6,
"UTI3", xpos, -ypos, zpos, 0,
"ONLY");
1346 TVirtualMC::GetMC()->Gspos(
"USC6", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1347 TVirtualMC::GetMC()->Gspos(
"USC6", 8,
"UTI4", xpos, -ypos, zpos, 0,
"ONLY");
1353 const int kNparSCL = 3;
1354 float parSCL[kNparSCL];
1355 const int kNparSCLb = 11;
1356 float parSCLb[kNparSCLb];
1360 const float kSCLthkUa = 0.6;
1361 const float kSCLthkUb = 0.6;
1363 const float kSCLwidUa = 3.2;
1364 const float kSCLwidUb = 4.8;
1366 const float kSCLposxUa = 0.7;
1367 const float kSCLposxUb = 3.3;
1368 const float kSCLposzUa = 1.65;
1369 const float kSCLposzUb = 0.3;
1371 parSCL[0] = kSCLthkUa / 2.0;
1373 parSCL[2] = kSCLwidUa / 2.0;
1374 createVolume(
"USL1",
"BOX ", idtmed[1], parSCL, kNparSCL);
1378 TVirtualMC::GetMC()->Gspos(
"USL1", 1,
"UTI1", xpos, ypos, zpos, matrix[0],
"ONLY");
1379 TVirtualMC::GetMC()->Gspos(
"USL1", 3,
"UTI4", xpos, ypos, zpos, matrix[0],
"ONLY");
1381 TVirtualMC::GetMC()->Gspos(
"USL1", 2,
"UTI1", xpos, ypos, zpos, matrix[1],
"ONLY");
1382 TVirtualMC::GetMC()->Gspos(
"USL1", 4,
"UTI4", xpos, ypos, zpos, matrix[1],
"ONLY");
1384 parSCL[0] = kSCLwidUb / 2.0;
1386 parSCL[2] = kSCLthkUb / 2.0;
1387 createVolume(
"USL2",
"BOX ", idtmed[1], parSCL, kNparSCL);
1391 TVirtualMC::GetMC()->Gspos(
"USL2", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1392 TVirtualMC::GetMC()->Gspos(
"USL2", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1393 TVirtualMC::GetMC()->Gspos(
"USL2", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1394 TVirtualMC::GetMC()->Gspos(
"USL2", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1396 TVirtualMC::GetMC()->Gspos(
"USL2", 2,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1397 TVirtualMC::GetMC()->Gspos(
"USL2", 4,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1398 TVirtualMC::GetMC()->Gspos(
"USL2", 6,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1399 TVirtualMC::GetMC()->Gspos(
"USL2", 8,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1403 const float kSCLthkLa = 2.464;
1404 const float kSCLthkLb = 1.0;
1406 const float kSCLwidLa = 8.3;
1407 const float kSCLwidLb = 4.0;
1409 const float kSCLposxLa = (3.0 * kSCLthkLb - kSCLthkLa) / 4.0 + 0.05;
1410 const float kSCLposxLb = kSCLthkLb + kSCLwidLb / 2.0 + 0.05;
1411 const float kSCLposzLa = kSCLwidLa / 2.0;
1412 const float kSCLposzLb = kSCLthkLb / 2.0;
1418 parSCLb[3] = kSCLwidLa / 2.0;
1419 parSCLb[4] = kSCLthkLb / 2.0;
1420 parSCLb[5] = kSCLthkLa / 2.0;
1422 parSCLb[7] = kSCLwidLa / 2.0;
1423 parSCLb[8] = kSCLthkLb / 2.0;
1424 parSCLb[9] = kSCLthkLa / 2.0;
1426 createVolume(
"USL3",
"TRAP", idtmed[1], parSCLb, kNparSCLb);
1430 TVirtualMC::GetMC()->Gspos(
"USL3", 1,
"UTI1", xpos, ypos, zpos, matrix[2],
"ONLY");
1431 TVirtualMC::GetMC()->Gspos(
"USL3", 3,
"UTI2", xpos, ypos, zpos, matrix[2],
"ONLY");
1432 TVirtualMC::GetMC()->Gspos(
"USL3", 5,
"UTI3", xpos, ypos, zpos, matrix[2],
"ONLY");
1433 TVirtualMC::GetMC()->Gspos(
"USL3", 7,
"UTI4", xpos, ypos, zpos, matrix[2],
"ONLY");
1435 TVirtualMC::GetMC()->Gspos(
"USL3", 2,
"UTI1", xpos, ypos, zpos, matrix[3],
"ONLY");
1436 TVirtualMC::GetMC()->Gspos(
"USL3", 4,
"UTI2", xpos, ypos, zpos, matrix[3],
"ONLY");
1437 TVirtualMC::GetMC()->Gspos(
"USL3", 6,
"UTI3", xpos, ypos, zpos, matrix[3],
"ONLY");
1438 TVirtualMC::GetMC()->Gspos(
"USL3", 8,
"UTI4", xpos, ypos, zpos, matrix[3],
"ONLY");
1440 parSCL[0] = kSCLwidLb / 2.0;
1442 parSCL[2] = kSCLthkLb / 2.0;
1443 createVolume(
"USL4",
"BOX ", idtmed[1], parSCL, kNparSCL);
1447 TVirtualMC::GetMC()->Gspos(
"USL4", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1448 TVirtualMC::GetMC()->Gspos(
"USL4", 3,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1449 TVirtualMC::GetMC()->Gspos(
"USL4", 5,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1450 TVirtualMC::GetMC()->Gspos(
"USL4", 7,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1452 TVirtualMC::GetMC()->Gspos(
"USL4", 2,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
1453 TVirtualMC::GetMC()->Gspos(
"USL4", 4,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
1454 TVirtualMC::GetMC()->Gspos(
"USL4", 6,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
1455 TVirtualMC::GetMC()->Gspos(
"USL4", 8,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
1461 const int kNparTrd = 4;
1462 float parTrd[kNparTrd];
1463 parTrd[0] =
SWIDTH1 / 2.0 - 2.5;
1464 parTrd[1] =
SWIDTH2 / 2.0 - 2.5;
1465 parTrd[2] =
SMPLTT / 2.0;
1466 parTrd[3] =
SHEIGHT / 2.0 - 1.0;
1467 createVolume(
"UTA1",
"TRD1", idtmed[1], parTrd, kNparTrd);
1471 TVirtualMC::GetMC()->Gspos(
"UTA1", 1,
"UTF1", xpos, ypos, zpos, 0,
"ONLY");
1472 TVirtualMC::GetMC()->Gspos(
"UTA1", 2,
"UTF2", xpos, -ypos, zpos, 0,
"ONLY");
1474 const int kNparPlt = 3;
1475 float parPlt[kNparPlt];
1479 createVolume(
"UTA2",
"BOX ", idtmed[1], parPlt, 0);
1483 parPlt[0] =
SWIDTH2 / 2.0 - 0.2;
1485 parPlt[2] =
SMPLTT / 2.0;
1486 TVirtualMC::GetMC()->Gsposp(
"UTA2", 1,
"UTF2", xpos, ypos, zpos, 0,
"ONLY", parPlt, kNparPlt);
1490 parPlt[0] =
SMPLTT / 2.0;
1493 TVirtualMC::GetMC()->Gsposp(
"UTA2", 2,
"UTF2", xpos, ypos, zpos, matrix[0],
"ONLY", parPlt, kNparPlt);
1494 TVirtualMC::GetMC()->Gsposp(
"UTA2", 3,
"UTF2", -xpos, ypos, zpos, matrix[1],
"ONLY", parPlt, kNparPlt);
1497 parBOX[0] = 80.0 / 2.0;
1498 parBOX[1] = 1.0 / 2.0;
1499 parBOX[2] = 10.0 / 2.0;
1500 createVolume(
"UTA3",
"BOX ", idtmed[1], parBOX, kNparBOX);
1503 zpos =
SHEIGHT / 2.0 - 1.5 - 10.0 / 2.0;
1504 TVirtualMC::GetMC()->Gspos(
"UTA3", 1,
"UTF1", xpos, ypos, zpos, 0,
"ONLY");
1505 TVirtualMC::GetMC()->Gspos(
"UTA3", 2,
"UTF2", xpos, -ypos, zpos, 0,
"ONLY");
1509void Geometry::createServices(std::vector<int>
const& idtmed)
1535 const int kTag = 100;
1538 const int kNparBox = 3;
1539 float parBox[kNparBox];
1541 const int kNparTube = 3;
1542 float parTube[kNparTube];
1545 const float kBBMdz = 223.0;
1546 const float kBBSdz = 8.5;
1549 const float kBFMdz = 118.0;
1550 const float kBFSdz = 8.5;
1553 const int kNmatrix = 10;
1554 int matrix[kNmatrix];
1555 TVirtualMC::GetMC()->Matrix(matrix[0], 100.0, 0.0, 90.0, 90.0, 10.0, 0.0);
1556 TVirtualMC::GetMC()->Matrix(matrix[1], 80.0, 0.0, 90.0, 90.0, 10.0, 180.0);
1557 TVirtualMC::GetMC()->Matrix(matrix[2], 0.0, 0.0, 90.0, 90.0, 90.0, 0.0);
1558 TVirtualMC::GetMC()->Matrix(matrix[3], 180.0, 0.0, 90.0, 90.0, 90.0, 180.0);
1559 TVirtualMC::GetMC()->Matrix(matrix[4], 90.0, 0.0, 0.0, 0.0, 90.0, 90.0);
1560 TVirtualMC::GetMC()->Matrix(matrix[5], 100.0, 0.0, 90.0, 270.0, 10.0, 0.0);
1561 TVirtualMC::GetMC()->Matrix(matrix[6], 80.0, 0.0, 90.0, 270.0, 10.0, 180.0);
1562 TVirtualMC::GetMC()->Matrix(matrix[7], 90.0, 10.0, 90.0, 100.0, 0.0, 0.0);
1563 TVirtualMC::GetMC()->Matrix(matrix[8], 90.0, 350.0, 90.0, 80.0, 0.0, 0.0);
1564 TVirtualMC::GetMC()->Matrix(matrix[9], 90.0, 90.0, 90.0, 180.0, 0.0, 0.0);
1571 const float kCOLwid = 0.8;
1573 const float kCOLhgt = 6.5;
1575 const float kCOLposx = 1.0;
1576 const float kCOLposz = -1.2;
1578 const float kCOLthk = 0.1;
1579 const int kNparCOL = 3;
1580 float parCOL[kNparCOL];
1584 createVolume(
"UTC1",
"BOX ", idtmed[8], parCOL, 0);
1585 createVolume(
"UTC3",
"BOX ", idtmed[8], parCOL, 0);
1586 parCOL[0] = kCOLwid / 2.0 - kCOLthk;
1588 parCOL[2] = kCOLhgt / 2.0 - kCOLthk;
1589 createVolume(
"UTC2",
"BOX ", idtmed[14], parCOL, kNparCOL);
1590 createVolume(
"UTC4",
"BOX ", idtmed[14], parCOL, kNparCOL);
1595 TVirtualMC::GetMC()->Gspos(
"UTC2", 1,
"UTC1", xpos, ypos, zpos, 0,
"ONLY");
1596 TVirtualMC::GetMC()->Gspos(
"UTC4", 1,
"UTC3", xpos, ypos, zpos, 0,
"ONLY");
1598 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
1600 xpos =
CWIDTH[ilayer] / 2.0 + kCOLwid / 2.0 + kCOLposx;
1604 parCOL[0] = kCOLwid / 2.0;
1606 parCOL[2] = kCOLhgt / 2.0;
1607 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer,
"UTI1", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL, kNparCOL);
1608 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer +
NLAYER,
"UTI1", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1610 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer + 6 *
NLAYER,
"UTI2", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1612 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer + 7 *
NLAYER,
"UTI2", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1614 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer + 8 *
NLAYER,
"UTI3", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1616 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer + 9 *
NLAYER,
"UTI3", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1618 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer + 10 *
NLAYER,
"UTI4", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1620 TVirtualMC::GetMC()->Gsposp(
"UTC1", ilayer + 11 *
NLAYER,
"UTI4", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1624 xpos =
CWIDTH[ilayer] / 2.0 + kCOLwid / 2.0 + kCOLposx;
1628 parCOL[0] = kCOLwid / 2.0;
1630 parCOL[2] = kCOLhgt / 2.0;
1631 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 2 *
NLAYER,
"UTF1", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1633 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 3 *
NLAYER,
"UTF1", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1635 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 4 *
NLAYER,
"UTF2", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1637 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 5 *
NLAYER,
"UTF2", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1641 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
1643 xpos =
CWIDTH[ilayer] / 2.0 + kCOLwid / 2.0 + kCOLposx - 2.5;
1644 ypos = kBBSdz / 2.0 - kBBMdz / 2.0;
1647 parCOL[0] = kCOLwid / 2.0;
1648 parCOL[1] = kBBSdz / 2.0;
1649 parCOL[2] = kCOLhgt / 2.0;
1650 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 6 *
NLAYER,
"BBTRD", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1652 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 7 *
NLAYER,
"BBTRD", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1656 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
1658 xpos =
CWIDTH[ilayer] / 2.0 + kCOLwid / 2.0 + kCOLposx - 0.3;
1659 ypos = -kBFSdz / 2.0 + kBFMdz / 2.0;
1662 parCOL[0] = kCOLwid / 2.0;
1663 parCOL[1] = kBFSdz / 2.0;
1664 parCOL[2] = kCOLhgt / 2.0;
1665 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 6 *
NLAYER,
"BFTRD", xpos, ypos, zpos, matrix[0],
"ONLY", parCOL,
1667 TVirtualMC::GetMC()->Gsposp(
"UTC3", ilayer + 7 *
NLAYER,
"BFTRD", -xpos, ypos, zpos, matrix[1],
"ONLY", parCOL,
1673 xpos =
CWIDTH[5] / 2.0 - kCOLhgt / 2.0 - 1.3;
1676 parCOL[0] = kCOLwid / 2.0;
1678 parCOL[2] = kCOLhgt / 2.0;
1679 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6,
"UTI1", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1680 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 +
NLAYER,
"UTI1", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1681 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 + 6 *
NLAYER,
"UTI2", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1682 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 + 7 *
NLAYER,
"UTI2", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1683 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 + 8 *
NLAYER,
"UTI3", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1684 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 + 9 *
NLAYER,
"UTI3", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1685 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 + 10 *
NLAYER,
"UTI4", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1686 TVirtualMC::GetMC()->Gsposp(
"UTC1", 6 + 11 *
NLAYER,
"UTI4", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1688 xpos =
CWIDTH[5] / 2.0 - kCOLhgt / 2.0 - 1.3;
1691 parCOL[0] = kCOLwid / 2.0;
1693 parCOL[2] = kCOLhgt / 2.0;
1694 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 2 *
NLAYER,
"UTF1", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1695 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 3 *
NLAYER,
"UTF1", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1696 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 4 *
NLAYER,
"UTF2", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1697 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 5 *
NLAYER,
"UTF2", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1699 xpos =
CWIDTH[5] / 2.0 - kCOLhgt / 2.0 - 3.1;
1700 ypos = kBBSdz / 2.0 - kBBMdz / 2.0;
1702 parCOL[0] = kCOLwid / 2.0;
1703 parCOL[1] = kBBSdz / 2.0;
1704 parCOL[2] = kCOLhgt / 2.0;
1705 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 6 *
NLAYER,
"BBTRD", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1706 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 7 *
NLAYER,
"BBTRD", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1708 xpos =
CWIDTH[5] / 2.0 - kCOLhgt / 2.0 - 1.3;
1709 ypos = -kBFSdz / 2.0 + kBFMdz / 2.0;
1711 parCOL[0] = kCOLwid / 2.0;
1712 parCOL[1] = kBFSdz / 2.0;
1713 parCOL[2] = kCOLhgt / 2.0;
1714 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 6 *
NLAYER,
"BFTRD", xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1715 TVirtualMC::GetMC()->Gsposp(
"UTC3", 6 + 7 *
NLAYER,
"BFTRD", -xpos, ypos, zpos, matrix[3],
"ONLY", parCOL, kNparCOL);
1721 const float kPWRwid = 0.6;
1724 const float kPWRhgtA = 5.0 + 0.2;
1725 const float kPWRhgtB = 5.0;
1726 const float kPWRposx = 2.0;
1727 const float kPWRposz = 0.1;
1728 const int kNparPWR = 3;
1729 float parPWR[kNparPWR];
1733 createVolume(
"UTP1",
"BOX ", idtmed[25], parPWR, 0);
1734 createVolume(
"UTP3",
"BOX ", idtmed[25], parPWR, 0);
1736 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
1738 xpos =
CWIDTH[ilayer] / 2.0 + kPWRwid / 2.0 + kPWRposx;
1742 parPWR[0] = kPWRwid / 2.0;
1744 parPWR[2] = kPWRhgtA / 2.0;
1745 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer,
"UTI1", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR, kNparPWR);
1746 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer +
NLAYER,
"UTI1", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1748 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer + 6 *
NLAYER,
"UTI2", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1750 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer + 7 *
NLAYER,
"UTI2", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1752 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer + 8 *
NLAYER,
"UTI3", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1754 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer + 9 *
NLAYER,
"UTI3", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1756 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer + 10 *
NLAYER,
"UTI4", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1758 TVirtualMC::GetMC()->Gsposp(
"UTP1", ilayer + 11 *
NLAYER,
"UTI4", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1762 xpos =
CWIDTH[ilayer] / 2.0 + kPWRwid / 2.0 + kPWRposx;
1766 parPWR[0] = kPWRwid / 2.0;
1768 parPWR[2] = kPWRhgtA / 2.0;
1769 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 2 *
NLAYER,
"UTF1", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1771 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 3 *
NLAYER,
"UTF1", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1773 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 4 *
NLAYER,
"UTF2", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1775 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 5 *
NLAYER,
"UTF2", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1779 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
1781 xpos =
CWIDTH[ilayer] / 2.0 + kPWRwid / 2.0 + kPWRposx - 2.5;
1782 ypos = kBBSdz / 2.0 - kBBMdz / 2.0;
1785 parPWR[0] = kPWRwid / 2.0;
1786 parPWR[1] = kBBSdz / 2.0;
1787 parPWR[2] = kPWRhgtB / 2.0;
1788 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 6 *
NLAYER,
"BBTRD", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1790 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 7 *
NLAYER,
"BBTRD", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1794 for (ilayer = 1; ilayer <
NLAYER; ilayer++) {
1796 xpos =
CWIDTH[ilayer] / 2.0 + kPWRwid / 2.0 + kPWRposx - 0.3;
1797 ypos = -kBFSdz / 2.0 + kBFMdz / 2.0;
1800 parPWR[0] = kPWRwid / 2.0;
1801 parPWR[1] = kBFSdz / 2.0;
1802 parPWR[2] = kPWRhgtB / 2.0;
1803 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 8 *
NLAYER,
"BFTRD", xpos, ypos, zpos, matrix[0],
"ONLY", parPWR,
1805 TVirtualMC::GetMC()->Gsposp(
"UTP3", ilayer + 9 *
NLAYER,
"BFTRD", -xpos, ypos, zpos, matrix[1],
"ONLY", parPWR,
1811 xpos =
CWIDTH[5] / 2.0 + kPWRhgtB / 2.0 - 1.3;
1814 parPWR[0] = kPWRwid / 2.0;
1816 parPWR[2] = kPWRhgtB / 2.0;
1817 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6,
"UTI1", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1818 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 +
NLAYER,
"UTI1", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1819 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 + 6 *
NLAYER,
"UTI2", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1820 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 + 7 *
NLAYER,
"UTI2", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1821 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 + 8 *
NLAYER,
"UTI3", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1822 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 + 9 *
NLAYER,
"UTI3", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1823 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 + 10 *
NLAYER,
"UTI4", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1824 TVirtualMC::GetMC()->Gsposp(
"UTP1", 6 + 11 *
NLAYER,
"UTI4", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1826 xpos =
CWIDTH[5] / 2.0 + kPWRhgtB / 2.0 - 1.3;
1829 parPWR[0] = kPWRwid / 2.0;
1831 parPWR[2] = kPWRhgtB / 2.0;
1832 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 2 *
NLAYER,
"UTF1", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1833 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 3 *
NLAYER,
"UTF1", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1834 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 4 *
NLAYER,
"UTF2", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1835 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 5 *
NLAYER,
"UTF2", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1837 xpos =
CWIDTH[5] / 2.0 + kPWRhgtB / 2.0 - 3.0;
1838 ypos = kBBSdz / 2.0 - kBBMdz / 2.0;
1840 parPWR[0] = kPWRwid / 2.0;
1841 parPWR[1] = kBBSdz / 2.0;
1842 parPWR[2] = kPWRhgtB / 2.0;
1843 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 6 *
NLAYER,
"BBTRD", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1844 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 7 *
NLAYER,
"BBTRD", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1846 xpos =
CWIDTH[5] / 2.0 + kPWRhgtB / 2.0 - 1.3;
1847 ypos = -kBFSdz / 2.0 + kBFMdz / 2.0;
1849 parPWR[0] = kPWRwid / 2.0;
1850 parPWR[1] = kBFSdz / 2.0;
1851 parPWR[2] = kPWRhgtB / 2.0;
1852 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 8 *
NLAYER,
"BFTRD", xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1853 TVirtualMC::GetMC()->Gsposp(
"UTP3", 6 + 9 *
NLAYER,
"BFTRD", -xpos, ypos, zpos, matrix[3],
"ONLY", parPWR, kNparPWR);
1862 parTube[1] = 2.2 / 2.0;
1864 createVolume(
"UTG1",
"TUBE", idtmed[8], parTube, kNparTube);
1866 parTube[1] = 2.1 / 2.0;
1868 createVolume(
"UTG2",
"TUBE", idtmed[9], parTube, kNparTube);
1872 TVirtualMC::GetMC()->Gspos(
"UTG2", 1,
"UTG1", xpos, ypos, zpos, 0,
"ONLY");
1873 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
1874 xpos =
CWIDTH[ilayer] / 2.0 + kCOLwid / 2.0 - 1.5;
1877 TVirtualMC::GetMC()->Gspos(
"UTG1", 1 + ilayer,
"UTI3", xpos, ypos, zpos, matrix[4],
"ONLY");
1878 TVirtualMC::GetMC()->Gspos(
"UTG1", 7 + ilayer,
"UTI3", -xpos, ypos, zpos, matrix[4],
"ONLY");
1882 parTube[1] = 2.2 / 2.0;
1884 createVolume(
"UTG3",
"TUBE", idtmed[8], parTube, kNparTube);
1886 parTube[1] = 2.1 / 2.0;
1888 createVolume(
"UTG4",
"TUBE", idtmed[9], parTube, kNparTube);
1892 TVirtualMC::GetMC()->Gspos(
"UTG4", 1,
"UTG3", xpos, ypos, zpos, 0,
"ONLY");
1893 xpos =
CWIDTH[4] / 2.0 + kCOLwid / 2.0 - 1.5;
1896 TVirtualMC::GetMC()->Gspos(
"UTG3", 1,
"UTI4", xpos, ypos, zpos, matrix[4],
"ONLY");
1897 TVirtualMC::GetMC()->Gspos(
"UTG4", 2,
"UTI4", -xpos, ypos, zpos, matrix[4],
"ONLY");
1903 const int kNparServ = 3;
1904 float parServ[kNparServ];
1906 for (istack = 0; istack <
NSTACK; istack++) {
1907 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
1908 int iDet = getDetectorSec(ilayer, istack);
1910 snprintf(cTagV, kTag,
"UU%02d", iDet);
1911 parServ[0] =
CWIDTH[ilayer] / 2.0;
1913 parServ[2] =
CSVH / 2.0;
1914 createVolume(cTagV,
"BOX", idtmed[2], parServ, kNparServ);
1926 createVolume(
"UTCP",
"TUBE", idtmed[24], parTube, 0);
1929 parTube[1] = 0.2 / 2.0;
1931 createVolume(
"UTCH",
"TUBE", idtmed[14], parTube, kNparTube);
1936 TVirtualMC::GetMC()->Gspos(
"UTCH", 1,
"UTCP", xpos, ypos, zpos, 0,
"ONLY");
1939 for (istack = 0; istack <
NSTACK; istack++) {
1940 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
1941 int iDet = getDetectorSec(ilayer, istack);
1942 int iCopy = getDetector(ilayer, istack, 0) * 100;
1943 int nMCMrow = getRowMax(ilayer, istack, 0);
1944 float ySize = (getChamberLength(ilayer, istack) - 2.0 *
RPADW) / ((
float)nMCMrow);
1945 snprintf(cTagV, kTag,
"UU%02d", iDet);
1946 for (
int iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1948 ypos = (0.5 + iMCMrow) * ySize -
CLENGTH[ilayer][istack] / 2.0 +
HSPACE / 2.0;
1949 zpos = 0.0 + 0.742 / 2.0;
1952 parTube[1] = 0.3 / 2.0;
1953 parTube[2] =
CWIDTH[ilayer] / 2.0;
1954 TVirtualMC::GetMC()->Gsposp(
"UTCP", iCopy + iMCMrow, cTagV, xpos, ypos, zpos, matrix[2],
"ONLY", parTube,
1968 createVolume(
"UTPL",
"TUBE", idtmed[5], parTube, 0);
1971 for (istack = 0; istack <
NSTACK; istack++) {
1972 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
1973 int iDet = getDetectorSec(ilayer, istack);
1974 int iCopy = getDetector(ilayer, istack, 0) * 100;
1975 int nMCMrow = getRowMax(ilayer, istack, 0);
1976 float ySize = (getChamberLength(ilayer, istack) - 2.0 *
RPADW) / ((
float)nMCMrow);
1977 snprintf(cTagV, kTag,
"UU%02d", iDet);
1978 for (
int iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
1980 ypos = (0.5 + iMCMrow) * ySize - 1.0 -
CLENGTH[ilayer][istack] / 2.0 +
HSPACE / 2.0;
1981 zpos = -0.4 + 0.742 / 2.0;
1983 parTube[1] = 0.2 / 2.0;
1984 parTube[2] =
CWIDTH[ilayer] / 2.0;
1985 TVirtualMC::GetMC()->Gsposp(
"UTPL", iCopy + iMCMrow, cTagV, xpos, ypos, zpos, matrix[2],
"ONLY", parTube,
1995 const float kMCMx = 3.0;
1996 const float kMCMy = 3.0;
1997 const float kMCMz = 0.3;
1999 const float kMCMpcTh = 0.1;
2000 const float kMCMcuTh = 0.0025;
2001 const float kMCMsiTh = 0.03;
2002 const float kMCMcoTh = 0.04;
2005 const int kNparMCM = 3;
2006 float parMCM[kNparMCM];
2007 parMCM[0] = kMCMx / 2.0;
2008 parMCM[1] = kMCMy / 2.0;
2009 parMCM[2] = kMCMz / 2.0;
2010 createVolume(
"UMCM",
"BOX", idtmed[2], parMCM, kNparMCM);
2013 parMCM[0] = kMCMx / 2.0;
2014 parMCM[1] = kMCMy / 2.0;
2015 parMCM[2] = kMCMpcTh / 2.0;
2016 createVolume(
"UMC1",
"BOX", idtmed[19], parMCM, kNparMCM);
2018 parMCM[0] = kMCMx / 2.0;
2019 parMCM[1] = kMCMy / 2.0;
2020 parMCM[2] = kMCMcuTh / 2.0;
2021 createVolume(
"UMC2",
"BOX", idtmed[18], parMCM, kNparMCM);
2023 parMCM[0] = kMCMx / 2.0;
2024 parMCM[1] = kMCMy / 2.0;
2025 parMCM[2] = kMCMsiTh / 2.0;
2026 createVolume(
"UMC3",
"BOX", idtmed[20], parMCM, kNparMCM);
2028 parMCM[0] = kMCMx / 2.0;
2029 parMCM[1] = kMCMy / 2.0;
2030 parMCM[2] = kMCMcoTh / 2.0;
2031 createVolume(
"UMC4",
"BOX", idtmed[24], parMCM, kNparMCM);
2036 zpos = -kMCMz / 2.0 + kMCMpcTh / 2.0;
2037 TVirtualMC::GetMC()->Gspos(
"UMC1", 1,
"UMCM", xpos, ypos, zpos, 0,
"ONLY");
2038 zpos += kMCMpcTh / 2.0 + kMCMcuTh / 2.0;
2039 TVirtualMC::GetMC()->Gspos(
"UMC2", 1,
"UMCM", xpos, ypos, zpos, 0,
"ONLY");
2040 zpos += kMCMcuTh / 2.0 + kMCMsiTh / 2.0;
2041 TVirtualMC::GetMC()->Gspos(
"UMC3", 1,
"UMCM", xpos, ypos, zpos, 0,
"ONLY");
2042 zpos += kMCMsiTh / 2.0 + kMCMcoTh / 2.0;
2043 TVirtualMC::GetMC()->Gspos(
"UMC4", 1,
"UMCM", xpos, ypos, zpos, 0,
"ONLY");
2046 for (istack = 0; istack <
NSTACK; istack++) {
2047 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
2048 int iDet = getDetectorSec(ilayer, istack);
2049 int iCopy = getDetector(ilayer, istack, 0) * 1000;
2050 int nMCMrow = getRowMax(ilayer, istack, 0);
2051 float ySize = (getChamberLength(ilayer, istack) - 2.0 *
RPADW) / ((
float)nMCMrow);
2053 float xSize = (getChamberWidth(ilayer) - 2.0 *
CPADW) / ((
float)nMCMcol + 6);
2054 int iMCM[8] = {1, 2, 3, 5, 8, 9, 10, 12};
2055 snprintf(cTagV, kTag,
"UU%02d", iDet);
2056 for (
int iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) {
2057 for (
int iMCMcol = 0; iMCMcol < nMCMcol; iMCMcol++) {
2058 xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0 -
CWIDTH[ilayer] / 2.0;
2059 ypos = (0.5 + iMCMrow) * ySize + 1.0 -
CLENGTH[ilayer][istack] / 2.0 +
HSPACE / 2.0;
2060 zpos = -0.4 + 0.742 / 2.0;
2061 TVirtualMC::GetMC()->Gspos(
"UMCM", iCopy + iMCMrow * 10 + iMCMcol, cTagV, xpos, ypos, zpos, 0,
"ONLY");
2064 xpos = (0.5 + iMCM[iMCMcol]) * xSize + 1.0 -
CWIDTH[ilayer] / 2.0;
2065 ypos = (0.5 + iMCMrow) * ySize -
CLENGTH[ilayer][istack] / 2.0 +
HSPACE / 2.0;
2066 zpos = 0.0 + 0.742 / 2.0;
2068 parTube[1] = 0.3 / 2.0;
2069 parTube[2] = kMCMx / 2.0;
2070 TVirtualMC::GetMC()->Gsposp(
"UTCP", iCopy + iMCMrow * 10 + iMCMcol + 50, cTagV, xpos, ypos + 1.0, zpos,
2071 matrix[2],
"ONLY", parTube, kNparTube);
2072 TVirtualMC::GetMC()->Gsposp(
"UTCP", iCopy + iMCMrow * 10 + iMCMcol + 500, cTagV, xpos, ypos + 2.0, zpos,
2073 matrix[2],
"ONLY", parTube, kNparTube);
2083 const float kDCSx = 9.0;
2084 const float kDCSy = 14.5;
2085 const float kDCSz = 0.3;
2087 const float kDCSpcTh = 0.15;
2088 const float kDCScuTh = 0.01;
2089 const float kDCScoTh = 0.04;
2092 const int kNparDCS = 3;
2093 float parDCS[kNparDCS];
2094 parDCS[0] = kDCSx / 2.0;
2095 parDCS[1] = kDCSy / 2.0;
2096 parDCS[2] = kDCSz / 2.0;
2097 createVolume(
"UDCS",
"BOX", idtmed[2], parDCS, kNparDCS);
2100 parDCS[0] = kDCSx / 2.0;
2101 parDCS[1] = kDCSy / 2.0;
2102 parDCS[2] = kDCSpcTh / 2.0;
2103 createVolume(
"UDC1",
"BOX", idtmed[19], parDCS, kNparDCS);
2105 parDCS[0] = kDCSx / 2.0;
2106 parDCS[1] = kDCSy / 2.0;
2107 parDCS[2] = kDCScuTh / 2.0;
2108 createVolume(
"UDC2",
"BOX", idtmed[18], parDCS, kNparDCS);
2110 parDCS[0] = 5.0 / 2.0;
2111 parDCS[1] = 5.0 / 2.0;
2112 parDCS[2] = kDCScoTh / 2.0;
2113 createVolume(
"UDC3",
"BOX", idtmed[24], parDCS, kNparDCS);
2118 zpos = -kDCSz / 2.0 + kDCSpcTh / 2.0;
2119 TVirtualMC::GetMC()->Gspos(
"UDC1", 1,
"UDCS", xpos, ypos, zpos, 0,
"ONLY");
2120 zpos += kDCSpcTh / 2.0 + kDCScuTh / 2.0;
2121 TVirtualMC::GetMC()->Gspos(
"UDC2", 1,
"UDCS", xpos, ypos, zpos, 0,
"ONLY");
2122 zpos += kDCScuTh / 2.0 + kDCScoTh / 2.0;
2123 TVirtualMC::GetMC()->Gspos(
"UDC3", 1,
"UDCS", xpos, ypos, zpos, 0,
"ONLY");
2126 for (istack = 0; istack <
NSTACK; istack++) {
2127 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
2128 int iDet = getDetectorSec(ilayer, istack);
2129 int iCopy = iDet + 1;
2130 xpos =
CWIDTH[ilayer] / 2.0 -
2131 1.9 * (getChamberLength(ilayer, istack) - 2.0 *
RPADW) / ((
float)getRowMax(ilayer, istack, 0));
2132 ypos = 0.05 *
CLENGTH[ilayer][istack];
2133 zpos = kDCSz / 2.0 -
CSVH / 2.0;
2134 snprintf(cTagV, kTag,
"UU%02d", iDet);
2135 TVirtualMC::GetMC()->Gspos(
"UDCS", iCopy, cTagV, xpos, ypos, zpos, 0,
"ONLY");
2143 const float kORIx = 4.2;
2144 const float kORIy = 13.5;
2145 const float kORIz = 0.3;
2147 const float kORIpcTh = 0.15;
2148 const float kORIcuTh = 0.01;
2149 const float kORIcoTh = 0.04;
2152 const int kNparORI = 3;
2153 float parORI[kNparORI];
2154 parORI[0] = kORIx / 2.0;
2155 parORI[1] = kORIy / 2.0;
2156 parORI[2] = kORIz / 2.0;
2157 createVolume(
"UORI",
"BOX", idtmed[2], parORI, kNparORI);
2160 parORI[0] = kORIx / 2.0;
2161 parORI[1] = kORIy / 2.0;
2162 parORI[2] = kORIpcTh / 2.0;
2163 createVolume(
"UOR1",
"BOX", idtmed[19], parORI, kNparORI);
2165 parORI[0] = kORIx / 2.0;
2166 parORI[1] = kORIy / 2.0;
2167 parORI[2] = kORIcuTh / 2.0;
2168 createVolume(
"UOR2",
"BOX", idtmed[18], parORI, kNparORI);
2170 parORI[0] = kORIx / 2.0;
2171 parORI[1] = kORIy / 2.0;
2172 parORI[2] = kORIcoTh / 2.0;
2173 createVolume(
"UOR3",
"BOX", idtmed[24], parORI, kNparORI);
2178 zpos = -kORIz / 2.0 + kORIpcTh / 2.0;
2179 TVirtualMC::GetMC()->Gspos(
"UOR1", 1,
"UORI", xpos, ypos, zpos, 0,
"ONLY");
2180 zpos += kORIpcTh / 2.0 + kORIcuTh / 2.0;
2181 TVirtualMC::GetMC()->Gspos(
"UOR2", 1,
"UORI", xpos, ypos, zpos, 0,
"ONLY");
2182 zpos += kORIcuTh / 2.0 + kORIcoTh / 2.0;
2183 TVirtualMC::GetMC()->Gspos(
"UOR3", 1,
"UORI", xpos, ypos, zpos, 0,
"ONLY");
2186 for (istack = 0; istack <
NSTACK; istack++) {
2187 for (ilayer = 0; ilayer <
NLAYER; ilayer++) {
2188 int iDet = getDetectorSec(ilayer, istack);
2189 int iCopy = iDet + 1;
2190 xpos =
CWIDTH[ilayer] / 2.0 -
2191 1.92 * (getChamberLength(ilayer, istack) - 2.0 *
RPADW) / ((
float)getRowMax(ilayer, istack, 0));
2193 zpos = kORIz / 2.0 -
CSVH / 2.0;
2194 snprintf(cTagV, kTag,
"UU%02d", iDet);
2195 TVirtualMC::GetMC()->Gspos(
"UORI", iCopy, cTagV, xpos, ypos, zpos, 0,
"ONLY");
2196 xpos = -
CWIDTH[ilayer] / 2.0 +
2197 3.8 * (getChamberLength(ilayer, istack) - 2.0 *
RPADW) / ((
float)getRowMax(ilayer, istack, 0));
2199 zpos = kORIz / 2.0 -
CSVH / 2.0;
2200 snprintf(cTagV, kTag,
"UU%02d", iDet);
2201 TVirtualMC::GetMC()->Gspos(
"UORI", iCopy +
MAXCHAMBER, cTagV, xpos, ypos, zpos, 0,
"ONLY");
2213 createVolume(
"UTG3",
"TUBE", idtmed[8], parTube, 0);
2216 parTube[1] = 1.2 / 2.0;
2218 createVolume(
"UTG4",
"TUBE", idtmed[9], parTube, kNparTube);
2222 TVirtualMC::GetMC()->Gspos(
"UTG4", 1,
"UTG3", xpos, ypos, zpos, 0,
"ONLY");
2223 for (ilayer = 0; ilayer <
NLAYER - 1; ilayer++) {
2228 parTube[1] = 1.5 / 2.0;
2229 parTube[2] =
CWIDTH[ilayer] / 2.0 - 2.5;
2230 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1,
"UTI1", xpos, ypos, zpos, matrix[2],
"ONLY", parTube, kNparTube);
2231 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 1 *
NLAYER,
"UTI1", xpos, -ypos, zpos, matrix[2],
"ONLY", parTube,
2233 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 2 *
NLAYER,
"UTI2", xpos, ypos, zpos, matrix[2],
"ONLY", parTube,
2235 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 3 *
NLAYER,
"UTI2", xpos, -ypos, zpos, matrix[2],
"ONLY", parTube,
2237 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 4 *
NLAYER,
"UTI3", xpos, ypos, zpos, matrix[2],
"ONLY", parTube,
2239 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 5 *
NLAYER,
"UTI3", xpos, -ypos, zpos, matrix[2],
"ONLY", parTube,
2241 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 6 *
NLAYER,
"UTI4", xpos, ypos, zpos, matrix[2],
"ONLY", parTube,
2243 TVirtualMC::GetMC()->Gsposp(
"UTG3", ilayer + 1 + 7 *
NLAYER,
"UTI4", xpos, -ypos, zpos, matrix[2],
"ONLY", parTube,
2248 parBox[0] = 14.50 / 2.0;
2249 parBox[1] = 4.52 / 2.0;
2250 parBox[2] = 5.00 / 2.0;
2251 createVolume(
"UTGD",
"BOX ", idtmed[8], parBox, kNparBox);
2252 parBox[0] = 14.50 / 2.0;
2253 parBox[1] = 4.00 / 2.0;
2254 parBox[2] = 4.40 / 2.0;
2255 createVolume(
"UTGI",
"BOX ", idtmed[9], parBox, kNparBox);
2257 parTube[1] = 4.0 / 2.0;
2258 parTube[2] = 8.0 / 2.0;
2259 createVolume(
"UTGT",
"TUBE", idtmed[8], parTube, kNparTube);
2261 parTube[1] = 3.4 / 2.0;
2262 parTube[2] = 8.0 / 2.0;
2263 createVolume(
"UTGG",
"TUBE", idtmed[9], parTube, kNparTube);
2267 TVirtualMC::GetMC()->Gspos(
"UTGI", 1,
"UTGD", xpos, ypos, zpos, 0,
"ONLY");
2268 TVirtualMC::GetMC()->Gspos(
"UTGG", 1,
"UTGT", xpos, ypos, zpos, 0,
"ONLY");
2272 TVirtualMC::GetMC()->Gspos(
"UTGD", 1,
"UTF1", xpos, ypos, zpos, 0,
"ONLY");
2276 TVirtualMC::GetMC()->Gspos(
"UTGT", 1,
"UTF1", xpos, ypos, zpos, 0,
"ONLY");
2280 TVirtualMC::GetMC()->Gspos(
"UTGT", 3,
"UTF1", xpos, ypos, zpos, matrix[2],
"ONLY");
2284 TVirtualMC::GetMC()->Gspos(
"UTGT", 5,
"UTF1", xpos, ypos, zpos, matrix[2],
"ONLY");
2287 parBox[0] = 5.0 / 2.0;
2288 parBox[1] = 23.0 / 2.0;
2289 parBox[2] = 70.0 / 2.0;
2290 createVolume(
"UTCM",
"BOX ", idtmed[2], parBox, kNparBox);
2291 parBox[0] = 5.0 / 2.0;
2292 parBox[1] = 5.0 / 2.0;
2293 parBox[2] = 70.0 / 2.0;
2294 createVolume(
"UTCA",
"BOX ", idtmed[8], parBox, kNparBox);
2295 parBox[0] = 5.0 / 2.0 - 0.3;
2296 parBox[1] = 5.0 / 2.0 - 0.3;
2297 parBox[2] = 70.0 / 2.0 - 0.3;
2298 createVolume(
"UTCW",
"BOX ", idtmed[14], parBox, kNparBox);
2302 TVirtualMC::GetMC()->Gspos(
"UTCW", 1,
"UTCA", xpos, ypos, zpos, 0,
"ONLY");
2304 ypos = 5.0 / 2.0 - 23.0 / 2.0;
2306 TVirtualMC::GetMC()->Gspos(
"UTCA", 1,
"UTCM", xpos, ypos, zpos, 0,
"ONLY");
2308 parTube[1] = 3.0 / 2.0;
2309 parTube[2] = 18.0 / 2.0;
2310 createVolume(
"UTCO",
"TUBE", idtmed[8], parTube, kNparTube);
2312 parTube[1] = 3.0 / 2.0 - 0.3;
2313 parTube[2] = 18.0 / 2.0;
2314 createVolume(
"UTCL",
"TUBE", idtmed[14], parTube, kNparTube);
2318 TVirtualMC::GetMC()->Gspos(
"UTCL", 1,
"UTCO", xpos, ypos, zpos, 0,
"ONLY");
2321 zpos = -70.0 / 2.0 + 7.0;
2322 TVirtualMC::GetMC()->Gspos(
"UTCO", 1,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2324 TVirtualMC::GetMC()->Gspos(
"UTCO", 2,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2326 TVirtualMC::GetMC()->Gspos(
"UTCO", 3,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2328 TVirtualMC::GetMC()->Gspos(
"UTCO", 4,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2330 TVirtualMC::GetMC()->Gspos(
"UTCO", 5,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2332 TVirtualMC::GetMC()->Gspos(
"UTCO", 6,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2334 TVirtualMC::GetMC()->Gspos(
"UTCO", 7,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2336 TVirtualMC::GetMC()->Gspos(
"UTCO", 8,
"UTCM", xpos, ypos, zpos, matrix[4],
"ONLY");
2339 ypos =
FLENGTH / 2.0 - 23.0 / 2.0;
2341 TVirtualMC::GetMC()->Gspos(
"UTCM", 1,
"UTF1", xpos, ypos, zpos, matrix[0],
"ONLY");
2342 TVirtualMC::GetMC()->Gspos(
"UTCM", 2,
"UTF1", -xpos, ypos, zpos, matrix[1],
"ONLY");
2343 TVirtualMC::GetMC()->Gspos(
"UTCM", 3,
"UTF2", xpos, -ypos, zpos, matrix[5],
"ONLY");
2344 TVirtualMC::GetMC()->Gspos(
"UTCM", 4,
"UTF2", -xpos, -ypos, zpos, matrix[6],
"ONLY");
2347 parBox[0] = 0.5 / 2.0;
2348 parBox[1] = 15.0 / 2.0;
2349 parBox[2] = 7.0 / 2.0;
2350 createVolume(
"UTPC",
"BOX ", idtmed[25], parBox, kNparBox);
2351 for (ilayer = 0; ilayer <
NLAYER - 1; ilayer++) {
2352 xpos =
CWIDTH[ilayer] / 2.0 + kPWRwid / 2.0;
2355 TVirtualMC::GetMC()->Gspos(
"UTPC", ilayer,
"UTF1", xpos, ypos, zpos, matrix[0],
"ONLY");
2356 TVirtualMC::GetMC()->Gspos(
"UTPC", ilayer +
NLAYER,
"UTF1", -xpos, ypos, zpos, matrix[1],
"ONLY");
2358 xpos =
CWIDTH[5] / 2.0 + kPWRhgtA / 2.0 - 2.0;
2361 TVirtualMC::GetMC()->Gspos(
"UTPC", 5,
"UTF1", xpos, ypos, zpos, matrix[3],
"ONLY");
2362 TVirtualMC::GetMC()->Gspos(
"UTPC", 5 +
NLAYER,
"UTF1", -xpos, ypos, zpos, matrix[3],
"ONLY");
2365 parBox[0] = 60.0 / 2.0;
2366 parBox[1] = 10.0 / 2.0;
2367 parBox[2] = 3.0 / 2.0;
2368 createVolume(
"UTPP",
"BOX ", idtmed[1], parBox, kNparBox);
2372 TVirtualMC::GetMC()->Gspos(
"UTPP", 1,
"UTF1", xpos, ypos, zpos, 0,
"ONLY");
2379 parBox[0] = 60.0 / 2.0;
2380 parBox[1] = 10.0 / 2.0;
2381 parBox[2] = 6.0 / 2.0;
2382 createVolume(
"UTE1",
"BOX ", idtmed[8], parBox, kNparBox);
2384 parBox[0] = parBox[0] - 0.5;
2385 parBox[1] = parBox[1] - 0.5;
2386 parBox[2] = parBox[2] - 0.5;
2387 createVolume(
"UTE2",
"BOX ", idtmed[2], parBox, kNparBox);
2391 TVirtualMC::GetMC()->Gspos(
"UTE2", 1,
"UTE1", xpos, ypos, zpos, 0,
"ONLY");
2393 ypos =
SLENGTH / 2.0 - 10.0 / 2.0 - 3.0;
2394 zpos = -
SHEIGHT / 2.0 + 6.0 / 2.0 + 1.0;
2395 TVirtualMC::GetMC()->Gspos(
"UTE1", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
2396 TVirtualMC::GetMC()->Gspos(
"UTE1", 2,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
2397 TVirtualMC::GetMC()->Gspos(
"UTE1", 3,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
2398 TVirtualMC::GetMC()->Gspos(
"UTE1", 4,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
2401 parBox[0] = 50.0 / 2.0;
2402 parBox[1] = 15.0 / 2.0;
2403 parBox[2] = 20.0 / 2.0;
2404 createVolume(
"UTE3",
"BOX ", idtmed[8], parBox, kNparBox);
2406 parBox[0] = parBox[0] - 0.5;
2407 parBox[1] = parBox[1] - 0.5;
2408 parBox[2] = parBox[2] - 0.5;
2409 createVolume(
"UTE4",
"BOX ", idtmed[2], parBox, kNparBox);
2413 TVirtualMC::GetMC()->Gspos(
"UTE4", 1,
"UTE3", xpos, ypos, zpos, 0,
"ONLY");
2415 ypos = -
SLENGTH / 2.0 + 15.0 / 2.0 + 3.0;
2416 zpos = -
SHEIGHT / 2.0 + 20.0 / 2.0 + 1.0;
2417 TVirtualMC::GetMC()->Gspos(
"UTE3", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
2418 TVirtualMC::GetMC()->Gspos(
"UTE3", 2,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
2419 TVirtualMC::GetMC()->Gspos(
"UTE3", 3,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
2420 TVirtualMC::GetMC()->Gspos(
"UTE3", 4,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
2423 parBox[0] = 20.0 / 2.0;
2424 parBox[1] = 7.0 / 2.0;
2425 parBox[2] = 20.0 / 2.0;
2426 createVolume(
"UTE5",
"BOX ", idtmed[8], parBox, kNparBox);
2428 parBox[0] = parBox[0] - 0.5;
2429 parBox[1] = parBox[1] - 0.5;
2430 parBox[2] = parBox[2] - 0.5;
2431 createVolume(
"UTE6",
"BOX ", idtmed[2], parBox, kNparBox);
2435 TVirtualMC::GetMC()->Gspos(
"UTE6", 1,
"UTE5", xpos, ypos, zpos, 0,
"ONLY");
2437 ypos = -
SLENGTH / 2.0 + 7.0 / 2.0 + 3.0;
2439 TVirtualMC::GetMC()->Gspos(
"UTE5", 1,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
2440 TVirtualMC::GetMC()->Gspos(
"UTE5", 2,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
2441 TVirtualMC::GetMC()->Gspos(
"UTE5", 3,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
2442 TVirtualMC::GetMC()->Gspos(
"UTE5", 4,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
2444 TVirtualMC::GetMC()->Gspos(
"UTE5", 5,
"UTI1", xpos, ypos, zpos, 0,
"ONLY");
2445 TVirtualMC::GetMC()->Gspos(
"UTE5", 6,
"UTI2", xpos, ypos, zpos, 0,
"ONLY");
2446 TVirtualMC::GetMC()->Gspos(
"UTE5", 7,
"UTI3", xpos, ypos, zpos, 0,
"ONLY");
2447 TVirtualMC::GetMC()->Gspos(
"UTE5", 8,
"UTI4", xpos, ypos, zpos, 0,
"ONLY");
2451void Geometry::assembleChamber(
int ilayer,
int istack)
2458 const int kTag = 100;
2466 int idet = getDetectorSec(ilayer, istack);
2469 snprintf(cTagM, kTag,
"UT%02d", idet);
2470 TGeoVolume*
roc =
new TGeoVolumeAssembly(cTagM);
2477 snprintf(cTagV, kTag,
"UA%02d", idet);
2478 TGeoVolume* rocA = gGeoManager->GetVolume(cTagV);
2479 roc->AddNode(rocA, 1,
new TGeoTranslation(xpos, ypos, zpos));
2485 snprintf(cTagV, kTag,
"UZ%02d", idet);
2486 TGeoVolume* rocZ = gGeoManager->GetVolume(cTagV);
2487 roc->AddNode(rocZ, 1,
new TGeoTranslation(xpos, ypos, zpos));
2488 roc->AddNode(rocZ, 2,
new TGeoTranslation(-xpos, ypos, zpos));
2494 snprintf(cTagV, kTag,
"UP%02d", idet);
2495 TGeoVolume* rocP = gGeoManager->GetVolume(cTagV);
2496 roc->AddNode(rocP, 1,
new TGeoTranslation(xpos, ypos, zpos));
2497 roc->AddNode(rocP, 2,
new TGeoTranslation(-xpos, ypos, zpos));
2504 snprintf(cTagV, kTag,
"UD%02d", idet);
2505 TGeoVolume* rocD = gGeoManager->GetVolume(cTagV);
2506 roc->AddNode(rocD, 1,
new TGeoTranslation(xpos, ypos, zpos));
2513 snprintf(cTagV, kTag,
"UF%02d", idet);
2514 TGeoVolume* rocF = gGeoManager->GetVolume(cTagV);
2515 roc->AddNode(rocF, 1,
new TGeoTranslation(xpos, ypos, zpos));
2521 snprintf(cTagV, kTag,
"UU%02d", idet);
2522 TGeoVolume* rocU = gGeoManager->GetVolume(cTagV);
2523 roc->AddNode(rocU, 1,
new TGeoTranslation(xpos, ypos, zpos));
2529 for (
int ic = 0; ic < istack; ic++) {
2532 ypos -=
CLENGTH[ilayer][istack] / 2.0;
2534 TGeoVolume* sm1 = gGeoManager->GetVolume(
"UTI1");
2535 TGeoVolume* sm2 = gGeoManager->GetVolume(
"UTI2");
2536 TGeoVolume* sm3 = gGeoManager->GetVolume(
"UTI3");
2537 TGeoVolume* sm4 = gGeoManager->GetVolume(
"UTI4");
2538 sm1->AddNode(
roc, 1,
new TGeoTranslation(xpos, ypos, zpos));
2539 sm2->AddNode(
roc, 1,
new TGeoTranslation(xpos, ypos, zpos));
2542 sm3->AddNode(
roc, 1,
new TGeoTranslation(xpos, ypos, zpos));
2544 if (!((ilayer == 4) && (istack == 4))) {
2546 sm4->AddNode(
roc, 1,
new TGeoTranslation(xpos, ypos, zpos));
2565 std::string volPath;
2568 const std::string vpStr{
"ALIC_1/barrel_1/B077_1/BSEGMO"};
2569 const std::string vpApp1{
"_1/BTRD"};
2570 const std::string vpApp2{
"_1"};
2571 const std::string vpApp3a{
"/UTR1_1/UTS1_1/UTI1_1"};
2572 const std::string vpApp3b{
"/UTR2_1/UTS2_1/UTI2_1"};
2573 const std::string vpApp3c{
"/UTR3_1/UTS3_1/UTI3_1"};
2574 const std::string vpApp3d{
"/UTR4_1/UTS4_1/UTI4_1"};
2576 for (
int ilayer = 0; ilayer <
NLAYER; ilayer++) {
2577 for (
int isector = 0; isector <
NSECTOR; isector++) {
2578 for (
int istack = 0; istack <
NSTACK; istack++) {
2579 Int_t lid = getDetector(ilayer, istack, isector);
2588 if ((istack == 4) && (ilayer == 4)) {
2609 if (!gGeoManager->CheckPath(volPath.c_str())) {
2613 TGeoHMatrix rotMatrix;
2614 rotMatrix.RotateX(-90);
2615 rotMatrix.RotateY(-90);
2616 rotMatrix.MultiplyLeft(
m);
2617 const TGeoHMatrix& t2l = rotMatrix.Inverse();
2622 Double_t sectorAngle = 20.0 * (isector % 18) + 10.0;
2623 TGeoHMatrix rotSector;
2624 rotSector.RotateZ(sectorAngle);
2632 const TGeoMatrix& inv = rotSector.Inverse();
2633 rotMatrix.MultiplyLeft(&inv);
2648 LOG(fatal) <<
"Geometry is not loaded";
2651 std::string volPath;
2652 std::string vpStr{
"ALIC_1/barrel_1/B077_1/BSEGMO"};
2653 const std::string vpApp1{
"_1/BTRD"};
2654 const std::string vpApp2{
"_1"};
2655 const std::string vpApp3a{
"/UTR1_1/UTS1_1/UTI1_1"};
2656 const std::string vpApp3b{
"/UTR2_1/UTS2_1/UTI2_1"};
2657 const std::string vpApp3c{
"/UTR3_1/UTS3_1/UTI3_1"};
2658 const std::string vpApp3d{
"/UTR4_1/UTS4_1/UTI4_1"};
2659 std::string symName;
2665 for (
int isector = 0; isector <
NSECTOR; isector++) {
2671 symName = Form(
"TRD/sm%02d", isector);
2672 gGeoManager->SetAlignableEntry(symName.c_str(), volPath.c_str());
2678 for (
int isector = 0; isector <
NSECTOR; isector++) {
2679 if (!getSMstatus(isector)) {
2682 for (
int ilayer = 0; ilayer <
NLAYER; ilayer++) {
2683 for (
int istack = 0; istack <
NSTACK; istack++) {
2684 Int_t lid = getDetector(ilayer, istack, isector);
2685 int idet = getDetectorSec(ilayer, istack);
2695 if ((istack == 4) && (ilayer == 4)) {
2716 volPath += Form(
"/UT%02d_1", idet);
2718 symName = Form(
"TRD/sm%02d/st%d/pl%d", isector, istack, ilayer);
2721 TGeoPNEntry* alignableEntry = gGeoManager->SetAlignableEntry(symName.c_str(), volPath.c_str(), modID);
2724 if (alignableEntry) {
2725 TGeoHMatrix* globMatrix = alignableEntry->GetGlobalOrig();
2726 Double_t sectorAngle = 20.0 * (isector % 18) + 10.0;
2727 TGeoHMatrix* t2lMatrix =
new TGeoHMatrix();
2728 t2lMatrix->RotateZ(sectorAngle);
2729 const TGeoHMatrix& globmatrixi = globMatrix->Inverse();
2730 t2lMatrix->MultiplyLeft(&globmatrixi);
2731 alignableEntry->SetMatrix(t2lMatrix);
2733 LOG(error) <<
"Alignable entry is not valid: ModID:" << modID <<
" Sector:" << isector <<
" Lr:" << ilayer
2734 <<
" Stack: " << istack <<
" name: " << symName.c_str() <<
" vol: " << volPath.c_str();
2746 LOG(error) <<
"Geometry is not loaded yet";
2751 LOG(warning) <<
"Already built";
General auxilliary methods.
Definition of the GeometryManager class.
static int getSensID(o2::detectors::DetID detid, int sensid)
static TGeoHMatrix * getMatrix(const char *symname)
Static class with identifiers, bitmasks and names for ALICE detectors.
void setMatrixT2L(const Mat3D &matrix, int sensID)
o2::math_utils::Rotation2Df_t Rot2D
void setSize(int s)=delete
void setMatrixT2GRot(const Rot2D &matrix, int sensID)
o2::math_utils::Transform3D Mat3D
void setMatrixL2G(const Mat3D &matrix, int sensID)
void setMatrixT2G(const Mat3D &matrix, int sensID)
bool isMatrixAvailable(int sensID) const
static constexpr float PGLTHICK
Thickness of the glue layer.
static constexpr float PRBTHICK
Thickness of the PCB copper layers.
static constexpr float AMZPOS
Position of the amplification region.
static constexpr float PELTHICK
Thickness of all other electronics components (caps, etc.)
static constexpr float DRZPOS
Position of the drift region.
static constexpr float AMTHICK
Thickness of the amplification region.
static constexpr float CALHMOD
Height of additional aluminum ledge on lower frame.
static constexpr float CWSW
Width of additional wacosit ledge on lower frame.
static constexpr float CWIDTH[constants::NLAYER]
static constexpr float PPDTHICK
Thickness of copper of the pad plane.
static constexpr float CAUT
Al frame of back panel.
static constexpr float DRTHICK
Thickness of the drift region.
static constexpr float CGLT
Thichness of the glue around the radiator.
static constexpr float CSVH
Height of the services on top of the chambers.
static constexpr float RRHTHICK
Thickness of the rohacell layers in the radiator.
static constexpr float CWSH
Height of additional wacosit ledge on lower frame.
static constexpr float CLENGTH[constants::NLAYER][constants::NSTACK]
static constexpr float CHSV
Total height of the chambers (with services)
static constexpr float SWIDTH1
Lower width of the supermodule.
static constexpr float RFBTHICK
Thickness of the fiber layers in the radiator.
static constexpr float SLENGTH
Length of the supermodule.
static constexpr float WRTHICK
Thickness of the wire planes.
static constexpr float PHCTHICK
Thickness of the honeycomb support structure.
static constexpr float CROW
Additional width of the readout chamber frames.
static constexpr float CCLFT
Thickness of the lower Wacosit frame front.
static constexpr float CROH
Height of the readout of the chambers.
static constexpr float PCBTHICK
Thickness of the carbon layers.
static constexpr float CALZPOS
Position of the additional aluminum ledges.
static constexpr float RCBTHICK
Thickness of the carbon layers in the radiator.
static constexpr float CCLST
Thickness of the lower Wacosit frame sides.
static constexpr float WRZPOSB
Position of the wire planes.
static constexpr float RGLTHICK
Thickness of the glue layers in the radiator.
static constexpr float VROCSM
Radial distance of the first ROC to the outer plates of the SM.
PadPlane mPadPlanes[constants::NLAYER *constants::NSTACK]
static constexpr float FLENGTH
static constexpr float CRAH
Height of the radiator part of the chambers.
static constexpr float PPPTHICK
Thickness of PCB board of the pad plane.
static constexpr float CALH
Height of additional aluminum ledge on lower frame.
static constexpr float VSPACE
Vertical spacing of the chambers.
static constexpr float SHEIGHT
Height of the supermodule.
static constexpr float CDRH
Height of the drift region of the chambers.
static constexpr float CCUTB
Thickness of the upper Wacosit frame around amp. region.
static constexpr float SMPLTT
Thickness of the super module side plates.
static constexpr float HSPACE
Horizontal spacing of the chambers.
static constexpr float CH
Total height of the chambers (w/o services)
static constexpr float CALWMOD
Width of additional aluminum ledge on lower frame.
static constexpr float RMYTHICK
Thickness of the mylar layers in the radiator.
static constexpr float SWIDTH2
Upper width of the supermodule.
static constexpr float CPADW
static constexpr float PPCTHICK
Thickness of the PCB readout boards.
static constexpr float RPADW
>Difference of outer chamber width and pad plane width
static constexpr float WRZPOSA
Position of the wire planes.
static constexpr float CAMH
Height of the amplification region of the chambers.
static constexpr float CCUTA
Upper Wacosit frame around amplification region.
static constexpr float CALT
Thicknesses of different parts of the chamber frame Lower aluminum frame.
bool rotateBack(int det, const float *const loc, float *glb) const
void createPadPlaneArray()
void addAlignableVolumes() const
bool createClusterMatrixArray()
void fillMatrixCache(int mask) override
void createGeometry(std::vector< int > const &idtmed)
bool chamberInGeometry(int det) const
GLuint const GLchar * name
std::string detectors(const std::vector< std::string > &det, unsigned mask)
constexpr int NLAYER
the number of layers
constexpr int NSECTOR
the number of sectors
constexpr int NSTACK
the number of stacks per sector
constexpr int MAXCHAMBER
the maximum number of installed chambers
constexpr int NCHAMBER
the number of chambers actually installed
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string to_string(gsl::span< T, Size > span)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)