Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
building.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_geom
3/// Drawing a building where Dept. of Physics is, 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 building.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_building.png width=800px
14/// \macro_code
15///
16/// \author Hyung Ju Lee (laccalus@nate.com), Dept. of Physics, Univ. of Seoul
17
18#include "TGeoManager.h"
19
20void building()
21{
22 TGeoManager *geom = new TGeoManager("geom","My First 3D Geometry");
23
24// Materials
25 TGeoMaterial *Vacuum = new TGeoMaterial("vacuum",0,0,0);
26 TGeoMaterial *Fe = new TGeoMaterial("Fe",55.845,26,7.87);
27
28// Media
29 TGeoMedium *Air = new TGeoMedium("Air",0,Vacuum);
30 TGeoMedium *Iron = new TGeoMedium("Iron",0,Fe);
31
32// Volume
33 TGeoVolume *Phy_Building = geom->MakeBox("top",Air,150,150,150);
34 geom->SetTopVolume(Phy_Building);
35 geom->SetTopVisible(false);
36 // If you want to see the boundary, please input the number, 1 instead of 0.
37 // Like this, geom->SetTopVisible(1);
38
39
40 TGeoVolume *mBlocks;
41
42
43///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
44//////////////////////////////// Front-Building ///////////////////////////////
45///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
46
47 int i = 0;
48 int F = 0; // Floor
49 int N = 0; // Block_no
50 int nW = 8; // Number of windows
51 int nF = 3; // Number of Floor
52 char no_Block[100]; // Name of Block
53 double sP = 0; // Starting Phi of Tubs
54 double hP = 21; // Height of Tubs from Ground
55
56 while (F<nF){
57 N = 0; i = 0; sP = 0;
58
59/////////////////////////// Front of Building
60 while (i<nW){
61 i++;
62 sprintf(no_Block, "B1_F%d_%d", F, ++N); // Windows (6.25)
63 mBlocks = geom->MakeTubs(no_Block,Iron,21,29,1.8,sP,sP+6.25);
64 mBlocks->SetLineColor(12);
65 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
66
67 if (i < nW) {
68 sprintf(no_Block, "B1_F%d_%d", F, ++N); // Walls (8)
69 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,1.8,sP,sP+2.5);
70 mBlocks->SetLineColor(2);
71 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
72
73 sprintf(no_Block, "B1_F%d_%d", F, ++N);
74 mBlocks = geom->MakeTubs(no_Block,Iron,21,31,1.8,sP,sP+1);
75 mBlocks->SetLineColor(2);
76 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
77
78 sprintf(no_Block, "B1_F%d_%d", F, ++N);
79 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,1.8,sP,sP+1);
80 mBlocks->SetLineColor(2);
81 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
82
83 sprintf(no_Block, "B1_F%d_%d", F, ++N);
84 mBlocks = geom->MakeTubs(no_Block,Iron,21,31,1.8,sP,sP+1);
85 mBlocks->SetLineColor(2);
86 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
87
88 sprintf(no_Block, "B1_F%d_%d", F, ++N);
89 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,1.8,sP,sP+2.5);
90 mBlocks->SetLineColor(2);
91 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
92 }
93
94 if (i>=nW) {
95 sprintf(no_Block, "B1_F%d_%d", F, ++N); // Walls
96 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,1.8,sP,103);
97 mBlocks->SetLineColor(2);
98 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP+(8*F)));
99
100 }
101 }
102
103 sprintf(no_Block, "B1_F%d", ++F); // No Windows Floor
104 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,2.2,0,103);
105 mBlocks->SetLineColor(2);
106 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-12+(8*F)));
107
108///////////////////////////////////////// Back of Building
109 sprintf(no_Block, "B1_F%d_%d", F, ++N);
110 mBlocks = geom->MakeTubs(no_Block,Iron,18.5,21,0.8,92,101);
111 mBlocks->SetLineColor(12);
112 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-9.4+(8*F)));
113
114 if(F<nF){
115 sprintf(no_Block, "B1_F%d_%d", F, ++N);
116 mBlocks = geom->MakeTubs(no_Block,Iron,18.5,21,3.2,92,102);
117 mBlocks->SetLineColor(2);
118 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-5.4+(8*F)));
119
120 }
121 }
122
123 sprintf(no_Block, "B1_F%d_%d", F, ++N); // Walls
124 mBlocks = geom->MakeTubs(no_Block,Iron,18.5,21,2,92,102);
125 mBlocks->SetLineColor(2);
126 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-4));
127 sprintf(no_Block, "B1_F%d_%d", F, ++N);
128 mBlocks = geom->MakeTubs(no_Block,Iron,18.5,21,3.2,92,102);
129 mBlocks->SetLineColor(2);
130 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-5.4+(8*F)));
131
132 sprintf(no_Block, "B1_F%d_%d", F, ++N);
133 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,2,0,103);
134 mBlocks->SetLineColor(2);
135 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-4.2+(8*F)));
136
137 sprintf(no_Block, "B1_F%d_%d", F, ++N);
138 mBlocks = geom->MakeTubs(no_Block,Iron,18,21,2,0,102);
139 mBlocks->SetLineColor(2);
140 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-4.2+(8*F)));
141
142 sprintf(no_Block, "B1_F%d_%d", F, ++N);
143 mBlocks = geom->MakeTubs(no_Block,Iron,18,18.5,14,92,103);
144 mBlocks->SetLineColor(2);
145 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,29));
146
147//////////////////////// Front of Building
148 sprintf(no_Block, "B1_F%d_%d", F, ++N);
149 mBlocks = geom->MakeTubs(no_Block,Iron,21,29,2,0,97);
150 mBlocks->SetLineColor(12);
151 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,13));
152
153 sprintf(no_Block, "B1_F%d_%d", F, ++N);
154 mBlocks = geom->MakeTubs(no_Block,Iron,21,32,2,37,97);
155 mBlocks->SetLineColor(18);
156 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,9));
157
158 sprintf(no_Block, "B1_F%d_%d", F, ++N);
159 mBlocks = geom->MakeTubs(no_Block,Iron,21,29,1.95,0,37);
160 mBlocks->SetLineColor(30);
161 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,9.05));
162 sprintf(no_Block, "B1_F%d_%d", F, ++N);
163 mBlocks = geom->MakeTubs(no_Block,Iron,21,29,0.05,0,37);
164 mBlocks->SetLineColor(18);
165 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,7.05));
166
167
168//////////////////////// Rooftop
169 sprintf(no_Block, "B1_RT%d", N = 0);
170 mBlocks = geom->MakeTubs(no_Block,Iron,21,29.5,0.2,0,102);
171 mBlocks->SetLineColor(18);
172 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-2+(8*F)));
173 sprintf(no_Block, "B1_RT%d", ++N);
174 mBlocks = geom->MakeTubs(no_Block,Iron,18.5,21,0.2,0,101);
175 mBlocks->SetLineColor(18);
176 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-2+(8*F)));
177
178 sprintf(no_Block, "B1_RT%d", ++N);
179 mBlocks = geom->MakeTubs(no_Block,Iron,21,30,0.7,102.9,103);
180 mBlocks->SetLineColor(2);
181 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.8+(8*F)));
182 sprintf(no_Block, "B1_RT%d", ++N);
183 mBlocks = geom->MakeTubs(no_Block,Iron,21.1,29.9,0.7,102,102.9);
184 mBlocks->SetLineColor(18);
185 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.8+(8*F)));
186
187 sprintf(no_Block, "B1_RT%d", ++N);
188 mBlocks = geom->MakeTubs(no_Block,Iron,21.1,21.5,0.5,98,102.9);
189 mBlocks->SetLineColor(18);
190 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.8+(8*F)));
191 sprintf(no_Block, "B1_RT%d", ++N);
192 mBlocks = geom->MakeTubs(no_Block,Iron,21,21.1,0.7,98,103);
193 mBlocks->SetLineColor(2);
194 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.8+(8*F)));
195
196 sprintf(no_Block, "B1_RT%d", ++N);
197 mBlocks = geom->MakeTubs(no_Block,Iron,18.6,21,0.7,101.9,102);
198 mBlocks->SetLineColor(2);
199 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.8+(8*F)));
200 sprintf(no_Block, "B1_RT%d", ++N);
201 mBlocks = geom->MakeTubs(no_Block,Iron,18.6,21,0.7,101,101.9);
202 mBlocks->SetLineColor(18);
203 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.8+(8*F)));
204
205 sprintf(no_Block, "B1_RT%d", ++N);
206 mBlocks = geom->MakeTubs(no_Block,Iron,29.5,29.9,0.5,0,102);
207 mBlocks->SetLineColor(18);
208 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
209 sprintf(no_Block, "B1_RT%d", ++N);
210 mBlocks = geom->MakeTubs(no_Block,Iron,29.9,30,0.5,0,103);
211 mBlocks->SetLineColor(2);
212 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
213
214 sprintf(no_Block, "B1_RT%d", ++N);
215 mBlocks = geom->MakeTubs(no_Block,Iron,18.1,18.5,0.5,-1,101.9);
216 mBlocks->SetLineColor(18);
217 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
218 sprintf(no_Block, "B1_RT%d", ++N);
219 mBlocks = geom->MakeTubs(no_Block,Iron,18,18.1,0.5,-0.5,102);
220 mBlocks->SetLineColor(2);
221 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
222
223 sprintf(no_Block, "B1_RT%d", ++N);
224 mBlocks = geom->MakeTubs(no_Block,Iron,18.1,18.4,0.5,101.9,102.9);
225 mBlocks->SetLineColor(18);
226 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
227 sprintf(no_Block, "B1_RT%d", ++N);
228 mBlocks = geom->MakeTubs(no_Block,Iron,18,18.1,0.5,102,103);
229 mBlocks->SetLineColor(2);
230 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
231 sprintf(no_Block, "B1_RT%d", ++N);
232 mBlocks = geom->MakeTubs(no_Block,Iron,18.4,18.5,0.5,102,103);
233 mBlocks->SetLineColor(2);
234 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
235 sprintf(no_Block, "B1_RT%d", ++N);
236 mBlocks = geom->MakeTubs(no_Block,Iron,18,18.5,0.5,102.9,103);
237 mBlocks->SetLineColor(2);
238 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,hP-1.7+(8*F)));
239
240
241/////////////////////////////// White Wall
242 sprintf(no_Block, "B1_WW%d", N = 0);
243 mBlocks = geom->MakeTubs(no_Block,Iron,20.8,31,19.5,sP,sP+1);
244 mBlocks->SetLineColor(10);
245 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,26));
246
247 sprintf(no_Block, "B1_WW%d", ++N);
248 mBlocks = geom->MakeTubs(no_Block,Iron,26.8,31,5,sP,sP+1);
249 mBlocks->SetLineColor(10);
250 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,2));
251
252 sprintf(no_Block, "B1_WW%d", ++N);
253 mBlocks = geom->MakeTubs(no_Block,Iron,23,24.3,5,sP,sP+1);
254 mBlocks->SetLineColor(10);
255 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,2));
256
257 sprintf(no_Block, "B1_WW%d", ++N);
258 mBlocks = geom->MakeTubs(no_Block,Iron,20.8,21.3,5,sP,sP+1);
259 mBlocks->SetLineColor(10);
260 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,2));
261
262
263
264////////////////////////// Zero Floor1
265 sprintf(no_Block, "B1_ZF%d",N=0);
266 mBlocks = geom->MakeTubs(no_Block,Iron,0,21,9,0,92);
267 mBlocks->SetLineColor(12);
268 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,6));
269
270 sprintf(no_Block, "B1_ZF%d",++N);
271 mBlocks = geom->MakeTubs(no_Block,Iron,18,21,7.5,0,92);
272 mBlocks->SetLineColor(12);
273 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,31.5));
274
275 sprintf(no_Block, "B1_ZF%d",++N);
276 mBlocks = geom->MakeTubs(no_Block,Iron,18,21,4.5,0,92);
277 mBlocks->SetLineColor(2);
278 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,19.5));
279
280 sprintf(no_Block, "B1_ZF%d",++N);
281 mBlocks = geom->MakeTubs(no_Block,Iron,0,18,0.2,0,101);
282 mBlocks->SetLineColor(18);
283 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,18.6));
284 sprintf(no_Block, "B1_ZF%d",++N);
285 mBlocks = geom->MakeTubs(no_Block,Iron,0,18,1.7,0,100);
286 mBlocks->SetLineColor(12);
287 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,16.7));
288 sprintf(no_Block, "B1_ZF%d",++N);
289 mBlocks = geom->MakeTubs(no_Block,Iron,0,18,1.2,101,101.9);
290 mBlocks->SetLineColor(18);
291 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,19.6));
292 sprintf(no_Block, "B1_ZF%d",++N);
293 mBlocks = geom->MakeTubs(no_Block,Iron,0,18,1.2,101.9,102);
294 mBlocks->SetLineColor(2);
295 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,19.6));
296
297
298////////////////////////// Zero Floor2
299 sprintf(no_Block, "B1_ZF%d", ++N);
300 mBlocks = geom->MakeBox(no_Block,Iron,6.5,7,2.5);
301 mBlocks->SetLineColor(18);
302 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7,10.75,13));
303
304 sprintf(no_Block, "B1_ZF%d", ++N);
305 mBlocks = geom->MakeBox(no_Block,Iron,6.5,7,3);
306 mBlocks->SetLineColor(12);
307 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7,10.75,7.5));
308
309 sprintf(no_Block, "B1_ZF%d", ++N);
310 mBlocks = geom->MakeBox(no_Block,Iron,7,0.05,10);
311 mBlocks->SetLineColor(2);
312 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7,17.95,7));
313 sprintf(no_Block, "B1_ZF%d", ++N);
314 mBlocks = geom->MakeBox(no_Block,Iron,6.9,0.20,10);
315 mBlocks->SetLineColor(18);
316 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7,17.70,7));
317 sprintf(no_Block, "B1_ZF%d", ++N);
318 mBlocks = geom->MakeBox(no_Block,Iron,0.1,0.20,10);
319 mBlocks->SetLineColor(2);
320 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-13.9,17.70,7));
321
322 sprintf(no_Block, "B1_ZF%d", ++N);
323 mBlocks = geom->MakeBox(no_Block,Iron,0.05,7,3.5);
324 mBlocks->SetLineColor(2);
325 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-13.95,10.5,13.5));
326 sprintf(no_Block, "B1_ZF%d", ++N);
327 mBlocks = geom->MakeBox(no_Block,Iron,0.20,6.9,3.5);
328 mBlocks->SetLineColor(18);
329 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-13.70,10.5,13.5));
330
331 sprintf(no_Block, "B1_ZF%d", ++N);
332 mBlocks = geom->MakeBox(no_Block,Iron,0.25,7,4);
333 mBlocks->SetLineColor(2);
334 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-13.75,10.5,1));
335
336 sprintf(no_Block, "B1_ZF%d", ++N);
337 mBlocks = geom->MakeBox(no_Block,Iron,7,0.05,10);
338 mBlocks->SetLineColor(2);
339 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7,3.55,7));
340 sprintf(no_Block, "B1_ZF%d", ++N);
341 mBlocks = geom->MakeBox(no_Block,Iron,6.9,0.20,10);
342 mBlocks->SetLineColor(18);
343 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7,3.8,7));
344 sprintf(no_Block, "B1_ZF%d", ++N);
345 mBlocks = geom->MakeBox(no_Block,Iron,0.1,0.20,10);
346 mBlocks->SetLineColor(2);
347 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-13.9,3.8,7));
348
349
350////////////////////////// Zero Floor2
351 sprintf(no_Block, "B1_ZF%d", ++N);
352 mBlocks = geom->MakeBox(no_Block,Iron,5,5,1);
353 mBlocks->SetLineColor(10);
354 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-5,23,-2));
355
356 sprintf(no_Block, "B1_ZF%d", ++N);
357 mBlocks = geom->MakeBox(no_Block,Iron,5,0.25,1.5);
358 mBlocks->SetLineColor(2);
359 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-5,28.25,-1.5));
360
361 sprintf(no_Block, "B1_ZF%d", ++N);
362 mBlocks = geom->MakeBox(no_Block,Iron,0.25,5.5,1.5);
363 mBlocks->SetLineColor(2);
364 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-10.25,23,-1.5));
365
366 sprintf(no_Block, "B1_ZF%d", ++N);
367 mBlocks = geom->MakeBox(no_Block,Iron,5.5,3.5,5);
368 mBlocks->SetLineColor(20);
369 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-12.5,0,-4));
370
371
372////////////////////////// Ground
373 sprintf(no_Block, "B1_GRD%d",N=0);
374 mBlocks = geom->MakeTubs(no_Block,Iron,0,29,1,0,36.75);
375 mBlocks->SetLineColor(10);
376 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,-2));
377
378 sprintf(no_Block, "B1_GRD%d",++N);
379 mBlocks = geom->MakeTubs(no_Block,Iron,0,30.4,0.4,36.75,77.25);
380 mBlocks->SetLineColor(10);
381 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,-2.7));
382
383 sprintf(no_Block, "B1_GRD%d",++N);
384 mBlocks = geom->MakeTubs(no_Block,Iron,0,29.7,0.3,36.75,77.25);
385 mBlocks->SetLineColor(10);
386 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,-2));
387
388 sprintf(no_Block, "B1_GRD%d",++N);
389 mBlocks = geom->MakeTubs(no_Block,Iron,0,29,0.3,36.75,77.25);
390 mBlocks->SetLineColor(10);
391 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,-1.3));
392
393 sprintf(no_Block, "B1_GRD%d",++N);
394 mBlocks = geom->MakeTubs(no_Block,Iron,0,29,1,77.25,97);
395 mBlocks->SetLineColor(10);
396 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,-2));
397
398
399///////////////////////////// Pillars & fences
400 sprintf(no_Block, "B1_PF%d", N = 0);
401 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
402 mBlocks->SetLineColor(2);
403 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(29,4.2,6, new TGeoRotation("r1",8.25,0,0)));
404
405 sprintf(no_Block, "B1_PF%d", ++N);
406 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
407 mBlocks->SetLineColor(2);
408 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(24.2,16.5,6, new TGeoRotation("r1",34.25,0,0)));
409
410 sprintf(no_Block, "B1_PF%d", ++N);
411 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
412 mBlocks->SetLineColor(2);
413 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(14.5,25.4,6, new TGeoRotation("r1",60.25,0,0)));
414
415 sprintf(no_Block, "B1_PF%d", ++N);
416 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
417 mBlocks->SetLineColor(2);
418 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(1.9,29.2,6, new TGeoRotation("r1",86.25,0,0)));
419
420 sprintf(no_Block, "B1_PF%d",++N);
421 mBlocks = geom->MakeTubs(no_Block,Iron,29,30,2,0,36.75);
422 mBlocks->SetLineColor(2);
423 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,0,-1));
424
425 sprintf(no_Block, "B1_PF%d", ++N);
426 mBlocks = geom->MakeBox(no_Block,Iron,3,2,2);
427 mBlocks->SetLineColor(2);
428 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-0.75,29.3,-1));
429
430 sprintf(no_Block, "B1_PF%d", ++N); //장애인용
431 mBlocks = geom->MakeBox(no_Block,Iron,0.25,4.3,1.5);
432 mBlocks->SetLineColor(2);
433 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(6.5,30.6,-1.5));
434
435 sprintf(no_Block, "B1_PF%d", ++N);
436 mBlocks = geom->MakeBox(no_Block,Iron,5.25,4.3,0.4);
437 mBlocks->SetLineColor(10);
438 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(1.125,30.6,-2.7));
439
440 sprintf(no_Block, "B1_PF%d", ++N);
441 mBlocks = geom->MakeBox(no_Block,Iron,5.5,0.25,0.75);
442 mBlocks->SetLineColor(2);
443 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(1.125,34.9,-2.25));
444
445 sprintf(no_Block, "B1_PF%d", ++N);
446 mBlocks = geom->MakeTrd1(no_Block,Iron,1.5,0,0.25,5.5);
447 mBlocks->SetLineColor(2);
448 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(1.125,34.9,-1.5, new TGeoRotation("r1",90,-90,90)));
449
450
451
452
453
454
455
456
457
458///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
459//////////////////////////////// Second Part of Front-Building ///////////////////////////////
460///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
461
462 F=0;
463 while (F<nF){
464 N = 0; i = 0; nW = 7;
465
466 while (i<nW){
467 sprintf(no_Block, "B12_F%d_B%d",F, ++N); // Wall
468 mBlocks = geom->MakeBox(no_Block,Iron,3.8,0.35,1.8);
469 mBlocks->SetLineColor(2);
470 Phy_Building->AddNodeOverlap(mBlocks,1,
471 new TGeoCombiTrans(23.38 + (21.65-6*i)*0.13,-21.2 + (21.65-6*i)*0.99,hP+(8*F),
472 new TGeoRotation("r1",-7.5,0,0)));
473 sprintf(no_Block, "B12_F%d_B%d",F, ++N);
474 mBlocks = geom->MakeBox(no_Block,Iron,4.8,0.3,1.8);
475 mBlocks->SetLineColor(2);
476 Phy_Building->AddNodeOverlap(mBlocks,1,
477 new TGeoCombiTrans(23.38 + (21.0-6*i)*0.13,-21.2 + (21-6*i)*0.99,hP+(8*F),
478 new TGeoRotation("r1",-7.5,0,0)));
479 sprintf(no_Block, "B12_F%d_B%d",F, ++N);
480 mBlocks = geom->MakeBox(no_Block,Iron,3.8,0.3,1.8);
481 mBlocks->SetLineColor(2);
482 Phy_Building->AddNodeOverlap(mBlocks,1,
483 new TGeoCombiTrans(23.38 + (20.4-6*i)*0.13,-21.2 + (20.4-6*i)*0.99,hP+(8*F),
484 new TGeoRotation("r1",-7.5,0,0)));
485 sprintf(no_Block, "B12_F%d_B%d",F, ++N);
486 mBlocks = geom->MakeBox(no_Block,Iron,4.8,0.3,1.8);
487 mBlocks->SetLineColor(2);
488 Phy_Building->AddNodeOverlap(mBlocks,1,
489 new TGeoCombiTrans(23.38 + (19.7-6*i)*0.13,-21.2 + (19.7-6*i)*0.99,hP+(8*F),
490 new TGeoRotation("r1",-7.5,0,0)));
491 sprintf(no_Block, "B12_F%d_B%d",F, ++N);
492 mBlocks = geom->MakeBox(no_Block,Iron,3.8,0.35,1.8);
493 mBlocks->SetLineColor(2);
494 Phy_Building->AddNodeOverlap(mBlocks,1,
495 new TGeoCombiTrans(23.38 + (19.05-6*i)*0.13,-21.2 + (19.05-6*i)*0.99,hP+(8*F),
496 new TGeoRotation("r1",-7.5,0,0)));
497
498
499 sprintf(no_Block, "B12_F%d_B%d",F, ++N); // Windows
500 mBlocks = geom->MakeBox(no_Block,Iron,3,1.4,1.8);
501 mBlocks->SetLineColor(12);
502 Phy_Building->AddNodeOverlap(mBlocks,1,
503 new TGeoCombiTrans(23.38 + (17.4-6*i)*0.13,-21.2 + (17.4-6*i)*0.99,hP+(8*F),
504 new TGeoRotation("r1",-7.5,0,0)));
505 i++;
506 if( i >= nW){
507 sprintf(no_Block, "B12_F%d_B%d",F, ++N); // Wall.
508 mBlocks = geom->MakeBox(no_Block,Iron,5.8,1,1.8);
509 mBlocks->SetLineColor(2);
510 Phy_Building->AddNodeOverlap(mBlocks,1,
511 new TGeoCombiTrans(21.4 + (-21)*0.13,-21 + (-21)*0.99,hP+(8*F),
512 new TGeoRotation("r1",-7.5,0,0)));
513 }
514 }
515
516 sprintf(no_Block, "B12_F%d_B%d",++F, ++N);
517 mBlocks = geom->MakeBox(no_Block,Iron,5.8,22,2.2);
518 mBlocks->SetLineColor(2);
519 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.4,-21,hP-12+(8*F), new TGeoRotation("r1",-7.5,0,0)));
520
521 }
522 sprintf(no_Block, "B12_F%d_%d", F, ++N);
523 mBlocks = geom->MakeBox(no_Block,Iron,5.8,22,2);
524 mBlocks->SetLineColor(2);
525 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.4,-21,hP-4.2+(8*F), new TGeoRotation("r1",-7.5,0,0)));
526
527 sprintf(no_Block, "B12_F%d_%d", F, ++N);
528 mBlocks = geom->MakeBox(no_Block,Iron,2.8,22,14);
529 mBlocks->SetLineColor(2);
530 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(18.43,-20.61,29, new TGeoRotation("r1",-7.5,0,0)));
531
532
533////////////////////// RoofTop
534 sprintf(no_Block, "B12_RT%d_%d", F, N=0);
535 mBlocks = geom->MakeBox(no_Block,Iron,5.5,21.75,0.2);
536 mBlocks->SetLineColor(18);
537 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.43,-20.75,hP-2+(8*F), new TGeoRotation("r1",-7.5,0,0)));
538
539 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
540 mBlocks = geom->MakeBox(no_Block,Iron,0.23,21.95,0.5);
541 mBlocks->SetLineColor(18);
542 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(26.9,-21.72,hP-1.7+(8*F), new TGeoRotation("r1",-7.5,0,0)));
543 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
544 mBlocks = geom->MakeBox(no_Block,Iron,0.1,22,0.5);
545 mBlocks->SetLineColor(2);
546 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(27.1,-21.75,hP-1.7+(8*F), new TGeoRotation("r1",-7.5,0,0)));
547
548
549 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
550 mBlocks = geom->MakeBox(no_Block,Iron,0.23,3.6,0.5);
551 mBlocks->SetLineColor(18);
552 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(13.65,-38.03,hP-1.7+(8*F), new TGeoRotation("r1",-7.5,0,0)));
553
554 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
555 mBlocks = geom->MakeBox(no_Block,Iron,0.02,3.8,0.5);
556 mBlocks->SetLineColor(2);
557 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(13.3,-38.39,hP-1.7+(8*F), new TGeoRotation("r1",-7.5,0,0)));
558
559
560
561 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
562 mBlocks = geom->MakeBox(no_Block,Iron,5.7,0.23,0.5);
563 mBlocks->SetLineColor(18);
564 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(18.57,-42.48,hP-1.7+(8*F), new TGeoRotation("r1",-7.5,0,0)));
565 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
566 mBlocks = geom->MakeBox(no_Block,Iron,5.8,0.1,0.5);
567 mBlocks->SetLineColor(2);
568 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(18.54,-42.71,hP-1.7+(8*F), new TGeoRotation("r1",-7.5,0,0)));
569
570
571//////////////////////// Pillars & fences
572 sprintf(no_Block, "B12_PF%d", N = 0);
573 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
574 mBlocks->SetLineColor(2);
575 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(28.32,-7.44,6, new TGeoRotation("r1",-7.5,0,0)));
576
577 sprintf(no_Block, "B12_PF%d", ++N);
578 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
579 mBlocks->SetLineColor(2);
580 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(26.75,-19.33,6, new TGeoRotation("r1",-7.5,0,0)));
581
582 sprintf(no_Block, "B12_PF%d", ++N);
583 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,9);
584 mBlocks->SetLineColor(2);
585 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(25.19,-31.23,6, new TGeoRotation("r1",-7.5,0,0)));
586
587 sprintf(no_Block, "B12_PF%d", ++N);
588 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,11);
589 mBlocks->SetLineColor(2);
590 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(23.75,-42.14,4, new TGeoRotation("r1",-7.5,0,0)));
591
592 sprintf(no_Block, "B12_PF%d", ++N);
593 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,11);
594 mBlocks->SetLineColor(2);
595 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(13.84,-40.83,4, new TGeoRotation("r1",-7.5,0,0)));
596
597
598
599 sprintf(no_Block, "B12_PF%d", ++N);
600 mBlocks = geom->MakeBox(no_Block,Iron,0.5,15.75,2);
601 mBlocks->SetLineColor(2);
602 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(27.42,-15.48,-1, new TGeoRotation("r1",-7.5,0,0)));
603
604 sprintf(no_Block, "B12_PF%d", ++N);
605 mBlocks = geom->MakeBox(no_Block,Iron,0.5,2,4);
606 mBlocks->SetLineColor(2);
607 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(24.28,-39.27,-3, new TGeoRotation("r1",-7.5,0,0)));
608
609 sprintf(no_Block, "B12_PF%d", ++N);
610 mBlocks = geom->MakeBox(no_Block,Iron,1.5,15.75,2);
611 mBlocks->SetLineColor(2);
612 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(28.91,-15.68,-4, new TGeoRotation("r1",-7.5,0,0)));
613
614 sprintf(no_Block, "B12_RT%d_%d", F, ++N);
615 mBlocks = geom->MakeBox(no_Block,Iron,5.8,0.5,4);
616 mBlocks->SetLineColor(2);
617 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(18.8,-40.73,-3, new TGeoRotation("r1",-7.5,0,0)));
618
619
620/////////////////////// Stair
621 sprintf(no_Block, "B12_PF%d", ++N);
622 mBlocks = geom->MakeBox(no_Block,Iron,3,0.5,3.25);
623 mBlocks->SetLineColor(2);
624 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(28.33,-31.49,-2.75, new TGeoRotation("r1",-7.5,0,0)));
625
626 sprintf(no_Block, "B12_PF%d", ++N);
627 mBlocks = geom->MakeBox(no_Block,Iron,0.5,6.25,1.625);
628 mBlocks->SetLineColor(2);
629 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(30.56,-37.58,-4.375, new TGeoRotation("r1",-7.5,0,0)));
630 sprintf(no_Block, "B1_PF%d", ++N);
631 mBlocks = geom->MakeTrd1(no_Block,Iron,3.25,0,0.5,6.25);
632 mBlocks->SetLineColor(2);
633 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(30.56,-37.58,-2.75, new TGeoRotation("r1",-7.5,90,90)));
634
635
636 sprintf(no_Block, "B12_PF%d", ++N);
637 mBlocks = geom->MakeBox(no_Block,Iron,3,3,0.5);
638 mBlocks->SetLineColor(18);
639 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(27.37,-34.89,-2.5, new TGeoRotation("r1",-7.5,0,0)));
640 sprintf(no_Block, "B12_PF%d", ++N);
641 mBlocks = geom->MakeBox(no_Block,Iron,2.5,3,0.5);
642 mBlocks->SetLineColor(18);
643 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(27.74,-35.95,-3.5, new TGeoRotation("r1",-7.5,0,0)));
644 sprintf(no_Block, "B12_PF%d", ++N);
645 mBlocks = geom->MakeBox(no_Block,Iron,2.5,3,0.5);
646 mBlocks->SetLineColor(18);
647 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(27.61,-36.94,-4.5, new TGeoRotation("r1",-7.5,0,0)));
648 sprintf(no_Block, "B12_PF%d", ++N);
649 mBlocks = geom->MakeBox(no_Block,Iron,2.5,3,0.5);
650 mBlocks->SetLineColor(18);
651 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(27.48,-37.93,-5.5, new TGeoRotation("r1",-7.5,0,0)));
652
653
654
655//////////////////////// Ground
656 sprintf(no_Block, "B12_GR%d", N=0);
657 mBlocks = geom->MakeBox(no_Block,Iron,4.8,21,1);
658 mBlocks->SetLineColor(18);
659 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.53,-20.1,-2, new TGeoRotation("r1",-7.5,0,0)));
660
661 sprintf(no_Block, "B12_GR%d", ++N);
662 mBlocks = geom->MakeBox(no_Block,Iron,5.8,18,9);
663 mBlocks->SetLineColor(12);
664 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(12.86,-16.62,6, new TGeoRotation("r1",-7.5,0,0)));
665
666 sprintf(no_Block, "B12_GR%d", ++N);
667 mBlocks = geom->MakeBox(no_Block,Iron,4.8,22,2);
668 mBlocks->SetLineColor(12);
669 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.4,-21,13, new TGeoRotation("r1",-7.5,0,0)));
670
671 sprintf(no_Block, "B12_GR%d_%d", F, ++N);
672 mBlocks = geom->MakeBox(no_Block,Iron,4.8,22,1.95);
673 mBlocks->SetLineColor(30);
674 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.4,-21,9.05, new TGeoRotation("r1",-7.5,0,0)));
675 sprintf(no_Block, "B12_GR%d_%d", F, ++N);
676 mBlocks = geom->MakeBox(no_Block,Iron,4.8,22,0.05);
677 mBlocks->SetLineColor(18);
678 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoCombiTrans(21.4,-21,7.05, new TGeoRotation("r1",-7.5,0,0)));
679
680
681
682
683
684
685
686///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
687//////////////////////////////// Bridge-Building ///////////////////////////////
688///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
689 F=1; N = 0; nF = 4;
690
691
692 sprintf(no_Block, "B2_F%d", 6);
693 mBlocks = geom->MakeBox(no_Block,Iron,7,17.5,2);
694 mBlocks->SetLineColor(2);
695 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(12,-17.5,41));
696
697 while(F++ <= nF){
698//////////////////////// Front
699 sprintf(no_Block, "B2_F%d_%d",F, ++N);
700 mBlocks = geom->MakeBox(no_Block,Iron,0.8,4,4);
701 mBlocks->SetLineColor(2);
702 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(10,-4,-5 +(F*8)));
703
704 sprintf(no_Block, "B2_F%d_%d",F, ++N);
705 mBlocks = geom->MakeBox(no_Block,Iron,1.1,3.5,1);
706 mBlocks->SetLineColor(12);
707 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(11.9,-4,-2 +(F*8)));
708 sprintf(no_Block, "B2_F%d_%d",F, ++N);
709 mBlocks = geom->MakeBox(no_Block,Iron,1.1,4.5,0.2);
710 mBlocks->SetLineColor(18);
711 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(11.9,-4,-3.2+(F*8)));
712 sprintf(no_Block, "B2_F%d_%d",F, ++N);
713 mBlocks = geom->MakeBox(no_Block,Iron,1.1,4,2.8);
714 mBlocks->SetLineColor(2);
715 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(11.9,-4,-6.2+(F*8)));
716
717 sprintf(no_Block, "B2_F%d_%d",F, ++N);
718 mBlocks = geom->MakeBox(no_Block,Iron,0.7,4,4);
719 mBlocks->SetLineColor(2);
720 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(13.6,-4,-5 +(F*8)));
721
722 sprintf(no_Block, "B2_F%d_%d",F, ++N);
723 mBlocks = geom->MakeBox(no_Block,Iron,1.1,3.5,1);
724 mBlocks->SetLineColor(12);
725 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(15.4,-4,-2 +(F*8)));
726 sprintf(no_Block, "B2_F%d_%d",F, ++N);
727 mBlocks = geom->MakeBox(no_Block,Iron,1.1,4.5,0.2);
728 mBlocks->SetLineColor(18);
729 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(15.4,-4,-3.2+(F*8)));
730 sprintf(no_Block, "B2_F%d_%d",F, ++N);
731 mBlocks = geom->MakeBox(no_Block,Iron,1.1,4,2.8);
732 mBlocks->SetLineColor(2);
733 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(15.4,-4,-6.2+(F*8)));
734
735 sprintf(no_Block, "B2_F%d_%d",F, ++N);
736 mBlocks = geom->MakeBox(no_Block,Iron,0.7,4,4);
737 mBlocks->SetLineColor(2);
738 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(17.1,-4,-5 +(F*8)));
739
740
741//////////////////////////// Back
742 sprintf(no_Block, "B2_F%d_%d",F, ++N);
743 mBlocks = geom->MakeBox(no_Block,Iron,1.3,13.5,1.5);
744 mBlocks->SetLineColor(2);
745 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(6.8,-21.5,-2.5 +(F*8)));
746 sprintf(no_Block, "B2_F%d_%d",F, ++N);
747 mBlocks = geom->MakeBox(no_Block,Iron,1.3,14,0.2);
748 mBlocks->SetLineColor(18);
749 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(6.8,-21.5,-4.2+(F*8)));
750 sprintf(no_Block, "B2_F%d_%d",F, ++N);
751 mBlocks = geom->MakeBox(no_Block,Iron,1.3,13.5,2.3);
752 mBlocks->SetLineColor(2);
753 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(6.8,-21.5,-6.8+(F*8)));
754
755
756
757 sprintf(no_Block, "B2_F%d_%d",F, ++N);
758 mBlocks = geom->MakeBox(no_Block,Iron,3.7,13,1.5);
759 mBlocks->SetLineColor(12);
760 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(11.8,-21.5,-2.5 +(F*8)));
761 sprintf(no_Block, "B2_F%d_%d",F, ++N);
762 mBlocks = geom->MakeBox(no_Block,Iron,3.7,14,0.2);
763 mBlocks->SetLineColor(18);
764 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(11.8,-21.5,-4.2+(F*8)));
765 sprintf(no_Block, "B2_F%d_%d",F, ++N);
766 mBlocks = geom->MakeBox(no_Block,Iron,3.7,13.5,2.3);
767 mBlocks->SetLineColor(2);
768 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(11.8,-21.5,-6.8+(F*8)));
769
770
771 }
772
773
774 sprintf(no_Block, "B2_F%d_%d", 0,1);
775 mBlocks = geom->MakeBox(no_Block,Iron,5,13.5,6);
776 mBlocks->SetLineColor(30);
777// Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(10,-21.5,-15));
778 sprintf(no_Block, "B2_F%d_%d", 0,2);
779 mBlocks = geom->MakeBox(no_Block,Iron,5,13.5,4);
780 mBlocks->SetLineColor(2);
781 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(10,-21.5,-5));
782 sprintf(no_Block, "B2_F%d_%d", 0,3);
783 mBlocks = geom->MakeBox(no_Block,Iron,5,13.5,4);
784 mBlocks->SetLineColor(12);
785 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(10,-21.5,3));
786
787
788
789/////////////////////////// RoofTop
790 sprintf(no_Block, "B2_F%d", ++N);
791 mBlocks = geom->MakeBox(no_Block,Iron,7,17.4,0.1);
792 mBlocks->SetLineColor(18);
793 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(12,-17.5,43.1));
794
795 sprintf(no_Block, "B2_F%d", ++N);
796 mBlocks = geom->MakeBox(no_Block,Iron,4.5,0.2,0.5);
797 mBlocks->SetLineColor(18);
798 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(9.5,-34.7,43.5));
799 sprintf(no_Block, "B2_F%d", ++N);
800 mBlocks = geom->MakeBox(no_Block,Iron,4.5,0.05,0.5);
801 mBlocks->SetLineColor(2);
802 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(9.5,-34.95,43.5));
803
804 sprintf(no_Block, "B2_F%d", ++N);
805 mBlocks = geom->MakeBox(no_Block,Iron,4.75,0.2,0.5);
806 mBlocks->SetLineColor(18);
807 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(13.75,-0.3,43.5));
808 sprintf(no_Block, "B2_F%d", ++N);
809 mBlocks = geom->MakeBox(no_Block,Iron,4.55,0.05,0.5);
810 mBlocks->SetLineColor(2);
811 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(13.55,-0.05,43.5));
812
813
814
815
816
817
818
819
820
821///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
822//////////////////////////////// Building 3 ///////////////////////////////
823///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
824 F=0; N = 0; nF = 4; nW = 6;
825
826
827 sprintf(no_Block, "B3_F0%d", 7);
828 mBlocks = geom->MakeBox(no_Block,Iron,3,36,2);
829 mBlocks->SetLineColor(2);
830 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,49));
831
832 while (F++ < nF){
833 i=0; N=0;
834
835 sprintf(no_Block, "B3_F%d_%d",F, ++N);
836 mBlocks = geom->MakeBox(no_Block,Iron,4,36,0.2);
837 mBlocks->SetLineColor(18);
838 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,14.7 +(F*8)));
839
840 while (i++ <nW){
841 sprintf(no_Block, "B3_F%d_%d",F, ++N);
842 mBlocks = geom->MakeBox(no_Block,Iron,2.5,5,1.8);
843 mBlocks->SetLineColor(12);
844 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-6 -(i*12),12.8 +(F*8)));
845
846 sprintf(no_Block, "B3_F%d_%d",F, ++N);
847 mBlocks = geom->MakeBox(no_Block,Iron,2.8,1,1.8);
848 mBlocks->SetLineColor(18);
849 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-12 -(i*12),12.8 +(F*8)));
850
851 }
852
853 sprintf(no_Block, "B3_F%d_%d",F, ++N);
854 mBlocks = geom->MakeBox(no_Block,Iron,3,36,2);
855 mBlocks->SetLineColor(2);
856 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,9.2 +(F*8)));
857
858 }
859
860 sprintf(no_Block, "B3_F0%d", 1);
861 mBlocks = geom->MakeBox(no_Block,Iron,2.8,36,2);
862 mBlocks->SetLineColor(12);
863 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,13));
864 sprintf(no_Block, "B3_F0%d", 2);
865 mBlocks = geom->MakeBox(no_Block,Iron,2.8,36,2);
866 mBlocks->SetLineColor(30);
867 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,9));
868
869 sprintf(no_Block, "B3_F0%d", 3);
870 mBlocks = geom->MakeBox(no_Block,Iron,2.8,36,4);
871 mBlocks->SetLineColor(12);
872 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,3));
873
874 sprintf(no_Block, "B3_F0%d", 4);
875 mBlocks = geom->MakeBox(no_Block,Iron,2.8,36,4);
876 mBlocks->SetLineColor(2);
877 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,-5));
878
879/* sprintf(no_Block, "B3_F0%d", 5);
880 mBlocks = geom->MakeBox(no_Block,Iron,2.8,36,6);
881 mBlocks->SetLineColor(30);
882 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-48,-15));
883*/
884 sprintf(no_Block, "B3_F0%d", 61);
885 mBlocks = geom->MakeBox(no_Block,Iron,3,8,2);
886 mBlocks->SetLineColor(2);
887 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-88,49));
888
889 sprintf(no_Block, "B3_F0%d", 62);
890 mBlocks = geom->MakeBox(no_Block,Iron,0.5,8,24);
891 mBlocks->SetLineColor(2);
892 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.9,-88,23));
893 sprintf(no_Block, "B3_F0%d", 63);
894 mBlocks = geom->MakeBox(no_Block,Iron,2,7,24);
895 mBlocks->SetLineColor(12);
896 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-88,23));
897 sprintf(no_Block, "B3_F0%d", 64);
898 mBlocks = geom->MakeBox(no_Block,Iron,0.5,8,24);
899 mBlocks->SetLineColor(2);
900 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-0.1,-88,23));
901
902 sprintf(no_Block, "B3_F0%d", 65);
903 mBlocks = geom->MakeBox(no_Block,Iron,3,8,4);
904 mBlocks->SetLineColor(2);
905 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-88,-5));
906
907/////////////////////////////// Left-Side
908 nF = 6;nW = 6;
909
910 sprintf(no_Block, "B3_F2%d",7);
911 mBlocks = geom->MakeBox(no_Block,Iron,7,40.5,2);
912 mBlocks->SetLineColor(2);
913 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-43.5,49));
914
915 for (F=0 ; F<nF ; F++){ N=0;
916 for (i = 0 ; i<nW ; i++){
917 sprintf(no_Block, "B3_F2%d_%d",F,++N);
918 mBlocks = geom->MakeBox(no_Block,Iron,6,2.35,2);
919 mBlocks->SetLineColor(12);
920 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-14.35-(12*i),5 + (8*F)));
921 sprintf(no_Block, "B3_F2%d_%d",F,++N);
922 mBlocks = geom->MakeBox(no_Block,Iron,6.5,0.3,2);
923 mBlocks->SetLineColor(18);
924 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-17-(12*i),5 + (8*F)));
925 sprintf(no_Block, "B3_F2%d_%d",F,++N);
926 mBlocks = geom->MakeBox(no_Block,Iron,6,2.35,2);
927 mBlocks->SetLineColor(12);
928 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-19.65-(12*i),5 + (8*F)));
929
930 sprintf(no_Block, "B3_F2%d_%d",F,++N);
931 mBlocks = geom->MakeBox(no_Block,Iron,7,1,2);
932 mBlocks->SetLineColor(2);
933 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-23-(12*i),5 + (8*F)));
934 }
935
936 sprintf(no_Block, "B3_F2%d_%d",F,++N);
937 mBlocks = geom->MakeBox(no_Block,Iron,6.8,36,0.3);
938 mBlocks->SetLineColor(18);
939 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-48,3.3 + (8*F)));
940
941 sprintf(no_Block, "B3_F2%d_%d",F,++N);
942 mBlocks = geom->MakeBox(no_Block,Iron,7,36,2);
943 mBlocks->SetLineColor(2);
944 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-48,1 + (8*F)));
945
946 for(int i=0;i<4;i++){
947 sprintf(no_Block, "B3_F2%d_%d",F,++N);
948 mBlocks = geom->MakeBox(no_Block,Iron,7,0.5,1.4);
949 mBlocks->SetLineColor(2);
950 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-3.5,5.6 + (8*F)));
951
952 sprintf(no_Block, "B3_F2%d_%d",F,++N);
953 mBlocks = geom->MakeBox(no_Block,Iron,6,0.7,1.4);
954 mBlocks->SetLineColor(12);
955 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-4.7,5.6 + (8*F)));
956
957 sprintf(no_Block, "B3_F2%d_%d",F,++N);
958 mBlocks = geom->MakeBox(no_Block,Iron,7,1.6,1.4);
959 mBlocks->SetLineColor(2);
960 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-7,5.6 + (8*F)));
961
962 sprintf(no_Block, "B3_F2%d_%d",F,++N);
963 mBlocks = geom->MakeBox(no_Block,Iron,6,0.7,1.4);
964 mBlocks->SetLineColor(12);
965 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-9.3,5.6 + (8*F)));
966 }
967
968 sprintf(no_Block, "B3_F2%d_%d",F,++N);
969 mBlocks = geom->MakeBox(no_Block,Iron,7,3.5,2.6);
970 mBlocks->SetLineColor(2);
971 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-6.5,1.6 + (8*F)));
972 }
973
974 sprintf(no_Block, "B3_F2%d",71);
975 mBlocks = geom->MakeBox(no_Block,Iron,7,40.5,4);
976 mBlocks->SetLineColor(2);
977 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-43.5,-5));
978
979 sprintf(no_Block, "B3_F2%d",72);
980 mBlocks = geom->MakeBox(no_Block,Iron,7,2,30);
981 mBlocks->SetLineColor(2);
982 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-86,21));
983
984 sprintf(no_Block, "B3_F2%d",73);
985 mBlocks = geom->MakeBox(no_Block,Iron,7,1,30);
986 mBlocks->SetLineColor(2);
987 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.4,-11,21));
988
989
990
991//////////////////////////////////// Rooftop
992 sprintf(no_Block, "B3_RT%d",N = 0);
993 mBlocks = geom->MakeBox(no_Block,Iron,7,42.25,0.1);
994 mBlocks->SetLineColor(18);
995 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.15,-45.5,51.1));
996 sprintf(no_Block, "B3_RT%d", ++N);
997 mBlocks = geom->MakeBox(no_Block,Iron,2.75,41.75,0.1);
998 mBlocks->SetLineColor(18);
999 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-54,51.1));
1000
1001 sprintf(no_Block, "B3_RT%d", ++N);
1002 mBlocks = geom->MakeBox(no_Block,Iron,0.24,41.99,0.5);
1003 mBlocks->SetLineColor(18);
1004 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(5.15,-53.99,51.5));
1005 sprintf(no_Block, "B3_RT%d", ++N);
1006 mBlocks = geom->MakeBox(no_Block,Iron,0.01,42,0.5);
1007 mBlocks->SetLineColor(2);
1008 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(5.4,-54,51.5));
1009
1010 sprintf(no_Block, "B3_RT%d", ++N);
1011 mBlocks = geom->MakeBox(no_Block,Iron,0.24,3.99,0.5);
1012 mBlocks->SetLineColor(18);
1013 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-0.35,-92,51.5));
1014 sprintf(no_Block, "B3_RT%d", ++N);
1015 mBlocks = geom->MakeBox(no_Block,Iron,0.01,4,0.5);
1016 mBlocks->SetLineColor(2);
1017 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-0.6,-92,51.5));
1018
1019 sprintf(no_Block, "B3_RT%d", ++N);
1020 mBlocks = geom->MakeBox(no_Block,Iron,2.99,0.24,0.5);
1021 mBlocks->SetLineColor(18);
1022 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-95.79,51.5));
1023 sprintf(no_Block, "B3_RT%d", ++N);
1024 mBlocks = geom->MakeBox(no_Block,Iron,3,0.01,0.5);
1025 mBlocks->SetLineColor(2);
1026 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(2.4,-96.04,51.5));
1027
1028 sprintf(no_Block, "B3_RT%d",++N);
1029 mBlocks = geom->MakeBox(no_Block,Iron,0.24,42.49,0.5);
1030 mBlocks->SetLineColor(18);
1031 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-14.14,-45.5,51.5));
1032 sprintf(no_Block, "B3_RT%d",++N);
1033 mBlocks = geom->MakeBox(no_Block,Iron,0.01,42.5,0.5);
1034 mBlocks->SetLineColor(2);
1035 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-14.39,-45.5,51.5));
1036
1037
1038/////////////////////// Stair
1039 sprintf(no_Block, "B3_RT%d",++N);
1040 mBlocks = geom->MakeBox(no_Block,Iron,6.99,0.24,0.5);
1041 mBlocks->SetLineColor(18);
1042 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.15,-3.25,51.5));
1043 sprintf(no_Block, "B3_RT%d",++N);
1044 mBlocks = geom->MakeBox(no_Block,Iron,7,0.01,0.5);
1045 mBlocks->SetLineColor(2);
1046 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.15,-3,51.5));
1047
1048 sprintf(no_Block, "B3_RT%d",++N);
1049 mBlocks = geom->MakeBox(no_Block,Iron,7,0.25,0.5);
1050 mBlocks->SetLineColor(18);
1051 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.15,-87.74,51.5));
1052 sprintf(no_Block, "B3_RT%d",++N);
1053 mBlocks = geom->MakeBox(no_Block,Iron,7,0.01,0.5);
1054 mBlocks->SetLineColor(2);
1055 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-7.15,-87.99,51.5));
1056
1057
1058
1059/////////////////////////////// Pillars
1060 N=0;
1061 for (i=0 ; i<6; i++) {
1062 sprintf(no_Block, "B3_PF%d", ++N);
1063 mBlocks = geom->MakeBox(no_Block,Iron,1.2,1.5,12);
1064 mBlocks->SetLineColor(2);
1065 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.6,-12-(12*i),3));
1066 }
1067 sprintf(no_Block, "B3_PF%d", ++N);
1068 mBlocks = geom->MakeBox(no_Block,Iron,1.5,40,2);
1069 mBlocks->SetLineColor(2);
1070 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(7,-56,-5));
1071
1072
1073////////////////////////////// Stair
1074 sprintf(no_Block, "B3_ST%d",N=0);
1075 mBlocks = geom->MakeBox(no_Block,Iron,0.5,7,5);
1076 mBlocks->SetLineColor(18);
1077 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-6.5,-88,-2));
1078
1079 for(int i=0;i<5;i++){
1080 sprintf(no_Block, "B3_ST%d",++N);
1081 mBlocks = geom->MakeBox(no_Block,Iron,3,5,0.5);
1082 mBlocks->SetLineColor(18);
1083 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3,-86-(0.7*i),-2-(1*i)));
1084 }
1085
1086
1087///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1088//////////////////////////////// Mid-Building ///////////////////////////////
1089///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1090
1091////////////////////////////////////// Left-Side
1092
1093 for(int F=0;F<5;F++){ N=0;
1094 sprintf(no_Block, "B4_LF%d_%d",F,++N);
1095 mBlocks = geom->MakeBox(no_Block,Iron,5.5,12.5,2.3);
1096 mBlocks->SetLineColor(2);
1097 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,-7.5,9.6+(8*F)));
1098
1099 sprintf(no_Block, "B4_LF%d_%d",F,++N);
1100 mBlocks = geom->MakeBox(no_Block,Iron,5.5,2,1.7);
1101 mBlocks->SetLineColor(2);
1102 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,3,13.6+(8*F)));
1103
1104 sprintf(no_Block, "B4_LF%d_%d",F,++N);
1105 mBlocks = geom->MakeBox(no_Block,Iron,5,10.5,1.7);
1106 mBlocks->SetLineColor(12);
1107 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,-9.5,13.6+(8*F)));
1108 }
1109
1110 sprintf(no_Block, "B4_LF%d_%d",9,N=0);
1111 mBlocks = geom->MakeBox(no_Block,Iron,5.5,12.5,6);
1112 mBlocks->SetLineColor(2);
1113 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,-7.5,53));
1114
1115 sprintf(no_Block, "B4_LF%d_%d",9,++N);
1116 mBlocks = geom->MakeBox(no_Block,Iron,5.5,2,4.5);
1117 mBlocks->SetLineColor(2);
1118 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,3,3));
1119 sprintf(no_Block, "B4_LF%d_%d",9,++N);
1120 mBlocks = geom->MakeBox(no_Block,Iron,5,10.5,4.5);
1121 mBlocks->SetLineColor(12);
1122 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,-9.5,3));
1123
1124 sprintf(no_Block, "B4_LF%d_%d",9,++N);
1125 mBlocks = geom->MakeBox(no_Block,Iron,5.5,12.5,5);
1126 mBlocks->SetLineColor(2);
1127 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,-7.5,-3));
1128
1129
1130
1131
1132///////////////////////////////////// Right-Side
1133 sprintf(no_Block, "B4_RS%d",++N);
1134 mBlocks = geom->MakeBox(no_Block,Iron,4.25,11,24);
1135 mBlocks->SetLineColor(12);
1136 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.25,-9,19));
1137 sprintf(no_Block, "B4_RS%d",++N);
1138 mBlocks = geom->MakeBox(no_Block,Iron,0.25,4,32);
1139 mBlocks->SetLineColor(2);
1140 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(8.75,2,27));
1141
1142
1143 sprintf(no_Block, "B4_RS%d",++N);
1144 mBlocks = geom->MakeBox(no_Block,Iron,4.5,2,1.8);
1145 mBlocks->SetLineColor(2);
1146 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,0,44.8));
1147 sprintf(no_Block, "B4_RS%d",++N);
1148 mBlocks = geom->MakeBox(no_Block,Iron,5.5,3.5,5);
1149 mBlocks->SetLineColor(20);
1150 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-12.5,0,-4));
1151 sprintf(no_Block, "B4_RS%d",++N);
1152 mBlocks = geom->MakeBox(no_Block,Iron,6,2,0.3);
1153 mBlocks->SetLineColor(18);
1154 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-4,46.3));
1155 sprintf(no_Block, "B4_RS%d",++N);
1156 mBlocks = geom->MakeBox(no_Block,Iron,4,2,1.5);
1157 mBlocks->SetLineColor(12);
1158 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-4,44.5));
1159 sprintf(no_Block, "B4_RS%d",++N);
1160 mBlocks = geom->MakeBox(no_Block,Iron,4.5,7,1.8);
1161 mBlocks->SetLineColor(2);
1162 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-13,44.8));
1163
1164 sprintf(no_Block, "B4_RS%d",++N);
1165 mBlocks = geom->MakeBox(no_Block,Iron,4.5,11,1.8);
1166 mBlocks->SetLineColor(2);
1167 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-9,48.4));
1168
1169 sprintf(no_Block, "B4_RS%d",++N);
1170 mBlocks = geom->MakeBox(no_Block,Iron,4.25,1.5,2);
1171 mBlocks->SetLineColor(12);
1172 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-0,52.2));
1173 sprintf(no_Block, "B4_RS%d",++N);
1174 mBlocks = geom->MakeBox(no_Block,Iron,4,2,2);
1175 mBlocks->SetLineColor(12);
1176 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-4,52.2));
1177 sprintf(no_Block, "B4_RS%d",++N);
1178 mBlocks = geom->MakeBox(no_Block,Iron,4.5,7,2);
1179 mBlocks->SetLineColor(2);
1180 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-13,52.2));
1181
1182
1183 sprintf(no_Block, "B4_RS%d",++N);
1184 mBlocks = geom->MakeBox(no_Block,Iron,4.5,11,2.4);
1185 mBlocks->SetLineColor(2);
1186 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-9,56.6));
1187
1188///////////////////////////////// RoofTop
1189 sprintf(no_Block, "B4_RT%d",N=0);
1190 mBlocks = geom->MakeBox(no_Block,Iron,4.25,10.9,0.2);
1191 mBlocks->SetLineColor(18);
1192 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(4.5,-9,59));
1193 sprintf(no_Block, "B4_RT%d",++N);
1194 mBlocks = geom->MakeBox(no_Block,Iron,5.25,12.4,0.2);
1195 mBlocks->SetLineColor(18);
1196 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,-7.5,59));
1197
1198 sprintf(no_Block, "B4_RT%d",++N);
1199 mBlocks = geom->MakeBox(no_Block,Iron,0.24,12.4,0.5);
1200 mBlocks->SetLineColor(18);
1201 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-8.79,-7.5,59.3));
1202 sprintf(no_Block, "B4_RT%d",++N);
1203 mBlocks = geom->MakeBox(no_Block,Iron,0.01,12.4,0.5);
1204 mBlocks->SetLineColor(2);
1205 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-9.06,-7.5,59.3));
1206
1207 sprintf(no_Block, "B4_RT%d",++N);
1208 mBlocks = geom->MakeBox(no_Block,Iron,0.24,13,0.5);
1209 mBlocks->SetLineColor(18);
1210 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(8.75,-7,59.3));
1211 sprintf(no_Block, "B4_RT%d",++N);
1212 mBlocks = geom->MakeBox(no_Block,Iron,0.01,13,0.5);
1213 mBlocks->SetLineColor(2);
1214 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(9,-7,59.3));
1215
1216 sprintf(no_Block, "B4_RT%d",++N);
1217 mBlocks = geom->MakeBox(no_Block,Iron,8.75,0.24,0.5);
1218 mBlocks->SetLineColor(18);
1219 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,-19.75,59.3));
1220 sprintf(no_Block, "B4_RT%d",++N);
1221 mBlocks = geom->MakeBox(no_Block,Iron,8.75,0.01,0.5);
1222 mBlocks->SetLineColor(2);
1223 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(0,-20.01,59.3));
1224
1225 sprintf(no_Block, "B4_RT%d",++N);
1226 mBlocks = geom->MakeBox(no_Block,Iron,5.25,0.24,0.5);
1227 mBlocks->SetLineColor(18);
1228 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.5,4.55,59.3));
1229 sprintf(no_Block, "B4_RT%d",++N);
1230 mBlocks = geom->MakeBox(no_Block,Iron,5.5,0.01,0.5);
1231 mBlocks->SetLineColor(2);
1232 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(-3.75,5.1,59.3));
1233
1234 sprintf(no_Block, "B4_RT%d",++N);
1235 mBlocks = geom->MakeBox(no_Block,Iron,3.5,0.24,0.5);
1236 mBlocks->SetLineColor(18);
1237 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(5,1.55,59.3));
1238 sprintf(no_Block, "B4_RT%d",++N);
1239 mBlocks = geom->MakeBox(no_Block,Iron,3.5,0.01,0.5);
1240 mBlocks->SetLineColor(2);
1241 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(5,2.1,59.3));
1242
1243///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1244//////////////////////////////// GROUND ///////////////////////////////
1245///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1246
1247 sprintf(no_Block, "GRD%d",++N);
1248 mBlocks = geom->MakeBox(no_Block,Iron,40,90,2);
1249 mBlocks->SetLineColor(30);
1250 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(5,-20,-9));
1251
1252 sprintf(no_Block, "GRD%d",++N);
1253 mBlocks = geom->MakeBox(no_Block,Iron,30,30,2);
1254 mBlocks->SetLineColor(41);
1255 Phy_Building->AddNodeOverlap(mBlocks,1,new TGeoTranslation(5,30,-5));
1256 geom->CloseGeometry();
1257
1258
1259
1260
1261////////////////////////// Draw
1262 Phy_Building->SetVisibility(false);
1263 Phy_Building->Draw("ogl");
1264
1265
1266}
#define N
Class describing rotation + translation.
Definition TGeoMatrix.h:317
The manager class for any TGeo geometry.
Definition TGeoManager.h:44
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 * MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz)
Make in one step a volume pointing to a TGeoTrd1 shape with given medium.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition TGeoMedium.h:23
Class describing rotations.
Definition TGeoMatrix.h:168
Class describing translations.
Definition TGeoMatrix.h:116
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
void SetVisibility(Bool_t vis=kTRUE) override
set visibility of this volume
void Draw(Option_t *option="") override
draw top volume according to option
virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
void SetLineColor(Color_t lcolor) override
Set the line color.
#define F(x, y, z)