ROOT   Reference Guide
station2.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_geom
3/// Drawing a space station (version 2), 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 station2.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_station2.png width=800px
14/// \macro_code
15///
16/// \author Dong Ryeol Lee (leedr2580@hanmail.net), Dept. of Physics, Univ. of Seoul
17
18#include "TGeoManager.h"
19
20void station2()
21{
22
23
24 TGeoManager *geom = new TGeoManager("geom","Space Station");
25
26 TGeoMaterial *vacuum=new TGeoMaterial("vacuum",0,0,0);
27 TGeoMaterial *Fe=new TGeoMaterial("Fe",55.845,26,7.87);
28 TGeoMaterial *Cu=new TGeoMaterial("Cu",63.549,29,8.92);
29
30 TGeoMedium *Air=new TGeoMedium("Vacuum",0,vacuum);
31 TGeoMedium *Iron=new TGeoMedium("Iron",1,Fe);
32 TGeoMedium *Copper=new TGeoMedium("Copper",2,Cu);
33
34 TGeoVolume *top=geom->MakeBox("top",Air,1000,1000,1000);
35 geom->SetTopVolume(top);
36 geom->SetTopVisible(0);
37 // If you want to see the boundary, please input the number, 1 instead of 0.
38 // Like this, geom->SetTopVisible(1);
39
40
41 TGeoVolume *b1=geom->MakeBox("b1",Iron,1,2,3);
42 b1->SetLineColor(37);
43 b1->SetFillColor(37);
44
45 TGeoVolume *b2=geom->MakeBox("b2",Iron,1,2,3);
46 b2->SetLineColor(37);
47 b2->SetFillColor(37);
48
49 TGeoVolume *b12=geom->MakeBox("b12",Iron,1,2,3);
50 b12->SetLineColor(37);
51 b12->SetFillColor(37);
52
53 TGeoVolume *b22=geom->MakeBox("b22",Iron,1,2,3);
54 b22->SetLineColor(37);
55 b22->SetFillColor(37);
56
57 TGeoVolume *b13=geom->MakeBox("b13",Iron,1,2,3);
58 b13->SetLineColor(37);
59 b13->SetFillColor(37);
60
61 TGeoVolume *b23=geom->MakeBox("b23",Iron,1,2,3);
62 b23->SetLineColor(37);
63 b23->SetFillColor(37);
64
65 TGeoVolume *b14=geom->MakeBox("b14",Iron,1,2,3);
66 b14->SetLineColor(37);
67 b14->SetFillColor(37);
68
69 TGeoVolume *b24=geom->MakeBox("b24",Iron,1,2,3);
70 b24->SetLineColor(37);
71 b24->SetFillColor(37);
72
73 TGeoVolume *b3=geom->MakeBox("b3",Iron,35,1,1);
74 b3->SetLineColor(17);
75 b3->SetFillColor(17);
76
77 TGeoVolume *b4=geom->MakeBox("b4",Iron,35,1,1);
78 b4->SetLineColor(17);
79 b4->SetFillColor(17);
80
81 TGeoVolume *b31=geom->MakeBox("b31",Iron,5,5,1);
82 b31->SetLineColor(38);
83 b31->SetFillColor(38);
84
85 TGeoVolume *b41=geom->MakeBox("b41",Iron,5,5,1);
86 b41->SetLineColor(38);
87 b41->SetFillColor(38);
88
89 TGeoVolume *b32=geom->MakeBox("b32",Iron,5,5,1);
90 b32->SetLineColor(38);
91 b32->SetFillColor(38);
92
93 TGeoVolume *b42=geom->MakeBox("b42",Iron,5,5,1);
94 b42->SetLineColor(38);
95 b42->SetFillColor(38);
96
97 TGeoVolume *b33=geom->MakeBox("b33",Iron,5,5,1);
98 b33->SetLineColor(38);
99 b33->SetFillColor(38);
100
101 TGeoVolume *b43=geom->MakeBox("b43",Iron,5,5,1);
102 b43->SetLineColor(38);
103 b43->SetFillColor(38);
104
105 TGeoVolume *b34=geom->MakeBox("b34",Iron,6,7,1);
106 b34->SetLineColor(38);
107 b34->SetFillColor(38);
108
109 TGeoVolume *b44=geom->MakeBox("b44",Iron,6,7,1);
110 b44->SetLineColor(38);
111 b44->SetFillColor(38);
112
113 TGeoVolume *b35=geom->MakeBox("b35",Iron,6,7,1);
114 b35->SetLineColor(38);
115 b35->SetFillColor(38);
116
117 TGeoVolume *b45=geom->MakeBox("b45",Iron,6,7,1);
118 b45->SetLineColor(38);
119 b45->SetFillColor(38);
120
121 TGeoVolume *b36=geom->MakeBox("b36",Iron,6,7,1);
122 b36->SetLineColor(38);
123 b36->SetFillColor(38);
124
125 TGeoVolume *b46=geom->MakeBox("b46",Iron,6,7,1);
126 b46->SetLineColor(38);
127 b46->SetFillColor(38);
128
129 TGeoVolume *b37=geom->MakeBox("b37",Iron,5,5,1);
130 b37->SetLineColor(38);
131 b37->SetFillColor(38);
132
133 TGeoVolume *b47=geom->MakeBox("b47",Iron,5,5,1);
134 b47->SetLineColor(38);
135 b47->SetFillColor(38);
136
137 TGeoVolume *b38=geom->MakeBox("b38",Iron,5,5,1);
138 b38->SetLineColor(38);
139 b38->SetFillColor(38);
140
141 TGeoVolume *b48=geom->MakeBox("b48",Iron,5,5,1);
142 b48->SetLineColor(38);
143 b48->SetFillColor(38);
144
145 TGeoVolume *b39=geom->MakeBox("b39",Iron,5,5,1);
146 b39->SetLineColor(38);
147 b39->SetFillColor(38);
148
149 TGeoVolume *b49=geom->MakeBox("b49",Iron,5,5,1);
150 b49->SetLineColor(38);
151 b49->SetFillColor(38);
152
153 TGeoVolume *b310=geom->MakeBox("b310",Iron,6,7,1);
154 b310->SetLineColor(38);
155 b310->SetFillColor(38);
156
157 TGeoVolume *b410=geom->MakeBox("b410",Iron,6,7,1);
158 b410->SetLineColor(38);
159 b410->SetFillColor(38);
160
161 TGeoVolume *b311=geom->MakeBox("b311",Iron,6,7,1);
162 b311->SetLineColor(38);
163 b311->SetFillColor(38);
164
165 TGeoVolume *b411=geom->MakeBox("b411",Iron,6,7,1);
166 b411->SetLineColor(38);
167 b411->SetFillColor(38);
168
169 TGeoVolume *b312=geom->MakeBox("b312",Iron,6,7,1);
170 b312->SetLineColor(38);
171 b312->SetFillColor(38);
172
173 TGeoVolume *b412=geom->MakeBox("b412",Iron,6,7,1);
174 b412->SetLineColor(38);
175 b412->SetFillColor(38);
176
177 TGeoVolume *b5=geom->MakeBox("b5",Iron,43,1,1);
178 b5->SetLineColor(17);
179 b5->SetFillColor(17);
180
181 TGeoVolume *b6=geom->MakeBox("b6",Iron,43,1,1);
182 b6->SetLineColor(17);
183 b6->SetFillColor(17);
184
185 TGeoVolume *b51=geom->MakeBox("b51",Iron,5,5,1);
186 b51->SetLineColor(38);
187 b51->SetFillColor(38);
188
189 TGeoVolume *b61=geom->MakeBox("b61",Iron,5,5,1);
190 b61->SetLineColor(38);
191 b61->SetFillColor(38);
192
193 TGeoVolume *b52=geom->MakeBox("b52",Iron,5,5,1);
194 b52->SetLineColor(38);
195 b52->SetFillColor(38);
196
197 TGeoVolume *b62=geom->MakeBox("b62",Iron,5,5,1);
198 b62->SetLineColor(38);
199 b62->SetFillColor(38);
200
201 TGeoVolume *b53=geom->MakeBox("b53",Iron,5,5,1);
202 b53->SetLineColor(38);
203 b53->SetFillColor(38);
204
205 TGeoVolume *b63=geom->MakeBox("b63",Iron,5,5,1);
206 b63->SetLineColor(38);
207 b63->SetFillColor(38);
208
209 TGeoVolume *b54=geom->MakeBox("b54",Iron,6,7,1);
210 b54->SetLineColor(38);
211 b54->SetFillColor(38);
212
213 TGeoVolume *b64=geom->MakeBox("b64",Iron,6,7,1);
214 b64->SetLineColor(38);
215 b64->SetFillColor(38);
216
217 TGeoVolume *b55=geom->MakeBox("b55",Iron,6,7,1);
218 b55->SetLineColor(38);
219 b55->SetFillColor(38);
220
221 TGeoVolume *b65=geom->MakeBox("b65",Iron,6,7,1);
222 b65->SetLineColor(38);
223 b65->SetFillColor(38);
224
225 TGeoVolume *b56=geom->MakeBox("b56",Iron,6,7,1);
226 b56->SetLineColor(38);
227 b56->SetFillColor(38);
228
229 TGeoVolume *b66=geom->MakeBox("b66",Iron,6,7,1);
230 b66->SetLineColor(38);
231 b66->SetFillColor(38);
232
233 TGeoVolume *b57=geom->MakeBox("b57",Iron,5,5,1);
234 b57->SetLineColor(38);
235 b57->SetFillColor(38);
236
237 TGeoVolume *b67=geom->MakeBox("b67",Iron,5,5,1);
238 b67->SetLineColor(38);
239 b67->SetFillColor(38);
240
241 TGeoVolume *b58=geom->MakeBox("b58",Iron,5,5,1);
242 b58->SetLineColor(38);
243 b58->SetFillColor(38);
244
245 TGeoVolume *b68=geom->MakeBox("b68",Iron,5,5,1);
246 b68->SetLineColor(38);
247 b68->SetFillColor(38);
248
249 TGeoVolume *b59=geom->MakeBox("b59",Iron,5,5,1);
250 b59->SetLineColor(38);
251 b59->SetFillColor(38);
252
253 TGeoVolume *b69=geom->MakeBox("b69",Iron,5,5,1);
254 b69->SetLineColor(38);
255 b69->SetFillColor(38);
256
257 TGeoVolume *b510=geom->MakeBox("b510",Iron,6,7,1);
258 b510->SetLineColor(38);
259 b510->SetFillColor(38);
260
261 TGeoVolume *b610=geom->MakeBox("b610",Iron,6,7,1);
262 b610->SetLineColor(38);
263 b610->SetFillColor(38);
264
265 TGeoVolume *b511=geom->MakeBox("b511",Iron,6,7,1);
266 b511->SetLineColor(38);
267 b511->SetFillColor(38);
268
269 TGeoVolume *b611=geom->MakeBox("b611",Iron,6,7,1);
270 b611->SetLineColor(38);
271 b611->SetFillColor(38);
272
273 TGeoVolume *b512=geom->MakeBox("b512",Iron,6,7,1);
274 b512->SetLineColor(38);
275 b512->SetFillColor(38);
276
277 TGeoVolume *b612=geom->MakeBox("b612",Iron,6,7,1);
278 b612->SetLineColor(38);
279 b612->SetFillColor(38);
280
281 TGeoVolume *b513=geom->MakeBox("b513",Iron,6,7,1);
282 b513->SetLineColor(38);
283 b513->SetFillColor(38);
284
285 TGeoVolume *b613=geom->MakeBox("b613",Iron,6,7,1);
286 b613->SetLineColor(38);
287 b613->SetFillColor(38);
288
289 TGeoVolume *b514=geom->MakeBox("b514",Iron,6,7,1);
290 b514->SetLineColor(38);
291 b514->SetFillColor(38);
292
293 TGeoVolume *b614=geom->MakeBox("b614",Iron,6,7,1);
294 b614->SetLineColor(38);
295 b614->SetFillColor(38);
296
297 TGeoVolume *b7=geom->MakeBox("b7",Iron,5,8,15);
298 b7->SetLineColor(17);
299 b7->SetFillColor(17);
300
301 TGeoVolume *b71=geom->MakeBox("b71",Iron,1,34,1);
302 b71->SetLineColor(17);
303 b71->SetFillColor(17);
304
305 TGeoVolume *b81=geom->MakeBox("b81",Iron,1,34,1);
306 b81->SetLineColor(17);
307 b81->SetFillColor(17);
308
309 TGeoVolume *b72=geom->MakeBox("b72",Iron,1,6,11);
310 b72->SetLineColor(18);
311 b72->SetFillColor(18);
312
313 TGeoVolume *b82=geom->MakeBox("b82",Iron,1,6,11);
314 b82->SetLineColor(18);
315 b82->SetFillColor(18);
316
317 TGeoVolume *b73=geom->MakeBox("b73",Iron,1,6,11);
318 b73->SetLineColor(12);
319 b73->SetFillColor(12);
320
321 TGeoVolume *b83=geom->MakeBox("b83",Iron,1,6,11);
322 b83->SetLineColor(12);
323 b83->SetFillColor(12);
324
325 TGeoVolume *b74=geom->MakeBox("b74",Iron,1,6,11);
326 b74->SetLineColor(18);
327 b74->SetFillColor(18);
328
329 TGeoVolume *b84=geom->MakeBox("b84",Iron,1,6,11);
330 b84->SetLineColor(18);
331 b84->SetFillColor(18);
332
333 TGeoVolume *b75=geom->MakeBox("b75",Iron,1,6,11);
334 b75->SetLineColor(12);
335 b75->SetFillColor(12);
336
337 TGeoVolume *b85=geom->MakeBox("b85",Iron,1,6,11);
338 b85->SetLineColor(12);
339 b85->SetFillColor(12);
340
341 TGeoVolume *b76=geom->MakeBox("b76",Iron,1,6,11);
342 b76->SetLineColor(18);
343 b76->SetFillColor(18);
344
345 TGeoVolume *b86=geom->MakeBox("b86",Iron,1,6,11);
346 b86->SetLineColor(18);
347 b86->SetFillColor(18);
348
349 TGeoVolume *b9=geom->MakeBox("b9",Iron,2,7,5);
350 b9->SetLineColor(17);
351 b9->SetFillColor(17);
352
353 TGeoVolume *b10=geom->MakeBox("b10",Iron,1,20,1);
354 b10->SetLineColor(17);
355 b10->SetFillColor(17);
356
357 TGeoVolume *b111=geom->MakeBox("b111",Iron,1,20,1);
358 b111->SetLineColor(17);
359 b111->SetFillColor(17);
360
361 TGeoVolume *b121=geom->MakeBox("b121",Iron,1,20,1);
362 b121->SetLineColor(17);
363 b121->SetFillColor(17);
364
365 TGeoVolume *b131=geom->MakeBox("b131",Iron,1,20,1);
366 b131->SetLineColor(17);
367 b131->SetFillColor(17);
368
369 TGeoVolume *n1=geom->MakeBox("n1",Iron,1,6,1);
370 n1->SetLineColor(12);
371 n1->SetFillColor(12);
372
373 TGeoVolume *n2=geom->MakeBox("n2",Iron,1,6,1);
374 n2->SetLineColor(12);
375 n2->SetFillColor(12);
376
377 TGeoVolume *n3=geom->MakeBox("n3",Iron,1,6,1);
378 n3->SetLineColor(12);
379 n3->SetFillColor(12);
380
381 TGeoVolume *n4=geom->MakeBox("n4",Iron,1,6,1);
382 n4->SetLineColor(12);
383 n4->SetFillColor(12);
384
385 TGeoVolume *n5=geom->MakeBox("n5",Iron,1,1,3);
386 n5->SetLineColor(12);
387 n5->SetFillColor(12);
388
389 TGeoVolume *n6=geom->MakeBox("n6",Iron,1,6,1);
390 n6->SetLineColor(12);
391 n6->SetFillColor(12);
392
393 TGeoVolume *n7=geom->MakeBox("n7",Iron,1,6,1);
394 n7->SetLineColor(12);
395 n7->SetFillColor(12);
396
397 TGeoVolume *n8=geom->MakeBox("n8",Iron,1,1,3);
398 n8->SetLineColor(12);
399 n8->SetFillColor(12);
400
401 TGeoVolume *n9=geom->MakeBox("n9",Iron,1,6,1);
402 n9->SetLineColor(12);
403 n9->SetFillColor(12);
404
405 TGeoVolume *sp=geom->MakeSphere("sp",Iron,0,10,0,180,0,360);
406 sp->SetLineColor(50);
407 sp->SetFillColor(50);
408
409 TGeoVolume *sp1=geom->MakeSphere("sp1",Iron,0,50,0,180,0,360);
410 sp1->SetLineColor(9);
411 sp1->SetFillColor(9);
412
413 TGeoVolume *sp2=geom->MakeSphere("sp2",Iron,0,2,0,180,0,360);
414 sp2->SetLineColor(2);
415 sp2->SetFillColor(2);
416
417 TGeoVolume *sp3=geom->MakeSphere("sp3",Iron,0,2,0,180,0,360);
418 sp3->SetLineColor(4);
419 sp3->SetFillColor(4);
420
421 TGeoVolume *tbs=geom->MakeTubs("tbs",Iron,0,3,120,0,360);
422 tbs->SetLineColor(10);
423 tbs->SetFillColor(10);
424
425 TGeoVolume *tbs1=geom->MakeTubs("tbs1",Iron,3,5,15,0,360);
426 tbs1->SetLineColor(17);
427 tbs1->SetFillColor(17);
428
429 TGeoVolume *tbs2=geom->MakeTubs("tbs2",Iron,3,15,30,0,360);
430 tbs2->SetLineColor(17);
431 tbs2->SetFillColor(17);
432
433 TGeoVolume *tbs3=geom->MakeTubs("tbs3",Iron,3,10,10,0,360);
434 tbs3->SetLineColor(17);
435 tbs3->SetFillColor(17);
436
437 TGeoVolume *tbs4=geom->MakeTubs("tbs4",Iron,3,7,10,0,360);
438 tbs4->SetLineColor(18);
439 tbs4->SetFillColor(18);
440
441 TGeoVolume *tbs5=geom->MakeTubs("tbs5",Iron,3,13,20,0,360);
442 tbs5->SetLineColor(17);
443 tbs5->SetFillColor(17);
444
445 TGeoVolume *tbs6=geom->MakeTubs("tbs6",Iron,3,7,10,0,360);
446 tbs6->SetLineColor(18);
447 tbs6->SetFillColor(18);
448
449 TGeoVolume *tbs7=geom->MakeTubs("tbs7",Iron,3,15,22,0,360);
450 tbs7->SetLineColor(15);
451 tbs7->SetFillColor(15);
452
453 TGeoVolume *tbs8=geom->MakeTubs("tbs8",Iron,0,10,5,0,360);
454 tbs8->SetLineColor(17);
455 tbs8->SetFillColor(17);
456
457 TGeoVolume *tbs9=geom->MakeTubs("tbs9",Iron,0,15,5,0,360);
458 tbs9->SetLineColor(15);
459 tbs9->SetFillColor(15);
460
461 TGeoVolume *tbs10=geom->MakeTubs("tbs10",Iron,4,6,8,0,360);
462 tbs10->SetLineColor(15);
463 tbs10->SetFillColor(15);
464
465 TGeoVolume *tbs11=geom->MakeTubs("tbs11",Iron,0,4,6,0,360);
466 tbs11->SetLineColor(17);
467 tbs11->SetFillColor(17);
468
469 TGeoVolume *tbs12=geom->MakeTubs("tbs12",Iron,0,4,6,0,360);
470 tbs12->SetLineColor(17);
471 tbs12->SetFillColor(17);
472
473 TGeoVolume *tbs13=geom->MakeTubs("tbs13",Iron,1.7,3.7,1,-90,180);
474 tbs13->SetLineColor(12);
475 tbs13->SetFillColor(12);
476
477 TGeoVolume *tbs14=geom->MakeTubs("tbs14",Iron,1.7,3.7,1,90,0);
478 tbs14->SetLineColor(12);
479 tbs14->SetFillColor(12);
480
481 TGeoVolume *tbs15=geom->MakeTubs("tbs15",Iron,14,15.2,9,0,360);
482 tbs15->SetLineColor(10);
483 tbs15->SetFillColor(10);
484
485 TGeoVolume *tbs16=geom->MakeTubs("tbs16",Iron,14,15.2,12,0,360);
486 tbs16->SetLineColor(10);
487 tbs16->SetFillColor(10);
488
489 TGeoVolume *tbs18=geom->MakeTubs("tbs18",Iron,14,15.2,9,80,100);
490 tbs18->SetLineColor(13);
491 tbs18->SetFillColor(13);
492
493 TGeoVolume *tbs19=geom->MakeTubs("tbs19",Iron,14,15.2,9,80,100);
494 tbs19->SetLineColor(13);
495 tbs19->SetFillColor(13);
496
497 TGeoVolume *tbs20=geom->MakeTubs("tbs20",Iron,12,13.2,14,80,100);
498 tbs20->SetLineColor(13);
499 tbs20->SetFillColor(13);
500
501 TGeoVolume *tbs21=geom->MakeTubs("tbs21",Iron,12,13.2,14,80,100);
502 tbs21->SetLineColor(13);
503 tbs21->SetFillColor(13);
504
505 TGeoVolume *tbs22=geom->MakeTubs("tbs22",Iron,14,15.2,12,80,100);
506 tbs22->SetLineColor(13);
507 tbs22->SetFillColor(13);
508
509 TGeoVolume *tbs23=geom->MakeTubs("tbs23",Iron,14,15.2,12,80,100);
510 tbs23->SetLineColor(13);
511 tbs23->SetFillColor(13);
512
513
514 TGeoVolume *Cone=geom->MakeCone("Cone",Copper,3,3,10,3,15);
515 Cone->SetLineColor(17);
516 Cone->SetFillColor(17);
517
518 TGeoVolume *Cone1=geom->MakeCone("Cone1",Copper,3,3,5,3,15);
519 Cone1->SetLineColor(17);
520 Cone1->SetFillColor(17);
521
522 TGeoVolume *Cone2=geom->MakeCone("Cone2",Copper,3,3,13,3,7);
523 Cone2->SetLineColor(17);
524 Cone2->SetFillColor(17);
525
526 TGeoVolume *Cone3=geom->MakeCone("Cone3",Copper,3,3,10,3,7);
527 Cone3->SetLineColor(17);
528 Cone3->SetFillColor(17);
529
530 TGeoVolume *Cone4=geom->MakeCone("Cone4",Copper,3,3,7,3,13);
531 Cone4->SetLineColor(17);
532 Cone4->SetFillColor(17);
533
534 TGeoVolume *Cone5=geom->MakeCone("Cone5",Copper,3,3,15,3,7);
535 Cone5->SetLineColor(15);
536 Cone5->SetFillColor(15);
537
538 TGeoVolume *Cone6=geom->MakeCone("Cone6",Copper,8,0,8,0,8);
539 Cone6->SetLineColor(17);
540 Cone6->SetFillColor(17);
541
542 TGeoVolume *Cone7=geom->MakeCone("Cone7",Copper,1,3,5,3,6);
543 Cone7->SetLineColor(18);
544 Cone7->SetFillColor(18);
545
546 TGeoVolume *Cone8=geom->MakeCone("Cone8",Copper,3,3,15,3,7);
547 Cone8->SetLineColor(15);
548 Cone8->SetFillColor(15);
549
550 TGeoVolume *Cone9=geom->MakeCone("Cone9",Copper,1,3,5,3,6);
551 Cone9->SetLineColor(12);
552 Cone9->SetFillColor(12);
553
554 TGeoVolume *Cone10=geom->MakeCone("Cone10",Copper,1,3,5,3,6);
555 Cone10->SetLineColor(12);
556 Cone10->SetFillColor(12);
557
558 TGeoVolume *Cone11=geom->MakeCone("Cone11",Copper,1,3,5,3,6);
559 Cone11->SetLineColor(14);
560 Cone11->SetFillColor(14);
561
562 TGeoVolume *Cone12=geom->MakeCone("Cone12",Copper,1,3,5,3,6);
563 Cone12->SetLineColor(14);
564 Cone12->SetFillColor(14);
565
566 TGeoVolume *a1=geom->MakeBox("a1",Iron,2,1,2);
567 a1->SetLineColor(10);
568 a1->SetFillColor(10);
570
571 TGeoVolume *a2=geom->MakeBox("a2",Iron,2,1,2);
572 a2->SetLineColor(10);
573 a2->SetFillColor(10);
575
576 TGeoVolume *a3=geom->MakeBox("a3",Iron,2,1,2);
577 a3->SetLineColor(10);
578 a3->SetFillColor(10);
580
581 TGeoVolume *a4=geom->MakeBox("a4",Iron,2,1,2);
582 a4->SetLineColor(10);
583 a4->SetFillColor(10);
585
586 TGeoVolume *a5=geom->MakeBox("a5",Iron,2,1,2);
587 a5->SetLineColor(10);
588 a5->SetFillColor(10);
590
591 TGeoVolume *a6=geom->MakeBox("a6",Iron,2,1,2);
592 a6->SetLineColor(10);
593 a6->SetFillColor(10);
595
596 TGeoVolume *a7=geom->MakeBox("a7",Iron,2,1,2);
597 a7->SetLineColor(10);
598 a7->SetFillColor(10);
600
601 TGeoVolume *a8=geom->MakeBox("a8",Iron,2,1,2);
602 a8->SetLineColor(10);
603 a8->SetFillColor(10);
605
606 TGeoVolume *a9=geom->MakeBox("a9",Iron,2,1,2);
607 a9->SetLineColor(10);
608 a9->SetFillColor(10);
610
611 TGeoVolume *a10=geom->MakeBox("a12",Iron,2,1,2);
612 a10->SetLineColor(10);
613 a10->SetFillColor(10);
615
616 TGeoVolume *a11=geom->MakeBox("a11",Iron,2,1,2);
617 a11->SetLineColor(10);
618 a11->SetFillColor(10);
620
621 TGeoVolume *a12=geom->MakeBox("a12",Iron,2,1,2);
622 a12->SetLineColor(10);
623 a12->SetFillColor(10);
625
626 TGeoVolume *a13=geom->MakeBox("a13",Iron,2,1,2);
627 a13->SetLineColor(10);
628 a13->SetFillColor(10);
630
631 TGeoVolume *a14=geom->MakeTubs("a14",Iron,0,1,20,0,360);
632 a14->SetLineColor(36);
633 a14->SetFillColor(36);
635
636 TGeoVolume *a15=geom->MakeTubs("a15",Iron,0,1,20,0,360);
637 a15->SetLineColor(36);
638 a15->SetFillColor(36);
640
641 TGeoVolume *a16=geom->MakeTubs("a16",Iron,0,1,20,0,360);
642 a16->SetLineColor(36);
643 a16->SetFillColor(36);
645
646 TGeoVolume *a17=geom->MakeTubs("a17",Iron,0,1,20,0,360);
647 a17->SetLineColor(36);
648 a17->SetFillColor(36);
650
651 TGeoVolume *a18=geom->MakeTubs("a18",Iron,0,1,20,0,360);
652 a18->SetLineColor(36);
653 a18->SetFillColor(36);
655
656 TGeoVolume *a19=geom->MakeTubs("a19",Iron,0,1,20,0,360);
657 a19->SetLineColor(36);
658 a19->SetFillColor(36);
660
661 TGeoVolume *a20=geom->MakeTubs("a20",Iron,0,1,20,0,360);
662 a20->SetLineColor(36);
663 a20->SetFillColor(36);
665
666 TGeoVolume *a21=geom->MakeTubs("a21",Iron,0,1,20,0,360);
667 a21->SetLineColor(36);
668 a21->SetFillColor(36);
670
671 TGeoVolume *a22=geom->MakeTubs("a22",Iron,3,4,3,0,360);
672 a22->SetLineColor(10);
673 a22->SetFillColor(10);
675
676 TGeoVolume *a23=geom->MakeTubs("a23",Iron,3,4,3,0,360);
677 a23->SetLineColor(14);
678 a23->SetFillColor(14);
680
681
682 TGeoVolume *Cone15=geom->MakeCone("Cone15",Copper,1,3,4,4,5);
683 Cone15->SetLineColor(14);
684 Cone15->SetFillColor(14);
686
687
688 TGeoVolume *a24=geom->MakeTubs("a24",Iron,3,4,3,0,360);
689 a24->SetLineColor(14);
690 a24->SetFillColor(14);
692
693 TGeoVolume *a25=geom->MakeTubs("a25",Iron,3,5,8,0,360);
694 a25->SetLineColor(18);
695 a25->SetFillColor(18);
697
698 TGeoVolume *Cone13=geom->MakeCone("Cone13",Copper,1,3,4,4,5);
699 Cone13->SetLineColor(14);
700 Cone13->SetFillColor(14);
702
703 TGeoVolume *Cone14=geom->MakeCone("Cone14",Copper,1,3,4,4,5);
704 Cone14->SetLineColor(14);
705 Cone14->SetFillColor(14);
707
708 TGeoVolume *sp4=geom->MakeSphere("sp4",Iron,0,4,0,180,0,360);
709 sp4->SetLineColor(10);
710 sp4->SetFillColor(10);
712
713 TGeoVolume *Cone16=geom->MakeCone("Cone16",Copper,1,3,4,4,5);
714 Cone16->SetLineColor(14);
715 Cone16->SetFillColor(14);
717
718 TGeoVolume *a26=geom->MakeTubs("a26",Iron,3,5,12,0,360);
719 a26->SetLineColor(18);
720 a26->SetFillColor(18);
722
723 TGeoVolume *Cone17=geom->MakeCone("Cone17",Copper,1,3,4,4,5);
724 Cone17->SetLineColor(14);
725 Cone17->SetFillColor(14);
727
728 TGeoVolume *a27=geom->MakeTubs("a27",Iron,4,6,12,0,360);
729 a27->SetLineColor(18);
730 a27->SetFillColor(18);
732
733 TGeoVolume *Cone18=geom->MakeCone("Cone18",Copper,1,3,5,3,6);
734 Cone18->SetLineColor(14);
735 Cone18->SetFillColor(14);
737
738
739
740
741
742 char nBlocks[50];
743 int i=1;
744 int N=0;
745 int f=0;
746 TGeoVolume *mBlock;
747
748 f=0;
749 while (f<4){
750 i=0;
751 while (i<30){
752 sprintf(nBlocks,"f%d_bg%d",f,N++);
753 mBlock = geom->MakeBox(nBlocks, Copper,2,1,3);
754 mBlock->SetLineColor(46);
756 i++;
757 }
758 f++;
759 }
760
761 TGeoVolume *mBlock1;
762
763 f=0;
764 while (f<4){
765 i=0;
766 while (i<30){
767 sprintf(nBlocks,"f%d_bg%d",f,N++);
768 mBlock1 = geom->MakeBox(nBlocks, Copper,2,1,3);
769 mBlock1->SetLineColor(46);
771 i++;
772 }
773 f++;
774 }
775
776 TGeoVolume *mBlock2;
777
778 f=0;
779 while (f<4){
780 i=0;
781 while (i<30){
782 sprintf(nBlocks,"f%d_bg%d",f,N++);
783 mBlock2 = geom->MakeBox(nBlocks, Copper,2,1,3);
784 mBlock2->SetLineColor(46);
786 i++;
787 }
788 f++;
789 }
790
791 TGeoVolume *mBlock3;
792
793 f=0;
794 while (f<4){
795 i=0;
796 while (i<30){
797 sprintf(nBlocks,"f%d_bg%d",f,N++);
798 mBlock3 = geom->MakeBox(nBlocks, Copper,2,1,3);
799 mBlock3->SetLineColor(46);
801 i++;
802 }
803 f++;
804 }
805
806
938
939
940 top->SetVisibility(0);
941 geom->CloseGeometry();
942
943 top->Draw("ogl");
944
945}
#define f(i)
Definition: RSha256.hxx:104
#define N
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
Class describing rotation + translation.
Definition: TGeoMatrix.h:292
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
TGeoVolume * MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Make in one step a volume pointing to a cone shape with given medium.
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
TGeoVolume * MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin=0, Double_t themax=180, Double_t phimin=0, Double_t phimax=360)
Make in one step a volume pointing to a sphere shape with given medium.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
Base class describing materials.
Definition: TGeoMaterial.h:36
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition: TGeoMedium.h:24
Class describing rotations.
Definition: TGeoMatrix.h:175
Class describing translations.
Definition: TGeoMatrix.h:122
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
Definition: TGeoVolume.cxx:997
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
virtual void Draw(Option_t *option="")
draw top volume according to option
virtual void SetLineColor(Color_t lcolor)
Set the line color.
static __roodevice__ const double a24[24]
__roodevice__ const double a11[11]