1 //----------------------------------------------------------------------
2 void Displayv11(const char* filename=""){
3 // Display AliITSv11 Geometry
5 // const char* filename output file with the display in it
11 gSystem->Load("libGeom");
13 if(gGeoManager) delete gGeoManager;
14 mgr2 = gGeoManager = new TGeoManager("ITSGeometry",
15 " ITS Simulation Geometry Manager");
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);
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();
29 mgr2->CloseGeometry();
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");
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;
75 if(v<0) return itsdebug;
79 if(v<0) return nsegments;
91 if(v<0) return perspective;
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;
108 if(v<0.) return phimincut;
112 if(v<0.) return phimaxcut;
116 if(v<0.) return longitude;
120 if(v<0.) return latitude;
124 if(v<0.) return latitude;
130 //----------------------------------------------------------------------
132 // Display AliITSv11 Geometry
134 // const char* filename output file with the display in it
141 TGeoManager *mgr2 = gGeoManager;
142 TGeoVolume *ALIC = mgr2->GetTopVolume();
144 if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
145 c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
148 mgr2->SetNsegments(ISetits(1,-1));
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);
158 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
162 TPad *p1 = c1->GetPad(1);
163 TView *view1 = p1->GetView();
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();
170 if(ISetits(3,-1)!=0) view1->ShowAxis();
172 if(ISetits(5,-1)==1) ALIC->Raytrace();
175 TPad *p2 = c1->GetPad(2);
176 TView *view2 = p2->GetView();
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();
185 if(ISetits(5,-1)==1) ALIC->Raytrace();
188 c1->SetPhi(90.0); c1->SetTheta(90.0);
189 TPad *p3 = c1->GetPad(3);
190 TView *view3 = p3->GetView();
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();
197 if(ISetits(3,-1)!=0) view3->ShowAxis();
199 if(ISetits(5,-1)==1) ALIC->Raytrace();
202 TPad *p4 = c1->GetPad(4);
203 TView *view4 = p4->GetView();
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();
210 if(ISetits(3,-1)!=0) view4->ShowAxis();
212 if(ISetits(5,-1)==1) ALIC->Raytrace();
215 //----------------------------------------------------------------------
216 void EngineeringSPDLayer(){
217 // Display SPD Layer Geometry
226 TGeoManager *mgr2 = gGeoManager;
227 TGeoVolume *ALIC = mgr2->GetTopVolume();
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;
233 TArrow *arrow=new TArrow();
235 node = ALIC->FindNode("ITSV_1");
236 ITS = node->GetVolume();
237 node = ITS->FindNode("ITSSPDSensitiveVirtualvolumeM0_1");
238 SPDLay = node->GetVolume();
240 mgr2->SetNsegments(ISetits(1,-1));
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);
250 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
251 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
254 TView *view1 = c4->GetView();
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();
261 if(ISetits(3,-1)!=0) view1->ShowAxis();
263 if(ISetits(5,-1)==1) SPDLay->Raytrace();
265 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
266 c5 = new TCanvas("C5","ITS SPD Layer Geometry End View",500,500);
268 TView *view2 = c5->GetView();
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();
275 if(ISetits(3,-1)!=0) view2->ShowAxis();
277 if(ISetits(5,-1)==1) SPDLay->Raytrace();
280 //----------------------------------------------------------------------
281 void EngineeringSPDThS(){
282 // Display SPD Thermal Sheald Geometry
291 TGeoManager *mgr2 = gGeoManager;
292 TGeoVolume *ALIC = mgr2->GetTopVolume();
294 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
295 c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
297 TGeoVolume *ITS,*SPDThS=0;
299 TArrow *arrow=new TArrow();
301 node = ALIC->FindNode("ITSV_1");
302 ITS = node->GetVolume();
303 node = ITS->FindNode("ITSspdThermalShealdMotherM_1");
304 SPDThS = node->GetVolume();
306 mgr2->SetNsegments(ISetits(1,-1));
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);
316 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
317 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
321 TPad *p1 = c4->GetPad(1);
322 TView *view1 = p1->GetView();
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();
329 if(ISetits(3,-1)!=0) view1->ShowAxis();
331 if(ISetits(5,-1)==1) SPDThS->Raytrace();
335 TPad *p2 = c4->GetPad(2);
336 TView *view2 = p2->GetView();
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();
343 if(ISetits(3,-1)!=0) view2->ShowAxis();
345 if(ISetits(5,-1)==1) SPDThS->Raytrace();
348 //----------------------------------------------------------------------
349 void EngineeringSDDLayer3(){
350 // Display SDD Layer 3 Geometry
359 TGeoManager *mgr2 = gGeoManager;
360 TGeoVolume *ALIC = mgr2->GetTopVolume();
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;
366 TArrow *arrow=new TArrow();
368 node = ALIC->FindNode("ITSV_1");
369 ITS = node->GetVolume();
370 node = ITS->FindNode("ITSsddLayer3_1");
371 SDDLay3 = node->GetVolume();
373 mgr2->SetNsegments(ISetits(1,-1));
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);
383 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
384 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
387 TView *view1 = c4->GetView();
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();
394 if(ISetits(3,-1)!=0) view1->ShowAxis();
396 if(ISetits(5,-1)==1) SDDLay3->Raytrace();
398 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
399 c5 = new TCanvas("C5","ITS SDD Layer 3 Geometry End View",500,500);
401 TView *view2 = c5->GetView();
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();
408 if(ISetits(3,-1)!=0) view2->ShowAxis();
410 if(ISetits(5,-1)==1) SDDLay3->Raytrace();
413 //----------------------------------------------------------------------
414 void EngineeringSDDLayer4(){
415 // Display SDD Layer 4 Geometry
424 TGeoManager *mgr2 = gGeoManager;
425 TGeoVolume *ALIC = mgr2->GetTopVolume();
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;
431 TArrow *arrow=new TArrow();
433 node = ALIC->FindNode("ITSV_1");
434 ITS = node->GetVolume();
435 node = ITS->FindNode("ITSsddLayer4_1");
436 SDDLay4 = node->GetVolume();
438 mgr2->SetNsegments(ISetits(1,-1));
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);
448 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
449 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
452 TView *view1 = c4->GetView();
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();
459 if(ISetits(3,-1)!=0) view1->ShowAxis();
461 if(ISetits(5,-1)==1) SDDLay4->Raytrace();
463 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
464 c5 = new TCanvas("C5","ITS SDD Layer 4 Geometry End View",500,500);
466 TView *view2 = c5->GetView();
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();
473 if(ISetits(3,-1)!=0) view2->ShowAxis();
475 if(ISetits(5,-1)==1) SDDLay4->Raytrace();
478 //----------------------------------------------------------------------
479 void EngineeringSDDCone(){
480 // Display SDD Cone Geometry
489 TGeoManager *mgr2 = gGeoManager;
490 TGeoVolume *ALIC = mgr2->GetTopVolume();
492 if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
493 c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450);
495 TGeoVolume *ITS,*SDD=0;
498 node = ALIC->FindNode("ITSV_1");
499 ITS = node->GetVolume();
500 node = ITS->FindNode("ITSsddConeL_1");
501 SDD = node->GetVolume();
503 mgr2->SetNsegments(ISetits(1,-1));
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);
513 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
514 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
518 TPad *p1 = c2->GetPad(1);
519 TView *view1 = p1->GetView();
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();
526 if(ISetits(3,-1)!=0) view1->ShowAxis();
528 if(ISetits(5,-1)==1) SDD->Raytrace();
532 TPad *p2 = c2->GetPad(2);
533 TView *view2 = p2->GetView();
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();
540 if(ISetits(3,-1)!=0) view2->ShowAxis();
542 if(ISetits(5,-1)==1) SDD->Raytrace();
545 //----------------------------------------------------------------------
546 void EngineeringSDDCylinder(){
547 // Display SDD Cylinder Geometry
556 TGeoManager *mgr2 = gGeoManager;
557 TGeoVolume *ALIC = mgr2->GetTopVolume();
559 if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
560 c3 = new TCanvas("C3","ITS SDD Cylinder Geometry",900,450);
562 TGeoVolume *ITS,*SDD=0;
564 TArrow *arrow=new TArrow();
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();
574 mgr2->SetNsegments(ISetits(1,-1));
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);
584 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
585 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
589 TPad *p1 = c3->GetPad(1);
590 TView *view1 = p1->GetView();
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();
597 if(ISetits(3,-1)!=0) view1->ShowAxis();
599 if(ISetits(5,-1)==1) SDD->Raytrace();
600 //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
604 TPad *p2 = c3->GetPad(2);
605 TView *view2 = p2->GetView();
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();
612 if(ISetits(3,-1)!=0) view2->ShowAxis();
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);
620 //----------------------------------------------------------------------
621 void EngineeringSSDCone(){
622 // Display SSD Cone Geometry
631 TGeoManager *mgr2 = gGeoManager;
632 TGeoVolume *ALIC = mgr2->GetTopVolume();
634 if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
635 c2 = new TCanvas("C2","ITS SSD Cone Geometry",900,450);
637 TGeoVolume *ITS,*SSD=0;
640 node = ALIC->FindNode("ITSV_1");
641 ITS = node->GetVolume();
642 node = ITS->FindNode("ITSssdConeA_1");
643 SSD = node->GetVolume();
645 mgr2->SetNsegments(ISetits(1,-1));
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);
655 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
656 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
660 TPad *p1 = c2->GetPad(1);
661 TView *view1 = p1->GetView();
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();
668 if(ISetits(3,-1)!=0) view1->ShowAxis();
670 if(ISetits(5,-1)==1) SSD->Raytrace();
674 TPad *p2 = c2->GetPad(2);
675 TView *view2 = p2->GetView();
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();
682 if(ISetits(3,-1)!=0) view2->ShowAxis();
684 if(ISetits(5,-1)==1) SSD->Raytrace();
687 //----------------------------------------------------------------------
688 void EngineeringSSDCylinder(){
689 // Display SSD Cylinder Geometry
698 TGeoManager *mgr2 = gGeoManager;
699 TGeoVolume *ALIC = mgr2->GetTopVolume();
701 if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
702 c3 = new TCanvas("C3","ITS SSD Cylinder Geometry",900,450);
704 TGeoVolume *ITS,*SSD=0;
706 TArrow *arrow=new TArrow();
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();
716 mgr2->SetNsegments(ISetits(1,-1));
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);
726 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
727 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
731 TPad *p1 = c3->GetPad(1);
732 TView *view1 = p1->GetView();
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();
739 if(ISetits(3,-1)!=0) view1->ShowAxis();
741 if(ISetits(5,-1)==1) SSD->Raytrace();
742 //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
746 TPad *p2 = c3->GetPad(2);
747 TView *view2 = p2->GetView();
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();
754 if(ISetits(3,-1)!=0) view2->ShowAxis();
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);
762 //----------------------------------------------------------------------
763 void EngineeringSupRB24(){
764 // Display RB 24 side cable tray support structure Geometry
773 TGeoManager *mgr2 = gGeoManager;
774 TGeoVolume *ALIC = mgr2->GetTopVolume();
776 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
777 c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
779 TGeoVolume *ITS,*SUPRB24=0;
781 TArrow *arrow=new TArrow();
783 node = ALIC->FindNode("ITSV_1");
784 ITS = node->GetVolume();
785 node = ITS->FindNode("ITSsupFrameM24_1");
786 SUPRB24 = node->GetVolume();
788 mgr2->SetNsegments(ISetits(1,-1));
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);
798 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
799 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
803 TPad *p1 = c4->GetPad(1);
804 TView *view1 = p1->GetView();
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();
811 if(ISetits(3,-1)!=0) view1->ShowAxis();
813 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
817 TPad *p2 = c4->GetPad(2);
818 TView *view2 = p2->GetView();
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();
825 if(ISetits(3,-1)!=0) view2->ShowAxis();
827 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
830 //----------------------------------------------------------------------
831 void EngineeringSupTrayRB24(){
832 // Display RB 24 side cable tray support structure Geometry
841 TGeoManager *mgr2 = gGeoManager;
842 TGeoVolume *ALIC = mgr2->GetTopVolume();
844 //if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
845 c4 = new TCanvas("C4","ITS RB24 Cable Trays and Patch Pannels",500,500);
847 TGeoVolume *ITS,*SUPRB24=0;
849 TArrow *arrow=new TArrow();
851 node = ALIC->FindNode("ITSV_1");
852 ITS = node->GetVolume();
853 node = ITS->FindNode("ITSsupCableTrayMotherMT24_1");
854 SUPRB24 = node->GetVolume();
856 mgr2->SetNsegments(ISetits(1,-1));
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);
866 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
867 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
871 //TPad *p1 = c4->GetPad(1);
872 //TView *view1 = p1->GetView();
873 TView *view1 = c4->GetView();
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();
880 if(ISetits(3,-1)!=0) view1->ShowAxis();
882 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
885 c5 = new TCanvas("C5","ITS RB24 Cable Trays and Patch Pannels",500,500);
888 //TPad *p2 = c5->GetPad(1);
889 //TView *view2 = p2->GetView();
890 TView *view2 = c5->GetView();
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();
897 if(ISetits(3,-1)!=0) view2->ShowAxis();
899 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
902 //----------------------------------------------------------------------
903 void EngineeringSupRB26(){
904 // Display RB 26 side cable tray support structure
913 TGeoManager *mgr2 = gGeoManager;
914 TGeoVolume *ALIC = mgr2->GetTopVolume();
916 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
917 c5 = new TCanvas("C5","ITS SDD Cylinder Geometry",900,450);
919 TGeoVolume *ITS,*SUPRB26=0;
921 TArrow *arrow=new TArrow();
923 node = ALIC->FindNode("ITSV_1");
924 ITS = node->GetVolume();
925 node = ITS->FindNode("ITSsupFrameM26_1");
926 SUPRB26 = node->GetVolume();
928 mgr2->SetNsegments(ISetits(1,-1));
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);
938 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
939 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
943 TPad *p1 = c5->GetPad(1);
944 TView *view1 = p1->GetView();
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();
951 if(ISetits(3,-1)!=0) view1->ShowAxis();
953 if(ISetits(5,-1)==1) SUPRB26->Raytrace();
957 TPad *p2 = c5->GetPad(2);
958 TView *view2 = p2->GetView();
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();
965 if(ISetits(3,-1)!=0) view2->ShowAxis();
967 if(ISetits(5,-1)==1) SUPRB26->Raytrace();