ROOT   Reference Guide
Searching...
No Matches
south_gate.C File Reference

## Detailed Description

Drawing a famous Korean gate, the South gate, called Namdeamoon in Korean, using ROOT geometry class.

Reviewed by Sunman Kim (sunma.nosp@m.n98@.nosp@m.hanma.nosp@m.il.n.nosp@m.et) Supervisor: Prof. Inkyu Park (icpar.nosp@m.k@ph.nosp@m.ysics.nosp@m..uos.nosp@m..ac.k.nosp@m.r)

How to run: .x south_gate.C in ROOT terminal, then use OpenGL

This macro was created for the evaluation of Computational Physics course in 2006. We thank to Prof. Inkyu Park for his special lecture on ROOT and to all of ROOT team

#include "TGeoManager.h"
void south_gate()
{
TGeoManager *geom=new TGeoManager("geom","My first 3D geometry");
TGeoMaterial *vacuum=new TGeoMaterial("vacuum",0,0,0);//a,z,rho
TGeoMaterial *Fe=new TGeoMaterial("Fe",55.845,26,7.87);
//Create media
TGeoMedium *Air = new TGeoMedium("Vacuum",0,vacuum);
TGeoMedium *Iron = new TGeoMedium("Iron",1,Fe);
//Create volume
TGeoVolume *top = geom->MakeBox("top",Air,1000,1000,1000);
geom->SetTopVolume(top);
geom->SetTopVisible(0);
// If you want to see the boundary, please input the number, 1 instead of 0.
// Like this, geom->SetTopVisible(1);
//base
char nBlocks[100];
int i=1;
int N = 0;
int f=0;
int di[2]; di[0] = 0; di[1] = 30;
TGeoVolume *mBlock;
while (f<11){
while (i<14){
if (i==6 && f<8){
i = i+3;
}
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 29,149,9);
mBlock->SetLineColor(20);
if (f<8){
if (i<=5 && f<8){
} else if (i>5 && f<8){
}
} else {
}
i++;
if (i>=14 && f>=8 && f%2 == 1){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 29,149,9);
mBlock->SetLineColor(20);
i++;
}
if (f%2 ==0){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
mBlock->SetLineColor(20);
} else if (f<5){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
mBlock->SetLineColor(20);
}
}
sprintf(nBlocks,"f%d_bg%d",8,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 40,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",8,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 40,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",7,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 15,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",7,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 15,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",6,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 24,149,9);
mBlock->SetLineColor(20);
sprintf(nBlocks,"f%d_bg%d",6,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 24,149,9);
mBlock->SetLineColor(20);
i=1;f++;
}
//wall
f=0;
while (f<5){
i=0;
while (i<65){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 5.8,3,3.8);
mBlock->SetLineColor(25);
i++;
}
f++;
}
f=0;
while (f<5){
i=0;
while (i<65){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 5.8,3,3.8);
mBlock->SetLineColor(25);
i++;
}
f++;
}
f=0;
while (f<7){
i=0;
while (i<22){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 3,5.8,3.8);
mBlock->SetLineColor(25);
i++;
}
f++;
}
f=0;
while (f<7){
i=0;
while (i<22){
sprintf(nBlocks,"f%d_bg%d",f,N++);
mBlock = geom->MakeBox(nBlocks, Iron, 3,5.8,3.8);
mBlock->SetLineColor(25);
i++;
}
f++;
}
// arch
int k;
k=0; i=0;
while (i<5){
while(k<10){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 70,89,14, (i*36)+0.5, (i+1)*36-0.5);
mBlock->SetLineColor(20);
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 9,149,17);
mBlock->SetLineColor(20);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 9,149,18);
mBlock->SetLineColor(20);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 9,149,17);
mBlock->SetLineColor(20);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 9,149,18);
mBlock->SetLineColor(20);
//wall's kiwa
k=0; i=0;
while (i<5){
while(k<52){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 1,3,7, 0, 180);
mBlock->SetLineColor(12);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<52){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 2.5,3,7, 0, 180);
mBlock->SetLineColor(12);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<20){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 2.5,3,6, 0, 180);
mBlock->SetLineColor(12);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<20){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 2.5,3,7, 0, 180);
mBlock->SetLineColor(12);
k++;
}
i++; k=0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 1 floor
k=0; i=0;
while (i<5){
while(k<7){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,56, 0, 360);
mBlock->SetLineColor(50);
if (k<=2){
}else if (k>=4){
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<7){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,56, 0, 360);
mBlock->SetLineColor(50);
if (k<=2){
}else if (k>=4){
}
k++;
}
i++; k=0;
}
// ||=====||======||=====||=====||=====||=====||
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 298,78,8);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 298,78,5);
mBlock->SetLineColor(42);
//1
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
mBlock->SetLineColor(8);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
mBlock->SetLineColor(8);
//2
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
mBlock->SetLineColor(8);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
mBlock->SetLineColor(8);
//___||____||_____||____||____||____||____||
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
// ||// ||// ||// ||//
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
// /// || / / / / / / / || / / / / / / / / || / / / / / / / / / / /
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
mBlock->SetLineColor(42);
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
mBlock->SetLineColor(8);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
mBlock->SetLineColor(8);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 2nd floor
k=0; i=0;
while (i<5){
while(k<7){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,30, 0, 360);
mBlock->SetLineColor(50);
if (k<=2){
}else if (k>=4){
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<7){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,30, 0, 360);
mBlock->SetLineColor(50);
if (k<=2){
}else if (k>=4){
}
k++;
}
i++; k=0;
}
// ||=====||======||=====||=====||=====||=====||
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 302,80,8);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 302,80,5);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 305,80,2.5);
mBlock->SetLineColor(50);
//1
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
mBlock->SetLineColor(8);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
mBlock->SetLineColor(8);
//2
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
mBlock->SetLineColor(8);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
mBlock->SetLineColor(8);
// 1 ___||____||_____||____||____||____||____||
k=0; i=0;
while (i<5){
while(k<25){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 1.5,5,15);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<25){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 1.5,5,15);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<7){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,1.5,15);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while (k<7){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,1.5,15);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
// 2 ___||____||_____||____||____||____||____||
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
// ||// ||// ||// ||//
//down
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<19){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<5){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
// up
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
//up2
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(50);
k++;
}
i++; k=0;
}
//up 3
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
//up4
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<50){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<17){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
mBlock->SetLineColor(44);
k++;
}
i++; k=0;
}
// up kiwa
//=========
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 270,15,20);
mBlock->SetLineColor(10);
//===============//2
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
mBlock->SetLineColor(10);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
mBlock->SetLineColor(10);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
mBlock->SetLineColor(10);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
mBlock->SetLineColor(10);
//===============//1
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
mBlock->SetLineColor(10);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
mBlock->SetLineColor(10);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
mBlock->SetLineColor(10);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
mBlock->SetLineColor(10);
// _1_
//front
k=0; i=0;
while (i<7){
while(k<44){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<7){
while(k<44){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
//_2_
k=0; i=0;
while (i<11){
while(k<43){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<11){
while(k<43){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
//////left
k=0; i=0;
while (i<6){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<7){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<8){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<9){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<10){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<6){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<7){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<8){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<9){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<10){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
//////////right
k=0; i=0;
while (i<6){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<7){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<8){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<9){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<10){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
//
k=0; i=0;
while (i<6){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<7){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<8){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<9){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<10){
while(k<11){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
mBlock->SetLineColor(13);
k++;
}
i++; k=0;
}
// /// || / / / / / / / || / / / / / / / / || / / / / / / / / / / /
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
mBlock->SetLineColor(42);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
mBlock->SetLineColor(42);
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
k=0; i=0;
while (i<5){
while(k<6){
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
mBlock->SetLineColor(8);
{
}
k++;
}
i++; k=0;
}
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
mBlock->SetLineColor(8);
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
mBlock->SetLineColor(8);
// | | | | |
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 300,75,40);
mBlock->SetLineColor(45);
//kiwa
sprintf(nBlocks,"ab%d",N++);
mBlock = geom->MakeBox(nBlocks, Iron, 305,80,2.5);
mBlock->SetLineColor(10);
top->SetVisibility(0);
geom->CloseGeometry();
top->Draw("ogl");
}
#define f(i)
Definition RSha256.hxx:104
#define N
Class describing rotation + translation.
Definition TGeoMatrix.h:292
The manager class for any TGeo geometry.
Definition TGeoManager.h:45
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition TGeoMedium.h:24
Class describing rotations.
Definition TGeoMatrix.h:175
Class describing translations.
Definition TGeoMatrix.h:122
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
void SetVisibility(Bool_t vis=kTRUE) override
set visibility of this volume
void Draw(Option_t *option="") override
draw top volume according to option
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
void SetLineColor(Color_t lcolor) override
Set the line color.

Definition in file south_gate.C.