Minors
[u/mrichter/AliRoot.git] / ITS / Displayv11.C
CommitLineData
541f7ba6 1//----------------------------------------------------------------------
2void 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);
a53658c6 21 TGeoVolume *ITS = mgr2->MakeBox("ITSV",vacmed,99.,99.,199.);
22 ALIC->AddNode(ITS,1);
541f7ba6 23 //
a53658c6 24 /*
db486a6e 25 AliITSv11 *its = new AliITSv11(0,3);
d1a22f9a 26 its->SetDebug(ISetits(0,-1));
db486a6e 27 its->GetSPDGeometry()->SetDebug(ISetits(0,-1));
28 its->GetSupGeometry()->SetDebug(ISetits(0,-1));
541f7ba6 29 its->CreateMaterials();
30 its->CreateGeometry();
a53658c6 31 */
32 AliITSv11GeometrySPD *gspd = new AliITSv11GeometrySPD();
33 //AliITSv11GeometrySDD *gsdd = new AliITSgeometrySDD();
34 //AliITSv11GeometrySupport *gsupp = new AliITSGeometrySupport();
35 //AliITSv11GeometrySSD *gssd = new AliITSGeometrySSD();
36 //
37 Int_t imat=1,imed=1;
38 gspd->CreateSPDCenteralMaterials(imed,imat);
39 gspd->SPDSector(ITS,mgr2);
541f7ba6 40 //
41 mgr2->CloseGeometry();
d1a22f9a 42 //
43 TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10);
d5219d0d 44 bar->AddButton("Set Clipping on","ISetits(2,1)","Clipping on");
45 bar->AddButton("Set Cllipping off","ISetits(2,0)","Clipping off");
d1a22f9a 46 bar->AddButton("Set axis on","ISetits(3,1)","Show Axis on");
47 bar->AddButton("Set axis off","ISetits(3,0)","Show Axis off");
48 bar->AddButton("Set perspective on","ISetits(4,1)","Perspective on");
49 bar->AddButton("Set perspective off","ISetits(4,0)","Perspective off");
d5219d0d 50 bar->AddButton("Set RayTrace on","ISetits(5,1)","Perspective on");
51 bar->AddButton("Set RayTrace off","ISetits(5,0)","Perspective off");
d1a22f9a 52 bar->AddButton("Set circle/80","ISetits(1,80)","circles ~ by 80 lines");
53 bar->AddButton("Display Geometry","Displayit()","Run Displayit");
db486a6e 54 bar->AddButton("Display SPD Ceneral Volume","EngineeringSPDLayer()",
55 "Run EngineeringSPDLayer");
4830bf84 56 bar->AddButton("Display SPD Thermal Sheald","EngineeringSPDThS()",
57 "Run EngineeringSPDThS");
db486a6e 58 bar->AddButton("Display SDD Layer 3","EngineeringSDDLayer3()",
59 "Run EngineeringSDDLayer3");
60 bar->AddButton("Display SDD Layer 4","EngineeringSDDLayer4()",
61 "Run EngineeringSDDLayer4");
d1a22f9a 62 bar->AddButton("Display SDD Cone","EngineeringSDDCone()",
63 "Run EngineeringSDDCone");
64 bar->AddButton("Display SDD Centeral Cylinder","EngineeringSDDCylinder()",
65 "Run EngineeringSDDCylinder");
d5219d0d 66 bar->AddButton("Display SSD Cone","EngineeringSSDCone()",
67 "Run EngineeringSSDCone");
68 bar->AddButton("Display SSD Centeral Cylinder","EngineeringSSDCylinder()",
69 "Run EngineeringSSDCylinder");
d1a22f9a 70 bar->AddButton("Display SUP RB24 side","EngineeringSupRB24()",
db486a6e 71 "Run EngineeringSupRB24");
72 bar->AddButton("Display Cable Trays RB24 side","EngineeringSupTrayRB24()",
73 "Run EngineeringSupTrayRB24");
d1a22f9a 74 bar->AddButton("Display SUP RB26 side","EngineeringSupRB26()",
75 "Run EngineeringSupRB26");
a53658c6 76 bar->AddButton("Save Geometry to File","ExportToFile()",
77 "Run ExportToFile");
d1a22f9a 78 bar->AddButton("Quit/Exit",".q","Exit");
79 bar->Show();
80 gROOT->SaveContext();
81 //Displayit();
82}
83//----------------------------------------------------------------------
a53658c6 84void ExportToFile(){
85 // Quirry file name and write geometry to a root file.
86 // Inputs:
87 // const char* filename output file with the display in it
88 // Outputs:
89 // none.
90 // Retrurn:
91 // none.
92 Char_t filename[100];
93
94 printf("Eneter File name:");
95 scanf("%s",filename);
96
97 gGeoManager->Export(filename);
98}
99//----------------------------------------------------------------------
d1a22f9a 100Int_t ISetits(Int_t t,Int_t v){
d5219d0d 101 static Int_t itsdebug=1,nsegments=80,cut=0,axis=1,perspective=0,ray=0;
d1a22f9a 102
103 switch (t) {
104 case 0:
105 if(v<0) return itsdebug;
106 itsdebug = v;
107 break;
108 case 1:
109 if(v<0) return nsegments;
110 nsegments= v;
111 break;
112 case 2:
113 if(v<0) return cut;
114 cut = v;
115 break;
116 case 3:
117 if(v<0) return axis;
118 axis = v;
119 break;
120 case 4:
121 if(v<0) return perspective;
122 perspective = v;
123 break;
d5219d0d 124 case 5:
125 if(v<0) return ray;
126 ray = v;
127 break;
d1a22f9a 128 }// end switch
129 return 0;
130}
131//----------------------------------------------------------------------
132Double_t DSetits(Int_t t,Double_t v){
133 static Double_t phimincut=0.0,phimaxcut=180.0;
134 static Double_t longitude=90.0,latitude=0.0,psi=0.0;
135
136 switch (t) {
137 case 0:
138 if(v<0.) return phimincut;
139 phimincut = v;
140 break;
141 case 1:
142 if(v<0.) return phimaxcut;
143 phimaxcut = v;
144 break;
145 case 2:
146 if(v<0.) return longitude;
147 longitude = v;
148 break;
149 case 3:
150 if(v<0.) return latitude;
151 latitude = v;
152 break;
153 case 4:
154 if(v<0.) return latitude;
155 latitude = v;
156 break;
157 }// end switch
158 return 0;
159}
160//----------------------------------------------------------------------
161void Displayit(){
162 // Display AliITSv11 Geometry
163 // Inputs:
164 // const char* filename output file with the display in it
165 // Outputs:
166 // none.
167 // Retrurn:
168 // none.
169 Int_t irr;
170 //
171 TGeoManager *mgr2 = gGeoManager;
172 TGeoVolume *ALIC = mgr2->GetTopVolume();
173 TCanvas *c1;
174 if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
175 c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
176 c1->Divide(2,2);
177 //
178 mgr2->SetNsegments(ISetits(1,-1));
541f7ba6 179 //
171f3f35 180 mgr2->SetVisLevel(6);
cbd7b929 181 mgr2->SetVisOption(0);
171f3f35 182 //mgr2->CheckOverlaps(0.01);
183 //mgr2->PrintOverlaps();
d5219d0d 184 if(ISetits(2,-1)==1){
185 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
186 mgr2->SetClippingShape(clip);
187 } // end if
d1a22f9a 188 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
541f7ba6 189 //
171f3f35 190 c1->cd(1);
191 ALIC->Draw();
192 TPad *p1 = c1->GetPad(1);
193 TView *view1 = p1->GetView();
194 if(view1){
d1a22f9a 195 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
196 if(irr) cout <<"error="<<irr<<endl;
a53658c6 197 if(ISetits(4,-1)==0) view1->SetParallel();
d1a22f9a 198 else view1->SetPerspective();
171f3f35 199 view1->Front();
d1a22f9a 200 if(ISetits(3,-1)!=0) view1->ShowAxis();
201 } // end if view1
d5219d0d 202 if(ISetits(5,-1)==1) ALIC->Raytrace();
171f3f35 203 c1->cd(2);
204 ALIC->Draw();
205 TPad *p2 = c1->GetPad(2);
206 TView *view2 = p2->GetView();
207 if(view2){
d1a22f9a 208 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
209 if(irr) cout <<"error="<<irr<<endl;
a53658c6 210 if(ISetits(4,-1)==0) view2->SetParallel();
d1a22f9a 211 else view2->SetPerspective();
171f3f35 212 view2->RotateView(60.,30.);
d1a22f9a 213 if(ISetits(3,-1)!=0) view2->ShowAxis();
171f3f35 214 } // end if view2
d5219d0d 215 if(ISetits(5,-1)==1) ALIC->Raytrace();
171f3f35 216 c1->cd(3);
171f3f35 217 ALIC->Draw();
d1a22f9a 218 c1->SetPhi(90.0); c1->SetTheta(90.0);
171f3f35 219 TPad *p3 = c1->GetPad(3);
220 TView *view3 = p3->GetView();
221 if(view3){
d1a22f9a 222 view3->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
223 if(irr) cout <<"error="<<irr<<endl;
a53658c6 224 if(ISetits(4,-1)==0) view3->SetParallel();
d1a22f9a 225 else view3->SetPerspective();
171f3f35 226 view3->Top();
d1a22f9a 227 if(ISetits(3,-1)!=0) view3->ShowAxis();
171f3f35 228 } // end if view3
d5219d0d 229 if(ISetits(5,-1)==1) ALIC->Raytrace();
171f3f35 230 c1->cd(4);
541f7ba6 231 ALIC->Draw();
171f3f35 232 TPad *p4 = c1->GetPad(4);
233 TView *view4 = p4->GetView();
234 if(view4){
d1a22f9a 235 view4->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
236 if(irr) cout <<"error="<<irr<<endl;
a53658c6 237 if(ISetits(4,-1)==0) view4->SetParallel();
d1a22f9a 238 else view4->SetPerspective();
171f3f35 239 view4->Side();
d1a22f9a 240 if(ISetits(3,-1)!=0) view4->ShowAxis();
171f3f35 241 } // end if view4
d5219d0d 242 if(ISetits(5,-1)==1) ALIC->Raytrace();
541f7ba6 243 //
244}
d1a22f9a 245//----------------------------------------------------------------------
db486a6e 246void EngineeringSPDLayer(){
247 // Display SPD Layer Geometry
248 // Inputs:
249 // none.
250 // Outputs:
251 // none.
252 // Retrurn:
253 // none.
254 Int_t irr;
255 //
256 TGeoManager *mgr2 = gGeoManager;
257 TGeoVolume *ALIC = mgr2->GetTopVolume();
258 TCanvas *c4;
259 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
260 c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
261 TGeoVolume *ITS,*SPDLay=0;
262 TGeoNode *node;
263 TArrow *arrow=new TArrow();
264 //
265 node = ALIC->FindNode("ITSV_1");
266 ITS = node->GetVolume();
a53658c6 267 node = ITS->FindNode("ITSSPDCarbonFiberSectorV_1");
268 //node = ITS->FindNode("ITSSPDTempSPDMotherVolume_1");
db486a6e 269 SPDLay = node->GetVolume();
270 //
271 mgr2->SetNsegments(ISetits(1,-1));
272 //
273 mgr2->SetVisLevel(6);
274 mgr2->SetVisOption(0);
275 //mgr2->CheckOverlaps(0.01);
276 //mgr2->PrintOverlaps();
277 if(ISetits(2,-1)==1){
278 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
279 mgr2->SetClippingShape(clip);
280 } // end if
281 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
282 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
283 //
284 SPDLay->Draw();
285 TView *view1 = c4->GetView();
286 if(view1){
287 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
288 if(irr) cout <<"error="<<irr<<endl;
289 if(ISetits(4,-1)==0) view1->SetParralel();
290 else view1->SetPerspective();
291 view1->Front();
292 if(ISetits(3,-1)!=0) view1->ShowAxis();
293 } // end if view1
294 if(ISetits(5,-1)==1) SPDLay->Raytrace();
295 //
296 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
297 c5 = new TCanvas("C5","ITS SPD Layer Geometry End View",500,500);
298 SPDLay->Draw();
299 TView *view2 = c5->GetView();
300 if(view2){
301 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
302 if(irr) cout <<"error="<<irr<<endl;
303 if(ISetits(4,-1)==0) view2->SetParralel();
304 else view2->SetPerspective();
305 view2->Top();
306 if(ISetits(3,-1)!=0) view2->ShowAxis();
307 } // end if view2
308 if(ISetits(5,-1)==1) SPDLay->Raytrace();
309 //
310}
311//----------------------------------------------------------------------
4830bf84 312void EngineeringSPDThS(){
313 // Display SPD Thermal Sheald Geometry
314 // Inputs:
315 // none.
316 // Outputs:
317 // none.
318 // Retrurn:
319 // none.
320 Int_t irr;
321 //
322 TGeoManager *mgr2 = gGeoManager;
323 TGeoVolume *ALIC = mgr2->GetTopVolume();
324 TCanvas *c4;
325 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
326 c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
327 c4->Divide(2,1);
328 TGeoVolume *ITS,*SPDThS=0;
329 TGeoNode *node;
330 TArrow *arrow=new TArrow();
331 //
332 node = ALIC->FindNode("ITSV_1");
333 ITS = node->GetVolume();
db486a6e 334 node = ITS->FindNode("ITSspdThermalShealdMotherM_1");
4830bf84 335 SPDThS = node->GetVolume();
336 //
337 mgr2->SetNsegments(ISetits(1,-1));
338 //
339 mgr2->SetVisLevel(6);
340 mgr2->SetVisOption(0);
341 //mgr2->CheckOverlaps(0.01);
342 //mgr2->PrintOverlaps();
d5219d0d 343 if(ISetits(2,-1)==1){
344 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
345 mgr2->SetClippingShape(clip);
346 } // end if
4830bf84 347 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
348 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
349 //
350 c4->cd(1);
351 SPDThS->Draw();
352 TPad *p1 = c4->GetPad(1);
353 TView *view1 = p1->GetView();
354 if(view1){
355 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
356 if(irr) cout <<"error="<<irr<<endl;
357 if(ISetits(4,-1)==0) view1->SetParralel();
358 else view1->SetPerspective();
359 view1->Front();
360 if(ISetits(3,-1)!=0) view1->ShowAxis();
361 } // end if view1
d5219d0d 362 if(ISetits(5,-1)==1) SPDThS->Raytrace();
4830bf84 363 //
364 c4->cd(2);
365 SPDThS->Draw();
366 TPad *p2 = c4->GetPad(2);
367 TView *view2 = p2->GetView();
368 if(view2){
369 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
370 if(irr) cout <<"error="<<irr<<endl;
371 if(ISetits(4,-1)==0) view2->SetParralel();
372 else view2->SetPerspective();
373 view2->Top();
374 if(ISetits(3,-1)!=0) view2->ShowAxis();
375 } // end if view2
d5219d0d 376 if(ISetits(5,-1)==1) SPDThS->Raytrace();
4830bf84 377 //
378}
379//----------------------------------------------------------------------
db486a6e 380void EngineeringSDDLayer3(){
381 // Display SDD Layer 3 Geometry
382 // Inputs:
383 // none.
384 // Outputs:
385 // none.
386 // Retrurn:
387 // none.
388 Int_t irr;
389 //
390 TGeoManager *mgr2 = gGeoManager;
391 TGeoVolume *ALIC = mgr2->GetTopVolume();
392 TCanvas *c4;
393 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
394 c4 = new TCanvas("C4","ITS SDD Layer 3 Geometry Side View",500,500);
395 TGeoVolume *ITS,*SDDLay3=0;
396 TGeoNode *node;
397 TArrow *arrow=new TArrow();
398 //
399 node = ALIC->FindNode("ITSV_1");
400 ITS = node->GetVolume();
401 node = ITS->FindNode("ITSsddLayer3_1");
402 SDDLay3 = node->GetVolume();
403 //
404 mgr2->SetNsegments(ISetits(1,-1));
405 //
406 mgr2->SetVisLevel(6);
407 mgr2->SetVisOption(0);
408 //mgr2->CheckOverlaps(0.01);
409 //mgr2->PrintOverlaps();
410 if(ISetits(2,-1)==1){
411 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
412 mgr2->SetClippingShape(clip);
413 } // end if
414 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
415 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
416 //
417 SDDLay3->Draw();
418 TView *view1 = c4->GetView();
419 if(view1){
420 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
421 if(irr) cout <<"error="<<irr<<endl;
422 if(ISetits(4,-1)==0) view1->SetParralel();
423 else view1->SetPerspective();
424 view1->Front();
425 if(ISetits(3,-1)!=0) view1->ShowAxis();
426 } // end if view1
427 if(ISetits(5,-1)==1) SDDLay3->Raytrace();
428 //
429 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
430 c5 = new TCanvas("C5","ITS SDD Layer 3 Geometry End View",500,500);
431 SDDLay3->Draw();
432 TView *view2 = c5->GetView();
433 if(view2){
434 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
435 if(irr) cout <<"error="<<irr<<endl;
436 if(ISetits(4,-1)==0) view2->SetParralel();
437 else view2->SetPerspective();
438 view2->Top();
439 if(ISetits(3,-1)!=0) view2->ShowAxis();
440 } // end if view2
441 if(ISetits(5,-1)==1) SDDLay3->Raytrace();
442 //
443}
444//----------------------------------------------------------------------
445void EngineeringSDDLayer4(){
446 // Display SDD Layer 4 Geometry
447 // Inputs:
448 // none.
449 // Outputs:
450 // none.
451 // Retrurn:
452 // none.
453 Int_t irr;
454 //
455 TGeoManager *mgr2 = gGeoManager;
456 TGeoVolume *ALIC = mgr2->GetTopVolume();
457 TCanvas *c4;
458 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
459 c4 = new TCanvas("C4","ITS SDD Layer 4 Geometry Side View",500,500);
460 TGeoVolume *ITS,*SDDLay4=0;
461 TGeoNode *node;
462 TArrow *arrow=new TArrow();
463 //
464 node = ALIC->FindNode("ITSV_1");
465 ITS = node->GetVolume();
466 node = ITS->FindNode("ITSsddLayer4_1");
467 SDDLay4 = node->GetVolume();
468 //
469 mgr2->SetNsegments(ISetits(1,-1));
470 //
471 mgr2->SetVisLevel(6);
472 mgr2->SetVisOption(0);
473 //mgr2->CheckOverlaps(0.01);
474 //mgr2->PrintOverlaps();
475 if(ISetits(2,-1)==1){
476 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
477 mgr2->SetClippingShape(clip);
478 } // end if
479 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
480 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
481 //
482 SDDLay4->Draw();
483 TView *view1 = c4->GetView();
484 if(view1){
485 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
486 if(irr) cout <<"error="<<irr<<endl;
487 if(ISetits(4,-1)==0) view1->SetParralel();
488 else view1->SetPerspective();
489 view1->Front();
490 if(ISetits(3,-1)!=0) view1->ShowAxis();
491 } // end if view1
492 if(ISetits(5,-1)==1) SDDLay4->Raytrace();
493 //
494 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
495 c5 = new TCanvas("C5","ITS SDD Layer 4 Geometry End View",500,500);
496 SDDLay4->Draw();
497 TView *view2 = c5->GetView();
498 if(view2){
499 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
500 if(irr) cout <<"error="<<irr<<endl;
501 if(ISetits(4,-1)==0) view2->SetParralel();
502 else view2->SetPerspective();
503 view2->Top();
504 if(ISetits(3,-1)!=0) view2->ShowAxis();
505 } // end if view2
506 if(ISetits(5,-1)==1) SDDLay4->Raytrace();
507 //
508}
509//----------------------------------------------------------------------
d1a22f9a 510void EngineeringSDDCone(){
511 // Display SDD Cone Geometry
512 // Inputs:
513 // none.
514 // Outputs:
515 // none.
516 // Retrurn:
517 // none.
518 Int_t irr;
519 //
520 TGeoManager *mgr2 = gGeoManager;
521 TGeoVolume *ALIC = mgr2->GetTopVolume();
522 TCanvas *c2;
523 if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
524 c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450);
525 c2->Divide(2,1);
526 TGeoVolume *ITS,*SDD=0;
527 TGeoNode *node;
528 //
529 node = ALIC->FindNode("ITSV_1");
530 ITS = node->GetVolume();
531 node = ITS->FindNode("ITSsddConeL_1");
532 SDD = node->GetVolume();
533 //
534 mgr2->SetNsegments(ISetits(1,-1));
535 //
536 mgr2->SetVisLevel(6);
537 mgr2->SetVisOption(0);
538 //mgr2->CheckOverlaps(0.01);
539 //mgr2->PrintOverlaps();
d5219d0d 540 if(ISetits(2,-1)==1){
541 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
542 mgr2->SetClippingShape(clip);
543 } // end if
d1a22f9a 544 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
545 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
546 //
547 c2->cd(1);
548 SDD->Draw();
549 TPad *p1 = c2->GetPad(1);
550 TView *view1 = p1->GetView();
551 if(view1){
552 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
553 if(irr) cout <<"error="<<irr<<endl;
554 if(ISetits(4,-1)==0) view1->SetParralel();
555 else view1->SetPerspective();
556 view1->Front();
557 if(ISetits(3,-1)!=0) view1->ShowAxis();
558 } // end if view1
d5219d0d 559 if(ISetits(5,-1)==1) SDD->Raytrace();
d1a22f9a 560 //
561 c2->cd(2);
562 SDD->Draw();
563 TPad *p2 = c2->GetPad(2);
564 TView *view2 = p2->GetView();
565 if(view2){
566 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
567 if(irr) cout <<"error="<<irr<<endl;
568 if(ISetits(4,-1)==0) view2->SetParralel();
569 else view2->SetPerspective();
570 view2->Top();
571 if(ISetits(3,-1)!=0) view2->ShowAxis();
572 } // end if view1
d5219d0d 573 if(ISetits(5,-1)==1) SDD->Raytrace();
d1a22f9a 574 //
575}
576//----------------------------------------------------------------------
577void EngineeringSDDCylinder(){
578 // Display SDD Cylinder Geometry
579 // Inputs:
580 // none.
581 // Outputs:
582 // none.
583 // Retrurn:
584 // none.
585 Int_t irr;
586 //
587 TGeoManager *mgr2 = gGeoManager;
588 TGeoVolume *ALIC = mgr2->GetTopVolume();
589 TCanvas *c3;
590 if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
591 c3 = new TCanvas("C3","ITS SDD Cylinder Geometry",900,450);
592 c3->Divide(2,1);
593 TGeoVolume *ITS,*SDD=0;
594 TGeoNode *node;
595 TArrow *arrow=new TArrow();
596 //
597 node = ALIC->FindNode("ITSV_1");
598 ITS = node->GetVolume();
599 node = ITS->FindNode("ITSsddCentCylCF_1");
600 SDD = node->GetVolume();
601 Double_t Rmin = ((TGeoTube*)(SDD->GetShape()))->GetRmin();
602 Double_t Rmax = ((TGeoTube*)(SDD->GetShape()))->GetRmax();
603 Double_t Dz = ((TGeoTube*)(SDD->GetShape()))->GetDz();
604 //
605 mgr2->SetNsegments(ISetits(1,-1));
606 //
607 mgr2->SetVisLevel(6);
608 mgr2->SetVisOption(0);
609 //mgr2->CheckOverlaps(0.01);
610 //mgr2->PrintOverlaps();
d5219d0d 611 if(ISetits(2,-1)==1){
612 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
613 mgr2->SetClippingShape(clip);
614 } // end if
d1a22f9a 615 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
616 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
617 //
618 c3->cd(1);
619 SDD->Draw();
620 TPad *p1 = c3->GetPad(1);
621 TView *view1 = p1->GetView();
622 if(view1){
623 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
624 if(irr) cout <<"error="<<irr<<endl;
625 if(ISetits(4,-1)==0) view1->SetParralel();
626 else view1->SetPerspective();
627 view1->Front();
628 if(ISetits(3,-1)!=0) view1->ShowAxis();
629 } // end if view1
d5219d0d 630 if(ISetits(5,-1)==1) SDD->Raytrace();
631 //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
d1a22f9a 632 //
633 c3->cd(2);
634 SDD->Draw();
635 TPad *p2 = c3->GetPad(2);
636 TView *view2 = p2->GetView();
637 if(view2){
638 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
639 if(irr) cout <<"error="<<irr<<endl;
640 if(ISetits(4,-1)==0) view2->SetParralel();
641 else view2->SetPerspective();
642 view2->Top();
643 if(ISetits(3,-1)!=0) view2->ShowAxis();
644 } // end if view2
d5219d0d 645 if(ISetits(5,-1)==1) SDD->Raytrace();
646 //arrow->DrawArrow(Rmax,0.0,Rmax,0.0);
647 //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7);
648 //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s);
649 //
650}
651//----------------------------------------------------------------------
652void EngineeringSSDCone(){
653 // Display SSD Cone Geometry
654 // Inputs:
655 // none.
656 // Outputs:
657 // none.
658 // Retrurn:
659 // none.
660 Int_t irr;
661 //
662 TGeoManager *mgr2 = gGeoManager;
663 TGeoVolume *ALIC = mgr2->GetTopVolume();
664 TCanvas *c2;
665 if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
666 c2 = new TCanvas("C2","ITS SSD Cone Geometry",900,450);
667 c2->Divide(2,1);
668 TGeoVolume *ITS,*SSD=0;
669 TGeoNode *node;
670 //
671 node = ALIC->FindNode("ITSV_1");
672 ITS = node->GetVolume();
673 node = ITS->FindNode("ITSssdConeA_1");
674 SSD = node->GetVolume();
675 //
676 mgr2->SetNsegments(ISetits(1,-1));
677 //
678 mgr2->SetVisLevel(6);
679 mgr2->SetVisOption(0);
680 //mgr2->CheckOverlaps(0.01);
681 //mgr2->PrintOverlaps();
682 if(ISetits(2,-1)==1){
683 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
684 mgr2->SetClippingShape(clip);
685 } // end if
686 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
687 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
688 //
689 c2->cd(1);
690 SSD->Draw();
691 TPad *p1 = c2->GetPad(1);
692 TView *view1 = p1->GetView();
693 if(view1){
694 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
695 if(irr) cout <<"error="<<irr<<endl;
696 if(ISetits(4,-1)==0) view1->SetParralel();
697 else view1->SetPerspective();
698 view1->Top();
699 if(ISetits(3,-1)!=0) view1->ShowAxis();
700 } // end if view1
701 if(ISetits(5,-1)==1) SSD->Raytrace();
702 //
703 c2->cd(2);
704 SSD->Draw();
705 TPad *p2 = c2->GetPad(2);
706 TView *view2 = p2->GetView();
707 if(view2){
708 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
709 if(irr) cout <<"error="<<irr<<endl;
710 if(ISetits(4,-1)==0) view2->SetParralel();
711 else view2->SetPerspective();
712 view2->Front();
713 if(ISetits(3,-1)!=0) view2->ShowAxis();
714 } // end if view1
715 if(ISetits(5,-1)==1) SSD->Raytrace();
716 //
717}
718//----------------------------------------------------------------------
719void EngineeringSSDCylinder(){
720 // Display SSD Cylinder Geometry
721 // Inputs:
722 // none.
723 // Outputs:
724 // none.
725 // Retrurn:
726 // none.
727 Int_t irr;
728 //
729 TGeoManager *mgr2 = gGeoManager;
730 TGeoVolume *ALIC = mgr2->GetTopVolume();
731 TCanvas *c3;
732 if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
733 c3 = new TCanvas("C3","ITS SSD Cylinder Geometry",900,450);
734 c3->Divide(2,1);
735 TGeoVolume *ITS,*SSD=0;
736 TGeoNode *node;
737 TArrow *arrow=new TArrow();
738 //
739 node = ALIC->FindNode("ITSV_1");
740 ITS = node->GetVolume();
741 node = ITS->FindNode("ITSssdCentCylCA_1");
742 SSD = node->GetVolume();
db486a6e 743 //Double_t Rmin = ((TGeoPcon*)(SSD->GetShape()))->GetRmin();
744 //Double_t Rmax = ((TGeoPcon*)(SSD->GetShape()))->GetRmax();
745 //Double_t Dz = ((TGeoPcon*)(SSD->GetShape()))->GetDz();
d5219d0d 746 //
747 mgr2->SetNsegments(ISetits(1,-1));
748 //
749 mgr2->SetVisLevel(6);
750 mgr2->SetVisOption(0);
751 //mgr2->CheckOverlaps(0.01);
752 //mgr2->PrintOverlaps();
753 if(ISetits(2,-1)==1){
754 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
755 mgr2->SetClippingShape(clip);
756 } // end if
757 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
758 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
759 //
760 c3->cd(1);
761 SSD->Draw();
762 TPad *p1 = c3->GetPad(1);
763 TView *view1 = p1->GetView();
764 if(view1){
765 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
766 if(irr) cout <<"error="<<irr<<endl;
767 if(ISetits(4,-1)==0) view1->SetParralel();
768 else view1->SetPerspective();
769 view1->Front();
770 if(ISetits(3,-1)!=0) view1->ShowAxis();
771 } // end if view1
772 if(ISetits(5,-1)==1) SSD->Raytrace();
773 //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
774 //
775 c3->cd(2);
776 SSD->Draw();
777 TPad *p2 = c3->GetPad(2);
778 TView *view2 = p2->GetView();
779 if(view2){
780 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
781 if(irr) cout <<"error="<<irr<<endl;
782 if(ISetits(4,-1)==0) view2->SetParralel();
783 else view2->SetPerspective();
784 view2->Top();
785 if(ISetits(3,-1)!=0) view2->ShowAxis();
786 } // end if view2
787 if(ISetits(5,-1)==1) SSD->Raytrace();
788 //arrow->DrawArrow(Rmax,0.0,Rmax,0.0);
789 //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7);
790 //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s);
d1a22f9a 791 //
792}
793//----------------------------------------------------------------------
794void EngineeringSupRB24(){
d5219d0d 795 // Display RB 24 side cable tray support structure Geometry
d1a22f9a 796 // Inputs:
797 // none.
798 // Outputs:
799 // none.
800 // Retrurn:
801 // none.
802 Int_t irr;
803 //
804 TGeoManager *mgr2 = gGeoManager;
805 TGeoVolume *ALIC = mgr2->GetTopVolume();
806 TCanvas *c4;
807 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
808 c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
809 c4->Divide(2,1);
810 TGeoVolume *ITS,*SUPRB24=0;
811 TGeoNode *node;
812 TArrow *arrow=new TArrow();
813 //
814 node = ALIC->FindNode("ITSV_1");
815 ITS = node->GetVolume();
816 node = ITS->FindNode("ITSsupFrameM24_1");
817 SUPRB24 = node->GetVolume();
818 //
819 mgr2->SetNsegments(ISetits(1,-1));
820 //
821 mgr2->SetVisLevel(6);
822 mgr2->SetVisOption(0);
823 //mgr2->CheckOverlaps(0.01);
824 //mgr2->PrintOverlaps();
d5219d0d 825 if(ISetits(2,-1)==1){
826 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
827 mgr2->SetClippingShape(clip);
828 } // end if
d1a22f9a 829 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
830 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
831 //
832 c4->cd(1);
833 SUPRB24->Draw();
834 TPad *p1 = c4->GetPad(1);
835 TView *view1 = p1->GetView();
836 if(view1){
837 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
838 if(irr) cout <<"error="<<irr<<endl;
839 if(ISetits(4,-1)==0) view1->SetParralel();
840 else view1->SetPerspective();
841 view1->Front();
842 if(ISetits(3,-1)!=0) view1->ShowAxis();
843 } // end if view1
d5219d0d 844 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
d1a22f9a 845 //
846 c4->cd(2);
847 SUPRB24->Draw();
848 TPad *p2 = c4->GetPad(2);
849 TView *view2 = p2->GetView();
850 if(view2){
851 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
852 if(irr) cout <<"error="<<irr<<endl;
853 if(ISetits(4,-1)==0) view2->SetParralel();
854 else view2->SetPerspective();
855 view2->Top();
856 if(ISetits(3,-1)!=0) view2->ShowAxis();
857 } // end if view2
d5219d0d 858 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
d1a22f9a 859 //
860}
db486a6e 861//----------------------------------------------------------------------
862void EngineeringSupTrayRB24(){
863 // Display RB 24 side cable tray support structure Geometry
864 // Inputs:
865 // none.
866 // Outputs:
867 // none.
868 // Retrurn:
869 // none.
870 Int_t irr;
871 //
872 TGeoManager *mgr2 = gGeoManager;
873 TGeoVolume *ALIC = mgr2->GetTopVolume();
874 TCanvas *c4,*c5;
875 //if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
876 c4 = new TCanvas("C4","ITS RB24 Cable Trays and Patch Pannels",500,500);
877 //c4->Divide(2,1);
878 TGeoVolume *ITS,*SUPRB24=0;
879 TGeoNode *node;
880 TArrow *arrow=new TArrow();
881 //
882 node = ALIC->FindNode("ITSV_1");
883 ITS = node->GetVolume();
884 node = ITS->FindNode("ITSsupCableTrayMotherMT24_1");
885 SUPRB24 = node->GetVolume();
886 //
887 mgr2->SetNsegments(ISetits(1,-1));
888 //
889 mgr2->SetVisLevel(6);
890 mgr2->SetVisOption(0);
891 //mgr2->CheckOverlaps(0.01);
892 //mgr2->PrintOverlaps();
893 if(ISetits(2,-1)==1){
894 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
895 mgr2->SetClippingShape(clip);
896 } // end if
897 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
898 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
899 //
900 c4->cd(1);
901 SUPRB24->Draw();
902 //TPad *p1 = c4->GetPad(1);
903 //TView *view1 = p1->GetView();
904 TView *view1 = c4->GetView();
905 if(view1){
906 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
907 if(irr) cout <<"error="<<irr<<endl;
908 if(ISetits(4,-1)==0) view1->SetParralel();
909 else view1->SetPerspective();
910 view1->Front();
911 if(ISetits(3,-1)!=0) view1->ShowAxis();
912 } // end if view1
913 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
914 //
915 //c4->cd(2);
916 c5 = new TCanvas("C5","ITS RB24 Cable Trays and Patch Pannels",500,500);
917 c5->cd(1);
918 SUPRB24->Draw();
919 //TPad *p2 = c5->GetPad(1);
920 //TView *view2 = p2->GetView();
921 TView *view2 = c5->GetView();
922 if(view2){
923 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
924 if(irr) cout <<"error="<<irr<<endl;
925 if(ISetits(4,-1)==0) view2->SetParralel();
926 else view2->SetPerspective();
927 view2->Top();
928 if(ISetits(3,-1)!=0) view2->ShowAxis();
929 } // end if view2
930 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
931 //
932}
d1a22f9a 933//----------------------------------------------------------------------
934void EngineeringSupRB26(){
d5219d0d 935 // Display RB 26 side cable tray support structure
d1a22f9a 936 // Inputs:
937 // none.
938 // Outputs:
939 // none.
940 // Retrurn:
941 // none.
942 Int_t irr;
943 //
944 TGeoManager *mgr2 = gGeoManager;
945 TGeoVolume *ALIC = mgr2->GetTopVolume();
946 TCanvas *c5;
947 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
948 c5 = new TCanvas("C5","ITS SDD Cylinder Geometry",900,450);
949 c5->Divide(2,1);
950 TGeoVolume *ITS,*SUPRB26=0;
951 TGeoNode *node;
952 TArrow *arrow=new TArrow();
953 //
954 node = ALIC->FindNode("ITSV_1");
955 ITS = node->GetVolume();
956 node = ITS->FindNode("ITSsupFrameM26_1");
957 SUPRB26 = node->GetVolume();
958 //
959 mgr2->SetNsegments(ISetits(1,-1));
960 //
961 mgr2->SetVisLevel(6);
962 mgr2->SetVisOption(0);
963 //mgr2->CheckOverlaps(0.01);
964 //mgr2->PrintOverlaps();
d5219d0d 965 if(ISetits(2,-1)==1){
966 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
967 mgr2->SetClippingShape(clip);
968 } // end if
d1a22f9a 969 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
970 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
971 //
972 c5->cd(1);
973 SUPRB26->Draw();
974 TPad *p1 = c5->GetPad(1);
975 TView *view1 = p1->GetView();
976 if(view1){
977 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
978 if(irr) cout <<"error="<<irr<<endl;
979 if(ISetits(4,-1)==0) view1->SetParralel();
980 else view1->SetPerspective();
981 view1->Front();
982 if(ISetits(3,-1)!=0) view1->ShowAxis();
983 } // end if view1
d5219d0d 984 if(ISetits(5,-1)==1) SUPRB26->Raytrace();
d1a22f9a 985 //
986 c5->cd(2);
987 SUPRB26->Draw();
988 TPad *p2 = c5->GetPad(2);
989 TView *view2 = p2->GetView();
990 if(view2){
991 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
992 if(irr) cout <<"error="<<irr<<endl;
993 if(ISetits(4,-1)==0) view2->SetParralel();
994 else view2->SetPerspective();
995 view2->Top();
996 if(ISetits(3,-1)!=0) view2->ShowAxis();
997 } // end if view2
d5219d0d 998 if(ISetits(5,-1)==1) SUPRB26->Raytrace();
d1a22f9a 999 //
1000}