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