+ /*char lowerladdersupportname[30];
+ TGeoXtru* lowerladdersupportshape[fgklayernumber];
+ TGeoVolume* lowerladdersupport[fgklayernumber];
+ TGeoRotation* lowerladdersupportrot = new TGeoRotation();
+ lowerladdersupportrot->SetAngles(90.,180.,-90);
+ for(Int_t i=0; i<fgklayernumber; i++){
+ lowerladdersupportshape[i] = new TGeoXtru(2);
+ lowerladdersupportshape[i]->DefinePolygon(2*kssdlayladdernumber[i]+3+nedges,
+ xmothervertex[i],ymothervertex[i]);
+ lowerladdersupportshape[i]->DefineSection(0,0.);
+ lowerladdersupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
+ sprintf(lowerladdersupportname,"LowerLadderSupportNameLay%d",i+5);
+ lowerladdersupport[i] = new TGeoVolume(lowerladdersupportname,
+ lowerladdersupportshape[i],fSSDSupportRingAl);
+ lowerladdersupport[i]->SetLineColor(fColorAl);
+ (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],1);
+ (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],2,lowerladdersupportrot);
+ }*/
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ for(Int_t i=0; i<fgklayernumber; i++){
+ for(Int_t j=0; j<2*kssdlayladdernumber[i]+3+nedges; j++)
+ delete ringsupportvertex[i][j];
+ delete [] ringsupportvertex[i];
+ }
+ for(Int_t i=0; i<fgklayernumber; i++){
+ delete [] xmothervertex[i];
+ delete [] ymothervertex[i];
+ }
+ delete [] xmothervertex;
+ delete [] ymothervertex;
+ delete globalrot;
+ for(Int_t i=0; i<fgklayernumber; i++){
+ for(Int_t j=0; j<kssdlayladdernumber[i]; j++)
+ delete laddersupportrot[i][j];
+ delete [] laddersupportrot[i];
+ }
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume* AliITSv11GeometrySSD::GetEndCapCoverPlate(){
+ /////////////////////////////////////////////////////////////
+ // Method generating Endcap CoverPlate
+ /////////////////////////////////////////////////////////////
+ // Holes Definition
+ ///////////////////
+ Int_t nendcapcoverplateholedges = 30;
+ const Int_t kendcapcoverplatesmallholenumber[2] = {4,9};
+ Double_t holesection[2] = {-0.5*fgkEndCapCoverPlateThickness,
+ 0.5*fgkEndCapCoverPlateThickness};
+ TGeoShape* endcapcoverplatesmallholeshape = GetHoleShape(fgkEndCapCoverPlateSmallHoleRadius,
+ nendcapcoverplateholedges,holesection);
+ TGeoVolume* endcapcoverplatesmallhole = new TGeoVolume("EndCapCoverPlateSmallHole",
+ endcapcoverplatesmallholeshape,fSSDAlCoolBlockMedium);
+ endcapcoverplatesmallhole->SetLineColor(6);
+ TGeoShape* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius,
+ nendcapcoverplateholedges,holesection);
+ TGeoVolume* endcapcoverplatebighole = new TGeoVolume("EndCapCoverPlateBigHole",
+ endcapcoverplatebigholeshape,fSSDAlCoolBlockMedium);
+ endcapcoverplatebighole->SetLineColor(6);
+ //////////////////////////
+ // Screw Piece Definition
+ //////////////////////////
+ Double_t smallscrewangle = 360.0/nendcapcoverplateholedges;
+ TGeoTube* endcapsmallscrewpieceshape = new TGeoTube(0.0,fgkEndCapCoverPlateSmallHoleRadius*
+ CosD(0.5*smallscrewangle),
+ 0.5*fgkEndCapCoverPlateThickness);
+ TGeoVolume* endcapsmallscrewpiece = new TGeoVolume("EndCapCoverPlateSmallScrewPiece",
+ endcapsmallscrewpieceshape,
+ fSSDCoolingTubePhynox);
+ endcapsmallscrewpiece->SetLineColor(fColorPhynox);
+ ///////////////////
+ // Box Definition
+ ///////////////////
+ TGeoBBox* endcapcoverplateboxshape[4];
+ TGeoVolume* endcapcoverplatebox[4];
+ Double_t boxorigin[5][3];
+ boxorigin[0][0] = 0.;
+ boxorigin[0][1] = 0.5*fgkEndCapCoverPlateSmallHoleSeparation[2];
+ boxorigin[0][2] = 0.;
+
+ boxorigin[1][0] = 0.5*fgkEndCapCoverPlateSmallHoleSeparation[0];
+ boxorigin[1][1] = 4.*fgkEndCapCoverPlateSmallHoleSeparation[2];
+ boxorigin[1][2] = 0.;
+
+ boxorigin[2][0] = 1.5*fgkEndCapCoverPlateSmallHoleSeparation[0]
+ + fgkEndCapCoverPlateSmallHoleSeparation[1];
+ boxorigin[2][1] = boxorigin[1][1];
+ boxorigin[2][2] = 0.;
+
+ boxorigin[3][0] = fgkEndCapCoverPlateSmallHoleSeparation[0]
+ + 0.5*fgkEndCapCoverPlateSmallHoleSeparation[1];
+ boxorigin[3][1] = boxorigin[1][1];
+ boxorigin[3][2] = 0.;
+
+ endcapcoverplateboxshape[0] = new TGeoBBox(fgkEndCapCoverPlateSmallHoleRadius,
+ 0.5*(fgkEndCapCoverPlateSmallHoleSeparation[2]
+ - 2.*fgkEndCapCoverPlateSmallHoleRadius),
+ 0.5*fgkEndCapCoverPlateThickness,boxorigin[0]);
+
+ endcapcoverplateboxshape[1] = new TGeoBBox(0.5*(fgkEndCapCoverPlateSmallHoleSeparation[0]
+ -2.*fgkEndCapCoverPlateSmallHoleRadius),
+ 4.*fgkEndCapCoverPlateSmallHoleSeparation[2]
+ + fgkEndCapCoverPlateSmallHoleRadius,
+ 0.5*fgkEndCapCoverPlateThickness,boxorigin[1]);
+
+ endcapcoverplateboxshape[2] = new TGeoBBox(0.5*(fgkEndCapCoverPlateSmallHoleSeparation[0]
+ -2.*fgkEndCapCoverPlateSmallHoleRadius),
+ 4.*fgkEndCapCoverPlateSmallHoleSeparation[2]
+ + fgkEndCapCoverPlateSmallHoleRadius,
+ 0.5*fgkEndCapCoverPlateThickness,boxorigin[2]);
+
+ endcapcoverplateboxshape[3] = new TGeoBBox(0.5*(fgkEndCapCoverPlateSmallHoleSeparation[1]
+ -2.*fgkEndCapCoverPlateSmallHoleRadius),
+ 4.*fgkEndCapCoverPlateSmallHoleSeparation[2]
+ + fgkEndCapCoverPlateSmallHoleRadius,
+ 0.5*fgkEndCapCoverPlateThickness,boxorigin[3]);
+
+ endcapcoverplatebox[0] = new TGeoVolume("EndCapCoverPlateBox1",endcapcoverplateboxshape[0],
+ fSSDAlCoolBlockMedium);
+ endcapcoverplatebox[1] = new TGeoVolume("EndCapCoverPlateBox2",endcapcoverplateboxshape[1],
+ fSSDAlCoolBlockMedium);
+ endcapcoverplatebox[2] = new TGeoVolume("EndCapCoverPlateBox3",endcapcoverplateboxshape[2],
+ fSSDAlCoolBlockMedium);
+ endcapcoverplatebox[3] = new TGeoVolume("EndCapCoverPlateBox4",endcapcoverplateboxshape[3],
+ fSSDAlCoolBlockMedium);
+ endcapcoverplatebox[0]->SetLineColor(6);
+ endcapcoverplatebox[1]->SetLineColor(6);
+ endcapcoverplatebox[2]->SetLineColor(6);
+ endcapcoverplatebox[3]->SetLineColor(6);
+ Double_t endcapfillingboxorigin[3] = {fgkEndCapCoverPlateSmallHoleSeparation[0],0.,0.};
+ TGeoBBox* endcapfillingboxshape = new TGeoBBox(fgkEndCapCoverPlateSmallHoleRadius,
+ fgkEndCapCoverPlateSmallHoleRadius,
+ 0.5*fgkEndCapCoverPlateThickness,
+ endcapfillingboxorigin);
+ TGeoVolume* endcapfillingbox = new TGeoVolume("EndCapFillingBox",endcapfillingboxshape,
+ fSSDAlCoolBlockMedium);
+ endcapfillingbox->SetLineColor(6);
+ ////////////////////////////
+ // Contour shape Definition
+ ////////////////////////////
+ const Int_t kcontourvertexnumber = 10;
+ Double_t xcontourvertex[kcontourvertexnumber];
+ Double_t ycontourvertex[kcontourvertexnumber];
+ xcontourvertex[0] = -fgkEndCapCoverPlateLength[0];
+ xcontourvertex[1] = xcontourvertex[0];
+ xcontourvertex[2] = fgkEndCapCoverPlateLength[1]-xcontourvertex[0];
+ xcontourvertex[3] = xcontourvertex[2];
+ xcontourvertex[4] = -fgkEndCapCoverPlateSmallHoleRadius;
+ xcontourvertex[5] = xcontourvertex[4];
+ xcontourvertex[6] = fgkEndCapCoverPlateLength[1]+fgkEndCapCoverPlateSmallHoleRadius;
+ xcontourvertex[7] = xcontourvertex[6];
+ xcontourvertex[8] = xcontourvertex[4];
+ xcontourvertex[9] = xcontourvertex[8];
+ ycontourvertex[0] = -0.5*(fgkEndCapCoverPlateWidth[0]-fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber[1]-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]);
+ ycontourvertex[1] = (kendcapcoverplatesmallholenumber[1]-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]-ycontourvertex[0];
+ ycontourvertex[2] = ycontourvertex[1];
+ ycontourvertex[3] = ycontourvertex[0];
+ ycontourvertex[4] = ycontourvertex[3];
+ ycontourvertex[5] = -fgkEndCapCoverPlateSmallHoleRadius;
+ ycontourvertex[6] = ycontourvertex[5];
+ ycontourvertex[7] = (kendcapcoverplatesmallholenumber[1]-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]
+ + fgkEndCapCoverPlateSmallHoleRadius;
+ ycontourvertex[8] = ycontourvertex[7];
+ ycontourvertex[9] = ycontourvertex[0];
+
+ Double_t xboxin, dxboxin, yboxin, dyboxin;
+ Double_t xboxout, dxboxout, yboxout, dyboxout;
+ Double_t coordmin, coordmax;
+ coordmin = -fgkEndCapCoverPlateLength[0];
+ coordmax = fgkEndCapCoverPlateLength[1]-xcontourvertex[0];
+ xboxout = 0.5*(coordmin+coordmax);
+ dxboxout = 0.5*(coordmax-coordmin);
+ coordmin = -0.5*(fgkEndCapCoverPlateWidth[0]-fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber[1]-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]);
+ coordmax = (kendcapcoverplatesmallholenumber[1]-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]-ycontourvertex[0];
+ yboxout = 0.5*(coordmin+coordmax);
+ dyboxout = 0.5*(coordmax-coordmin);
+ coordmin = -fgkEndCapCoverPlateSmallHoleRadius;
+ coordmax = fgkEndCapCoverPlateLength[1]+fgkEndCapCoverPlateSmallHoleRadius;
+ xboxin = 0.5*(coordmin+coordmax);
+ dxboxin = 0.5*(coordmax-coordmin);
+ coordmin = -fgkEndCapCoverPlateSmallHoleRadius;
+ coordmax = (kendcapcoverplatesmallholenumber[1]-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]
+ + fgkEndCapCoverPlateSmallHoleRadius;
+ yboxin = 0.5*(coordmin+coordmax);
+ dyboxin = 0.5*(coordmax-coordmin);
+ new TGeoBBox("EndCapCoverPlateContourBoxOut", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
+ TGeoTranslation *trendCapCoverPlateContourboxout = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut",
+ xboxout, yboxout, 0.);
+ trendCapCoverPlateContourboxout->RegisterYourself();
+ new TGeoBBox("EndCapCoverPlateContourBoxIn", dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
+ TGeoTranslation *trendCapCoverPlateContourboxin = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn",
+ xboxin, yboxin, 0.);
+ trendCapCoverPlateContourboxin->RegisterYourself();
+ TGeoCompositeShape *contourshape = new TGeoCompositeShape("contourShape",
+ "EndCapCoverPlateContourBoxOut:SSD_trEndCapCoverPlateContourBoxOut-EndCapCoverPlateContourBoxIn:SSD_trEndCapCoverPlateContourBoxIn");
+
+ TGeoVolume* contour = new TGeoVolume("EndCapCoverPlateContour",contourshape,
+ fSSDAlCoolBlockMedium);
+ contour->SetLineColor(6);
+ /////////////////////////////
+ // Hole Contour Shape Definition
+ ////////////////////////////
+ coordmin = xcontourvertex[0];
+ coordmax = coordmin+fgkEndCapCoverPlateLength[2];
+ xboxout = 0.5*(coordmin+coordmax);
+ dxboxout = 0.5*(coordmax-coordmin);
+ coordmin = ycontourvertex[1];
+ coordmax = ycontourvertex[1]+fgkEndCapCoverPlateWidth[2];
+ yboxout = 0.5*(coordmin+coordmax);
+ dyboxout = 0.5*(coordmax-coordmin);
+ coordmin = xcontourvertex[0]+ 0.5*(fgkEndCapCoverPlateLength[2]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ coordmax = coordmin + 2.*fgkEndCapCoverPlateBigHoleRadius;
+ xboxin = 0.5*(coordmin+coordmax);
+ dxboxin = 0.5*(coordmax-coordmin);
+ coordmin = ycontourvertex[1]+0.5*(fgkEndCapCoverPlateWidth[2]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);;
+ coordmax = coordmin +2.*fgkEndCapCoverPlateBigHoleRadius;
+ yboxin = 0.5*(coordmin+coordmax);
+ dyboxin = 0.5*(coordmax-coordmin);
+ new TGeoBBox("EndCapCoverPlateContourBoxOut1", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
+ TGeoTranslation *trendCapCoverPlateContourboxout1 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut1",
+ xboxout, yboxout, 0.);
+ trendCapCoverPlateContourboxout1->RegisterYourself();
+ new TGeoBBox("EndCapCoverPlateContourBoxIn1", dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
+ TGeoTranslation *trendCapCoverPlateContourboxin1 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn1",
+ xboxin, yboxin, 0.);
+ trendCapCoverPlateContourboxin1->RegisterYourself();
+ TGeoCompositeShape *contourshape1 = new TGeoCompositeShape("contourShape1",
+ "EndCapCoverPlateContourBoxOut1:SSD_trEndCapCoverPlateContourBoxOut1-EndCapCoverPlateContourBoxIn1:SSD_trEndCapCoverPlateContourBoxIn1");
+
+
+ coordmin = xcontourvertex[0]+fgkEndCapCoverPlateLength[5];
+ coordmax = coordmin+fgkEndCapCoverPlateLength[2];
+ xboxout = 0.5*(coordmin+coordmax);
+ dxboxout = 0.5*(coordmax-coordmin);
+ coordmin = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]);
+ coordmax = ycontourvertex[0];
+ yboxout = 0.5*(coordmin+coordmax);
+ dyboxout = 0.5*(coordmax-coordmin);
+ coordmin = xcontourvertex[0]+fgkEndCapCoverPlateLength[5]+ 0.5*(fgkEndCapCoverPlateLength[2]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ coordmax = coordmin + 2.*fgkEndCapCoverPlateBigHoleRadius;
+ xboxin = 0.5*(coordmin+coordmax);
+ dxboxin = 0.5*(coordmax-coordmin);
+ coordmin = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0])+0.5*(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ coordmax = coordmin+2.*fgkEndCapCoverPlateBigHoleRadius;
+ yboxin = 0.5*(coordmin+coordmax);
+ dyboxin = 0.5*(coordmax-coordmin);
+ new TGeoBBox("EndCapCoverPlateContourBoxOut2", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
+ TGeoTranslation *trendCapCoverPlateContourboxout2 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut2",
+ xboxout, yboxout, 0.);
+ trendCapCoverPlateContourboxout2->RegisterYourself();
+ new TGeoBBox("EndCapCoverPlateContourBoxIn2", dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
+ TGeoTranslation *trendCapCoverPlateContourboxin2 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn2",
+ xboxin, yboxin, 0.);
+ trendCapCoverPlateContourboxin2->RegisterYourself();
+ TGeoCompositeShape *contourshape2 = new TGeoCompositeShape("contourShape2",
+ "EndCapCoverPlateContourBoxOut2:SSD_trEndCapCoverPlateContourBoxOut2-EndCapCoverPlateContourBoxIn2:SSD_trEndCapCoverPlateContourBoxIn2");
+
+// const Int_t kholecontourvertexnumber = 10;
+
+ Double_t xholecontourvertex[2][kcontourvertexnumber];
+ Double_t yholecontourvertex[2][kcontourvertexnumber];
+ xholecontourvertex[0][0] = xcontourvertex[0];
+ xholecontourvertex[0][1] = xholecontourvertex[0][0];
+ xholecontourvertex[0][2] = xholecontourvertex[0][1]+fgkEndCapCoverPlateLength[2];
+ xholecontourvertex[0][3] = xholecontourvertex[0][2];
+ xholecontourvertex[0][4] = xholecontourvertex[0][0]
+ + 0.5*(fgkEndCapCoverPlateLength[2]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ xholecontourvertex[0][5] = xholecontourvertex[0][4];
+ xholecontourvertex[0][6] = xholecontourvertex[0][5]
+ + 2.*fgkEndCapCoverPlateBigHoleRadius;
+ xholecontourvertex[0][7] = xholecontourvertex[0][6];
+ xholecontourvertex[0][8] = xholecontourvertex[0][4];
+ xholecontourvertex[0][9] = xholecontourvertex[0][8];
+
+ yholecontourvertex[0][0] = ycontourvertex[1];
+ yholecontourvertex[0][1] = yholecontourvertex[0][0]+fgkEndCapCoverPlateWidth[2];
+ yholecontourvertex[0][2] = yholecontourvertex[0][1];
+ yholecontourvertex[0][3] = yholecontourvertex[0][0];
+ yholecontourvertex[0][4] = yholecontourvertex[0][3];
+ yholecontourvertex[0][5] = yholecontourvertex[0][4]+0.5*(fgkEndCapCoverPlateWidth[2]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ yholecontourvertex[0][6] = yholecontourvertex[0][5];
+ yholecontourvertex[0][7] = yholecontourvertex[0][6]+2.*fgkEndCapCoverPlateBigHoleRadius;
+ yholecontourvertex[0][8] = yholecontourvertex[0][7];
+ yholecontourvertex[0][9] = yholecontourvertex[0][0];
+
+ xholecontourvertex[1][0] = xcontourvertex[0]+fgkEndCapCoverPlateLength[5];
+ xholecontourvertex[1][1] = xholecontourvertex[1][0];
+ xholecontourvertex[1][2] = xholecontourvertex[1][1]+fgkEndCapCoverPlateLength[2];
+ xholecontourvertex[1][3] = xholecontourvertex[1][2];
+ xholecontourvertex[1][4] = xholecontourvertex[1][0]
+ + 0.5*(fgkEndCapCoverPlateLength[2]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ xholecontourvertex[1][5] = xholecontourvertex[1][4];
+ xholecontourvertex[1][6] = xholecontourvertex[1][5]
+ + 2.*fgkEndCapCoverPlateBigHoleRadius;
+ xholecontourvertex[1][7] = xholecontourvertex[1][6];
+ xholecontourvertex[1][8] = xholecontourvertex[1][4];
+ xholecontourvertex[1][9] = xholecontourvertex[1][8];
+
+ yholecontourvertex[1][0] = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]);
+ yholecontourvertex[1][1] = ycontourvertex[0];
+ yholecontourvertex[1][2] = yholecontourvertex[1][1];
+ yholecontourvertex[1][3] = yholecontourvertex[1][0];
+ yholecontourvertex[1][4] = yholecontourvertex[1][3];
+ yholecontourvertex[1][5] = yholecontourvertex[1][4]+0.5*(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]
+ - 2.*fgkEndCapCoverPlateBigHoleRadius);
+ yholecontourvertex[1][6] = yholecontourvertex[1][5];
+ yholecontourvertex[1][7] = yholecontourvertex[1][6]+2.*fgkEndCapCoverPlateBigHoleRadius;
+ yholecontourvertex[1][8] = yholecontourvertex[1][7];
+ yholecontourvertex[1][9] = yholecontourvertex[1][0];
+
+ TGeoVolume* holecontour[2];
+ holecontour[0] = new TGeoVolume("EndCapCoverPlateContour1",contourshape1,
+ fSSDAlCoolBlockMedium);
+ holecontour[0]->SetLineColor(6);
+ holecontour[1] = new TGeoVolume("EndCapCoverPlateContour2",contourshape2,
+ fSSDAlCoolBlockMedium);
+ holecontour[1]->SetLineColor(6);
+ TGeoTranslation* holecontourtrans = new TGeoTranslation(fgkEndCapCoverPlateLength[3]
+ + fgkEndCapCoverPlateLength[2],0.,0.);
+ TGeoTranslation* bigholetrans[3];
+ bigholetrans[0] = new TGeoTranslation(xholecontourvertex[0][4]+fgkEndCapCoverPlateBigHoleRadius,
+ yholecontourvertex[0][7]-fgkEndCapCoverPlateBigHoleRadius,0.0);
+ bigholetrans[1] = new TGeoTranslation(xholecontourvertex[0][4]+fgkEndCapCoverPlateBigHoleRadius
+ + fgkEndCapCoverPlateLength[4],yholecontourvertex[0][7]
+ - fgkEndCapCoverPlateBigHoleRadius,0.0);
+ bigholetrans[2] = new TGeoTranslation(xholecontourvertex[1][4]+fgkEndCapCoverPlateBigHoleRadius,
+ yholecontourvertex[1][5]+fgkEndCapCoverPlateBigHoleRadius,0.0);
+ /////////////////////////////////
+ // Mother Volume Xtru Definition
+ /////////////////////////////////
+ const Int_t kmothervertexnumber = 12;
+ Double_t xmothervertex[kmothervertexnumber];
+ Double_t ymothervertex[kmothervertexnumber];
+ xmothervertex[0] = xcontourvertex[0];
+ xmothervertex[1] = xmothervertex[0];
+ xmothervertex[2] = xmothervertex[1]+fgkEndCapCoverPlateLength[2];
+ xmothervertex[3] = xmothervertex[2];
+ xmothervertex[4] = xmothervertex[3]+fgkEndCapCoverPlateLength[3];
+ xmothervertex[5] = xmothervertex[4];
+ xmothervertex[6] = xmothervertex[5]+fgkEndCapCoverPlateLength[2];
+ xmothervertex[7] = xmothervertex[6];
+ xmothervertex[8] = xmothervertex[0]+fgkEndCapCoverPlateLength[5]
+ + fgkEndCapCoverPlateLength[2];
+ xmothervertex[9] = xmothervertex[8];
+ xmothervertex[10] = xmothervertex[9]-fgkEndCapCoverPlateLength[2];
+ xmothervertex[11] = xmothervertex[10];
+
+ ymothervertex[0] = ycontourvertex[0];
+ ymothervertex[1] = ymothervertex[0]+fgkEndCapCoverPlateWidth[0];
+ ymothervertex[2] = ymothervertex[1];
+ ymothervertex[3] = ycontourvertex[1];
+ ymothervertex[4] = ymothervertex[3];
+ ymothervertex[5] = ymothervertex[1];
+ ymothervertex[6] = ymothervertex[5];
+ ymothervertex[7] = ymothervertex[0];
+ ymothervertex[8] = ymothervertex[7];
+ ymothervertex[9] = ymothervertex[8]
+ - (fgkEndCapCoverPlateWidth[1]-fgkEndCapCoverPlateWidth[0]);
+ ymothervertex[10] = ymothervertex[9];
+ ymothervertex[11] = ymothervertex[8];
+ TGeoXtru* mothercoverplateshape = new TGeoXtru(2);
+ mothercoverplateshape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
+ mothercoverplateshape->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness);
+ mothercoverplateshape->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness);
+ TGeoVolume* mothercoverplate = new TGeoVolume("EndCapCoverPlateMother",mothercoverplateshape,fSSDAir);
+ ////////////////////////////////////////
+ // Adding Nodes
+ ////////////////////////////////////////
+// TGeoTranslation** endcapcoverplatesmallholetrans[kendcapcoverplatesmallholenumber[0]];
+ TGeoTranslation*** endcapcoverplatesmallholetrans;
+ endcapcoverplatesmallholetrans = new TGeoTranslation**[kendcapcoverplatesmallholenumber[0]];
+ Double_t transx[4] = {0,
+ fgkEndCapCoverPlateSmallHoleSeparation[0],
+ fgkEndCapCoverPlateSmallHoleSeparation[0]
+ + fgkEndCapCoverPlateSmallHoleSeparation[1],
+ 2.*fgkEndCapCoverPlateSmallHoleSeparation[0]
+ + fgkEndCapCoverPlateSmallHoleSeparation[1]};
+ Int_t index = 0;
+ for(Int_t i=0; i<kendcapcoverplatesmallholenumber[0]; i++){
+ endcapcoverplatesmallholetrans[i] =
+ new TGeoTranslation*[kendcapcoverplatesmallholenumber[1]];
+ for(Int_t j=0; j<kendcapcoverplatesmallholenumber[1]; j++){
+ index = kendcapcoverplatesmallholenumber[1]*i+j+1;
+ endcapcoverplatesmallholetrans[i][j] =
+ new TGeoTranslation(transx[i],
+ j*fgkEndCapCoverPlateSmallHoleSeparation[2],0.);
+ if(index!=10){
+ mothercoverplate->AddNode(endcapcoverplatesmallhole,
+ index,endcapcoverplatesmallholetrans[i][j]);
+ mothercoverplate->AddNode(endcapsmallscrewpiece,
+ index,endcapcoverplatesmallholetrans[i][j]);
+ }
+ if(j<kendcapcoverplatesmallholenumber[1]-1)
+ mothercoverplate->AddNode(endcapcoverplatebox[0],
+ index,endcapcoverplatesmallholetrans[i][j]);
+ }
+ }
+ mothercoverplate->AddNode(endcapcoverplatebox[1],1);
+ mothercoverplate->AddNode(endcapcoverplatebox[2],1);
+ mothercoverplate->AddNode(endcapcoverplatebox[3],1);
+ mothercoverplate->AddNode(endcapfillingbox,1);
+ mothercoverplate->AddNode(endcapcoverplatebighole,1,bigholetrans[0]);
+ mothercoverplate->AddNode(endcapcoverplatebighole,2,bigholetrans[1]);
+ mothercoverplate->AddNode(endcapcoverplatebighole,3,bigholetrans[2]);
+ mothercoverplate->AddNode(holecontour[0],1);
+ mothercoverplate->AddNode(holecontour[0],2,holecontourtrans);
+ mothercoverplate->AddNode(holecontour[1],1);
+ mothercoverplate->AddNode(contour,1);
+
+ for (Int_t i = 0; i < kendcapcoverplatesmallholenumber[0]; i++)
+ delete [] endcapcoverplatesmallholetrans[i];
+ delete [] endcapcoverplatesmallholetrans;
+ /////////////////////////////////
+ return mothercoverplate;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume* AliITSv11GeometrySSD::GetEndCapCoolingTube(){
+ /////////////////////////////////////////////////////////////
+ // Getting EndCap Cooling Tube
+ /////////////////////////////////////////////////////////////
+ TGeoTorus* endcapcoolingtubetorushape[5];
+ TGeoVolume* endcapcoolingtubetorus[5];
+ TGeoTube* endcapcoolingtubeshape[4];
+ TGeoVolume* endcapcoolingtube[4];
+ char endcapcoolingtubetorusname[100];
+ char endcapcoolingtubename[100];
+ TGeoTorus* endcapcoolingwatertubetorushape[5];
+ TGeoVolume* endcapcoolingwatertubetorus[5];
+ TGeoTube* endcapcoolingwatertubeshape[4];
+ TGeoVolume* endcapcoolingwatertube[4];
+ char endcapcoolingwatertubetorusname[100];
+ char endcapcoolingwatertubename[100];
+ for(Int_t i=0; i<5; i++){
+ snprintf(endcapcoolingtubetorusname,100,"EndCapCoolingTubeTorus%d",i+1);
+ snprintf(endcapcoolingtubename,100,"EndCapCoolingTube%d",i+1);
+ snprintf(endcapcoolingwatertubetorusname,100,"EndCapCoolingWaterTubeTorus%d",i+1);
+ snprintf(endcapcoolingwatertubename,100,"EndCapCoolingWaterTube%d",i+1);
+ if(i==3){
+ endcapcoolingtubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
+ fgkEndCapCoolingTubeRadiusMin,
+ fgkEndCapCoolingTubeRadiusMax,
+ 90.0,fgkEndCapCoolingTubeAngle[3]);
+ endcapcoolingwatertubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
+ 0.,fgkEndCapCoolingTubeRadiusMin,
+ 90.0,fgkEndCapCoolingTubeAngle[3]);
+ }
+ else{
+ endcapcoolingtubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
+ :fgkEndCapCoolingTubeAxialRadius[1],
+ fgkEndCapCoolingTubeRadiusMin,
+ fgkEndCapCoolingTubeRadiusMax,
+ 0.,fgkEndCapCoolingTubeAngle[i]);
+ endcapcoolingwatertubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
+ :fgkEndCapCoolingTubeAxialRadius[1],
+ 0.,fgkEndCapCoolingTubeRadiusMin,
+ 0.,fgkEndCapCoolingTubeAngle[i]);
+ }
+ endcapcoolingtubetorus[i] = new TGeoVolume(endcapcoolingtubetorusname,
+ endcapcoolingtubetorushape[i],
+ fSSDCoolingTubePhynox);
+ endcapcoolingwatertubetorus[i] = new TGeoVolume(endcapcoolingwatertubetorusname,
+ endcapcoolingwatertubetorushape[i],
+ fSSDCoolingTubeWater);
+ endcapcoolingtubetorus[i]->SetLineColor(fColorPhynox);
+ endcapcoolingwatertubetorus[i]->SetLineColor(fColorWater);
+ if(i<4){
+ endcapcoolingtubeshape[i] = new TGeoTube(fgkEndCapCoolingTubeRadiusMin,
+ fgkEndCapCoolingTubeRadiusMax,
+ 0.5*fgkEndCapCoolingTubeLength[i]);
+ endcapcoolingwatertubeshape[i] = new TGeoTube(0.,fgkEndCapCoolingTubeRadiusMin,
+ 0.5*fgkEndCapCoolingTubeLength[i]);
+ endcapcoolingtube[i] = new TGeoVolume(endcapcoolingtubename,
+ endcapcoolingtubeshape[i],fSSDCoolingTubePhynox);
+ endcapcoolingwatertube[i] = new TGeoVolume(endcapcoolingwatertubename,
+ endcapcoolingwatertubeshape[i],fSSDCoolingTubeWater);
+ endcapcoolingtube[i]->SetLineColor(fColorPhynox);
+ endcapcoolingwatertube[i]->SetLineColor(fColorWater);
+ }
+ }
+ TGeoVolumeAssembly* endcapcoolingtubemother = new TGeoVolumeAssembly("MotherEndCapCoolingTube");
+ /////////////////////////////////////////
+ // Transformation for Volume Positioning
+ /////////////////////////////////////////
+ TGeoCombiTrans* coolingtubecombitrans[6];
+ TGeoRotation* coolingtuberot[8];
+ TGeoTranslation* coolingtubetrans[6];
+ TGeoHMatrix* coolingtubematrix[4];
+ TGeoCombiTrans* torustubecombitrans[4];
+ TGeoRotation* torustuberot[7];
+ TGeoTranslation* torustubetrans[4];
+ TGeoHMatrix* torustubematrix[5];
+ TGeoCombiTrans* coolingwatertubecombitrans[6];
+ TGeoRotation* coolingwatertuberot[8];
+ TGeoTranslation* coolingwatertubetrans[6];
+ TGeoHMatrix* coolingwatertubematrix[4];
+ TGeoCombiTrans* toruswatertubecombitrans[4];
+ TGeoRotation* toruswatertuberot[7];
+ TGeoTranslation* toruswatertubetrans[4];
+ TGeoHMatrix* toruswatertubematrix[5];
+ for(Int_t i=0; i<8; i++){
+ if(i<6){
+ coolingtubetrans[i] = new TGeoTranslation();
+ coolingwatertubetrans[i] = new TGeoTranslation();
+ }
+ if(i<8){
+ coolingtuberot[i] = new TGeoRotation();
+ coolingwatertuberot[i] = new TGeoRotation();
+ }
+ if(i<4){
+ torustubetrans[i] = new TGeoTranslation();
+ toruswatertubetrans[i] = new TGeoTranslation();
+ }
+ if(i<7){
+ torustuberot[i] = new TGeoRotation();
+ toruswatertuberot[i] = new TGeoRotation();
+ }
+ }
+ /////////////////////////////////////////
+ // Transformation for Inox Volume Positioning
+ /////////////////////////////////////////
+ coolingtubetrans[0]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0],
+ -endcapcoolingtubeshape[0]->GetDz(),0.);
+ coolingtuberot[0]->SetAngles(0.,90.,0.);
+ coolingtubecombitrans[0] = new TGeoCombiTrans(*coolingtubetrans[0],
+ *coolingtuberot[0]);
+
+ coolingtubetrans[1]->SetTranslation(0.,-endcapcoolingtubeshape[1]->GetDz(),0.);
+ coolingtuberot[1]->SetAngles(0.,90.,0.);
+ coolingtubecombitrans[1] = new TGeoCombiTrans(*coolingtubetrans[1],
+ *coolingtuberot[1]);
+
+ coolingtubetrans[2]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0]
+ *CosD(fgkEndCapCoolingTubeAngle[0]),
+ fgkEndCapCoolingTubeAxialRadius[0]
+ *SinD(fgkEndCapCoolingTubeAngle[0]),
+ 0.);
+ coolingtuberot[2]->SetAngles(fgkEndCapCoolingTubeAngle[0]-180.,0.,0.);
+ coolingtubecombitrans[2] = new TGeoCombiTrans(*coolingtubetrans[2],
+ *coolingtuberot[2]);
+
+ coolingtubematrix[0] = new TGeoHMatrix((*coolingtubecombitrans[2])
+ * (*coolingtubecombitrans[1]));
+
+ torustubetrans[0]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
+ endcapcoolingtubeshape[1]->GetDz());
+ torustuberot[0]->SetAngles(0.,90.,0.);
+ torustubecombitrans[0] = new TGeoCombiTrans(*torustubetrans[0],*torustuberot[0]);
+
+ torustubematrix[0] = new TGeoHMatrix((*coolingtubematrix[0])*(*torustubecombitrans[0]));
+
+ coolingtubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],
+ -endcapcoolingtubeshape[2]->GetDz(),0.);
+ coolingtuberot[3]->SetAngles(0.,90.,0.);
+ coolingtubecombitrans[3] = new TGeoCombiTrans(*coolingtubetrans[3],
+ *coolingtuberot[3]);
+ coolingtuberot[4]->SetAngles(-180.+fgkEndCapCoolingTubeAngle[1],0.,0.);
+ coolingtubematrix[1] = new TGeoHMatrix((*coolingtuberot[4])*(*coolingtubecombitrans[3]));
+ coolingtubematrix[1]->MultiplyLeft(torustubematrix[0]);
+
+ torustubetrans[1]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
+ endcapcoolingtubeshape[2]->GetDz());
+ torustuberot[1]->SetAngles(0.,90.,0.);
+ torustubecombitrans[1] = new TGeoCombiTrans(*torustubetrans[1],*torustuberot[1]);
+ torustuberot[2]->SetAngles(180.,0.,0.);
+ torustubematrix[2] = new TGeoHMatrix((*torustuberot[2])*(*torustubecombitrans[1]));
+ torustubematrix[2]->MultiplyLeft(coolingtubematrix[1]);
+
+ torustubetrans[2]->SetTranslation(0.,fgkEndCapCoolingTubeAxialRadius[0],
+ -fgkEndCapCoolingTubeAxialRadius[0]);
+ torustuberot[3]->SetAngles(0.,90.,0.);
+ torustubecombitrans[2] = new TGeoCombiTrans(*torustubetrans[2],*torustuberot[3]);
+ torustuberot[4]->SetAngles(fgkEndCapCoolingTubeAngle[2]-90.,0.,0.);
+ torustubematrix[3] = new TGeoHMatrix((*torustuberot[4])*(*torustubecombitrans[2]));
+ torustubematrix[3]->MultiplyLeft(torustubematrix[2]);
+
+ coolingtubetrans[4]->SetTranslation(-endcapcoolingtubeshape[3]->GetDz(),
+ fgkEndCapCoolingTubeAxialRadius[0],0.);
+ coolingtuberot[5]->SetAngles(90.,90.,-90.);
+ coolingtubecombitrans[4] = new TGeoCombiTrans(*coolingtubetrans[4],
+ *coolingtuberot[5]);
+ coolingtuberot[6]->SetAngles(fgkEndCapCoolingTubeAngle[3],0.,0.);
+ coolingtubematrix[2] = new TGeoHMatrix((*coolingtuberot[6])*(*coolingtubecombitrans[4]));
+ coolingtubematrix[2]->MultiplyLeft(torustubematrix[3]);
+
+ torustubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[1],0.,
+ endcapcoolingtubeshape[0]->GetDz());
+ torustuberot[5]->SetAngles(0.,90.,0.);
+ torustubecombitrans[3] = new TGeoCombiTrans(*torustubetrans[3],*torustuberot[5]);
+ torustuberot[6]->SetAngles(-90.,0.,0.);
+ torustubematrix[4] = new TGeoHMatrix((*torustuberot[6])*(*torustubecombitrans[3]));
+ torustubematrix[4]->MultiplyLeft(coolingtubecombitrans[0]);
+
+ coolingtubetrans[5]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[1],
+ endcapcoolingtubeshape[3]->GetDz(),0.);
+ coolingtuberot[6]->SetAngles(0.,90.,0.);
+ coolingtubecombitrans[5] = new TGeoCombiTrans(*coolingtubetrans[5],
+ *coolingtuberot[6]);
+ coolingtuberot[7]->SetAngles(fgkEndCapCoolingTubeAngle[4],0.,0.);
+ coolingtubematrix[3] = new TGeoHMatrix((*coolingtuberot[7])*(*coolingtubecombitrans[5]));
+ coolingtubematrix[3]->MultiplyLeft(torustubematrix[4]);
+ /////////////////////////////////////////
+ // Transformation for Water Volume Positioning
+ /////////////////////////////////////////
+ coolingwatertubetrans[0]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0],
+ -endcapcoolingwatertubeshape[0]->GetDz(),0.);
+ coolingwatertuberot[0]->SetAngles(0.,90.,0.);
+ coolingwatertubecombitrans[0] = new TGeoCombiTrans(*coolingwatertubetrans[0],
+ *coolingwatertuberot[0]);
+
+ coolingwatertubetrans[1]->SetTranslation(0.,-endcapcoolingwatertubeshape[1]->GetDz(),0.);
+ coolingwatertuberot[1]->SetAngles(0.,90.,0.);
+ coolingwatertubecombitrans[1] = new TGeoCombiTrans(*coolingwatertubetrans[1],
+ *coolingwatertuberot[1]);
+
+ coolingwatertubetrans[2]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0]
+ *CosD(fgkEndCapCoolingTubeAngle[0]),
+ fgkEndCapCoolingTubeAxialRadius[0]
+ *SinD(fgkEndCapCoolingTubeAngle[0]),
+ 0.);
+ coolingwatertuberot[2]->SetAngles(fgkEndCapCoolingTubeAngle[0]-180.,0.,0.);
+ coolingwatertubecombitrans[2] = new TGeoCombiTrans(*coolingwatertubetrans[2],
+ *coolingwatertuberot[2]);
+
+ coolingwatertubematrix[0] = new TGeoHMatrix((*coolingwatertubecombitrans[2])
+ * (*coolingwatertubecombitrans[1]));
+
+ toruswatertubetrans[0]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
+ endcapcoolingwatertubeshape[1]->GetDz());
+ toruswatertuberot[0]->SetAngles(0.,90.,0.);
+ toruswatertubecombitrans[0] = new TGeoCombiTrans(*toruswatertubetrans[0],
+ *toruswatertuberot[0]);
+
+ toruswatertubematrix[0] = new TGeoHMatrix((*coolingwatertubematrix[0])
+ * (*toruswatertubecombitrans[0]));
+
+ coolingwatertubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],
+ -endcapcoolingwatertubeshape[2]->GetDz(),0.);
+ coolingwatertuberot[3]->SetAngles(0.,90.,0.);
+ coolingwatertubecombitrans[3] = new TGeoCombiTrans(*coolingwatertubetrans[3],
+ *coolingwatertuberot[3]);
+ coolingwatertuberot[4]->SetAngles(-180.+fgkEndCapCoolingTubeAngle[1],0.,0.);
+ coolingwatertubematrix[1] = new TGeoHMatrix((*coolingwatertuberot[4])
+ * (*coolingwatertubecombitrans[3]));
+ coolingwatertubematrix[1]->MultiplyLeft(toruswatertubematrix[0]);
+
+ toruswatertubetrans[1]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
+ endcapcoolingwatertubeshape[2]->GetDz());
+ toruswatertuberot[1]->SetAngles(0.,90.,0.);
+ toruswatertubecombitrans[1] = new TGeoCombiTrans(*toruswatertubetrans[1],
+ *toruswatertuberot[1]);
+ toruswatertuberot[2]->SetAngles(180.,0.,0.);
+ toruswatertubematrix[2] = new TGeoHMatrix((*toruswatertuberot[2])
+ * (*toruswatertubecombitrans[1]));
+ toruswatertubematrix[2]->MultiplyLeft(coolingwatertubematrix[1]);
+
+ toruswatertubetrans[2]->SetTranslation(0.,fgkEndCapCoolingTubeAxialRadius[0],
+ -fgkEndCapCoolingTubeAxialRadius[0]);
+ toruswatertuberot[3]->SetAngles(0.,90.,0.);
+ toruswatertubecombitrans[2] = new TGeoCombiTrans(*toruswatertubetrans[2],
+ *toruswatertuberot[3]);
+ toruswatertuberot[4]->SetAngles(fgkEndCapCoolingTubeAngle[2]-90.,0.,0.);
+ toruswatertubematrix[3] = new TGeoHMatrix((*toruswatertuberot[4])
+ * (*toruswatertubecombitrans[2]));
+ toruswatertubematrix[3]->MultiplyLeft(toruswatertubematrix[2]);
+
+ coolingwatertubetrans[4]->SetTranslation(-endcapcoolingwatertubeshape[3]->GetDz(),
+ fgkEndCapCoolingTubeAxialRadius[0],0.);
+ coolingwatertuberot[5]->SetAngles(90.,90.,-90.);
+ coolingwatertubecombitrans[4] = new TGeoCombiTrans(*coolingwatertubetrans[4],
+ *coolingwatertuberot[5]);
+ coolingwatertuberot[6]->SetAngles(fgkEndCapCoolingTubeAngle[3],0.,0.);
+ coolingwatertubematrix[2] = new TGeoHMatrix((*coolingwatertuberot[6])
+ * (*coolingwatertubecombitrans[4]));
+ coolingwatertubematrix[2]->MultiplyLeft(toruswatertubematrix[3]);
+
+ toruswatertubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[1],0.,
+ endcapcoolingwatertubeshape[0]->GetDz());
+ toruswatertuberot[5]->SetAngles(0.,90.,0.);
+ toruswatertubecombitrans[3] = new TGeoCombiTrans(*toruswatertubetrans[3],
+ *toruswatertuberot[5]);
+ toruswatertuberot[6]->SetAngles(-90.,0.,0.);
+ toruswatertubematrix[4] = new TGeoHMatrix((*toruswatertuberot[6])
+ * (*toruswatertubecombitrans[3]));
+ toruswatertubematrix[4]->MultiplyLeft(coolingwatertubecombitrans[0]);
+
+ coolingwatertubetrans[5]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[1],
+ endcapcoolingwatertubeshape[3]->GetDz(),0.);
+ coolingwatertuberot[6]->SetAngles(0.,90.,0.);
+ coolingwatertubecombitrans[5] = new TGeoCombiTrans(*coolingwatertubetrans[5],
+ *coolingwatertuberot[6]);
+ coolingwatertuberot[7]->SetAngles(fgkEndCapCoolingTubeAngle[4],0.,0.);
+ coolingwatertubematrix[3] = new TGeoHMatrix((*coolingwatertuberot[7])
+ * (*coolingwatertubecombitrans[5]));
+ coolingwatertubematrix[3]->MultiplyLeft(toruswatertubematrix[4]);
+ /////////////////////////////////////////
+ // Positioning Volumes
+ /////////////////////////////////////////
+ endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[0],1);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[0],1);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtube[0],1,coolingtubecombitrans[0]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertube[0],1,coolingwatertubecombitrans[0]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtube[1],1,coolingtubematrix[0]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertube[1],1,coolingwatertubematrix[0]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[1],1,torustubematrix[0]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[1],1,toruswatertubematrix[0]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtube[2],1,coolingtubematrix[1]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertube[2],1,coolingwatertubematrix[1]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[2],1,torustubematrix[2]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[2],1,toruswatertubematrix[2]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[3],1,torustubematrix[3]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[3],1,toruswatertubematrix[3]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtube[3],1,coolingtubematrix[2]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertube[3],1,coolingwatertubematrix[2]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[4],1,torustubematrix[4]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[4],1,toruswatertubematrix[4]);
+
+ endcapcoolingtubemother->AddNode(endcapcoolingtube[3],2,coolingtubematrix[3]);
+ endcapcoolingtubemother->AddNode(endcapcoolingwatertube[3],2,coolingwatertubematrix[3]);
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ for(Int_t i=0; i<8; i++){
+ if(i<6){
+ delete coolingtubetrans[i];
+ delete coolingwatertubetrans[i];
+ if(i!=0){
+ delete coolingtubecombitrans[i];
+ delete coolingwatertubecombitrans[i];
+ }
+ }
+ if(i<8){
+ delete coolingtuberot[i];
+ delete coolingwatertuberot[i];
+ }
+ if(i<4){
+ delete torustubetrans[i];
+ delete toruswatertubetrans[i];
+ delete torustubecombitrans[i];
+ delete toruswatertubecombitrans[i];
+ }
+ if(i<7){
+ delete torustuberot[i];
+ delete toruswatertuberot[i];
+ }
+ }
+ /////////////////////////////////////////////////////////////
+ return endcapcoolingtubemother;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume* AliITSv11GeometrySSD::GetEndCapSideCover() const {
+ /////////////////////////////////////////////////////////////
+ // Getting EndCap Cover Side
+ /////////////////////////////////////////////////////////////
+ const Int_t kendcapcoverholenumber[2] = {7,5};
+ const Int_t kvertexnumber = 15;
+ Double_t xvertex[kvertexnumber], yvertex[kvertexnumber];
+ xvertex[0] = 0.0;
+ xvertex[1] = xvertex[0];
+ xvertex[2] = fgkEndCapSideCoverLength[0];
+ xvertex[3] = fgkEndCapSideCoverLength[1];
+ xvertex[4] = xvertex[3];
+ xvertex[5] = fgkEndCapSideCoverLength[2];
+ xvertex[6] = xvertex[5];
+ xvertex[7] = xvertex[2];
+ xvertex[8] = xvertex[7];
+ xvertex[9] = xvertex[6]-fgkEndCapSideCoverLength[0];
+ xvertex[10] = xvertex[9];
+ xvertex[11] = xvertex[5]-fgkEndCapSideCoverLength[0]-kendcapcoverholenumber[1]
+ * fgkEndCapSideCoverLength[3]-(kendcapcoverholenumber[1]-1)
+ * fgkEndCapSideCoverLength[4];
+ xvertex[12] = xvertex[11];
+ xvertex[13] = xvertex[5]-fgkEndCapSideCoverLength[0]-kendcapcoverholenumber[0]
+ * fgkEndCapSideCoverLength[3]-(kendcapcoverholenumber[0]-1)
+ * fgkEndCapSideCoverLength[4];
+ xvertex[14] = xvertex[13];
+ yvertex[0] = 0.0;
+ yvertex[1] = fgkEndCapSideCoverWidth[0];
+ yvertex[2] = fgkEndCapSideCoverWidth[1]-fgkEndCapSideCoverWidth[2];
+ yvertex[3] = yvertex[2];
+ yvertex[4] = fgkEndCapSideCoverWidth[1];
+ yvertex[5] = yvertex[4];
+ yvertex[6] = yvertex[0];
+ yvertex[7] = yvertex[6];
+ yvertex[8] = fgkEndCapSideCoverWidth[6];
+ yvertex[9] = yvertex[8];
+ yvertex[10] = fgkEndCapSideCoverWidth[1]-fgkEndCapSideCoverWidth[3];
+ yvertex[11] = yvertex[10];
+ yvertex[12] = yvertex[9]+2.*fgkEndCapSideCoverWidth[5]+fgkEndCapSideCoverLength[4];
+ yvertex[13] = yvertex[12];
+ yvertex[14] = yvertex[6];
+ TGeoXtru* endcapsidecovershapeout = new TGeoXtru(2);
+ endcapsidecovershapeout->SetName("endcapsidecovershapeout");
+ endcapsidecovershapeout->DefinePolygon(7,xvertex,yvertex);
+ endcapsidecovershapeout->DefineSection(0,-0.5*fgkEndCapSideCoverThickness);
+ endcapsidecovershapeout->DefineSection(1,0.5*fgkEndCapSideCoverThickness);
+ TGeoXtru* endcapsidecovershapein = new TGeoXtru(2);
+ endcapsidecovershapein->SetName("endcapsidecovershapein");
+ endcapsidecovershapein->DefinePolygon(6,&xvertex[8],&yvertex[8]);
+ endcapsidecovershapein->DefineSection(0,-0.5*fgkEndCapSideCoverThickness-0.01);
+ endcapsidecovershapein->DefineSection(1,0.5*fgkEndCapSideCoverThickness+0.01);
+
+
+ TGeoCompositeShape* endcapsidecovershape = new TGeoCompositeShape("endcapsidecovershape", "endcapsidecovershapeout-endcapsidecovershapein");
+ TGeoVolume* endcapsidecover = new TGeoVolume("EndCapSideCover",
+ endcapsidecovershape,fSSDCoolingTubePhynox);
+ endcapsidecover->SetLineColor(fColorPhynox);
+ ////////////////////////////////////////////
+ // Defininition of Mother Volume
+ ////////////////////////////////////////////
+ const Int_t kmothervertexnumber = 7;
+ Double_t xmothervertex[kmothervertexnumber];
+ Double_t ymothervertex[kmothervertexnumber];
+ for(Int_t i=0; i<kmothervertexnumber; i++){
+ xmothervertex[i] = xvertex[i];
+ ymothervertex[i] = yvertex[i];
+ }
+ TGeoXtru* endcapsidecovermothershape = new TGeoXtru(2);
+ endcapsidecovermothershape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
+ endcapsidecovermothershape->DefineSection(0,-0.5*fgkEndCapSideCoverThickness);
+ endcapsidecovermothershape->DefineSection(1,0.5*fgkEndCapSideCoverThickness);
+ TGeoVolume* endcapsidecovermother = new TGeoVolume("EndCapSideCoverMother",
+ endcapsidecovermothershape,fSSDAir);
+ ////////////////////////////////////////////
+ endcapsidecovermother->AddNode(endcapsidecover,1);
+ TGeoBBox* endcapsidecoverboxshape[4];
+ endcapsidecoverboxshape[0] = new TGeoBBox(0.5*(kendcapcoverholenumber[0]*fgkEndCapSideCoverLength[3]
+ + (kendcapcoverholenumber[0]-1)*fgkEndCapSideCoverLength[4]),
+ 0.5*fgkEndCapSideCoverLength[4],
+ 0.5*fgkEndCapSideCoverThickness);
+ endcapsidecoverboxshape[1] = new TGeoBBox(0.5*(kendcapcoverholenumber[1]*fgkEndCapSideCoverLength[3]
+ + (kendcapcoverholenumber[1]-1)*fgkEndCapSideCoverLength[4]),
+ 0.5*(fgkEndCapSideCoverWidth[4]-2.*fgkEndCapSideCoverWidth[5]
+ - fgkEndCapSideCoverLength[4]),
+ 0.5*fgkEndCapSideCoverThickness);
+ endcapsidecoverboxshape[2] = new TGeoBBox(endcapsidecoverboxshape[1]->GetDX(),
+ 0.5*fgkEndCapSideCoverLength[4],
+ 0.5*fgkEndCapSideCoverThickness);
+ endcapsidecoverboxshape[3] = new TGeoBBox(0.5*fgkEndCapSideCoverLength[4],
+ 0.5*fgkEndCapSideCoverWidth[5],
+ 0.5*fgkEndCapSideCoverThickness);
+ TGeoVolume* endcapsidecoverbox[4];
+ endcapsidecoverbox[0] = new TGeoVolume("EndCapSideCoverBox1",endcapsidecoverboxshape[0],fSSDCoolingTubePhynox);
+ endcapsidecoverbox[1] = new TGeoVolume("EndCapSideCoverBox2",endcapsidecoverboxshape[1],fSSDCoolingTubePhynox);
+ endcapsidecoverbox[2] = new TGeoVolume("EndCapSideCoverBox3",endcapsidecoverboxshape[2],fSSDCoolingTubePhynox);
+ endcapsidecoverbox[3] = new TGeoVolume("EndCapSideCoverBox4",endcapsidecoverboxshape[3],fSSDCoolingTubePhynox);
+ for(Int_t i=0; i<4; i++) endcapsidecoverbox[i]->SetLineColor(fColorPhynox);
+// TGeoTranslation* endcapsidecoverboxtrans[3+2*(kendcapcoverholenumber[0]-1)+2*(kendcapcoverholenumber[1]-1)];
+ TGeoTranslation** endcapsidecoverboxtrans;
+ endcapsidecoverboxtrans = new TGeoTranslation*[3+2*(kendcapcoverholenumber[0]-1)+2*(kendcapcoverholenumber[1]-1)];
+ endcapsidecoverboxtrans[0] = new TGeoTranslation(endcapsidecoverboxshape[0]->GetDX()
+ + fgkEndCapSideCoverLength[0],
+ endcapsidecoverboxshape[0]->GetDY()
+ + yvertex[9]+fgkEndCapSideCoverWidth[5],0.);
+ endcapsidecoverboxtrans[1] = new TGeoTranslation(endcapsidecoverboxshape[1]->GetDX()
+ + xvertex[11],
+ endcapsidecoverboxshape[1]->GetDY()
+ + yvertex[12],0.);
+ endcapsidecoverboxtrans[2] = new TGeoTranslation(endcapsidecoverboxshape[2]->GetDX()
+ + xvertex[11],
+ endcapsidecoverboxshape[2]->GetDY()
+ + yvertex[12]
+ + 2.*endcapsidecoverboxshape[1]->GetDY()
+ + fgkEndCapSideCoverWidth[5],0.);
+ endcapsidecovermother->AddNode(endcapsidecoverbox[0],1,endcapsidecoverboxtrans[0]);
+ endcapsidecovermother->AddNode(endcapsidecoverbox[1],1,endcapsidecoverboxtrans[1]);
+ endcapsidecovermother->AddNode(endcapsidecoverbox[2],1,endcapsidecoverboxtrans[2]);
+ for(Int_t i=0; i<2; i++)
+ for(Int_t j=0; j<kendcapcoverholenumber[0]-1; j++){
+ endcapsidecoverboxtrans[i*(kendcapcoverholenumber[0]-1)+j+3] =
+ new TGeoTranslation(endcapsidecoverboxshape[3]->GetDX()+fgkEndCapSideCoverLength[0]
+ +(j+1)*fgkEndCapSideCoverLength[3]+j*fgkEndCapSideCoverLength[4],
+ endcapsidecoverboxshape[3]->GetDY()+fgkEndCapSideCoverWidth[6]
+ +i*(fgkEndCapSideCoverWidth[5]+fgkEndCapSideCoverLength[4]),0.0);
+ endcapsidecovermother->AddNode(endcapsidecoverbox[3],i*(kendcapcoverholenumber[0]-1)+j+1,
+ endcapsidecoverboxtrans[i*(kendcapcoverholenumber[0]-1)+j+3]);
+ }
+ for(Int_t i=0; i<2; i++)
+ for(Int_t j=0; j<kendcapcoverholenumber[1]-1; j++){
+ endcapsidecoverboxtrans[2*(kendcapcoverholenumber[0]-1)+3+i*(kendcapcoverholenumber[1]-1)+j] =
+ new TGeoTranslation(endcapsidecoverboxshape[3]->GetDX()+xvertex[12]
+ +(j+1)*fgkEndCapSideCoverLength[3]+j*fgkEndCapSideCoverLength[4],
+ endcapsidecoverboxshape[3]->GetDY()+fgkEndCapSideCoverWidth[6]
+ +fgkEndCapSideCoverWidth[4]+i*(fgkEndCapSideCoverWidth[5]
+ +fgkEndCapSideCoverLength[4]),0.0);
+ endcapsidecovermother->AddNode(endcapsidecoverbox[3],
+ 2*(kendcapcoverholenumber[0]-1)+3+i*(kendcapcoverholenumber[1]-1)+j,
+ endcapsidecoverboxtrans[2*(kendcapcoverholenumber[0]-1)+3
+ +i*(kendcapcoverholenumber[1]-1)+j]);
+ }
+ delete [] endcapsidecoverboxtrans;
+ return endcapsidecovermother;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume** AliITSv11GeometrySSD::GetEndCapCards() const {
+ ////////////////////////////////////////////////////////////////////////////////
+ // Method returning Interface Card A, Interface Card B, Supply Card
+ ////////////////////////////////////////////////////////////////////////////////
+ /////////////////////
+ // Supply Card
+ /////////////////////
+ // Electronic Board Back Al Plane
+ const Int_t kelectboardbackvertexnumber = 8;
+ Double_t xelectboardback[kelectboardbackvertexnumber];
+ Double_t yelectboardback[kelectboardbackvertexnumber];
+ xelectboardback[0] = 0.0;
+ xelectboardback[1] = xelectboardback[0];
+ xelectboardback[2] = fgkEndCapCardElectBoardBackLength[0];
+ xelectboardback[3] = xelectboardback[2];
+ xelectboardback[4] = xelectboardback[3]-fgkEndCapCardElectBoardBackLength[1];
+ xelectboardback[5] = xelectboardback[4];
+ xelectboardback[6] = fgkEndCapCardElectBoardBackLength[1];
+ xelectboardback[7] = xelectboardback[6];
+
+ yelectboardback[0] = 0.0;
+ yelectboardback[1] = fgkEndCapCardElectBoardBackWidth[0];
+ yelectboardback[2] = yelectboardback[1];
+ yelectboardback[3] = yelectboardback[0];
+ yelectboardback[4] = yelectboardback[3];
+ yelectboardback[5] = yelectboardback[4]+fgkEndCapCardElectBoardBackWidth[1];
+ yelectboardback[6] = yelectboardback[5];
+ yelectboardback[7] = yelectboardback[4];
+ TGeoXtru* electboardbackshape = new TGeoXtru(2);
+ electboardbackshape->DefinePolygon(kelectboardbackvertexnumber,
+ xelectboardback,yelectboardback);
+ electboardbackshape->DefineSection(0,0.0);
+ electboardbackshape->DefineSection(1,fgkEndCapCardElectBoardBackThickness);
+ TGeoVolume* electboardback = new TGeoVolume("EndCapCardElectBoardBackPlane",
+ electboardbackshape,fSSDSupportRingAl);
+ electboardback->SetLineColor(fColorAl);
+ // Electronic Board Kapton Layer
+ const Int_t kelectlayervertexnumber = 8;
+ Double_t xelectlayer[kelectlayervertexnumber];
+ Double_t yelectlayer[kelectlayervertexnumber];
+ xelectlayer[0] = fgkEndCapCardElectBoardBackLength[0]-fgkEndCapCardElectBoardLength;
+ xelectlayer[1] = xelectlayer[0];
+ xelectlayer[2] = fgkEndCapCardElectBoardLength;
+ xelectlayer[3] = xelectlayer[2];
+ for(Int_t i=4; i<kelectlayervertexnumber; i++) xelectlayer[i] = xelectboardback[i];
+
+ yelectlayer[0] = 0.0;
+ yelectlayer[1] = fgkEndCapCardElectBoardLayerWidth[0];
+ yelectlayer[2] = yelectlayer[1];
+ yelectlayer[3] = yelectlayer[0];
+ yelectlayer[4] = yelectlayer[3];
+ yelectlayer[5] = yelectlayer[4]+fgkEndCapCardElectBoardLayerWidth[1];
+ yelectlayer[6] = yelectlayer[5];
+ yelectlayer[7] = yelectlayer[4];
+ TGeoXtru* electlayershape = new TGeoXtru(2);
+ electlayershape->DefinePolygon(kelectlayervertexnumber,xelectlayer,yelectlayer);
+ electlayershape->DefineSection(0,0.0);
+ electlayershape->DefineSection(1,fgkEndCapCardElectBoardLayerThickness);
+ TGeoVolume* electlayer = new TGeoVolume("EndCapCardElectBoardLayer",
+ electlayershape,fSSDKaptonFlexMedium);
+ electlayer->SetLineColor(fColorKapton);
+ // JMD Connector Female
+ const Int_t kjmdconnectorvertexnumber = 6;
+ Double_t xjmdconnectorvertex[kjmdconnectorvertexnumber];
+ Double_t yjmdconnectorvertex[kjmdconnectorvertexnumber];
+ xjmdconnectorvertex[0] = 0.0;
+ xjmdconnectorvertex[1] = xjmdconnectorvertex[0];
+ xjmdconnectorvertex[2] = fgkEndCapCardJMDConnectorLength[1];
+ xjmdconnectorvertex[3] = xjmdconnectorvertex[2];
+ xjmdconnectorvertex[4] = fgkEndCapCardJMDConnectorLength[0];
+ xjmdconnectorvertex[5] = xjmdconnectorvertex[4];
+
+ yjmdconnectorvertex[0] = 0.0;
+ yjmdconnectorvertex[1] = fgkEndCapCardJMDConnectorWidth[0];
+ yjmdconnectorvertex[2] = yjmdconnectorvertex[1];
+ yjmdconnectorvertex[3] = yjmdconnectorvertex[2]+fgkEndCapCardJMDConnectorWidth[1];
+ yjmdconnectorvertex[4] = yjmdconnectorvertex[3];
+ yjmdconnectorvertex[5] = yjmdconnectorvertex[0];
+ TGeoXtru* jmdconnectorshape = new TGeoXtru(2);
+ jmdconnectorshape->DefinePolygon(kjmdconnectorvertexnumber,xjmdconnectorvertex,
+ yjmdconnectorvertex);
+ jmdconnectorshape->DefineSection(0,0.0);
+ jmdconnectorshape->DefineSection(1,fgkEndCapCardJMDConnectorThickness);
+ TGeoVolume* jmdconnector = new TGeoVolume("EndCapCardJMDConnector",
+ jmdconnectorshape,fSSDMountingBlockMedium);
+ jmdconnector->SetLineColor(fColorG10);
+ // Top Cable Connector
+ const Int_t kcableconnectorvertexnumber = 8;
+ Double_t xconnectorvertex[kcableconnectorvertexnumber];
+ Double_t yconnectorvertex[kcableconnectorvertexnumber];
+ xconnectorvertex[0] = 0.0;
+ xconnectorvertex[1] = xconnectorvertex[0];
+ xconnectorvertex[2] = xconnectorvertex[1]+fgkEndCapCardCableConnectorLength[1];
+ xconnectorvertex[3] = xconnectorvertex[2];
+ xconnectorvertex[4] = fgkEndCapCardCableConnectorLength[0]
+ - fgkEndCapCardCableConnectorLength[2];
+ xconnectorvertex[5] = xconnectorvertex[4];
+ xconnectorvertex[6] = fgkEndCapCardCableConnectorLength[0];
+ xconnectorvertex[7] = xconnectorvertex[6];
+
+ yconnectorvertex[0] = 0.0;
+ yconnectorvertex[1] = fgkEndCapCardCableConnectorWidth[0];
+ yconnectorvertex[2] = yconnectorvertex[1];
+ yconnectorvertex[3] = fgkEndCapCardCableConnectorWidth[1];
+ yconnectorvertex[4] = yconnectorvertex[3];
+ yconnectorvertex[5] = yconnectorvertex[1];
+ yconnectorvertex[6] = yconnectorvertex[5];
+ yconnectorvertex[7] = yconnectorvertex[0];
+ TGeoXtru* cableconnectorshape = new TGeoXtru(2);
+ cableconnectorshape->DefinePolygon(kcableconnectorvertexnumber,xconnectorvertex,
+ yconnectorvertex);
+ cableconnectorshape->DefineSection(0,0.0);
+ cableconnectorshape->DefineSection(1,fgkEndCapCardCableConnectorThickness);
+ TGeoVolume* cableconnector = new TGeoVolume("EndCapCardTopCableConnector",
+ cableconnectorshape,fSSDMountingBlockMedium);
+ cableconnector->SetLineColor(fColorG10);
+ // Strip Connection
+ TGeoBBox* endcapstripconnectionshape =
+ new TGeoBBox(0.5*fgkEndCapStripConnectionLength,
+ 0.5*fgkEndCapStripConnectionThickness,
+ 0.5*fgkEndCapStripConnectionWidth);
+ TGeoVolume* endcapstripconnection = new TGeoVolume("EndCapStripConnection",
+ endcapstripconnectionshape,
+ fSSDSupportRingAl);
+ endcapstripconnection->SetLineColor(fColorAl);
+ // Interface Card B
+ const Int_t kcardBvertexnumber = 12;
+ Double_t xcardBvertexnumber[kcardBvertexnumber];
+ Double_t ycardBvertexnumber[kcardBvertexnumber];
+
+ xcardBvertexnumber[0] = 0.0;
+ xcardBvertexnumber[1] = xcardBvertexnumber[0];
+ xcardBvertexnumber[2] = xcardBvertexnumber[1]+fgkEndCapInterfaceCardBLength[0];
+ xcardBvertexnumber[3] = xcardBvertexnumber[2];
+ xcardBvertexnumber[4] = xcardBvertexnumber[1];
+ xcardBvertexnumber[5] = xcardBvertexnumber[4];
+ xcardBvertexnumber[6] = xcardBvertexnumber[5]+fgkEndCapInterfaceCardBLength[1];
+ xcardBvertexnumber[7] = xcardBvertexnumber[6];
+ xcardBvertexnumber[8] = xcardBvertexnumber[7]-fgkEndCapInterfaceCardBLength[0];
+ xcardBvertexnumber[9] = xcardBvertexnumber[8];
+ xcardBvertexnumber[10] = xcardBvertexnumber[7];
+ xcardBvertexnumber[11] = xcardBvertexnumber[10];
+
+ ycardBvertexnumber[0] = 0.0;
+ ycardBvertexnumber[1] = fgkEndCapInterfaceCardBWidth[0];
+ ycardBvertexnumber[2] = ycardBvertexnumber[1];
+ ycardBvertexnumber[3] = ycardBvertexnumber[2]+fgkEndCapInterfaceCardBWidth[1];
+ ycardBvertexnumber[4] = ycardBvertexnumber[3];
+ ycardBvertexnumber[5] = ycardBvertexnumber[4]+fgkEndCapInterfaceCardBWidth[2];
+ ycardBvertexnumber[6] = ycardBvertexnumber[5];
+ ycardBvertexnumber[7] = ycardBvertexnumber[4];
+ ycardBvertexnumber[8] = ycardBvertexnumber[7];
+ ycardBvertexnumber[9] = ycardBvertexnumber[1];
+ ycardBvertexnumber[10] = ycardBvertexnumber[9];
+ ycardBvertexnumber[11] = ycardBvertexnumber[0];
+
+ TGeoXtru* interfacecardBshape = new TGeoXtru(2);
+ interfacecardBshape->DefinePolygon(kcardBvertexnumber,xcardBvertexnumber,ycardBvertexnumber);
+ interfacecardBshape->DefineSection(0,0.);
+ interfacecardBshape->DefineSection(1,fgkEndCapInterfaceCardBThickness);
+ TGeoVolume* interfacecardB = new TGeoVolume("EndCapInterfaceCardB",interfacecardBshape,
+ fSSDMountingBlockMedium);
+ interfacecardB->SetLineColor(46);
+ // Interface Card B Electronic Board
+ const Int_t kelectboardcardBvertexnumber = 14;
+ Double_t xelectboardcardBvertex[kelectboardcardBvertexnumber];
+ Double_t yelectboardcardBvertex[kelectboardcardBvertexnumber];
+
+ xelectboardcardBvertex[0] = xcardBvertexnumber[0]+fgkEndCapInterfaceCardBLength[2];
+ xelectboardcardBvertex[1] = xelectboardcardBvertex[0];
+ xelectboardcardBvertex[2] = xelectboardcardBvertex[1]+fgkEndCapInterfaceCardBLength[3];
+ xelectboardcardBvertex[3] = xelectboardcardBvertex[2];
+ xelectboardcardBvertex[4] = xelectboardcardBvertex[3]+fgkEndCapInterfaceCardBLength[4];
+ xelectboardcardBvertex[5] = xelectboardcardBvertex[4];
+ xelectboardcardBvertex[6] = xelectboardcardBvertex[5]+fgkEndCapInterfaceCardBLength[5];
+ xelectboardcardBvertex[7] = xelectboardcardBvertex[6];
+ xelectboardcardBvertex[8] = xelectboardcardBvertex[7]+8.0*fgkEndCapInterfaceCardBLength[4];
+ xelectboardcardBvertex[9] = xelectboardcardBvertex[8];
+ xelectboardcardBvertex[10] = xelectboardcardBvertex[9]+fgkEndCapInterfaceCardBLength[6];
+ xelectboardcardBvertex[11] = xelectboardcardBvertex[10];
+ xelectboardcardBvertex[12] = xelectboardcardBvertex[11]-9.0*fgkEndCapInterfaceCardBLength[4];
+ xelectboardcardBvertex[13] = xelectboardcardBvertex[12];
+
+ yelectboardcardBvertex[0] = ycardBvertexnumber[0]+fgkEndCapInterfaceCardBWidth[1];
+ yelectboardcardBvertex[1] = yelectboardcardBvertex[0]+fgkEndCapInterfaceCardBWidth[3];
+ yelectboardcardBvertex[2] = yelectboardcardBvertex[1];
+ yelectboardcardBvertex[3] = yelectboardcardBvertex[2]+fgkEndCapInterfaceCardBWidth[3];
+ yelectboardcardBvertex[4] = yelectboardcardBvertex[3];
+ yelectboardcardBvertex[5] = yelectboardcardBvertex[2];
+ yelectboardcardBvertex[6] = yelectboardcardBvertex[5];
+ yelectboardcardBvertex[7] = yelectboardcardBvertex[6]+fgkEndCapInterfaceCardBWidth[4];
+ yelectboardcardBvertex[8] = yelectboardcardBvertex[7];
+ yelectboardcardBvertex[9] = yelectboardcardBvertex[8]-fgkEndCapInterfaceCardBWidth[3];
+ yelectboardcardBvertex[10] = yelectboardcardBvertex[9];
+ yelectboardcardBvertex[11] = yelectboardcardBvertex[10]-fgkEndCapInterfaceCardBWidth[3];
+ yelectboardcardBvertex[12] = yelectboardcardBvertex[11];
+ yelectboardcardBvertex[13] = yelectboardcardBvertex[0];
+
+ TGeoXtru* electboardcardBshape = new TGeoXtru(2);
+ electboardcardBshape->DefinePolygon(kelectboardcardBvertexnumber,
+ xelectboardcardBvertex,yelectboardcardBvertex);
+ electboardcardBshape->DefineSection(0,fgkEndCapInterfaceCardBThickness);
+ electboardcardBshape->DefineSection(1,fgkEndCapInterfaceCardBThickness
+ + fgkEndCapInterfaceElectBoardCardBThickness);
+ TGeoVolume* electboardcardB = new TGeoVolume("EndCapInterfaceElectBoardCardB",electboardcardBshape,
+ fSSDSupportRingAl);
+ electboardcardB->SetLineColor(fColorAl);
+ // Generating Stiffener 2
+ TGeoBBox* endcapstiffenershape = new TGeoBBox(0.5*fgkEndCapStiffenerWidth,
+ 0.5*fgkEndCapStiffenerThickness,
+ 0.5*fgkEndCapStiffenerLength);
+ TGeoVolume* endcapstiffener = new TGeoVolume("EndCapStiffener",endcapstiffenershape,fSSDSupportRingAl);
+ endcapstiffener->SetLineColor(fColorAl);
+ // Generating Mother Interface Card B Container
+ const Int_t kinterfacecardBmothervertexnumber = 10;
+ Double_t xinterfacecardBmothervertex[kinterfacecardBmothervertexnumber];
+ Double_t yinterfacecardBmothervertex[kinterfacecardBmothervertexnumber];
+
+ xinterfacecardBmothervertex[0] = 0.0;
+ xinterfacecardBmothervertex[1] = xinterfacecardBmothervertex[0];
+ xinterfacecardBmothervertex[2] = xinterfacecardBmothervertex[1]
+ + fgkEndCapInterfaceCardBThickness;
+ xinterfacecardBmothervertex[3] = xinterfacecardBmothervertex[2];
+ xinterfacecardBmothervertex[4] = xinterfacecardBmothervertex[3]
+ + fgkEndCapInterfaceElectBoardCardBThickness;
+ xinterfacecardBmothervertex[5] = xinterfacecardBmothervertex[4];
+ xinterfacecardBmothervertex[6] = xinterfacecardBmothervertex[3];
+ xinterfacecardBmothervertex[7] = xinterfacecardBmothervertex[6];
+ xinterfacecardBmothervertex[8] = xinterfacecardBmothervertex[7]
+ + fgkEndCapCardJMDConnectorLength[0];
+ xinterfacecardBmothervertex[9] = xinterfacecardBmothervertex[8];
+
+ yinterfacecardBmothervertex[0] = 0.0;
+ yinterfacecardBmothervertex[1] = fgkEndCapInterfaceCardBWidth[0]
+ + fgkEndCapInterfaceCardBWidth[1]
+ + fgkEndCapInterfaceCardBWidth[2];
+ yinterfacecardBmothervertex[2] = yinterfacecardBmothervertex[1];
+ yinterfacecardBmothervertex[3] = yelectboardcardBvertex[3];
+ yinterfacecardBmothervertex[4] = yinterfacecardBmothervertex[3];
+ yinterfacecardBmothervertex[5] = yelectboardcardBvertex[11];
+ yinterfacecardBmothervertex[6] = yinterfacecardBmothervertex[5];
+ yinterfacecardBmothervertex[7] = fgkEndCapCardElectBoardLayerWidth[1]
+ + fgkEndCapCardJMDConnectorWidth[0]
+ + fgkEndCapCardJMDConnectorWidth[1];
+ yinterfacecardBmothervertex[8] = yinterfacecardBmothervertex[7];
+ yinterfacecardBmothervertex[9] = yinterfacecardBmothervertex[0];
+ TGeoXtru* interfacecardBmothershape = new TGeoXtru(2);
+ interfacecardBmothershape->DefinePolygon(kinterfacecardBmothervertexnumber,
+ xinterfacecardBmothervertex,
+ yinterfacecardBmothervertex);
+ interfacecardBmothershape->DefineSection(0,-1.e-15);
+ interfacecardBmothershape->DefineSection(1,fgkEndCapInterfaceCardBLength[1]);
+ TGeoVolume* interfacecardBmother = new TGeoVolume("EndCapInterfaceCardBMother",
+ interfacecardBmothershape,fSSDAir);
+ electboardcardB->SetLineColor(fColorAl);
+ // Positioning Volumes Mother Interface Card B Container
+ TGeoRotation* interfacecardBrot = new TGeoRotation();
+ TGeoTranslation* interfacecardBtrans = new TGeoTranslation();
+ interfacecardBrot->SetAngles(90.,-90.,-90.);
+ interfacecardBtrans->SetTranslation(fgkEndCapInterfaceCardBThickness,0.,0.);
+ TGeoCombiTrans* interfacecardBcombitrans = new TGeoCombiTrans(*interfacecardBtrans,*interfacecardBrot);
+ TGeoRotation* electboardcardBrot = new TGeoRotation();
+ TGeoTranslation* electboardcardBtrans = new TGeoTranslation();
+ electboardcardBrot->SetAngles(90.,90.,-90.);
+ electboardcardBtrans->SetTranslation(0.,0.,fgkEndCapInterfaceCardBLength[1]);
+ TGeoCombiTrans* electboardcardBcombitrans =
+ new TGeoCombiTrans(*electboardcardBtrans,*electboardcardBrot);
+ interfacecardBmother->AddNode(interfacecardB,1,interfacecardBcombitrans);
+ interfacecardBmother->AddNode(electboardcardB,1,electboardcardBcombitrans);
+ TGeoRotation* jmdconnectorcardBrot = new TGeoRotation();
+ jmdconnectorcardBrot->SetAngles(90.,180.,-90.);
+ TGeoTranslation* jmdconnectorcardBtrans[3];
+ TGeoCombiTrans* jmdconnectorcardBcombitrans[3];
+ for(Int_t i=0; i<3; i++){
+ jmdconnectorcardBtrans[i] = new TGeoTranslation(fgkEndCapInterfaceCardBThickness
+ + fgkEndCapCardJMDConnectorLength[0],
+ fgkEndCapCardElectBoardLayerWidth[1],
+ 0.5*fgkEndCapCardJMDConnectorThickness
+ + 0.5*(fgkEndCapInterfaceCardBLength[1]
+ - 2.*fgkEndCapInterfaceCardBJMDConnectorSeparation)
+ + i *fgkEndCapInterfaceCardBJMDConnectorSeparation);
+ jmdconnectorcardBcombitrans[i] = new TGeoCombiTrans(*jmdconnectorcardBtrans[i],
+ *jmdconnectorcardBrot);
+ interfacecardBmother->AddNode(jmdconnector,i+1,jmdconnectorcardBcombitrans[i]);
+ }
+ // Mother Supply Card Container
+ TGeoVolumeAssembly* mothersupplycard = new TGeoVolumeAssembly("EndCapCardMotherSupply");
+ // Interface Card Container
+ TGeoVolumeAssembly* motherinterfacecardcontainer = new TGeoVolumeAssembly("EndCapMotherInterfaceCardA");
+ // Placing Volumes in Mother Supply Card Container
+ // JMD Connector Positioning
+ TGeoTranslation* jmdconnectortrans[2];
+ for(Int_t i=0; i<2; i++) jmdconnectortrans[i] = new TGeoTranslation();
+ jmdconnectortrans[0]->SetTranslation(0.,fgkEndCapCardElectBoardLayerWidth[1],
+ fgkEndCapCardElectBoardBackLength[0]
+ - fgkEndCapCardJMDConnectorThickness
+ - fgkEndCapCardJMDConnectorToLayer);
+ TGeoRotation* jmdconnectorot = new TGeoRotation();
+ jmdconnectortrans[1]->SetTranslation(fgkEndCapCardElectBoardBackThickness
+ + 2.*fgkEndCapCardJMDConnectorLength[0]
+ + 2.*fgkEndCapCardElectBoardLayerThickness,
+ fgkEndCapCardElectBoardLayerWidth[1],
+ fgkEndCapCardJMDConnectorThickness
+ + fgkEndCapCardJMDConnectorToLayer);
+ jmdconnectorot->SetAngles(90.,180.,-90);
+ TGeoCombiTrans* jmdconnectorcombitrans = new TGeoCombiTrans(*jmdconnectortrans[1],
+ * jmdconnectorot);
+ mothersupplycard->AddNode(jmdconnector,1,jmdconnectortrans[0]);
+ mothersupplycard->AddNode(jmdconnector,2,jmdconnectorcombitrans);
+ // Top Cable Connector Placing
+ TGeoRotation* cableconnectorot[2];
+ for(Int_t i=0; i<2; i++) cableconnectorot[i] = new TGeoRotation();
+ TGeoTranslation* cableconnectortrans[3];
+ for(Int_t i=0; i<3; i++) cableconnectortrans[i] = new TGeoTranslation();
+ cableconnectorot[0]->SetAngles(90.,0.,0.);
+ cableconnectorot[1]->SetAngles(0.,-90.,0.);
+ cableconnectortrans[0]->SetTranslation(fgkEndCapCardJMDConnectorLength[0],0.,0.);
+ TGeoCombiTrans* cableconnectorcombitrans = new TGeoCombiTrans(*cableconnectortrans[0],
+ *cableconnectorot[0]);
+ TGeoHMatrix* cableconnectormatrix[2];
+ for(Int_t i=0; i<2; i++) cableconnectormatrix[i] =
+ new TGeoHMatrix((*cableconnectorot[1])
+ *(*cableconnectorcombitrans));
+ cableconnectortrans[1]->SetTranslation(0.,fgkEndCapCardElectBoardLayerWidth[0]
+ - fgkEndCapCardCableConnectorThickness,
+ fgkEndCapCardCableConnectorLength[0]
+ + fgkEndCapCardCableConnectorToLayer);
+ cableconnectortrans[2]->SetTranslation(0.,fgkEndCapCardElectBoardLayerWidth[0]
+ - 2.*fgkEndCapCardCableConnectorThickness
+ - fgkEndCapCardCableConnectorDistance,
+ fgkEndCapCardCableConnectorLength[0]
+ + fgkEndCapCardCableConnectorToLayer);
+ for(Int_t i=0; i<2; i++){
+ cableconnectormatrix[i]->MultiplyLeft(cableconnectortrans[i+1]);
+ mothersupplycard->AddNode(cableconnector,i+1,cableconnectormatrix[i]);
+ }
+ TGeoRotation* electboardbackrot = new TGeoRotation();
+ TGeoTranslation* electboardbacktrans = new TGeoTranslation();
+ electboardbackrot->SetAngles(90.,-90.,-90.);
+ electboardbacktrans->SetTranslation(fgkEndCapCardElectBoardBackThickness
+ + fgkEndCapCardJMDConnectorLength[0]
+ + fgkEndCapCardElectBoardLayerThickness,0.,0.);
+ TGeoCombiTrans* electboardbackcombitrans = new TGeoCombiTrans(*electboardbacktrans,
+ *electboardbackrot);
+ mothersupplycard->AddNode(electboardback,1,electboardbackcombitrans);
+ // Electronic Board Kapton Layer Positioning
+ TGeoRotation* electlayerrot = new TGeoRotation();
+ TGeoTranslation* electlayertrans[2];
+ TGeoCombiTrans* electlayercombitrans[2];
+ for(Int_t i=0; i<2; i++) electlayertrans[i] = new TGeoTranslation();
+ electlayerrot->SetAngles(90.,-90.,-90.);
+ electlayertrans[0]->SetTranslation(fgkEndCapCardJMDConnectorLength[0]
+ + fgkEndCapCardElectBoardLayerThickness,0.,0.);
+ electlayertrans[1]->SetTranslation(fgkEndCapCardJMDConnectorLength[0]
+ + 2.*fgkEndCapCardElectBoardLayerThickness
+ + fgkEndCapCardElectBoardBackThickness,0.,0.);
+ for(Int_t i=0; i<2; i++){
+ electlayercombitrans[i] = new TGeoCombiTrans(*electlayertrans[i],*electlayerrot);
+ mothersupplycard->AddNode(electlayer,i+1,electlayercombitrans[i]);
+ }
+ // Placing Volumes in Mother Interface Card Container
+ motherinterfacecardcontainer->AddNode(jmdconnector,1,jmdconnectorcombitrans);
+ motherinterfacecardcontainer->AddNode(electboardback,1,electboardbackcombitrans);
+ for(Int_t i=0; i<2; i++){
+ motherinterfacecardcontainer->AddNode(electlayer,i+1,electlayercombitrans[i]);
+ }
+ /////////////////////////////////////////////////////////////
+ // Generation of Card Interface Container
+ /////////////////////////////////////////////////////////////
+ Double_t stiffenertransx = fgkEndCapKaptonFoilWidth-fgkEndCapStiffenerWidth
+ - fgkEndCapCardJMDConnectorLength[0]
+ - fgkEndCapInterfaceCardBThickness
+ - 9.*fgkEndCapStripConnectionThickness
+ - 8.*fgkEndCapCardElectBoardBackThickness;
+ const Int_t kcardinterfacecontainervertexnumber = 14;
+ Double_t xcardinterfacecontainervertex[kcardinterfacecontainervertexnumber];
+ Double_t ycardinterfacecontainervertex[kcardinterfacecontainervertexnumber];
+ xcardinterfacecontainervertex[0] =-6.5*fgkEndCapCardElectBoardBackThickness
+ - 7.0*fgkEndCapStripConnectionThickness;
+ xcardinterfacecontainervertex[1] = xcardinterfacecontainervertex[0];
+ xcardinterfacecontainervertex[2] = xcardinterfacecontainervertex[1]
+ + fgkEndCapStripConnectionThickness
+ - fgkEndCapCardElectBoardLayerThickness
+ - fgkEndCapCardCableConnectorWidth[0];
+ xcardinterfacecontainervertex[3] = xcardinterfacecontainervertex[2];
+ xcardinterfacecontainervertex[4] = xcardinterfacecontainervertex[1];
+ xcardinterfacecontainervertex[5] = xcardinterfacecontainervertex[4];
+ xcardinterfacecontainervertex[6] = 1.5*fgkEndCapCardElectBoardBackThickness
+ + 2.0*fgkEndCapStripConnectionThickness;
+ xcardinterfacecontainervertex[7] = xcardinterfacecontainervertex[6];
+ xcardinterfacecontainervertex[8] = xcardinterfacecontainervertex[7]
+ + fgkEndCapInterfaceCardBThickness;
+ xcardinterfacecontainervertex[9] = xcardinterfacecontainervertex[8];
+ xcardinterfacecontainervertex[10] = xcardinterfacecontainervertex[9]
+ + fgkEndCapInterfaceElectBoardCardBThickness;
+ xcardinterfacecontainervertex[11] = xcardinterfacecontainervertex[10];
+ xcardinterfacecontainervertex[12] = xcardinterfacecontainervertex[11]
+ - fgkEndCapInterfaceElectBoardCardBThickness
+ + fgkEndCapCardJMDConnectorLength[0]
+ + stiffenertransx+fgkEndCapStiffenerWidth;
+ xcardinterfacecontainervertex[13] = xcardinterfacecontainervertex[12];
+
+ ycardinterfacecontainervertex[0] = 0.;
+ ycardinterfacecontainervertex[1] = fgkEndCapCardElectBoardLayerWidth[1]
+ + fgkEndCapCardJMDConnectorWidth[0]
+ + fgkEndCapCardJMDConnectorWidth[1];
+ ycardinterfacecontainervertex[2] = ycardinterfacecontainervertex[1];
+ ycardinterfacecontainervertex[3] = fgkEndCapCardElectBoardBackWidth[0]
+ - fgkEndCapStripConnectionWidth;
+ ycardinterfacecontainervertex[4] = ycardinterfacecontainervertex[3];
+ ycardinterfacecontainervertex[5] = fgkEndCapCardElectBoardBackWidth[0];
+ ycardinterfacecontainervertex[6] = ycardinterfacecontainervertex[5];
+ ycardinterfacecontainervertex[7] = fgkEndCapInterfaceCardBWidth[0]
+ + fgkEndCapInterfaceCardBWidth[1]
+ + fgkEndCapInterfaceCardBWidth[2];
+ ycardinterfacecontainervertex[8] = ycardinterfacecontainervertex[7];
+ ycardinterfacecontainervertex[9] = yelectboardcardBvertex[3];
+ ycardinterfacecontainervertex[10] = ycardinterfacecontainervertex[9];
+ ycardinterfacecontainervertex[11] = ycardinterfacecontainervertex[1];
+ ycardinterfacecontainervertex[12] = ycardinterfacecontainervertex[11];
+ ycardinterfacecontainervertex[13] = ycardinterfacecontainervertex[0];
+
+ TGeoXtru* interfacecardmothershape = new TGeoXtru(2);
+ interfacecardmothershape->DefinePolygon(kcardinterfacecontainervertexnumber,
+ xcardinterfacecontainervertex,
+ ycardinterfacecontainervertex);
+ interfacecardmothershape->DefineSection(0,-1.e-15-0.5*(fgkEndCapStiffenerLength
+ - fgkEndCapCardElectBoardBackLength[0]));
+ interfacecardmothershape->DefineSection(1,0.5*(fgkEndCapStiffenerLength
+ + fgkEndCapCardElectBoardBackLength[0]));
+ TGeoVolume** cardinterfacecontainer;
+ cardinterfacecontainer = new TGeoVolume*[4];
+ cardinterfacecontainer[0] = new TGeoVolume("EndCapCardsContainerLayer5Sx",
+ interfacecardmothershape,fSSDAir);
+ cardinterfacecontainer[1] = new TGeoVolume("EndCapCardsContainerLayer5Dx",
+ interfacecardmothershape,fSSDAir);
+ cardinterfacecontainer[2] = new TGeoVolume("EndCapCardsContainerLayer6Sx",
+ interfacecardmothershape,fSSDAir);
+ cardinterfacecontainer[3] = new TGeoVolume("EndCapCardsContainerLayer6Dx",
+ interfacecardmothershape,fSSDAir);
+ /////////////////////////////////
+ // cardinterfacecontainer[0]: Card Container End Cap Layer 5 Bellegarde Side
+ // cardinterfacecontainer[1]: Card Container End Cap Layer 5 Gex Side
+ // cardinterfacecontainer[2]: Card Container End Cap Layer 6 Bellegarde Side
+ // cardinterfacecontainer[3]: Card Container End Cap Layer 6 Gex Side
+ /////////////////////////////////
+ TGeoRotation* endcapstripconnectionrot[2];
+ for(Int_t i=0; i<2; i++) endcapstripconnectionrot[i] = new TGeoRotation();
+ endcapstripconnectionrot[0]->SetAngles(0.,90.,0.);
+ endcapstripconnectionrot[1]->SetAngles(90.,90.,-90.);
+ TGeoHMatrix* endcapstripconnectionmatrix = new TGeoHMatrix((*endcapstripconnectionrot[1])
+ * (*endcapstripconnectionrot[0]));
+ TGeoTranslation* endcapstripconnectiontrans = new TGeoTranslation();
+ endcapstripconnectiontrans->SetTranslation(-endcapstripconnectionshape->GetDY()
+ -0.5*fgkEndCapCardElectBoardBackThickness,
+ fgkEndCapCardElectBoardBackWidth[0]
+ -endcapstripconnectionshape->GetDZ(),
+ 0.5*fgkEndCapCardElectBoardBackLength[0]);
+ endcapstripconnectionmatrix->MultiplyLeft(endcapstripconnectiontrans);
+ TGeoTranslation* cardinterfacetrans[9];
+ TGeoHMatrix* cardinterfacematrix[9];
+ for(Int_t i=0; i<7; i++){
+ cardinterfacetrans[i] = new TGeoTranslation(-i*(fgkEndCapStripConnectionThickness
+ + fgkEndCapCardElectBoardBackThickness),
+ 0.0,0.0);
+ cardinterfacematrix[i] = new TGeoHMatrix((*cardinterfacetrans[i])
+ * (*endcapstripconnectionmatrix));
+ }
+ cardinterfacetrans[7] = new TGeoTranslation((fgkEndCapStripConnectionThickness
+ + fgkEndCapCardElectBoardBackThickness),
+ 0.0,0.0);
+ cardinterfacematrix[7] = new TGeoHMatrix((*cardinterfacetrans[7])
+ * (*endcapstripconnectionmatrix));
+ cardinterfacetrans[8] = new TGeoTranslation(2.*(fgkEndCapStripConnectionThickness
+ + fgkEndCapCardElectBoardBackThickness),
+ 0.0,0.0);
+ cardinterfacematrix[8] = new TGeoHMatrix((*cardinterfacetrans[8])
+ * (*endcapstripconnectionmatrix));
+
+ for(Int_t i=0; i<4; i++){
+ cardinterfacecontainer[i]->AddNode(endcapstripconnection,1,
+ cardinterfacematrix[7]);
+ cardinterfacecontainer[i]->AddNode(endcapstripconnection,2,
+ cardinterfacematrix[8]);
+ }
+ TGeoTranslation* mothersupplycardtrans =
+ new TGeoTranslation(-0.5*(fgkEndCapCardElectBoardBackThickness
+ + 2.*fgkEndCapCardJMDConnectorLength[0]
+ + 2.*fgkEndCapCardElectBoardLayerThickness),0.0,0.0);
+ TGeoHMatrix* mothersupplycardmatrix[7];
+ Int_t index[4] = {1,1,1,1};
+ for(Int_t i=0; i<7; i++){
+ mothersupplycardmatrix[i] = new TGeoHMatrix((*cardinterfacetrans[i])
+ * (*mothersupplycardtrans));
+ for(Int_t j=0; j<4; j++){
+ switch(j){
+ case 0: //Layer5 EndCap Left Side
+ cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
+ cardinterfacematrix[i]);
+ if(i!=0){
+ cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
+ mothersupplycardmatrix[i]);
+ index[j]++;
+
+ }
+ break;
+ case 1: //Layer5 EndCap Rigth Side
+ cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
+ cardinterfacematrix[i]);
+ if(i>0&&i<6){
+ cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
+ mothersupplycardmatrix[i]);
+ index[j]++;
+ }
+ break;
+ case 2: //Layer6 EndCap Left Side
+ cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
+ cardinterfacematrix[i]);
+ if(i!=6){
+ cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
+ mothersupplycardmatrix[i]);
+ index[j]++;
+ }
+ break;
+ case 3: //Layer6 EndCap Right Side
+ cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
+ cardinterfacematrix[i]);
+ cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
+ mothersupplycardmatrix[i]);
+ index[j]++;
+ break;
+ }
+ }
+ }
+ // Positioning Interface
+ TGeoTranslation* motherinterfacecardtrans =
+ new TGeoTranslation( -fgkEndCapCardJMDConnectorLength[0]
+ +0.5*fgkEndCapCardElectBoardBackThickness
+ -fgkEndCapCardElectBoardLayerThickness
+ +fgkEndCapStripConnectionThickness,0.,0.);
+ for(Int_t i=0; i<4; i++) cardinterfacecontainer[i]->AddNode(
+ motherinterfacecardcontainer,i+1,motherinterfacecardtrans);
+ // Positioning Interface Card B
+ TGeoTranslation* interfacecardBmothertrans =
+ new TGeoTranslation(0.5 * fgkEndCapCardElectBoardBackThickness
+ + 2.*fgkEndCapStripConnectionThickness
+ + fgkEndCapCardElectBoardBackThickness,0.,
+ -0.5 * (fgkEndCapInterfaceCardBLength[1]
+ - fgkEndCapCardElectBoardBackLength[0]));
+ for(Int_t i=0; i<4; i++) cardinterfacecontainer[i]->AddNode(interfacecardBmother,1,
+ interfacecardBmothertrans);
+ // Positioning Stiffener
+ TGeoTranslation* endcapstiffenertrans =
+ new TGeoTranslation(1.5*fgkEndCapCardElectBoardBackThickness
+ + 2.0*fgkEndCapStripConnectionThickness
+ + fgkEndCapInterfaceCardBThickness
+ + fgkEndCapCardJMDConnectorLength[0]
+ + stiffenertransx
+ + endcapstiffenershape->GetDX(),endcapstiffenershape->GetDY(),
+ endcapstiffenershape->GetDZ()
+ - 0.5*(fgkEndCapStiffenerLength
+ - fgkEndCapCardElectBoardBackLength[0]));
+ for(Int_t i=0; i<4; i++) cardinterfacecontainer[i]->AddNode(endcapstiffener,1,endcapstiffenertrans);
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ delete interfacecardBrot;
+ delete interfacecardBtrans;
+ delete electboardcardBtrans;
+ delete electboardcardBrot;
+ delete jmdconnectorcardBrot;
+ for(Int_t i=0; i<3; i++) delete jmdconnectorcardBtrans[i];
+ delete jmdconnectorot;
+ delete jmdconnectortrans[1];
+ for(Int_t i=0; i<2; i++) delete cableconnectorot[i];
+ delete cableconnectorcombitrans;
+ delete electboardbacktrans;
+ delete electboardbackrot;
+ delete electlayerrot;
+ for(Int_t i=0; i<2; i++) delete electlayertrans[i];
+ for(Int_t i=0; i<2; i++) delete endcapstripconnectionrot[i];
+ delete mothersupplycardtrans;
+ for(Int_t i=0; i<7; i++) delete cardinterfacetrans[i];
+ /////////////////////////////////////////////////////////////
+ return cardinterfacecontainer;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume** AliITSv11GeometrySSD::GetEndCapAssembly(){
+ /////////////////////////////////////////////////////////////
+ // Method returning EndCap Mother Volume
+ /////////////////////////////////////////////////////////////
+ const Int_t kendcapcoverplatesmallholenumber = 9;
+ Double_t endcapmotherorigin[3];
+ endcapmotherorigin[0] = -fgkEndCapCoverPlateLength[0]
+ + 0.5 *(fgkEndCapCoverPlateLength[3]
+ + 2.0 * fgkEndCapCoverPlateLength[2]);
+ endcapmotherorigin[1] = - 0.5 * (fgkEndCapCoverPlateWidth[0]
+ - fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2])
+ + 0.5*(fgkEndCapSideCoverLength[2]
+ + fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0])
+ - (fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]);
+ endcapmotherorigin[2] = 0.5*fgkEndCapCoverPlateThickness
+ + 2.*fgkEndCapCoolingTubeRadiusMax
+ - 0.5*(2.*fgkEndCapCoolingTubeRadiusMax
+ + fgkEndCapSideCoverWidth[1]
+ + fgkEndCapSideCoverThickness
+ + fgkEndCapKaptonFoilThickness);
+ TGeoBBox* endcapmothershape = new TGeoBBox(0.5*(fgkEndCapCoverPlateLength[3]
+ + 2.0* fgkEndCapCoverPlateLength[2]
+ + 2.0* fgkEndCapSideCoverThickness),
+ 0.5* (fgkEndCapSideCoverLength[2]
+ + fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]),
+ 0.5* (2.*fgkEndCapCoolingTubeRadiusMax
+ + fgkEndCapSideCoverWidth[1]
+ + fgkEndCapSideCoverThickness
+ + fgkEndCapKaptonFoilThickness),
+ endcapmotherorigin);
+ TGeoVolume** endcapassembly;
+ endcapassembly = new TGeoVolume*[4];
+ endcapassembly[0] = new TGeoVolume("EndCapContainerLayer5Sx",
+ endcapmothershape,fSSDAir);
+ endcapassembly[1] = new TGeoVolume("EndCapContainerLayer5Dx",
+ endcapmothershape,fSSDAir);
+ endcapassembly[2] = new TGeoVolume("EndCapContainerLayer6Sx",
+ endcapmothershape,fSSDAir);
+ endcapassembly[3] = new TGeoVolume("EndCapContainerLayer6Dx",
+ endcapmothershape,fSSDAir);
+ /////////////////////////////////
+ // endcapassembly[0]: Container End Cap Layer 5 Bellegarde Side
+ // endcapassembly[1]: Container End Cap Layer 5 Gex Side
+ // endcapassembly[2]: Container End Cap Layer 6 Bellegarde Side
+ // endcapassembly[3]: Container End Cap Layer 6 Gex Side
+ /////////////////////////////////
+ /////////////////////////////////////////////////////
+ // Placing Endcap Cover Plate
+ /////////////////////////////////////////////////////
+ TGeoVolume* endcapcoverplate = GetEndCapCoverPlate();
+ TGeoRotation* endcapcoverplaterot = new TGeoRotation();
+ endcapcoverplaterot->SetAngles(90.0,180.0,-90.0);
+ TGeoCombiTrans* endcapcoverplatecombitrans =
+ new TGeoCombiTrans(-0.5*fgkEndCapCoverPlateLength[1],0.,0.,
+ endcapcoverplaterot);
+ TGeoTranslation* endcapcoverplatetrans =
+ new TGeoTranslation(1.5*fgkEndCapCoverPlateLength[1],0.,0.);
+ TGeoHMatrix* endcapcoverplatematrix =
+ new TGeoHMatrix((*endcapcoverplatetrans)
+ * (*endcapcoverplatecombitrans));
+ for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapcoverplate,1,endcapcoverplatematrix);
+ /////////////////////////////////////////////////////
+ // Placing Endcap Side Cover
+ /////////////////////////////////////////////////////
+ TGeoVolume* endcapsidecover = GetEndCapSideCover();
+ TGeoRotation* endcapsidecoverot[2];
+ TGeoCombiTrans* endcapsidecovercombitrans[3];
+ for(Int_t i=0; i<2; i++) endcapsidecoverot[i] = new TGeoRotation();
+ endcapsidecoverot[0]->SetAngles(-90.,0.,0.);
+ endcapsidecovercombitrans[0] = new TGeoCombiTrans(0.0,
+ - 0.5*(fgkEndCapCoverPlateWidth[0]
+ - fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2])
+ + 0.*fgkEndCapCoverPlateWidth[0]
+ + fgkEndCapSideCoverLength[2],
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness)
+ - 0.5*fgkEndCapCoverPlateThickness,
+ endcapsidecoverot[0]);
+ endcapsidecoverot[1]->SetAngles(90.,-90.,-90.);
+ endcapsidecovercombitrans[1] = new TGeoCombiTrans(-fgkEndCapCoverPlateLength[0],0.0,
+ 0.5*fgkEndCapCoverPlateThickness
+ -fgkEndCapSideCoverWidth[1],
+ endcapsidecoverot[1]);
+ endcapsidecovercombitrans[2] = new TGeoCombiTrans(-fgkEndCapCoverPlateLength[0]
+ +fgkEndCapCoverPlateLength[3]
+ +2.*fgkEndCapCoverPlateLength[2]
+ +fgkEndCapSideCoverThickness,0.0,
+ 0.5*fgkEndCapCoverPlateThickness
+ -fgkEndCapSideCoverWidth[1],
+ endcapsidecoverot[1]);
+ TGeoHMatrix* endcapsidecovermatrix[2];
+ for(Int_t i=0; i<2; i++){
+ endcapsidecovermatrix[i] = new TGeoHMatrix((*endcapsidecovercombitrans[i+1])
+ * (*endcapsidecovercombitrans[0]));
+ for(Int_t k=0; k<4; k++) endcapassembly[k]->AddNode(endcapsidecover,i+1,
+ endcapsidecovermatrix[i]);
+ }
+ /////////////////////////////////////////////////////
+ // Placing Endcap Cooling Tube
+ /////////////////////////////////////////////////////
+ TGeoVolume* endcapcoolingtube = GetEndCapCoolingTube();
+ TGeoRotation* endcapcoolingtuberot = new TGeoRotation();
+ endcapcoolingtuberot->SetAngles(0.,180.,0.);
+ TGeoCombiTrans* endcapccolingtubecombitrans
+ = new TGeoCombiTrans(-0.5*(fgkEndCapCoolingTubeAxialRadius[0]
+ + fgkEndCapCoolingTubeAxialRadius[1])
+ + fgkEndCapCoverPlateLength[0]+fgkEndCapCoverPlateLength[1]
+ - fgkEndCapCoolingTubeToCoverSide,
+ fgkEndCapCoolingTubeAxialRadius[0],fgkEndCapCoolingTubeRadiusMax
+ + 0.5*fgkEndCapCoverPlateThickness,endcapcoolingtuberot);
+ for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapcoolingtube,1,
+ endcapccolingtubecombitrans);
+ /////////////////////////////////////////////////////
+ // Placing Screws
+ /////////////////////////////////////////////////////
+ Double_t screwcoverplateradius[2] = {fgkEndCapCoverPlateScrewRadiusMax,
+ fgkEndCapCoverPlateScrewRadiusMin};
+ Int_t screwcoverplatedgesnumber[2] = {20,20};
+ Double_t screwcoverplatesection[2] = {0.5*fgkEndCapCoverPlateThickness,
+ fgkEndCapCoverPlateThickness
+ + fgkEndCapCoolingTubeRadiusMax};
+ TGeoShape* screwcoverplateshape = GetScrewShape(screwcoverplateradius,
+ screwcoverplatedgesnumber,
+ screwcoverplatesection);
+ TGeoVolume* screwcoverplate = new TGeoVolume("EndCapScrewCoverPlate",
+ screwcoverplateshape,
+ fSSDCoolingTubePhynox);
+ screwcoverplate->SetLineColor(12);
+ Double_t transx[4] = {0,
+ fgkEndCapCoverPlateSmallHoleSeparation[0],
+ fgkEndCapCoverPlateSmallHoleSeparation[0]
+ + fgkEndCapCoverPlateSmallHoleSeparation[1],
+ 2.*fgkEndCapCoverPlateSmallHoleSeparation[0]
+ + fgkEndCapCoverPlateSmallHoleSeparation[1]};
+ const Int_t kendcapcoverplatescrewnumber[2] = {4,9};
+// TGeoTranslation** endcapcoverplatescrewtrans[kendcapcoverplatescrewnumber[0]];
+ TGeoTranslation*** endcapcoverplatescrewtrans;
+ endcapcoverplatescrewtrans = new TGeoTranslation**[kendcapcoverplatescrewnumber[0]];
+ Int_t index = 0;
+ for(Int_t i=0; i<kendcapcoverplatescrewnumber[0]; i++){
+ endcapcoverplatescrewtrans[i] =
+ new TGeoTranslation*[kendcapcoverplatescrewnumber[1]];
+ for(Int_t j=0; j<kendcapcoverplatescrewnumber[1]; j++){
+ index = kendcapcoverplatescrewnumber[1]*i+j+1;
+ if(index==1||index==9||index==28||index==36){
+ endcapcoverplatescrewtrans[i][j] =
+ new TGeoTranslation(transx[i],
+ j*fgkEndCapCoverPlateSmallHoleSeparation[2],
+ fgkEndCapSideCoverThickness);
+ }
+ else{
+ endcapcoverplatescrewtrans[i][j] =
+ new TGeoTranslation(transx[i],
+ j*fgkEndCapCoverPlateSmallHoleSeparation[2],
+ 0.);
+ }
+ if(index!=19)
+ for(Int_t k=0; k<4; k++) endcapassembly[k]->AddNode(screwcoverplate,index,
+ endcapcoverplatescrewtrans[i][j]);
+ }
+ }
+ /////////////////////////////////////////////////////
+ // Placing Cover Plate Clips
+ /////////////////////////////////////////////////////
+ TGeoBBox* endcapcoverplateclipshape = new TGeoBBox(0.5*fgkEndCapCoverPlateClipLength,
+ 0.5*fgkEndCapCoverPlateClipWidth,
+ 0.5*fgkEndCapSideCoverThickness);
+ TGeoVolume* endcapcoverplateclip = new TGeoVolume("EndCapCoverPlateUpClip",
+ endcapcoverplateclipshape,
+ fSSDCoolingTubePhynox);
+ TGeoBBox* endcapcoverplatedownclipshape = new TGeoBBox(0.5*fgkEndCapCoverPlateDownClipLength,
+ 0.5*fgkEndCapCoverPlateDownClipWidth,
+ 0.5*fgkEndCapSideCoverThickness);
+ TGeoVolume* endcapcoverplatedownclip = new TGeoVolume("EndCapCoverPlateDownClip",
+ endcapcoverplatedownclipshape,
+ fSSDCoolingTubePhynox);
+ TGeoTranslation* endcapcoverplatecliptrans[4];
+ endcapcoverplatecliptrans[0] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
+ - fgkEndCapCoverPlateLength[0]
+ - fgkEndCapSideCoverThickness,
+ 0.0,
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness));
+ endcapcoverplatecliptrans[1] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
+ - fgkEndCapCoverPlateLength[0]
+ - fgkEndCapSideCoverThickness,
+ (kendcapcoverplatescrewnumber[1]-1)
+ * fgkEndCapSideCoverWidth[5],
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness));
+ endcapcoverplatecliptrans[2] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
+ - fgkEndCapCoverPlateLength[0]
+ + fgkEndCapCoverPlateLength[1]
+ + 2.*fgkEndCapCoverPlateLength[0]
+ - fgkEndCapCoverPlateClipLength
+ + fgkEndCapSideCoverThickness,
+ 0.0,
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness));
+ endcapcoverplatecliptrans[3] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
+ - fgkEndCapCoverPlateLength[0]
+ + fgkEndCapCoverPlateLength[1]
+ + 2.*fgkEndCapCoverPlateLength[0]
+ - fgkEndCapCoverPlateClipLength
+ + fgkEndCapSideCoverThickness,
+ (kendcapcoverplatescrewnumber[1]-1)
+ * fgkEndCapSideCoverWidth[5],
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness));
+ endcapcoverplateclip->SetLineColor(fColorPhynox);
+ endcapcoverplatedownclip->SetLineColor(fColorPhynox);
+ for(Int_t i=0; i<4; i++)
+ for(Int_t j=0; j<4; j++) endcapassembly[j]->AddNode(endcapcoverplateclip,i+1,
+ endcapcoverplatecliptrans[i]);
+ TGeoTranslation* endcapcoverplatedowncliptrans[4];
+ endcapcoverplatedowncliptrans[0] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
+ - fgkEndCapCoverPlateLength[0]
+ - fgkEndCapSideCoverThickness,
+ 0.5*(fgkEndCapCoverPlateDownClipWidth
+ - fgkEndCapCoverPlateClipWidth),
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness)
+ - fgkEndCapSideCoverWidth[1]
+ - fgkEndCapSideCoverThickness);
+ endcapcoverplatedowncliptrans[1] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
+ - fgkEndCapCoverPlateLength[0]
+ - fgkEndCapSideCoverThickness,
+ 0.5*(fgkEndCapCoverPlateDownClipWidth
+ - fgkEndCapCoverPlateClipWidth)
+ + fgkEndCapSideCoverLength[2]
+ - fgkEndCapCoverPlateDownClipWidth,
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness)
+ - fgkEndCapSideCoverWidth[1]
+ - fgkEndCapSideCoverThickness);
+ endcapcoverplatedowncliptrans[2] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
+ - fgkEndCapCoverPlateLength[0]
+ + fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateLength[1]
+ + 2.0*fgkEndCapCoverPlateLength[0]
+ - fgkEndCapCoverPlateDownClipLength,
+ 0.5*(fgkEndCapCoverPlateDownClipWidth
+ - fgkEndCapCoverPlateClipWidth),
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness)
+ - fgkEndCapSideCoverWidth[1]
+ - fgkEndCapSideCoverThickness);
+ endcapcoverplatedowncliptrans[3] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
+ - fgkEndCapCoverPlateLength[0]
+ + fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateLength[1]
+ + 2.0*fgkEndCapCoverPlateLength[0]
+ - fgkEndCapCoverPlateDownClipLength,
+ 0.5*(fgkEndCapCoverPlateDownClipWidth
+ - fgkEndCapCoverPlateClipWidth)
+ + fgkEndCapSideCoverLength[2]
+ - fgkEndCapCoverPlateDownClipWidth,
+ 0.5*(fgkEndCapSideCoverThickness
+ + fgkEndCapCoverPlateThickness)
+ - fgkEndCapSideCoverWidth[1]
+ - fgkEndCapSideCoverThickness);
+ for(Int_t i=0; i<4; i++)
+ for(Int_t k=0; k<4; k++) endcapassembly[k]->AddNode(endcapcoverplatedownclip,i+1,
+ endcapcoverplatedowncliptrans[i]);
+ /////////////////////////////////////////////////////
+ // Placing Kapton Foil
+ /////////////////////////////////////////////////////
+ TGeoBBox* endcapkaptonfoilshape = new TGeoBBox(0.5*fgkEndCapKaptonFoilLength,
+ 0.5*fgkEndCapKaptonFoilWidth,
+ 0.5*fgkEndCapKaptonFoilThickness);
+ TGeoVolume* endcapkaptonfoil = new TGeoVolume("EndCapKaptonFoil",
+ endcapkaptonfoilshape,
+ fSSDKaptonFlexMedium);
+ endcapkaptonfoil->SetLineColor(8);
+ TGeoTranslation* endcapkaptonfoiltrans = new TGeoTranslation(0.5*fgkEndCapCoverPlateLength[1],
+ 0.5*fgkEndCapKaptonFoilWidth
+ - 0.5*fgkEndCapCoverPlateClipWidth,
+ 0.5*fgkEndCapCoverPlateThickness
+ - 0.5*fgkEndCapKaptonFoilThickness
+ - fgkEndCapSideCoverWidth[1]
+ - fgkEndCapSideCoverThickness);
+ for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapkaptonfoil,1,endcapkaptonfoiltrans);
+ /////////////////////////////////////////////////////////////
+ // Placing Electronic Tubes
+ /////////////////////////////////////////////////////////////
+ Double_t endcapeffectivecableswidth[2] = {fgkEndCapKaptonFoilWidth
+ - fgkEndCapInterfaceCardBThickness
+ - 9.*fgkEndCapStripConnectionThickness
+ - 8.*fgkEndCapCardElectBoardBackThickness,
+ fgkEndCapKaptonFoilWidth
+ - fgkEndCapInterfaceCardBThickness
+ - 9.*fgkEndCapStripConnectionThickness
+ - 8.*fgkEndCapCardElectBoardBackThickness
+ - fgkEndCapInterfaceElectBoardCardBThickness};
+ TGeoVolume* endcapeffectivecables[2];
+ endcapeffectivecables[0] = GetEndCapEffectiveCables(fgkEndCapEffectiveCableRadiusMin,
+ fgkEndCapEffectiveCableRadiusMax,
+ endcapeffectivecableswidth[0],
+ 10,"EndCapEffectiveCables1");
+ endcapeffectivecables[1] = GetEndCapEffectiveCables(fgkEndCapEffectiveCableRadiusMin,
+ fgkEndCapEffectiveCableRadiusMax,
+ endcapeffectivecableswidth[1],
+ 25,"EndCapEffectiveCables2");
+ TGeoRotation* endcapeffectivecablesrot = new TGeoRotation();
+ TGeoTranslation* endcapeffectivecablestrans[2];
+ endcapeffectivecablestrans[0] = new TGeoTranslation(0.5*fgkEndCapCoverPlateLength[1],
+ - 0.5*endcapeffectivecableswidth[0]
+ - 0.5*(fgkEndCapCoverPlateWidth[0]
+ - fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2])
+ + fgkEndCapSideCoverLength[2],
+ - 0.5*fgkEndCapCoverPlateThickness
+ - (fgkEndCapCardElectBoardBackWidth[0]
+ - fgkEndCapInterfaceCardBWidth[0]
+ - fgkEndCapInterfaceCardBWidth[1]));
+ endcapeffectivecablestrans[1] = new TGeoTranslation(0.5*fgkEndCapCoverPlateLength[1],
+ - 0.5*endcapeffectivecableswidth[1]
+ - 0.5*(fgkEndCapCoverPlateWidth[0]
+ - fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2])
+ + fgkEndCapSideCoverLength[2],
+ - 0.5*fgkEndCapCoverPlateThickness
+ - (fgkEndCapCardElectBoardBackWidth[0]
+ - fgkEndCapInterfaceCardBWidth[0])
+ - 0.5*fgkEndCapInterfaceCardBWidth[2]);
+ endcapeffectivecablesrot->SetAngles(0.,90.,0.);
+ TGeoCombiTrans* endcapeffectivecablescombitrans[2];
+ endcapeffectivecablescombitrans[0] = new TGeoCombiTrans(*endcapeffectivecablestrans[0],
+ *endcapeffectivecablesrot);
+ endcapeffectivecablescombitrans[1] = new TGeoCombiTrans(*endcapeffectivecablestrans[1],
+ *endcapeffectivecablesrot);
+// for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[0],1,
+// endcapeffectivecablescombitrans[0]);
+ for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[1],1,
+ endcapeffectivecablescombitrans[1]);
+ /////////////////////////////////////////////////////////////
+ // Placing End Cap Cards
+ /////////////////////////////////////////////////////////////
+ TGeoVolume** endcapcards = GetEndCapCards();
+ TGeoRotation* endcapcardsrot[2];
+ for(Int_t i=0; i<2; i++) endcapcardsrot[i] = new TGeoRotation();
+ endcapcardsrot[0]->SetAngles(90.,0.,0.);
+ TGeoTranslation* endcapcardstrans[2];
+ endcapcardstrans[0] = new TGeoTranslation(0.,0.,0.5*(fgkEndCapInterfaceCardBLength[1]
+ - fgkEndCapCardElectBoardBackLength[0]));
+ TGeoCombiTrans* endcapcardscombitrans = new TGeoCombiTrans(*endcapcardstrans[0],*endcapcardsrot[0]);
+ endcapcardsrot[1]->SetAngles(90.,90.,-90.);
+ TGeoHMatrix* endcapcardsmatrix[2];
+ endcapcardsmatrix[0] = new TGeoHMatrix((*endcapcardsrot[1])*(*endcapcardscombitrans));
+ Double_t stiffenertransx = fgkEndCapKaptonFoilWidth-fgkEndCapStiffenerWidth
+ - fgkEndCapCardJMDConnectorLength[0]
+ - fgkEndCapInterfaceCardBThickness
+ - 9.*fgkEndCapStripConnectionThickness
+ - 8.*fgkEndCapCardElectBoardBackThickness;
+ endcapcardstrans[1] = new TGeoTranslation(-0.5*fgkEndCapStiffenerLength
+ - fgkEndCapCoverPlateLength[0]
+ + 0.5 * (fgkEndCapCoverPlateLength[3]
+ + 2.0 * fgkEndCapCoverPlateLength[2]),
+ - stiffenertransx-fgkEndCapStiffenerWidth
+ - fgkEndCapCardJMDConnectorLength[0]
+ - fgkEndCapInterfaceCardBThickness
+ - 2.0 * fgkEndCapStripConnectionThickness
+ - 1.5 * fgkEndCapInterfaceCardBThickness
+ - 0.5 * (fgkEndCapCoverPlateWidth[0]
+ - fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2])
+ + fgkEndCapKaptonFoilWidth,
+ 0.5*fgkEndCapCoverPlateThickness
+ - fgkEndCapSideCoverWidth[1]);
+ endcapcardsmatrix[1] = new TGeoHMatrix((*endcapcardstrans[1])*(*endcapcardsmatrix[0]));
+ for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapcards[i],1,endcapcardsmatrix[1]);
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ delete endcapcoverplaterot;
+ delete endcapcoverplatecombitrans;
+ delete endcapcoverplatetrans;
+ for(Int_t i=0; i<3; i++){
+ delete endcapsidecovercombitrans[i];
+ if(i<2) delete endcapsidecoverot[i];
+ }
+ for(Int_t i=0; i<2; i++) delete endcapcardsrot[i];
+ for(Int_t i=0; i<2; i++) delete endcapcardstrans[i];
+ delete endcapcardsmatrix[0];
+ return endcapassembly;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume* AliITSv11GeometrySSD::GetEndCapEffectiveCables(Double_t radiusmin,
+ Double_t radiusmax,
+ Double_t width,
+ Int_t ncables,
+ const char* volname){
+ /////////////////////////////////////////////////////////////
+ // Generating EndCap High Voltage Tubes
+ /////////////////////////////////////////////////////////////
+ Double_t effectiveinneradius = TMath::Sqrt(ncables)*radiusmin;
+ Double_t effectiveouteradius = TMath::Sqrt(effectiveinneradius*effectiveinneradius+(radiusmax-radiusmin)*(radiusmax-radiusmin));
+
+ TGeoTube* effectiveinnertubeshape = new TGeoTube(0.,effectiveinneradius,0.5*width);
+ TGeoTube* effectiveoutertubeshape = new TGeoTube(effectiveinneradius,
+ effectiveouteradius,0.5*width);
+ TGeoVolume* effectiveinnertube = new TGeoVolume("EffectiveEndCapInnerTube",
+ effectiveinnertubeshape,
+ fSSDStiffenerConnectorMedium);
+ effectiveinnertube->SetLineColor(41);
+ TGeoVolume* effectiveoutertube = new TGeoVolume("EffectiveEndCapOuterTube",
+ effectiveoutertubeshape,
+ fSSDKaptonChipCableMedium);
+ effectiveoutertube->SetLineColor(39);
+ TGeoTube* effectivemothertubeshape = new TGeoTube(0.,effectiveouteradius,0.5*width);
+ TGeoVolume* effectivemothertube = new TGeoVolume(volname,effectivemothertubeshape,fSSDAir);
+ effectivemothertube->AddNode(effectiveinnertube,1);
+ effectivemothertube->AddNode(effectiveoutertube,1);
+ return effectivemothertube;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume** AliITSv11GeometrySSD::EndCapSupport(){
+ /////////////////////////////////////////////////////////////
+ // Generating EndCap Support Layer 5 and Layer 6
+ /////////////////////////////////////////////////////////////
+ const Int_t knedges = 5;
+ ///////////////////////////////////////////////
+ // Setting the vertices for TGeoXtru Up Volume
+ ///////////////////////////////////////////////
+ const Int_t klayernumber = 2;
+ Double_t xupvertex[klayernumber][knedges+3];
+ Double_t yupvertex[klayernumber][knedges+3];
+ Double_t upedgeangle[klayernumber] = {360./fgkSSDLay5LadderNumber,360./fgkSSDLay6LadderNumber};
+ Double_t middledgeangle[klayernumber] = {0.0,0.0};
+ Double_t middlepsi[klayernumber] = {0.0,0.0};
+ for(Int_t i=0; i<klayernumber; i++){
+ xupvertex[i][0] = -fgkEndCapSupportMiddleRadius[i]*SinD(0.5*upedgeangle[i]);
+ xupvertex[i][1] = -0.5*fgkEndCapSupportLength[i];
+ xupvertex[i][2] = -xupvertex[i][1];
+ xupvertex[i][3] = -xupvertex[i][0];
+
+ yupvertex[i][0] = fgkEndCapSupportMiddleRadius[i]*CosD(0.5*upedgeangle[i]);
+ yupvertex[i][1] = 0.5*fgkEndCapSupportLength[i]/TanD(0.5*upedgeangle[i]);
+ yupvertex[i][2] = yupvertex[i][1];
+ yupvertex[i][3] = yupvertex[i][0];
+
+ middledgeangle[i] = upedgeangle[i]/knedges;
+ middlepsi[i] = 90.0-0.5*upedgeangle[i];
+ for(Int_t j=1; j<knedges; j++){
+ xupvertex[i][j+3] = fgkEndCapSupportMiddleRadius[i]*CosD(middlepsi[i]+j*middledgeangle[i]);
+ yupvertex[i][j+3] = fgkEndCapSupportMiddleRadius[i]*SinD(middlepsi[i]+j*middledgeangle[i]);
+ }
+ }
+ ////////////////////////////////////
+ // Generating Up TGeoXtru
+ ////////////////////////////////////
+ TGeoXtru* upendcapsupportshape[klayernumber];
+ TGeoVolume* upendcapsupport[klayernumber];
+ char upendcapsupportname[100];
+ for(Int_t i=0; i<klayernumber; i++){
+ upendcapsupportshape[i] = new TGeoXtru(2);
+ snprintf(upendcapsupportname,100,"UpEndCapSupportPieceLayer%i",i+5);
+ upendcapsupportshape[i]->DefinePolygon(knedges+3,xupvertex[i],yupvertex[i]);
+ upendcapsupportshape[i]->DefineSection(0,0.);
+ upendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
+ upendcapsupport[i] = new TGeoVolume(upendcapsupportname,upendcapsupportshape[i],
+ fSSDSupportRingAl);
+ upendcapsupport[i]->SetLineColor(5);
+ }
+ ///////////////////////////////////////////////
+ // Setting the vertices for TGeoXtru Down Volume
+ ///////////////////////////////////////////////
+ Double_t xdownvertex[klayernumber][2*(knedges+1)];
+ Double_t ydownvertex[klayernumber][2*(knedges+1)];
+ for(Int_t i=0; i<klayernumber; i++){
+ xdownvertex[i][0] = -fgkEndCapSupportLowRadius[i]*SinD(0.5*upedgeangle[i]);
+ xdownvertex[i][1] = xupvertex[i][0];
+ ydownvertex[i][0] = fgkEndCapSupportLowRadius[i]*CosD(0.5*upedgeangle[i]);
+ ydownvertex[i][1] = yupvertex[i][0];
+ for(Int_t j=0; j<knedges; j++){
+ xdownvertex[i][j+2] = xupvertex[i][knedges+2-j];
+ ydownvertex[i][j+2] = yupvertex[i][knedges+2-j];
+ }
+ for(Int_t j=0; j<knedges; j++){
+ xdownvertex[i][knedges+j+2] = fgkEndCapSupportLowRadius[i]
+ * CosD(middlepsi[i]+j*middledgeangle[i]);
+ ydownvertex[i][knedges+j+2] = fgkEndCapSupportLowRadius[i]
+ * SinD(middlepsi[i]+j*middledgeangle[i]);
+ }
+ }
+ ////////////////////////////////////
+ // Generating Down TGeoXtru
+ ////////////////////////////////////
+ TGeoXtru* downendcapsupportshape[klayernumber];
+ TGeoVolume* downendcapsupport[klayernumber];
+ char downendcapsupportname[100];
+ for(Int_t i=0; i<klayernumber; i++){
+ downendcapsupportshape[i] = new TGeoXtru(2);
+ snprintf(downendcapsupportname,100,"DownEndCapSupportPieceLayer%i",i+5);
+ downendcapsupportshape[i] = new TGeoXtru(2);
+ downendcapsupportshape[i]->DefinePolygon(2*(knedges+1),xdownvertex[i],ydownvertex[i]);
+ if(i==0){
+ downendcapsupportshape[i]->DefineSection(0,0.);
+ downendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportLowWidth[i]);
+ }
+ else{
+ downendcapsupportshape[i]->DefineSection(0,fgkEndCapSupportHighWidth
+ - fgkEndCapSupportLowWidth[i]);
+ downendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
+ }
+ downendcapsupport[i] = new TGeoVolume(downendcapsupportname,
+ downendcapsupportshape[i],fSSDSupportRingAl);
+ downendcapsupport[i]->SetLineColor(5);
+ }
+ ///////////////////////////////////////////////
+ // Setting TGeoPgon Volume
+ ///////////////////////////////////////////////
+ const Int_t kssdlayladdernumber[klayernumber] = {fgkSSDLay5LadderNumber,
+ fgkSSDLay6LadderNumber};
+ TGeoPgon* endcapsupportmothershape[klayernumber];
+ TGeoVolume** endcapsupportmother;
+ endcapsupportmother = new TGeoVolume*[klayernumber];
+ char endcapsupportmothername[100];
+ for(Int_t i=0; i<klayernumber; i++){
+ endcapsupportmothershape[i] = new TGeoPgon(0.0,360.0,kssdlayladdernumber[i],2);
+ snprintf(endcapsupportmothername,100,"EndCapSupportMotherLayer%i",i+5);
+ endcapsupportmothershape[i]->DefineSection(0,0.,ydownvertex[i][0],yupvertex[i][1]);
+ endcapsupportmothershape[i]->DefineSection(1,fgkEndCapSupportHighWidth,
+ ydownvertex[i][0],yupvertex[i][1]);
+ endcapsupportmother[i] = new TGeoVolume(endcapsupportmothername,endcapsupportmothershape[i],
+ fSSDAir);
+ }
+ ////////////////////////////////////
+ TGeoRotation** endcapsupportrot[klayernumber];
+ for(Int_t i=0; i<2; i++){
+ endcapsupportrot[i] = new TGeoRotation*[kssdlayladdernumber[i]];
+ for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
+ endcapsupportrot[i][j] = new TGeoRotation();
+ endcapsupportrot[i][j]->SetAngles(j*upedgeangle[i],0.,0.);
+ endcapsupportmother[i]->AddNode(upendcapsupport[i],j+1,endcapsupportrot[i][j]);
+ endcapsupportmother[i]->AddNode(downendcapsupport[i],j+1,endcapsupportrot[i][j]);
+ }
+ }
+ return endcapsupportmother;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SetEndCapSupportAssembly(){
+ /////////////////////////////////////////////////////////////
+ // Setting End Cap Support Layer 5 and 6.
+ /////////////////////////////////////////////////////////////
+ const Int_t kendcapcoverplatesmallholenumber = 9;
+ const Int_t klayernumber = 2;
+ const Int_t kssdlayladdernumber[klayernumber] = {fgkSSDLay5LadderNumber,
+ fgkSSDLay6LadderNumber};
+ Double_t upedgeangle[klayernumber] = {360.0/kssdlayladdernumber[0],
+ 360.0/kssdlayladdernumber[1]};
+ TGeoVolume** endcapsupport = EndCapSupport();
+ TGeoVolume** endcapassembly = GetEndCapAssembly();
+ TGeoPgon* endcapsupportshape[klayernumber];
+ Double_t* radiusmin[klayernumber];
+ Double_t* radiusmax[klayernumber];
+ for(Int_t i=0; i<klayernumber; i++){
+ endcapsupportshape[i] = (TGeoPgon*)endcapsupport[i]->GetShape();
+ radiusmin[i] = endcapsupportshape[i]->GetRmin();
+ radiusmax[i] = endcapsupportshape[i]->GetRmax();
+ }
+ TGeoBBox* endcapassemblyshape = (TGeoBBox*)endcapassembly[0]->GetShape();
+ Double_t endcapassemblycenter[3] = {endcapassemblyshape->GetDX(),
+ endcapassemblyshape->GetDY(),
+ endcapassemblyshape->GetDZ()};
+ ///////////////////////////////////////////////
+ // Setting TGeoPgon Volume for Mother Container
+ ///////////////////////////////////////////////
+ TGeoPgon* endcapsupportsystemshape[klayernumber];
+ char endcapsupportsystemothername[100];
+ for(Int_t i=0; i<klayernumber; i++){
+ endcapsupportsystemshape[i] = new TGeoPgon(0.0,360.0,kssdlayladdernumber[i],2);
+ snprintf(endcapsupportsystemothername,100,"EndCapSupportSystemLayer%i",i+5);
+ endcapsupportsystemshape[i]->DefineSection(0,-(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]),*radiusmin[i],
+ (*radiusmax[i]*CosD(0.5*upedgeangle[i])
+ +2.*endcapassemblycenter[2])
+ /CosD(0.5*upedgeangle[i]));
+ endcapsupportsystemshape[i]->DefineSection(1,2.*endcapassemblycenter[1]
+ -(fgkEndCapCoverPlateWidth[1]
+ - fgkEndCapCoverPlateWidth[0]),
+ *radiusmin[i],
+ (*radiusmax[i]*CosD(0.5*upedgeangle[i])
+ +2.*endcapassemblycenter[2])
+ /CosD(0.5*upedgeangle[i]));
+ }
+ fgkEndCapSupportSystem = new TGeoVolume*[4];
+ fgkEndCapSupportSystem[0] = new TGeoVolume("EndCapSupportSystemLayer5Sx",
+ endcapsupportsystemshape[0],fSSDAir);
+ fgkEndCapSupportSystem[1] = new TGeoVolume("EndCapSupportSystemLayer5Dx",
+ endcapsupportsystemshape[0],fSSDAir);
+ fgkEndCapSupportSystem[2] = new TGeoVolume("EndCapSupportSystemLayer6Sx",
+ endcapsupportsystemshape[1],fSSDAir);
+ fgkEndCapSupportSystem[3] = new TGeoVolume("EndCapSupportSystemLayer6Dx",
+ endcapsupportsystemshape[1],fSSDAir);
+ ///////////////////////////////////////////////
+ TGeoTranslation* endcapassemblytrans[klayernumber];
+ for(Int_t i=0; i<klayernumber; i++)
+ endcapassemblytrans[i] = new TGeoTranslation(-fgkEndCapCoverPlateLength[0]
+ - fgkEndCapSideCoverThickness
+ + endcapassemblycenter[0],
+ - 0.5*fgkEndCapCoverPlateThickness
+ - 2.0*fgkEndCapCoolingTubeRadiusMax
+ + 2.0*endcapassemblycenter[2]
+ + 0.5*fgkEndCapSupportLength[i]
+ / TanD(0.5*upedgeangle[i]),
+ 0.5*(fgkEndCapCoverPlateWidth[0]
+ - fgkEndCapCoverPlateWidth[2]
+ - (kendcapcoverplatesmallholenumber-1)
+ * fgkEndCapCoverPlateSmallHoleSeparation[2]));
+ TGeoRotation** endcapassemblyrot[klayernumber];
+ TGeoHMatrix** endcapassemblymatrix[klayernumber];
+ for(Int_t i=0; i<klayernumber; i++){
+ endcapassemblyrot[i] = new TGeoRotation*[kssdlayladdernumber[i]+2];
+ endcapassemblymatrix[i] = new TGeoHMatrix*[kssdlayladdernumber[i]+2];
+ for(Int_t j=0; j<kssdlayladdernumber[i]+2; j++) endcapassemblyrot[i][j] = new TGeoRotation();
+ endcapassemblyrot[i][0]->SetAngles(0.,-90.,0.);
+ endcapassemblyrot[i][1]->SetAngles(90.,180.,-90.);
+ endcapassemblymatrix[i][0] = new TGeoHMatrix((*endcapassemblyrot[i][1])*(*endcapassemblyrot[i][0]));
+ endcapassemblymatrix[i][1] = new TGeoHMatrix((*endcapassemblytrans[i])*(*endcapassemblymatrix[i][0]));
+ for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
+ endcapassemblyrot[i][j+2]->SetAngles(j*upedgeangle[i],0.,0.);
+ endcapassemblymatrix[i][j+2] = new TGeoHMatrix((*endcapassemblyrot[i][j+2])*(*endcapassemblymatrix[i][1]));
+ }
+ }
+ TGeoTranslation* lay6endcapassemblytrans = new TGeoTranslation(0.,0.,
+ fgkEndCapKaptonFoilWidth-fgkEndCapSupportHighWidth);
+ for(Int_t i=0; i<2*klayernumber; i++){
+ for(Int_t j=0; j<(i<2? kssdlayladdernumber[0]:kssdlayladdernumber[1]); j++){
+ fgkEndCapSupportSystem[i]->AddNode(endcapassembly[i],j+1,i<2?endcapassemblymatrix[0][j+2]:
+ endcapassemblymatrix[1][j+2]);
+ }
+ fgkEndCapSupportSystem[i]->AddNode(i<2?endcapsupport[0]:endcapsupport[1],1,i<2?0:lay6endcapassemblytrans);
+ }
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ for(Int_t i=0; i<klayernumber; i++){
+ for(Int_t j=0; j<kssdlayladdernumber[i]+2; j++){
+ delete endcapassemblyrot[i][j];
+ }
+ delete [] endcapassemblyrot[i];
+ delete endcapassemblymatrix[i][0];
+ delete endcapassemblymatrix[i][1];
+ }
+ /////////////////////////////////////////////////////////////
+ }
+ void AliITSv11GeometrySSD::EndCapSupportSystemLayer5(TGeoVolume* moth){
+ /////////////////////////////////////////////////////////////
+ // Setting End Cap Support + End Cap Assembly of Layer 5.
+ /////////////////////////////////////////////////////////////
+ if (! moth) {
+ AliError("Can't insert end cap support of layer5, mother is null!\n");
+ return;
+ };
+ if(!fgkEndCapSupportSystem) SetEndCapSupportAssembly();
+ TGeoTranslation* endcapsupportsystemITSCentertrans[2];
+ endcapsupportsystemITSCentertrans[0] = new TGeoTranslation(0.,0.,
+ fgkEndCapSupportCenterLay5ITSPosition
+ + fgkEndCapSupportCenterLay5Position
+ - fgkEndCapSideCoverLength[2]);
+ endcapsupportsystemITSCentertrans[1] = new TGeoTranslation(0.,0.,
+ fgkEndCapSideCoverLength[2]
+ - fgkEndCapSupportCenterLay5Position
+ - fgkEndCapSupportCenterLay5ITSPosition);
+ TGeoRotation* endcapsupportsystemrot = new TGeoRotation();
+ endcapsupportsystemrot->SetAngles(90.,180.,-90.);
+ TGeoCombiTrans* endcapsupportsystemITSCentercombitrans =
+ new TGeoCombiTrans(*endcapsupportsystemITSCentertrans[1],*endcapsupportsystemrot);
+ moth->AddNode(fgkEndCapSupportSystem[0],1,endcapsupportsystemITSCentertrans[0]);
+ moth->AddNode(fgkEndCapSupportSystem[1],1,endcapsupportsystemITSCentercombitrans);
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ delete endcapsupportsystemrot;
+ delete endcapsupportsystemITSCentertrans[1];
+ }
+ /////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::EndCapSupportSystemLayer6(TGeoVolume* moth){
+ /////////////////////////////////////////////////////////////
+ // Setting End Cap Support + End Cap Assembly of Layer 6.
+ /////////////////////////////////////////////////////////////
+ if (! moth) {
+ AliError("Can't insert end cap support of layer6, mother is null!\n");
+ return;
+ };
+ if(!fgkEndCapSupportSystem) SetEndCapSupportAssembly();
+ TGeoTranslation* endcapsupportsystemITSCentertrans[2];
+ endcapsupportsystemITSCentertrans[0] = new TGeoTranslation(0.,0.,
+ fgkEndCapSupportCenterLay6ITSPosition
+ + fgkEndCapSupportCenterLay6Position
+ - fgkEndCapSideCoverLength[2]);
+ endcapsupportsystemITSCentertrans[1] = new TGeoTranslation(0.,0.,
+ fgkEndCapSideCoverLength[2]
+ - fgkEndCapSupportCenterLay6Position
+ - fgkEndCapSupportCenterLay6ITSPosition);
+ TGeoRotation* endcapsupportsystemrot = new TGeoRotation();
+ endcapsupportsystemrot->SetAngles(90.,180.,-90.);
+ TGeoCombiTrans* endcapsupportsystemITSCentercombitrans =
+ new TGeoCombiTrans(*endcapsupportsystemITSCentertrans[1],*endcapsupportsystemrot);
+ moth->AddNode(fgkEndCapSupportSystem[2],1,endcapsupportsystemITSCentertrans[0]);
+ moth->AddNode(fgkEndCapSupportSystem[3],1,endcapsupportsystemITSCentercombitrans);
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ delete endcapsupportsystemrot;
+ delete endcapsupportsystemITSCentertrans[1];
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::LadderSupportLayer5(TGeoVolume* moth){
+ /////////////////////////////////////////////////////////////
+ // Setting Ladder Support of Layer 5.
+ /////////////////////////////////////////////////////////////
+ if (! moth) {
+ AliError("Can't insert ladder lupport of layer5, mother is null!\n");
+ return;
+ };
+ if(!fLay5LadderSupportRing) SetLadderSupport(100);
+ fMotherVol = moth;
+ TGeoTranslation* centerITSRingSupportLay5trans[2];
+ for(Int_t i=0; i<2; i++){
+ centerITSRingSupportLay5trans[i] =
+ new TGeoTranslation(0.,0.,TMath::Power(-1.,i)*fgkLadderSupportRingLay5Position);
+ moth->AddNode(fLay5LadderSupportRing,i+1,centerITSRingSupportLay5trans[i]);
+ }
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::LadderSupportLayer6(TGeoVolume* moth){
+ /////////////////////////////////////////////////////////////
+ // Setting Ladder Support of Layer 6.
+ /////////////////////////////////////////////////////////////
+ if (! moth) {
+ AliError("Can't insert ladder lupport of layer6, mother is null!\n");
+ return;
+ };
+ if(!fLay6LadderSupportRing) SetLadderSupport(100);
+ fMotherVol = moth;
+ TGeoTranslation* centerITSRingSupportLay6trans[2];
+ for(Int_t i=0; i<2; i++){
+ centerITSRingSupportLay6trans[i] =
+ new TGeoTranslation(0.,0.,TMath::Power(-1.,i)*fgkLadderSupportRingLay6Position);
+ moth->AddNode(fLay6LadderSupportRing,i+1,centerITSRingSupportLay6trans[i]);
+ }
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SSDCone(TGeoVolume* moth){
+ /////////////////////////////////////////////////////////////
+ // Setting Ladder Support of Layer 6.
+ /////////////////////////////////////////////////////////////
+ if (! moth) {
+ AliError("Can't insert SSD Cone, mother is null!\n");
+ return;
+ };
+ if(!fSSDCone) SetSSDCone();
+ TGeoTranslation* ssdconetrans = new TGeoTranslation(0.,0.,0.5*fgkSSDCentralSupportLength
+ + fgkSSDCentralAL3SupportLength);
+ moth->AddNode(fSSDCone,1,ssdconetrans);
+}
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SetSSDCone(){
+ /////////////////////////////////////////////////////////////
+ // Method generating SSDCone
+ /////////////////////////////////////////////////////////////
+ if(!fCreateMaterials) CreateMaterials();
+ fSSDCone = new TGeoVolumeAssembly("ITSssdCone");
+ Double_t ssdpconesectionradiusmax[16];
+ Double_t ssdpconesectionradiusmin[16];
+ Double_t ssdpconezsection[16];
+ TGeoPcon* ssdpconelittleholeshape[8];
+ TGeoVolume* ssdpconelittlehole[8];
+ ssdpconezsection[0] = (fgkSSDPConeZLength[0]-fgkSSDPConeZLength[1]);
+ ssdpconesectionradiusmin[0] = fgkSSDLowerPConeRadius;
+ ssdpconesectionradiusmax[0] = ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle)
+ + ssdpconesectionradiusmin[0];
+ ssdpconesectionradiusmin[1] = fgkSSDPConeLittleHoleRadius
+ - ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle);
+ ssdpconesectionradiusmax[1] = fgkSSDPConeLittleHoleRadius;
+ ssdpconezsection[1] = (ssdpconesectionradiusmin[1]-ssdpconesectionradiusmin[0])
+ * TanD(fgkSSDPConeAngle)+ssdpconezsection[0];
+ ssdpconelittleholeshape[0] = new TGeoPcon(0.,360.,2);
+ for(Int_t i=0; i<2;i++) ssdpconelittleholeshape[0]->DefineSection(i,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[0] = new TGeoVolume("SSDConeLittleHole1",ssdpconelittleholeshape[0],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[0]->SetLineColor(4);
+ /////////////////////////////////////////////////////////////
+ ssdpconezsection[2] = ssdpconezsection[1];
+ ssdpconesectionradiusmin[2] = ssdpconesectionradiusmin[1];
+ ssdpconesectionradiusmax[2] = ssdpconesectionradiusmax[1];
+ ssdpconesectionradiusmin[3] = fgkSSDPConeLittleHoleRadius+fgkSSDPConeLittleHoleLength
+ - ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle);
+ ssdpconesectionradiusmax[3] = ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle)+ssdpconesectionradiusmin[3];
+ ssdpconezsection[3] = (ssdpconesectionradiusmin[3]-ssdpconesectionradiusmin[2])
+ * TanD(fgkSSDPConeAngle)+ssdpconezsection[2];
+ Double_t ssdpconelittleholeangle = fgkSSDPConeLittleHoleLength/fgkSSDPConeLittleHoleRadius
+ * TMath::RadToDeg();
+ ssdpconelittleholeshape[1] = new TGeoPcon(30.+0.5*ssdpconelittleholeangle,
+ 60.-ssdpconelittleholeangle,2);
+ for(Int_t i=2;i<4;i++) ssdpconelittleholeshape[1]->DefineSection(i-2,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[1] = new TGeoVolume("SSDConeLittleHole2",ssdpconelittleholeshape[1],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[1]->SetLineColor(4);
+ TGeoRotation* ssdconelittleholerot[6];
+ for(Int_t i=0; i<6; i++){
+ ssdconelittleholerot[i] = new TGeoRotation();
+ ssdconelittleholerot[i]->SetAngles(i*60,0.,0.);
+ }
+ /////////////////////////////////////////////////////////////
+ ssdpconezsection[4] = ssdpconezsection[3];
+ ssdpconesectionradiusmin[4] = ssdpconesectionradiusmin[3];
+ ssdpconesectionradiusmax[4] = ssdpconesectionradiusmax[3];
+ ssdpconesectionradiusmin[5] = fgkSSDConeMiddleRadius-ssdpconezsection[0]
+ * CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle);
+ ssdpconesectionradiusmax[5] = fgkSSDConeMiddleRadius;
+ ssdpconezsection[5] = (ssdpconesectionradiusmin[5]-ssdpconesectionradiusmin[4])
+ * TanD(fgkSSDPConeAngle)+ssdpconezsection[4];
+ ssdpconelittleholeshape[2] = new TGeoPcon(0.,360.,2);
+ for(Int_t i=4; i<6;i++) ssdpconelittleholeshape[2]->DefineSection(i-4,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[2] = new TGeoVolume("SSDConeLittleHole3",ssdpconelittleholeshape[2],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[2]->SetLineColor(4);
+ ///////////////////////////////////////////////////
+ ssdpconezsection[6] = ssdpconezsection[5];
+ ssdpconesectionradiusmin[6] = ssdpconesectionradiusmin[5];
+ ssdpconesectionradiusmax[6] = ssdpconesectionradiusmax[5];
+ ssdpconesectionradiusmin[7] = fgkSSDConeMiddleRadius+fgkSSDPConeMiddleLength
+ -ssdpconezsection[0]
+ * CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle);
+ ssdpconesectionradiusmax[7] = fgkSSDConeMiddleRadius+fgkSSDPConeMiddleLength;
+ ssdpconezsection[7] = (ssdpconesectionradiusmin[7]-ssdpconesectionradiusmin[6])
+ * TanD(fgkSSDPConeAngle)+ssdpconezsection[6];
+ Double_t ssdpconemiddleholeangle = fgkSSDPConeMiddleWidth/fgkSSDConeMiddleRadius
+ * TMath::RadToDeg();
+ ssdpconelittleholeshape[3] = new TGeoPcon(22.5+0.5*ssdpconemiddleholeangle,
+ 45.-ssdpconemiddleholeangle,2);
+ for(Int_t i=6;i<8;i++) ssdpconelittleholeshape[3]->DefineSection(i-6,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[3] = new TGeoVolume("SSDConeLittleHole4",ssdpconelittleholeshape[3],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[3]->SetLineColor(4);
+ TGeoRotation* ssdconemiddleholerot[8];
+ for(Int_t i=0; i<8; i++){
+ ssdconemiddleholerot[i] = new TGeoRotation();
+ ssdconemiddleholerot[i]->SetAngles(i*45,0.,0.);
+ }
+ /////////////////////////////////////////////////////////////
+ ssdpconezsection[8] = ssdpconezsection[7];
+ ssdpconesectionradiusmin[8] = ssdpconesectionradiusmin[7];
+ ssdpconesectionradiusmax[8] = ssdpconesectionradiusmax[7];
+ ssdpconesectionradiusmin[9] = fgkSSDPConeUpRadius-ssdpconezsection[0]
+ * CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle);
+ ssdpconesectionradiusmax[9] = fgkSSDPConeUpRadius;
+ ssdpconezsection[9] = (ssdpconesectionradiusmin[9]-ssdpconesectionradiusmin[8])
+ * TanD(fgkSSDPConeAngle)+ssdpconezsection[8];
+ ssdpconelittleholeshape[4] = new TGeoPcon(0.,360.,2);
+ for(Int_t i=8; i<10;i++) ssdpconelittleholeshape[4]->DefineSection(i-8,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[4] = new TGeoVolume("SSDConeLittleHole5",ssdpconelittleholeshape[4],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[4]->SetLineColor(4);
+ /////////////////////////////////////////////////////////////
+ Double_t ssdconetrapezoidheight = fgkSSDPConeUpMaxRadius-fgkSSDPConeUpRadius;
+ Double_t ssdconetrapezoidbasis = fgkSSDPConeTrapezoidBasis-2.0
+ * (0.5*ssdconetrapezoidheight/TanD(fgkSSDPConeTrapezoidAngle)
+ - 0.5*ssdconetrapezoidheight/(fgkSSDPConeUpMaxRadius
+ - 0.5*ssdconetrapezoidheight)*(0.5*fgkSSDPConeTrapezoidBasis
+ - 0.5*ssdconetrapezoidheight/TanD(fgkSSDPConeTrapezoidAngle)));
+ Double_t ssdconetrapezoidsection = (2.0*TMath::Pi()*fgkSSDPConeUpMaxRadius-8.0*ssdconetrapezoidbasis)/8.;
+ Double_t ssdpconetrapezoidsectionangle = ssdconetrapezoidsection/fgkSSDPConeUpMaxRadius
+ * TMath::RadToDeg();
+ ssdpconezsection[10] = ssdpconezsection[9];
+ ssdpconesectionradiusmin[10] = ssdpconesectionradiusmin[9];
+ ssdpconesectionradiusmax[10] = ssdpconesectionradiusmax[9];
+ ssdpconesectionradiusmin[11] = fgkSSDPConeUpMaxRadius-ssdpconezsection[0]
+ * CosD(fgkSSDPConeAngle)
+ / SinD(fgkSSDPConeAngle);
+ ssdpconesectionradiusmax[11] = fgkSSDPConeUpMaxRadius;
+ ssdpconezsection[11] = (ssdpconesectionradiusmin[11]-ssdpconesectionradiusmin[10])
+ * TanD(fgkSSDPConeAngle)+ssdpconezsection[10];
+ ssdpconelittleholeshape[5] = new TGeoPcon(90.-0.5*ssdpconetrapezoidsectionangle,
+ ssdpconetrapezoidsectionangle,2);
+ for(Int_t i=10;i<12;i++) ssdpconelittleholeshape[5]->DefineSection(i-10,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[5] = new TGeoVolume("SSDConeLittleHole6",ssdpconelittleholeshape[5],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[5]->SetLineColor(4);
+ TGeoRotation* ssdconeupradiusrot[8];
+ for(Int_t i=0; i<8; i++){
+ ssdconeupradiusrot[i] = new TGeoRotation();
+ ssdconeupradiusrot[i]->SetAngles(i*45,0.,0.);
+ }
+ /////////////////////////////////////////////////////////////
+ ssdpconezsection[12] = ssdpconezsection[11];
+ ssdpconezsection[13] = ssdpconezsection[12]+fgkSSDPConeRadiusWidth;
+ ssdpconesectionradiusmin[12] = ssdpconesectionradiusmin[11];
+ ssdpconesectionradiusmax[12] = fgkSSDPConeExternalRadius;
+ ssdpconesectionradiusmin[13] = ssdpconesectionradiusmin[12];
+ ssdpconesectionradiusmax[13] = fgkSSDPConeExternalRadius;
+ ssdpconelittleholeshape[6] = new TGeoPcon(0.,360.,2);
+ for(Int_t i=12; i<14;i++) ssdpconelittleholeshape[6]->DefineSection(i-12,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[6] = new TGeoVolume("SSDConeLittleHole7",ssdpconelittleholeshape[6],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[6]->SetLineColor(4);
+ /////////////////////////////////////////////////////////////
+ ssdpconezsection[14] = 0.0;
+ ssdpconezsection[15] = ssdpconezsection[0];
+ ssdpconesectionradiusmin[14] = ssdpconesectionradiusmin[0];
+ ssdpconesectionradiusmax[14] = ssdpconesectionradiusmin[14];
+ ssdpconesectionradiusmin[15] = ssdpconesectionradiusmin[0];
+ ssdpconesectionradiusmax[15] = ssdpconesectionradiusmax[0];
+ ssdpconelittleholeshape[7] = new TGeoPcon(0.,360.,2);
+ for(Int_t i=14; i<16;i++) ssdpconelittleholeshape[7]->DefineSection(i-14,ssdpconezsection[i],
+ ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
+ ssdpconelittlehole[7] = new TGeoVolume("SSDConeLittleHole8",ssdpconelittleholeshape[7],fSSDCarbonFiberMedium);
+ ssdpconelittlehole[7]->SetLineColor(4);
+ /////////////////////////////////////////////////////////////
+ TGeoTube* ssdtubeconeshape[2];
+ TGeoVolume* ssdtubecone[2];
+ TGeoTranslation* ssdtubeconetrans[2];
+ ssdtubeconeshape[0] = new TGeoTube(fgkSSDPConeUpMiddleRadius,
+ fgkSSDPConeExternalRadius,
+ 0.5*(fgkSSDPConeLength-ssdpconezsection[13]));
+ ssdtubeconeshape[1] = new TGeoTube(fgkSSDPConeDownRadius,ssdpconesectionradiusmin[0],
+ 0.5*ssdpconezsection[0]);
+ ssdtubecone[0] = new TGeoVolume("SSDConeTube1",ssdtubeconeshape[0],fSSDSupportRingAl);
+ ssdtubecone[1] = new TGeoVolume("SSDConeTube2",ssdtubeconeshape[1],fSSDSupportRingAl);
+ ssdtubeconetrans[0] = new TGeoTranslation(0.,0.,
+ 0.5*(fgkSSDPConeLength-ssdpconezsection[13])
+ + ssdpconezsection[13]);
+ ssdtubeconetrans[1] = new TGeoTranslation(0.,0.,0.5*ssdpconezsection[0]);
+ ssdtubecone[0]->SetLineColor(4);
+ ssdtubecone[1]->SetLineColor(4);
+ /////////////////////////////////////////////////////////////
+ // Mother Volume Container
+ /////////////////////////////////////////////////////////////
+ Double_t ssdconemotherradiusmin[8];
+ Double_t ssdconemotherradiusmax[8];
+ Double_t ssdconemothersection[8];
+ ssdconemotherradiusmin[0] = fgkSSDPConeDownRadius;
+ ssdconemotherradiusmax[0] = ssdpconesectionradiusmin[0];
+ ssdconemotherradiusmin[1] = fgkSSDPConeDownRadius;
+ ssdconemotherradiusmax[1] = ssdpconesectionradiusmax[0];
+ ssdconemotherradiusmin[2] = ssdpconesectionradiusmin[0];
+ ssdconemotherradiusmax[2] = ssdpconesectionradiusmax[0];
+ ssdconemotherradiusmin[3] = ssdpconesectionradiusmin[11];
+ ssdconemotherradiusmax[3] = ssdpconesectionradiusmax[11];
+ ssdconemotherradiusmin[4] = ssdpconesectionradiusmin[12];
+ ssdconemotherradiusmax[4] = ssdpconesectionradiusmax[12];
+ ssdconemotherradiusmin[5] = ssdpconesectionradiusmin[13];
+ ssdconemotherradiusmax[5] = ssdpconesectionradiusmax[13];
+ ssdconemotherradiusmin[6] = fgkSSDPConeUpMiddleRadius;
+ ssdconemotherradiusmax[6] = fgkSSDPConeExternalRadius;
+ ssdconemotherradiusmin[7] = fgkSSDPConeUpMiddleRadius;
+ ssdconemotherradiusmax[7] = fgkSSDPConeExternalRadius;
+ ssdconemothersection[0] = 0.0;
+ ssdconemothersection[1] = ssdpconezsection[0];
+ ssdconemothersection[2] = ssdpconezsection[0];
+ ssdconemothersection[3] = ssdpconezsection[11];
+ ssdconemothersection[4] = ssdpconezsection[11];
+ ssdconemothersection[5] = ssdpconezsection[13];
+ ssdconemothersection[6] = ssdpconezsection[13];
+ ssdconemothersection[7] = fgkSSDPConeLength;
+ TGeoPcon* ssdconemothershape = new TGeoPcon(0.,360,8);
+ for(Int_t i=0; i<8; i++) ssdconemothershape->DefineSection(i,ssdconemothersection[i],
+ ssdconemotherradiusmin[i],ssdconemotherradiusmax[i]);
+ TGeoVolume* ssdconemother = new TGeoVolume("SSDMotherCone",ssdconemothershape,fSSDAir);
+ /////////////////////////////////////////////////////////////
+ //Placing the Volumes into Mother
+ /////////////////////////////////////////////////////////////
+ ssdconemother->AddNode(ssdpconelittlehole[0],1);
+ for(Int_t i=0; i<6; i++){
+ ssdconemother->AddNode(ssdpconelittlehole[1],i+1,ssdconelittleholerot[i]);
+ }
+ ssdconemother->AddNode(ssdpconelittlehole[2],1);
+ for(Int_t i=0; i<8; i++){
+ ssdconemother->AddNode(ssdpconelittlehole[3],i+1,ssdconemiddleholerot[i]);
+ }
+ ssdconemother->AddNode(ssdpconelittlehole[4],1);
+ for(Int_t i=0; i<8; i++){
+ ssdconemother->AddNode(ssdpconelittlehole[5],i+1,ssdconeupradiusrot[i]);
+ }
+ ssdconemother->AddNode(ssdpconelittlehole[6],1);
+ ssdconemother->AddNode(ssdpconelittlehole[7],1);
+ ssdconemother->AddNode(ssdtubecone[0],1,ssdtubeconetrans[0]);
+ ssdconemother->AddNode(ssdtubecone[1],1,ssdtubeconetrans[1]);
+ /////////////////////////////////////////////////////////////
+ // ITS General Support
+ /////////////////////////////////////////////////////////////
+ TGeoTube* ssdcentralsupportshape = new TGeoTube(fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth,
+ fgkSSDCentralSupportRadius,0.5*fgkSSDCentralSupportLength);
+ TGeoVolume* ssdcentralsupport = new TGeoVolume("SSDCentralSupport",ssdcentralsupportshape,fSSDRohaCellCone);
+ TGeoTranslation* ssdcentralsupportrans = new TGeoTranslation(0.,0.,-0.5*fgkSSDCentralSupportLength
+ - fgkSSDCentralAL3SupportLength);
+ ssdcentralsupport->SetLineColor(4);
+ fSSDCone->AddNode(ssdcentralsupport,1,ssdcentralsupportrans);
+ TGeoTube* ssdcentralal3supportshape = new TGeoTube(fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth,
+ fgkSSDCentralSupportRadius,0.25*fgkSSDCentralAL3SupportLength);
+ TGeoVolume* ssdcentralal3support = new TGeoVolume("SSDCentralAl3Support",ssdcentralal3supportshape,fSSDSupportRingAl);
+ TGeoTranslation* ssdcentralal3supportrans[3];
+ ssdcentralal3supportrans[0] = new TGeoTranslation(0.,0.,-0.75*fgkSSDCentralAL3SupportLength);
+ ssdcentralal3supportrans[1] = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
+ - 1.25*fgkSSDCentralAL3SupportLength);
+ ssdcentralal3support->SetLineColor(4);
+ fSSDCone->AddNode(ssdcentralal3support,1,ssdcentralal3supportrans[0]);
+ fSSDCone->AddNode(ssdcentralal3support,2,ssdcentralal3supportrans[1]);
+ TGeoPcon* ssdpconcentralal3shape = new TGeoPcon(0.,360.,2);
+ Double_t ssdpconcentralradiusmin[2];
+ Double_t ssdpconcentralradiusmax[2];
+ Double_t ssdpconcentralsection[2];
+ ssdpconcentralradiusmin[0] = fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth;
+ ssdpconcentralradiusmin[1] = fgkSSDCentralSupportRadius-fgkSSDCentralAL3SupportWidth;
+ ssdpconcentralradiusmax[0] = fgkSSDCentralSupportRadius;
+ ssdpconcentralradiusmax[1] = fgkSSDCentralSupportRadius;
+ ssdpconcentralsection[0] = -0.5*fgkSSDCentralAL3SupportLength;
+ ssdpconcentralsection[1] = 0.;
+ for(Int_t i=0; i<2;i++) ssdpconcentralal3shape->DefineSection(i,ssdpconcentralsection[i],
+ ssdpconcentralradiusmin[i],ssdpconcentralradiusmax[i]);
+ TGeoVolume* ssdpconcentralal3 = new TGeoVolume("SSDPConeCentralAl3",ssdpconcentralal3shape,fSSDSupportRingAl);
+ ssdpconcentralal3->SetLineColor(4);
+ fSSDCone->AddNode(ssdpconcentralal3,1);
+ TGeoRotation* ssdcentralal3supportrot = new TGeoRotation();
+ ssdcentralal3supportrot->SetAngles(90.,180,-90.);
+ ssdcentralal3supportrans[2] = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
+ -2.*fgkSSDCentralAL3SupportLength);
+ TGeoCombiTrans* ssdcentralal3supporcombitrans = new TGeoCombiTrans(*ssdcentralal3supportrans[2],
+ *ssdcentralal3supportrot);
+ fSSDCone->AddNode(ssdpconcentralal3,2,ssdcentralal3supporcombitrans);
+ TGeoRotation* ssdconemotherot = new TGeoRotation();
+ ssdconemotherot->SetAngles(90.,180.,-90.);
+ TGeoTranslation* ssdconemothertrans = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
+ -2.*fgkSSDCentralAL3SupportLength);
+ TGeoCombiTrans* ssdconemothercombitrans = new TGeoCombiTrans(*ssdconemothertrans,*ssdconemotherot);
+ fSSDCone->AddNode(ssdconemother,1);
+ fSSDCone->AddNode(ssdconemother,2,ssdconemothercombitrans);
+ /////////////////////////////////////////////////////////////
+ // Deallocating memory
+ /////////////////////////////////////////////////////////////
+ delete ssdcentralal3supportrot;
+ delete ssdcentralal3supportrans[2];
+ delete ssdconemotherot;
+ delete ssdconemothertrans;
+ /////////////////////////////////////////////////////////////
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+ void AliITSv11GeometrySSD::SSDCables(TGeoVolume* moth){
+ /////////////////////////////////////////////////////////////
+ // Setting SSD Cables
+ /////////////////////////////////////////////////////////////
+ if (! moth) {
+ AliError("Can't insert SSD Cables, mother is null!\n");
+ return;
+ };
+ TGeoVolume* ssdcables = SetSSDCables();
+ moth->AddNode(ssdcables,1);
+}
+ ////////////////////////////////////////////////////////////////////////////////
+ TGeoVolume* AliITSv11GeometrySSD::SetSSDCables(){
+ /////////////////////////////////////////////////////////////
+ // Method generating SSDCables
+ /////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////////////////////
+ // SSD Cables Parameters (lengths are in mm and angles in degrees)
+ /////////////////////////////////////////////////////////////////////////////////
+
+ const Double_t kSSDCablesLay5TubeRadiusMin = 11.9*fgkmm;
+ const Double_t kSSDCablesLay6TubeRadiusMin = 11.9*fgkmm;
+
+ // Cable thickness for rings at outer Z
+ // Average: 9/2 = 4.5 cables per quadrant
+ // Ideally 1/16 * 38(34) cables, but take factor to (1/8) to accomodate kinks and loops (there are only 2 different cable lengths); 21 mm^2 Cu each
+
+ const Double_t kSSDCablesLay5RingArea = 21.*34./8.*fgkmm*fgkmm; // to be fixed in order to reproduce material budget
+ const Double_t kSSDCablesLay6RingArea = 21.*38./8.*fgkmm*fgkmm; // to be fixed in order to reproduce material budget
+
+
+ const Double_t kSSDCablesHeight = 3.2*fgkmm; // 3.2 mm*13 cm width = 18 cables, 185g/m each Add fudge factor of 2 to get to ~25 kg measured
+
+ const Double_t kSSDCableAngle = 22.5;
+ // MvL: remove water?
+ const Double_t kSSDCablesLay5RightSideWaterHeight = 2.5*fgkmm; // to be fixed in order to reproduce material budget
+ const Double_t kSSDCablesPatchPanel2RB26Angle[2] = {25.0,53.2};
+ const Double_t kSSDCablesPatchPanel2RB24Angle[2] = {23.0,53.6};
+ const Double_t kSSDPatchPanel2RB26ITSDistance = 975.0*fgkmm;
+ const Double_t kSSDPatchPanel2RB24ITSDistance = 1020.0*fgkmm;
+ const Double_t kSSDPatchPanel2RB26Radius = 451.3*fgkmm;
+ const Double_t kSSDPatchPanel2RB24Radius = 451.3*fgkmm;
+ const Double_t kSSDPatchPanelHeight = 87.5*fgkmm;
+
+ // SSD Layer 5 Cables
+ //////////////////////////////////////////////////////////////////////////////////////////////////
+ TGeoVolumeAssembly* ssdcablesmother = new TGeoVolumeAssembly("SSDCables");
+ Double_t ssdcablelayvertical = 0.05; // Internal variables to control overlapping with SDD cables
+ Double_t ssdcablelaylateral = 0.55; // Internal variables to control overlapping with SDD cables
+ //////////////////////////////////////////////////////////////////////////////////////////////////
+ // Printf(Form("Cable ring: rad min: %g length %g thick %g", ssdcableslay5rigthsideradiusmin, ssdcablelay5rightsidelength, kSSDCablesLay5RingArea/ssdcablelay5rightsidelength));
+
+
+
+ ////////////////////////////////////
+ // Double_t cablescapacity[20];
+ // cablescapacity[0] = ssdcablelay5rightubeshape->Capacity();
+ ////////////////////////////////////
+ //ssdcablesmother->AddNode(ssdcablelay5righttube,1,ssdcablelay5rightrans);
+ ////////////////////////////////////
+ // TGeoPCone Volumes
+ ///////////////////////////////////
+ TGeoPcon* ssdcableslay5pconshape[3];
+ TGeoVolume* ssdcableslay5pcon[3];
+ ssdcableslay5pconshape[0] = new TGeoPcon(0.,360.,2);
+ Double_t ssdcableslay5pconzsection[6];
+ Double_t ssdcableslay5pconrmin[6];
+ Double_t ssdcableslay5pconrmax[6];
+ ssdcableslay5pconrmin[0] = fgkEndCapSupportMiddleRadius[0]+kSSDCablesLay5TubeRadiusMin;
+ ssdcableslay5pconrmin[1] = fgkSSDPConeUpRadius*(1.0+ssdcablelayvertical);
+
+ ssdcableslay5pconzsection[0] = fgkEndCapSupportCenterLay5ITSPosition
+ + fgkEndCapSupportCenterLay5Position;
+ //+ 2.*ssdcablelay5rightsidelength; // removing this generates overlap with the water ring
+ // Keeping it generates overlap with the cones...
+ // SSDCables/SSDCableLay5RightSideWaterTube_2 ovlp=0.0939792
+ ssdcableslay5pconzsection[1] = 0.5*fgkSSDCentralSupportLength
+ + fgkSSDCentralAL3SupportLength
+ + (fgkSSDPConeUpRadius-fgkSSDLowerPConeRadius)
+ * TanD(fgkSSDPConeAngle);
+ Double_t dz = ssdcableslay5pconzsection[1]-ssdcableslay5pconzsection[0];
+ Double_t pconethickness = kSSDCablesLay5RingArea/TMath::Abs(dz);
+ ssdcableslay5pconrmax[0] = ssdcableslay5pconrmin[0]+pconethickness;
+ ssdcableslay5pconrmax[1] = ssdcableslay5pconrmin[1]+pconethickness;
+ //Printf(Form("pcone: r1 %g r2 %g z1 %g z2 %g thickness %g", ssdcableslay5pconrmax[0], ssdcableslay5pconrmax[1],
+ // ssdcableslay5pconzsection[0],ssdcableslay5pconzsection[1],pconethickness));
+
+ for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[0]->DefineSection(i,ssdcableslay5pconzsection[i],
+ ssdcableslay5pconrmin[i],ssdcableslay5pconrmax[i]);
+ ssdcableslay5pcon[0] = new TGeoVolume("SSDCableLay5RightSidePCon1",
+ ssdcableslay5pconshape[0],fSSDCopper);
+ ssdcableslay5pcon[0]->SetLineColor(9);
+ ssdcablesmother->AddNode(ssdcableslay5pcon[0],1);
+
+ Double_t totvol = ssdcableslay5pcon[0]->Capacity();
+ // Printf(Form("Cables, lay5, pCone,volume: %g", ssdcableslay5pcon[0]->Capacity()));
+////////////////////////////////////
+// cablescapacity[1] = ssdcableslay5pconshape[0]->Capacity();
+////////////////////////////////////
+
+ //
+ // PCon 2 and 3 are cables going through/towards holes in supports
+ //
+ ssdcableslay5pconzsection[2] = ssdcableslay5pconzsection[1];
+ ssdcableslay5pconzsection[3] = 0.5*fgkSSDCentralSupportLength
+ + fgkSSDCentralAL3SupportLength
+ + 0.25*TanD(fgkSSDPConeAngle)*(fgkSSDPConeUpMaxRadius
+ + 3.*fgkSSDPConeUpRadius-4.*fgkSSDLowerPConeRadius);
+ Double_t ssdcableangle = (fgkSSDPConeTrapezoidBasis-2.*(fgkSSDPConeUpMaxRadius
+ - fgkSSDPConeUpRadius)/TanD(fgkSSDPConeTrapezoidAngle))
+ / fgkSSDPConeUpRadius*TMath::RadToDeg()*2;
+ ssdcableslay5pconshape[1] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle,2);
+ // Printf(Form("PCon2, phi %g dphi %g ",90.0-kSSDCableAngle-0.5*ssdcableangle, ssdcableangle));
+ ssdcableslay5pconrmin[2] = ssdcableslay5pconrmin[1];
+ ssdcableslay5pconrmax[2] = ssdcableslay5pconrmax[1];
+ ssdcableslay5pconrmin[3] = 0.25*(fgkSSDPConeUpMaxRadius+3.*fgkSSDPConeUpRadius
+ - 4.*fgkSSDLowerPConeRadius)+fgkSSDLowerPConeRadius;
+ ssdcableslay5pconrmin[3]*=(1.0+ssdcablelayvertical);
+ ssdcableslay5pconrmax[3] = ssdcableslay5pconrmin[3] + kSSDCablesHeight;
+ for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[1]->DefineSection(i,ssdcableslay5pconzsection[i+2],
+ ssdcableslay5pconrmin[i+2],ssdcableslay5pconrmax[i+2]);
+ ssdcableslay5pcon[1] = new TGeoVolume("SSDCableLay5RightSidePCon2",ssdcableslay5pconshape[1],fSSDCopper);
+ ssdcableslay5pcon[1]->SetLineColor(9);
+ ////////////////////////////////////
+ ssdcableslay5pconshape[2] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle,2);
+ ssdcableslay5pconrmin[4] = ssdcableslay5pconrmin[3];
+ ssdcableslay5pconrmax[4] = ssdcableslay5pconrmax[3];
+ ssdcableslay5pconrmin[5] = ssdcableslay5pconrmin[4];
+ ssdcableslay5pconrmax[5] = ssdcableslay5pconrmax[4];
+ ssdcableslay5pconzsection[4] = ssdcableslay5pconzsection[3];
+ ssdcableslay5pconzsection[5] = (ssdcableslay5pconrmin[5]-fgkSSDLowerPConeRadius)
+ * TanD(fgkSSDPConeAngle)
+ + 0.5*fgkSSDCentralSupportLength
+ + fgkSSDCentralAL3SupportLength;
+ ssdcableslay5pconzsection[5]-= ssdcablelaylateral;
+ for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[2]->DefineSection(i,ssdcableslay5pconzsection[i+4],
+ ssdcableslay5pconrmin[i+4],ssdcableslay5pconrmax[i+4]);
+ ssdcableslay5pcon[2] = new TGeoVolume("SSDCableLay5RightSidePCon3",ssdcableslay5pconshape[2],fSSDCopper);
+ ssdcableslay5pcon[2]->SetLineColor(9);
+////////////////////////////////////
+ TGeoRotation* ssdcableslay5pconrot[4];
+ for(Int_t i=0; i<4; i++){
+ ssdcableslay5pconrot[i] = new TGeoRotation();
+ ssdcableslay5pconrot[i]->SetAngles(90.0*i,0.,0.);
+ ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+1,ssdcableslay5pconrot[i]);
+ ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+1,ssdcableslay5pconrot[i]);
+ // Printf(Form("Pcon2, Pcon3, vol %g %g",ssdcableslay5pcon[1]->Capacity(),ssdcableslay5pcon[2]->Capacity()));
+ totvol += ssdcableslay5pcon[1]->Capacity()+ssdcableslay5pcon[2]->Capacity();
+ }
+ ////////////////////////////////////
+ //cablescapacity[2] = 4.0*ssdcableslay5pconshape[1]->Capacity();
+ //cablescapacity[3] = 4.0*ssdcableslay5pconshape[2]->Capacity();
+ ////////////////////////////////////
+ // Positioning Left SSD Cables Part
+ ////////////////////////////////////
+ TGeoRotation* ssdcablesLay5RightPConToLeftRot = new TGeoRotation();
+ ssdcablesLay5RightPConToLeftRot->SetAngles(90.,180.,-90);
+ ssdcablesmother->AddNode(ssdcableslay5pcon[0],2,ssdcablesLay5RightPConToLeftRot);
+ TGeoHMatrix* ssdcablesLay5RightPConToLeftMatrix[4];
+ for(Int_t i=0; i<4; i++){ ssdcablesLay5RightPConToLeftMatrix[i] =
+ new TGeoHMatrix((*ssdcablesLay5RightPConToLeftRot)*(*ssdcableslay5pconrot[i]));
+ ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
+ ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
+ }
+ ////////////////////////////////////
+ //cablescapacity[4] = ssdcablelay5rightubeshape->Capacity();
+ //cablescapacity[5] = ssdcableslay5pconshape[0]->Capacity();
+ //cablescapacity[6] = 4.*ssdcableslay5pconshape[1]->Capacity();
+ //cablescapacity[7] = 4.*ssdcableslay5pconshape[2]->Capacity();
+ /////////////////////////////////////////////////////////////
+ // Water Tubes Layer 5
+ /////////////////////////
+ /* Remove ring; could be replaced with a PCone next to/on top of the cables
+
+ //
+ // MvL: Remove ring; put everything in PCone
+ //
+ // Need to keep dimensions for water ring...
+
+ Double_t ssdcablesfactor = 0.5; // Internal variables to control overlapping with SDD cables
+
+ Double_t ssdcableslay5rigthsideradiusmin = fgkEndCapSupportMiddleRadius[0]+kSSDCablesLay5TubeRadiusMin;
+ Double_t ssdcableslay5endconedistance = (ssdcableslay5rigthsideradiusmin
+ - fgkSSDLowerPConeRadius)
+ * TanD(fgkSSDPConeAngle);
+ Double_t ssdcableslay5startconedistance = fgkEndCapSupportCenterLay5ITSPosition
+ + fgkEndCapSupportCenterLay5Position
+ - 0.5*fgkSSDCentralSupportLength-fgkSSDCentralAL3SupportLength;
+ Double_t ssdcablelay5rightsidelength = ssdcableslay5endconedistance
+ - ssdcableslay5startconedistance;
+ ssdcablelay5rightsidelength *= ssdcablesfactor;
+ Double_t ssdcableslay5rightsideradiusmax = ssdcableslay5rigthsideradiusmin+kSSDCablesLay5RingArea/ssdcablelay5rightsidelength;
+
+
+ TGeoTranslation* ssdcablelay5rightrans =
+ new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay5ITSPosition
+ + fgkEndCapSupportCenterLay5Position
+ + 0.5*ssdcablelay5rightsidelength);
+
+ TGeoTranslation* ssdcablesLay5RightTubeToLeftrans = new TGeoTranslation(0.,0.,
+ - 0.5*ssdcablelay5rightsidelength
+ - fgkEndCapSupportCenterLay5Position
+ - fgkEndCapSupportCenterLay5ITSPosition);
+
+ TGeoTube* ssdcablelay5rightubewatershape = new TGeoTube(ssdcableslay5rightsideradiusmax,
+ ssdcableslay5rightsideradiusmax
+ + kSSDCablesLay5RightSideWaterHeight,
+ 0.5*ssdcablelay5rightsidelength);
+ TGeoVolume* ssdcablelay5rightwatertube = new TGeoVolume("SSDCableLay5RightSideWaterTube",
+ ssdcablelay5rightubewatershape,
+ fSSDCoolingTubeWater);
+ ssdcablelay5rightwatertube->SetLineColor(7);
+ ssdcablesmother->AddNode(ssdcablelay5rightwatertube,1,ssdcablelay5rightrans);
+ ssdcablesmother->AddNode(ssdcablelay5rightwatertube,2,ssdcablesLay5RightTubeToLeftrans);
+ */
+ ////////////////////////////////////
+ // TGeoPCone Water Volumes Layer
+ ///////////////////////////////////
+ TGeoPcon* ssdcableslay5pconwatershape[3];
+ TGeoVolume* ssdcableslay5pconwater[3];
+ ssdcableslay5pconwatershape[0] = new TGeoPcon(0.,360.,2);
+ Double_t ssdcableslay5pconwaterzsection[6];
+ Double_t ssdcableslay5pcwateronrmin[6];
+ Double_t ssdcableslay5pconwaterrmax[6];
+ ssdcableslay5pcwateronrmin[0] = ssdcableslay5pconrmax[0];
+ ssdcableslay5pconwaterrmax[0] = ssdcableslay5pcwateronrmin[0]
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcableslay5pcwateronrmin[1] = ssdcableslay5pconrmax[1];
+ ssdcableslay5pconwaterrmax[1] = ssdcableslay5pcwateronrmin[1]
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcableslay5pconwaterzsection[0] = ssdcableslay5pconzsection[0];
+ ssdcableslay5pconwaterzsection[1] = ssdcableslay5pconzsection[1];
+ for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[0]->DefineSection(i,ssdcableslay5pconwaterzsection[i],
+ ssdcableslay5pcwateronrmin[i],ssdcableslay5pconwaterrmax[i]);
+ ssdcableslay5pconwater[0] = new TGeoVolume("SSDCableLay5RightSidePConWater1",
+ ssdcableslay5pconwatershape[0],fSSDCoolingTubeWater);
+ ssdcableslay5pconwater[0]->SetLineColor(7);
+ ssdcablesmother->AddNode(ssdcableslay5pconwater[0],1);
+ ssdcablesmother->AddNode(ssdcableslay5pconwater[0],2,ssdcablesLay5RightPConToLeftRot);
+////////////////////////////////////
+ ssdcableslay5pconwaterzsection[2] = ssdcableslay5pconzsection[2];
+ ssdcableslay5pconwaterzsection[3] = ssdcableslay5pconzsection[3];
+ ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle,2);
+ ssdcableslay5pcwateronrmin[2] = ssdcableslay5pconrmax[1];
+ ssdcableslay5pconwaterrmax[2] = ssdcableslay5pcwateronrmin[2]
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcableslay5pcwateronrmin[3] = ssdcableslay5pconrmax[3];
+ ssdcableslay5pconwaterrmax[3] = ssdcableslay5pcwateronrmin[3]
+ + kSSDCablesLay5RightSideWaterHeight;
+ for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[1]->DefineSection(i,ssdcableslay5pconwaterzsection[i+2],
+ ssdcableslay5pcwateronrmin[i+2],ssdcableslay5pconwaterrmax[i+2]);
+ ssdcableslay5pconwater[1] = new TGeoVolume("SSDCableLay5RightSidePConWater2",
+ ssdcableslay5pconwatershape[1],fSSDCoolingTubeWater);
+ ssdcableslay5pconwater[1]->SetLineColor(7);
+////////////////////////////////////
+ ssdcableslay5pconwatershape[2] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle,2);
+ ssdcableslay5pcwateronrmin[4] = ssdcableslay5pconrmax[3];
+ ssdcableslay5pconwaterrmax[4] = ssdcableslay5pcwateronrmin[4]
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcableslay5pcwateronrmin[5] = ssdcableslay5pconrmax[4];
+ ssdcableslay5pconwaterrmax[5] = ssdcableslay5pcwateronrmin[4]
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcableslay5pconwaterzsection[4] = ssdcableslay5pconzsection[4];
+ ssdcableslay5pconwaterzsection[5] = ssdcableslay5pconzsection[5];
+ for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[2]->DefineSection(i,ssdcableslay5pconwaterzsection[i+4],
+ ssdcableslay5pcwateronrmin[i+4],ssdcableslay5pconwaterrmax[i+4]);
+ ssdcableslay5pconwater[2] = new TGeoVolume("SSDCableLay5RightSidePConWater3",
+ ssdcableslay5pconwatershape[2],fSSDCoolingTubeWater);
+ ssdcableslay5pconwater[2]->SetLineColor(7);
+////////////////////////////////////
+ TGeoRotation* ssdcableslay5pconwaterot[4];
+ TGeoHMatrix* ssdcablesLay5RightPConWaterToLeftMatrix[4];
+ for(Int_t i=0; i<4; i++){
+ ssdcableslay5pconwaterot[i] = new TGeoRotation();
+ ssdcableslay5pconwaterot[i]->SetAngles(90.0*i+45.0,0.,0.);
+ ssdcablesLay5RightPConWaterToLeftMatrix[i] =
+ new TGeoHMatrix((*ssdcablesLay5RightPConToLeftRot)*(*ssdcableslay5pconwaterot[i]));
+ ssdcablesmother->AddNode(ssdcableslay5pconwater[1],i+1,ssdcableslay5pconwaterot[i]);
+ ssdcablesmother->AddNode(ssdcableslay5pconwater[1],i+5,ssdcablesLay5RightPConWaterToLeftMatrix[i]);
+ ssdcablesmother->AddNode(ssdcableslay5pconwater[2],i+1,ssdcableslay5pconwaterot[i]);
+ ssdcablesmother->AddNode(ssdcableslay5pconwater[2],i+5,ssdcablesLay5RightPConWaterToLeftMatrix[i]);
+ }
+ /////////////////////////
+ // SSD Layer 6 Cables
+ /////////////////////////
+ Double_t ssdcableslay6rigthsideradiusmin = fgkEndCapSupportMiddleRadius[1]+kSSDCablesLay6TubeRadiusMin;
+ Double_t ssdcablelay6rightsidelength = 2.; // cm was 2.*ssdcablelay5rightsidelength;
+ Double_t ssdcableslay6rightsideradiusmax = ssdcableslay6rigthsideradiusmin+kSSDCablesLay6RingArea/ssdcablelay6rightsidelength;
+ // Printf(Form("Lay 6 cables, length %g, radius %g, thickness %g", ssdcablelay6rightsidelength, ssdcableslay6rigthsideradiusmin, kSSDCablesLay6RingArea/ssdcablelay6rightsidelength));
+ TGeoTube* ssdcablelay6rightubeshape = new TGeoTube(ssdcableslay6rigthsideradiusmin,
+ ssdcableslay6rightsideradiusmax,
+ 0.5*ssdcablelay6rightsidelength);
+ TGeoVolume* ssdcablelay6righttube = new TGeoVolume("SSDCableLay6RightSideTube",
+ ssdcablelay6rightubeshape,
+ fSSDCopper);
+ ssdcablelay6righttube->SetLineColor(9);
+ TGeoTranslation* ssdcablelay6rightrans =
+ new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay6ITSPosition
+ + fgkEndCapSupportCenterLay6Position
+ + 0.5*ssdcablelay6rightsidelength);
+ TGeoTranslation* ssdcablesLay6RightTubeToLeftrans = new TGeoTranslation(0.,0.,
+ - 0.5*ssdcablelay6rightsidelength
+ - fgkEndCapSupportCenterLay6Position
+ - fgkEndCapSupportCenterLay6ITSPosition);
+ ssdcablesmother->AddNode(ssdcablelay6righttube,1,ssdcablelay6rightrans);
+ ssdcablesmother->AddNode(ssdcablelay6righttube,2,ssdcablesLay6RightTubeToLeftrans);
+ // Printf(Form("Cables; ring layer 6, volume: %g",ssdcablelay6rightubeshape->Capacity()));
+ totvol += ssdcablelay6rightubeshape->Capacity();
+ ////////////////////////////////////
+ //cablescapacity[8] = 2.*ssdcablelay6rightubeshape->Capacity();
+ ////////////////////////////////////
+ // MvL: PCon is part of connection to patch panels;
+ // removed since current volume is too thick; now absorbed in rings+connections
+ /*
+ TGeoPcon* ssdcableslay6pconshape = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle,2);
+ TGeoVolume* ssdcableslay6pcon;
+ Double_t ssdcableslay6pconrmin[2];
+ Double_t ssdcableslay6pconrmax[2];
+ Double_t ssdcableslay6pconzsection[2];
+ ssdcableslay6pconrmin[0] = ssdcableslay6rigthsideradiusmin;
+ ssdcableslay6pconrmax[0] = ssdcableslay6rightsideradiusmax;
+ ssdcableslay6pconrmin[1] = ssdcableslay6pconrmin[0];
+ ssdcableslay6pconrmax[1] = ssdcableslay6pconrmax[0];
+ ssdcableslay6pconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
+ + fgkEndCapSupportCenterLay6Position
+ + ssdcablelay6rightsidelength;
+ ssdcableslay6pconzsection[1] = ssdcableslay5pconwaterzsection[5];
+ for(Int_t i=0; i<2;i++) ssdcableslay6pconshape->DefineSection(i,ssdcableslay6pconzsection[i],
+ ssdcableslay6pconrmin[i],ssdcableslay6pconrmax[i]);
+
+ ssdcableslay6pcon = new TGeoVolume("SSDCableLay6RightSidePCon",
+ ssdcableslay6pconshape,fSSDCopper);
+ ssdcableslay6pcon->SetLineColor(9);
+ for(Int_t i=0; i<4; i++){
+ ssdcablesmother->AddNode(ssdcableslay6pcon,i+1,ssdcableslay5pconrot[i]);
+ ssdcablesmother->AddNode(ssdcableslay6pcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
+ }
+ */
+ ////////////////////////////////////
+ //cablescapacity[9] = 8.*ssdcableslay6pconshape->Capacity();
+ /////////////////////////
+ // Water Tubes Layer 6
+ /////////////////////////
+ TGeoTube* ssdcablelay6righwatertubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax,
+ ssdcableslay6rightsideradiusmax
+ + kSSDCablesLay5RightSideWaterHeight,
+ 0.5*ssdcablelay6rightsidelength);
+ TGeoVolume* ssdcablelay6rightwatertube = new TGeoVolume("SSDCableLay6RightSideWaterTube",
+ ssdcablelay6righwatertubeshape,
+ fSSDCoolingTubeWater);
+ ssdcablelay6rightwatertube->SetLineColor(7);
+ ssdcablesmother->AddNode(ssdcablelay6rightwatertube,1,ssdcablelay6rightrans);
+ ssdcablesmother->AddNode(ssdcablelay6rightwatertube,2,ssdcablesLay6RightTubeToLeftrans);
+ TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle,2);
+ TGeoVolume* ssdcableslay6waterpcon;
+ Double_t ssdcableslay6waterpconrmin[2];
+ Double_t ssdcableslay6waterpconrmax[2];
+ Double_t ssdcableslay6waterpconzsection[2];
+ ssdcableslay6waterpconrmin[0] = ssdcableslay6rightsideradiusmax;
+ ssdcableslay6waterpconrmax[0] = ssdcableslay6rightsideradiusmax
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcableslay6waterpconrmin[1] = ssdcableslay6waterpconrmin[0];
+ ssdcableslay6waterpconrmax[1] = ssdcableslay6waterpconrmax[0];
+ ssdcableslay6waterpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
+ + fgkEndCapSupportCenterLay6Position
+ + ssdcablelay6rightsidelength;
+ ssdcableslay6waterpconzsection[1] = ssdcableslay5pconwaterzsection[5];
+ for(Int_t i=0; i<2;i++) ssdcableslay6waterpconshape->DefineSection(i,ssdcableslay6waterpconzsection[i],
+ ssdcableslay6waterpconrmin[i],ssdcableslay6waterpconrmax[i]);
+ ssdcableslay6waterpcon = new TGeoVolume("SSDCableLay6RightSideWaterPCon",
+ ssdcableslay6waterpconshape,fSSDCoolingTubeWater);
+ ssdcableslay6waterpcon->SetLineColor(7);
+ TGeoRotation* ssdcableslay6pconwaterot[4];
+ TGeoRotation* ssdcablesLay6RightPConToLeftRot = new TGeoRotation();
+ ssdcablesLay6RightPConToLeftRot->SetAngles(90.,180.,-90);
+ TGeoHMatrix* ssdcablesLay6RightPConToLeftMatrix[4];
+ for(Int_t i=0; i<4; i++){
+ ssdcableslay6pconwaterot[i] = new TGeoRotation();
+ ssdcableslay6pconwaterot[i]->SetAngles(90.0*i+45.0,0.,0.);
+ ssdcablesLay6RightPConToLeftMatrix[i] = new TGeoHMatrix((*ssdcablesLay6RightPConToLeftRot)
+ * (*ssdcableslay6pconwaterot[i]));
+ ssdcablesmother->AddNode(ssdcableslay6waterpcon,i+1,ssdcableslay6pconwaterot[i]);
+ ssdcablesmother->AddNode(ssdcableslay6waterpcon,i+5,ssdcablesLay6RightPConToLeftMatrix[i]);
+ }
+ ////////////////////////////////////////
+ // From ITS Ring to Patch Panel3-RB26
+ ////////////////////////////////////////
+ Double_t ssdcablepatchpanel3BB26radiusmin[2];
+ Double_t ssdcablepatchpanel3BB26radiusmax[2];
+ Double_t ssdcablepatchpanel3RB26zsection[2];
+ ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*kSSDPatchPanelHeight;// +2.8+0.003;//Avoid small overlap with SPDshieldring;
+ ssdcablepatchpanel3BB26radiusmax[0] = ssdcablepatchpanel3BB26radiusmin[0]
+ + kSSDCablesHeight;
+ ssdcablepatchpanel3BB26radiusmin[1] = kSSDPatchPanel2RB26Radius;
+ ssdcablepatchpanel3BB26radiusmax[1] = ssdcablepatchpanel3BB26radiusmin[1]
+ + kSSDCablesHeight;
+ ssdcablepatchpanel3RB26zsection[0] = 0.5*fgkSSDCentralSupportLength
+ + fgkSSDCentralAL3SupportLength
+ + fgkSSDPConeZLength[0];
+ ssdcablepatchpanel3RB26zsection[1] = kSSDPatchPanel2RB26ITSDistance;
+ // Printf(Form("RB26 cable length %g",ssdcablepatchpanel3RB26zsection[1]-ssdcablepatchpanel3RB26zsection[0]));
+ // Printf(Form("Angular range %g",ssdcableangle));
+
+ TGeoPcon* ssdcablepatchpanel3RB26pconshape =
+ new TGeoPcon(90.0-kSSDCablesPatchPanel2RB26Angle[0]
+ - 0.5*ssdcableangle,ssdcableangle,2);
+ for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB26pconshape->DefineSection(i,ssdcablepatchpanel3RB26zsection[i],
+ ssdcablepatchpanel3BB26radiusmin[i],ssdcablepatchpanel3BB26radiusmax[i]);
+ TGeoVolume* ssdcablepatchpanel3RB26pcon = new TGeoVolume("SSDCablePatchPanel3RB26",
+ ssdcablepatchpanel3RB26pconshape,fSSDCopper);
+ ssdcablepatchpanel3RB26pcon->SetLineColor(9);
+ TGeoRotation* ssdcablepatchpanel3B26rot[4];
+ for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B26rot[i] = new TGeoRotation();
+ ssdcablepatchpanel3B26rot[0]->SetAngles(0.0,0.0,0.0);
+ ssdcablepatchpanel3B26rot[1]->SetAngles(kSSDCablesPatchPanel2RB26Angle[0]
+ + kSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
+ ssdcablepatchpanel3B26rot[2]->SetAngles(180.0,0.0,0.0);
+ ssdcablepatchpanel3B26rot[3]->SetAngles(180.0 + kSSDCablesPatchPanel2RB26Angle[0]
+ + kSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
+ for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB26pcon,i+1,ssdcablepatchpanel3B26rot[i]);
+ // Printf(Form("Cable to patch panels RB26 volume: %g (x4)",ssdcablepatchpanel3RB26pcon->Capacity()));
+ ////////////////////////////////////
+ //cablescapacity[10] = 4.*ssdcablepatchpanel3RB26pconshape->Capacity();
+ ////////////////////////////////////////
+ // ITS Ring Cables RB26 Part
+ ////////////////////////////////////////
+ Double_t ssdcableitsring3BB26pconzsection[2];
+ Double_t ssdcableitsring3BB26pconrmin[2];
+ Double_t ssdcableitsring3BB26pconrmax[2];
+ ssdcableitsring3BB26pconzsection[0] = 0.5*fgkSSDCentralSupportLength
+ + fgkSSDCentralAL3SupportLength
+ + (4.0/5.0)*fgkSSDPConeZLength[0];
+ ssdcableitsring3BB26pconzsection[1] = ssdcablepatchpanel3RB26zsection[0];
+ ssdcableitsring3BB26pconrmin[0] = fgkSSDPConeUpRadius-0.5*kSSDPatchPanelHeight;
+ ssdcableitsring3BB26pconrmax[0] = ssdcableitsring3BB26pconrmin[0] + 2.5*kSSDCablesHeight; // widths of cable bunch is about half of patch panels; need factor 2.5
+
+ ssdcableitsring3BB26pconrmin[1] = ssdcablepatchpanel3BB26radiusmin[0];
+ ssdcableitsring3BB26pconrmax[1] = ssdcablepatchpanel3BB26radiusmax[0];
+ TGeoPcon* ssdcableitsring3BB26pconshape[4];
+ ssdcableitsring3BB26pconshape[0] = new TGeoPcon(90.0 - kSSDCablesPatchPanel2RB26Angle[0]
+ - 0.5*ssdcableangle,ssdcableangle
+ + (kSSDCablesPatchPanel2RB26Angle[0]
+ - kSSDCableAngle),2);
+ ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0 + kSSDCablesPatchPanel2RB26Angle[1]
+ - 0.5*ssdcableangle,ssdcableangle
+ + 3.0*kSSDCableAngle
+ - kSSDCablesPatchPanel2RB26Angle[1],2);
+ ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-kSSDCablesPatchPanel2RB26Angle[0]
+ - 0.5*ssdcableangle,ssdcableangle
+ - kSSDCableAngle
+ + kSSDCablesPatchPanel2RB26Angle[0],2);
+ ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+kSSDCablesPatchPanel2RB26Angle[1]
+ - 0.5*ssdcableangle,ssdcableangle
+ + 3.0*kSSDCableAngle
+ - kSSDCablesPatchPanel2RB26Angle[1],2);
+ for(Int_t i=0;i<4;i++)
+ for(Int_t j=0; j<2; j++) ssdcableitsring3BB26pconshape[i]->DefineSection(j,ssdcableitsring3BB26pconzsection[j],
+ ssdcableitsring3BB26pconrmin[j],
+ ssdcableitsring3BB26pconrmax[j]);
+ TGeoVolume* ssdcableitsring3BB26pcon[4];
+ ssdcableitsring3BB26pcon[0] = new TGeoVolume("SSDCableITSRing3RB26Part1",
+ ssdcableitsring3BB26pconshape[0],fSSDCopper);
+ ssdcableitsring3BB26pcon[1] = new TGeoVolume("SSDCableITSRing3RB26Part2",
+ ssdcableitsring3BB26pconshape[1],fSSDCopper);
+ ssdcableitsring3BB26pcon[2] = new TGeoVolume("SSDCableITSRing3RB26Part3",
+ ssdcableitsring3BB26pconshape[2],fSSDCopper);
+ ssdcableitsring3BB26pcon[3] = new TGeoVolume("SSDCableITSRing3RB26Part4",
+ ssdcableitsring3BB26pconshape[3],fSSDCopper);
+ for(Int_t i=0;i<4;i++){
+ ssdcableitsring3BB26pcon[i]->SetLineColor(9);
+ ssdcablesmother->AddNode(ssdcableitsring3BB26pcon[i],1);
+ //Printf(Form("Cable to patch panels RB26 volume part 2: %g (%d)",ssdcableitsring3BB26pcon[i]->Capacity(),i));
+}
+
+ ////////////////////////////////////
+ //cablescapacity[11] = ssdcableitsring3BB26pconshape[0]->Capacity()
+ // + ssdcableitsring3BB26pconshape[1]->Capacity()
+ // + ssdcableitsring3BB26pconshape[2]->Capacity()
+ // + ssdcableitsring3BB26pconshape[3]->Capacity();
+ ////////////////////////////////////////
+ // From ITS Ring to Patch Panel2-RB24
+ ////////////////////////////////////////
+ Double_t ssdcablepatchpanel3BB24radiusmin[2];
+ Double_t ssdcablepatchpanel3BB24radiusmax[2];
+ Double_t ssdcablepatchpanel3RB24zsection[2];
+ ssdcablepatchpanel3BB24radiusmin[0] = ssdcablepatchpanel3BB26radiusmin[0];
+ ssdcablepatchpanel3BB24radiusmax[0] = ssdcablepatchpanel3BB26radiusmax[0];
+ ssdcablepatchpanel3BB24radiusmin[1] = kSSDPatchPanel2RB24Radius;
+ ssdcablepatchpanel3BB24radiusmax[1] = ssdcablepatchpanel3BB24radiusmin[1]
+ + kSSDCablesHeight;
+ ssdcablepatchpanel3RB24zsection[0] = -0.5*fgkSSDCentralSupportLength
+ - fgkSSDCentralAL3SupportLength
+ - fgkSSDPConeZLength[0];
+ ssdcablepatchpanel3RB24zsection[1] = -kSSDPatchPanel2RB24ITSDistance;
+ //Printf(Form("RB24 cable length %g",ssdcablepatchpanel3RB24zsection[1]-ssdcablepatchpanel3RB24zsection[0]));
+ TGeoPcon* ssdcablepatchpanel3RB24pconshape =
+ new TGeoPcon(90.0-kSSDCablesPatchPanel2RB24Angle[1]
+ - 0.5*ssdcableangle,ssdcableangle,2);
+ for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB24pconshape->DefineSection(i,ssdcablepatchpanel3RB24zsection[i],
+ ssdcablepatchpanel3BB24radiusmin[i],ssdcablepatchpanel3BB24radiusmax[i]);
+ TGeoVolume* ssdcablepatchpanel3RB24pcon = new TGeoVolume("SSDCablePatchPanel3RB24",
+ ssdcablepatchpanel3RB24pconshape,
+ fSSDCopper);
+ ssdcablepatchpanel3RB24pcon->SetLineColor(9);
+ TGeoRotation* ssdcablepatchpanel3B24rot[4];
+ for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B24rot[i] = new TGeoRotation();
+ ssdcablepatchpanel3B24rot[0]->SetAngles(-6.0,0.0,0.0);
+ ssdcablepatchpanel3B24rot[1]->SetAngles(kSSDCablesPatchPanel2RB24Angle[0]
+ + kSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
+ ssdcablepatchpanel3B24rot[2]->SetAngles(174.0,0.0,0.0);
+ ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+kSSDCablesPatchPanel2RB24Angle[0]
+ + kSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
+ for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB24pcon,i+1,ssdcablepatchpanel3B24rot[i]);
+ //Printf(Form("Cable to patch panels RB24 volume: %g (x4)",ssdcablepatchpanel3RB24pcon->Capacity()));
+ ////////////////////////////////////
+ //cablescapacity[12] = 4.*ssdcablepatchpanel3RB24pconshape->Capacity();
+ ////////////////////////////////////////
+ // ITS Ring Cables RB24 Part
+ ////////////////////////////////////////
+ Double_t ssdcableitsring3BB24pconzsection[2];
+ Double_t ssdcableitsring3BB24pconrmin[2];
+ Double_t ssdcableitsring3BB24pconrmax[2];
+ ssdcableitsring3BB24pconzsection[0] = -ssdcableitsring3BB26pconzsection[0];
+ ssdcableitsring3BB24pconzsection[1] = ssdcablepatchpanel3RB24zsection[0];
+ ssdcableitsring3BB24pconrmin[0] = fgkSSDPConeUpRadius-0.5*kSSDPatchPanelHeight;
+ ssdcableitsring3BB24pconrmax[0] = ssdcableitsring3BB24pconrmin[0] + 2.5*kSSDCablesHeight; // Cable bunch width smaller; make it thicker
+
+ ssdcableitsring3BB24pconrmin[1] = ssdcablepatchpanel3BB24radiusmin[0];
+ ssdcableitsring3BB24pconrmax[1] = ssdcablepatchpanel3BB24radiusmax[0];
+ TGeoPcon* ssdcableitsring3BB24pconshape[4];
+ ssdcableitsring3BB24pconshape[0] = new TGeoPcon(kSSDCableAngle-0.5*ssdcableangle,ssdcableangle
+ + (90.0-kSSDCablesPatchPanel2RB24Angle[1]
+ - kSSDCableAngle),2);
+ ssdcableitsring3BB24pconshape[1] = new TGeoPcon(90.0+kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle-kSSDCableAngle
+ + kSSDCablesPatchPanel2RB24Angle[0],2);
+ ssdcableitsring3BB24pconshape[2] = new TGeoPcon(180.0+kSSDCableAngle-0.5*ssdcableangle,ssdcableangle
+ - kSSDCableAngle
+ + 90.0 - kSSDCablesPatchPanel2RB24Angle[1],2);
+ ssdcableitsring3BB24pconshape[3] = new TGeoPcon(270.0+kSSDCableAngle-0.5*ssdcableangle,
+ ssdcableangle-kSSDCableAngle
+ + kSSDCablesPatchPanel2RB24Angle[0],2);
+ for(Int_t i=0;i<4;i++)
+ for(Int_t j=0; j<2; j++) ssdcableitsring3BB24pconshape[i]->DefineSection(j,ssdcableitsring3BB24pconzsection[j],
+ ssdcableitsring3BB24pconrmin[j],
+ ssdcableitsring3BB24pconrmax[j]);
+ TGeoVolume* ssdcableitsring3BB24pcon[4];
+ ssdcableitsring3BB24pcon[0] = new TGeoVolume("SSDCableITSRing3RB24Part1",
+ ssdcableitsring3BB24pconshape[0],fSSDCopper);
+ ssdcableitsring3BB24pcon[1] = new TGeoVolume("SSDCableITSRing3RB24Part2",
+ ssdcableitsring3BB24pconshape[1],fSSDCopper);
+ ssdcableitsring3BB24pcon[2] = new TGeoVolume("SSDCableITSRing3RB24Part3",
+ ssdcableitsring3BB24pconshape[2],fSSDCopper);
+ ssdcableitsring3BB24pcon[3] = new TGeoVolume("SSDCableITSRing3RB24Part4",
+ ssdcableitsring3BB24pconshape[3],fSSDCopper);
+ for(Int_t i=0;i<4;i++){
+ ssdcableitsring3BB24pcon[i]->SetLineColor(9);
+ ssdcablesmother->AddNode(ssdcableitsring3BB24pcon[i],1);
+ // Printf(Form("Cable to patch panels RB24 (part 2) volume: %g (%d)",ssdcableitsring3BB24pcon[i]->Capacity(),i));
+}
+
+ ////////////////////////////////////
+ //cablescapacity[13] = ssdcableitsring3BB24pconshape[0]->Capacity()
+ // + ssdcableitsring3BB24pconshape[1]->Capacity()
+ // + ssdcableitsring3BB24pconshape[2]->Capacity()
+ // + ssdcableitsring3BB24pconshape[3]->Capacity();
+
+ // MvL: Pcon are connection to patch panels (part of)
+ // Removed; do not contribute much; put into ring structure
+ /*
+ TGeoPcon* ssdcablelay6materialbudgetpconshape =
+ new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle,ssdcableangle,2);
+ TGeoVolume* ssdcablelay6materialbudgetpcon;
+ Double_t ssdcablelay6materialbudgetpconrmin[2];
+ Double_t ssdcablelay6materialbudgetpconrmax[2];
+ Double_t ssdcablelay6materialbudgetpconzsection[2];
+ ssdcablelay6materialbudgetpconrmin[0] = ssdcableslay6rightsideradiusmax
+ + kSSDCablesLay5RightSideWaterHeight;
+ ssdcablelay6materialbudgetpconrmax[0] = ssdcablelay6materialbudgetpconrmin[0]
+ + kSSDCableMaterialBudgetHeight;
+ ssdcablelay6materialbudgetpconrmin[1] = ssdcablelay6materialbudgetpconrmin[0];
+ ssdcablelay6materialbudgetpconrmax[1] = ssdcablelay6materialbudgetpconrmax[0];
+ ssdcablelay6materialbudgetpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
+ + fgkEndCapSupportCenterLay6Position
+ + ssdcablelay6rightsidelength;
+ ssdcablelay6materialbudgetpconzsection[1] = ssdcableslay5pconwaterzsection[5];
+ for(Int_t i=0; i<2;i++) ssdcablelay6materialbudgetpconshape->DefineSection(i,
+ ssdcablelay6materialbudgetpconzsection[i],
+ ssdcablelay6materialbudgetpconrmin[i],
+ ssdcablelay6materialbudgetpconrmax[i]);
+ ssdcablelay6materialbudgetpcon = new TGeoVolume("SSDCableLay6MaterialBudgetPCon",
+ ssdcablelay6materialbudgetpconshape,fSSDCopper);
+ ssdcablelay6materialbudgetpcon->SetLineColor(9);
+ for(Int_t i=0; i<4; i++){
+ ssdcablesmother->AddNode(ssdcablelay6materialbudgetpcon,i+1,ssdcableslay5pconrot[i]);
+ ssdcablesmother->AddNode(ssdcablelay6materialbudgetpcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
+ }
+ */
+////////////////////////////////////
+ /* cablescapacity[14] = 2.*ssdcablelay6materialbudgetubeshape->Capacity();
+ cablescapacity[15] = 2.*ssdcablelay6materialbudgetpconshape->Capacity();
+ Double_t ssdcablesvolume = 0.0;
+ for(Int_t i=0;i<16;i++) ssdcablesvolume+=cablescapacity[i];
+ std::cout << ssdcablesvolume << std::endl;*/
+ // Printf(Form("Total volume (one side; without conn to patch panel): %g",totvol));
+ return ssdcablesmother;
+ }
+ ////////////////////////////////////////////////////////////////////////////////
+TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3 const * const vertexpos[4] , const Double_t* width,
+ Double_t height, const char* shapename, Int_t isign) const{