Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
tank.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_geom
3/// Drawing a fine tank, 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 tank.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_tank.png width=800px
14/// \macro_code
15///
16/// \author Dong Gyu Lee (ravirus@hanmail.net), Dept. of Physics, Univ. of Seoul
17
18#include "TGeoManager.h"
19
20void tank()
21{
22 TGeoManager *geom = new TGeoManager("geom","My 3D Project");
23
24//------------------Creat materials-----------------------------
25 TGeoMaterial *vacuum = new TGeoMaterial("vacuum",0,0,0);
26 TGeoMaterial *Fe = new TGeoMaterial("Fe",55.84,26.7,7.87);
27 TGeoMaterial *Cu = new TGeoMaterial("Cu",63.549,29,8.92);
28
29//------------------Creat media----------------------------------
30 TGeoMedium *Air = new TGeoMedium("Air",0,vacuum);
31 TGeoMedium *Iron = new TGeoMedium("Iron",1,Fe);
32
33//------------------Create TOP volume----------------------------
34 TGeoVolume *top = geom->MakeBox("top",Air,100,100,100);
35 geom->SetTopVolume(top);
36 geom->SetTopVisible(false);
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//-----------------Create Object volume--------------------------
42
43
44//Now, we start real shape
45
46//UpperBody
47 TGeoVolume *pl=geom->MakeBox("pl",Iron,210,93,20);
48 pl->SetLineColor(42);
49 TGeoVolume *pl1=geom->MakeBox("pl1",Iron,217,50,5);
50 pl1->SetLineColor(42);
51 TGeoVolume *pl2=geom->MakeTrd2("pl2",Iron,219,150,50,40,10);
52 pl2->SetLineColor(42);
53 TGeoVolume *plu=geom->MakeTrd2("plu",Iron,210,70,100,100,5);
54 plu->SetLineColor(42);
55 top->AddNodeOverlap(plu,1,new TGeoTranslation(0,0,-105));
56 TGeoVolume *sp=geom->MakeTubs("sp",Iron,30,40,50,10,60);//Small Plate front
57 sp->SetLineColor(42);
58
59//Top which will have the gun
60 TGeoVolume *tp=geom->MakeSphere("tp",Iron,0,100,67,90,0,360);//tp is Top with gun
61 tp->SetLineColor(12);
62 TGeoVolume *tp1=geom->MakeSphere("tp1",Iron,90,190,0,29,0,360);//tp1 is Top with roof
63 tp1->SetLineColor(12);
64 TGeoVolume *mgg=geom->MakeTubs("mgg",Iron,0,25,30,42,136);//Main Gun Guard
65 mgg->SetLineColor(12);
66 TGeoVolume *mgg1=geom->MakeTrd2("mgg1",Iron,30.5,45,19,30,35);
67 mgg1->SetLineColor(12);
68
69 top->AddNodeOverlap(mgg1,1,new TGeoCombiTrans(-57,0,-63,new TGeoRotation("mgg",90,90,0)));
70 top->AddNodeOverlap(mgg,1,new TGeoCombiTrans(-75,0,-63,new TGeoRotation("mgg",0,90,90)));
71
72//Small Top infront Top
73 TGeoVolume *stp=geom->MakeSphere("stp",Iron,0,30,67,90,0,360);//Top for driver
74 stp->SetLineColor(12);
75 TGeoVolume *stp1=geom->MakeSphere("stp1",Iron,115,120,0,12,0,360);//Top with roof
76 stp1->SetLineColor(12);
77 TGeoVolume *stpo1=geom->MakeBox("stpo1",Iron,3,1,5);
78 stpo1->SetLineColor(42);//Small T P Option 1
79
80 top->AddNodeOverlap(stpo1,1,new TGeoTranslation(-93,-32,-95));
81 top->AddNodeOverlap(stpo1,1,new TGeoTranslation(-93,-38,-95));
82 top->AddNodeOverlap(stp,1,new TGeoTranslation(-120,-35,-108));
83 top->AddNodeOverlap(stp1,1,new TGeoCombiTrans(-185,-35,-168,new TGeoRotation("stp1",90,40,0)));
84
85//The Main Gun1 with AddNodeOverlap
86 TGeoVolume *mg1=geom->MakeCone("mg1",Iron,160,4,5,4,7);
87 mg1->SetLineColor(12);
88 top->AddNodeOverlap(mg1,1,new TGeoCombiTrans(-220,0,-53,new TGeoRotation("bs",90,94,0)));
89 TGeoVolume *mg1o1=geom->MakeCone("mg1o1",Iron,40,4.1,8,4.1,8);
90 mg1o1->SetLineColor(12);//
91 top->AddNodeOverlap(mg1o1,1,new TGeoCombiTrans(-220,0,-53,new TGeoRotation("bs",90,94,0)));
92
93
94//Underbody
95 TGeoVolume *underbody=geom->MakeTrd2("underbody",Iron,160,210,93,93,30);
96 underbody->SetLineColor(28);
97 TGeoVolume *bs=geom->MakeTubs("bs",Iron,0,20,93,10,270);
98 bs->SetLineColor(42);
99 TGeoVolume *bsp=geom->MakeTubs("bsp",Iron,0,20,30,10,270);
100 bsp->SetLineColor(42);
101
102 TGeoVolume *Tip=geom->MakeCone("Tip",Iron,21,0,24,0,24); //Tip is wheel
103 Tip->SetLineColor(12);
104 TGeoVolume *Tip1=geom->MakeCone("Tip1",Iron,10,23,30,25,30);
105 Tip1->SetLineColor(14);
106 TGeoVolume *Tip2=geom->MakeCone("Tip2",Iron,30,0,7,0,7);
107 Tip2->SetLineColor(42);
108
109 TGeoVolume *wheel=geom->MakeCone("wheel",Iron,30,0,7,0,7);
110 wheel->SetLineColor(42);
111 TGeoVolume *wheel1=geom->MakeCone("wheel1",Iron,21,0,16,0,16); //innner wheel
112 wheel1->SetLineColor(14);
113 TGeoVolume *wheel2=geom->MakeCone("wheel2",Iron,10,15,22,15,22); //outter wheel
114 wheel2->SetLineColor(12);
115
116 TGeoVolume *Tip0=geom->MakeCone("Tip0",Iron,30,0,7,0,7);
117 Tip0->SetLineColor(12);
118 TGeoVolume *Tip01=geom->MakeCone("Tip01",Iron,10,7,10.5,7,10.5);
119 Tip0->SetLineColor(14);
120
121//cycle of chain with AddNodeOverlap
122 char name[50];
123 TGeoVolume *WH;//piece of chain
124 TGeoVolume *whp;
125 TGeoVolume *who;
126
127 //consist upper chain
128 for(int i=0;i<26;i++){
129 sprintf(name,"wh%d",i);
130 WH = geom->MakeBox(name,Iron,5.5,22,2);
131 whp = geom->MakeBox(name,Iron,5,2.1,4);
132 who = geom->MakeBox(name,Iron,2,6,1);
133 WH->SetLineColor(12);
134 whp->SetLineColor(14);
135 who->SetLineColor(42);
136 top->AddNodeOverlap(WH,1,new TGeoTranslation(-195+(15*i),-120,-125));
137 top->AddNodeOverlap(WH,1,new TGeoTranslation(-195+(15*i),120,-125));
138
139 top->AddNodeOverlap(whp,1,new TGeoTranslation(-195+(15*i),-120,-127));
140 top->AddNodeOverlap(whp,1,new TGeoTranslation(-195+(15*i),120,-127));
141
142 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195+(15*i),-127,-123, new TGeoRotation("who",-15,0,0)));
143 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195+(15*i),-113,-123, new TGeoRotation("who",15,0,0)));
144 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195+(15*i),127,-123, new TGeoRotation("who",15,0,0)));
145 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195+(15*i),113,-123, new TGeoRotation("who",-15,0,0)));
146
147 }
148 //chain connector
149 TGeoVolume *WHl = geom->MakeBox(name,Iron,187.5,5,1);
150 WHl->SetLineColor(12);
151 top->AddNodeOverlap(WHl,1,new TGeoTranslation(-7.5,-129,-125));
152 top->AddNodeOverlap(WHl,1,new TGeoTranslation(-7.5,-111,-125));
153 top->AddNodeOverlap(WHl,1,new TGeoTranslation(-7.5,111,-125));
154 top->AddNodeOverlap(WHl,1,new TGeoTranslation(-7.5,129,-125));
155
156 //just one side
157 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(34*(3.14/180))),-120,-150+(25*cos(34*(3.14/180))), new TGeoRotation("who",90,34,-90)));
158 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(68*(3.14/180))),-120,-150+(25*cos(68*(3.14/180))), new TGeoRotation("who",90,68,-90)));
159 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(102*(3.14/180))),-120,-150+(25*cos(102*(3.14/180))), new TGeoRotation("who",90,102,-90)));
160 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180))),-120,-150+(25*cos(136*(3.14/180))), new TGeoRotation("who",90,136,-90)));
161
162 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-12,-120,-150+(25*cos(136*(3.14/180)))-10, new TGeoRotation("who",90,140,-90)));
163 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-24,-120,-150+(25*cos(136*(3.14/180)))-20, new TGeoRotation("who",90,142,-90)));
164 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-37,-120,-150+(25*cos(136*(3.14/180)))-30, new TGeoRotation("who",90,145,-90)));
165 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-50,-120,-150+(25*cos(136*(3.14/180)))-40, new TGeoRotation("who",90,149,-90)));
166
167 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(34*(3.14/180))),-120,-150+(22.8*cos(34*(3.14/180))), new TGeoRotation("whp",90,34,-90)));
168 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(68*(3.14/180))),-120,-150+(22.8*cos(68*(3.14/180))), new TGeoRotation("whp",90,68,-90)));
169 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(102*(3.14/180))),-120,-150+(22.8*cos(102*(3.14/180))), new TGeoRotation("whp",90,102,-90)));
170 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180))),-120,-150+(22.8*cos(136*(3.14/180))), new TGeoRotation("whp",90,136,-90)));
171
172 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-12,-120,-150+(22.8*cos(136*(3.14/180)))-10, new TGeoRotation("whp",90,140,-90)));
173 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-24,-120,-150+(22.8*cos(136*(3.14/180)))-20, new TGeoRotation("whp",90,142,-90)));
174 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-37,-120,-150+(22.8*cos(136*(3.14/180)))-30, new TGeoRotation("whp",90,145,-90)));
175 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-50,-120,-150+(22.8*cos(136*(3.14/180)))-40, new TGeoRotation("whp",90,149,-90)));
176
177 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(34*(3.14/180))),-127,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",97.5,34,-97.5)));
178 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(68*(3.14/180))),-127,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",97.5,68,-97.5)));
179 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(102*(3.14/180))),-127,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",97.5,102,-97.5)));
180 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180))),-127,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",97.5,136,-97.5)));
181
182 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-12,-127,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",97.5,140,-97.5)));
183 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-24,-127,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",97.5,142,-97.5)));
184 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-37,-127,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",97.5,145,-97.5)));
185 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-50,-127,-150+(27*cos(136*(3.14/180)))-40, new TGeoRotation("who",97.5,149,-97.5)));
186//--------------------------
187 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(34*(3.14/180))),-113,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",82.5,34,-82.5)));
188 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(68*(3.14/180))),-113,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",82.5,68,-82.5)));
189 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(102*(3.14/180))),-113,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",82.5,102,-82.5)));
190 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180))),-113,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",82.5,136,-82.5)));
191
192 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-12,-113,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",82.5,140,-82.5)));
193 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-24,-113,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",82.5,142,-82.5)));
194 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-37,-113,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",82.5,145,-82.5)));
195 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-50,-113,-150+(27*cos(136*(3.14/180)))-40, new TGeoRotation("who",82.5,149,-82.5)));
196
197
198 TGeoVolume *chc0=geom->MakeTubs("chc0",Iron,24.5,26.5,5,-34,0);//Small Plate front
199 chc0->SetLineColor(12);
200 TGeoVolume *chc1=geom->MakeTubs("chc1",Iron,24.5,26.5,5,-68,-34);//Small Plate front
201 chc1->SetLineColor(12);
202 TGeoVolume *chc2=geom->MakeTubs("chc2",Iron,24.5,26.5,5,-102,-68);//Small Plate front
203 chc2->SetLineColor(12);
204 TGeoVolume *chc3=geom->MakeTubs("chc3",Iron,24.5,26.5,5,-136,-102);//Small Plate front
205 chc3->SetLineColor(12);
206
207 top->AddNodeOverlap(chc0,1,new TGeoCombiTrans(180,-129,-150,new TGeoRotation("chc0",0,90,90)));
208 top->AddNodeOverlap(chc1,1,new TGeoCombiTrans(180,-129,-150,new TGeoRotation("chc1",0,90,90)));
209 top->AddNodeOverlap(chc2,1,new TGeoCombiTrans(180,-129,-150,new TGeoRotation("chc2",0,90,90)));
210 top->AddNodeOverlap(chc3,1,new TGeoCombiTrans(180,-129,-150,new TGeoRotation("chc3",0,90,90)));
211
212 top->AddNodeOverlap(chc0,1,new TGeoCombiTrans(180,-111,-150,new TGeoRotation("chc0",0,90,90)));
213 top->AddNodeOverlap(chc1,1,new TGeoCombiTrans(180,-111,-150,new TGeoRotation("chc1",0,90,90)));
214 top->AddNodeOverlap(chc2,1,new TGeoCombiTrans(180,-111,-150,new TGeoRotation("chc2",0,90,90)));
215 top->AddNodeOverlap(chc3,1,new TGeoCombiTrans(180,-111,-150,new TGeoRotation("chc3",0,90,90)));
216
217 TGeoVolume *chcl=geom->MakeBox("chcl",Iron,5,5,1);
218 chcl->SetLineColor(12);
219 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-6,-111,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,140,-90)));
220 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-18,-111,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,142,-90)));
221 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-30,-111,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,145,-90)));
222 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-43,-111,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,149,-90)));
223
224 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-6,-129,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,140,-90)));
225 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-18,-129,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,142,-90)));
226 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-30,-129,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,145,-90)));
227 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-43,-129,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,149,-90)));
228
229 TGeoVolume *chc4=geom->MakeTubs("chc4",Iron,31.5,34.5,5,-175,-145);//Small Plate front
230 chc4->SetLineColor(12);
231 top->AddNodeOverlap(chc4,1,new TGeoCombiTrans(130,-111,-180,new TGeoRotation("chc3",0,90,90)));
232 top->AddNodeOverlap(chc4,1,new TGeoCombiTrans(130,-129,-180,new TGeoRotation("chc3",0,90,90)));
233
234 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(34*(3.14/180))),-120,-150+(25*cos(34*(3.14/180))), new TGeoRotation("who",90,-34,-90)));
235 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(68*(3.14/180))),-120,-150+(25*cos(68*(3.14/180))), new TGeoRotation("who",90,-68,-90)));
236 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(102*(3.14/180))),-120,-150+(25*cos(102*(3.14/180))), new TGeoRotation("who",90,-102,-90)));
237 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180))),-120,-150+(25*cos(136*(3.14/180))), new TGeoRotation("who",90,-136,-90)));
238
239 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+12,-120,-150+(25*cos(136*(3.14/180)))-10, new TGeoRotation("who",90,-140,-90)));
240 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+24,-120,-150+(25*cos(136*(3.14/180)))-20, new TGeoRotation("who",90,-142,-90)));
241 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+35,-120,-150+(25*cos(136*(3.14/180)))-30, new TGeoRotation("who",90,-139,-90)));
242 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+48,-120,-150+(25*cos(136*(3.14/180)))-41, new TGeoRotation("who",90,-153,-90)));
243
244
245 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(34*(3.14/180))),-120,-150+(22.8*cos(34*(3.14/180))), new TGeoRotation("whp",90,-34,-90)));
246 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(68*(3.14/180))),-120,-150+(22.8*cos(68*(3.14/180))), new TGeoRotation("whp",90,-68,-90)));
247 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(102*(3.14/180))),-120,-150+(22.8*cos(102*(3.14/180))), new TGeoRotation("whp",90,-102,-90)));
248 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180))),-120,-150+(22.8*cos(136*(3.14/180))), new TGeoRotation("whp",90,-136,-90)));
249
250 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+12,-120,-150+(22.8*cos(136*(3.14/180)))-10, new TGeoRotation("whp",90,-140,-90)));
251 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+24,-120,-150+(22.8*cos(136*(3.14/180)))-20, new TGeoRotation("whp",90,-142,-90)));
252 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+35,-120,-150+(22.8*cos(136*(3.14/180)))-30, new TGeoRotation("whp",90,-139,-90)));
253 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+48,-120,-150+(22.8*cos(136*(3.14/180)))-41, new TGeoRotation("whp",90,-153,-90)));
254
255
256 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(34*(3.14/180))),-127,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",97.5,-34,-97.5)));
257 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(68*(3.14/180))),-127,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",97.5,-68,-97.5)));
258 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(102*(3.14/180))),-127,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",97.5,-102,-97.5)));
259 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180))),-127,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",97.5,-136,-97.5)));
260
261 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+12,-127,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",97.5,-140,-97.5)));
262 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+24,-127,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",97.5,-142,-97.5)));
263 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+35,-127,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",97.5,-139,-97.5)));
264 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+48,-127,-150+(27*cos(136*(3.14/180)))-41, new TGeoRotation("who",97.5,-153,-97.5)));
265//-------------------------
266 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(34*(3.14/180))),-113,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",82.5,-34,-82.5)));
267 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(68*(3.14/180))),-113,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",82.5,-68,-82.5)));
268 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(102*(3.14/180))),-113,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",82.5,-102,-82.5)));
269 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180))),-113,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",82.5,-136,-82.5)));
270
271 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+12,-113,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",82.5,-140,-82.5)));
272 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+24,-113,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",82.5,-142,-82.5)));
273 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+35,-113,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",82.5,-139,-82.5)));
274 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+48,-113,-150+(27*cos(136*(3.14/180)))-41, new TGeoRotation("who",82.5,-153,-82.5)));
275
276
277 TGeoVolume *chc0i=geom->MakeTubs("chc0i",Iron,24.5,26.5,5,0,34);//Small Plate front
278 chc0i->SetLineColor(12);
279 TGeoVolume *chc1i=geom->MakeTubs("chc1i",Iron,24.5,26.5,5,34,68);//Small Plate front
280 chc1i->SetLineColor(12);
281 TGeoVolume *chc2i=geom->MakeTubs("chc2i",Iron,24.5,26.5,5,68,102);//Small Plate front
282 chc2i->SetLineColor(12);
283 TGeoVolume *chc3i=geom->MakeTubs("chc3i",Iron,24.5,26.5,5,102,136);//Small Plate front
284 chc3i->SetLineColor(12);
285
286 top->AddNodeOverlap(chc0i,1,new TGeoCombiTrans(-195,-129,-150,new TGeoRotation("chc0",0,90,90)));
287 top->AddNodeOverlap(chc1i,1,new TGeoCombiTrans(-195,-129,-150,new TGeoRotation("chc1",0,90,90)));
288 top->AddNodeOverlap(chc2i,1,new TGeoCombiTrans(-195,-129,-150,new TGeoRotation("chc2",0,90,90)));
289 top->AddNodeOverlap(chc3i,1,new TGeoCombiTrans(-195,-129,-150,new TGeoRotation("chc3",0,90,90)));
290
291 top->AddNodeOverlap(chc0i,1,new TGeoCombiTrans(-195,-111,-150,new TGeoRotation("chc0",0,90,90)));
292 top->AddNodeOverlap(chc1i,1,new TGeoCombiTrans(-195,-111,-150,new TGeoRotation("chc1",0,90,90)));
293 top->AddNodeOverlap(chc2i,1,new TGeoCombiTrans(-195,-111,-150,new TGeoRotation("chc2",0,90,90)));
294 top->AddNodeOverlap(chc3i,1,new TGeoCombiTrans(-195,-111,-150,new TGeoRotation("chc3",0,90,90)));
295
296 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+06,-129,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,-140,-90)));
297 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+18,-129,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,-142,-90)));
298 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+29,-129,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,-139,-90)));
299 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+41,-129,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,-138,-90)));
300
301 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+06,-111,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,-140,-90)));
302 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+18,-111,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,-142,-90)));
303 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+29,-111,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,-139,-90)));
304 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+41,-111,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,-138,-90)));
305
306 TGeoVolume *chc4i=geom->MakeTubs("chc4i",Iron,31.5,33,5,145,175);//Small Plate front
307 chc4i->SetLineColor(12);
308 top->AddNodeOverlap(chc4i,1,new TGeoCombiTrans(-150,-111,-180,new TGeoRotation("chc3",0,90,90)));
309 top->AddNodeOverlap(chc4i,1,new TGeoCombiTrans(-150,-129,-180,new TGeoRotation("chc3",0,90,90)));
310
311
312//just other side
313
314
315 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(34*(3.14/180))),120,-150+(25*cos(34*(3.14/180))), new TGeoRotation("who",90,34,-90)));
316 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(68*(3.14/180))),120,-150+(25*cos(68*(3.14/180))), new TGeoRotation("who",90,68,-90)));
317 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(102*(3.14/180))),120,-150+(25*cos(102*(3.14/180))), new TGeoRotation("who",90,102,-90)));
318 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180))),120,-150+(25*cos(136*(3.14/180))), new TGeoRotation("who",90,136,-90)));
319
320 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-12,120,-150+(25*cos(136*(3.14/180)))-10, new TGeoRotation("who",90,140,-90)));
321 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-24,120,-150+(25*cos(136*(3.14/180)))-20, new TGeoRotation("who",90,142,-90)));
322 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-37,120,-150+(25*cos(136*(3.14/180)))-30, new TGeoRotation("who",90,145,-90)));
323 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-50,120,-150+(25*cos(136*(3.14/180)))-40, new TGeoRotation("who",90,149,-90)));
324
325 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(34*(3.14/180))),120,-150+(22.8*cos(34*(3.14/180))), new TGeoRotation("whp",90,34,-90)));
326 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(68*(3.14/180))),120,-150+(22.8*cos(68*(3.14/180))), new TGeoRotation("whp",90,68,-90)));
327 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(102*(3.14/180))),120,-150+(22.8*cos(102*(3.14/180))), new TGeoRotation("whp",90,102,-90)));
328 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180))),120,-150+(22.8*cos(136*(3.14/180))), new TGeoRotation("whp",90,136,-90)));
329
330 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-12,120,-150+(22.8*cos(136*(3.14/180)))-10, new TGeoRotation("whp",90,140,-90)));
331 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-24,120,-150+(22.8*cos(136*(3.14/180)))-20, new TGeoRotation("whp",90,142,-90)));
332 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-37,120,-150+(22.8*cos(136*(3.14/180)))-30, new TGeoRotation("whp",90,145,-90)));
333 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(180+(22.8*sin(136*(3.14/180)))-50,120,-150+(22.8*cos(136*(3.14/180)))-40, new TGeoRotation("whp",90,149,-90)));
334
335 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(34*(3.14/180))),113,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",97.5,34,-97.5)));
336 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(68*(3.14/180))),113,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",97.5,68,-97.5)));
337 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(102*(3.14/180))),113,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",97.5,102,-97.5)));
338 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180))),113,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",97.5,136,-97.5)));
339
340 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-12,113,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",97.5,140,-97.5)));
341 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-24,113,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",97.5,142,-97.5)));
342 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-37,113,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",97.5,145,-97.5)));
343 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-50,113,-150+(27*cos(136*(3.14/180)))-40, new TGeoRotation("who",97.5,149,-97.5)));
344//--------------------------
345 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(34*(3.14/180))),127,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",82.5,34,-82.5)));
346 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(68*(3.14/180))),127,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",82.5,68,-82.5)));
347 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(102*(3.14/180))),127,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",82.5,102,-82.5)));
348 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180))),127,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",82.5,136,-82.5)));
349
350 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-12,127,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",82.5,140,-82.5)));
351 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-24,127,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",82.5,142,-82.5)));
352 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-37,127,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",82.5,145,-82.5)));
353 top->AddNodeOverlap(who,1,new TGeoCombiTrans(180+(27*sin(136*(3.14/180)))-50,127,-150+(27*cos(136*(3.14/180)))-40, new TGeoRotation("who",82.5,149,-82.5)));
354
355
356 top->AddNodeOverlap(chc0,1,new TGeoCombiTrans(180,129,-150,new TGeoRotation("chc0",0,90,90)));
357 top->AddNodeOverlap(chc1,1,new TGeoCombiTrans(180,129,-150,new TGeoRotation("chc1",0,90,90)));
358 top->AddNodeOverlap(chc2,1,new TGeoCombiTrans(180,129,-150,new TGeoRotation("chc2",0,90,90)));
359 top->AddNodeOverlap(chc3,1,new TGeoCombiTrans(180,129,-150,new TGeoRotation("chc3",0,90,90)));
360
361 top->AddNodeOverlap(chc0,1,new TGeoCombiTrans(180,111,-150,new TGeoRotation("chc0",0,90,90)));
362 top->AddNodeOverlap(chc1,1,new TGeoCombiTrans(180,111,-150,new TGeoRotation("chc1",0,90,90)));
363 top->AddNodeOverlap(chc2,1,new TGeoCombiTrans(180,111,-150,new TGeoRotation("chc2",0,90,90)));
364 top->AddNodeOverlap(chc3,1,new TGeoCombiTrans(180,111,-150,new TGeoRotation("chc3",0,90,90)));
365
366 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-6,111,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,140,-90)));
367 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-18,111,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,142,-90)));
368 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-30,111,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,145,-90)));
369 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-43,111,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,149,-90)));
370
371 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-6,129,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,140,-90)));
372 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-18,129,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,142,-90)));
373 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-30,129,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,145,-90)));
374 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(180+(25*sin(136*(3.14/180)))-43,129,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,149,-90)));
375
376
377 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(34*(3.14/180))),120,-150+(25*cos(34*(3.14/180))), new TGeoRotation("who",90,-34,-90)));
378 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(68*(3.14/180))),120,-150+(25*cos(68*(3.14/180))), new TGeoRotation("who",90,-68,-90)));
379 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(102*(3.14/180))),120,-150+(25*cos(102*(3.14/180))), new TGeoRotation("who",90,-102,-90)));
380 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180))),120,-150+(25*cos(136*(3.14/180))), new TGeoRotation("who",90,-136,-90)));
381
382 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+12,120,-150+(25*cos(136*(3.14/180)))-10, new TGeoRotation("who",90,-140,-90)));
383 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+24,120,-150+(25*cos(136*(3.14/180)))-20, new TGeoRotation("who",90,-142,-90)));
384 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+35,120,-150+(25*cos(136*(3.14/180)))-30, new TGeoRotation("who",90,-139,-90)));
385 top->AddNodeOverlap(WH,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+48,120,-150+(25*cos(136*(3.14/180)))-41, new TGeoRotation("who",90,-153,-90)));
386
387 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(34*(3.14/180))),120,-150+(22.8*cos(34*(3.14/180))), new TGeoRotation("whp",90,-34,-90)));
388 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(68*(3.14/180))),120,-150+(22.8*cos(68*(3.14/180))), new TGeoRotation("whp",90,-68,-90)));
389 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(102*(3.14/180))),120,-150+(22.8*cos(102*(3.14/180))), new TGeoRotation("whp",90,-102,-90)));
390 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180))),120,-150+(22.8*cos(136*(3.14/180))), new TGeoRotation("whp",90,-136,-90)));
391
392 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+12,120,-150+(22.8*cos(136*(3.14/180)))-10, new TGeoRotation("whp",90,-140,-90)));
393 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+24,120,-150+(22.8*cos(136*(3.14/180)))-20, new TGeoRotation("whp",90,-142,-90)));
394 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+35,120,-150+(22.8*cos(136*(3.14/180)))-30, new TGeoRotation("whp",90,-139,-90)));
395 top->AddNodeOverlap(whp,1,new TGeoCombiTrans(-195-(22.8*sin(136*(3.14/180)))+48,120,-150+(22.8*cos(136*(3.14/180)))-41, new TGeoRotation("whp",90,-153,-90)));
396
397
398 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(34*(3.14/180))),113,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",97.5,-34,-97.5)));
399 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(68*(3.14/180))),113,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",97.5,-68,-97.5)));
400 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(102*(3.14/180))),113,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",97.5,-102,-97.5)));
401 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180))),113,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",97.5,-136,-97.5)));
402
403 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+12,113,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",97.5,-140,-97.5)));
404 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+24,113,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",97.5,-142,-97.5)));
405 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+35,113,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",97.5,-139,-97.5)));
406 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+48,113,-150+(27*cos(136*(3.14/180)))-41, new TGeoRotation("who",97.5,-153,-97.5)));
407//-------------------------
408 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(34*(3.14/180))),127,-150+(27*cos(34*(3.14/180))), new TGeoRotation("who",82.5,-34,-82.5)));
409 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(68*(3.14/180))),127,-150+(27*cos(68*(3.14/180))), new TGeoRotation("who",82.5,-68,-82.5)));
410 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(102*(3.14/180))),127,-150+(27*cos(102*(3.14/180))), new TGeoRotation("who",82.5,-102,-82.5)));
411 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180))),127,-150+(27*cos(136*(3.14/180))), new TGeoRotation("who",82.5,-136,-82.5)));
412
413 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+12,127,-150+(27*cos(136*(3.14/180)))-10, new TGeoRotation("who",82.5,-140,-82.5)));
414 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+24,127,-150+(27*cos(136*(3.14/180)))-20, new TGeoRotation("who",82.5,-142,-82.5)));
415 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+35,127,-150+(27*cos(136*(3.14/180)))-30, new TGeoRotation("who",82.5,-139,-82.5)));
416 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-195-(27*sin(136*(3.14/180)))+48,127,-150+(27*cos(136*(3.14/180)))-41, new TGeoRotation("who",82.5,-153,-82.5)));
417
418
419 top->AddNodeOverlap(chc0i,1,new TGeoCombiTrans(-195,129,-150,new TGeoRotation("chc0",0,90,90)));
420 top->AddNodeOverlap(chc1i,1,new TGeoCombiTrans(-195,129,-150,new TGeoRotation("chc1",0,90,90)));
421 top->AddNodeOverlap(chc2i,1,new TGeoCombiTrans(-195,129,-150,new TGeoRotation("chc2",0,90,90)));
422 top->AddNodeOverlap(chc3i,1,new TGeoCombiTrans(-195,129,-150,new TGeoRotation("chc3",0,90,90)));
423
424 top->AddNodeOverlap(chc0i,1,new TGeoCombiTrans(-195,111,-150,new TGeoRotation("chc0",0,90,90)));
425 top->AddNodeOverlap(chc1i,1,new TGeoCombiTrans(-195,111,-150,new TGeoRotation("chc1",0,90,90)));
426 top->AddNodeOverlap(chc2i,1,new TGeoCombiTrans(-195,111,-150,new TGeoRotation("chc2",0,90,90)));
427 top->AddNodeOverlap(chc3i,1,new TGeoCombiTrans(-195,111,-150,new TGeoRotation("chc3",0,90,90)));
428
429 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+06,129,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,-140,-90)));
430 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+18,129,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,-142,-90)));
431 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+29,129,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,-139,-90)));
432 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+41,129,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,-138,-90)));
433
434 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+06,111,-150+(25*cos(136*(3.14/180)))-5, new TGeoRotation("chcl",90,-140,-90)));
435 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+18,111,-150+(25*cos(136*(3.14/180)))-15, new TGeoRotation("chcl",90,-142,-90)));
436 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+29,111,-150+(25*cos(136*(3.14/180)))-25, new TGeoRotation("chcl",90,-139,-90)));
437 top->AddNodeOverlap(chcl,1,new TGeoCombiTrans(-195-(25*sin(136*(3.14/180)))+41,111,-150+(25*cos(136*(3.14/180)))-35, new TGeoRotation("chcl",90,-138,-90)));
438
439 //consist under chain
440 for(int i=0;i<20;i++){
441 sprintf(name,"wh%d",i);
442 top->AddNodeOverlap(WH,1,new TGeoTranslation(-150+(15*i),-120,-212));
443 top->AddNodeOverlap(WH,1,new TGeoTranslation(-150+(15*i),120,-212));
444
445 top->AddNodeOverlap(whp,1,new TGeoTranslation(-150+(15*i),-120,-210));
446 top->AddNodeOverlap(whp,1,new TGeoTranslation(-150+(15*i),120,-210));
447
448 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-150+(15*i),-127,-214, new TGeoRotation("who",15,0,0)));
449 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-150+(15*i),-113,-214, new TGeoRotation("who",-15,0,0)));
450 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-150+(15*i),127,-214, new TGeoRotation("who",-15,0,0)));
451 top->AddNodeOverlap(who,1,new TGeoCombiTrans(-150+(15*i),113,-214, new TGeoRotation("who",15,0,0)));
452 }
453 TGeoVolume *WHlu = geom->MakeBox(name,Iron,140,5,1);//chain connetor in under
454 WHlu->SetLineColor(12);
455 top->AddNodeOverlap(WHlu,1,new TGeoTranslation(-7.5,-129,-212));
456 top->AddNodeOverlap(WHlu,1,new TGeoTranslation(-7.5,-111,-212));
457 top->AddNodeOverlap(WHlu,1,new TGeoTranslation(-7.5,129,-212));
458 top->AddNodeOverlap(WHlu,1,new TGeoTranslation(-7.5,111,-212));
459
460
461
462
463//Now, we put real shape
464
465 top->AddNodeOverlap(underbody,1,new TGeoTranslation(0,0,-160));
466 top->AddNodeOverlap(pl,1,new TGeoTranslation(0,0,-130));
467 top->AddNodeOverlap(tp,1,new TGeoTranslation(30,0,-83));
468 top->AddNodeOverlap(tp1,1,new TGeoTranslation(30,0,-208));
469 top->AddNodeOverlap(pl2,1,new TGeoTranslation(0,-120,-100));
470 top->AddNodeOverlap(pl2,1,new TGeoTranslation(0,120,-100));
471 top->AddNodeOverlap(pl1,1,new TGeoTranslation(0,-120,-115));
472 top->AddNodeOverlap(pl1,1,new TGeoTranslation(0,120,-115));
473 top->AddNodeOverlap(bs,1,new TGeoCombiTrans(180,0,-150,new TGeoRotation("bs",180,90,90)));
474 top->AddNodeOverlap(bsp,1,new TGeoCombiTrans(-195,61.5,-150,new TGeoRotation("bsp",0,90,90)));
475 top->AddNodeOverlap(bsp,1,new TGeoCombiTrans(-195,-61.5,-150,new TGeoRotation("bsp",0,90,90)));
476
477
478 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-115,-132.5,-140,new TGeoRotation("Tip01",0,90,90)));
479 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-45,-132.5,-140,new TGeoRotation("Tip01",0,90,90)));
480 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(35,-132.5,-140,new TGeoRotation("Tip01",0,90,90)));
481 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(95,-132.5,-140,new TGeoRotation("Tip01",0,90,90)));
482
483 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-115,-107.5,-140,new TGeoRotation("Tip01",0,90,90)));
484 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-45,-107.5,-140,new TGeoRotation("Tip01",0,90,90)));
485 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(35,-107.5,-140,new TGeoRotation("Tip01",0,90,90)));
486 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(95,-107.5,-140,new TGeoRotation("Tip01",0,90,90)));
487
488 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(-115,-110.5,-140,new TGeoRotation("Tip0",0,90,90)));
489 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(-45,-110.5,-140,new TGeoRotation("Tip0",0,90,90)));
490 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(35,-110.5,-140,new TGeoRotation("Tip0",0,90,90)));
491 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(95,-110.5,-140,new TGeoRotation("Tip0",0,90,90)));
492
493 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(-150,-120,-180,new TGeoRotation("Tip",0,90,90)));
494 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(-80,-120,-180,new TGeoRotation("Tip",0,90,90)));
495 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(-10,-120,-180,new TGeoRotation("Tip",0,90,90)));
496 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(60,-120,-180,new TGeoRotation("Tip",0,90,90)));
497 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(130,-120,-180,new TGeoRotation("Tip",0,90,90)));
498
499 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-150,-107.5,-180,new TGeoRotation("Tip",0,90,90)));
500 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-150,-132.5,-180,new TGeoRotation("Tip",0,90,90)));
501 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-80,-107.5,-180,new TGeoRotation("Tip",0,90,90)));
502 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-80,-132.5,-180,new TGeoRotation("Tip",0,90,90)));
503 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-10,-107.5,-180,new TGeoRotation("Tip",0,90,90)));
504 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-10,-132.5,-180,new TGeoRotation("Tip",0,90,90)));
505 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(60,-107.5,-180,new TGeoRotation("Tip",0,90,90)));
506 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(60,-132.5,-180,new TGeoRotation("Tip",0,90,90)));
507 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(130,-107.5,-180,new TGeoRotation("Tip",0,90,90)));
508 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(130,-132.5,-180,new TGeoRotation("Tip",0,90,90)));
509
510 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(-150,-112.5,-180,new TGeoRotation("Tip",0,90,90)));
511 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(-80,-112.5,-180,new TGeoRotation("Tip",0,90,90)));
512 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(-10,-112.5,-180,new TGeoRotation("Tip",0,90,90)));
513 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(60,-112.5,-180,new TGeoRotation("Tip",0,90,90)));
514 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(130,-112.5,-180,new TGeoRotation("Tip",0,90,90)));
515
516 top->AddNodeOverlap(wheel1,1,new TGeoCombiTrans(180,-120,-150,new TGeoRotation("wheel1",0,90,90)));
517 top->AddNodeOverlap(wheel1,1,new TGeoCombiTrans(-195,-120,-150,new TGeoRotation("wheel1",0,90,90)));
518 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(180,-107.5,-150,new TGeoRotation("wheel2",0,90,90)));
519 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(180,-132.5,-150,new TGeoRotation("wheel2",0,90,90)));
520 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(-195,-107.5,-150,new TGeoRotation("wheel2",0,90,90)));
521 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(-195,-132.5,-150,new TGeoRotation("wheel2",0,90,90)));
522 top->AddNodeOverlap(wheel,1,new TGeoCombiTrans(180,-112.5,-150,new TGeoRotation("wheel",0,90,90)));
523 top->AddNodeOverlap(wheel,1,new TGeoCombiTrans(-195,-112.5,-150,new TGeoRotation("wheel2",0,90,90)));
524
525 top->AddNodeOverlap(sp,1,new TGeoCombiTrans(-209,-120,-149,new TGeoRotation("sp",0,90,90)));//sp!
526 top->AddNodeOverlap(sp,1,new TGeoCombiTrans(209,-120,-149,new TGeoRotation("sp1",180,90,90)));//sp!
527
528 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-115,132.5,-140,new TGeoRotation("Tip01",0,90,90)));
529 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-45,132.5,-140,new TGeoRotation("Tip01",0,90,90)));
530 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(35,132.5,-140,new TGeoRotation("Tip01",0,90,90)));
531 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(95,132.5,-140,new TGeoRotation("Tip01",0,90,90)));
532
533 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-115,107.5,-140,new TGeoRotation("Tip01",0,90,90)));
534 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(-45,107.5,-140,new TGeoRotation("Tip01",0,90,90)));
535 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(35,107.5,-140,new TGeoRotation("Tip01",0,90,90)));
536 top->AddNodeOverlap(Tip01,1,new TGeoCombiTrans(95,107.5,-140,new TGeoRotation("Tip01",0,90,90)));
537
538 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(-115,110.5,-140,new TGeoRotation("Tip0",0,90,90)));
539 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(-45,110.5,-140,new TGeoRotation("Tip0",0,90,90)));
540 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(35,110.5,-140,new TGeoRotation("Tip0",0,90,90)));
541 top->AddNodeOverlap(Tip0,1,new TGeoCombiTrans(95,110.5,-140,new TGeoRotation("Tip0",0,90,90)));
542
543 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(-150,120,-180,new TGeoRotation("Tip",0,90,90)));
544 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(-80,120,-180,new TGeoRotation("Tip",0,90,90)));
545 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(-10,120,-180,new TGeoRotation("Tip",0,90,90)));
546 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(60,120,-180,new TGeoRotation("Tip",0,90,90)));
547 top->AddNodeOverlap(Tip,1,new TGeoCombiTrans(130,120,-180,new TGeoRotation("Tip",0,90,90)));
548
549 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-150,107.5,-180,new TGeoRotation("Tip",0,90,90)));
550 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-150,132.5,-180,new TGeoRotation("Tip",0,90,90)));
551 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-80,107.5,-180,new TGeoRotation("Tip",0,90,90)));
552 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-80,132.5,-180,new TGeoRotation("Tip",0,90,90)));
553 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-10,107.5,-180,new TGeoRotation("Tip",0,90,90)));
554 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(-10,132.5,-180,new TGeoRotation("Tip",0,90,90)));
555 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(60,107.5,-180,new TGeoRotation("Tip",0,90,90)));
556 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(60,132.5,-180,new TGeoRotation("Tip",0,90,90)));
557 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(130,107.5,-180,new TGeoRotation("Tip",0,90,90)));
558 top->AddNodeOverlap(Tip1,1,new TGeoCombiTrans(130,132.5,-180,new TGeoRotation("Tip",0,90,90)));
559
560 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(-150,112.5,-180,new TGeoRotation("Tip",0,90,90)));
561 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(-80,112.5,-180,new TGeoRotation("Tip",0,90,90)));
562 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(-10,112.5,-180,new TGeoRotation("Tip",0,90,90)));
563 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(60,112.5,-180,new TGeoRotation("Tip",0,90,90)));
564 top->AddNodeOverlap(Tip2,1,new TGeoCombiTrans(130,112.5,-180,new TGeoRotation("Tip",0,90,90)));
565
566 top->AddNodeOverlap(wheel,1,new TGeoCombiTrans(-195,112.5,-150,new TGeoRotation("wheel1",0,90,90)));
567 top->AddNodeOverlap(wheel,1,new TGeoCombiTrans(180,112.5,-150,new TGeoRotation("wheel",0,90,90)));
568 top->AddNodeOverlap(wheel1,1,new TGeoCombiTrans(180,120,-150,new TGeoRotation("wheel1",0,90,90)));
569 top->AddNodeOverlap(wheel1,1,new TGeoCombiTrans(-195,120,-150,new TGeoRotation("wheel1",0,90,90)));
570 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(180,107.5,-150,new TGeoRotation("wheel2",0,90,90)));
571 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(180,132.5,-150,new TGeoRotation("wheel2",0,90,90)));
572 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(-195,107.5,-150,new TGeoRotation("wheel2",0,90,90)));
573 top->AddNodeOverlap(wheel2,1,new TGeoCombiTrans(-195,132.5,-150,new TGeoRotation("wheel2",0,90,90)));
574
575 top->AddNodeOverlap(sp,1,new TGeoCombiTrans(-209,120,-149,new TGeoRotation("sp",0,90,90)));//sp!
576 top->AddNodeOverlap(sp,1,new TGeoCombiTrans(209,120,-149,new TGeoRotation("sp1",180,90,90)));//sp!
577 top->SetVisibility(false);
578 geom->CloseGeometry();
579
580
581//------------------draw on GL viewer-------------------------------
582 top->Draw("ogl");
583
584}
char name[80]
Definition TGX11.cxx:110
Class describing rotation + translation.
Definition TGeoMatrix.h:317
The manager class for any TGeo geometry.
Definition TGeoManager.h:44
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 * MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
Make in one step a volume pointing to a TGeoTrd2 shape with given medium.
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.
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.
RVec< PromoteType< T > > cos(const RVec< T > &v)
Definition RVec.hxx:1852
RVec< PromoteType< T > > sin(const RVec< T > &v)
Definition RVec.hxx:1851