ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
south_gate.C
Go to the documentation of this file.
1 #include "TGeoManager.h"
2 
3 void south_gate()
4 {
5  // Drawing a famous Korean gate, the South gate, called Namdeamoon in Korean, using ROOT geometry class.
6  // Name: south_gate.C
7  // Author: Lan Hee Yang(yangd5d5@hotmail.com), Dept. of Physics, Univ. of Seoul
8  // Reviewed by Sunman Kim (sunman98@hanmail.net)
9  // Supervisor: Prof. Inkyu Park (icpark@physics.uos.ac.kr)
10  //
11  // How to run: .x south_gate.C in ROOT terminal, then use OpenGL
12  //
13  // This macro was created for the evaluation of Computational Physics course in 2006.
14  // We thank to Prof. Inkyu Park for his special lecture on ROOT and to all of ROOT team
15  //
16 
17  TGeoManager *geom=new TGeoManager("geom","My first 3D geometry");
18 
19 
20  TGeoMaterial *vacuum=new TGeoMaterial("vacuum",0,0,0);//a,z,rho
21  TGeoMaterial *Fe=new TGeoMaterial("Fe",55.845,26,7.87);
22 
23  //Creat media
24 
25  TGeoMedium *Air = new TGeoMedium("Vacuum",0,vacuum);
26  TGeoMedium *Iron = new TGeoMedium("Iron",1,Fe);
27 
28  //Creat volume
29 
30  TGeoVolume *top = geom->MakeBox("top",Air,1000,1000,1000);
31  geom->SetTopVolume(top);
32  geom->SetTopVisible(0);
33  // If you want to see the boundary, please input the number, 1 instead of 0.
34  // Like this, geom->SetTopVisible(1);
35 
36 
37 //base
38 
39 char nBlocks[100];
40 int i=1;
41 int N = 0;
42 int f=0;
43 int di[2]; di[0] = 0; di[1] = 30;
44 TGeoVolume *mBlock;
45 
46 while (f<11){
47 while (i<14){
48  if (i==6 && f<8){
49  i = i+3;
50  }
51 
52  sprintf(nBlocks,"f%d_bg%d",f,N++);
53  mBlock = geom->MakeBox(nBlocks, Iron, 29,149,9);
54  mBlock->SetLineColor(20);
55  if (f<8){
56  if (i<=5 && f<8){
57  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-120-((i-1)*60)-di[f%2],5,5+(20*f)));
58  } else if (i>5 && f<8){
59  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(120+((i-9)*60) +di[f%2],5,5+(20*f)));
60  }
61  } else {
62  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-420+(i*60)-di[f%2],5,5+(20*f)));
63  }
64  i++;
65  if (i>=14 && f>=8 && f%2 == 1){
66  sprintf(nBlocks,"f%d_bg%d",f,N++);
67  mBlock = geom->MakeBox(nBlocks, Iron, 29,149,9);
68  mBlock->SetLineColor(20);
69  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-420+(i*60)-di[f%2],5,5+(20*f)));
70  i++;
71  }
72  if (f%2 ==0){
73  sprintf(nBlocks,"f%d_bg%d",f,N++);
74  mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
75  mBlock->SetLineColor(20);
76  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-405,5,5+(20*f)));
77  sprintf(nBlocks,"f%d_bg%d",f,N++);
78  mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
79  mBlock->SetLineColor(20);
80  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(405,5,5+(20*f)));
81  } else if (f<5){
82  sprintf(nBlocks,"f%d_bg%d",f,N++);
83  mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
84  mBlock->SetLineColor(20);
85  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-105,5,5+(20*f)));
86  sprintf(nBlocks,"f%d_bg%d",f,N++);
87  mBlock = geom->MakeBox(nBlocks, Iron, 14.5,149,9);
88  mBlock->SetLineColor(20);
89  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(105,5,5+(20*f)));
90 
91  }
92 }
93  sprintf(nBlocks,"f%d_bg%d",8,N++);
94  mBlock = geom->MakeBox(nBlocks, Iron, 40,149,9);
95  mBlock->SetLineColor(20);
96  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-80,5,145));
97  sprintf(nBlocks,"f%d_bg%d",8,N++);
98  mBlock = geom->MakeBox(nBlocks, Iron, 40,149,9);
99  mBlock->SetLineColor(20);
100  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(80,5,145));
101 
102  sprintf(nBlocks,"f%d_bg%d",7,N++);
103  mBlock = geom->MakeBox(nBlocks, Iron, 15,149,9);
104  mBlock->SetLineColor(20);
105  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-75,5,125));
106  sprintf(nBlocks,"f%d_bg%d",7,N++);
107  mBlock = geom->MakeBox(nBlocks, Iron, 15,149,9);
108  mBlock->SetLineColor(20);
109  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(75,5,125));
110 
111  sprintf(nBlocks,"f%d_bg%d",6,N++);
112  mBlock = geom->MakeBox(nBlocks, Iron, 24,149,9);
113  mBlock->SetLineColor(20);
114  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-95,5,105));
115  sprintf(nBlocks,"f%d_bg%d",6,N++);
116  mBlock = geom->MakeBox(nBlocks, Iron, 24,149,9);
117  mBlock->SetLineColor(20);
118  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(95,5,105));
119 
120 
121 
122 i=1;f++;
123 
124 }
125 
126 
127 
128 
129 //wall
130 
131 f=0;
132 while (f<5){
133 i=0;
134 while (i<65){
135  sprintf(nBlocks,"f%d_bg%d",f,N++);
136  mBlock = geom->MakeBox(nBlocks, Iron, 5.8,3,3.8);
137  mBlock->SetLineColor(25);
138  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-384+(i*12),137,218+(f*8)));
139 i++;
140 
141 }
142 f++;
143 }
144 
145 
146 
147 f=0;
148 while (f<5){
149 i=0;
150 while (i<65){
151  sprintf(nBlocks,"f%d_bg%d",f,N++);
152  mBlock = geom->MakeBox(nBlocks, Iron, 5.8,3,3.8);
153  mBlock->SetLineColor(25);
154  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-384+(i*12),-137,218+(f*8)));
155 i++;
156 
157 }
158 f++;
159 }
160 
161 
162 
163 
164 
165 f=0;
166 while (f<7){
167 i=0;
168 while (i<22){
169  sprintf(nBlocks,"f%d_bg%d",f,N++);
170  mBlock = geom->MakeBox(nBlocks, Iron, 3,5.8,3.8);
171  mBlock->SetLineColor(25);
172  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-384,-126+(i*12),218+(f*8)));
173 i++;
174 
175 }
176 f++;
177 }
178 
179 
180 
181 f=0;
182 while (f<7){
183 i=0;
184 while (i<22){
185  sprintf(nBlocks,"f%d_bg%d",f,N++);
186  mBlock = geom->MakeBox(nBlocks, Iron, 3,5.8,3.8);
187  mBlock->SetLineColor(25);
188  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(384,-126+(i*12),218+(f*8)));
189 i++;
190 
191 }
192 f++;
193 }
194 
195 
196 // arch
197 
198 
199 int k;
200 k=0; i=0;
201 
202 while (i<5){
203 while(k<10){
204  sprintf(nBlocks,"ab%d",N++);
205  mBlock = geom->MakeTubs(nBlocks,Iron, 70,89,14, (i*36)+0.5, (i+1)*36-0.5);
206  mBlock->SetLineColor(20);
207  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,-130+(k*30),70, new TGeoRotation("r1",0,90,0)));
208  k++;
209 }
210  i++; k=0;
211 }
212 
213  sprintf(nBlocks,"ab%d",N++);
214  mBlock = geom->MakeBox(nBlocks, Iron, 9,149,17);
215  mBlock->SetLineColor(20);
216  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(80,5,14));
217  sprintf(nBlocks,"ab%d",N++);
218  mBlock = geom->MakeBox(nBlocks, Iron, 9,149,18);
219  mBlock->SetLineColor(20);
220  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(80,5,51));
221 
222  sprintf(nBlocks,"ab%d",N++);
223  mBlock = geom->MakeBox(nBlocks, Iron, 9,149,17);
224  mBlock->SetLineColor(20);
225  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-80,5,14));
226  sprintf(nBlocks,"ab%d",N++);
227  mBlock = geom->MakeBox(nBlocks, Iron, 9,149,18);
228  mBlock->SetLineColor(20);
229  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(-80,5,51));
230 
231 
232 
233 
234 
235 //wall's kiwa
236 
237 k=0; i=0;
238 
239 while (i<5){
240 while(k<52){
241  sprintf(nBlocks,"ab%d",N++);
242  mBlock = geom->MakeTubs(nBlocks,Iron, 1,3,7, 0, 180);
243  mBlock->SetLineColor(12);
244  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-382+(k*15),137,255, new TGeoRotation("r1",90,90,0)));
245  k++;
246 }
247  i++; k=0;
248 }
249 
250 
251 
252 
253 
254 k=0; i=0;
255 
256 while (i<5){
257 while(k<52){
258  sprintf(nBlocks,"ab%d",N++);
259  mBlock = geom->MakeTubs(nBlocks,Iron, 2.5,3,7, 0, 180);
260  mBlock->SetLineColor(12);
261  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-382+(k*15),-137,255, new TGeoRotation("r1",90,90,0)));
262  k++;
263 }
264  i++; k=0;
265 }
266 
267 
268 
269 k=0; i=0;
270 
271 while (i<5){
272 while(k<20){
273  sprintf(nBlocks,"ab%d",N++);
274  mBlock = geom->MakeTubs(nBlocks,Iron, 2.5,3,6, 0, 180);
275  mBlock->SetLineColor(12);
276  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-382,-123+(k*13),271, new TGeoRotation("r1",0,90,0)));
277  k++;
278 }
279  i++; k=0;
280 }
281 
282 
283 
284 
285 k=0; i=0;
286 
287 while (i<5){
288 while(k<20){
289  sprintf(nBlocks,"ab%d",N++);
290  mBlock = geom->MakeTubs(nBlocks,Iron, 2.5,3,7, 0, 180);
291  mBlock->SetLineColor(12);
292  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(382,-123+(k*13),271, new TGeoRotation("r1",0,90,0)));
293  k++;
294 }
295  i++; k=0;
296 }
297 
298 
299 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
300 
301 
302 // 1 floor
303 
304 
305 k=0; i=0;
306 
307 while (i<5){
308 while(k<7){
309  sprintf(nBlocks,"ab%d",N++);
310  mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,56, 0, 360);
311  mBlock->SetLineColor(50);
312 
313  if (k<=2){
314 
315  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),80,260, new TGeoRotation("r1",0,0,0)));
316  }else if (k>=4){
317  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),80,260, new TGeoRotation("r1",0,0,0)));
318  }
319 
320 
321 k++;
322 }
323  i++; k=0;
324 }
325 
326 
327 
328 k=0; i=0;
329 
330 while (i<5){
331 while(k<7){
332  sprintf(nBlocks,"ab%d",N++);
333  mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,56, 0, 360);
334  mBlock->SetLineColor(50);
335 
336  if (k<=2){
337 
338  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),-80,260, new TGeoRotation("r1",0,0,0)));
339  }else if (k>=4){
340  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),-80,260, new TGeoRotation("r1",0,0,0)));
341  }
342 
343 
344 k++;
345 }
346  i++; k=0;
347 }
348 
349 // ||=====||======||=====||=====||=====||=====||
350 
351 
352  sprintf(nBlocks,"ab%d",N++);
353  mBlock = geom->MakeBox(nBlocks, Iron, 298,78,8);
354  mBlock->SetLineColor(42);
355  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(0,0,300));
356 
357 
358 
359  sprintf(nBlocks,"ab%d",N++);
360  mBlock = geom->MakeBox(nBlocks, Iron, 298,78,5);
361  mBlock->SetLineColor(42);
362  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(0,0,320));
363 
364 
365 
366 //1
367 k=0; i=0;
368 
369 while (i<5){
370 while(k<6){
371  sprintf(nBlocks,"ab%d",N++);
372  mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
373  mBlock->SetLineColor(8);
374  {
375  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),70,300, new TGeoRotation("r1",0,0,0)));
376 
377  }
378  k++;
379 }
380  i++; k=0;
381 }
382 
383 
384 
385 
386 
387 k=0; i=0;
388 
389 while (i<5){
390 while(k<6){
391  sprintf(nBlocks,"ab%d",N++);
392  mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
393  mBlock->SetLineColor(8);
394  {
395  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),-70,300, new TGeoRotation("r1",0,0,0)));
396 
397  }
398  k++;
399 }
400  i++; k=0;
401 }
402 
403 
404 
405 
406  sprintf(nBlocks,"ab%d",N++);
407  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
408  mBlock->SetLineColor(8);
409  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-290,0,300, new TGeoRotation("r1",90,0,0)));
410 
411 
412 
413  sprintf(nBlocks,"ab%d",N++);
414  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
415  mBlock->SetLineColor(8);
416  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(290,0,300, new TGeoRotation("r1",90,0,0)));
417 
418 
419 
420 
421 
422 
423 //2
424 k=0; i=0;
425 
426 while (i<5){
427 while(k<6){
428  sprintf(nBlocks,"ab%d",N++);
429  mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
430  mBlock->SetLineColor(8);
431  {
432  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),70,320, new TGeoRotation("r1",0,0,0)));
433 
434  }
435  k++;
436 }
437  i++; k=0;
438 }
439 
440 
441 
442 
443 
444 k=0; i=0;
445 
446 while (i<5){
447  while(k<6){
448  sprintf(nBlocks,"ab%d",N++);
449  mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
450  mBlock->SetLineColor(8);
451  {
452  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),-70,320, new TGeoRotation("r1",0,0,0)));
453 
454  }
455  k++;
456  }
457  i++; k=0;
458 }
459 
460 
461 
462  sprintf(nBlocks,"ab%d",N++);
463  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
464  mBlock->SetLineColor(8);
465  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-290,0,320, new TGeoRotation("r1",90,0,0)));
466 
467 
468 
469  sprintf(nBlocks,"ab%d",N++);
470  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
471  mBlock->SetLineColor(8);
472  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(290,0,320, new TGeoRotation("r1",90,0,0)));
473 
474 
475 
476 
477 
478 
479 
480 
481 
482 
483 
484 //___||____||_____||____||____||____||____||
485 
486 
487 k=0; i=0;
488 
489 while (i<5){
490  while(k<19){
491  sprintf(nBlocks,"ab%d",N++);
492  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
493  mBlock->SetLineColor(50);
494  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),78,345, new TGeoRotation("r1",0,0,0)));
495  k++;
496  }
497  i++; k=0;
498 }
499 
500 
501 
502 
503 k=0; i=0;
504 
505 while (i<5){
506  while(k<19){
507  sprintf(nBlocks,"ab%d",N++);
508  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
509  mBlock->SetLineColor(50);
510  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),-78,345, new TGeoRotation("r1",0,0,0)));
511  k++;
512  }
513  i++; k=0;
514 }
515 
516 
517 
518 k=0; i=0;
519 
520 while (i<5){
521  while(k<5){
522  sprintf(nBlocks,"ab%d",N++);
523  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
524  mBlock->SetLineColor(50);
525  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,-78+(k*33),345, new TGeoRotation("r1",0,0,0)));
526  k++;
527  }
528  i++; k=0;
529 }
530 
531 
532 
533 
534 
535 k=0; i=0;
536 
537 while (i<5){
538  while(k<5){
539  sprintf(nBlocks,"ab%d",N++);
540  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
541  mBlock->SetLineColor(50);
542  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,-78+(k*33),345, new TGeoRotation("r1",0,0,0)));
543  k++;
544  }
545  i++; k=0;
546 }
547 
548 // ||// ||// ||// ||//
549 
550 
551 
552 k=0; i=0;
553 
554 while (i<5){
555  while(k<19){
556  sprintf(nBlocks,"ab%d",N++);
557  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
558  mBlock->SetLineColor(50);
559  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),90,342, new TGeoRotation("r1",0,-45,0)));
560  k++;
561  }
562  i++; k=0;
563 }
564 
565 
566 
567 
568 k=0; i=0;
569 
570 while (i<5){
571  while(k<19){
572  sprintf(nBlocks,"ab%d",N++);
573  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
574  mBlock->SetLineColor(50);
575  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),-90,342, new TGeoRotation("r1",0,45,0)));
576  k++;
577  }
578  i++; k=0;
579 }
580 
581 
582 
583 k=0; i=0;
584 
585 while (i<5){
586  while(k<5){
587  sprintf(nBlocks,"ab%d",N++);
588  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
589  mBlock->SetLineColor(50);
590  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-318,-78+(k*33),345, new TGeoRotation("r1",-90,45,0)));
591  k++;
592  }
593  i++; k=0;
594 }
595 
596 
597 
598 
599 
600 k=0; i=0;
601 
602 while (i<5){
603  while(k<5){
604  sprintf(nBlocks,"ab%d",N++);
605  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
606  mBlock->SetLineColor(50);
607  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(318,-78+(k*33),345, new TGeoRotation("r1",90,45,0)));
608  k++;
609  }
610  i++; k=0;
611 }
612 
613 
614 // /// || / / / / / / / || / / / / / / / / || / / / / / / / / / / /
615 
616 
617 
618  sprintf(nBlocks,"ab%d",N++);
619  mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
620  mBlock->SetLineColor(42);
621  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,-107,362, new TGeoRotation("r1",0,-45,0)));
622 
623 
624 
625 
626  sprintf(nBlocks,"ab%d",N++);
627  mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
628  mBlock->SetLineColor(42);
629  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,107,362, new TGeoRotation("r1",0,45,0)));
630 
631 
632 
633  sprintf(nBlocks,"ab%d",N++);
634  mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
635  mBlock->SetLineColor(42);
636  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(330,0,362, new TGeoRotation("r1",90,-45,0)));
637 
638 
639 
640  sprintf(nBlocks,"ab%d",N++);
641  mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
642  mBlock->SetLineColor(42);
643  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-330,0,362, new TGeoRotation("r1",90,45,0)));
644 
645 
646 
647 
648 /////////////////////// add box
649 
650 
651 
652 
653 k=0; i=0;
654 
655 while (i<5){
656  while(k<6){
657  sprintf(nBlocks,"ab%d",N++);
658  mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
659  mBlock->SetLineColor(8);
660  {
661  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-270+(k*100),-108,362, new TGeoRotation("r1",0,-45,0)));
662 
663  }
664  k++;
665  }
666  i++; k=0;
667 }
668 
669 
670 
671 
672 k=0; i=0;
673 
674 while (i<5){
675  while(k<6){
676  sprintf(nBlocks,"ab%d",N++);
677  mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
678  mBlock->SetLineColor(8);
679  {
680  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-270+(k*100),108,362, new TGeoRotation("r1",0,45,0)));
681 
682  }
683  k++;
684  }
685  i++; k=0;
686 }
687 
688 
689  sprintf(nBlocks,"ab%d",N++);
690  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
691  mBlock->SetLineColor(8);
692  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(331,0,362, new TGeoRotation("r1",90,-45,0)));
693 
694 
695 
696  sprintf(nBlocks,"ab%d",N++);
697  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
698  mBlock->SetLineColor(8);
699  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-331,0,362, new TGeoRotation("r1",90,45,0)));
700 
701 
702 
703 
704 
705 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
706 
707 // 2nd floor
708 
709 
710 k=0; i=0;
711 
712 while (i<5){
713  while(k<7){
714  sprintf(nBlocks,"ab%d",N++);
715  mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,30, 0, 360);
716  mBlock->SetLineColor(50);
717 
718  if (k<=2){
719 
720  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),80,465, new TGeoRotation("r1",0,0,0)));
721  }else if (k>=4){
722  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),80,465, new TGeoRotation("r1",0,0,0)));
723  }
724 
725 
726  k++;
727  }
728  i++; k=0;
729 }
730 
731 
732 
733 k=0; i=0;
734 
735 while (i<5){
736  while(k<7){
737  sprintf(nBlocks,"ab%d",N++);
738  mBlock = geom->MakeTubs(nBlocks,Iron, 0,5,30, 0, 360);
739  mBlock->SetLineColor(50);
740 
741  if (k<=2){
742 
743  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),-80,465, new TGeoRotation("r1",0,0,0)));
744  }else if (k>=4){
745  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*100),-80,465, new TGeoRotation("r1",0,0,0)));
746  }
747 
748 
749  k++;
750  }
751  i++; k=0;
752 }
753 
754 
755 
756 
757 // ||=====||======||=====||=====||=====||=====||
758 
759 
760  sprintf(nBlocks,"ab%d",N++);
761  mBlock = geom->MakeBox(nBlocks, Iron, 302,80,8);
762  mBlock->SetLineColor(42);
763  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(0,0,480));
764 
765 
766 
767  sprintf(nBlocks,"ab%d",N++);
768  mBlock = geom->MakeBox(nBlocks, Iron, 302,80,5);
769  mBlock->SetLineColor(42);
770  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(0,0,500));
771 
772 
773  sprintf(nBlocks,"ab%d",N++);
774  mBlock = geom->MakeBox(nBlocks, Iron, 305,80,2.5);
775  mBlock->SetLineColor(50);
776  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(0,0,465));
777 
778 
779 ///////////////////////add box
780 
781 
782 
783 
784 
785 
786 //1
787 k=0; i=0;
788 
789 while (i<5){
790  while(k<6){
791  sprintf(nBlocks,"ab%d",N++);
792  mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
793  mBlock->SetLineColor(8);
794  {
795  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),71,480, new TGeoRotation("r1",0,0,0)));
796 
797  }
798  k++;
799  }
800  i++; k=0;
801 }
802 
803 
804 
805 
806 
807 k=0; i=0;
808 
809 while (i<5){
810  while(k<6){
811  sprintf(nBlocks,"ab%d",N++);
812  mBlock = geom->MakeBox(nBlocks,Iron,18,10,8);
813  mBlock->SetLineColor(8);
814  {
815  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),-71,480, new TGeoRotation("r1",0,0,0)));
816 
817  }
818  k++;
819  }
820  i++; k=0;
821 }
822 
823 
824 
825 
826  sprintf(nBlocks,"ab%d",N++);
827  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
828  mBlock->SetLineColor(8);
829  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-293,0,480, new TGeoRotation("r1",90,0,0)));
830 
831 
832 
833  sprintf(nBlocks,"ab%d",N++);
834  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,8);
835  mBlock->SetLineColor(8);
836  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(293,0,480, new TGeoRotation("r1",90,0,0)));
837 
838 
839 
840 
841 
842 
843 //2
844 k=0; i=0;
845 
846 while (i<5){
847  while(k<6){
848  sprintf(nBlocks,"ab%d",N++);
849  mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
850  mBlock->SetLineColor(8);
851  {
852  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),71,500, new TGeoRotation("r1",0,0,0)));
853 
854  }
855  k++;
856  }
857  i++; k=0;
858 }
859 
860 
861 
862 
863 
864 k=0; i=0;
865 
866 while (i<5){
867  while(k<6){
868  sprintf(nBlocks,"ab%d",N++);
869  mBlock = geom->MakeBox(nBlocks,Iron,18,10,5);
870  mBlock->SetLineColor(8);
871  {
872  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-250+(k*100),-71,500, new TGeoRotation("r1",0,0,0)));
873 
874  }
875  k++;
876  }
877  i++; k=0;
878 }
879 
880 
881 
882  sprintf(nBlocks,"ab%d",N++);
883  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
884  mBlock->SetLineColor(8);
885  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-293,0,500, new TGeoRotation("r1",90,0,0)));
886 
887 
888 
889  sprintf(nBlocks,"ab%d",N++);
890  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,5);
891  mBlock->SetLineColor(8);
892  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(293,0,500, new TGeoRotation("r1",90,0,0)));
893 
894 
895 
896 
897 
898 
899 
900 
901 
902 
903 
904 // 1 ___||____||_____||____||____||____||____||
905 
906 
907 k=0; i=0;
908 
909 while (i<5){
910  while(k<25){
911  sprintf(nBlocks,"ab%d",N++);
912  mBlock = geom->MakeBox(nBlocks,Iron, 1.5,5,15);
913  mBlock->SetLineColor(50);
914  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*25),78,450, new TGeoRotation("r1",0,0,0)));
915  k++;
916  }
917  i++; k=0;
918 }
919 
920 
921 
922 
923 k=0; i=0;
924 
925 while (i<5){
926  while(k<25){
927  sprintf(nBlocks,"ab%d",N++);
928  mBlock = geom->MakeBox(nBlocks,Iron, 1.5,5,15);
929  mBlock->SetLineColor(50);
930  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*25),-78,450, new TGeoRotation("r1",0,0,0)));
931  k++;
932  }
933  i++; k=0;
934 }
935 
936 
937 
938 k=0; i=0;
939 
940 while (i<5){
941  while(k<7){
942  sprintf(nBlocks,"ab%d",N++);
943  mBlock = geom->MakeBox(nBlocks,Iron, 5,1.5,15);
944  mBlock->SetLineColor(50);
945  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,-78+(k*25),450, new TGeoRotation("r1",0,0,0)));
946  k++;
947  }
948  i++; k=0;
949 }
950 
951 
952 
953 
954 
955 k=0; i=0;
956 
957 while (i<5){
958  while (k<7){
959  sprintf(nBlocks,"ab%d",N++);
960  mBlock = geom->MakeBox(nBlocks,Iron, 5,1.5,15);
961  mBlock->SetLineColor(50);
962  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,-78+(k*25),450, new TGeoRotation("r1",0,0,0)));
963  k++;
964  }
965  i++; k=0;
966 }
967 
968 
969 
970 
971 // 2 ___||____||_____||____||____||____||____||
972 
973 
974 k=0; i=0;
975 
976 while (i<5){
977 while(k<19){
978  sprintf(nBlocks,"ab%d",N++);
979  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
980  mBlock->SetLineColor(50);
981  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),78,525, new TGeoRotation("r1",0,0,0)));
982  k++;
983 }
984  i++; k=0;
985 }
986 
987 
988 
989 
990 k=0; i=0;
991 
992 while (i<5){
993  while(k<19){
994  sprintf(nBlocks,"ab%d",N++);
995  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
996  mBlock->SetLineColor(50);
997  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),-78,525, new TGeoRotation("r1",0,0,0)));
998  k++;
999  }
1000  i++; k=0;
1001 }
1002 
1003 
1004 
1005 k=0; i=0;
1006 
1007 while (i<5){
1008  while(k<5){
1009  sprintf(nBlocks,"ab%d",N++);
1010  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
1011  mBlock->SetLineColor(50);
1012  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,-78+(k*33),525, new TGeoRotation("r1",0,0,0)));
1013  k++;
1014  }
1015  i++; k=0;
1016 }
1017 
1018 
1019 
1020 
1021 
1022 k=0; i=0;
1023 
1024 while (i<5){
1025  while(k<5){
1026  sprintf(nBlocks,"ab%d",N++);
1027  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
1028  mBlock->SetLineColor(50);
1029  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,-78+(k*33),525, new TGeoRotation("r1",0,0,0)));
1030  k++;
1031  }
1032  i++; k=0;
1033 }
1034 
1035 
1036 
1037 
1038 // ||// ||// ||// ||//
1039 
1040 //down
1041 
1042 k=0; i=0;
1043 
1044 while (i<5){
1045  while(k<19){
1046  sprintf(nBlocks,"ab%d",N++);
1047  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
1048  mBlock->SetLineColor(50);
1049  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),90,522, new TGeoRotation("r1",0,-45,0)));
1050  k++;
1051  }
1052  i++; k=0;
1053 }
1054 
1055 
1056 
1057 
1058 k=0; i=0;
1059 
1060 while (i<5){
1061  while(k<19){
1062  sprintf(nBlocks,"ab%d",N++);
1063  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
1064  mBlock->SetLineColor(50);
1065  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300+(k*33.3),-90,522, new TGeoRotation("r1",0,45,0)));
1066  k++;
1067  }
1068  i++; k=0;
1069 }
1070 
1071 
1072 k=0; i=0;
1073 
1074 while (i<5){
1075  while(k<5){
1076  sprintf(nBlocks,"ab%d",N++);
1077  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
1078  mBlock->SetLineColor(50);
1079  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-318,-78+(k*33.3),525, new TGeoRotation("r1",-90,45,0)));
1080  k++;
1081  }
1082  i++; k=0;
1083 }
1084 
1085 
1086 
1087 
1088 
1089 k=0; i=0;
1090 
1091 while (i<5){
1092  while(k<5){
1093  sprintf(nBlocks,"ab%d",N++);
1094  mBlock = geom->MakeBox(nBlocks,Iron, 5,5,20);
1095  mBlock->SetLineColor(50);
1096  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(318,-78+(k*33.3),525, new TGeoRotation("r1",90,45,0)));
1097  k++;
1098  }
1099  i++; k=0;
1100 }
1101 
1102 
1103 // up
1104 
1105 
1106 k=0; i=0;
1107 
1108 while (i<5){
1109  while(k<50){
1110  sprintf(nBlocks,"ab%d",N++);
1111  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1112  mBlock->SetLineColor(50);
1113  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),115,562, new TGeoRotation("r1",0,-115,0)));
1114  k++;
1115  }
1116  i++; k=0;
1117 }
1118 
1119 
1120 
1121 
1122 k=0; i=0;
1123 
1124 while (i<5){
1125  while(k<50){
1126  sprintf(nBlocks,"ab%d",N++);
1127  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1128  mBlock->SetLineColor(50);
1129  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),-115,562, new TGeoRotation("r1",0,115,0)));
1130  k++;
1131  }
1132  i++; k=0;
1133 }
1134 
1135 
1136 
1137 k=0; i=0;
1138 
1139 while (i<5){
1140  while(k<17){
1141  sprintf(nBlocks,"ab%d",N++);
1142  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1143  mBlock->SetLineColor(50);
1144  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-340,-98+(k*13),565, new TGeoRotation("r1",-90,115,0)));
1145  k++;
1146  }
1147  i++; k=0;
1148 }
1149 
1150 
1151 
1152 
1153 
1154 k=0; i=0;
1155 
1156 while (i<5){
1157  while(k<17){
1158  sprintf(nBlocks,"ab%d",N++);
1159  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1160  mBlock->SetLineColor(50);
1161  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(340,-98+(k*13),565, new TGeoRotation("r1",90,115,0)));
1162  k++;
1163  }
1164  i++; k=0;
1165 }
1166 
1167 
1168 //up2
1169 
1170 
1171 
1172 k=0; i=0;
1173 
1174 while (i<5){
1175  while(k<50){
1176  sprintf(nBlocks,"ab%d",N++);
1177  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1178  mBlock->SetLineColor(50);
1179  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),115,375, new TGeoRotation("r1",0,-115,0)));
1180  k++;
1181  }
1182  i++; k=0;
1183 }
1184 
1185 
1186 
1187 
1188 k=0; i=0;
1189 
1190 while (i<5){
1191  while(k<50){
1192  sprintf(nBlocks,"ab%d",N++);
1193  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1194  mBlock->SetLineColor(50);
1195  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),-115,375, new TGeoRotation("r1",0,115,0)));
1196  k++;
1197  }
1198  i++; k=0;
1199 }
1200 
1201 
1202 
1203 k=0; i=0;
1204 
1205 while (i<5){
1206  while(k<17){
1207  sprintf(nBlocks,"ab%d",N++);
1208  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1209  mBlock->SetLineColor(50);
1210  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-340,-98+(k*13),375, new TGeoRotation("r1",-90,115,0)));
1211  k++;
1212  }
1213  i++; k=0;
1214 }
1215 
1216 
1217 
1218 
1219 
1220 k=0; i=0;
1221 
1222 while (i<5){
1223  while(k<17){
1224  sprintf(nBlocks,"ab%d",N++);
1225  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1226  mBlock->SetLineColor(50);
1227  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(340,-98+(k*13),375, new TGeoRotation("r1",90,115,0)));
1228  k++;
1229  }
1230  i++; k=0;
1231 }
1232 
1233 
1234 //up 3
1235 
1236 k=0; i=0;
1237 
1238 while (i<5){
1239  while(k<50){
1240  sprintf(nBlocks,"ab%d",N++);
1241  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1242  mBlock->SetLineColor(44);
1243  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),115,568, new TGeoRotation("r1",0,-115,0)));
1244  k++;
1245  }
1246  i++; k=0;
1247 }
1248 
1249 
1250 
1251 
1252 k=0; i=0;
1253 
1254 while (i<5){
1255  while(k<50){
1256  sprintf(nBlocks,"ab%d",N++);
1257  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1258  mBlock->SetLineColor(44);
1259  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),-115,568, new TGeoRotation("r1",0,115,0)));
1260  k++;
1261  }
1262  i++; k=0;
1263 }
1264 
1265 
1266 k=0; i=0;
1267 
1268 while (i<5){
1269  while(k<17){
1270  sprintf(nBlocks,"ab%d",N++);
1271  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1272  mBlock->SetLineColor(44);
1273  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-340,-98+(k*13),568, new TGeoRotation("r1",-90,115,0)));
1274  k++;
1275  }
1276  i++; k=0;
1277 }
1278 
1279 
1280 
1281 
1282 
1283 k=0; i=0;
1284 
1285 while (i<5){
1286  while(k<17){
1287  sprintf(nBlocks,"ab%d",N++);
1288  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1289  mBlock->SetLineColor(44);
1290  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(340,-98+(k*13),568, new TGeoRotation("r1",90,115,0)));
1291  k++;
1292  }
1293  i++; k=0;
1294 }
1295 
1296 
1297 
1298 
1299 
1300 //up4
1301 
1302 
1303 k=0; i=0;
1304 
1305 while (i<5){
1306  while(k<50){
1307  sprintf(nBlocks,"ab%d",N++);
1308  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1309  mBlock->SetLineColor(44);
1310  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),115,385, new TGeoRotation("r1",0,-115,0)));
1311  k++;
1312  }
1313  i++; k=0;
1314 }
1315 
1316 
1317 
1318 
1319 k=0; i=0;
1320 
1321 while (i<5){
1322  while(k<50){
1323  sprintf(nBlocks,"ab%d",N++);
1324  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1325  mBlock->SetLineColor(44);
1326  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-320+(k*13),-115,385, new TGeoRotation("r1",0,115,0)));
1327  k++;
1328  }
1329  i++; k=0;
1330 }
1331 
1332 
1333 k=0; i=0;
1334 
1335 while (i<5){
1336  while(k<17){
1337  sprintf(nBlocks,"ab%d",N++);
1338  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1339  mBlock->SetLineColor(44);
1340  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-340,-98+(k*13),385, new TGeoRotation("r1",-90,115,0)));
1341  k++;
1342  }
1343  i++; k=0;
1344 }
1345 
1346 
1347 
1348 
1349 
1350 k=0; i=0;
1351 
1352 while (i<5){
1353  while(k<17){
1354  sprintf(nBlocks,"ab%d",N++);
1355  mBlock = geom->MakeBox(nBlocks,Iron, 2.5,2.5,20);
1356  mBlock->SetLineColor(44);
1357  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(340,-98+(k*13),385, new TGeoRotation("r1",90,115,0)));
1358  k++;
1359  }
1360  i++; k=0;
1361 }
1362 
1363 
1364 // up kiwa
1365  //=========
1366  sprintf(nBlocks,"ab%d",N++);
1367  mBlock = geom->MakeBox(nBlocks,Iron, 270,15,20);
1368  mBlock->SetLineColor(10);
1369  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,0,620, new TGeoRotation("r1",0,0,0)));
1370  //===============//2
1371  sprintf(nBlocks,"ab%d",N++);
1372  mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
1373  mBlock->SetLineColor(10);
1374  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,-50,600, new TGeoRotation("r1",0,20,-40)));
1375 
1376  sprintf(nBlocks,"ab%d",N++);
1377  mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
1378  mBlock->SetLineColor(10);
1379  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,50,600, new TGeoRotation("r1",0,-20,40)));
1380 
1381  sprintf(nBlocks,"ab%d",N++);
1382  mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
1383  mBlock->SetLineColor(10);
1384  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,50,600, new TGeoRotation("r1",0,-20,-40)));
1385 
1386  sprintf(nBlocks,"ab%d",N++);
1387  mBlock = geom->MakeBox(nBlocks,Iron, 75,15,20);
1388  mBlock->SetLineColor(10);
1389  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,-50,600, new TGeoRotation("r1",0,20,40)));
1390 
1391 
1392 
1393 
1394  //===============//1
1395  sprintf(nBlocks,"ab%d",N++);
1396  mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
1397  mBlock->SetLineColor(10);
1398  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,-80,413, new TGeoRotation("r1",0,20,-40)));
1399 
1400  sprintf(nBlocks,"ab%d",N++);
1401  mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
1402  mBlock->SetLineColor(10);
1403  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(300,80,413, new TGeoRotation("r1",0,-20,40)));
1404 
1405  sprintf(nBlocks,"ab%d",N++);
1406  mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
1407  mBlock->SetLineColor(10);
1408  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,80,413, new TGeoRotation("r1",0,-20,-40)));
1409 
1410  sprintf(nBlocks,"ab%d",N++);
1411  mBlock = geom->MakeBox(nBlocks,Iron, 50,15,20);
1412  mBlock->SetLineColor(10);
1413  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-300,-80,413, new TGeoRotation("r1",0,20,40)));
1414 
1415 
1416 
1417 
1418 // _1_
1419 
1420 //front
1421 
1422 k=0; i=0;
1423 while (i<7){
1424  while(k<44){
1425  sprintf(nBlocks,"ab%d",N++);
1426  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1427  mBlock->SetLineColor(13);
1428  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-280+(k*13),70+(i*12.5),425-(i*5), new TGeoRotation("r1",0,60,0)));
1429  k++;
1430  }
1431  i++; k=0;
1432 }
1433 
1434 
1435 
1436 k=0; i=0;
1437 
1438 while (i<7){
1439  while(k<44){
1440  sprintf(nBlocks,"ab%d",N++);
1441  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1442  mBlock->SetLineColor(13);
1443  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-280+(k*13),-70-(i*12.5),425-(i*5), new TGeoRotation("r1",0,120,0)));
1444  k++;
1445  }
1446  i++; k=0;
1447 }
1448 
1449 //_2_
1450 
1451 
1452 
1453 
1454 k=0; i=0;
1455 while (i<11){
1456  while(k<43){
1457  sprintf(nBlocks,"ab%d",N++);
1458  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1459  mBlock->SetLineColor(13);
1460 
1461  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-270+(k*13),15+(i*12.5),620-(i*5), new TGeoRotation("r1",0,60,0)));
1462  k++;
1463  }
1464  i++; k=0;
1465 }
1466 
1467 
1468 
1469 k=0; i=0;
1470 
1471 while (i<11){
1472  while(k<43){
1473  sprintf(nBlocks,"ab%d",N++);
1474  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1475  mBlock->SetLineColor(13);
1476  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-270+(k*13),-15-(i*12.5),620-(i*5), new TGeoRotation("r1",0,120,0)));
1477  k++;
1478  }
1479  i++; k=0;
1480 }
1481 
1482 
1483 
1484 
1485 //////left
1486 k=0; i=0;
1487 
1488 while (i<6){
1489  while(k<11){
1490  sprintf(nBlocks,"ab%d",N++);
1491  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1492  mBlock->SetLineColor(13);
1493  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-335,81.25+(i*12.5),592.5-(i*2), new TGeoRotation("r1",0,60,0)));
1494  k++;
1495  }
1496  i++; k=0;
1497 }
1498 
1499 k=0; i=0;
1500 
1501 while (i<7){
1502  while(k<11){
1503  sprintf(nBlocks,"ab%d",N++);
1504  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1505  mBlock->SetLineColor(13);
1506  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-322,69.75+(i*12.5),595-(i*2), new TGeoRotation("r1",0,60,0)));
1507  k++;
1508  }
1509  i++; k=0;
1510 }
1511 
1512 
1513 k=0; i=0;
1514 
1515 while (i<8){
1516  while(k<11){
1517  sprintf(nBlocks,"ab%d",N++);
1518  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1519  mBlock->SetLineColor(13);
1520  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-309,56.25+(i*12.5),605-(i*4), new TGeoRotation("r1",0,60,0)));
1521  k++;
1522  }
1523  i++; k=0;
1524 }
1525 
1526 k=0; i=0;
1527 
1528 while (i<9){
1529  while(k<11){
1530  sprintf(nBlocks,"ab%d",N++);
1531  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1532  mBlock->SetLineColor(13);
1533  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-296,50+(i*12.5),610-(i*4), new TGeoRotation("r1",0,60,0)));
1534  k++;
1535  }
1536  i++; k=0;
1537 }
1538 
1539 
1540 k=0; i=0;
1541 
1542 while (i<10){
1543  while(k<11){
1544  sprintf(nBlocks,"ab%d",N++);
1545  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1546  mBlock->SetLineColor(13);
1547  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-283,37.5+(i*12.5),615-(i*4), new TGeoRotation("r1",0,60,0)));
1548  k++;
1549  }
1550  i++; k=0;
1551 }
1552 
1553 
1554 
1555 k=0; i=0;
1556 
1557 while (i<6){
1558  while(k<11){
1559  sprintf(nBlocks,"ab%d",N++);
1560  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1561  mBlock->SetLineColor(13);
1562  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-335,-81.25-(i*12.5),592.5-(i*2), new TGeoRotation("r1",0,120,0)));
1563  k++;
1564  }
1565  i++; k=0;
1566 }
1567 
1568 k=0; i=0;
1569 
1570 while (i<7){
1571  while(k<11){
1572  sprintf(nBlocks,"ab%d",N++);
1573  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1574  mBlock->SetLineColor(13);
1575  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-322,-69.75-(i*12.5),595-(i*2), new TGeoRotation("r1",0,120,0)));
1576  k++;
1577  }
1578  i++; k=0;
1579 }
1580 
1581 
1582 k=0; i=0;
1583 
1584 while (i<8){
1585  while(k<11){
1586  sprintf(nBlocks,"ab%d",N++);
1587  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1588  mBlock->SetLineColor(13);
1589  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-309,-56.25-(i*12.5),605-(i*4), new TGeoRotation("r1",0,120,0)));
1590  k++;
1591  }
1592  i++; k=0;
1593 }
1594 
1595 k=0; i=0;
1596 
1597 while (i<9){
1598  while(k<11){
1599  sprintf(nBlocks,"ab%d",N++);
1600  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1601  mBlock->SetLineColor(13);
1602  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-296,-50-(i*12.5),610-(i*4), new TGeoRotation("r1",0,120,0)));
1603  k++;
1604  }
1605  i++; k=0;
1606 }
1607 
1608 
1609 k=0; i=0;
1610 
1611 while (i<10){
1612  while(k<11){
1613  sprintf(nBlocks,"ab%d",N++);
1614  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1615  mBlock->SetLineColor(13);
1616  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-283,-37.5-(i*12.5),615-(i*4), new TGeoRotation("r1",0,120,0)));
1617  k++;
1618  }
1619  i++; k=0;
1620 }
1621 
1622 
1623 
1624 //////////right
1625 
1626 
1627 
1628 k=0; i=0;
1629 
1630 while (i<6){
1631  while(k<11){
1632  sprintf(nBlocks,"ab%d",N++);
1633  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1634  mBlock->SetLineColor(13);
1635  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(335,81.25+(i*12.5),592.5-(i*2), new TGeoRotation("r1",0,60,0)));
1636  k++;
1637  }
1638  i++; k=0;
1639 }
1640 
1641 k=0; i=0;
1642 
1643 while (i<7){
1644  while(k<11){
1645  sprintf(nBlocks,"ab%d",N++);
1646  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1647  mBlock->SetLineColor(13);
1648  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(322,69.75+(i*12.5),595-(i*2), new TGeoRotation("r1",0,60,0)));
1649  k++;
1650  }
1651  i++; k=0;
1652 }
1653 
1654 
1655 k=0; i=0;
1656 
1657 while (i<8){
1658  while(k<11){
1659  sprintf(nBlocks,"ab%d",N++);
1660  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1661  mBlock->SetLineColor(13);
1662  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(309,56.25+(i*12.5),605-(i*4), new TGeoRotation("r1",0,60,0)));
1663  k++;
1664  }
1665  i++; k=0;
1666 }
1667 
1668 k=0; i=0;
1669 
1670 while (i<9){
1671  while(k<11){
1672  sprintf(nBlocks,"ab%d",N++);
1673  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1674  mBlock->SetLineColor(13);
1675  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(296,50+(i*12.5),610-(i*4), new TGeoRotation("r1",0,60,0)));
1676  k++;
1677  }
1678  i++; k=0;
1679 }
1680 
1681 
1682 k=0; i=0;
1683 
1684 while (i<10){
1685  while(k<11){
1686  sprintf(nBlocks,"ab%d",N++);
1687  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1688  mBlock->SetLineColor(13);
1689  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(283,37.5+(i*12.5),615-(i*4), new TGeoRotation("r1",0,60,0)));
1690  k++;
1691  }
1692  i++; k=0;
1693 }
1694 
1695 
1696 //
1697 
1698 
1699 
1700 
1701 
1702 k=0; i=0;
1703 
1704 while (i<6){
1705  while(k<11){
1706  sprintf(nBlocks,"ab%d",N++);
1707  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1708  mBlock->SetLineColor(13);
1709  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(335,-81.25-(i*12.5),592.5-(i*2), new TGeoRotation("r1",0,120,0)));
1710  k++;
1711  }
1712  i++; k=0;
1713 }
1714 
1715 k=0; i=0;
1716 
1717 while (i<7){
1718  while(k<11){
1719  sprintf(nBlocks,"ab%d",N++);
1720  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1721  mBlock->SetLineColor(13);
1722  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(322,-69.75-(i*12.5),595-(i*2), new TGeoRotation("r1",0,120,0)));
1723  k++;
1724  }
1725  i++; k=0;
1726 }
1727 
1728 
1729 k=0; i=0;
1730 
1731 while (i<8){
1732  while(k<11){
1733  sprintf(nBlocks,"ab%d",N++);
1734  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1735  mBlock->SetLineColor(13);
1736  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(309,-56.25-(i*12.5),605-(i*4), new TGeoRotation("r1",0,120,0)));
1737  k++;
1738  }
1739  i++; k=0;
1740 }
1741 
1742 k=0; i=0;
1743 
1744 while (i<9){
1745  while(k<11){
1746  sprintf(nBlocks,"ab%d",N++);
1747  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1748  mBlock->SetLineColor(13);
1749  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(296,-50-(i*12.5),610-(i*4), new TGeoRotation("r1",0,120,0)));
1750  k++;
1751  }
1752  i++; k=0;
1753 }
1754 
1755 
1756 k=0; i=0;
1757 
1758 while (i<10){
1759  while(k<11){
1760  sprintf(nBlocks,"ab%d",N++);
1761  mBlock = geom->MakeTubs(nBlocks,Iron, 3,6,6,10,170);
1762  mBlock->SetLineColor(13);
1763  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(283,-37.5-(i*12.5),615-(i*4), new TGeoRotation("r1",0,120,0)));
1764  k++;
1765  }
1766  i++; k=0;
1767 }
1768 
1769 
1770 // /// || / / / / / / / || / / / / / / / / || / / / / / / / / / / /
1771 
1772 
1773  sprintf(nBlocks,"ab%d",N++);
1774  mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
1775  mBlock->SetLineColor(42);
1776  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,-110,550, new TGeoRotation("r1",0,-45,0)));
1777 
1778 
1779 
1780 
1781  sprintf(nBlocks,"ab%d",N++);
1782  mBlock = geom->MakeBox(nBlocks, Iron, 330,10,2);
1783  mBlock->SetLineColor(42);
1784  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,110,550, new TGeoRotation("r1",0,45,0)));
1785 
1786 
1787 
1788  sprintf(nBlocks,"ab%d",N++);
1789  mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
1790  mBlock->SetLineColor(42);
1791  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(335,0,550, new TGeoRotation("r1",90,-45,0)));
1792 
1793 
1794 
1795  sprintf(nBlocks,"ab%d",N++);
1796  mBlock = geom->MakeBox(nBlocks, Iron, 110,10,2);
1797  mBlock->SetLineColor(42);
1798  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-335,0,550, new TGeoRotation("r1",90,45,0)));
1799 
1800 
1801 
1802 ////////////////////////////////add box
1803 
1804 
1805 
1806 
1807 
1808 k=0; i=0;
1809 
1810 while (i<5){
1811 while(k<6){
1812  sprintf(nBlocks,"ab%d",N++);
1813  mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
1814  mBlock->SetLineColor(8);
1815  {
1816  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-270+(k*100),-111,550, new TGeoRotation("r1",0,-45,0)));
1817 
1818  }
1819  k++;
1820 }
1821  i++; k=0;
1822 }
1823 
1824 
1825 
1826 
1827 k=0; i=0;
1828 
1829 while (i<5){
1830 while(k<6){
1831  sprintf(nBlocks,"ab%d",N++);
1832  mBlock = geom->MakeBox(nBlocks,Iron,18,10,2);
1833  mBlock->SetLineColor(8);
1834  {
1835  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-270+(k*100),111,550, new TGeoRotation("r1",0,45,0)));
1836 
1837  }
1838  k++;
1839 }
1840  i++; k=0;
1841 }
1842 
1843 
1844  sprintf(nBlocks,"ab%d",N++);
1845  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
1846  mBlock->SetLineColor(8);
1847  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(336,0,550, new TGeoRotation("r1",90,-45,0)));
1848 
1849 
1850 
1851  sprintf(nBlocks,"ab%d",N++);
1852  mBlock = geom->MakeBox(nBlocks, Iron, 18,10,2);
1853  mBlock->SetLineColor(8);
1854  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(-336,0,550, new TGeoRotation("r1",90,45,0)));
1855 
1856 
1857 
1858 
1859 // | | | | |
1860 
1861 
1862 
1863  sprintf(nBlocks,"ab%d",N++);
1864  mBlock = geom->MakeBox(nBlocks, Iron, 300,75,40);
1865  mBlock->SetLineColor(45);
1866  top->AddNodeOverlap(mBlock,1,new TGeoCombiTrans(0,0,450, new TGeoRotation("r1",0,0,0)));
1867 
1868 
1869 
1870 //kiwa
1871  sprintf(nBlocks,"ab%d",N++);
1872  mBlock = geom->MakeBox(nBlocks, Iron, 305,80,2.5);
1873  mBlock->SetLineColor(10);
1874  top->AddNodeOverlap(mBlock,1,new TGeoTranslation(0,0,430));
1875 
1876 
1877 
1878 
1879  top->SetVisibility(0);
1880  geom->CloseGeometry();
1881 
1882  top->Draw("ogl");
1883 }
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
virtual void Draw(Option_t *option="")
draw top volume according to option
#define N
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
TFile * f
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 CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
void south_gate()
Definition: south_gate.C:3
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.
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
virtual void SetLineColor(Color_t lcolor)
Set the line color.