623 {
626 TGeoVolumeAssembly *tMagVol = new TGeoVolumeAssembly(nm);
627
628 bool isVert = 1;
629 bool isLongOutCover = 1;
630
631 double dzMagnetPart = 238.1*
cm ;
632 double thiknes = 12*
mm;
634 double yPos=0;
636
637
640 double dz=dzMagnetPart;
641 TGeoVolume* InnerMagWall_Y = gGeoManager->MakeBox(
"InnerMagWall_Y",
supportMedIn, dx, dy, dz);
642 InnerMagWall_Y->SetLineColor(15);
643 tMagVol->AddNode(InnerMagWall_Y, 1 , new TGeoCombiTrans(255*cm,0,0,new TGeoRotation("r",0,0,0)));
644 tMagVol->AddNode(InnerMagWall_Y, 2 , new TGeoCombiTrans(-255*cm,0,0,new TGeoRotation("r",0,0,0)));
645
648 dz=dzMagnetPart;
649 TGeoVolume* InnerMagWall_X = gGeoManager->MakeBox(
"InnerMagWall_X",
supportMedIn, dx, dy, dz);
650 InnerMagWall_X->SetLineColor(15);
651 tMagVol->AddNode(InnerMagWall_X, 1 , new TGeoCombiTrans(0,505*cm,0,new TGeoRotation("r",0,0,0)));
652 tMagVol->AddNode(InnerMagWall_X, 2 , new TGeoCombiTrans(0,-505*cm,0,new TGeoRotation("r",0,0,0)));
653
654
655
657 yPos=602.4*
cm-(602.4-500.4)*cm/2;
658 zPos=dzMagnetPart+thiknes/2;
659
660 dx=(358.2-250.4)*cm/2;
662 dz=thiknes/2;
663 TGeoVolume* VertMagCover_Y = gGeoManager->MakeBox(
"VertMagCover_Y",
supportMedIn, dx, dy, dz);
665 dy=(602.4-500.4)*cm/2;
666 TGeoVolume* VertMagCover_X = gGeoManager->MakeBox(
"VertMagCover_X",
supportMedIn, dx, dy, dz);
667 VertMagCover_Y->SetLineColor(15);
668 VertMagCover_X->SetLineColor(15);
669
670 if(isVert)tMagVol->AddNode(VertMagCover_Y, 1 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
671 if(isVert)tMagVol->AddNode(VertMagCover_Y, 2 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
672 if(isVert)tMagVol->AddNode(VertMagCover_Y, 3 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
673 if(isVert)tMagVol->AddNode(VertMagCover_Y, 4 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
674
675 if(isVert)tMagVol->AddNode(VertMagCover_X, 1 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
676 if(isVert)tMagVol->AddNode(VertMagCover_X, 2 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
677 if(isVert)tMagVol->AddNode(VertMagCover_X, 3 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
678 if(isVert)tMagVol->AddNode(VertMagCover_X, 4 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
679
680
681 double dxOoutCover=thiknes/2;
682 double dyOoutCover=604.4*
cm;
683 double dzOoutCover=56.0*
cm/2;
684 double xPosOutetCover =
xPos-(358.2-250.4)*cm/2;
685 double yPosOutetCover = 602.4*
cm;
686 double zPosOutetCover =
zPos-dzOoutCover-thiknes/2;
687
688 TGeoVolume* LongOutCover_Y1 = gGeoManager->MakeBox(
"LongOutCover_Y1",
supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
689 dxOoutCover=fabs(xPosOutetCover)-thiknes;
690 dyOoutCover=thiknes/2;
691 TGeoVolume* LongOutCover_X1 = gGeoManager->MakeBox(
"LongOutCover_X1",
supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
692
693 LongOutCover_Y1->SetLineColor(15);
694 LongOutCover_X1->SetLineColor(15);
695
696 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 1 , new TGeoCombiTrans(xPosOutetCover,0,zPosOutetCover,new TGeoRotation("r",0,0,0)));
697 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 2 , new TGeoCombiTrans(-xPosOutetCover,0,zPosOutetCover,new TGeoRotation("r",0,0,0)));
698 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 3 , new TGeoCombiTrans(xPosOutetCover,0,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
699 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 4 , new TGeoCombiTrans(-xPosOutetCover,0,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
700
701
702 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 1 , new TGeoCombiTrans(0,yPosOutetCover,zPosOutetCover,new TGeoRotation("r",0,0,0)));
703 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 2 , new TGeoCombiTrans(0,-yPosOutetCover,zPosOutetCover,new TGeoRotation("r",0,0,0)));
704 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 3 , new TGeoCombiTrans(0,yPosOutetCover,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
705 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 4 , new TGeoCombiTrans(0,-yPosOutetCover,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
706
707
709 if(isVert)tMagVol->AddNode(VertMagCover_Y, 5 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
710 if(isVert)tMagVol->AddNode(VertMagCover_Y, 6 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
711 if(isVert)tMagVol->AddNode(VertMagCover_Y, 7 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
712 if(isVert)tMagVol->AddNode(VertMagCover_Y, 8 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
713
714 if(isVert)tMagVol->AddNode(VertMagCover_X, 5 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
715 if(isVert)tMagVol->AddNode(VertMagCover_X, 6 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
716 if(isVert)tMagVol->AddNode(VertMagCover_X, 7 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
717 if(isVert)tMagVol->AddNode(VertMagCover_X, 8 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
718
720 if(isVert)tMagVol->AddNode(VertMagCover_Y, 9 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
721 if(isVert)tMagVol->AddNode(VertMagCover_Y, 10 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
722 if(isVert)tMagVol->AddNode(VertMagCover_Y, 11 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
723 if(isVert)tMagVol->AddNode(VertMagCover_Y, 12 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
724
725 if(isVert)tMagVol->AddNode(VertMagCover_X, 9 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
726 if(isVert)tMagVol->AddNode(VertMagCover_X, 10 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
727 if(isVert)tMagVol->AddNode(VertMagCover_X, 11 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
728 if(isVert)tMagVol->AddNode(VertMagCover_X, 12 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
729
730
732 if(isVert)tMagVol->AddNode(VertMagCover_Y, 10 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
733 if(isVert)tMagVol->AddNode(VertMagCover_Y, 11 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
734 if(isVert)tMagVol->AddNode(VertMagCover_Y, 12 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
735 if(isVert)tMagVol->AddNode(VertMagCover_Y, 13 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
736
737 if(isVert)tMagVol->AddNode(VertMagCover_X, 10 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
738 if(isVert)tMagVol->AddNode(VertMagCover_X, 11 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
739 if(isVert)tMagVol->AddNode(VertMagCover_X, 12 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
740 if(isVert)tMagVol->AddNode(VertMagCover_X, 13 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
741
743 if(isVert)tMagVol->AddNode(VertMagCover_X, 14 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
744 if(isVert)tMagVol->AddNode(VertMagCover_X, 15 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
745 if(isVert)tMagVol->AddNode(VertMagCover_X, 16 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
746 if(isVert)tMagVol->AddNode(VertMagCover_X, 17 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
747
748 dx=(358.2-250.4)*cm/2-37.0*cm/2;
750 dz=thiknes/2;
752 TGeoVolume* VertMagCover_y = gGeoManager->MakeBox(
"VertMagCover_y",
supportMedIn, dx, dy, dz);
753 VertMagCover_y->SetLineColor(15);
754 if(isVert)tMagVol->AddNode(VertMagCover_y, 1 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
755 if(isVert)tMagVol->AddNode(VertMagCover_y, 2 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
756 if(isVert)tMagVol->AddNode(VertMagCover_y, 3 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
757 if(isVert)tMagVol->AddNode(VertMagCover_y, 4 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
758
759
763 TGeoVolume* LongOutCover_Y2 = gGeoManager->MakeBox(
"LongOutCover_Y2",
supportMedIn, dx, dy, dz);
764 LongOutCover_Y2->SetLineColor(15);
765
766 xPos = xPosOutetCover;
769
770 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 1 , new TGeoTranslation(xPos,yPos,zPos));
771 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 2 , new TGeoTranslation(xPos,yPos,-zPos));
772 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 3 , new TGeoTranslation(-xPos,yPos,zPos));
773 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
774
776 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 5 , new TGeoTranslation(xPos,yPos,zPos));
777 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 6 , new TGeoTranslation(xPos,yPos,-zPos));
778 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 7 , new TGeoTranslation(-xPos,yPos,zPos));
779 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 8 , new TGeoTranslation(-xPos,yPos,-zPos));
780
781 xPos = xPosOutetCover;
783 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 9 , new TGeoTranslation(xPos,yPos,zPos));
784 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 10 , new TGeoTranslation(xPos,yPos,-zPos));
785 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 11 , new TGeoTranslation(-xPos,yPos,zPos));
786 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 12 , new TGeoTranslation(-xPos,yPos,-zPos));
787
789 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 13 , new TGeoTranslation(xPos,yPos,zPos));
790 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 14 , new TGeoTranslation(xPos,yPos,-zPos));
791 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 16 , new TGeoTranslation(-xPos,yPos,zPos));
792 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 17 , new TGeoTranslation(-xPos,yPos,-zPos));
793
794
796 TGeoVolume* LongOutCover_Y3 = gGeoManager->MakeBox(
"LongOutCover_Y3",
supportMedIn, dx, dy, dz);
797 LongOutCover_Y3->SetLineColor(15);
798 xPos = xPosOutetCover;
800
801 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 1 , new TGeoTranslation(xPos,yPos,zPos));
802 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 2 , new TGeoTranslation(xPos,yPos,-zPos));
803 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 3 , new TGeoTranslation(-xPos,yPos,zPos));
804 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
805
806
807 dy-=(358.2-250.4)*cm;
808 TGeoVolume* LongOutCover_Y4 = gGeoManager->MakeBox(
"LongOutCover_Y4",
supportMedIn, dx, dy, dz);
809 LongOutCover_Y4->SetLineColor(2);
810
812 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 1 , new TGeoTranslation(xPos,yPos,zPos));
813 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 2 , new TGeoTranslation(xPos,yPos,-zPos));
814 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 3 , new TGeoTranslation(-xPos,yPos,zPos));
815 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
816
817
818
819
820
821
822
823
824
825
826
827 return tMagVol;
828
829
830}