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