]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/Displayv11.C
Updated temperature status bit (V. Pospisil)
[u/mrichter/AliRoot.git] / ITS / Displayv11.C
1 //----------------------------------------------------------------------
2
3 static AliITSv11GeometrySPD *gspd;
4 static AliITSv11GeometrySDD *gsdd;
5 static AliITSv11GeometrySSD *gssd;
6 static AliITSv11GeometrySupport *gsupp;
7 static AliITSgeom *geom;
8 //
9 //----------------------------------------------------------------------
10 void Displayv11(const char* filename=""){
11     // Display AliITSv11 Geometry
12     // Inputs:
13     //    const char* filename output file with the display in it
14     // Outputs:
15     //    none.
16     // Retrurn:
17     //    none.
18
19     gSystem->Load("libGeom");
20     //
21     if(gGeoManager) delete gGeoManager;
22     mgr2 = gGeoManager = new TGeoManager("ITSGeometry",
23                                          " ITS Simulation Geometry Manager");
24     //
25     const AliITSVersion_t kv11=110;
26     const Char_t *cvsDate="$Date$";
27     const Char_t *cvsRevision="$Revision$";
28     const Int_t kLength=100;
29     Char_t vstrng[kLength];
30     AliITSInitGeometry initgeom(kv11,1);
31     //
32     TGeoMaterial *vacmat = new TGeoMaterial("Vacume",0,0,0);
33     TGeoMedium   *vacmed = new TGeoMedium("Vacume_med",1,vacmat);
34     TGeoVolume *ALIC = mgr2->MakeBox("ALIC",vacmed,1000.,1000.,2000.);
35     mgr2->SetTopVolume(ALIC);
36     TGeoVolume *ITS = mgr2->MakeBox("ITSV",vacmed,990.,990.,1990.);
37     if(initgeom.WriteVersionString(vstrng,kLength,kv11,1,cvsDate,cvsRevision))
38         ITS->SetTitle(vstrng);
39     //TGeoVolumeAssembly *ITSSPD = new TGeoVolumeAssembly("ITSSPD");
40     //ITS->AddNode(ITSSPD,1);
41     ALIC->AddNode(ITS,1);
42     //
43     /*
44     AliITSv11 *its = new AliITSv11(0,3);
45     its->SetDebug(ISetits(0,-1));
46     its->GetSPDGeometry()->SetDebug(ISetits(0,-1));
47     its->GetSupGeometry()->SetDebug(ISetits(0,-1));
48     its->CreateMaterials();
49     its->CreateGeometry();
50     */
51     gspd  = new AliITSv11GeometrySPD(0);
52     gsdd  = new AliITSv11GeometrySDD();
53     gsupp = new AliITSv11GeometrySupport(0);
54     gssd  = new AliITSv11GeometrySSD();
55     //
56     Int_t imat=1,imed=1,ireturn=0;
57     ireturn = gspd->CreateSPDCentralMaterials(imed,imat);
58     gspd->SPDSector(ITS,mgr2);
59     gsupp->SPDCone(ITS,mgr2);
60     gsupp->SetDebug(0);
61     gsupp->SDDCone(ITS,mgr2);
62     gsdd->Layer3(ITS);
63     gsdd->Layer4(ITS);
64     gsdd->ForwardLayer3(ITS);// in Hybrid its in IS02
65     gsdd->ForwardLayer4(ITS);// in Hybrid its in IS02
66     gssd->Layer5(ITS);
67     gssd->Layer6(ITS);
68     gssd->LadderSupportLayer5(ITS);
69     gssd->LadderSupportLayer6(ITS);
70     gssd->EndCapSupportSystemLayer6(ITS);
71     gssd->EndCapSupportSystemLayer5(ITS);
72     gsupp->SSDCone(ITS,mgr2);
73     gsupp->ServicesCableSupport(ITS);
74     //
75     mgr2->CloseGeometry();
76     //
77     geom = new AliITSgeom();
78     initgeom.InitAliITSgeom(geom);
79     geom->WriteNewFile("ITSgeomV11.det");
80     //
81     TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10);
82     bar->AddButton("Set Clipping on","ISetits(2,1)","Clipping on");
83     bar->AddButton("Set Cllipping off","ISetits(2,0)","Clipping off");
84     bar->AddButton("Set axis on","ISetits(3,1)","Show Axis on");
85     bar->AddButton("Set axis off","ISetits(3,0)","Show Axis off");
86     bar->AddButton("Set perspective on","ISetits(4,1)","Perspective on");
87     bar->AddButton("Set perspective off","ISetits(4,0)","Perspective off");
88     bar->AddButton("Set RayTrace on","ISetits(5,1)","Perspective on");
89     bar->AddButton("Set RayTrace off","ISetits(5,0)","Perspective off");
90     bar->AddButton("Set circle/80","ISetits(1,80)","circles ~ by 80 lines");
91     bar->AddButton("Display Geometry","Displayit()","Run Displayit");
92     bar->AddButton("Display SPD Sector Volume","EngineeringSPDSector()",
93                    "Run EngineeringSPDSector");
94     bar->AddButton("Print SPD Sector Volume data xfig","PrintSPDSectorData()",
95                    "Run PrintSPDSectorData");
96     bar->AddButton("Display SPD Ceneral Volume","EngineeringSPDCenter()",
97                    "Run EngineeringSPDCenter");
98     bar->AddButton("Display SPD Thermal Sheald","EngineeringSPDThS()",
99                    "Run EngineeringSPDThS");
100     bar->AddButton("Display SPD Sector Cross Sections","EngineeringSPDSCS()",
101                    "Run EngineeringSPDSCS");
102     bar->AddButton("Display SDD Layer 3","EngineeringSDDLayer3()",
103                    "Run EngineeringSDDLayer3");
104     bar->AddButton("Display SDD Layer 4","EngineeringSDDLayer4()",
105                    "Run EngineeringSDDLayer4");
106     bar->AddButton("Display SDD Cone","EngineeringSDDCone()",
107                    "Run EngineeringSDDCone");
108     bar->AddButton("Display SDD Centeral Cylinder","EngineeringSDDCylinder()",
109                    "Run EngineeringSDDCylinder");
110     bar->AddButton("Display SSD Cone","EngineeringSSDCone()",
111                    "Run EngineeringSSDCone");
112     bar->AddButton("Display SSD Centeral Cylinder","EngineeringSSDCylinder()",
113                    "Run EngineeringSSDCylinder");
114     bar->AddButton("Display SUP RB24 side","EngineeringSupRB24()",
115                    "Run EngineeringSupRB24");
116     bar->AddButton("Display Cable Trays RB24 side","EngineeringSupTrayRB24()",
117                    "Run EngineeringSupTrayRB24");
118     bar->AddButton("Display SUP RB26 side","EngineeringSupRB26()",
119                    "Run EngineeringSupRB26");
120     bar->AddButton("Save Geometry to File","ExportToFile()",
121                    "Run ExportToFile");
122     bar->AddButton("Quit/Exit",".q","Exit");
123     bar->Show();
124     gROOT->SaveContext();
125          //Displayit();
126 }
127 //----------------------------------------------------------------------
128 void ExportToFile(){
129     // Quirry file name and write geometry to a root file.
130     // Inputs:
131     //    const char* filename output file with the display in it
132     // Outputs:
133     //    none.
134     // Retrurn:
135     //    none.
136     Char_t filename[100];
137
138     printf("Eneter File name:");
139     scanf("%s",filename);
140
141     gGeoManager->Export(filename);
142 }
143 //----------------------------------------------------------------------
144 Int_t ISetits(Int_t t,Int_t v){
145     static Int_t itsdebug=1,nsegments=80,cut=0,axis=1,perspective=0,ray=0;
146
147     switch (t) {
148     case 0:
149         if(v<0) return itsdebug;
150         itsdebug = v;
151         break;
152     case 1:
153         if(v<0) return nsegments;
154         nsegments= v;
155         break;
156     case 2:
157         if(v<0) return cut;
158         cut = v;
159         break;
160     case 3:
161         if(v<0) return axis;
162         axis = v;
163         break;
164     case 4:
165         if(v<0) return perspective;
166         perspective = v;
167         break;
168     case 5:
169         if(v<0) return ray;
170         ray = v;
171         break;
172     }// end switch
173     return 0;
174 }
175 //----------------------------------------------------------------------
176 Double_t DSetits(Int_t t,Double_t v){
177     static Double_t phimincut=0.0,phimaxcut=180.0;
178     static Double_t longitude=90.0,latitude=0.0,psi=0.0;
179
180     switch (t) {
181     case 0:
182         if(v<0.) return phimincut;
183         phimincut = v;
184         break;
185     case 1:
186         if(v<0.) return phimaxcut;
187         phimaxcut = v;
188         break;
189     case 2:
190         if(v<0.) return longitude;
191         longitude = v;
192         break;
193     case 3:
194         if(v<0.) return latitude;
195         latitude = v;
196         break;
197     case 4:
198         if(v<0.) return latitude;
199         latitude = v;
200         break;
201     }// end switch
202     return 0;
203 }
204 //----------------------------------------------------------------------
205 void Displayit(){
206     // Display AliITSv11 Geometry
207     // Inputs:
208     //    const char* filename output file with the display in it
209     // Outputs:
210     //    none.
211     // Retrurn:
212     //    none.
213     Int_t irr;
214     //
215     TGeoManager *mgr2 = gGeoManager;
216     TGeoVolume *ALIC = mgr2->GetTopVolume();
217     TCanvas *c1;
218     if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
219         c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
220     //c1->Divide(2,2);
221     //
222     mgr2->SetNsegments(ISetits(1,-1));
223     //
224     mgr2->SetVisLevel(6);
225     mgr2->SetVisOption(0);
226     //mgr2->CheckOverlaps(0.01);
227     //mgr2->PrintOverlaps();
228     if(ISetits(2,-1)==1){
229         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
230         mgr2->SetClippingShape(clip);
231     } // end if
232     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
233     //
234     c1->cd(1);
235     ALIC->Draw();
236     TPad *p1 = c1->GetPad(1);
237     TView *view1 = p1->GetView();
238     if(view1){
239         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
240         if(irr) cout <<"error="<<irr<<endl;
241         if(ISetits(4,-1)==0) view1->SetParallel();
242         else  view1->SetPerspective();
243         view1->Front();
244         if(ISetits(3,-1)!=0) view1->ShowAxis();
245     } // end if view1
246     if(ISetits(5,-1)==1) ALIC->Raytrace();
247     /*c1->cd(2);
248     ALIC->Draw();
249     TPad *p2 = c1->GetPad(2);
250     TView *view2 = p2->GetView();
251     if(view2){
252         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
253         if(irr) cout <<"error="<<irr<<endl;
254         if(ISetits(4,-1)==0) view2->SetParallel();
255         else  view2->SetPerspective();
256         view2->RotateView(60.,30.);
257         if(ISetits(3,-1)!=0) view2->ShowAxis();
258     } // end if view2
259     if(ISetits(5,-1)==1) ALIC->Raytrace();
260     c1->cd(3);
261     ALIC->Draw();
262     c1->SetPhi(90.0); c1->SetTheta(90.0);
263     TPad *p3 = c1->GetPad(3);
264     TView *view3 = p3->GetView();
265     if(view3){
266         view3->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
267         if(irr) cout <<"error="<<irr<<endl;
268         if(ISetits(4,-1)==0) view3->SetParallel();
269         else  view3->SetPerspective();
270         view3->Top();
271         if(ISetits(3,-1)!=0) view3->ShowAxis();
272     } // end if view3
273     if(ISetits(5,-1)==1) ALIC->Raytrace();
274     c1->cd(4);
275     ALIC->Draw();
276     TPad *p4 = c1->GetPad(4);
277     TView *view4 = p4->GetView();
278     if(view4){
279         view4->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
280         if(irr) cout <<"error="<<irr<<endl;
281         if(ISetits(4,-1)==0) view4->SetParallel();
282         else  view4->SetPerspective();
283         view4->Side();
284         if(ISetits(3,-1)!=0) view4->ShowAxis();
285     } // end if view4
286     if(ISetits(5,-1)==1) ALIC->Raytrace();
287     *///
288 }
289 //----------------------------------------------------------------------
290 void EngineeringSPDSCS(){
291     // Display SPD Carbon Fiber Sector Cross sections A and B
292     // Inputs:
293     //    none.
294     // Outputs:
295     //    none.
296     // Return:
297     //    none.
298     TPolyLine *a0,*a1,*b0,*b1;
299     TPolyMarker *p;
300     TCanvas *cSPDSCS=0;
301     Int_t i;
302     Double_t max=0.0;
303
304     a0 = new TPolyLine();
305     a1 = new TPolyLine();
306     b0 = new TPolyLine();
307     b1 = new TPolyLine();
308     p = new TPolyMarker();
309     a0->SetLineColor(1);
310     a1->SetLineColor(4);
311     b0->SetLineColor(3);
312     b0->SetLineStyle(2); // dashed
313     b1->SetLineColor(6);
314     b1->SetLineStyle(2); // dashed
315     p->SetMarkerColor(2);
316     p->SetMarkerStyle(5);
317     if(gspd==0||gspd->Make2DcrossSections(*a0,*a1,*b0,*b1,*p)==kFALSE)return;
318     for(i=0;i<a0->GetN();i++) {
319       if(TMath::Abs(a0->GetX()[i])>max) max = TMath::Abs(a0->GetX()[i]);
320       if(TMath::Abs(a0->GetY()[i])>max) max = TMath::Abs(a0->GetY()[i]);
321     } // end for i
322     for(i=0;i<a1->GetN();i++) {
323       if(TMath::Abs(a1->GetX()[i])>max) max = TMath::Abs(a0->GetX()[i]);
324       if(TMath::Abs(a1->GetY()[i])>max) max = TMath::Abs(a1->GetY()[i]);
325     } // end for i
326     for(i=0;i<b0->GetN();i++) {
327       if(TMath::Abs(b0->GetX()[i])>max) max = TMath::Abs(b0->GetX()[i]);
328       if(TMath::Abs(b0->GetY()[i])>max) max = TMath::Abs(b0->GetY()[i]);
329     } // end for i
330     for(i=0;i<b1->GetN();i++) {
331       if(TMath::Abs(b1->GetX()[i])>max) max = TMath::Abs(b1->GetX()[i]);
332       if(TMath::Abs(b1->GetY()[i])>max) max = TMath::Abs(b1->GetY()[i]);
333     } // end for i
334     max *= 1.05;
335     cSPDSCS = gROOT->FindObject("cSPDSCS");
336     if(cSPDSCS==0) delete cSPDSCS;
337     cSPDSCS = new TCanvas("cSPDSCS","SPD Carbon Fiber Sector Cross sections",2);
338     cSPDSCS->Range(-max,-max,max,max);
339     //cSPDSCS->RangeAxis();
340     cSPDSCS->SetFixedAspectRatio(kTRUE);
341     //
342     a0->Draw("");
343     a1->Draw("same");
344     p->Draw("same");
345     b0->Draw("same");
346     b1->Draw("same");
347     cSPDSCS->Update();
348     return;
349 }
350 //----------------------------------------------------------------------
351 void EngineeringSPDSector(){
352     // Display SPD Sector Geometry
353     // Inputs:
354     //    none.
355     // Outputs:
356     //    none.
357     // Retrurn:
358     //    none.
359     Int_t irr;
360     //
361     TGeoManager *mgr2 = gGeoManager;
362     TGeoVolume *ALIC = mgr2->GetTopVolume();
363     TCanvas *c4=0;
364     if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
365         c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
366     TGeoVolume *ITS=0,*ITSSPD=0,*SPDLay=0;
367     TGeoNode *node=0;
368     TArrow *arrow=new TArrow();
369     //
370     node = ALIC->FindNode("ITSV_1");
371     ITS = node->GetVolume();
372     node = ITS->FindNode("ITSSPD_1");
373     ITSSPD = node->GetVolume();
374     node = ITSSPD->FindNode("ITSSPDCarbonFiberSectorV_1");
375     if(node==0)Error("EngineeringSPDSector","could not find node %s",
376                      "ITSSPDCarbonFiberSectorV_1");
377     SPDLay = node->GetVolume();
378     if(SPDLay==0)Error("EngineeringSPDSector","could not find volume SPDLay");
379     //
380     mgr2->SetNsegments(ISetits(1,-1));
381     //
382     mgr2->SetVisLevel(6);
383     mgr2->SetVisOption(0);
384     //mgr2->CheckOverlaps(0.01);
385     //mgr2->PrintOverlaps();
386     if(ISetits(2,-1)==1){
387         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
388         mgr2->SetClippingShape(clip);
389     } // end if
390     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
391     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
392     //
393     SPDLay->Draw();
394     TView *view1 = c4->GetView();
395     if(view1){
396         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
397         if(irr) cout <<"error="<<irr<<endl;
398         if(ISetits(4,-1)==0) view1->SetParallel();
399         else  view1->SetPerspective();
400         view1->Front();
401         if(ISetits(3,-1)!=0) view1->ShowAxis();
402     } // end if view1
403     if(ISetits(5,-1)==1) SPDLay->Raytrace();
404     //
405     if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
406         c5 = new TCanvas("C5","ITS SPD Sector Geometry End View",500,500);
407     SPDLay->Draw();
408     TView *view2 = c5->GetView();
409     if(view2){
410         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
411         if(irr) cout <<"error="<<irr<<endl;
412         if(ISetits(4,-1)==0) view2->SetParallel();
413         else  view2->SetPerspective();
414         view2->Top();
415         if(ISetits(3,-1)!=0) view2->ShowAxis();
416     } // end if view2
417     if(ISetits(5,-1)==1) SPDLay->Raytrace();
418     //
419 }
420 //----------------------------------------------------------------------
421 void PrintSPDSectorData(){
422     // Print SPD Sector Data
423     // Inputs:
424     //    none.
425     // Outputs:
426     //    none.
427     // Retrurn:
428     //    none.
429     Int_t irr,i;
430     //
431     TGeoManager *mgr2 = gGeoManager;
432     TGeoXtru * sA0;
433     TGeoVolume *ITS,*ITSSPD,*vA0=0;
434     TGeoNode *node;
435
436     //mgr2->PushPath();
437     //mgr2->cd("ITSSPDCarbonFiberSupportSectorA0_1");
438     vA0 = mgr2->FindVolumeFast("ITSSPDCarbonFiberSupportSectorA0");
439     sA0 = (TGeoXtru*) vA0->GetShape();
440     irr = sA0->GetNvert();
441     Double_t x,y;
442     cout <<endl;
443     cout <<"2 3 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 "<<irr;
444     for(i=0;i<irr;i++){
445         x = sA0->GetX(i)+2.5;
446         y = sA0->GetY(i)+2.5;
447         if(!(i%6)) { cout << endl; cout <<"        ";}
448         cout<<" "<<TMath::Nint(x*450.)<<" "<<TMath::Nint(y*450);
449         //cout<<" "<<x<<" "<<y;
450     } // end for i
451     x = sA0->GetX(0)+2.5;
452     y = sA0->GetY(0)+2.5;
453     if(!(i%6)) { cout << endl; cout <<"        ";}
454     cout<<" "<<TMath::Nint(x*450.)<<" "<<TMath::Nint(y*450);
455     //cout<<" "<<x<<" "<<y;
456     cout << endl;
457     //
458 }
459 //----------------------------------------------------------------------
460 void EngineeringSPDCenter(){
461     // Display SPD Centeral Geometry
462     // Inputs:
463     //    none.
464     // Outputs:
465     //    none.
466     // Retrurn:
467     //    none.
468     Int_t irr;
469     //
470     TGeoManager *mgr2 = gGeoManager;
471     TGeoVolume *ALIC = mgr2->GetTopVolume();
472     TCanvas *c4;
473     if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
474         c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
475     TGeoVolume *ITS,*ITSSPD,*SPDLay=0;
476     TGeoNode *node;
477     TArrow *arrow=new TArrow();
478     //
479     node = ALIC->FindNode("ITSV_1");
480     ITS = node->GetVolume();
481     node = ITS->FindNode("ITSSPD_1");
482     ITSSPD = node->GetVolume();
483     //
484     mgr2->SetNsegments(ISetits(1,-1));
485     //
486     mgr2->SetVisLevel(6);
487     mgr2->SetVisOption(0);
488     //mgr2->CheckOverlaps(0.01);
489     //mgr2->PrintOverlaps();
490     if(ISetits(2,-1)==1){
491         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
492         mgr2->SetClippingShape(clip);
493     } // end if
494     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
495     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
496     //
497     ITSSPD->Draw();
498     TView *view1 = c4->GetView();
499     if(view1){
500         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
501         if(irr) cout <<"error="<<irr<<endl;
502         if(ISetits(4,-1)==0) view1->SetParallel();
503         else  view1->SetPerspective();
504         view1->Front();
505         if(ISetits(3,-1)!=0) view1->ShowAxis();
506     } // end if view1
507     if(ISetits(5,-1)==1) SPDLay->Raytrace();
508     //
509     if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
510         c5 = new TCanvas("C5","ITS SPD Centeral Geometry End View",500,500);
511     ITSSPD->Draw();
512     TView *view2 = c5->GetView();
513     if(view2){
514         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
515         if(irr) cout <<"error="<<irr<<endl;
516         if(ISetits(4,-1)==0) view2->SetParallel();
517         else  view2->SetPerspective();
518         view2->Top();
519         if(ISetits(3,-1)!=0) view2->ShowAxis();
520     } // end if view2
521     if(ISetits(5,-1)==1) ITSSPD->Raytrace();
522     //
523 }
524 //----------------------------------------------------------------------
525 void EngineeringSPDThS(){
526     // Display SPD Thermal Sheald Geometry
527     // Inputs:
528     //    none.
529     // Outputs:
530     //    none.
531     // Retrurn:
532     //    none.
533     Int_t irr;
534     //
535     TGeoManager *mgr2 = gGeoManager;
536     TGeoVolume *ALIC = mgr2->GetTopVolume();
537     TCanvas *c4;
538     if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
539         c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
540     c4->Divide(2,1);
541     TGeoVolume *ITS,*SPDThS=0;
542     TGeoNode *node;
543     TArrow *arrow=new TArrow();
544     //
545     node = ALIC->FindNode("ITSV_1");
546     ITS = node->GetVolume();
547     node = ITS->FindNode("ITSspdThermalShealdMother_1");
548     SPDThS = node->GetVolume();
549     //
550     mgr2->SetNsegments(ISetits(1,-1));
551     //
552     mgr2->SetVisLevel(6);
553     mgr2->SetVisOption(0);
554     //mgr2->CheckOverlaps(0.01);
555     //mgr2->PrintOverlaps();
556     if(ISetits(2,-1)==1){
557         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
558         mgr2->SetClippingShape(clip);
559     } // end if
560     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
561     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
562     //
563     c4->cd(1);
564     SPDThS->Draw();
565     TPad *p1 = c4->GetPad(1);
566     TView *view1 = p1->GetView();
567     if(view1){
568         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
569         if(irr) cout <<"error="<<irr<<endl;
570         if(ISetits(4,-1)==0) view1->SetParallel();
571         else  view1->SetPerspective();
572         view1->Front();
573         if(ISetits(3,-1)!=0) view1->ShowAxis();
574     } // end if view1
575     if(ISetits(5,-1)==1) SPDThS->Raytrace();
576     //
577     c4->cd(2);
578     SPDThS->Draw();
579     TPad *p2 = c4->GetPad(2);
580     TView *view2 = p2->GetView();
581     if(view2){
582         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
583         if(irr) cout <<"error="<<irr<<endl;
584         if(ISetits(4,-1)==0) view2->SetParallel();
585         else  view2->SetPerspective();
586         view2->Top();
587         if(ISetits(3,-1)!=0) view2->ShowAxis();
588     } // end if view2
589     if(ISetits(5,-1)==1) SPDThS->Raytrace();
590     //
591 }
592 //----------------------------------------------------------------------
593 void EngineeringSDDLayer3(){
594     // Display SDD Layer 3 Geometry
595     // Inputs:
596     //    none.
597     // Outputs:
598     //    none.
599     // Retrurn:
600     //    none.
601     Int_t irr;
602     //
603     TGeoManager *mgr2 = gGeoManager;
604     TGeoVolume *ALIC = mgr2->GetTopVolume();
605     TCanvas *c4;
606     if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
607         c4 = new TCanvas("C4","ITS SDD Layer 3 Geometry Side View",500,500);
608     TGeoVolume *ITS,*SDDLay3=0;
609     TGeoNode *node;
610     TArrow *arrow=new TArrow();
611     //
612     node = ALIC->FindNode("ITSV_1");
613     ITS = node->GetVolume();
614     node = ITS->FindNode("ITSsddLayer3_1");
615     SDDLay3 = node->GetVolume();
616     //
617     mgr2->SetNsegments(ISetits(1,-1));
618     //
619     mgr2->SetVisLevel(6);
620     mgr2->SetVisOption(0);
621     //mgr2->CheckOverlaps(0.01);
622     //mgr2->PrintOverlaps();
623     if(ISetits(2,-1)==1){
624         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
625         mgr2->SetClippingShape(clip);
626     } // end if
627     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
628     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
629     //
630     SDDLay3->Draw();
631     TView *view1 = c4->GetView();
632     if(view1){
633         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
634         if(irr) cout <<"error="<<irr<<endl;
635         if(ISetits(4,-1)==0) view1->SetParallel();
636         else  view1->SetPerspective();
637         view1->Front();
638         if(ISetits(3,-1)!=0) view1->ShowAxis();
639     } // end if view1
640     if(ISetits(5,-1)==1) SDDLay3->Raytrace();
641     //
642     if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
643         c5 = new TCanvas("C5","ITS SDD Layer 3 Geometry End View",500,500);
644     SDDLay3->Draw();
645     TView *view2 = c5->GetView();
646     if(view2){
647         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
648         if(irr) cout <<"error="<<irr<<endl;
649         if(ISetits(4,-1)==0) view2->SetParallel();
650         else  view2->SetPerspective();
651         view2->Top();
652         if(ISetits(3,-1)!=0) view2->ShowAxis();
653     } // end if view2
654     if(ISetits(5,-1)==1) SDDLay3->Raytrace();
655     //
656 }
657 //----------------------------------------------------------------------
658 void EngineeringSDDLayer4(){
659     // Display SDD Layer 4 Geometry
660     // Inputs:
661     //    none.
662     // Outputs:
663     //    none.
664     // Retrurn:
665     //    none.
666     Int_t irr;
667     //
668     TGeoManager *mgr2 = gGeoManager;
669     TGeoVolume *ALIC = mgr2->GetTopVolume();
670     TCanvas *c4;
671     if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
672         c4 = new TCanvas("C4","ITS SDD Layer 4 Geometry Side View",500,500);
673     TGeoVolume *ITS,*SDDLay4=0;
674     TGeoNode *node;
675     TArrow *arrow=new TArrow();
676     //
677     node = ALIC->FindNode("ITSV_1");
678     ITS = node->GetVolume();
679     node = ITS->FindNode("ITSsddLayer4_1");
680     SDDLay4 = node->GetVolume();
681     //
682     mgr2->SetNsegments(ISetits(1,-1));
683     //
684     mgr2->SetVisLevel(6);
685     mgr2->SetVisOption(0);
686     //mgr2->CheckOverlaps(0.01);
687     //mgr2->PrintOverlaps();
688     if(ISetits(2,-1)==1){
689         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
690         mgr2->SetClippingShape(clip);
691     } // end if
692     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
693     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
694     //
695     SDDLay4->Draw();
696     TView *view1 = c4->GetView();
697     if(view1){
698         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
699         if(irr) cout <<"error="<<irr<<endl;
700         if(ISetits(4,-1)==0) view1->SetParallel();
701         else  view1->SetPerspective();
702         view1->Front();
703         if(ISetits(3,-1)!=0) view1->ShowAxis();
704     } // end if view1
705     if(ISetits(5,-1)==1) SDDLay4->Raytrace();
706     //
707     if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
708         c5 = new TCanvas("C5","ITS SDD Layer 4 Geometry End View",500,500);
709     SDDLay4->Draw();
710     TView *view2 = c5->GetView();
711     if(view2){
712         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
713         if(irr) cout <<"error="<<irr<<endl;
714         if(ISetits(4,-1)==0) view2->SetParallel();
715         else  view2->SetPerspective();
716         view2->Top();
717         if(ISetits(3,-1)!=0) view2->ShowAxis();
718     } // end if view2
719     if(ISetits(5,-1)==1) SDDLay4->Raytrace();
720     //
721 }
722 //----------------------------------------------------------------------
723 void EngineeringSDDCone(){
724     // Display SDD Cone Geometry
725     // Inputs:
726     //    none.
727     // Outputs:
728     //    none.
729     // Retrurn:
730     //    none.
731     Int_t irr;
732     //
733     TGeoManager *mgr2 = gGeoManager;
734     TGeoVolume *ALIC = mgr2->GetTopVolume();
735     TCanvas *c2;
736     if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
737         c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450);
738     c2->Divide(2,1);
739     TGeoVolume *ITS,*SDD=0;
740     TGeoNode *node;
741     //
742     node = ALIC->FindNode("ITSV_1");
743     ITS = node->GetVolume();
744     node = ITS->FindNode("ITSsddConeL_1");
745     SDD = node->GetVolume();
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     c2->cd(1);
761     SDD->Draw();
762     TPad *p1 = c2->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->SetParallel();
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) SDD->Raytrace();
773     //
774     c2->cd(2);
775     SDD->Draw();
776     TPad *p2 = c2->GetPad(2);
777     TView *view2 = p2->GetView();
778     if(view2){
779         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
780         if(irr) cout <<"error="<<irr<<endl;
781         if(ISetits(4,-1)==0) view2->SetParallel();
782         else  view2->SetPerspective();
783         view2->Top();
784         if(ISetits(3,-1)!=0) view2->ShowAxis();
785     } // end if view1
786     if(ISetits(5,-1)==1) SDD->Raytrace();
787     //
788 }
789 //----------------------------------------------------------------------
790 void EngineeringSDDCylinder(){
791     // Display SDD Cylinder Geometry
792     // Inputs:
793     //    none.
794     // Outputs:
795     //    none.
796     // Retrurn:
797     //    none.
798     Int_t irr;
799     //
800     TGeoManager *mgr2 = gGeoManager;
801     TGeoVolume *ALIC = mgr2->GetTopVolume();
802     TCanvas *c3;
803     if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
804         c3 = new TCanvas("C3","ITS SDD Cylinder Geometry",900,450);
805     c3->Divide(2,1);
806     TGeoVolume *ITS,*SDD=0;
807     TGeoNode *node;
808     TArrow *arrow=new TArrow();
809     //
810     node = ALIC->FindNode("ITSV_1");
811     ITS = node->GetVolume();
812     node = ITS->FindNode("ITSsddCentCylCF_1");
813     SDD = node->GetVolume();
814     Double_t Rmin = ((TGeoTube*)(SDD->GetShape()))->GetRmin();
815     Double_t Rmax = ((TGeoTube*)(SDD->GetShape()))->GetRmax();
816     Double_t Dz   = ((TGeoTube*)(SDD->GetShape()))->GetDz();
817     //
818     mgr2->SetNsegments(ISetits(1,-1));
819     //
820     mgr2->SetVisLevel(6);
821     mgr2->SetVisOption(0);
822     //mgr2->CheckOverlaps(0.01);
823     //mgr2->PrintOverlaps();
824     if(ISetits(2,-1)==1){
825         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
826         mgr2->SetClippingShape(clip);
827     } // end if
828     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
829     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
830     //
831     c3->cd(1);
832     SDD->Draw();
833     TPad *p1 = c3->GetPad(1);
834     TView *view1 = p1->GetView();
835     if(view1){
836         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
837         if(irr) cout <<"error="<<irr<<endl;
838         if(ISetits(4,-1)==0) view1->SetParallel();
839         else  view1->SetPerspective();
840         view1->Front();
841         if(ISetits(3,-1)!=0) view1->ShowAxis();
842     } // end if view1
843     if(ISetits(5,-1)==1) SDD->Raytrace();
844     //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
845     //
846     c3->cd(2);
847     SDD->Draw();
848     TPad *p2 = c3->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->SetParallel();
854         else  view2->SetPerspective();
855         view2->Top();
856         if(ISetits(3,-1)!=0) view2->ShowAxis();
857     } // end if view2
858     if(ISetits(5,-1)==1) SDD->Raytrace();
859     //arrow->DrawArrow(Rmax,0.0,Rmax,0.0);
860     //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7);
861     //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s);
862     //
863 }
864 //----------------------------------------------------------------------
865 void EngineeringSSDCone(){
866     // Display SSD Cone Geometry
867     // Inputs:
868     //    none.
869     // Outputs:
870     //    none.
871     // Retrurn:
872     //    none.
873     Int_t irr;
874     //
875     TGeoManager *mgr2 = gGeoManager;
876     TGeoVolume *ALIC = mgr2->GetTopVolume();
877     TCanvas *c2;
878     if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
879         c2 = new TCanvas("C2","ITS SSD Cone Geometry",900,450);
880     c2->Divide(2,1);
881     TGeoVolume *ITS,*SSD=0;
882     TGeoNode *node;
883     //
884     node = ALIC->FindNode("ITSV_1");
885     ITS = node->GetVolume();
886     node = ITS->FindNode("ITSssdConeA_1");
887     SSD = node->GetVolume();
888     //
889     mgr2->SetNsegments(ISetits(1,-1));
890     //
891     mgr2->SetVisLevel(6);
892     mgr2->SetVisOption(0);
893     //mgr2->CheckOverlaps(0.01);
894     //mgr2->PrintOverlaps();
895     if(ISetits(2,-1)==1){
896         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
897         mgr2->SetClippingShape(clip);
898     } // end if
899     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
900     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
901     //
902     c2->cd(1);
903     SSD->Draw();
904     TPad *p1 = c2->GetPad(1);
905     TView *view1 = p1->GetView();
906     if(view1){
907         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
908         if(irr) cout <<"error="<<irr<<endl;
909         if(ISetits(4,-1)==0) view1->SetParallel();
910         else  view1->SetPerspective();
911         view1->Top();
912         if(ISetits(3,-1)!=0) view1->ShowAxis();
913     } // end if view1
914     if(ISetits(5,-1)==1) SSD->Raytrace();
915     //
916     c2->cd(2);
917     SSD->Draw();
918     TPad *p2 = c2->GetPad(2);
919     TView *view2 = p2->GetView();
920     if(view2){
921         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
922         if(irr) cout <<"error="<<irr<<endl;
923         if(ISetits(4,-1)==0) view2->SetParallel();
924         else  view2->SetPerspective();
925         view2->Front();
926         if(ISetits(3,-1)!=0) view2->ShowAxis();
927     } // end if view1
928     if(ISetits(5,-1)==1) SSD->Raytrace();
929     //
930 }
931 //----------------------------------------------------------------------
932 void EngineeringSSDCylinder(){
933     // Display SSD Cylinder Geometry
934     // Inputs:
935     //    none.
936     // Outputs:
937     //    none.
938     // Retrurn:
939     //    none.
940     Int_t irr;
941     //
942     TGeoManager *mgr2 = gGeoManager;
943     TGeoVolume *ALIC = mgr2->GetTopVolume();
944     TCanvas *c3;
945     if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
946         c3 = new TCanvas("C3","ITS SSD Cylinder Geometry",900,450);
947     c3->Divide(2,1);
948     TGeoVolume *ITS,*SSD=0;
949     TGeoNode *node;
950     TArrow *arrow=new TArrow();
951     //
952     node = ALIC->FindNode("ITSV_1");
953     ITS = node->GetVolume();
954     node = ITS->FindNode("ITSssdCentCylCA_1");
955     SSD = node->GetVolume();
956     //Double_t Rmin = ((TGeoPcon*)(SSD->GetShape()))->GetRmin();
957     //Double_t Rmax = ((TGeoPcon*)(SSD->GetShape()))->GetRmax();
958     //Double_t Dz   = ((TGeoPcon*)(SSD->GetShape()))->GetDz();
959     //
960     mgr2->SetNsegments(ISetits(1,-1));
961     //
962     mgr2->SetVisLevel(6);
963     mgr2->SetVisOption(0);
964     //mgr2->CheckOverlaps(0.01);
965     //mgr2->PrintOverlaps();
966     if(ISetits(2,-1)==1){
967         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
968         mgr2->SetClippingShape(clip);
969     } // end if
970     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
971     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
972     //
973     c3->cd(1);
974     SSD->Draw();
975     TPad *p1 = c3->GetPad(1);
976     TView *view1 = p1->GetView();
977     if(view1){
978         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
979         if(irr) cout <<"error="<<irr<<endl;
980         if(ISetits(4,-1)==0) view1->SetParallel();
981         else  view1->SetPerspective();
982         view1->Front();
983         if(ISetits(3,-1)!=0) view1->ShowAxis();
984     } // end if view1
985     if(ISetits(5,-1)==1) SSD->Raytrace();
986     //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
987     //
988     c3->cd(2);
989     SSD->Draw();
990     TPad *p2 = c3->GetPad(2);
991     TView *view2 = p2->GetView();
992     if(view2){
993         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
994         if(irr) cout <<"error="<<irr<<endl;
995         if(ISetits(4,-1)==0) view2->SetParallel();
996         else  view2->SetPerspective();
997         view2->Top();
998         if(ISetits(3,-1)!=0) view2->ShowAxis();
999     } // end if view2
1000     if(ISetits(5,-1)==1) SSD->Raytrace();
1001     //arrow->DrawArrow(Rmax,0.0,Rmax,0.0);
1002     //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7);
1003     //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s);
1004     //
1005 }
1006 //----------------------------------------------------------------------
1007 void EngineeringSupRB24(){
1008     // Display  RB 24 side cable tray support structure Geometry
1009     // Inputs:
1010     //    none.
1011     // Outputs:
1012     //    none.
1013     // Retrurn:
1014     //    none.
1015     Int_t irr;
1016     //
1017     TGeoManager *mgr2 = gGeoManager;
1018     TGeoVolume *ALIC = mgr2->GetTopVolume();
1019     TCanvas *c4;
1020     if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
1021         c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
1022     c4->Divide(2,1);
1023     TGeoVolume *ITS,*SUPRB24=0;
1024     TGeoNode *node;
1025     TArrow *arrow=new TArrow();
1026     //
1027     node = ALIC->FindNode("ITSV_1");
1028     ITS = node->GetVolume();
1029     node = ITS->FindNode("ITSsupFrameM24_1");
1030     SUPRB24 = node->GetVolume();
1031     //
1032     mgr2->SetNsegments(ISetits(1,-1));
1033     //
1034     mgr2->SetVisLevel(6);
1035     mgr2->SetVisOption(0);
1036     //mgr2->CheckOverlaps(0.01);
1037     //mgr2->PrintOverlaps();
1038     if(ISetits(2,-1)==1){
1039         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1040         mgr2->SetClippingShape(clip);
1041     } // end if
1042     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1043     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1044     //
1045     c4->cd(1);
1046     SUPRB24->Draw();
1047     TPad *p1 = c4->GetPad(1);
1048     TView *view1 = p1->GetView();
1049     if(view1){
1050         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1051         if(irr) cout <<"error="<<irr<<endl;
1052         if(ISetits(4,-1)==0) view1->SetParallel();
1053         else  view1->SetPerspective();
1054         view1->Front();
1055         if(ISetits(3,-1)!=0) view1->ShowAxis();
1056     } // end if view1
1057     if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1058     //
1059     c4->cd(2);
1060     SUPRB24->Draw();
1061     TPad *p2 = c4->GetPad(2);
1062     TView *view2 = p2->GetView();
1063     if(view2){
1064         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1065         if(irr) cout <<"error="<<irr<<endl;
1066         if(ISetits(4,-1)==0) view2->SetParallel();
1067         else  view2->SetPerspective();
1068         view2->Top();
1069         if(ISetits(3,-1)!=0) view2->ShowAxis();
1070     } // end if view2
1071     if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1072     //
1073 }
1074 //----------------------------------------------------------------------
1075 void EngineeringSupTrayRB24(){
1076     // Display  RB 24 side cable tray support structure Geometry
1077     // Inputs:
1078     //    none.
1079     // Outputs:
1080     //    none.
1081     // Retrurn:
1082     //    none.
1083     Int_t irr;
1084     //
1085     TGeoManager *mgr2 = gGeoManager;
1086     TGeoVolume *ALIC = mgr2->GetTopVolume();
1087     TCanvas *c4,*c5;
1088     //if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
1089         c4 = new TCanvas("C4","ITS RB24 Cable Trays and Patch Pannels",500,500);
1090     //c4->Divide(2,1);
1091     TGeoVolume *ITS,*SUPRB24=0;
1092     TGeoNode *node;
1093     TArrow *arrow=new TArrow();
1094     //
1095     node = ALIC->FindNode("ITSV_1");
1096     ITS = node->GetVolume();
1097     node = ITS->FindNode("ITSsupCableTrayMotherMT24_1");
1098     SUPRB24 = node->GetVolume();
1099     //
1100     mgr2->SetNsegments(ISetits(1,-1));
1101     //
1102     mgr2->SetVisLevel(6);
1103     mgr2->SetVisOption(0);
1104     //mgr2->CheckOverlaps(0.01);
1105     //mgr2->PrintOverlaps();
1106     if(ISetits(2,-1)==1){
1107         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1108         mgr2->SetClippingShape(clip);
1109     } // end if
1110     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1111     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1112     //
1113     c4->cd(1);
1114     SUPRB24->Draw();
1115     //TPad *p1 = c4->GetPad(1);
1116     //TView *view1 = p1->GetView();
1117     TView *view1 = c4->GetView();
1118     if(view1){
1119         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1120         if(irr) cout <<"error="<<irr<<endl;
1121         if(ISetits(4,-1)==0) view1->SetParallel();
1122         else  view1->SetPerspective();
1123         view1->Front();
1124         if(ISetits(3,-1)!=0) view1->ShowAxis();
1125     } // end if view1
1126     if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1127     //
1128     //c4->cd(2);
1129         c5 = new TCanvas("C5","ITS RB24 Cable Trays and Patch Pannels",500,500);
1130     c5->cd(1);
1131     SUPRB24->Draw();
1132     //TPad *p2 = c5->GetPad(1);
1133     //TView *view2 = p2->GetView();
1134     TView *view2 = c5->GetView();
1135     if(view2){
1136         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1137         if(irr) cout <<"error="<<irr<<endl;
1138         if(ISetits(4,-1)==0) view2->SetParallel();
1139         else  view2->SetPerspective();
1140         view2->Top();
1141         if(ISetits(3,-1)!=0) view2->ShowAxis();
1142     } // end if view2
1143     if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1144     //
1145 }
1146 //----------------------------------------------------------------------
1147 void EngineeringSupRB26(){
1148     // Display RB 26 side cable tray support structure
1149     // Inputs:
1150     //    none.
1151     // Outputs:
1152     //    none.
1153     // Retrurn:
1154     //    none.
1155     Int_t irr;
1156     //
1157     TGeoManager *mgr2 = gGeoManager;
1158     TGeoVolume *ALIC = mgr2->GetTopVolume();
1159     TCanvas *c5;
1160     if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
1161         c5 = new TCanvas("C5","ITS SDD Cylinder Geometry",900,450);
1162     c5->Divide(2,1);
1163     TGeoVolume *ITS,*SUPRB26=0;
1164     TGeoNode *node;
1165     TArrow *arrow=new TArrow();
1166     //
1167     node = ALIC->FindNode("ITSV_1");
1168     ITS = node->GetVolume();
1169     node = ITS->FindNode("ITSsupFrameM26_1");
1170     SUPRB26 = node->GetVolume();
1171     //
1172     mgr2->SetNsegments(ISetits(1,-1));
1173     //
1174     mgr2->SetVisLevel(6);
1175     mgr2->SetVisOption(0);
1176     //mgr2->CheckOverlaps(0.01);
1177     //mgr2->PrintOverlaps();
1178     if(ISetits(2,-1)==1){
1179         TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1180         mgr2->SetClippingShape(clip);
1181     } // end if
1182     mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1183     if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1184     //
1185     c5->cd(1);
1186     SUPRB26->Draw();
1187     TPad *p1 = c5->GetPad(1);
1188     TView *view1 = p1->GetView();
1189     if(view1){
1190         view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1191         if(irr) cout <<"error="<<irr<<endl;
1192         if(ISetits(4,-1)==0) view1->SetParallel();
1193         else  view1->SetPerspective();
1194         view1->Front();
1195         if(ISetits(3,-1)!=0) view1->ShowAxis();
1196     } // end if view1
1197     if(ISetits(5,-1)==1) SUPRB26->Raytrace();
1198     //
1199     c5->cd(2);
1200     SUPRB26->Draw();
1201     TPad *p2 = c5->GetPad(2);
1202     TView *view2 = p2->GetView();
1203     if(view2){
1204         view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1205         if(irr) cout <<"error="<<irr<<endl;
1206         if(ISetits(4,-1)==0) view2->SetParallel();
1207         else  view2->SetPerspective();
1208         view2->Top();
1209         if(ISetits(3,-1)!=0) view2->ShowAxis();
1210     } // end if view2
1211     if(ISetits(5,-1)==1) SUPRB26->Raytrace();
1212     //
1213 }