]>
Commit | Line | Data |
---|---|---|
541f7ba6 | 1 | //---------------------------------------------------------------------- |
2 | void Displayv11(const char* filename=""){ | |
3 | // Display AliITSv11 Geometry | |
4 | // Inputs: | |
5 | // const char* filename output file with the display in it | |
6 | // Outputs: | |
7 | // none. | |
8 | // Retrurn: | |
9 | // none. | |
10 | ||
11 | gSystem->Load("libGeom"); | |
12 | // | |
541f7ba6 | 13 | if(gGeoManager) delete gGeoManager; |
d1a22f9a | 14 | mgr2 = gGeoManager = new TGeoManager("ITSGeometry", |
15 | " ITS Simulation Geometry Manager"); | |
541f7ba6 | 16 | // |
17 | TGeoMaterial *vacmat = new TGeoMaterial("Vacume",0,0,0); | |
18 | TGeoMedium *vacmed = new TGeoMedium("Vacume_med",1,vacmat); | |
19 | TGeoVolume *ALIC = mgr2->MakeBox("ALIC",vacmed,100.,100.,200.); | |
20 | mgr2->SetTopVolume(ALIC); | |
21 | // | |
541f7ba6 | 22 | AliITSv11 *its = new AliITSv11(); |
d1a22f9a | 23 | its->SetDebug(ISetits(0,-1)); |
541f7ba6 | 24 | its->CreateMaterials(); |
25 | its->CreateGeometry(); | |
541f7ba6 | 26 | // |
27 | mgr2->CloseGeometry(); | |
d1a22f9a | 28 | // |
29 | TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10); | |
30 | bar->AddButton("Set ITS Debug level 1","ISetits(0,1)","Debug on"); | |
31 | bar->AddButton("Set ITS Debug level 0","ISetits(0,0)","Debug off"); | |
d5219d0d | 32 | bar->AddButton("Set Clipping on","ISetits(2,1)","Clipping on"); |
33 | bar->AddButton("Set Cllipping off","ISetits(2,0)","Clipping off"); | |
d1a22f9a | 34 | bar->AddButton("Set axis on","ISetits(3,1)","Show Axis on"); |
35 | bar->AddButton("Set axis off","ISetits(3,0)","Show Axis off"); | |
36 | bar->AddButton("Set perspective on","ISetits(4,1)","Perspective on"); | |
37 | bar->AddButton("Set perspective off","ISetits(4,0)","Perspective off"); | |
d5219d0d | 38 | bar->AddButton("Set RayTrace on","ISetits(5,1)","Perspective on"); |
39 | bar->AddButton("Set RayTrace off","ISetits(5,0)","Perspective off"); | |
d1a22f9a | 40 | bar->AddButton("Set circle/80","ISetits(1,80)","circles ~ by 80 lines"); |
41 | bar->AddButton("Display Geometry","Displayit()","Run Displayit"); | |
4830bf84 | 42 | bar->AddButton("Display SPD Thermal Sheald","EngineeringSPDThS()", |
43 | "Run EngineeringSPDThS"); | |
d1a22f9a | 44 | bar->AddButton("Display SDD Cone","EngineeringSDDCone()", |
45 | "Run EngineeringSDDCone"); | |
46 | bar->AddButton("Display SDD Centeral Cylinder","EngineeringSDDCylinder()", | |
47 | "Run EngineeringSDDCylinder"); | |
d5219d0d | 48 | bar->AddButton("Display SSD Cone","EngineeringSSDCone()", |
49 | "Run EngineeringSSDCone"); | |
50 | bar->AddButton("Display SSD Centeral Cylinder","EngineeringSSDCylinder()", | |
51 | "Run EngineeringSSDCylinder"); | |
d1a22f9a | 52 | bar->AddButton("Display SUP RB24 side","EngineeringSupRB24()", |
53 | "Run EngineeringSDDCylinder"); | |
54 | bar->AddButton("Display SUP RB26 side","EngineeringSupRB26()", | |
55 | "Run EngineeringSupRB26"); | |
56 | bar->AddButton("Quit/Exit",".q","Exit"); | |
57 | bar->Show(); | |
58 | gROOT->SaveContext(); | |
59 | //Displayit(); | |
60 | } | |
61 | //---------------------------------------------------------------------- | |
62 | Int_t ISetits(Int_t t,Int_t v){ | |
d5219d0d | 63 | static Int_t itsdebug=1,nsegments=80,cut=0,axis=1,perspective=0,ray=0; |
d1a22f9a | 64 | |
65 | switch (t) { | |
66 | case 0: | |
67 | if(v<0) return itsdebug; | |
68 | itsdebug = v; | |
69 | break; | |
70 | case 1: | |
71 | if(v<0) return nsegments; | |
72 | nsegments= v; | |
73 | break; | |
74 | case 2: | |
75 | if(v<0) return cut; | |
76 | cut = v; | |
77 | break; | |
78 | case 3: | |
79 | if(v<0) return axis; | |
80 | axis = v; | |
81 | break; | |
82 | case 4: | |
83 | if(v<0) return perspective; | |
84 | perspective = v; | |
85 | break; | |
d5219d0d | 86 | case 5: |
87 | if(v<0) return ray; | |
88 | ray = v; | |
89 | break; | |
d1a22f9a | 90 | }// end switch |
91 | return 0; | |
92 | } | |
93 | //---------------------------------------------------------------------- | |
94 | Double_t DSetits(Int_t t,Double_t v){ | |
95 | static Double_t phimincut=0.0,phimaxcut=180.0; | |
96 | static Double_t longitude=90.0,latitude=0.0,psi=0.0; | |
97 | ||
98 | switch (t) { | |
99 | case 0: | |
100 | if(v<0.) return phimincut; | |
101 | phimincut = v; | |
102 | break; | |
103 | case 1: | |
104 | if(v<0.) return phimaxcut; | |
105 | phimaxcut = v; | |
106 | break; | |
107 | case 2: | |
108 | if(v<0.) return longitude; | |
109 | longitude = v; | |
110 | break; | |
111 | case 3: | |
112 | if(v<0.) return latitude; | |
113 | latitude = v; | |
114 | break; | |
115 | case 4: | |
116 | if(v<0.) return latitude; | |
117 | latitude = v; | |
118 | break; | |
119 | }// end switch | |
120 | return 0; | |
121 | } | |
122 | //---------------------------------------------------------------------- | |
123 | void Displayit(){ | |
124 | // Display AliITSv11 Geometry | |
125 | // Inputs: | |
126 | // const char* filename output file with the display in it | |
127 | // Outputs: | |
128 | // none. | |
129 | // Retrurn: | |
130 | // none. | |
131 | Int_t irr; | |
132 | // | |
133 | TGeoManager *mgr2 = gGeoManager; | |
134 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
135 | TCanvas *c1; | |
136 | if(!(c1 = (TCanvas*)gROOT->FindObject("C1"))) | |
137 | c1 = new TCanvas("C1","ITS Simulation Geometry",900,900); | |
138 | c1->Divide(2,2); | |
139 | // | |
140 | mgr2->SetNsegments(ISetits(1,-1)); | |
541f7ba6 | 141 | // |
171f3f35 | 142 | mgr2->SetVisLevel(6); |
cbd7b929 | 143 | mgr2->SetVisOption(0); |
171f3f35 | 144 | //mgr2->CheckOverlaps(0.01); |
145 | //mgr2->PrintOverlaps(); | |
d5219d0d | 146 | if(ISetits(2,-1)==1){ |
147 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
148 | mgr2->SetClippingShape(clip); | |
149 | } // end if | |
d1a22f9a | 150 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); |
541f7ba6 | 151 | // |
171f3f35 | 152 | c1->cd(1); |
153 | ALIC->Draw(); | |
154 | TPad *p1 = c1->GetPad(1); | |
155 | TView *view1 = p1->GetView(); | |
156 | if(view1){ | |
d1a22f9a | 157 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); |
158 | if(irr) cout <<"error="<<irr<<endl; | |
159 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
160 | else view1->SetPerspective(); | |
171f3f35 | 161 | view1->Front(); |
d1a22f9a | 162 | if(ISetits(3,-1)!=0) view1->ShowAxis(); |
163 | } // end if view1 | |
d5219d0d | 164 | if(ISetits(5,-1)==1) ALIC->Raytrace(); |
171f3f35 | 165 | c1->cd(2); |
166 | ALIC->Draw(); | |
167 | TPad *p2 = c1->GetPad(2); | |
168 | TView *view2 = p2->GetView(); | |
169 | if(view2){ | |
d1a22f9a | 170 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); |
171 | if(irr) cout <<"error="<<irr<<endl; | |
172 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
173 | else view2->SetPerspective(); | |
171f3f35 | 174 | view2->RotateView(60.,30.); |
d1a22f9a | 175 | if(ISetits(3,-1)!=0) view2->ShowAxis(); |
171f3f35 | 176 | } // end if view2 |
d5219d0d | 177 | if(ISetits(5,-1)==1) ALIC->Raytrace(); |
171f3f35 | 178 | c1->cd(3); |
171f3f35 | 179 | ALIC->Draw(); |
d1a22f9a | 180 | c1->SetPhi(90.0); c1->SetTheta(90.0); |
171f3f35 | 181 | TPad *p3 = c1->GetPad(3); |
182 | TView *view3 = p3->GetView(); | |
183 | if(view3){ | |
d1a22f9a | 184 | view3->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); |
185 | if(irr) cout <<"error="<<irr<<endl; | |
186 | if(ISetits(4,-1)==0) view3->SetParralel(); | |
187 | else view3->SetPerspective(); | |
171f3f35 | 188 | view3->Top(); |
d1a22f9a | 189 | if(ISetits(3,-1)!=0) view3->ShowAxis(); |
171f3f35 | 190 | } // end if view3 |
d5219d0d | 191 | if(ISetits(5,-1)==1) ALIC->Raytrace(); |
171f3f35 | 192 | c1->cd(4); |
541f7ba6 | 193 | ALIC->Draw(); |
171f3f35 | 194 | TPad *p4 = c1->GetPad(4); |
195 | TView *view4 = p4->GetView(); | |
196 | if(view4){ | |
d1a22f9a | 197 | view4->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); |
198 | if(irr) cout <<"error="<<irr<<endl; | |
199 | if(ISetits(4,-1)==0) view4->SetParralel(); | |
200 | else view4->SetPerspective(); | |
171f3f35 | 201 | view4->Side(); |
d1a22f9a | 202 | if(ISetits(3,-1)!=0) view4->ShowAxis(); |
171f3f35 | 203 | } // end if view4 |
d5219d0d | 204 | if(ISetits(5,-1)==1) ALIC->Raytrace(); |
541f7ba6 | 205 | // |
206 | } | |
d1a22f9a | 207 | //---------------------------------------------------------------------- |
4830bf84 | 208 | void EngineeringSPDThS(){ |
209 | // Display SPD Thermal Sheald Geometry | |
210 | // Inputs: | |
211 | // none. | |
212 | // Outputs: | |
213 | // none. | |
214 | // Retrurn: | |
215 | // none. | |
216 | Int_t irr; | |
217 | // | |
218 | TGeoManager *mgr2 = gGeoManager; | |
219 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
220 | TCanvas *c4; | |
221 | if(!(c4 = (TCanvas*)gROOT->FindObject("C4"))) | |
222 | c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450); | |
223 | c4->Divide(2,1); | |
224 | TGeoVolume *ITS,*SPDThS=0; | |
225 | TGeoNode *node; | |
226 | TArrow *arrow=new TArrow(); | |
227 | // | |
228 | node = ALIC->FindNode("ITSV_1"); | |
229 | ITS = node->GetVolume(); | |
230 | node = ITS->FindNode("ITSspdThermalSheald_1"); | |
231 | SPDThS = node->GetVolume(); | |
232 | // | |
233 | mgr2->SetNsegments(ISetits(1,-1)); | |
234 | // | |
235 | mgr2->SetVisLevel(6); | |
236 | mgr2->SetVisOption(0); | |
237 | //mgr2->CheckOverlaps(0.01); | |
238 | //mgr2->PrintOverlaps(); | |
d5219d0d | 239 | if(ISetits(2,-1)==1){ |
240 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
241 | mgr2->SetClippingShape(clip); | |
242 | } // end if | |
4830bf84 | 243 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); |
244 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
245 | // | |
246 | c4->cd(1); | |
247 | SPDThS->Draw(); | |
248 | TPad *p1 = c4->GetPad(1); | |
249 | TView *view1 = p1->GetView(); | |
250 | if(view1){ | |
251 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
252 | if(irr) cout <<"error="<<irr<<endl; | |
253 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
254 | else view1->SetPerspective(); | |
255 | view1->Front(); | |
256 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
257 | } // end if view1 | |
d5219d0d | 258 | if(ISetits(5,-1)==1) SPDThS->Raytrace(); |
4830bf84 | 259 | // |
260 | c4->cd(2); | |
261 | SPDThS->Draw(); | |
262 | TPad *p2 = c4->GetPad(2); | |
263 | TView *view2 = p2->GetView(); | |
264 | if(view2){ | |
265 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
266 | if(irr) cout <<"error="<<irr<<endl; | |
267 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
268 | else view2->SetPerspective(); | |
269 | view2->Top(); | |
270 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
271 | } // end if view2 | |
d5219d0d | 272 | if(ISetits(5,-1)==1) SPDThS->Raytrace(); |
4830bf84 | 273 | // |
274 | } | |
275 | //---------------------------------------------------------------------- | |
d1a22f9a | 276 | void EngineeringSDDCone(){ |
277 | // Display SDD Cone Geometry | |
278 | // Inputs: | |
279 | // none. | |
280 | // Outputs: | |
281 | // none. | |
282 | // Retrurn: | |
283 | // none. | |
284 | Int_t irr; | |
285 | // | |
286 | TGeoManager *mgr2 = gGeoManager; | |
287 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
288 | TCanvas *c2; | |
289 | if(!(c2 = (TCanvas*)gROOT->FindObject("C2"))) | |
290 | c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450); | |
291 | c2->Divide(2,1); | |
292 | TGeoVolume *ITS,*SDD=0; | |
293 | TGeoNode *node; | |
294 | // | |
295 | node = ALIC->FindNode("ITSV_1"); | |
296 | ITS = node->GetVolume(); | |
297 | node = ITS->FindNode("ITSsddConeL_1"); | |
298 | SDD = node->GetVolume(); | |
299 | // | |
300 | mgr2->SetNsegments(ISetits(1,-1)); | |
301 | // | |
302 | mgr2->SetVisLevel(6); | |
303 | mgr2->SetVisOption(0); | |
304 | //mgr2->CheckOverlaps(0.01); | |
305 | //mgr2->PrintOverlaps(); | |
d5219d0d | 306 | if(ISetits(2,-1)==1){ |
307 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
308 | mgr2->SetClippingShape(clip); | |
309 | } // end if | |
d1a22f9a | 310 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); |
311 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
312 | // | |
313 | c2->cd(1); | |
314 | SDD->Draw(); | |
315 | TPad *p1 = c2->GetPad(1); | |
316 | TView *view1 = p1->GetView(); | |
317 | if(view1){ | |
318 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
319 | if(irr) cout <<"error="<<irr<<endl; | |
320 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
321 | else view1->SetPerspective(); | |
322 | view1->Front(); | |
323 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
324 | } // end if view1 | |
d5219d0d | 325 | if(ISetits(5,-1)==1) SDD->Raytrace(); |
d1a22f9a | 326 | // |
327 | c2->cd(2); | |
328 | SDD->Draw(); | |
329 | TPad *p2 = c2->GetPad(2); | |
330 | TView *view2 = p2->GetView(); | |
331 | if(view2){ | |
332 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
333 | if(irr) cout <<"error="<<irr<<endl; | |
334 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
335 | else view2->SetPerspective(); | |
336 | view2->Top(); | |
337 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
338 | } // end if view1 | |
d5219d0d | 339 | if(ISetits(5,-1)==1) SDD->Raytrace(); |
d1a22f9a | 340 | // |
341 | } | |
342 | //---------------------------------------------------------------------- | |
343 | void EngineeringSDDCylinder(){ | |
344 | // Display SDD Cylinder Geometry | |
345 | // Inputs: | |
346 | // none. | |
347 | // Outputs: | |
348 | // none. | |
349 | // Retrurn: | |
350 | // none. | |
351 | Int_t irr; | |
352 | // | |
353 | TGeoManager *mgr2 = gGeoManager; | |
354 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
355 | TCanvas *c3; | |
356 | if(!(c3 = (TCanvas*)gROOT->FindObject("C3"))) | |
357 | c3 = new TCanvas("C3","ITS SDD Cylinder Geometry",900,450); | |
358 | c3->Divide(2,1); | |
359 | TGeoVolume *ITS,*SDD=0; | |
360 | TGeoNode *node; | |
361 | TArrow *arrow=new TArrow(); | |
362 | // | |
363 | node = ALIC->FindNode("ITSV_1"); | |
364 | ITS = node->GetVolume(); | |
365 | node = ITS->FindNode("ITSsddCentCylCF_1"); | |
366 | SDD = node->GetVolume(); | |
367 | Double_t Rmin = ((TGeoTube*)(SDD->GetShape()))->GetRmin(); | |
368 | Double_t Rmax = ((TGeoTube*)(SDD->GetShape()))->GetRmax(); | |
369 | Double_t Dz = ((TGeoTube*)(SDD->GetShape()))->GetDz(); | |
370 | // | |
371 | mgr2->SetNsegments(ISetits(1,-1)); | |
372 | // | |
373 | mgr2->SetVisLevel(6); | |
374 | mgr2->SetVisOption(0); | |
375 | //mgr2->CheckOverlaps(0.01); | |
376 | //mgr2->PrintOverlaps(); | |
d5219d0d | 377 | if(ISetits(2,-1)==1){ |
378 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
379 | mgr2->SetClippingShape(clip); | |
380 | } // end if | |
d1a22f9a | 381 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); |
382 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
383 | // | |
384 | c3->cd(1); | |
385 | SDD->Draw(); | |
386 | TPad *p1 = c3->GetPad(1); | |
387 | TView *view1 = p1->GetView(); | |
388 | if(view1){ | |
389 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
390 | if(irr) cout <<"error="<<irr<<endl; | |
391 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
392 | else view1->SetPerspective(); | |
393 | view1->Front(); | |
394 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
395 | } // end if view1 | |
d5219d0d | 396 | if(ISetits(5,-1)==1) SDD->Raytrace(); |
397 | //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz); | |
d1a22f9a | 398 | // |
399 | c3->cd(2); | |
400 | SDD->Draw(); | |
401 | TPad *p2 = c3->GetPad(2); | |
402 | TView *view2 = p2->GetView(); | |
403 | if(view2){ | |
404 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
405 | if(irr) cout <<"error="<<irr<<endl; | |
406 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
407 | else view2->SetPerspective(); | |
408 | view2->Top(); | |
409 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
410 | } // end if view2 | |
d5219d0d | 411 | if(ISetits(5,-1)==1) SDD->Raytrace(); |
412 | //arrow->DrawArrow(Rmax,0.0,Rmax,0.0); | |
413 | //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7); | |
414 | //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s); | |
415 | // | |
416 | } | |
417 | //---------------------------------------------------------------------- | |
418 | void EngineeringSSDCone(){ | |
419 | // Display SSD Cone Geometry | |
420 | // Inputs: | |
421 | // none. | |
422 | // Outputs: | |
423 | // none. | |
424 | // Retrurn: | |
425 | // none. | |
426 | Int_t irr; | |
427 | // | |
428 | TGeoManager *mgr2 = gGeoManager; | |
429 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
430 | TCanvas *c2; | |
431 | if(!(c2 = (TCanvas*)gROOT->FindObject("C2"))) | |
432 | c2 = new TCanvas("C2","ITS SSD Cone Geometry",900,450); | |
433 | c2->Divide(2,1); | |
434 | TGeoVolume *ITS,*SSD=0; | |
435 | TGeoNode *node; | |
436 | // | |
437 | node = ALIC->FindNode("ITSV_1"); | |
438 | ITS = node->GetVolume(); | |
439 | node = ITS->FindNode("ITSssdConeA_1"); | |
440 | SSD = node->GetVolume(); | |
441 | // | |
442 | mgr2->SetNsegments(ISetits(1,-1)); | |
443 | // | |
444 | mgr2->SetVisLevel(6); | |
445 | mgr2->SetVisOption(0); | |
446 | //mgr2->CheckOverlaps(0.01); | |
447 | //mgr2->PrintOverlaps(); | |
448 | if(ISetits(2,-1)==1){ | |
449 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
450 | mgr2->SetClippingShape(clip); | |
451 | } // end if | |
452 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
453 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
454 | // | |
455 | c2->cd(1); | |
456 | SSD->Draw(); | |
457 | TPad *p1 = c2->GetPad(1); | |
458 | TView *view1 = p1->GetView(); | |
459 | if(view1){ | |
460 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
461 | if(irr) cout <<"error="<<irr<<endl; | |
462 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
463 | else view1->SetPerspective(); | |
464 | view1->Top(); | |
465 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
466 | } // end if view1 | |
467 | if(ISetits(5,-1)==1) SSD->Raytrace(); | |
468 | // | |
469 | c2->cd(2); | |
470 | SSD->Draw(); | |
471 | TPad *p2 = c2->GetPad(2); | |
472 | TView *view2 = p2->GetView(); | |
473 | if(view2){ | |
474 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
475 | if(irr) cout <<"error="<<irr<<endl; | |
476 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
477 | else view2->SetPerspective(); | |
478 | view2->Front(); | |
479 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
480 | } // end if view1 | |
481 | if(ISetits(5,-1)==1) SSD->Raytrace(); | |
482 | // | |
483 | } | |
484 | //---------------------------------------------------------------------- | |
485 | void EngineeringSSDCylinder(){ | |
486 | // Display SSD Cylinder Geometry | |
487 | // Inputs: | |
488 | // none. | |
489 | // Outputs: | |
490 | // none. | |
491 | // Retrurn: | |
492 | // none. | |
493 | Int_t irr; | |
494 | // | |
495 | TGeoManager *mgr2 = gGeoManager; | |
496 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
497 | TCanvas *c3; | |
498 | if(!(c3 = (TCanvas*)gROOT->FindObject("C3"))) | |
499 | c3 = new TCanvas("C3","ITS SSD Cylinder Geometry",900,450); | |
500 | c3->Divide(2,1); | |
501 | TGeoVolume *ITS,*SSD=0; | |
502 | TGeoNode *node; | |
503 | TArrow *arrow=new TArrow(); | |
504 | // | |
505 | node = ALIC->FindNode("ITSV_1"); | |
506 | ITS = node->GetVolume(); | |
507 | node = ITS->FindNode("ITSssdCentCylCA_1"); | |
508 | SSD = node->GetVolume(); | |
509 | Double_t Rmin = ((TGeoTube*)(SSD->GetShape()))->GetRmin(); | |
510 | Double_t Rmax = ((TGeoTube*)(SSD->GetShape()))->GetRmax(); | |
511 | Double_t Dz = ((TGeoTube*)(SSD->GetShape()))->GetDz(); | |
512 | // | |
513 | mgr2->SetNsegments(ISetits(1,-1)); | |
514 | // | |
515 | mgr2->SetVisLevel(6); | |
516 | mgr2->SetVisOption(0); | |
517 | //mgr2->CheckOverlaps(0.01); | |
518 | //mgr2->PrintOverlaps(); | |
519 | if(ISetits(2,-1)==1){ | |
520 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
521 | mgr2->SetClippingShape(clip); | |
522 | } // end if | |
523 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
524 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
525 | // | |
526 | c3->cd(1); | |
527 | SSD->Draw(); | |
528 | TPad *p1 = c3->GetPad(1); | |
529 | TView *view1 = p1->GetView(); | |
530 | if(view1){ | |
531 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
532 | if(irr) cout <<"error="<<irr<<endl; | |
533 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
534 | else view1->SetPerspective(); | |
535 | view1->Front(); | |
536 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
537 | } // end if view1 | |
538 | if(ISetits(5,-1)==1) SSD->Raytrace(); | |
539 | //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz); | |
540 | // | |
541 | c3->cd(2); | |
542 | SSD->Draw(); | |
543 | TPad *p2 = c3->GetPad(2); | |
544 | TView *view2 = p2->GetView(); | |
545 | if(view2){ | |
546 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
547 | if(irr) cout <<"error="<<irr<<endl; | |
548 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
549 | else view2->SetPerspective(); | |
550 | view2->Top(); | |
551 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
552 | } // end if view2 | |
553 | if(ISetits(5,-1)==1) SSD->Raytrace(); | |
554 | //arrow->DrawArrow(Rmax,0.0,Rmax,0.0); | |
555 | //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7); | |
556 | //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s); | |
d1a22f9a | 557 | // |
558 | } | |
559 | //---------------------------------------------------------------------- | |
560 | void EngineeringSupRB24(){ | |
d5219d0d | 561 | // Display RB 24 side cable tray support structure Geometry |
d1a22f9a | 562 | // Inputs: |
563 | // none. | |
564 | // Outputs: | |
565 | // none. | |
566 | // Retrurn: | |
567 | // none. | |
568 | Int_t irr; | |
569 | // | |
570 | TGeoManager *mgr2 = gGeoManager; | |
571 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
572 | TCanvas *c4; | |
573 | if(!(c4 = (TCanvas*)gROOT->FindObject("C4"))) | |
574 | c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450); | |
575 | c4->Divide(2,1); | |
576 | TGeoVolume *ITS,*SUPRB24=0; | |
577 | TGeoNode *node; | |
578 | TArrow *arrow=new TArrow(); | |
579 | // | |
580 | node = ALIC->FindNode("ITSV_1"); | |
581 | ITS = node->GetVolume(); | |
582 | node = ITS->FindNode("ITSsupFrameM24_1"); | |
583 | SUPRB24 = node->GetVolume(); | |
584 | // | |
585 | mgr2->SetNsegments(ISetits(1,-1)); | |
586 | // | |
587 | mgr2->SetVisLevel(6); | |
588 | mgr2->SetVisOption(0); | |
589 | //mgr2->CheckOverlaps(0.01); | |
590 | //mgr2->PrintOverlaps(); | |
d5219d0d | 591 | if(ISetits(2,-1)==1){ |
592 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
593 | mgr2->SetClippingShape(clip); | |
594 | } // end if | |
d1a22f9a | 595 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); |
596 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
597 | // | |
598 | c4->cd(1); | |
599 | SUPRB24->Draw(); | |
600 | TPad *p1 = c4->GetPad(1); | |
601 | TView *view1 = p1->GetView(); | |
602 | if(view1){ | |
603 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
604 | if(irr) cout <<"error="<<irr<<endl; | |
605 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
606 | else view1->SetPerspective(); | |
607 | view1->Front(); | |
608 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
609 | } // end if view1 | |
d5219d0d | 610 | if(ISetits(5,-1)==1) SUPRB24->Raytrace(); |
d1a22f9a | 611 | // |
612 | c4->cd(2); | |
613 | SUPRB24->Draw(); | |
614 | TPad *p2 = c4->GetPad(2); | |
615 | TView *view2 = p2->GetView(); | |
616 | if(view2){ | |
617 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
618 | if(irr) cout <<"error="<<irr<<endl; | |
619 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
620 | else view2->SetPerspective(); | |
621 | view2->Top(); | |
622 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
623 | } // end if view2 | |
d5219d0d | 624 | if(ISetits(5,-1)==1) SUPRB24->Raytrace(); |
d1a22f9a | 625 | // |
626 | } | |
627 | ||
628 | //---------------------------------------------------------------------- | |
629 | void EngineeringSupRB26(){ | |
d5219d0d | 630 | // Display RB 26 side cable tray support structure |
d1a22f9a | 631 | // Inputs: |
632 | // none. | |
633 | // Outputs: | |
634 | // none. | |
635 | // Retrurn: | |
636 | // none. | |
637 | Int_t irr; | |
638 | // | |
639 | TGeoManager *mgr2 = gGeoManager; | |
640 | TGeoVolume *ALIC = mgr2->GetTopVolume(); | |
641 | TCanvas *c5; | |
642 | if(!(c5 = (TCanvas*)gROOT->FindObject("C5"))) | |
643 | c5 = new TCanvas("C5","ITS SDD Cylinder Geometry",900,450); | |
644 | c5->Divide(2,1); | |
645 | TGeoVolume *ITS,*SUPRB26=0; | |
646 | TGeoNode *node; | |
647 | TArrow *arrow=new TArrow(); | |
648 | // | |
649 | node = ALIC->FindNode("ITSV_1"); | |
650 | ITS = node->GetVolume(); | |
651 | node = ITS->FindNode("ITSsupFrameM26_1"); | |
652 | SUPRB26 = node->GetVolume(); | |
653 | // | |
654 | mgr2->SetNsegments(ISetits(1,-1)); | |
655 | // | |
656 | mgr2->SetVisLevel(6); | |
657 | mgr2->SetVisOption(0); | |
658 | //mgr2->CheckOverlaps(0.01); | |
659 | //mgr2->PrintOverlaps(); | |
d5219d0d | 660 | if(ISetits(2,-1)==1){ |
661 | TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90); | |
662 | mgr2->SetClippingShape(clip); | |
663 | } // end if | |
d1a22f9a | 664 | mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); |
665 | if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.)); | |
666 | // | |
667 | c5->cd(1); | |
668 | SUPRB26->Draw(); | |
669 | TPad *p1 = c5->GetPad(1); | |
670 | TView *view1 = p1->GetView(); | |
671 | if(view1){ | |
672 | view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
673 | if(irr) cout <<"error="<<irr<<endl; | |
674 | if(ISetits(4,-1)==0) view1->SetParralel(); | |
675 | else view1->SetPerspective(); | |
676 | view1->Front(); | |
677 | if(ISetits(3,-1)!=0) view1->ShowAxis(); | |
678 | } // end if view1 | |
d5219d0d | 679 | if(ISetits(5,-1)==1) SUPRB26->Raytrace(); |
d1a22f9a | 680 | // |
681 | c5->cd(2); | |
682 | SUPRB26->Draw(); | |
683 | TPad *p2 = c5->GetPad(2); | |
684 | TView *view2 = p2->GetView(); | |
685 | if(view2){ | |
686 | view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr); | |
687 | if(irr) cout <<"error="<<irr<<endl; | |
688 | if(ISetits(4,-1)==0) view2->SetParralel(); | |
689 | else view2->SetPerspective(); | |
690 | view2->Top(); | |
691 | if(ISetits(3,-1)!=0) view2->ShowAxis(); | |
692 | } // end if view2 | |
d5219d0d | 693 | if(ISetits(5,-1)==1) SUPRB26->Raytrace(); |
d1a22f9a | 694 | // |
695 | } |