1 //----------------------------------------------------------------------
3 #if !defined(__CINT__) || defined(__MAKECINT__)
7 #include <TGeoVolume.h>
8 #include <TGeoMedium.h>
9 #include <TGeoManager.h>
12 #include <TControlBar.h>
16 #include <TVirtualPad.h>
18 #include "AliITSgeom.h"
19 #include "AliITSInitGeometry.h"
20 #include "AliITSv11GeometrySPD.h"
21 #include "AliITSv11GeometrySDD.h"
22 #include "AliITSv11GeometrySSD.h"
23 #include "AliITSv11GeometrySupport.h"
27 static AliITSv11GeometrySPD *gspd;
28 static AliITSv11GeometrySDD *gsdd;
29 static AliITSv11GeometrySSD *gssd;
30 static AliITSv11GeometrySupport *gsupp;
31 static AliITSgeom *geom;
33 void CreateMaterialsITS();
35 void AliMaterial(Int_t imat, const char* name, Float_t a,
36 Float_t z, Float_t dens, Float_t radl,
38 void AliMedium(Int_t numed, const char *name, Int_t nmat,
39 Int_t isvol, Int_t ifield, Float_t fieldm,
40 Float_t tmaxfd, Float_t stemax, Float_t deemax,
41 Float_t epsil, Float_t stmin);
42 void AliMixture(Int_t kmat, const char* name, Float_t* a, Float_t* z,
43 Double_t dens, Int_t nlmat=0, Float_t* wmat=0);
44 void Mixture(Int_t& kmat, const char* name, Double_t* a, Double_t* z,
45 Double_t dens, Int_t nlmat, Double_t* wmat);
46 Double_t* CreateDoubleArray(Float_t* array, Int_t size);
48 Bool_t Make2DCrossSections(TPolyLine &a0,TPolyLine &a1,
49 TPolyLine &b0,TPolyLine &b1,TPolyMarker &p);
52 //----------------------------------------------------------------------
54 // Display AliITSv11 Geometry
56 // const char* filename output file with the display in it
62 gSystem->Load("libGeom");
64 if(gGeoManager) delete gGeoManager;
65 gGeoManager = new TGeoManager("ITSGeometry",
66 " ITS Simulation Geometry Manager");
67 TGeoManager *mgr2 = gGeoManager;
69 const AliITSVersion_t kv11=(AliITSVersion_t)110;
70 const Char_t *cvsDate="$Date$";
71 const Char_t *cvsRevision="$Revision$";
72 const Int_t kLength=100;
73 Char_t vstrng[kLength];
74 AliITSInitGeometry initgeom(kv11,1);
76 TGeoMaterial *vacmat = new TGeoMaterial("Vacume",0,0,0);
77 TGeoMedium *vacmed = new TGeoMedium("Vacume_med",1,vacmat);
78 TGeoVolume *ALIC = mgr2->MakeBox("ALIC",vacmed,1000.,1000.,2000.);
79 mgr2->SetTopVolume(ALIC);
80 TGeoVolume *ITS = mgr2->MakeBox("ITSV",vacmed,990.,990.,1990.);
81 if(initgeom.WriteVersionString(vstrng,kLength,kv11,1,cvsDate,cvsRevision))
82 ITS->SetTitle(vstrng);
83 //TGeoVolumeAssembly *ITSSPD = new TGeoVolumeAssembly("ITSSPD");
84 //ITS->AddNode(ITSSPD,1);
88 AliITSv11 *its = new AliITSv11(0,3);
89 its->SetDebug(ISetits(0,-1));
90 its->GetSPDGeometry()->SetDebug(ISetits(0,-1));
91 its->GetSupGeometry()->SetDebug(ISetits(0,-1));
92 its->CreateMaterials();
93 its->CreateGeometry();
95 gspd = new AliITSv11GeometrySPD(0);
96 gsdd = new AliITSv11GeometrySDD();
97 gsupp = new AliITSv11GeometrySupport(0);
98 gssd = new AliITSv11GeometrySSD();
100 CreateMaterialsITS();
101 gspd->SPDSector(ITS,mgr2);
102 gsupp->SPDCone(ITS,mgr2);
104 gsupp->SDDCone(ITS,mgr2);
107 gsdd->ForwardLayer3(ITS);// in Hybrid its in IS02
108 gsdd->ForwardLayer4(ITS);// in Hybrid its in IS02
111 gssd->LadderSupportLayer5(ITS);
112 gssd->LadderSupportLayer6(ITS);
113 gssd->EndCapSupportSystemLayer6(ITS);
114 gssd->EndCapSupportSystemLayer5(ITS);
115 gsupp->SSDCone(ITS,mgr2);
116 gsupp->ServicesCableSupport(ITS);
118 mgr2->CloseGeometry();
120 geom = new AliITSgeom();
121 initgeom.InitAliITSgeom(geom);
122 geom->WriteNewFile("ITSgeomV11.det");
124 TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10);
125 bar->AddButton("Set Clipping on","ISetits(2,1)","Clipping on");
126 bar->AddButton("Set Cllipping off","ISetits(2,0)","Clipping off");
127 bar->AddButton("Set axis on","ISetits(3,1)","Show Axis on");
128 bar->AddButton("Set axis off","ISetits(3,0)","Show Axis off");
129 bar->AddButton("Set perspective on","ISetits(4,1)","Perspective on");
130 bar->AddButton("Set perspective off","ISetits(4,0)","Perspective off");
131 bar->AddButton("Set RayTrace on","ISetits(5,1)","Perspective on");
132 bar->AddButton("Set RayTrace off","ISetits(5,0)","Perspective off");
133 bar->AddButton("Set circle/80","ISetits(1,80)","circles ~ by 80 lines");
134 bar->AddButton("Display Geometry","Displayit()","Run Displayit");
135 bar->AddButton("Display SPD Sector Volume","EngineeringSPDSector()",
136 "Run EngineeringSPDSector");
137 bar->AddButton("Print SPD Sector Volume data xfig","PrintSPDSectorData()",
138 "Run PrintSPDSectorData");
139 bar->AddButton("Display SPD General Volume","EngineeringSPDCenter()",
140 "Run EngineeringSPDCenter");
141 bar->AddButton("Display SPD Thermal Shield","EngineeringSPDThS()",
142 "Run EngineeringSPDThS");
143 bar->AddButton("Display SPD Sector Cross Sections","EngineeringSPDSCS()",
144 "Run EngineeringSPDSCS");
145 bar->AddButton("Display SDD Layer 3","EngineeringSDDLayer3()",
146 "Run EngineeringSDDLayer3");
147 bar->AddButton("Display SDD Layer 4","EngineeringSDDLayer4()",
148 "Run EngineeringSDDLayer4");
149 bar->AddButton("Display SDD Cone","EngineeringSDDCone()",
150 "Run EngineeringSDDCone");
151 bar->AddButton("Display SDD Central Cylinder","EngineeringSDDCylinder()",
152 "Run EngineeringSDDCylinder");
153 bar->AddButton("Display SSD Layer 5","EngineeringSSDLayer5()",
154 "Run EngineeringSSDLayer5");
155 bar->AddButton("Display SSD Layer 6","EngineeringSSDLayer6()",
156 "Run EngineeringSSDLayer6");
157 bar->AddButton("Display SSD Cone","EngineeringSSDCone()",
158 "Run EngineeringSSDCone");
159 bar->AddButton("Display SSD Central Cylinder","EngineeringSSDCylinder()",
160 "Run EngineeringSSDCylinder");
161 // bar->AddButton("Display SUP RB24 side","EngineeringSupRB24()",
162 // "Run EngineeringSupRB24");
163 // bar->AddButton("Display Cable Trays RB24 side","EngineeringSupTrayRB24()",
164 // "Run EngineeringSupTrayRB24");
165 // bar->AddButton("Display SUP RB26 side","EngineeringSupRB26()",
166 // "Run EngineeringSupRB26");
167 bar->AddButton("Save Geometry to File","ExportToFile()",
169 bar->AddButton("Quit/Exit",".q","Exit");
171 gROOT->SaveContext();
174 //----------------------------------------------------------------------
176 // Quirry file name and write geometry to a root file.
178 // const char* filename output file with the display in it
183 Char_t filename[100];
185 printf("Enter File name:");
186 scanf("%s",filename);
188 gGeoManager->Export(filename);
190 //----------------------------------------------------------------------
191 Int_t ISetits(Int_t t,Int_t v){
192 static Int_t itsdebug=1,nsegments=80,cut=0,axis=1,perspective=0,ray=0;
196 if(v<0) return itsdebug;
200 if(v<0) return nsegments;
212 if(v<0) return perspective;
222 //----------------------------------------------------------------------
223 Double_t DSetits(Int_t t,Double_t v){
224 static Double_t phimincut=0.0,phimaxcut=180.0;
225 static Double_t longitude=90.0,latitude=0.0;
229 if(v<0.) return phimincut;
233 if(v<0.) return phimaxcut;
237 if(v<0.) return longitude;
241 if(v<0.) return latitude;
245 if(v<0.) return latitude;
251 //----------------------------------------------------------------------
253 // Display AliITSv11 Geometry
255 // const char* filename output file with the display in it
262 TGeoManager *mgr2 = gGeoManager;
263 TGeoVolume *ALIC = mgr2->GetTopVolume();
265 if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
266 c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
269 mgr2->SetNsegments(ISetits(1,-1));
271 mgr2->SetVisLevel(6);
272 mgr2->SetVisOption(0);
273 //mgr2->CheckOverlaps(0.01);
274 //mgr2->PrintOverlaps();
275 if(ISetits(2,-1)==1){
276 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
277 mgr2->SetClippingShape(clip);
279 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
283 TPad *p1 = (TPad*)c1->GetPad(1);
284 TView *view1 = p1->GetView();
286 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
287 if(irr) cout <<"error="<<irr<<endl;
288 if(ISetits(4,-1)==0) view1->SetParallel();
289 else view1->SetPerspective();
291 if(ISetits(3,-1)!=0) view1->ShowAxis();
293 if(ISetits(5,-1)==1) ALIC->Raytrace();
296 TPad *p2 = c1->GetPad(2);
297 TView *view2 = p2->GetView();
299 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
300 if(irr) cout <<"error="<<irr<<endl;
301 if(ISetits(4,-1)==0) view2->SetParallel();
302 else view2->SetPerspective();
303 view2->RotateView(60.,30.);
304 if(ISetits(3,-1)!=0) view2->ShowAxis();
306 if(ISetits(5,-1)==1) ALIC->Raytrace();
309 c1->SetPhi(90.0); c1->SetTheta(90.0);
310 TPad *p3 = c1->GetPad(3);
311 TView *view3 = p3->GetView();
313 view3->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
314 if(irr) cout <<"error="<<irr<<endl;
315 if(ISetits(4,-1)==0) view3->SetParallel();
316 else view3->SetPerspective();
318 if(ISetits(3,-1)!=0) view3->ShowAxis();
320 if(ISetits(5,-1)==1) ALIC->Raytrace();
323 TPad *p4 = c1->GetPad(4);
324 TView *view4 = p4->GetView();
326 view4->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
327 if(irr) cout <<"error="<<irr<<endl;
328 if(ISetits(4,-1)==0) view4->SetParallel();
329 else view4->SetPerspective();
331 if(ISetits(3,-1)!=0) view4->ShowAxis();
333 if(ISetits(5,-1)==1) ALIC->Raytrace();
336 //----------------------------------------------------------------------
337 void EngineeringSPDSCS(){
338 // Display SPD Carbon Fiber Sector Cross sections A and B
345 TPolyLine *a0,*a1,*b0,*b1;
351 a0 = new TPolyLine();
352 a1 = new TPolyLine();
353 b0 = new TPolyLine();
354 b1 = new TPolyLine();
355 p = new TPolyMarker();
359 b0->SetLineStyle(2); // dashed
361 b1->SetLineStyle(2); // dashed
362 p->SetMarkerColor(2);
363 p->SetMarkerStyle(5);
364 if(gspd==0||Make2DCrossSections(*a0,*a1,*b0,*b1,*p)==kFALSE)return;
365 for(i=0;i<a0->GetN();i++) {
366 if(TMath::Abs(a0->GetX()[i])>max) max = TMath::Abs(a0->GetX()[i]);
367 if(TMath::Abs(a0->GetY()[i])>max) max = TMath::Abs(a0->GetY()[i]);
369 for(i=0;i<a1->GetN();i++) {
370 if(TMath::Abs(a1->GetX()[i])>max) max = TMath::Abs(a0->GetX()[i]);
371 if(TMath::Abs(a1->GetY()[i])>max) max = TMath::Abs(a1->GetY()[i]);
373 for(i=0;i<b0->GetN();i++) {
374 if(TMath::Abs(b0->GetX()[i])>max) max = TMath::Abs(b0->GetX()[i]);
375 if(TMath::Abs(b0->GetY()[i])>max) max = TMath::Abs(b0->GetY()[i]);
377 for(i=0;i<b1->GetN();i++) {
378 if(TMath::Abs(b1->GetX()[i])>max) max = TMath::Abs(b1->GetX()[i]);
379 if(TMath::Abs(b1->GetY()[i])>max) max = TMath::Abs(b1->GetY()[i]);
382 cSPDSCS = (TCanvas*)gROOT->FindObject("cSPDSCS");
383 if(cSPDSCS==0) delete cSPDSCS;
384 cSPDSCS = new TCanvas("cSPDSCS","SPD Carbon Fiber Sector Cross sections",2);
385 cSPDSCS->Range(-max,-max,max,max);
386 //cSPDSCS->RangeAxis();
387 cSPDSCS->SetFixedAspectRatio(kTRUE);
397 //----------------------------------------------------------------------
398 void EngineeringSPDSector(){
399 // Display SPD Sector Geometry
408 TGeoManager *mgr2 = gGeoManager;
409 TGeoVolume *ALIC = mgr2->GetTopVolume();
410 TCanvas *c4=0, *c5=0;
411 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
412 c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
413 TGeoVolume *ITS=0,*ITSSPD=0,*SPDLay=0;
416 node = ALIC->FindNode("ITSV_1");
417 ITS = node->GetVolume();
418 node = ITS->FindNode("ITSSPD_1");
419 ITSSPD = node->GetVolume();
420 node = ITSSPD->FindNode("ITSSPDCarbonFiberSectorV_1");
421 if(node==0)Error("EngineeringSPDSector","could not find node %s",
422 "ITSSPDCarbonFiberSectorV_1");
423 SPDLay = node->GetVolume();
424 if(SPDLay==0)Error("EngineeringSPDSector","could not find volume SPDLay");
426 mgr2->SetNsegments(ISetits(1,-1));
428 mgr2->SetVisLevel(6);
429 mgr2->SetVisOption(0);
430 //mgr2->CheckOverlaps(0.01);
431 //mgr2->PrintOverlaps();
432 if(ISetits(2,-1)==1){
433 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
434 mgr2->SetClippingShape(clip);
436 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
437 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
440 TView *view1 = c4->GetView();
442 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
443 if(irr) cout <<"error="<<irr<<endl;
444 if(ISetits(4,-1)==0) view1->SetParallel();
445 else view1->SetPerspective();
447 if(ISetits(3,-1)!=0) view1->ShowAxis();
449 if(ISetits(5,-1)==1) SPDLay->Raytrace();
451 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
452 c5 = new TCanvas("C5","ITS SPD Sector Geometry End View",500,500);
454 TView *view2 = c5->GetView();
456 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
457 if(irr) cout <<"error="<<irr<<endl;
458 if(ISetits(4,-1)==0) view2->SetParallel();
459 else view2->SetPerspective();
461 if(ISetits(3,-1)!=0) view2->ShowAxis();
463 if(ISetits(5,-1)==1) SPDLay->Raytrace();
466 //----------------------------------------------------------------------
467 void PrintSPDSectorData(){
468 // Print SPD Sector Data
477 TGeoManager *mgr2 = gGeoManager;
482 //mgr2->cd("ITSSPDCarbonFiberSupportSectorA0_1");
483 vA0 = mgr2->FindVolumeFast("ITSSPDCarbonFiberSupportSectorA0");
484 sA0 = (TGeoXtru*) vA0->GetShape();
485 irr = sA0->GetNvert();
488 cout <<"2 3 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 "<<irr;
490 x = sA0->GetX(i)+2.5;
491 y = sA0->GetY(i)+2.5;
492 if(!(i%6)) { cout << endl; cout <<" ";}
493 cout<<" "<<TMath::Nint(x*450.)<<" "<<TMath::Nint(y*450);
494 //cout<<" "<<x<<" "<<y;
496 x = sA0->GetX(0)+2.5;
497 y = sA0->GetY(0)+2.5;
498 if(!(i%6)) { cout << endl; cout <<" ";}
499 cout<<" "<<TMath::Nint(x*450.)<<" "<<TMath::Nint(y*450);
500 //cout<<" "<<x<<" "<<y;
504 //----------------------------------------------------------------------
505 void EngineeringSPDCenter(){
506 // Display SPD Centeral Geometry
515 TGeoManager *mgr2 = gGeoManager;
516 TGeoVolume *ALIC = mgr2->GetTopVolume();
517 TCanvas *c4=0, *c5=0;
518 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
519 c4 = new TCanvas("C4","ITS SPD Layer Geometry Side View",500,500);
520 TGeoVolume *ITS,*ITSSPD,*SPDLay=0;
523 node = ALIC->FindNode("ITSV_1");
524 ITS = node->GetVolume();
525 node = ITS->FindNode("ITSSPD_1");
526 ITSSPD = node->GetVolume();
528 mgr2->SetNsegments(ISetits(1,-1));
530 mgr2->SetVisLevel(6);
531 mgr2->SetVisOption(0);
532 //mgr2->CheckOverlaps(0.01);
533 //mgr2->PrintOverlaps();
534 if(ISetits(2,-1)==1){
535 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
536 mgr2->SetClippingShape(clip);
538 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
539 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
542 TView *view1 = c4->GetView();
544 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
545 if(irr) cout <<"error="<<irr<<endl;
546 if(ISetits(4,-1)==0) view1->SetParallel();
547 else view1->SetPerspective();
549 if(ISetits(3,-1)!=0) view1->ShowAxis();
551 if(ISetits(5,-1)==1) SPDLay->Raytrace();
553 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
554 c5 = new TCanvas("C5","ITS SPD Centeral Geometry End View",500,500);
556 TView *view2 = c5->GetView();
558 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
559 if(irr) cout <<"error="<<irr<<endl;
560 if(ISetits(4,-1)==0) view2->SetParallel();
561 else view2->SetPerspective();
563 if(ISetits(3,-1)!=0) view2->ShowAxis();
565 if(ISetits(5,-1)==1) ITSSPD->Raytrace();
568 //----------------------------------------------------------------------
569 void EngineeringSPDThS(){
570 // Display SPD Thermal Shield Geometry
579 TGeoManager *mgr2 = gGeoManager;
580 TGeoVolume *ALIC = mgr2->GetTopVolume();
582 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
583 c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
585 TGeoVolume *ITS,*SPDThS=0;
588 node = ALIC->FindNode("ITSV_1");
589 ITS = node->GetVolume();
590 node = ITS->FindNode("ITSspdThermalShield_1");
591 SPDThS = node->GetVolume();
593 mgr2->SetNsegments(ISetits(1,-1));
595 mgr2->SetVisLevel(6);
596 mgr2->SetVisOption(0);
597 //mgr2->CheckOverlaps(0.01);
598 //mgr2->PrintOverlaps();
599 if(ISetits(2,-1)==1){
600 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
601 mgr2->SetClippingShape(clip);
603 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
604 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
608 TPad *p1 = (TPad*)c4->GetPad(1);
609 TView *view1 = p1->GetView();
611 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
612 if(irr) cout <<"error="<<irr<<endl;
613 if(ISetits(4,-1)==0) view1->SetParallel();
614 else view1->SetPerspective();
616 if(ISetits(3,-1)!=0) view1->ShowAxis();
618 if(ISetits(5,-1)==1) SPDThS->Raytrace();
622 TPad *p2 = (TPad*)c4->GetPad(2);
623 TView *view2 = p2->GetView();
625 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
626 if(irr) cout <<"error="<<irr<<endl;
627 if(ISetits(4,-1)==0) view2->SetParallel();
628 else view2->SetPerspective();
630 if(ISetits(3,-1)!=0) view2->ShowAxis();
632 if(ISetits(5,-1)==1) SPDThS->Raytrace();
635 //----------------------------------------------------------------------
636 void EngineeringSDDLayer3(){
637 // Display SDD Layer 3 Geometry
646 TGeoManager *mgr2 = gGeoManager;
647 TGeoVolume *ALIC = mgr2->GetTopVolume();
648 TCanvas *c4=0, *c5=0;
649 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
650 c4 = new TCanvas("C4","ITS SDD Layer 3 Geometry Side View",500,500);
651 TGeoVolume *ITS,*SDDLay3=0;
654 node = ALIC->FindNode("ITSV_1");
655 ITS = node->GetVolume();
656 node = ITS->FindNode("ITSsddLayer3_1");
657 SDDLay3 = node->GetVolume();
659 mgr2->SetNsegments(ISetits(1,-1));
661 mgr2->SetVisLevel(6);
662 mgr2->SetVisOption(0);
663 //mgr2->CheckOverlaps(0.01);
664 //mgr2->PrintOverlaps();
665 if(ISetits(2,-1)==1){
666 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
667 mgr2->SetClippingShape(clip);
669 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
670 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
673 TView *view1 = c4->GetView();
675 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
676 if(irr) cout <<"error="<<irr<<endl;
677 if(ISetits(4,-1)==0) view1->SetParallel();
678 else view1->SetPerspective();
680 if(ISetits(3,-1)!=0) view1->ShowAxis();
682 if(ISetits(5,-1)==1) SDDLay3->Raytrace();
684 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
685 c5 = new TCanvas("C5","ITS SDD Layer 3 Geometry End View",500,500);
687 TView *view2 = c5->GetView();
689 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
690 if(irr) cout <<"error="<<irr<<endl;
691 if(ISetits(4,-1)==0) view2->SetParallel();
692 else view2->SetPerspective();
694 if(ISetits(3,-1)!=0) view2->ShowAxis();
696 if(ISetits(5,-1)==1) SDDLay3->Raytrace();
699 //----------------------------------------------------------------------
700 void EngineeringSDDLayer4(){
701 // Display SDD Layer 4 Geometry
710 TGeoManager *mgr2 = gGeoManager;
711 TGeoVolume *ALIC = mgr2->GetTopVolume();
712 TCanvas *c4=0, *c5=0;
713 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
714 c4 = new TCanvas("C4","ITS SDD Layer 4 Geometry Side View",500,500);
715 TGeoVolume *ITS,*SDDLay4=0;
718 node = ALIC->FindNode("ITSV_1");
719 ITS = node->GetVolume();
720 node = ITS->FindNode("ITSsddLayer4_1");
721 SDDLay4 = node->GetVolume();
723 mgr2->SetNsegments(ISetits(1,-1));
725 mgr2->SetVisLevel(6);
726 mgr2->SetVisOption(0);
727 //mgr2->CheckOverlaps(0.01);
728 //mgr2->PrintOverlaps();
729 if(ISetits(2,-1)==1){
730 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
731 mgr2->SetClippingShape(clip);
733 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
734 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
737 TView *view1 = c4->GetView();
739 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
740 if(irr) cout <<"error="<<irr<<endl;
741 if(ISetits(4,-1)==0) view1->SetParallel();
742 else view1->SetPerspective();
744 if(ISetits(3,-1)!=0) view1->ShowAxis();
746 if(ISetits(5,-1)==1) SDDLay4->Raytrace();
748 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
749 c5 = new TCanvas("C5","ITS SDD Layer 4 Geometry End View",500,500);
751 TView *view2 = c5->GetView();
753 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
754 if(irr) cout <<"error="<<irr<<endl;
755 if(ISetits(4,-1)==0) view2->SetParallel();
756 else view2->SetPerspective();
758 if(ISetits(3,-1)!=0) view2->ShowAxis();
760 if(ISetits(5,-1)==1) SDDLay4->Raytrace();
763 //----------------------------------------------------------------------
764 void EngineeringSDDCone(){
765 // Display SDD Cone Geometry
774 TGeoManager *mgr2 = gGeoManager;
775 TGeoVolume *ALIC = mgr2->GetTopVolume();
777 if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
778 c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450);
780 TGeoVolume *ITS,*SDD=0;
783 node = ALIC->FindNode("ITSV_1");
784 ITS = node->GetVolume();
785 node = ITS->FindNode("SDDCarbonFiberCone_1");
786 SDD = 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 = (TPad*)c2->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->SetParallel();
809 else view1->SetPerspective();
811 if(ISetits(3,-1)!=0) view1->ShowAxis();
813 if(ISetits(5,-1)==1) SDD->Raytrace();
817 TPad *p2 = (TPad*)c2->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->SetParallel();
823 else view2->SetPerspective();
825 if(ISetits(3,-1)!=0) view2->ShowAxis();
827 if(ISetits(5,-1)==1) SDD->Raytrace();
830 //----------------------------------------------------------------------
831 void EngineeringSDDCylinder(){
832 // Display SDD Cylinder Geometry
841 TGeoManager *mgr2 = gGeoManager;
842 TGeoVolume *ALIC = mgr2->GetTopVolume();
844 if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
845 c3 = new TCanvas("C3","ITS SDD Cylinder Geometry",900,450);
847 TGeoVolume *ITS,*SDD=0;
849 // TArrow *arrow=new TArrow();
851 node = ALIC->FindNode("ITSV_1");
852 ITS = node->GetVolume();
853 node = ITS->FindNode("SDDCarbonFiberCylinder_1");
854 SDD = node->GetVolume();
855 // Double_t Rmin = ((TGeoTube*)(SDD->GetShape()))->GetRmin();
856 // Double_t Rmax = ((TGeoTube*)(SDD->GetShape()))->GetRmax();
857 // Double_t Dz = ((TGeoTube*)(SDD->GetShape()))->GetDz();
859 mgr2->SetNsegments(ISetits(1,-1));
861 mgr2->SetVisLevel(6);
862 mgr2->SetVisOption(0);
863 //mgr2->CheckOverlaps(0.01);
864 //mgr2->PrintOverlaps();
865 if(ISetits(2,-1)==1){
866 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
867 mgr2->SetClippingShape(clip);
869 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
870 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
874 TPad *p1 = (TPad*)c3->GetPad(1);
875 TView *view1 = p1->GetView();
877 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
878 if(irr) cout <<"error="<<irr<<endl;
879 if(ISetits(4,-1)==0) view1->SetParallel();
880 else view1->SetPerspective();
882 if(ISetits(3,-1)!=0) view1->ShowAxis();
884 if(ISetits(5,-1)==1) SDD->Raytrace();
885 //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
889 TPad *p2 = (TPad*)c3->GetPad(2);
890 TView *view2 = p2->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->SetParallel();
895 else view2->SetPerspective();
897 if(ISetits(3,-1)!=0) view2->ShowAxis();
899 if(ISetits(5,-1)==1) SDD->Raytrace();
900 //arrow->DrawArrow(Rmax,0.0,Rmax,0.0);
901 //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7);
902 //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s);
905 //----------------------------------------------------------------------
906 void EngineeringSSDLayer5(){
907 // Display SSD Layer 5 Geometry
916 TGeoManager *mgr2 = gGeoManager;
917 TGeoVolume *ALIC = mgr2->GetTopVolume();
918 TCanvas *c4=0, *c5=0;
919 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
920 c4 = new TCanvas("C4","ITS SDD Layer 5 Geometry Side View",500,500);
921 TGeoVolume *ITS,*SDDLay5=0;
924 node = ALIC->FindNode("ITSV_1");
925 ITS = node->GetVolume();
926 node = ITS->FindNode("ITSssdLayer5_1");
927 SDDLay5 = node->GetVolume();
929 mgr2->SetNsegments(ISetits(1,-1));
931 mgr2->SetVisLevel(6);
932 mgr2->SetVisOption(0);
933 //mgr2->CheckOverlaps(0.01);
934 //mgr2->PrintOverlaps();
935 if(ISetits(2,-1)==1){
936 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
937 mgr2->SetClippingShape(clip);
939 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
940 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
943 TView *view1 = c4->GetView();
945 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
946 if(irr) cout <<"error="<<irr<<endl;
947 if(ISetits(4,-1)==0) view1->SetParallel();
948 else view1->SetPerspective();
950 if(ISetits(3,-1)!=0) view1->ShowAxis();
952 if(ISetits(5,-1)==1) SDDLay5->Raytrace();
954 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
955 c5 = new TCanvas("C5","ITS SDD Layer 5 Geometry End View",500,500);
957 TView *view2 = c5->GetView();
959 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
960 if(irr) cout <<"error="<<irr<<endl;
961 if(ISetits(4,-1)==0) view2->SetParallel();
962 else view2->SetPerspective();
964 if(ISetits(3,-1)!=0) view2->ShowAxis();
966 if(ISetits(5,-1)==1) SDDLay5->Raytrace();
969 //----------------------------------------------------------------------
970 void EngineeringSSDLayer6(){
971 // Display SSD Layer 6 Geometry
980 TGeoManager *mgr2 = gGeoManager;
981 TGeoVolume *ALIC = mgr2->GetTopVolume();
982 TCanvas *c4=0, *c5=0;
983 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
984 c4 = new TCanvas("C4","ITS SDD Layer 6 Geometry Side View",500,500);
985 TGeoVolume *ITS,*SDDLay6=0;
988 node = ALIC->FindNode("ITSV_1");
989 ITS = node->GetVolume();
990 node = ITS->FindNode("ITSssdLayer6_1");
991 SDDLay6 = node->GetVolume();
993 mgr2->SetNsegments(ISetits(1,-1));
995 mgr2->SetVisLevel(6);
996 mgr2->SetVisOption(0);
997 //mgr2->CheckOverlaps(0.01);
998 //mgr2->PrintOverlaps();
999 if(ISetits(2,-1)==1){
1000 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1001 mgr2->SetClippingShape(clip);
1003 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1004 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1007 TView *view1 = c4->GetView();
1009 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1010 if(irr) cout <<"error="<<irr<<endl;
1011 if(ISetits(4,-1)==0) view1->SetParallel();
1012 else view1->SetPerspective();
1014 if(ISetits(3,-1)!=0) view1->ShowAxis();
1016 if(ISetits(5,-1)==1) SDDLay6->Raytrace();
1018 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
1019 c5 = new TCanvas("C5","ITS SDD Layer 6 Geometry End View",500,500);
1021 TView *view2 = c5->GetView();
1023 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1024 if(irr) cout <<"error="<<irr<<endl;
1025 if(ISetits(4,-1)==0) view2->SetParallel();
1026 else view2->SetPerspective();
1028 if(ISetits(3,-1)!=0) view2->ShowAxis();
1030 if(ISetits(5,-1)==1) SDDLay6->Raytrace();
1033 //----------------------------------------------------------------------
1034 void EngineeringSSDCone(){
1035 // Display SSD Cone Geometry
1044 TGeoManager *mgr2 = gGeoManager;
1045 TGeoVolume *ALIC = mgr2->GetTopVolume();
1047 if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
1048 c2 = new TCanvas("C2","ITS SSD Cone Geometry",900,450);
1050 TGeoVolume *ITS,*SSD=0;
1053 node = ALIC->FindNode("ITSV_1");
1054 ITS = node->GetVolume();
1055 node = ITS->FindNode("ITSssdCone_1");
1056 SSD = node->GetVolume();
1058 mgr2->SetNsegments(ISetits(1,-1));
1060 mgr2->SetVisLevel(6);
1061 mgr2->SetVisOption(0);
1062 //mgr2->CheckOverlaps(0.01);
1063 //mgr2->PrintOverlaps();
1064 if(ISetits(2,-1)==1){
1065 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1066 mgr2->SetClippingShape(clip);
1068 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1069 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1073 TPad *p1 = (TPad*)c2->GetPad(1);
1074 TView *view1 = p1->GetView();
1076 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1077 if(irr) cout <<"error="<<irr<<endl;
1078 if(ISetits(4,-1)==0) view1->SetParallel();
1079 else view1->SetPerspective();
1081 if(ISetits(3,-1)!=0) view1->ShowAxis();
1083 if(ISetits(5,-1)==1) SSD->Raytrace();
1087 TPad *p2 = (TPad*)c2->GetPad(2);
1088 TView *view2 = p2->GetView();
1090 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1091 if(irr) cout <<"error="<<irr<<endl;
1092 if(ISetits(4,-1)==0) view2->SetParallel();
1093 else view2->SetPerspective();
1095 if(ISetits(3,-1)!=0) view2->ShowAxis();
1097 if(ISetits(5,-1)==1) SSD->Raytrace();
1100 //----------------------------------------------------------------------
1101 void EngineeringSSDCylinder(){
1102 // Display SSD Cylinder Geometry
1111 TGeoManager *mgr2 = gGeoManager;
1112 TGeoVolume *ALIC = mgr2->GetTopVolume();
1114 if(!(c3 = (TCanvas*)gROOT->FindObject("C3")))
1115 c3 = new TCanvas("C3","ITS SSD Cylinder Geometry",900,450);
1117 TGeoVolume *ITS,*SSD=0;
1119 // TArrow *arrow=new TArrow();
1121 node = ALIC->FindNode("ITSV_1");
1122 ITS = node->GetVolume();
1123 node = ITS->FindNode("SSDexternalcylinder_1");
1124 SSD = node->GetVolume();
1125 //Double_t Rmin = ((TGeoPcon*)(SSD->GetShape()))->GetRmin();
1126 //Double_t Rmax = ((TGeoPcon*)(SSD->GetShape()))->GetRmax();
1127 //Double_t Dz = ((TGeoPcon*)(SSD->GetShape()))->GetDz();
1129 mgr2->SetNsegments(ISetits(1,-1));
1131 mgr2->SetVisLevel(6);
1132 mgr2->SetVisOption(0);
1133 //mgr2->CheckOverlaps(0.01);
1134 //mgr2->PrintOverlaps();
1135 if(ISetits(2,-1)==1){
1136 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1137 mgr2->SetClippingShape(clip);
1139 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1140 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1144 TPad *p1 = (TPad*)c3->GetPad(1);
1145 TView *view1 = p1->GetView();
1147 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1148 if(irr) cout <<"error="<<irr<<endl;
1149 if(ISetits(4,-1)==0) view1->SetParallel();
1150 else view1->SetPerspective();
1152 if(ISetits(3,-1)!=0) view1->ShowAxis();
1154 if(ISetits(5,-1)==1) SSD->Raytrace();
1155 //arrow->DrawArrow(1.01*Rmax,-Dz,1.01*Rmax,+Dz);
1159 TPad *p2 = (TPad*)c3->GetPad(2);
1160 TView *view2 = p2->GetView();
1162 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1163 if(irr) cout <<"error="<<irr<<endl;
1164 if(ISetits(4,-1)==0) view2->SetParallel();
1165 else view2->SetPerspective();
1167 if(ISetits(3,-1)!=0) view2->ShowAxis();
1169 if(ISetits(5,-1)==1) SSD->Raytrace();
1170 //arrow->DrawArrow(Rmax,0.0,Rmax,0.0);
1171 //Double_t s = TMath::Sin(0.7),c = TMath::Cos(0.7);
1172 //arrow->DrawArrow(-Rmin*c,-Rmin*s,Rmin*c,Rmin*s);
1175 //----------------------------------------------------------------------
1176 void EngineeringSupRB24(){
1177 // Display RB 24 side cable tray support structure Geometry
1186 TGeoManager *mgr2 = gGeoManager;
1187 TGeoVolume *ALIC = mgr2->GetTopVolume();
1189 if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
1190 c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
1192 TGeoVolume *ITS,*SUPRB24=0;
1195 node = ALIC->FindNode("ITSV_1");
1196 ITS = node->GetVolume();
1197 node = ITS->FindNode("ITSsupFrameM24_1");
1198 SUPRB24 = node->GetVolume();
1200 mgr2->SetNsegments(ISetits(1,-1));
1202 mgr2->SetVisLevel(6);
1203 mgr2->SetVisOption(0);
1204 //mgr2->CheckOverlaps(0.01);
1205 //mgr2->PrintOverlaps();
1206 if(ISetits(2,-1)==1){
1207 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1208 mgr2->SetClippingShape(clip);
1210 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1211 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1215 TPad *p1 = (TPad*)c4->GetPad(1);
1216 TView *view1 = p1->GetView();
1218 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1219 if(irr) cout <<"error="<<irr<<endl;
1220 if(ISetits(4,-1)==0) view1->SetParallel();
1221 else view1->SetPerspective();
1223 if(ISetits(3,-1)!=0) view1->ShowAxis();
1225 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1229 TPad *p2 = (TPad*)c4->GetPad(2);
1230 TView *view2 = p2->GetView();
1232 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1233 if(irr) cout <<"error="<<irr<<endl;
1234 if(ISetits(4,-1)==0) view2->SetParallel();
1235 else view2->SetPerspective();
1237 if(ISetits(3,-1)!=0) view2->ShowAxis();
1239 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1242 //----------------------------------------------------------------------
1243 void EngineeringSupTrayRB24(){
1244 // Display RB 24 side cable tray support structure Geometry
1253 TGeoManager *mgr2 = gGeoManager;
1254 TGeoVolume *ALIC = mgr2->GetTopVolume();
1255 TCanvas *c4=0,*c5=0;
1256 //if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
1257 c4 = new TCanvas("C4","ITS RB24 Cable Trays and Patch Pannels",500,500);
1259 TGeoVolume *ITS,*SUPRB24=0;
1262 node = ALIC->FindNode("ITSV_1");
1263 ITS = node->GetVolume();
1264 node = ITS->FindNode("ITSsupCableTrayMotherMT24_1");
1265 SUPRB24 = node->GetVolume();
1267 mgr2->SetNsegments(ISetits(1,-1));
1269 mgr2->SetVisLevel(6);
1270 mgr2->SetVisOption(0);
1271 //mgr2->CheckOverlaps(0.01);
1272 //mgr2->PrintOverlaps();
1273 if(ISetits(2,-1)==1){
1274 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1275 mgr2->SetClippingShape(clip);
1277 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1278 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1282 //TPad *p1 = c4->GetPad(1);
1283 //TView *view1 = p1->GetView();
1284 TView *view1 = c4->GetView();
1286 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1287 if(irr) cout <<"error="<<irr<<endl;
1288 if(ISetits(4,-1)==0) view1->SetParallel();
1289 else view1->SetPerspective();
1291 if(ISetits(3,-1)!=0) view1->ShowAxis();
1293 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1296 c5 = new TCanvas("C5","ITS RB24 Cable Trays and Patch Pannels",500,500);
1299 //TPad *p2 = c5->GetPad(1);
1300 //TView *view2 = p2->GetView();
1301 TView *view2 = c5->GetView();
1303 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1304 if(irr) cout <<"error="<<irr<<endl;
1305 if(ISetits(4,-1)==0) view2->SetParallel();
1306 else view2->SetPerspective();
1308 if(ISetits(3,-1)!=0) view2->ShowAxis();
1310 if(ISetits(5,-1)==1) SUPRB24->Raytrace();
1313 //----------------------------------------------------------------------
1314 void EngineeringSupRB26(){
1315 // Display RB 26 side cable tray support structure
1324 TGeoManager *mgr2 = gGeoManager;
1325 TGeoVolume *ALIC = mgr2->GetTopVolume();
1327 if(!(c5 = (TCanvas*)gROOT->FindObject("C5")))
1328 c5 = new TCanvas("C5","ITS SDD Cylinder Geometry",900,450);
1330 TGeoVolume *ITS,*SUPRB26=0;
1333 node = ALIC->FindNode("ITSV_1");
1334 ITS = node->GetVolume();
1335 node = ITS->FindNode("ITSsupFrameM26_1");
1336 SUPRB26 = node->GetVolume();
1338 mgr2->SetNsegments(ISetits(1,-1));
1340 mgr2->SetVisLevel(6);
1341 mgr2->SetVisOption(0);
1342 //mgr2->CheckOverlaps(0.01);
1343 //mgr2->PrintOverlaps();
1344 if(ISetits(2,-1)==1){
1345 TGeoShape *clip = new TGeoTubeSeg(0, 1000, 2000, 45, 90);
1346 mgr2->SetClippingShape(clip);
1348 mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1349 if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
1353 TPad *p1 = (TPad*)c5->GetPad(1);
1354 TView *view1 = p1->GetView();
1356 view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1357 if(irr) cout <<"error="<<irr<<endl;
1358 if(ISetits(4,-1)==0) view1->SetParallel();
1359 else view1->SetPerspective();
1361 if(ISetits(3,-1)!=0) view1->ShowAxis();
1363 if(ISetits(5,-1)==1) SUPRB26->Raytrace();
1367 TPad *p2 = (TPad*)c5->GetPad(2);
1368 TView *view2 = p2->GetView();
1370 view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
1371 if(irr) cout <<"error="<<irr<<endl;
1372 if(ISetits(4,-1)==0) view2->SetParallel();
1373 else view2->SetPerspective();
1375 if(ISetits(3,-1)!=0) view2->ShowAxis();
1377 if(ISetits(5,-1)==1) SUPRB26->Raytrace();
1381 // Local functions to replace "regular" ones not available
1382 // in the environment where the macro runs
1384 //______________________________________________________________________
1385 void CreateMaterialsITS(){
1386 // Create ITS materials
1387 // This function defines the default materials used in the Geant
1388 // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
1390 // In general it is automatically replaced by
1391 // the CreateMaterials routine defined in AliITSv?. Should the function
1392 // CreateMaterials not exist for the geometry version you are using this
1393 // one is used. See the definition found in AliITSv5 or the other routine
1394 // for a complete definition.
1402 Bool_t fByThick=kTRUE; // Flag to use services materials by thickness
1403 // ture, or mass false.
1405 // Int_t ifield = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
1406 // Float_t fieldm = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
1408 Float_t fieldm = 10.;
1410 Float_t tmaxfd = 0.1; // 1.0; // Degree
1411 Float_t stemax = 1.0; // cm
1412 Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0<deemax<=1
1413 Float_t epsil = 1.0E-4; // 1.0; // cm
1414 Float_t stmin = 0.0; // cm "Default value used"
1416 Float_t tmaxfdSi = 0.1; // .10000E+01; // Degree
1417 Float_t stemaxSi = 0.0075; // .10000E+01; // cm
1418 Float_t deemaxSi = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
1419 Float_t epsilSi = 1.0E-4;// .10000E+01;
1420 Float_t stminSi = 0.0; // cm "Default value used"
1422 Float_t tmaxfdAir = 0.1; // .10000E+01; // Degree
1423 Float_t stemaxAir = .10000E+01; // cm
1424 Float_t deemaxAir = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
1425 Float_t epsilAir = 1.0E-4;// .10000E+01;
1426 Float_t stminAir = 0.0; // cm "Default value used"
1428 Float_t tmaxfdServ = 1.0; // 10.0; // Degree
1429 Float_t stemaxServ = 1.0; // 0.01; // cm
1430 Float_t deemaxServ = 0.5; // 0.1; // Fraction of particle's energy 0<deemax<=1
1431 Float_t epsilServ = 1.0E-3; // 0.003; // cm
1432 Float_t stminServ = 0.0; //0.003; // cm "Default value used"
1434 // Freon PerFluorobuthane C4F10 see
1435 // http://st-support-cooling-electronics.web.cern.ch/
1436 // st-support-cooling-electronics/default.htm
1437 Float_t afre[2] = { 12.011,18.9984032 };
1438 Float_t zfre[2] = { 6., 9. };
1439 Float_t wfre[2] = { 4.,10. };
1440 Float_t densfre = 1.52;
1445 Float_t aCM55J[4]={12.0107,14.0067,15.9994,1.00794};
1446 Float_t zCM55J[4]={6.,7.,8.,1.};
1447 Float_t wCM55J[4]={0.908508078,0.010387573,0.055957585,0.025146765};
1448 Float_t dCM55J = 1.8;
1452 Float_t aALCM55J[5]={12.0107,14.0067,15.9994,1.00794,26.981538};
1453 Float_t zALCM55J[5]={6.,7.,8.,1.,13.};
1454 Float_t wALCM55J[5]={0.817657902,0.0093488157,0.0503618265,0.0226320885,0.1};
1455 Float_t dALCM55J = 1.9866;
1459 Float_t aSICHIP[6]={12.0107,14.0067,15.9994,1.00794,28.0855,107.8682};
1460 Float_t zSICHIP[6]={6.,7.,8.,1.,14., 47.};
1461 Float_t wSICHIP[6]={0.039730642,0.001396798,0.01169634,0.004367771,0.844665,0.09814344903};
1462 Float_t dSICHIP = 2.36436;
1466 Float_t aINOX[9]={12.0107,54.9380, 28.0855,30.9738,32.066,58.6928,51.9961,95.94,55.845};
1467 Float_t zINOX[9]={6.,25.,14.,15.,16., 28.,24.,42.,26.};
1468 Float_t wINOX[9]={0.0003,0.02,0.01,0.00045,0.0003,0.12,0.17,0.025,0.654};
1469 Float_t dINOX = 8.03;
1473 Float_t aHVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
1474 Float_t zHVm[5]={6.,1.,7.,8.,13.};
1475 Float_t wHVm[5]={0.520088819984,0.01983871336,0.0551367996,0.157399667056, 0.247536};
1476 Float_t dHVm = 1.6087;
1478 //SDD LV+signal cable
1480 Float_t aLVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
1481 Float_t zLVm[5]={6.,1.,7.,8.,13.};
1482 Float_t wLVm[5]={0.21722436468,0.0082859922,0.023028867,0.06574077612, 0.68572};
1483 Float_t dLVm = 2.1035;
1485 //SDD hybrid microcab
1487 Float_t aHLVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
1488 Float_t zHLVm[5]={6.,1.,7.,8.,13.};
1489 Float_t wHLVm[5]={0.24281879711,0.00926228815,0.02574224025,0.07348667449, 0.64869};
1490 Float_t dHLVm = 2.0502;
1492 //SDD anode microcab
1494 Float_t aALVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
1495 Float_t zALVm[5]={6.,1.,7.,8.,13.};
1496 Float_t wALVm[5]={0.392653705471,0.0128595919215,0.041626868025,0.118832707289, 0.431909};
1497 Float_t dALVm = 2.0502;
1501 Float_t aX7R[7]={137.327,47.867,15.9994,58.6928,63.5460,118.710,207.2};
1502 Float_t zX7R[7]={56.,22.,8.,28.,29.,50.,82.};
1503 Float_t wX7R[7]={0.251639432,0.084755042,0.085975822,0.038244751,0.009471271,0.321736471,0.2081768};
1504 Float_t dX7R = 7.14567;
1508 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
1509 Float_t zAir[4]={6.,7.,8.,18.};
1510 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
1511 Float_t dAir = 1.20479E-3;
1515 Float_t aWater[2]={1.00794,15.9994};
1516 Float_t zWater[2]={1.,8.};
1517 Float_t wWater[2]={0.111894,0.888106};
1518 Float_t dWater = 1.0;
1521 // 94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3
1522 Float_t acer[5] = { 26.981539,15.9994,28.0855,54.93805,51.9961 };
1523 Float_t zcer[5] = { 13., 8., 14., 25., 24. };
1524 Float_t wcer[5] = {.4443408,.5213375,.0130872,.0178135,.003421};
1525 Float_t denscer = 3.6;
1529 Float_t zG10FR4[14] = {14.00, 20.00, 13.00, 12.00, 5.00, 22.00, 11.00, 19.00, 26.00, 9.00, 8.00, 6.00, 7.00, 1.00};
1530 Float_t aG10FR4[14] = {28.0855000,40.0780000,26.9815380,24.3050000,10.8110000,47.8670000,22.9897700,39.0983000,55.8450000,18.9984000,15.9994000,12.0107000,14.0067000,1.0079400};
1531 Float_t wG10FR4[14] = {0.15144894,0.08147477,0.04128158,0.00904554,0.01397570,0.00287685,0.00445114,0.00498089,0.00209828,0.00420000,0.36043788,0.27529426,0.01415852,0.03427566};
1532 Float_t densG10FR4= 1.8;
1534 //--- EPOXY --- C18 H19 O3
1535 Float_t aEpoxy[3] = {15.9994, 1.00794, 12.0107} ;
1536 Float_t zEpoxy[3] = { 8., 1., 6.} ;
1537 Float_t wEpoxy[3] = { 3., 19., 18.} ;
1538 Float_t dEpoxy = 1.8 ;
1540 // rohacell: C9 H13 N1 O2
1541 Float_t arohac[4] = {12.01, 1.01, 14.010, 16.};
1542 Float_t zrohac[4] = { 6., 1., 7., 8.};
1543 Float_t wrohac[4] = { 14., 10., 2., 6.};
1544 Float_t drohac = 0.052;
1546 // If he/she means stainless steel (inox) + Aluminium and Zeff=15.3383 then
1548 // %Al=81.6164 %inox=100-%Al
1550 Float_t aInAl[5] = {27., 55.847,51.9961,58.6934,28.0855 };
1551 Float_t zInAl[5] = {13., 26.,24.,28.,14. };
1552 Float_t wInAl[5] = {.816164, .131443,.0330906,.0183836,.000919182};
1553 Float_t dInAl = 3.075;
1557 Float_t aKapton[4]={1.00794,12.0107, 14.010,15.9994};
1558 Float_t zKapton[4]={1.,6.,7.,8.};
1559 Float_t wKapton[4]={0.026362,0.69113,0.07327,0.209235};
1560 Float_t dKapton = 1.42;
1562 // Kapton + Cu (for Pixel Bus)
1564 Float_t aKaptonCu[5]={1.00794, 12.0107, 14.010, 15.9994, 63.5460};
1565 Float_t zKaptonCu[5]={1., 6., 7., 8., 29.};
1566 Float_t wKaptonCuBus[5];
1568 // Kapton + Cu (for Pixel MCM)
1570 Float_t wKaptonCuMCM[5];
1572 // Kapton + Cu (mix of two above)
1574 Float_t wKaptonCuMix[5];
1577 Float_t aAlOxide[2] = { 26.981539,15.9994};
1578 Float_t zAlOxide[2] = { 13., 8.};
1579 Float_t wAlOxide[2] = {0.4707, 0.5293};
1580 Float_t dAlOxide = 3.97;
1582 // Silica for optical fibers: Si O2
1583 Float_t aoptfib[2] = { 28.0855, 15.9994};
1584 Float_t zoptfib[2] = { 14., 8. };
1585 Float_t woptfib[2] = { 1., 2. };
1586 Float_t doptfib = 2.55;
1588 // Tetrafluorethylene-Perfluorpropylene (FEP) - 08 Mar 10
1589 Float_t aFEP[2] = { 12.0107, 18.9984};
1590 Float_t zFEP[2] = { 6. , 9. };
1591 Float_t wFEP[2] = { 1. , 2. };
1592 Float_t dFEP = 2.15;
1594 // PVC (C2H3Cl)n - 08 Jul 10
1595 Float_t aPVC[3] = { 12.0107, 1.00794, 35.4527};
1596 Float_t zPVC[3] = { 6. , 1. , 35. };
1597 Float_t wPVC[3] = { 2. , 3. , 1. };
1600 //SSD NiSn capacitor ends
1601 Float_t aNiSn[2] = { 56.6934,118.710};
1602 Float_t zNiSn[2] = { 28., 50.};
1603 Float_t wNiSn[2] = {0.33, 0.67};
1604 Float_t dNiSn = wNiSn[0]*8.908 + wNiSn[1]*7.310;
1606 AliMaterial(1,"SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1607 AliMedium(1,"SI$",1,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1609 AliMaterial(2,"SPD SI CHIP$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1610 AliMedium(2,"SPD SI CHIP$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1612 AliMaterial(3,"SPD SI BUS$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1613 AliMedium(3,"SPD SI BUS$",3,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1615 AliMixture(4,"C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
1616 AliMedium(4,"C (M55J)$",4,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1618 AliMixture(5,"AIR$",aAir,zAir,dAir,4,wAir);
1619 AliMedium(5,"AIR$",5,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
1621 AliMixture(6,"GEN AIR$",aAir,zAir,dAir,4,wAir);
1622 AliMedium(6,"GEN AIR$",6,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
1624 AliMixture(7,"SDD SI CHIP$",aSICHIP,zSICHIP,dSICHIP,6,wSICHIP);
1625 AliMedium(7,"SDD SI CHIP$",7,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1627 AliMixture(9,"SDD C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
1628 AliMedium(9,"SDD C (M55J)$",9,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1630 AliMixture(10,"SDD AIR$",aAir,zAir,dAir,4,wAir);
1631 AliMedium(10,"SDD AIR$",10,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
1633 AliMaterial(11,"AL$",0.26982E+02,0.13000E+02,0.26989E+01,0.89000E+01,0.99900E+03);
1634 AliMedium(11,"AL$",11,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1636 AliMixture(12, "Water$",aWater,zWater,dWater,2,wWater);
1637 AliMedium(12,"WATER$",12,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1639 AliMixture(13,"Freon$",afre,zfre,densfre,-2,wfre);
1640 AliMedium(13,"Freon$",13,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1642 AliMaterial(14,"COPPER$",0.63546E+02,0.29000E+02,0.89600E+01,0.14300E+01,0.99900E+03);
1643 AliMedium(14,"COPPER$",14,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1644 AliMixture(15,"CERAMICS$",acer,zcer,denscer,5,wcer);
1645 AliMedium(15,"CERAMICS$",15,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1647 AliMixture(20,"SSD C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
1648 AliMedium(20,"SSD C (M55J)$",20,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1650 AliMixture(21,"SSD AIR$",aAir,zAir,dAir,4,wAir);
1651 AliMedium(21,"SSD AIR$",21,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
1653 AliMixture(25,"G10FR4$",aG10FR4,zG10FR4,densG10FR4,14,wG10FR4);
1654 AliMedium(25,"G10FR4$",25,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1656 AliMixture(26,"GEN C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
1657 AliMedium(26,"GEN C (M55J)$",26,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1659 AliMixture(27,"GEN Air$",aAir,zAir,dAir,4,wAir);
1660 AliMedium(27,"GEN Air$",27,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
1662 AliMixture(47,"PVC$",aPVC,zPVC,dPVC,-3,wPVC);
1663 AliMedium(47,"PVC$",47,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1665 Double_t cuFrac = 0.56;
1666 Double_t kFrac = 1.0 - cuFrac;
1667 Double_t cuDens = 8.96;
1668 Float_t dKaptonCuBus = cuFrac * cuDens + kFrac * dKapton;
1669 for (Int_t j=0; j<4; j++)
1670 wKaptonCuBus[j] = wKapton[j]*kFrac;
1671 wKaptonCuBus[4] = cuFrac;
1672 AliMixture(48, "SPD-BUS CU KAPTON", aKaptonCu, zKaptonCu, dKaptonCuBus, 5, wKaptonCuBus);
1673 AliMedium(48,"SPD-BUS CU KAPTON$",48,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1676 kFrac = 1.0 - cuFrac;
1677 Float_t dKaptonCuMCM = cuFrac * cuDens + kFrac * dKapton;
1678 for (Int_t j=0; j<4; j++)
1679 wKaptonCuMCM[j] = wKapton[j]*kFrac;
1680 wKaptonCuMCM[4] = cuFrac;
1681 AliMixture(49, "SPD-MCM CU KAPTON", aKaptonCu, zKaptonCu, dKaptonCuMCM, 5, wKaptonCuMCM);
1682 AliMedium(49,"SPD-MCM CU KAPTON$",49,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1684 cuFrac = (0.56 + 0.5) / 2.0;
1685 kFrac = 1.0 - cuFrac;
1686 Float_t dKaptonCuMix = cuFrac * cuDens + kFrac * dKapton;
1687 for (Int_t j=0; j<4; j++)
1688 wKaptonCuMix[j] = wKapton[j]*kFrac;
1689 wKaptonCuMix[4] = cuFrac;
1690 AliMixture(50, "SPD-MIX CU KAPTON", aKaptonCu, zKaptonCu, dKaptonCuMix, 5, wKaptonCuMix);
1691 AliMedium(50,"SPD-MIX CU KAPTON$",50,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1693 AliMaterial(51,"SPD SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1694 AliMedium(51,"SPD SI$",51,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1696 AliMaterial(52,"SPD SI CHIP$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1697 AliMedium(52,"SPD SI CHIP$",52,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1699 AliMaterial(53,"SPD SI BUS$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1700 AliMedium(53,"SPD SI BUS$",53,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1702 AliMixture(54,"SPD C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
1703 AliMedium(54,"SPD C (M55J)$",54,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1705 AliMixture(55,"SPD AIR$",aAir,zAir,dAir,4,wAir);
1706 AliMedium(55,"SPD AIR$",55,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
1708 AliMixture(56, "SPD KAPTON(POLYCH2)", aKapton, zKapton, dKapton, 4, wKapton);
1709 AliMedium(56,"SPD KAPTON(POLYCH2)$",56,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1711 // Gaseous Freon has same chemical composition but air density at 1.7 atm
1712 AliMixture(59,"GASEOUS FREON$",afre,zfre,1.7*dAir,-2,wfre);
1713 AliMedium(59,"GASEOUS FREON$",59,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1715 AliMixture(61,"EPOXY$",aEpoxy,zEpoxy,dEpoxy,-3,wEpoxy);
1716 AliMedium(61,"EPOXY$",61,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1718 AliMaterial(62,"SILICON$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1719 AliMedium(62,"SILICON$",62,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
1721 AliMixture(63, "KAPTONH(POLYCH2)", aKapton, zKapton, dKapton, 4, wKapton);
1722 AliMedium(63,"KAPTONH(POLYCH2)$",63,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1724 AliMaterial(64,"ALUMINUM$",0.26982E+02,0.13000E+02,0.26989E+01,0.89000E+01,0.99900E+03);
1725 AliMedium(64,"ALUMINUM$",64,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1727 AliMixture(65,"INOX$",aINOX,zINOX,dINOX,9,wINOX);
1728 AliMedium(65,"INOX$",65,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1730 AliMixture(66,"NiSn$",aNiSn,zNiSn,dNiSn,2,wNiSn);
1731 AliMedium(66,"NiSn$",66,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1733 AliMaterial(67,"Sn$", 118.710, 50., 7.310, 1.206, 999.);
1734 AliMedium(67,"Sn$",67,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1736 AliMixture(68,"ROHACELL$",arohac,zrohac,drohac,-4,wrohac);
1737 AliMedium(68,"ROHACELL$",68,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1739 AliMixture(69,"SDD C AL (M55J)$",aALCM55J,zALCM55J,dALCM55J,5,wALCM55J);
1740 AliMedium(69,"SDD C AL (M55J)$",69,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1742 AliMixture(70, "SDDKAPTON (POLYCH2)", aKapton, zKapton, dKapton, 4, wKapton);
1743 AliMedium(70,"SDDKAPTON (POLYCH2)$",70,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1745 AliMaterial(71,"ITS SANDW A$",0.12011E+02,0.60000E+01,0.2115E+00,0.17479E+03,0.99900E+03);
1746 AliMedium(71,"ITS SANDW A$",71,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1748 AliMaterial(72,"ITS SANDW B$",0.12011E+02,0.60000E+01,0.27000E+00,0.18956E+03,0.99900E+03);
1749 AliMedium(72,"ITS SANDW B$",72,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1751 AliMaterial(73,"ITS SANDW C$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
1752 AliMedium(73,"ITS SANDW C$",73,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1754 AliMaterial(74,"HEAT COND GLUE$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
1755 AliMedium(74,"HEAT COND GLUE$",74,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1757 AliMaterial(75,"ELASTO SIL$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1758 AliMedium(75,"ELASTO SIL$",75,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1760 // SPD bus (data from Petra Riedler)
1761 Float_t aSPDbus[5] = {1.00794,12.0107,14.01,15.9994,26.982 };
1762 Float_t zSPDbus[5] = {1.,6.,7.,8.,13.};
1763 Float_t wSPDbus[5] = {0.023523,0.318053,0.009776,0.078057,0.570591};
1764 Float_t dSPDbus = 2.128505;
1766 // AliMaterial(76,"SPDBUS(AL+KPT+EPOX)$",0.19509E+02,0.96502E+01,0.19060E+01,0.15413E+02,0.99900E+03);
1767 AliMixture(76,"SPDBUS(AL+KPT+EPOX)$",aSPDbus,zSPDbus,dSPDbus,5,wSPDbus);
1768 AliMedium(76,"SPDBUS(AL+KPT+EPOX)$",76,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1770 AliMixture(77,"SDD X7R capacitors$",aX7R,zX7R,dX7R,7,wX7R);
1771 AliMedium(77,"SDD X7R capacitors$",77,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1773 AliMixture(78,"SDD ruby sph. Al2O3$",aAlOxide,zAlOxide,dAlOxide,2,wAlOxide);
1774 AliMedium(78,"SDD ruby sph. Al2O3$",78,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1776 AliMaterial(79,"SDD SI insensitive$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
1777 AliMedium(79,"SDD SI insensitive$",79,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1779 AliMixture(80,"SDD HV microcable$",aHVm,zHVm,dHVm,5,wHVm);
1780 AliMedium(80,"SDD HV microcable$",80,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1782 AliMixture(81,"SDD LV+signal cable$",aLVm,zLVm,dLVm,5,wLVm);
1783 AliMedium(81,"SDD LV+signal cable$",81,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1785 AliMixture(82,"SDD hybrid microcab$",aHLVm, zHLVm,dHLVm,5,wHLVm);
1786 AliMedium(82,"SDD hybrid microcab$",82,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1788 AliMixture(83,"SDD anode microcab$",aALVm,zALVm,dALVm,5,wALVm);
1789 AliMedium(83,"SDD anode microcab$",83,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1790 Float_t aDSring[4]={12.0107, 1.00794, 14.0067, 15.9994};
1791 Float_t zDSring[4]={ 6., 1., 7., 8.};
1792 Float_t wDSring[4]={ 0.854323888, 0.026408778, 0.023050265, 0.096217069};
1793 Float_t dDSring = 0.2875;
1794 AliMixture(84,"SDD/SSD rings$",aDSring,zDSring,dDSring,4,wDSring);
1795 AliMedium(84,"SDD/SSD rings$",84,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1797 AliMixture(85,"inox/alum$",aInAl,zInAl,dInAl,5,wInAl);
1798 AliMedium(85,"inox/alum$",85,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1800 // special media to take into account services in the SDD and SSD
1801 // cones for the FMD
1804 <A HREF="http://www.Physics.ohio-state.edu/~nilsen/ITS/ITS_MatBudget_4B.xls">
1807 <font size=+2 color=blue>
1808 <p> The Exel spread sheet from which these density number come from.
1813 // AliMaterial(86,"AIRFMDSDD$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
1814 Float_t aA[13],zZ[13],wW[13],den;
1815 // From Pierluigi Barberis calculations of 2SPD+1SDD October 2 2002.
1816 zZ[0] = 1.0; aA[0] = 1.00794; // Hydrogen
1817 zZ[1] = 6.0; aA[1] = 12.011; // Carbon
1818 zZ[2] = 7.0; aA[2] = 14.00674; // Nitrogen
1819 zZ[3] = 8.0; aA[3] = 15.9994; // Oxigen
1820 zZ[4] = 14.0; aA[4] = 28.0855; // Silicon
1821 zZ[5] = 24.0; aA[5] = 51.9961; //Cromium
1822 zZ[6] = 25.0; aA[6] = 54.938049; // Manganese
1823 zZ[7] = 26.0; aA[7] = 55.845; // Iron
1824 zZ[8] = 28.0; aA[8] = 58.6934; // Nickle
1825 zZ[9] = 29.0; aA[9] = 63.546; // Copper
1826 zZ[10] = 13.0; aA[10] = 26.981539; // Alulminum
1827 zZ[11] = 47.0; aA[11] = 107.8682; // Silver
1828 zZ[12] = 27.0; aA[12] = 58.9332; // Cobolt
1842 if(fByThick){// New values seeITS_MatBudget_4B.xls
1843 den = 1.5253276; // g/cm^3 Cell O370
1845 den = 2.58423412; // g/cm^3 Cell L370
1846 } // end if fByThick
1847 //den = 6161.7/(3671.58978);//g/cm^3 Volume does not exclude holes
1848 AliMixture(86,"AIRFMDSDD$",aA,zZ,den,+11,wW);
1849 AliMedium(86,"AIRFMDSDD$",86,0,ifield,fieldm,tmaxfdAir,stemaxAir,
1850 deemaxAir,epsilAir,stminAir);
1852 //AliMaterial(87,"AIRFMDSSD$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03);
1853 // From Pierluigi Barberis calculations of SSD October 2 2002.
1867 if(fByThick){// New values seeITS_MatBudget_4B.xls
1868 den = 1.2464275; // g/cm^3 Cell O403
1870 den = 1.28134409; // g/cm^3 Cell L403
1871 } // end if fByThick
1872 //den = 7666.3/(9753.553259); // volume does not exclude holes
1873 AliMixture(87,"AIRFMDSSD$",aA,zZ,den,+12,wW);
1874 AliMedium(87,"AIRFMDSSD$",87,0,ifield,fieldm,tmaxfdAir,stemaxAir,
1875 deemaxAir,epsilAir,stminAir);
1877 //AliMaterial(88,"ITS SANDW CFMDSDD$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
1878 // From Pierluigi Barberis calculations of 1SDD+Carbon fiber October 2 2002
1892 if(fByThick){// New values seeITS_MatBudget_4B.xls
1893 den = 1.9353276; // g/cm^3 Cell N370
1895 den = 3.2788626; // g/cm^3 Cell F370
1896 } // end if fByThick
1897 //den = 7667.1/(3671.58978); // Volume does not excludeholes
1898 AliMixture(88,"ITS SANDW CFMDSDD$",aA,zZ,den,+11,wW);
1899 AliMedium(88,"ITS SANDW CFMDSDD$",88,0,ifield,fieldm,tmaxfd,stemax,
1900 deemax,epsil,stmin);
1902 //AliMaterial(89,"ITS SANDW CFMDSSD$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
1903 // From Pierluigi Barberis calculations of SSD+Carbon fiber October 2 2002.
1917 if(fByThick){// New values seeITS_MatBudget_4B.xls
1918 den = 1.6564275; // g/cm^3 Cell N304
1920 den = 1.7028296; // g/cm^3 Cell F304
1921 } // end if fByThick
1922 //den = 1166.5/(3671.58978); // Volume does not exclude holes
1923 AliMixture(89,"ITS SANDW CFMDSSD$",aA,zZ,den,+12,wW);
1924 AliMedium(89,"ITS SANDW CFMDSSD$",89,0,ifield,fieldm,tmaxfd,stemax,
1925 deemax,epsil,stmin);
1927 //AliMaterial(97,"SPD SERVICES$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
1928 // From Pierluigi Barberis calculations of 1SPD October 2 2002.
1942 if(fByThick){// New values seeITS_MatBudget_4B.xls
1943 den = 80.31136576; // g/cm^3 Cell H329
1945 den = 87.13062; // g/cm^3 Cell G329
1946 } // end if fByThick
1947 //den = 1251.3/(0.05*2.0*TMath::Pi()*(7.75*7.75 - 3.7*3.7)); // g/cm^3
1948 AliMixture(97,"SPD SERVICES$",aA,zZ,den,+10,wW);
1949 AliMedium(97,"SPD SERVICES$",97,0,ifield,fieldm,tmaxfd,stemax,
1950 deemax,epsil,stmin);
1955 AliMaterial(90,"SPD shield$", 12.011, 6., 1.93 , 22.36, 999);
1956 AliMedium(90,"SPD shield$",90,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1958 // SPD End Ladder (data from Petra Riedler)
1959 Float_t aSPDel[5] = {1.00794,12.0107,14.01,15.9994,63.54 };
1960 Float_t zSPDel[5] = {1.,6.,7.,8.,29.};
1961 Float_t wSPDel[5] = {0.004092,0.107274,0.011438,0.032476,0.844719};
1962 Float_t dSPDel = 3.903403;
1964 // AliMaterial(91, "SPD End ladder$", 47.0447, 21.7963, 3.6374, 4.4711, 999);
1965 AliMixture(91,"SPD End ladder$",aSPDel,zSPDel,dSPDel,5,wSPDel);
1966 AliMedium(91,"SPD End ladder$",91,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1968 AliMaterial(92, "SPD cone$",28.0855, 14., 2.33, 9.36, 999);
1969 AliMedium(92,"SPD cone$",92,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1970 /* Material with fractional Z not actually used
1971 AliMaterial(93, "SDD End ladder$", 69.9298, 29.8246, 0.3824, 36.5103, 999);
1972 AliMedium(93,"SDD End ladder$",93,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1974 AliMaterial(94, "SDD cone$",63.546, 29., 1.15, 1.265, 999);
1975 AliMedium(94,"SDD cone$",94,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1976 /* Material with fractional Z not actually used
1977 AliMaterial(95, "SSD End ladder$", 32.0988, 15.4021, 0.68, 35.3238, 999);
1978 AliMedium(95,"SSD End ladder$",95,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1980 AliMaterial(96, "SSD cone$",63.546, 29., 1.15, 1.265, 999);
1981 AliMedium(96,"SSD cone$",96,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ);
1983 AliMixture(98,"SDD OPTICFIB$",aoptfib,zoptfib,doptfib,-2,woptfib);
1984 AliMedium(98,"SDD OPTICFIB$",98,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1986 AliMixture(95,"SSD FEP$",aFEP,zFEP,dFEP,-2,wFEP);
1987 AliMedium(95,"SSD FEP$",95,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
1989 // Mean material for low-voltage cables on SPD trays Side A
1990 // (Copper + PolyEthylene (C2-H4)) (D.Elia for cable number and
1991 // cross-section area, M.Sitta for elemental computation) - 26 Feb 10
1992 wW[0] = 0.323024;//H
1993 wW[2] = 0.515464;//Cu
1994 wW[1] = 0.161512;//C
1995 wW[3] = 0.000000;//O
1996 wW[4] = 0.000000;//S
1997 wW[5] = 0.000000;//F
1998 wW[6] = 0.000000;//Sn
1999 wW[7] = 0.000000;//Pb
2000 wW[8] = 0.000000;//Cr
2001 wW[9] = 0.000000;//Si
2002 wW[10] = 0.000000;//Ni
2003 wW[11] = 0.000000;//Ca
2006 AliMixture(60,"SPD_LOWCABLES$",aA,zZ,den,+3,wW);
2007 AliMedium(60,"SPD_LOWCABLES$",60,0,ifield,fieldm,tmaxfd,stemax,
2008 deemax,epsil,stmin);
2010 // Mean material for high-voltage cables on SPD trays Side A & C
2011 // (Copper + HD PolyEthylene (C2-H2)) (D.Elia for cable number and
2012 // cross-section area, M.Sitta for elemental computation) - 10 Jun 10
2013 wW[0] = 0.083766;//H
2014 wW[2] = 0.417136;//Cu
2015 wW[1] = 0.499098;//C
2016 wW[3] = 0.000000;//O
2017 wW[4] = 0.000000;//S
2018 wW[5] = 0.000000;//F
2019 wW[6] = 0.000000;//Sn
2020 wW[7] = 0.000000;//Pb
2021 wW[8] = 0.000000;//Cr
2022 wW[9] = 0.000000;//Si
2023 wW[10] = 0.000000;//Ni
2024 wW[11] = 0.000000;//Ca
2027 AliMixture(58,"SPD_HICABLES$",aA,zZ,den,+3,wW);
2028 AliMedium(58,"SPD_HICABLES$",58,0,ifield,fieldm,tmaxfd,stemax,
2029 deemax,epsil,stmin);
2031 // PolyUrethane [C25-H42-N2-O6] - 07 Mar 10
2032 zZ[2] = 7.0; aA[2] = 14.0067; // Nitrogen - From Root TGeoElementTable
2034 wW[0] = 0.090724;//H
2035 wW[2] = 0.060035;//N
2036 wW[1] = 0.643513;//C
2037 wW[3] = 0.205728;//O
2038 wW[4] = 0.000000;//S
2039 wW[5] = 0.000000;//F
2040 wW[6] = 0.000000;//Sn
2041 wW[7] = 0.000000;//Pb
2042 wW[8] = 0.000000;//Cr
2043 wW[9] = 0.000000;//Si
2044 wW[10] = 0.000000;//Ni
2045 wW[11] = 0.000000;//Ca
2048 AliMixture(67,"POLYURETHANE$",aA,zZ,den,+4,wW);
2049 AliMedium(67,"POLYURETHANE$",67,0,ifield,fieldm,tmaxfd,stemax,
2050 deemax,epsil,stmin);
2052 // POM (Polyoxymethylene = (CH2O)n ) - 02 May 10
2053 zZ[2] = 8.0; aA[2] = 15.9994; // Oxigen
2055 wW[0] = 0.067137;//H
2056 wW[1] = 0.400016;//C
2057 wW[2] = 0.532847;//O
2058 wW[3] = 0.000000;//O
2059 wW[4] = 0.000000;//S
2060 wW[5] = 0.000000;//F
2061 wW[6] = 0.000000;//Sn
2062 wW[7] = 0.000000;//Pb
2063 wW[8] = 0.000000;//Cr
2064 wW[9] = 0.000000;//Si
2065 wW[10] = 0.000000;//Ni
2066 wW[11] = 0.000000;//Ca
2069 AliMixture(57,"POLYOXYMETHYLENE$",aA,zZ,den,+3,wW);
2070 AliMedium(57,"POLYOXYMETHYLENE$",57,0,ifield,fieldm,tmaxfd,stemax,
2071 deemax,epsil,stmin);
2074 // Anticorodal: Aliminum alloy for tray ring support on Side A
2076 AliMaterial(93,"ANTICORODAL$",0.26982E+02,0.13000E+02,den,0.89000E+01,0.99900E+03);
2077 AliMedium(93,"ANTICORODAL$",93,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
2081 //_____________________________________________________________________________
2082 void AliMaterial(Int_t imat, const char* name, Float_t a,
2083 Float_t z, Float_t dens, Float_t radl,
2086 TString uniquename = "ITS";
2087 uniquename.Append("_");
2088 uniquename.Append(name);
2090 gGeoManager->Material(uniquename.Data(), a, z, dens, imat, radl, absl);
2094 //_____________________________________________________________________________
2095 void AliMedium(Int_t numed, const char *name, Int_t nmat,
2096 Int_t isvol, Int_t ifield, Float_t fieldm,
2097 Float_t tmaxfd, Float_t stemax, Float_t deemax,
2098 Float_t epsil, Float_t stmin){
2100 TString uniquename = "ITS";
2101 uniquename.Append("_");
2102 uniquename.Append(name);
2104 gGeoManager->Medium(uniquename.Data(),numed,nmat, isvol, ifield, fieldm,
2105 tmaxfd, stemax,deemax, epsil, stmin);
2109 //_____________________________________________________________________________
2110 void AliMixture(Int_t kmat, const char* name, Float_t* a, Float_t* z,
2111 Double_t dens, Int_t nlmat, Float_t* wmat)
2114 // Defines mixture OR COMPOUND IMAT as composed by
2115 // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
2117 // If NLMAT > 0 then wmat contains the proportion by
2118 // weights of each basic material in the mixture.
2120 // If nlmat < 0 then WMAT contains the number of atoms
2121 // of a given kind into the molecule of the COMPOUND
2122 // In this case, WMAT in output is changed to relative
2126 TString uniquename = "ITS";
2127 uniquename.Append("_");
2128 uniquename.Append(name);
2131 Double_t* da = CreateDoubleArray(a, TMath::Abs(nlmat));
2132 Double_t* dz = CreateDoubleArray(z, TMath::Abs(nlmat));
2133 Double_t* dwmat = CreateDoubleArray(wmat, TMath::Abs(nlmat));
2135 Mixture(kmat, uniquename.Data(), da, dz, dens, nlmat, dwmat);
2136 for (Int_t i=0; i<nlmat; i++) {
2137 a[i] = da[i]; z[i] = dz[i]; wmat[i] = dwmat[i];
2145 //_____________________________________________________________________________
2146 void Mixture(Int_t& kmat, const char* name, Double_t* a, Double_t* z,
2147 Double_t dens, Int_t nlmat, Double_t* wmat)
2150 // Defines mixture OR COMPOUND IMAT as composed by
2151 // THE BASIC NLMAT materials defined by arrays A,Z and WMAT
2153 // If NLMAT > 0 then wmat contains the proportion by
2154 // weights of each basic material in the mixture.
2156 // If nlmat < 0 then WMAT contains the number of atoms
2157 // of a given kind into the molecule of the COMPOUND
2158 // In this case, WMAT in output is changed to relative
2166 for (i=0;i<nlmat;i++) {
2167 amol += a[i]*wmat[i];
2169 for (i=0;i<nlmat;i++) {
2170 wmat[i] *= a[i]/amol;
2173 gGeoManager->Mixture(name, a, z, dens, nlmat, wmat, kmat);
2176 //_____________________________________________________________________________
2177 Double_t* CreateDoubleArray(Float_t* array, Int_t size)
2179 // Converts Float_t* array to Double_t*,
2180 // !! The new array has to be deleted by user.
2183 Double_t* doubleArray;
2185 doubleArray = new Double_t[size];
2186 for (Int_t i=0; i<size; i++) doubleArray[i] = array[i];
2189 doubleArray = new Double_t[1];
2194 //______________________________________________________________________
2195 Bool_t Make2DCrossSections(TPolyLine &a0,TPolyLine &a1,
2196 TPolyLine &b0,TPolyLine &b1,TPolyMarker &p)
2199 // Fill the objects with the points representing
2200 // a0 the outer carbon fiber SPD sector shape Cross Section A
2201 // a1 the inner carbon fiber SPD sector shape Cross Section A
2202 // b0 the outer carbon fiber SPD sector shape Cross Section B
2203 // b1 the inner carbon fiber SPD sector shape Cross Section B
2206 // TPolyLine &a0 The outer carbon fiber SPD sector shape
2207 // TPolyLine &a1 The Inner carbon fiber SPD sector shape
2208 // TPolyLine &b0 The outer carbon fiber SPD sector shape
2209 // TPolyLine &b1 The Inner carbon fiber SPD sector shape
2210 // TPolyMarker &p The points where the ladders are to be placed
2212 // TPolyLine &a0 The shape filled with the points
2213 // TPolyLine &a1 The shape filled with the points
2214 // TPolyLine &b0 The shape filled with the points
2215 // TPolyLine &b1 The shape filled with the points
2216 // TPolyMarker &p The filled array of points
2222 TGeoVolume *a0V,*a1V,*b0V,*b1V;
2223 TGeoXtru *a0S,*a1S,*b0S,*b1S;
2224 TGeoManager *mgr = gGeoManager;
2226 a0V = mgr->GetVolume("ITSSPDCarbonFiberSupportSectorA0");
2227 a0S = dynamic_cast<TGeoXtru*>(a0V->GetShape());
2228 n0 = a0S->GetNvert();
2229 a0.SetPolyLine(n0+1);
2230 //for(i=0;i<fSPDsectorPoints0.GetSize();i++)
2231 // printf("%d %d %d\n",i,fSPDsectorPoints0[i],fSPDsectorPoints1[i]);
2235 //printf("%d %g %g\n",i,x,y);
2237 if(i==0) a0.SetPoint(n0,x,y);
2239 a1V = mgr->GetVolume("ITSSPDCarbonFiberSupportSectorAirA1");
2240 a1S = dynamic_cast<TGeoXtru*>(a1V->GetShape());
2241 n1 = a1S->GetNvert();
2242 a1.SetPolyLine(n1+1);
2247 if(i==0) a1.SetPoint(n1,x,y);
2250 b0V = mgr->GetVolume("ITSSPDCarbonFiberSupportSectorEndB0");
2251 b0S = dynamic_cast<TGeoXtru*>(b0V->GetShape());
2252 n0 = b0S->GetNvert();
2253 b0.SetPolyLine(n0+1);
2258 if(i==0) b0.SetPoint(n0,x,y);
2260 b1V = mgr->GetVolume("ITSSPDCarbonFiberSupportSectorEndAirB1");
2261 b1S = dynamic_cast<TGeoXtru*>(b1V->GetShape());
2262 n1 = b1S->GetNvert();
2263 b1.SetPolyLine(n1+1);
2268 if(i==0) b1.SetPoint(n1,x,y);
2271 Double_t x0,y0,x1,y1;
2272 p.SetPolyMarker(2*gspd->GetSPDsectorX0Size());
2273 for(i=0;i<gspd->GetSPDsectorX0Size();i++){
2274 gspd->GetSectorMountingPoints(i,x0,y0,x1,y1);
2275 p.SetPoint(2*i,x0,y0);
2276 p.SetPoint(2*i+1,x1,y1);