348 TGeoBBox* pbGas =
new TGeoBBox(
"mirror_support_pillar_gas_PB", 4.8, (
fRichHeight / 2.) - 10.5, 4.8);
349 TGeoBBox* pb =
new TGeoBBox(
"mirror_support_pillar_PB", 5., (
fRichHeight / 2.) - 10.5, 5.);
351 TGeoVolume* volGas =
new TGeoVolume(
"mirror_support_pillar_gas", pbGas, medGas);
352 TGeoVolume* vol =
new TGeoVolume(
"mirror_support_pillar", pb, medAl);
355 vol->AddNode(volGas, 1);
357 TGeoVolumeAssembly* StudsHalf =
new TGeoVolumeAssembly(
"Studs_Half");
358 StudsHalf->AddNode(
CreateStuds(16.4, 30.03 / 2., 24.2), 1);
359 StudsHalf->AddNode(
CreateStuds(57.8, 14.86 / 2., 15.9), 2);
360 StudsHalf->AddNode(
CreateStuds(101.05, 5.74 / 2., 7.7), 3);
361 StudsHalf->AddNode(
CreateStuds(145.4, 2.9 / 2., -0.5), 4);
364 vol->AddNode(StudsHalf, 2,
MakeCombiTrans(0, 0., -5, 0, 180, 180));
369 TGeoVolumeAssembly* pillars =
new TGeoVolumeAssembly(
"mirror_support_pillars");
370 pillars->AddNode(vol, 1,
MakeCombiTrans(210.7759 - 2.035, 0., -29.5298 + dZ - 12.4346, 0., 42., 0.));
371 pillars->AddNode(PillarConnection, 1,
MakeCombiTrans(170.7323, 0., -15.9069 + dZ, 0., 33.6, 0.));
372 pillars->AddNode(vol, 2,
MakeCombiTrans(134.1222 - 1.3985, 0., 21.3989 + dZ - 11.2483, 0., 25.2, 0.));
373 pillars->AddNode(PillarConnection, 2,
MakeCombiTrans(89.097, 0., 23.74 + dZ, 0., 16.8, 0.));
374 pillars->AddNode(vol, 3,
MakeCombiTrans(46.015 - 0.545, 0., 48. + dZ - 10.6668, 0., 8.4, 0.));
375 pillars->AddNode(PillarConnection, 3,
MakeCombiTrans(0., 38.75, 37.34 + dZ, 0., 0., 0.));
376 pillars->AddNode(PillarConnection, 4,
MakeCombiTrans(0., -38.75, 37.34 + dZ, 0., 0., 0.));
377 pillars->AddNode(vol, 4,
MakeCombiTrans(-46.015 + 0.545, 0., 48. + dZ - 10.6668, 0., -8.4, 0.));
378 pillars->AddNode(PillarConnection, 5,
MakeCombiTrans(-89.097, 0., 23.74 + dZ, 0., -16.8, 0.));
379 pillars->AddNode(vol, 5,
MakeCombiTrans(-134.1222 + 1.3985, 0., 21.3989 + dZ - 11.2483, 0., -25.2, 0.));
380 pillars->AddNode(PillarConnection, 6,
MakeCombiTrans(-170.7323, 0., -15.9069 + dZ, 0., -33.6, 0.));
381 pillars->AddNode(vol, 6,
MakeCombiTrans(-210.7759 + 2.035, 0., -29.5298 + dZ - 12.4346, 0., -42., 0.));
525 double frameSizeHalf = 5.;
526 double frameSizeHalfGas = 4.3;
534 double lenHalf2 = 23.2919390;
535 double lenHalf3 = 20.;
536 double lenHalf5 = richHeightHalf - Tan(rotX *
pi / 180.0) * lenHalf3 * 2.0;
537 double lenHalf6 = richLengthHalf - lenHalf2 - lenHalf3;
538 double lenHalf8 = (richWidthHalf - 229.3 / 2) / 2;
540 double posY = richHeightHalf - coverThickness - frameSizeHalf;
542 double posY3 = posY - Tan(rotX *
pi / 180.0) * lenHalf3 * 2.0;
543 double posZ1 = -147.779439;
544 double posZ2 = posZ1 + lenHalf2 + 2 * lenHalf3;
545 double posZ3 = posZ1 + 2 * lenHalf2 + 2 * lenHalf3;
547 double posX1 = 134.6;
548 double posX2 = (posX1 + richWidthHalf) / 2;
549 double posX3 = richWidthHalf - frameSizeHalf;
551 TGeoBBox* crossingbox =
552 new TGeoBBox(
"crossing", frameSizeHalf, frameSizeHalf,
555 TGeoVolumeAssembly* mainFrame =
new TGeoVolumeAssembly(
"mainframe");
559 new TGeoBBox(
"mainframe1_gas_PB", richWidthHalf - frameSizeHalf * 2, frameSizeHalfGas, frameSizeHalfGas);
560 TGeoBBox* pb1 =
new TGeoBBox(
"mainframe1_PB", richWidthHalf - frameSizeHalf * 2, frameSizeHalf, frameSizeHalf);
561 TGeoVolume* volGas1 =
new TGeoVolume(
"mainframe1_gas", pbGas1, medGas);
562 TGeoVolume* vol1 =
new TGeoVolume(
"mainframe1", pb1, medAlum);
565 vol1->AddNode(volGas1, 1);
566 mainFrame->AddNode(vol1, 1,
MakeTrans(0, posY2, posZ1));
567 mainFrame->AddNode(vol1, 2,
MakeTrans(0, -posY2, posZ1));
568 mainFrame->AddNode(vol1, 3,
MakeTrans(0., posY, posZ4));
569 mainFrame->AddNode(vol1, 4,
MakeTrans(0., posY, posZ3));
570 mainFrame->AddNode(vol1, 5,
MakeTrans(0., -posY, posZ4));
571 mainFrame->AddNode(vol1, 6,
MakeTrans(0., -posY, posZ3));
574 TGeoBBox* pbGas2 =
new TGeoBBox(
"mainframe2_gas_PB", frameSizeHalfGas, frameSizeHalfGas, lenHalf2 - frameSizeHalf);
575 TGeoBBox* pb2 =
new TGeoBBox(
"mainframe2_PB", frameSizeHalf, frameSizeHalf, lenHalf2 - frameSizeHalf);
576 TGeoVolume* volGas2 =
new TGeoVolume(
"mainframe2_gas", pbGas2, medGas);
577 TGeoVolume* vol2 =
new TGeoVolume(
"mainframe2", pb2, medAlum);
580 vol2->AddNode(volGas2, 1);
581 mainFrame->AddNode(vol2, 1,
MakeTrans(-posX1, posY, posZ2 - frameSizeHalf / 2));
582 mainFrame->AddNode(vol2, 2,
MakeTrans(-posX1, -posY, posZ2 - frameSizeHalf / 2));
583 mainFrame->AddNode(vol2, 3,
MakeTrans(posX1, posY, posZ2 - frameSizeHalf / 2));
584 mainFrame->AddNode(vol2, 4,
MakeTrans(posX1, -posY, posZ2 - frameSizeHalf / 2));
585 mainFrame->AddNode(vol2, 5,
MakeTrans(posX3, posY, posZ2 - frameSizeHalf / 2));
586 mainFrame->AddNode(vol2, 6,
MakeTrans(posX3, -posY, posZ2 - frameSizeHalf / 2));
587 mainFrame->AddNode(vol2, 7,
MakeTrans(-posX3, posY, posZ2 - frameSizeHalf / 2));
588 mainFrame->AddNode(vol2, 8,
MakeTrans(-posX3, -posY, posZ2 - frameSizeHalf / 2));
592 new TGeoTrap(
"mainframe3_gas_PB", frameSizeHalfGas, 0, 0, lenHalf3 - frameSizeHalf - coverThickness, 6.3, 9.3, rotX,
593 lenHalf3 - frameSizeHalf - coverThickness, 6.3, 9.3, rotX);
594 TGeoTrap* pb3 =
new TGeoTrap(
"mainframe3_PB", frameSizeHalf, 0, 0, lenHalf3 - frameSizeHalf, 7, 10, rotX,
595 lenHalf3 - frameSizeHalf, 7, 10, rotX);
596 TGeoVolume* volGas3 =
new TGeoVolume(
"mainframe3_gas", pbGas3, medGas);
597 TGeoVolume* vol3 =
new TGeoVolume(
"mainframe3", pb3, medAlum);
598 TGeoRotation* rotup =
new TGeoRotation();
599 rotup->RotateX(-90 + rotX *
pi / 180);
602 vol3->AddNode(volGas3, 1);
603 mainFrame->AddNode(vol3, 1,
604 new TGeoCombiTrans(*
MakeTrans(-posX3, posY - Tan(rotX *
pi / 180) * lenHalf3 + frameSizeHalf,
605 posZ1 + lenHalf3 + frameSizeHalf / 2),
607 mainFrame->AddNode(vol3, 2,
608 new TGeoCombiTrans(*
MakeTrans(-posX1, posY - Tan(rotX *
pi / 180) * lenHalf3 + frameSizeHalf,
609 posZ1 + lenHalf3 + frameSizeHalf / 2),
611 mainFrame->AddNode(vol3, 3,
612 new TGeoCombiTrans(*
MakeTrans(posX1, posY - Tan(rotX *
pi / 180) * lenHalf3 + frameSizeHalf,
613 posZ1 + lenHalf3 + frameSizeHalf / 2),
615 mainFrame->AddNode(vol3, 4,
616 new TGeoCombiTrans(*
MakeTrans(posX3, posY - Tan(rotX *
pi / 180) * lenHalf3 + frameSizeHalf,
617 posZ1 + lenHalf3 + frameSizeHalf / 2),
619 TGeoRotation* rotdown =
new TGeoRotation();
620 rotdown->RotateX(-90 + rotX *
pi / 180);
621 rotdown->RotateY(90);
622 mainFrame->AddNode(vol3, 5,
623 new TGeoCombiTrans(*
MakeTrans(-posX3, -posY + Tan(rotX *
pi / 180) * lenHalf3 - frameSizeHalf,
624 posZ1 + lenHalf3 + frameSizeHalf / 2),
625 rotdown->Inverse()));
626 mainFrame->AddNode(vol3, 6,
627 new TGeoCombiTrans(*
MakeTrans(-posX1, -posY + Tan(rotX *
pi / 180) * lenHalf3 - frameSizeHalf,
628 posZ1 + lenHalf3 + frameSizeHalf / 2),
629 rotdown->Inverse()));
630 mainFrame->AddNode(vol3, 7,
631 new TGeoCombiTrans(*
MakeTrans(posX1, -posY + Tan(rotX *
pi / 180) * lenHalf3 - frameSizeHalf,
632 posZ1 + lenHalf3 + frameSizeHalf / 2),
633 rotdown->Inverse()));
634 mainFrame->AddNode(vol3, 8,
635 new TGeoCombiTrans(*
MakeTrans(posX3, -posY + Tan(rotX *
pi / 180) * lenHalf3 - frameSizeHalf,
636 posZ1 + lenHalf3 + frameSizeHalf / 2),
637 rotdown->Inverse()));
642 new TGeoBBox(
"mainframe4_gas_PB", frameSizeHalfGas, richHeightHalf - coverThickness, frameSizeHalfGas);
643 TGeoBBox* pb4 =
new TGeoBBox(
"mainframe4_PB", frameSizeHalf, richHeightHalf - coverThickness, frameSizeHalf);
644 TGeoVolume* volGas4 =
new TGeoVolume(
"mainframe4_gas", pbGas4, medGas);
645 TGeoVolume* vol4 =
new TGeoVolume(
"mainframe4", pb4, medAlum);
648 vol4->AddNode(volGas4, 1);
649 mainFrame->AddNode(vol4, 1,
MakeTrans(-posX3, 0., posZ4));
650 mainFrame->AddNode(vol4, 2,
MakeTrans(posX3, 0., posZ4));
651 mainFrame->AddNode(vol4, 3,
MakeTrans(-posX3, 0, posZ3));
652 mainFrame->AddNode(vol4, 4,
MakeTrans(posX3, 0, posZ3));
655 TGeoTrap* pbGas5 =
new TGeoTrap(
"mainframe5_gas_PB", frameSizeHalfGas, 0, 0, frameSizeHalfGas,
656 lenHalf5 - 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf,
657 lenHalf5 + 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf, 0, frameSizeHalfGas,
658 lenHalf5 - 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf,
659 lenHalf5 + 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf, 0);
660 TGeoTrap* pb5 =
new TGeoTrap(
"mainframe5_PB", frameSizeHalf, 0, 0, frameSizeHalf,
661 lenHalf5 - 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf,
662 lenHalf5 + 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf, 0, frameSizeHalf,
663 lenHalf5 - 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf,
664 lenHalf5 + 1 / Tan((90 - rotX) *
pi / 180) * frameSizeHalf, 0);
665 TGeoCompositeShape* sub5_1 =
667 TGeoCompositeShape* sub5 =
669 TGeoVolume* volGas5 =
670 new TGeoVolume(
"mainframe5_gas",
MakeSubtraction(
"mainframe5_gas_PB", pbGas5, sub5,
nullptr,
nullptr), medGas);
672 new TGeoVolume(
"mainframe5",
MakeSubtraction(
"mainframe5_PB", pb5, sub5,
nullptr,
nullptr), medAlum);
673 vol5->AddNode(volGas5, 1);
674 mainFrame->AddNode(vol5, 1,
MakeCombiTrans(-posX1, 0., posZ1, 90, 0, 90));
675 mainFrame->AddNode(vol5, 2,
MakeCombiTrans(posX1, 0., posZ1, 90, 0, 90));
676 mainFrame->AddNode(vol5, 3,
MakeCombiTrans(-posX3, 0., posZ1, 90, 0, 90));
677 mainFrame->AddNode(vol5, 4,
MakeCombiTrans(posX3, 0., posZ1, 90, 0, 90));
680 TGeoBBox* pbGas6 =
new TGeoBBox(
"mainframe6_gas_PB", frameSizeHalfGas, frameSizeHalfGas, lenHalf6 - frameSizeHalf);
681 TGeoBBox* pb6 =
new TGeoBBox(
"mainframe6_PB", frameSizeHalf, frameSizeHalf, lenHalf6 - frameSizeHalf);
682 TGeoVolume* volGas6 =
new TGeoVolume(
"mainframe6_gas", pbGas6, medGas);
683 TGeoVolume* vol6 =
new TGeoVolume(
"mainframe6", pb6, medAlum);
686 vol6->AddNode(volGas6, 1);
687 mainFrame->AddNode(vol6, 1,
MakeTrans(-posX2, posY, posZ4 - lenHalf6));
688 mainFrame->AddNode(vol6, 2,
MakeTrans(-posX2, -posY, posZ4 - lenHalf6));
689 mainFrame->AddNode(vol6, 3,
MakeTrans(posX2, posY, posZ4 - lenHalf6));
690 mainFrame->AddNode(vol6, 4,
MakeTrans(posX2, -posY, posZ4 - lenHalf6));
691 mainFrame->AddNode(vol6, 5,
MakeTrans(-posX1, posY, posZ4 - lenHalf6));
692 mainFrame->AddNode(vol6, 6,
MakeTrans(-posX1, -posY, posZ4 - lenHalf6));
693 mainFrame->AddNode(vol6, 7,
MakeTrans(posX1, posY, posZ4 - lenHalf6));
694 mainFrame->AddNode(vol6, 8,
MakeTrans(posX1, -posY, posZ4 - lenHalf6));
695 mainFrame->AddNode(vol6, 9,
MakeTrans(0., posY, posZ4 - lenHalf6));
696 mainFrame->AddNode(vol6, 10,
MakeTrans(0., -posY, posZ4 - lenHalf6));
697 mainFrame->AddNode(vol6, 11,
MakeTrans(posX3, posY2, posZ4 - lenHalf6));
698 mainFrame->AddNode(vol6, 12,
MakeTrans(posX3, -posY2, posZ4 - lenHalf6));
699 mainFrame->AddNode(vol6, 13,
MakeTrans(-posX3, posY2, posZ4 - lenHalf6));
700 mainFrame->AddNode(vol6, 14,
MakeTrans(-posX3, -posY2, posZ4 - lenHalf6));
701 mainFrame->AddNode(vol6, 15,
MakeTrans(-posX3, posY, posZ4 - lenHalf6));
702 mainFrame->AddNode(vol6, 16,
MakeTrans(-posX3, -posY, posZ4 - lenHalf6));
703 mainFrame->AddNode(vol6, 17,
MakeTrans(posX3, posY, posZ4 - lenHalf6));
704 mainFrame->AddNode(vol6, 18,
MakeTrans(posX3, -posY, posZ4 - lenHalf6));
708 TGeoBBox* pbGas7 =
new TGeoBBox(
"mainframe7_gas_PB", frameSizeHalfGas, frameSizeHalfGas, lenHalf2 + lenHalf3);
709 TGeoBBox* pb7 =
new TGeoBBox(
"mainframe7_PB", frameSizeHalf, frameSizeHalf, lenHalf2 + lenHalf3);
710 TGeoVolume* volGas7 =
new TGeoVolume(
"mainframe7_gas", pbGas7, medGas);
711 TGeoVolume* vol7 =
new TGeoVolume(
"mainframe7", pb7, medAlum);
712 vol7->AddNode(volGas7, 1);
713 mainFrame->AddNode(vol7, 1,
MakeTrans(posX3, posY2, posZ2 - lenHalf3 - frameSizeHalf));
714 mainFrame->AddNode(vol7, 2,
MakeTrans(posX3, -posY2, posZ2 - lenHalf3 - frameSizeHalf));
715 mainFrame->AddNode(vol7, 3,
MakeTrans(-posX3, posY2, posZ2 - lenHalf3 - frameSizeHalf));
716 mainFrame->AddNode(vol7, 4,
MakeTrans(-posX3, -posY2, posZ2 - lenHalf3 - frameSizeHalf));
719 TGeoBBox* pbGas8 =
new TGeoBBox(
"mainframe8_gas_PB", lenHalf8, frameSizeHalfGas, frameSizeHalfGas);
720 TGeoBBox* pb8 =
new TGeoBBox(
"mainframe8_PB", lenHalf8, frameSizeHalf, frameSizeHalf);
721 TGeoVolume* volGas8 =
new TGeoVolume(
"mainframe8_gas", pbGas8, medGas);
722 TGeoVolume* vol8 =
new TGeoVolume(
"mainframe8", pb8, medAlum);
723 vol8->AddNode(volGas8, 1);
724 mainFrame->AddNode(vol8, 1,
MakeTrans(posX3 - lenHalf8 + frameSizeHalf, posY3, posZ1));
725 mainFrame->AddNode(vol8, 2,
MakeTrans(-posX3 + lenHalf8 - frameSizeHalf, posY3, posZ1));
726 mainFrame->AddNode(vol8, 3,
MakeTrans(posX3 - lenHalf8 + frameSizeHalf, -posY3, posZ1));
727 mainFrame->AddNode(vol8, 4,
MakeTrans(-posX3 + lenHalf8 - frameSizeHalf, -posY3, posZ1));