X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSv11GeometrySSD.cxx;h=03e07f32a4b7985f1f73d07b40baaf6a8249a6ee;hb=c0fc8108e5ce86afca140bfe938325bd220705ed;hp=12eea58740cd1c9f11bd81949b0785c89280b964;hpb=78e34526d7de6bcaff0ac8a7012142273f817454;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSv11GeometrySSD.cxx b/ITS/AliITSv11GeometrySSD.cxx index 12eea58740c..03e07f32a4b 100644 --- a/ITS/AliITSv11GeometrySSD.cxx +++ b/ITS/AliITSv11GeometrySSD.cxx @@ -613,6 +613,73 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(): //////////////////////// // Standard constructor //////////////////////// + + for (Int_t i=0; i < fgkcarbonfibersupportnumber; i++) { + fcarbonfibersupport[i] = 0; + fcarbonfibersupportmatrix[i] = 0; + } + for (Int_t i=0; i < fgkcarbonfiberjunctionumber; i++) { + fcarbonfiberjunctionmatrix[i] = 0; + } + for (Int_t i=0; i < fgkcarbonfiberlowersupportnumber; i++) { + fcarbonfiberlowersupport[i] = 0; + fcarbonfiberlowersupportrans[0] = 0; + } + for (Int_t i=0; i < fgkvolumekind; i++) { + fssdsensorsupport[i] = 0; + } + for (Int_t i=0; i < fgkssdsensorsupportnumber; i++) { + fssdsensorsupportmatrix[i] = 0; + } + for (Int_t i=0; i < fgkcoolingtubesupportnumber; i++) { + fcoolingtubesupportmatrix[i] = 0; + } + for (Int_t i=0; i < fgkhybridcompnumber; i++) { + fssdhybridcomponent[i] = 0; + } + for (Int_t i=0; i < fgkcoolingblocknumber; i++) { + fcoolingblockmatrix[i] = 0; + } + for (Int_t i=0; i < fgkflexnumber; i++) { + fstiffenerflexmatrix[i] = 0; + fendflexmatrix[i] = 0; + } + for (Int_t i=0; i < fgkendladdercoolingtubenumber; i++) { + fendladdercoolingtube[i] = 0; + for (Int_t j = 0; j < 2; j++) + fendladdercoolingtubematrix[i][j] = 0; + } + for (Int_t i=0; i < fgkendlabbercarbonfiberjunctionumber; i++) { + fendladdercarbonfiberjunction[i] = 0; + } + for (Int_t i=0; i < fgkendladdercabonfiberjunctionmatrixnumber; i++) { + fendladdercarbonfiberjunctionmatrix[i] = 0; + } + for (Int_t i=0; i < fgkendladdercarbonfibermatrixnumber; i++) { + fendladdercarbonfibermatrix[i] = 0; + } + for (Int_t i=0; i < fgkendladdermountingblocknumber; i++) { + fendladdermountingblockclipmatrix[i] = 0; + } + for (Int_t i = 0; i < fgkendladderlowersuppnumber+1; i++) { + fendladderlowersupptrans[i] = 0; + } + for (Int_t i = 0; i < fgkladdercablesnumber; i++) { + fladdercablematrix[i] = 0; + } + for (Int_t i = 0; i < fgkladdersegmentnumber; i++) { + fladdersegment[i] = 0; + } + for (Int_t i = 0; i < fgkladdernumber; i++) { + fladder[i] = 0; + fladdermatrix[i] = 0; + fssdsensormatrix[i] = 0; + flayermatrix[i] = 0; + } + for (Int_t i = 0; i < 2; i++) { + fLay5LadderSupport[i] = 0; + fLay6LadderSupport[i] = 0; + } } ///////////////////////////////////////////////////////////////////////////////// AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s): @@ -3370,12 +3437,10 @@ void AliITSv11GeometrySSD::GetSSDChipCables(TGeoVolume *&cableL, TGeoVolume *&ca Double_t phi = 180.; Double_t deltaphi = 180./nedges; Double_t angle = 0.0; - Double_t **xvertexpoints = new Double_t*[kssdchipcableslaynumber]; - Double_t **yvertexpoints = new Double_t*[kssdchipcableslaynumber]; - for(Int_t i=0; iAddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1, - new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0,0)); + snprintf(laddercabletransname,100,"LadderCableTrans%i",i+1); + laddercable->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1, + new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0,0)); } return laddercable; } @@ -3743,7 +3804,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdend char laddercableassemblyname[100]; TList* laddercableassemblylist = new TList(); for(Int_t i=0; iAddNode(laddercableassembly,i+1,i==0 ? NULL : new TGeoCombiTrans((n-1) @@ -4299,11 +4360,11 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ char sideladdersupportpiecename[100]; char centerladdersupportpiecename[100]; for(Int_t i=0; iDefinePolygon(vertexlist[i]->GetSize()+2, xsidevertex[i],ysidevertex[i]); sidemountingblocksupportshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1] @@ -4372,7 +4433,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ // Mounting Block Down Vertex /////////////////////////// mountingblockpiecedownshape[i] = new TGeoXtru(2); - sprintf(mountingblockpiecedownname,"MountingBlockPieceDownLay%d",i+5); + snprintf(mountingblockpiecedownname,100,"MountingBlockPieceDownLay%d",i+5); mountingblockpiecedownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]; mountingblockpiecedownyvertex[i][0] = fgkMountingBlockSupportRadius[i] + fgkMountingBlockSupportDownHeight @@ -4408,7 +4469,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ // Mounting Block Up Vertex /////////////////////////// mountingblockpieceupshape[i] = new TGeoXtru(2); - sprintf(mountingblockpieceupname,"MountingBlockPieceUpLay%d",i+5); + snprintf(mountingblockpieceupname,100,"MountingBlockPieceUpLay%d",i+5); mountingblockpieceupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]; mountingblockpieceupyvertex[i][0] = fgkMountingBlockSupportRadius[i] + fgkMountingBlockSupportUpHeight[i] @@ -4480,7 +4541,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ mountingblocksupportrapezoidownshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1] -fgkMountingBlockSupportWidth[0]); mountingblocksupportrapezoidownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]); - sprintf(mountingblocksupportrapezoidowname,"MountingBlockSuppTrapezoidDownLay%d",i+5); + snprintf(mountingblocksupportrapezoidowname,100,"MountingBlockSuppTrapezoidDownLay%d",i+5); mountingblocksupportrapezoidown[i] = new TGeoVolume(mountingblocksupportrapezoidowname, mountingblocksupportrapezoidownshape[i],fSSDCarbonFiberMedium); mountingblocksupportrapezoidown[i]->SetLineColor(9); @@ -4509,7 +4570,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ mountingblocksupportrapezoidupshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1] -fgkMountingBlockSupportWidth[0]); mountingblocksupportrapezoidupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]); - sprintf(mountingblocksupportrapezoidupname,"MountingBlockSuppTrapezoidUpLay%d",i+5); + snprintf(mountingblocksupportrapezoidupname,100,"MountingBlockSuppTrapezoidUpLay%d",i+5); mountingblocksupportrapezoidup[i] = new TGeoVolume(mountingblocksupportrapezoidupname, mountingblocksupportrapezoidupshape[i],fSSDCarbonFiberMedium); mountingblocksupportrapezoidup[i]->SetLineColor(9); @@ -4563,8 +4624,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ xmothervertex[i][7] = xmothervertex[i][6]; ymothervertex[i][7] = ymothervertex[i][0]; - sprintf(downmotheladdersupportname,"LadderSupportDownLay%d",i+5); - sprintf(upmotheladdersupportname,"LadderSupportUpLay%d",i+5); + snprintf(downmotheladdersupportname,100,"LadderSupportDownLay%d",i+5); + snprintf(upmotheladdersupportname,100,"LadderSupportUpLay%d",i+5); downmotherladdersupportshape[i] = new TGeoXtru(2); downmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]); @@ -4651,14 +4712,14 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ // Adding the Volumes to Mother Volume /////////////////////////////////////// for(Int_t j=0; j<2; j++){ - sprintf(mountingblocksupportboxdownname,"MountingBlockSuppDownLay%dBox%d",i+5,j+1); - sprintf(mountingblocksupportboxupname,"MountingBlockSuppUpLay%dBox%d",i+5,j+1); - mountingblocksupportboxdown[i][j] = new TGeoVolume(mountingblocksupportboxdownname, - mountingblocksupportboxdownshape[i][j], - fSSDCarbonFiberMedium); - mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname, - mountingblocksupportboxupshape[i][j], - fSSDCarbonFiberMedium); + snprintf(mountingblocksupportboxdownname,100,"MountingBlockSuppDownLay%dBox%d",i+5,j+1); + snprintf(mountingblocksupportboxupname,100,"MountingBlockSuppUpLay%dBox%d",i+5,j+1); + mountingblocksupportboxdown[i][j] = new TGeoVolume(mountingblocksupportboxdownname, + mountingblocksupportboxdownshape[i][j], + fSSDCarbonFiberMedium); + mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname, + mountingblocksupportboxupshape[i][j], + fSSDCarbonFiberMedium); mountingblocksupportboxdown[i][j]->SetLineColor(9); mountingblocksupportboxup[i][j]->SetLineColor(9); for(Int_t k=0; k<2; k++){ @@ -4830,7 +4891,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ for(Int_t j=0; j<2; j++) lowerladderpconsupportshape[i]->DefineSection(j, lowerladderpconezsection[j],lowerladderpconradiusmin[i], lowerladderpconradiusmax[i]); - sprintf(lowerladderpconsupportname,"LowerLadderPConSupportNameLay%d",i+5); + snprintf(lowerladderpconsupportname,100,"LowerLadderPConSupportNameLay%d",i+5); lowerladderpconsupport[i] = new TGeoVolume(lowerladderpconsupportname,lowerladderpconsupportshape[i],fSSDSupportRingAl); lowerladderpconsupport[i]->SetLineColor(fColorAl); (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],1); @@ -5268,6 +5329,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ 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; } @@ -5289,30 +5354,30 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ char endcapcoolingwatertubetorusname[100]; char endcapcoolingwatertubename[100]; for(Int_t i=0; i<5; i++){ - sprintf(endcapcoolingtubetorusname,"EndCapCoolingTubeTorus%d",i+1); - sprintf(endcapcoolingtubename,"EndCapCoolingTube%d",i+1); - sprintf(endcapcoolingwatertubetorusname,"EndCapCoolingWaterTubeTorus%d",i+1); - sprintf(endcapcoolingwatertubename,"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]); + 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]); } - 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); @@ -5753,7 +5818,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ endcapsidecoverboxtrans[2*(kendcapcoverholenumber[0]-1)+3 +i*(kendcapcoverholenumber[1]-1)+j]); } - return endcapsidecovermother; + delete [] endcapsidecoverboxtrans; + return endcapsidecovermother; } //////////////////////////////////////////////////////////////////////////////// TGeoVolume** AliITSv11GeometrySSD::GetEndCapCards() const { @@ -6809,7 +6875,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ char upendcapsupportname[100]; for(Int_t i=0; iDefinePolygon(knedges+3,xupvertex[i],yupvertex[i]); upendcapsupportshape[i]->DefineSection(0,0.); upendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth); @@ -6846,7 +6912,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ char downendcapsupportname[100]; for(Int_t i=0; iDefinePolygon(2*(knedges+1),xdownvertex[i],ydownvertex[i]); if(i==0){ @@ -6873,7 +6939,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ char endcapsupportmothername[100]; for(Int_t i=0; iDefineSection(0,0.,ydownvertex[i][0],yupvertex[i][1]); endcapsupportmothershape[i]->DefineSection(1,fgkEndCapSupportHighWidth, ydownvertex[i][0],yupvertex[i][1]); @@ -6925,7 +6991,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ char endcapsupportsystemothername[100]; for(Int_t i=0; iDefineSection(0,-(fgkEndCapCoverPlateWidth[1] - fgkEndCapCoverPlateWidth[0]),*radiusmin[i], (*radiusmax[i]*CosD(0.5*upedgeangle[i]) @@ -7753,7 +7819,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ TGeoVolume* ssdcablepatchpanel3RB26pcon = new TGeoVolume("SSDCablePatchPanel3RB26", ssdcablepatchpanel3RB26pconshape,fSSDCopper); ssdcablepatchpanel3RB26pcon->SetLineColor(9); - TGeoRotation* ssdcablepatchpanel3B26rot[3]; + 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(fgkSSDCablesPatchPanel2RB26Angle[0] @@ -7845,7 +7911,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ssdcablepatchpanel3RB24pconshape, fSSDCopper); ssdcablepatchpanel3RB24pcon->SetLineColor(9); - TGeoRotation* ssdcablepatchpanel3B24rot[3]; + 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(fgkSSDCablesPatchPanel2RB24Angle[0] @@ -8159,7 +8225,7 @@ TGeoMedium* AliITSv11GeometrySSD::GetMedium(const char* mediumName) { // Method returning the Medium type ///////////////////////////////////////////////////////////// char ch[100]; - sprintf(ch, "ITS_%s",mediumName); + snprintf(ch,100, "ITS_%s",mediumName); TGeoMedium* medium = gGeoManager->GetMedium(ch); if (! medium) AliError(Form("medium %s not found !\n", mediumName));