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