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