X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSv11GeometrySSD.cxx;h=748cd970304cf2400b6cca90e267623d940ded24;hb=24b3622cf0921b98b11fa31e0941e8c7bceb664d;hp=317e1f7d5882aa3e736330dce8dfe450a8c058ad;hpb=7708d5f33d6963dbbf55e2d64718caf89b7ffe85;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSv11GeometrySSD.cxx b/ITS/AliITSv11GeometrySSD.cxx index 317e1f7d588..748cd970304 100644 --- a/ITS/AliITSv11GeometrySSD.cxx +++ b/ITS/AliITSv11GeometrySSD.cxx @@ -29,6 +29,7 @@ #include "TList.h" #include "TGeoMatrix.h" #include "TGeoCompositeShape.h" +#include "TGeoBoolNode.h" #include "TGeoTube.h" #include "TGeoBBox.h" #include "TGeoXtru.h" @@ -37,17 +38,22 @@ #include "TGeoPcon.h" #include "TRotation.h" #include "AliITSv11GeometrySSD.h" + ///////////////////////////////////////////////////////////////////////////////// // Names of the Sensitive Volumes of Layer 5 and Layer 6 ///////////////////////////////////////////////////////////////////////////////// -const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName5 = "ITSssdSensitivL5"; -const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName6 = "ITSssdSensitivL6"; +const char* AliITSv11GeometrySSD::fgkSSDsensitiveVolName5 = "ITSssdSensitivL5"; +const char* AliITSv11GeometrySSD::fgkSSDsensitiveVolName6 = "ITSssdSensitivL6"; ///////////////////////////////////////////////////////////////////////////////// //Parameters for SSD Geometry ///////////////////////////////////////////////////////////////////////////////// // Variable for Vertical Disalignement of Modules ///////////////////////////////////////////////////////////////////////////////// +const Double_t AliITSv11GeometrySSD::fgkSSDTolerance = 0.0001*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment = 0.2*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkSSDModuleSideDisalignment = 0.2*fgkmm; +// For ladders: +const Double_t AliITSv11GeometrySSD::fgkSSDLadderVerticalDisalignment = 0.520*fgkmm; ///////////////////////////////////////////////////////////////////////////////// // Layer5 (lengths are in mm and angles in degrees) ///////////////////////////////////////////////////////////////////////////////// @@ -82,26 +88,26 @@ const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueHeight = 0.030*fgkmm ///////////////////////////////////////////////////////////////////////////////// const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerLength = 73.000*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerWidth = 6.500*fgkmm; -//const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 3.315; -const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 0.315*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 0.295*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerToChipDist = 2.500*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603CapLength = 0.900*fgkmm; // Includes solder const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Length = 1.600*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Width = 0.870*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Height = 0.800*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812CapLength = 0.215*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Length = 4.600*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Width = 3.400*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Height = 0.700*fgkmm; // multiplied by 0.5 +const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Height = 1.400*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDWireLength = 30.000*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDWireRadius = 0.185*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDConnectorPosition[2] = - {44.32*fgkmm, 0.33*fgkmm}; +const Double_t AliITSv11GeometrySSD::fgkSSDConnectorPosition[2] = {44.32*fgkmm, 0.33*fgkmm}; const Double_t AliITSv11GeometrySSD::fgkSSDConnectorSeparation = 0.44*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDConnectorLength = 2.16*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDConnectorWidth = 3.60*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDConnectorHeight = - 0.25*fgkSSDStiffenerHeight; +const Double_t AliITSv11GeometrySSD::fgkSSDConnectorHeight = 0.25*fgkSSDStiffenerHeight; const Double_t AliITSv11GeometrySSD::fgkSSDConnectorAlHeight = 0.030*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDConnectorNiHeight = 0.002*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkSSDConnectorSnHeight = 0.15*fgkmm; ///////////////////////////////////////////////////////////////////////////////// // Cooling Block (lengths are in mm and angles in degrees) ///////////////////////////////////////////////////////////////////////////////// @@ -110,7 +116,7 @@ const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockWidth = 4.000*fgkmm const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHeight[3] = {1.950*fgkmm, 0.240*fgkmm, 0.300*fgkmm}; const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleRadius[2] = - {1.000*fgkmm, 0.120*fgkmm}; + {1.025*fgkmm, 0.120*fgkmm}; // Added 50 micron tolerance for thicker wall cooling pipe (March 2010) const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleLength[2] = {1.900*fgkmm, 0.400*fgkmm}; const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleCenter = @@ -154,6 +160,7 @@ const Double_t AliITSv11GeometrySSD:: fgkSSDEndFlexCompWidth[3] = // SSD Ladder Cable (lengths are in mm and angles in degrees) ///////////////////////////////////////////////////////////////////////////////// const Double_t AliITSv11GeometrySSD::fgkSSDLadderCableWidth = 23.5*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkSSDLadderCableHeight[2] = { 0.030*fgkmm*17.5/23.5, 1.25 * 0.030*fgkmm}; // Al covers ~ 17.5/23.5 of surface, Kapton includes glue+foam ///////////////////////////////////////////////////////////////////////////////// // SSD Module (lengths are in mm and angles in degrees) ///////////////////////////////////////////////////////////////////////////////// @@ -171,7 +178,10 @@ const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportLength = const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth = 2.000*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] = - { 4.620*fgkmm, 5.180*fgkmm}; + { 4.620*fgkmm-fgkSSDModuleVerticalDisalignment, + 5.220*fgkmm-fgkSSDModuleVerticalDisalignment}; +//const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] = +// { 4.520*fgkmm, 5.130*fgkmm}; const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportThickness[2] = { 0.450*fgkmm, 0.450*fgkmm}; const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportPosition @@ -201,10 +211,12 @@ const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesHeight[4] = { 0.014*fgkmm, 0.010*fgkmm, fgkSSDModuleCoolingBlockToSensor - (fgkSSDSensorSideSupportHeight[1] - fgkSSDSensorSideSupportHeight[0]) + - fgkSSDModuleVerticalDisalignment - fgkSSDCoolingBlockHoleCenter - fgkSSDStiffenerHeight - fgkSSDChipHeight-fgkSSDSensorHeight, fgkSSDModuleCoolingBlockToSensor + - fgkSSDModuleVerticalDisalignment - fgkSSDCoolingBlockHoleCenter - fgkSSDStiffenerHeight - fgkSSDChipHeight-fgkSSDSensorHeight}; @@ -250,6 +262,7 @@ const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportYAxisLength ///////////////////////////////////////////////////////////////////////////////// // Carbon Fiber Lower Support Parameters (lengths are in mm) ///////////////////////////////////////////////////////////////////////////////// +const Double_t AliITSv11GeometrySSD::fgkLowerSupportToSensorZ = 11.575*fgkmm; const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportWidth = 0.950*fgkmm; const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportLowerLenght @@ -305,7 +318,7 @@ const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportToCarbonFiber = // Cooling Tube (lengths are in mm and angles in degrees) ///////////////////////////////////////////////////////////////////////////////// const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmax = fgkCoolingTubeSupportRmin; -const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmin = 0.96*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmin = 1.915*fgkmm/2; // Nominal + 50 micron tolerance; real pipes are closer to 450 micron wall thickness const Double_t AliITSv11GeometrySSD::fgkCoolingTubeLength = fgkCarbonFiberJunctionWidth; const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSeparation = @@ -335,7 +348,7 @@ const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleRadius = 1.0*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleEdge = 6.0*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeigth = +const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeight = 4.0*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleRadius[2] = { 1.5*fgkmm,fgkSSDMountingBlockScrewHoleEdge/6.}; @@ -356,27 +369,23 @@ const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportRadius[2] = {fgkSSDL - fgkSSDMountingBlockHeight[1] + 0.5*fgkCoolingTubeSupportHeight + fgkSSDModuleCoolingBlockToSensor - + fgkSSDModuleVerticalDisalignment - fgkMountingBlockSupportDownHeight, fgkSSDLay6RadiusMin - fgkSSDMountingBlockHeight[1] + 0.5*fgkCoolingTubeSupportHeight + fgkSSDModuleCoolingBlockToSensor - + fgkSSDModuleVerticalDisalignment - fgkMountingBlockSupportDownHeight}; const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportUpHeight[2] = {fgkSSDLay5RadiusMax - fgkSSDMountingBlockHeight[1] + 0.5*fgkCoolingTubeSupportHeight + fgkSSDModuleCoolingBlockToSensor - + fgkSSDModuleVerticalDisalignment - fgkMountingBlockSupportRadius[0], fgkSSDLay6RadiusMax - fgkSSDMountingBlockHeight[1] + 0.5*fgkCoolingTubeSupportHeight + fgkSSDModuleCoolingBlockToSensor - + fgkSSDModuleVerticalDisalignment - fgkMountingBlockSupportRadius[1]}; -const Double_t AliITSv11GeometrySSD::fgkLadderSupportHeigth = 10.0*fgkmm; // To be verified +const Double_t AliITSv11GeometrySSD::fgkLadderSupportHeight = 10.0*fgkmm; // To be verified const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay5Position = 451.35*fgkmm; const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay6Position = 510.00*fgkmm; ///////////////////////////////////////////////////////////////////////////////// @@ -485,7 +494,7 @@ const Double_t AliITSv11GeometrySSD::fgkEndCapSupportMiddleRadius[2] = {377.0*fg const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowRadius[2] = {375.0*fgkmm,435.0*fgkmm}; const Double_t AliITSv11GeometrySSD::fgkEndCapSupportHighWidth = 20.0*fgkmm; const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowWidth[2] = {3.0*fgkmm,3.0*fgkmm}; -const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5ITSPosition = 625.0*fgkmm; +const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5ITSPosition = 624.9*fgkmm; const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5Position = 2.5*fgkmm; const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6ITSPosition = 635.0*fgkmm; const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6Position = 2.5*fgkmm; @@ -514,25 +523,7 @@ const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportRadius = 297.5*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportWidth = 6.28*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportLength = 60.0*fgkmm; const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportWidth = 2.5*fgkSSDCentralSupportWidth; -///////////////////////////////////////////////////////////////////////////////// -// SSD Cables Parameters (lengths are in mm and angles in degrees) -///////////////////////////////////////////////////////////////////////////////// -const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5TubeRadiusMin = 11.9*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6TubeRadiusMin = 11.9*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideHeight = 7.*fgkmm; // to be fixed in order to reproduce material budget -const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6RightSideHeight = 7.*fgkmm; // to be fixed in order to reproduce material budget -const Double_t AliITSv11GeometrySSD::fgkSSDCableAngle = 22.5; -const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideWaterHeight = 2.5*fgkmm; // to be fixed in order to reproduce material budget -const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB26Angle[2] = {25.0,53.2}; -const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB24Angle[2] = {23.0,53.6}; -const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26ITSDistance = 975.0*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24ITSDistance = 1020.0*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = 451.3*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = 451.3*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanelHeigth = 87.5*fgkmm; -const Double_t AliITSv11GeometrySSD::fgkSSDCableMaterialBudgetHeight = 20.0*fgkmm; -//const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = fgkSSDPConeExternalRadius; -//const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = fgkSSDPConeExternalRadius; + ///////////////////////////////////////////////////////////////////////////////// ClassImp(AliITSv11GeometrySSD) ///////////////////////////////////////////////////////////////////////////////// @@ -544,6 +535,7 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(): fSSDStiffenerConnectorMedium(), fSSDStiffener0603CapacitorMedium(), fSSDStiffener1812CapacitorMedium(), + fSSDStiffenerCapacitorCapMedium(), fSSDStiffenerHybridWireMedium(), fSSDKaptonFlexMedium(), fSSDAlTraceFlexMedium(), @@ -563,6 +555,7 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(): fSSDRohaCellCone(), fSSDAir(), fSSDCopper(), + fSSDSn(), fCreateMaterials(kFALSE), fTransformationMatrices(kFALSE), fBasicObjects(kFALSE), @@ -573,6 +566,7 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(): fcoolingblocksystematrix(), fssdstiffenerflex(), fssdendflex(), + fcoolingtube(0), fendladdercoolingtubesupportmatrix(), fendladdermountingblock(), fendladdermountingblockclip(), @@ -590,6 +584,7 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(): fColorPhynox(14), fColorSilicon(3), fColorAl(38), + fColorNiSn(40), fColorKapton(6), fColorPolyhamide(5), fColorStiffener(9), @@ -600,88 +595,80 @@ AliITSv11GeometrySSD::AliITSv11GeometrySSD(): //////////////////////// // Standard constructor //////////////////////// + for(Int_t i=0; i~AliITSv11GeometrySSD(); - new(this) AliITSv11GeometrySSD(s); - return *this; -/* - if(&s == this) return *this; - fMotherVol = s.fMotherVol; - return *this; - */ -} + /////////////////////////////////////////////////////////////////////////////// void AliITSv11GeometrySSD::CreateTransformationMatrices(){ /////////////////////////////////////////////////////////////////////// @@ -984,189 +971,64 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ ///////////////////////////////////////////////////////////// TGeoRotation* localcoolingtuberot = new TGeoRotation(); localcoolingtuberot->SetAngles(0.,90.,0.); - TGeoTranslation** localcoolingtubetrans[4]; - TVector3** localcoolingtubevect[4]; - for(Int_t i=0; i<4; i++){ - localcoolingtubevect[i] = new TVector3*[2]; - localcoolingtubetrans[i] = new TGeoTranslation*[2]; - fcoolingtubematrix[i] = new TGeoHMatrix*[2]; - } - localcoolingtubevect[0][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation + TGeoTranslation* localcoolingtubetrans[2]; + TVector3* localcoolingtubevect[2]; + + localcoolingtubevect[0] = new TVector3(-0.5*(fgkCoolingTubeSeparation -fgkCarbonFiberTriangleLength), - - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+ - fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth - + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth - - 0.5*(fgkCarbonFiberLowerSupportWidth - + fgkSSDSensorCenterSupportLength - - fgkSSDSensorCenterSupportThickness[0])+ - 0.5*fgkSSDSensorLength-0.25*(fgkSSDSensorLength - - 2.0*fgkSSDModuleStiffenerPosition[1] - - 2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth) - - 0.5*fgkCoolingTubeSupportWidth, + fgkCarbonFiberJunctionWidth // Y-coord is local Z, from sensor translation + - fgkCarbonFiberLowerSupportWidth + - fgkLowerSupportToSensorZ , - 0.5*fgkCoolingTubeSupportHeight); - localcoolingtubevect[0][1] = new TVector3(localcoolingtubevect[0][0]->X(), - localcoolingtubevect[0][0]->Y()+0.5*(fgkSSDSensorLength - - 2.0*fgkSSDModuleStiffenerPosition[1] - - 2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth) - + fgkCoolingTubeSupportWidth, - localcoolingtubevect[0][0]->Z()); - localcoolingtubevect[1][0] = new TVector3(-localcoolingtubevect[0][0]->X() - + fgkCarbonFiberTriangleLength, - localcoolingtubevect[0][0]->Y(), - localcoolingtubevect[0][0]->Z()); - localcoolingtubevect[1][1] = new TVector3(-localcoolingtubevect[0][1]->X() - + fgkCarbonFiberTriangleLength, - localcoolingtubevect[0][1]->Y(), - localcoolingtubevect[0][1]->Z()); - localcoolingtubevect[2][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation - - fgkCarbonFiberTriangleLength), - - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+ - fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth - + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth - - 0.5*(fgkCarbonFiberLowerSupportWidth - + fgkSSDSensorCenterSupportLength - - fgkSSDSensorCenterSupportThickness[0]) - + fgkSSDModuleStiffenerPosition[1] - - 0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDSensorOverlap), - - 0.5*fgkCoolingTubeSupportHeight); - localcoolingtubevect[2][1] = new TVector3(-localcoolingtubevect[2][0]->X() - + fgkCarbonFiberTriangleLength, - localcoolingtubevect[2][0]->Y(), - localcoolingtubevect[2][0]->Z()); - localcoolingtubevect[3][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation - - fgkCarbonFiberTriangleLength), - - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+ - fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth - + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth - - 0.5*(fgkCarbonFiberLowerSupportWidth - + fgkSSDSensorCenterSupportLength - - fgkSSDSensorCenterSupportThickness[0]) - + fgkSSDSensorLength - - 0.5*fgkSSDModuleStiffenerPosition[1], - - 0.5*fgkCoolingTubeSupportHeight); - localcoolingtubevect[3][1] = new TVector3(-localcoolingtubevect[3][0]->X() - + fgkCarbonFiberTriangleLength, - localcoolingtubevect[3][0]->Y(), - - 0.5*fgkCoolingTubeSupportHeight); - for(Int_t i=0; i<4; i++) - for(Int_t j=0; j<2; j++){ - localcoolingtubetrans[i][j] = - new TGeoTranslation(localcoolingtubevect[i][j]->X(), - localcoolingtubevect[i][j]->Y(), - localcoolingtubevect[i][j]->Z()); - fcoolingtubematrix[i][j] = new TGeoHMatrix((*localcoolingtubetrans[i][j]) - * (*localcoolingtuberot)); - } + localcoolingtubevect[1] = new TVector3( -localcoolingtubevect[0]->X()+fgkCarbonFiberTriangleLength, + localcoolingtubevect[0]->Y(), + localcoolingtubevect[0]->Z()); + for(Int_t j=0; j<2; j++){ + localcoolingtubetrans[j] = + new TGeoTranslation(localcoolingtubevect[j]->X(), + localcoolingtubevect[j]->Y(), + localcoolingtubevect[j]->Z()); + fcoolingtubematrix[j] = new TGeoHMatrix((*localcoolingtubetrans[j]) + *(*localcoolingtuberot)); + } ///////////////////////////////////////////////////////////// // SSD End Ladder Cooling Tube Transformations ///////////////////////////////////////////////////////////// TGeoRotation* localendlladdercoolingtuberot = new TGeoRotation(); localendlladdercoolingtuberot->SetAngles(0.,90.,0.); TGeoTranslation** localendlladdercoolingtubetrans[2]; - localendlladdercoolingtubetrans[0] = new TGeoTranslation*[6]; - localendlladdercoolingtubetrans[1] = new TGeoTranslation*[4]; + localendlladdercoolingtubetrans[0] = new TGeoTranslation*[2]; + localendlladdercoolingtubetrans[1] = new TGeoTranslation*[2]; for(Int_t i=0; i<2; i++) - for(Int_t j=0; j<(i==0?6:4); j++) + for(Int_t j=0; j<2; j++) localendlladdercoolingtubetrans[i][j] = new TGeoTranslation(); + + Double_t sensZshift = 0.5*fgkCarbonFiberJunctionWidth - fgkCarbonFiberLowerSupportWidth - fgkLowerSupportToSensorZ; localendlladdercoolingtubetrans[0][0]->SetTranslation(-(fgkCoolingTubeSupportLength - fgkCoolingTubeSupportRmax) + fgkCarbonFiberJunctionLength, - 0.5*(fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[0]), + 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0]+sensZshift), - 0.5*fgkCoolingTubeSupportHeight); localendlladdercoolingtubetrans[0][1]->SetTranslation((fgkCoolingTubeSupportLength - fgkCoolingTubeSupportRmax) - fgkCarbonFiberJunctionLength + fgkCarbonFiberTriangleLength, - 0.5*(fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[0]), + 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0]+sensZshift), - 0.5*fgkCoolingTubeSupportHeight); - localendlladdercoolingtubetrans[0][2]->SetTranslation(-(fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - + fgkCarbonFiberJunctionLength, - fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[0] - + 0.5*(fgkendladdercoolingsupportdistance[0] - + fgkendladdercoolingsupportdistance[1] - + fgkCoolingTubeSupportWidth), - - 0.5*fgkCoolingTubeSupportHeight); - localendlladdercoolingtubetrans[0][3]->SetTranslation((fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - - fgkCarbonFiberJunctionLength - + fgkCarbonFiberTriangleLength, - fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[0] - + 0.5*(fgkendladdercoolingsupportdistance[0] - + fgkendladdercoolingsupportdistance[1] - + fgkCoolingTubeSupportWidth), - - 0.5*fgkCoolingTubeSupportHeight); - localendlladdercoolingtubetrans[0][4]->SetTranslation(-(fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - + fgkCarbonFiberJunctionLength, - fgkEndLadderCarbonFiberLowerJunctionLength[0] - - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0] - - fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[1] - - fgkCoolingTubeSupportWidth), - - 0.5*fgkCoolingTubeSupportHeight); - localendlladdercoolingtubetrans[0][5]->SetTranslation((fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - - fgkCarbonFiberJunctionLength - + fgkCarbonFiberTriangleLength, - fgkEndLadderCarbonFiberLowerJunctionLength[0] - - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0] - - fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[1] - - fgkCoolingTubeSupportWidth), - - 0.5*fgkCoolingTubeSupportHeight); + localendlladdercoolingtubetrans[1][0]->SetTranslation(-(fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - + fgkCarbonFiberJunctionLength, - - 0.50 * (fgkMountingBlockToSensorSupport - - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth) - - fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1] - + fgkSSDSensorOverlap - + fgkEndLadderCarbonFiberLowerJunctionLength[1] - - fgkendladdercoolingsupportdistance[2] - - fgkEndLadderMountingBlockPosition[1] - - fgkCoolingTubeSupportWidth) - + fgkEndLadderCarbonFiberLowerJunctionLength[1] - - fgkendladdercoolingsupportdistance[2] - - fgkCoolingTubeSupportWidth, + - fgkCoolingTubeSupportRmax) + + fgkCarbonFiberJunctionLength, + 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1]-sensZshift), - 0.5*fgkCoolingTubeSupportHeight); localendlladdercoolingtubetrans[1][1]->SetTranslation((fgkCoolingTubeSupportLength - fgkCoolingTubeSupportRmax) - fgkCarbonFiberJunctionLength + fgkCarbonFiberTriangleLength, - - 0.50 * (fgkMountingBlockToSensorSupport - - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth) - - fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1] - + fgkSSDSensorOverlap - + fgkEndLadderCarbonFiberLowerJunctionLength[1] - - fgkendladdercoolingsupportdistance[2] - - fgkEndLadderMountingBlockPosition[1] - - fgkCoolingTubeSupportWidth) - + fgkEndLadderCarbonFiberLowerJunctionLength[1] - - fgkendladdercoolingsupportdistance[2] - - fgkCoolingTubeSupportWidth, + 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1]-sensZshift), - 0.5*fgkCoolingTubeSupportHeight); - localendlladdercoolingtubetrans[1][2]->SetTranslation(-(fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - + fgkCarbonFiberJunctionLength, - fgkEndLadderCarbonFiberLowerJunctionLength[1] - - 0.5*fgkendladdercoolingsupportdistance[2], - - 0.5*fgkCoolingTubeSupportHeight); - localendlladdercoolingtubetrans[1][3]->SetTranslation((fgkCoolingTubeSupportLength - - fgkCoolingTubeSupportRmax) - - fgkCarbonFiberJunctionLength - + fgkCarbonFiberTriangleLength, - fgkEndLadderCarbonFiberLowerJunctionLength[1] - - 0.5*fgkendladdercoolingsupportdistance[2], - - 0.5*fgkCoolingTubeSupportHeight); - fendladdercoolingtubematrix[0] = new TGeoHMatrix*[6]; - fendladdercoolingtubematrix[1] = new TGeoHMatrix*[4]; for(Int_t i=0; i<2; i++) - for(Int_t j=0; j<(i==0?6:4); j++){ + for(Int_t j=0; j<2; j++){ fendladdercoolingtubematrix[i][j] = new TGeoHMatrix(*localendlladdercoolingtuberot); fendladdercoolingtubematrix[i][j]->MultiplyLeft(localendlladdercoolingtubetrans[i][j]); } @@ -1189,25 +1051,19 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength - fgkSSDSensorCenterSupportThickness[0]), - (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight - - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight)); + - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight + - fgkSSDModuleVerticalDisalignment)); fhybridmatrix = new TGeoHMatrix(); for(Int_t i=0; iMultiplyLeft(localhybridtrans[i]); ///////////////////////////////////////////////////////////// // SSD Cooling Block Transformations ///////////////////////////////////////////////////////////// - const Int_t kcoolingblockmatrixnumber = 4; - TGeoTranslation* localcoolingblocktrans[kcoolingblockmatrixnumber]; - localcoolingblocktrans[0] = new TGeoTranslation(-2.*(fgkCoolingTubeSupportRmax - - fgkCoolingTubeSupportRmin),0.0, - 0.5*(fgkSSDCoolingBlockHoleCenter+fgkCoolingTubeRmax)); - localcoolingblocktrans[1] = new TGeoTranslation(0.5*fgkSSDStiffenerLength - - 0.5*fgkSSDModuleSensorSupportDistance-fgkSSDCoolingBlockLength, - 0.0,fgkSSDStiffenerHeight); - localcoolingblocktrans[2] = new TGeoTranslation(*localhybridtrans[1]); - localcoolingblocktrans[3] = new TGeoTranslation(*localhybridtrans[2]); - fcoolingblocksystematrix = new TGeoHMatrix(); - for(Int_t i=0; iMultiplyLeft(localcoolingblocktrans[i]); + TGeoTranslation localcoolingblocktrans (fcoolingtubematrix[0]->GetTranslation()[0] + - 0.5*fgkSSDCoolingBlockLength, + fhybridmatrix->GetTranslation()[1]-0.5*fgkSSDStiffenerWidth, + fhybridmatrix->GetTranslation()[2]+0.5*fgkSSDStiffenerHeight+ + 0.5*(fgkSSDCoolingBlockHoleCenter+fgkCoolingTubeRmax)); + fcoolingblocksystematrix = new TGeoHMatrix(localcoolingblocktrans); ///////////////////////////////////////////////////////////// // SSD Stiffener Flex Transformations ///////////////////////////////////////////////////////////// @@ -1253,7 +1109,8 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle * TMath::DegToRad()*ssdflexradiusmax - fgkSSDFlexLength[2]-TMath::Pi() - * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]; + * fgkSSDStiffenerHeight-fgkSSDFlexLength[0] + - 0.1*fgkSSDFlexFullLength; Double_t trans = ssdflexboxlength*CosD(2.*fgkSSDFlexAngle) + (ssdflexradiusmax-fgkSSDStiffenerHeight)*SinD(2.*fgkSSDFlexAngle) + fgkSSDFlexLength[2]; @@ -1272,21 +1129,21 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ TGeoTranslation** localendladdercarbonfiberjunctiontrans[fgkendlabbercarbonfiberjunctionumber]; for(Int_t i=0; iSetAngles(120.*j,0.,0.); for(Int_t i=0; iSetTranslation(fgkCarbonFiberTriangleLength, @@ -1311,7 +1168,7 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ *localendladdercarbonfiberjunctionglobalrot[i]); } for(Int_t i=0; iSetDz(-0.5*fgkCarbonFiberLowerSupportHeight-fgkSSDTolerance); fendladderlowersupptrans[2] = new TGeoTranslation(0.0, fgkCarbonFiberLowerSupportVolumePosition[1] + fgkCarbonFiberLowerSupportVolumePosition[0], @@ -1435,6 +1293,8 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ localladdercablerot[1]->SetAngles(90.,60.,-90.); localladdercablerot[2]->SetRotation((*localladdercablerot[1]) * (*localladdercablerot[0])); + //TGeoRotation* localladdercablerot = new TGeoRotation(); + //localladdercablerot->SetAngles(90.,0.,0.); //////////////////////////////////////////// // LocalLadderCableCombiTransMatrix //////////////////////////////////////////// @@ -1537,8 +1397,9 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ beamaxistrans[i][2]*fgkCarbonFiberJunctionWidth,0.); } for(Int_t i=0; iMultiplyLeft(ladderglobalmatrix[1][i]); + for(Int_t j=0; jMultiplyLeft(ladderglobalmatrix[1][i]); + /////////////////////////////////////////// // Setting Ladder HMatrix /////////////////////////////////////////// @@ -1562,23 +1423,20 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ TGeoTranslation* localssdsensortrans[2]; for(Int_t i=0; i<2; i++) localssdsensortrans[i] = new TGeoTranslation(); localssdsensortrans[0]->SetTranslation(0.5*fgkCarbonFiberTriangleLength, - - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+ - fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth - + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth - - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength - - fgkSSDSensorCenterSupportThickness[0])+0.5*fgkSSDSensorLength, + fgkCarbonFiberJunctionWidth + - fgkCarbonFiberLowerSupportWidth + - fgkLowerSupportToSensorZ, 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight - - fgkSSDModuleCoolingBlockToSensor-0.5*fgkSSDModuleVerticalDisalignment + - fgkSSDModuleCoolingBlockToSensor + (fgkSSDSensorSideSupportHeight[1] - fgkSSDSensorSideSupportHeight[0])); localssdsensortrans[1]->SetTranslation(0.5*fgkCarbonFiberTriangleLength, - - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+ - fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth - + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth - - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength - - fgkSSDSensorCenterSupportThickness[0])+0.5*fgkSSDSensorLength, + fgkCarbonFiberJunctionWidth + - fgkCarbonFiberLowerSupportWidth + - fgkLowerSupportToSensorZ, 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight - -fgkSSDModuleCoolingBlockToSensor-0.5*fgkSSDModuleVerticalDisalignment); + -fgkSSDModuleCoolingBlockToSensor); + for(Int_t i=0; i<2; i++) localssdsensorcombitrans[i] = new TGeoCombiTrans(*localssdsensortrans[i], *localssdsensorrot); @@ -1711,17 +1569,12 @@ void AliITSv11GeometrySSD::CreateTransformationMatrices(){ delete localcoolingtubesupportrot[i]; delete localcoolingtubesupportrans[i]; } - for(Int_t i=0; i<4; i++){ - for(Int_t j=0; j<2; j++){ - delete localcoolingtubevect[i][j]; - delete localcoolingtubetrans[i][j]; - } - delete [] localcoolingtubevect[i]; - delete [] localcoolingtubetrans[i]; + for(Int_t j=0; j<2; j++){ + delete localcoolingtubevect[j]; + delete localcoolingtubetrans[j]; } delete endladdermountingblockrot; for(Int_t i=0; iAt(i); - for(Int_t i=0; iAt(fgkcoolingtubenumber+i); + CreateCoolingTubes(); ///////////////////////////////////////////////////////////// // SSD Flex ///////////////////////////////////////////////////////////// @@ -1881,9 +1729,9 @@ void AliITSv11GeometrySSD::CreateBasicObjects(){ new TGeoVolume*[fgkendlabbercarbonfiberjunctionumber]; for(Int_t i=0; iSetLineColor(fColorSilicon); ssdsensorsensitiveLay6->SetLineColor(fColorSilicon); TGeoBBox* ssdsensorinsensitiveshape[2]; @@ -1996,14 +1844,14 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){ //////////////////// vertexposition[0][0] = new TVector3(); vertexposition[0][1] = new TVector3(fgkCarbonFiberSupportXAxisLength, - fgkCarbonFiberSupportYAxisLength); + fgkCarbonFiberSupportYAxisLength, 0); vertexposition[0][2] = new TVector3(carbonfibersupportxaxisEdgeproj, carbonfibersupportxaxisEdgeproj - * TMath::Tan(theta)); + * TMath::Tan(theta), 0); vertexposition[0][3] = new TVector3(fgkCarbonFiberSupportXAxisLength - carbonfibersupportxaxisEdgeproj, fgkCarbonFiberSupportYAxisLength - - vertexposition[0][2]->Y()); + - vertexposition[0][2]->Y(), 0); //////////////////////////////////////////////////// //Setting the parameters for Isometry Transformation //////////////////////////////////////////////////// @@ -2013,11 +1861,11 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){ Double_t* param = new Double_t[4]; param[0] = 0., param[1] = 1., param[2] = 0., param[3] = -symmetryplaneposition; for(Int_t j=0; jX(), - (GetReflection(vertexposition[0][j],param))->Y()); - char* carbonfibersupportshapename[kshapesnumber] = + new TVector3((GetReflection(vertexposition[0][j],param))->X(), + (GetReflection(vertexposition[0][j],param))->Y(), 0); + const char* carbonfibersupportshapename[kshapesnumber] = {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"}; - char* carbonfibersupportname[kshapesnumber] = + const char* carbonfibersupportname[kshapesnumber] = {"CarbonFiberSupport1","CarbonFiberSupport2"}; TGeoArb8* carbonfibersupportshape[kshapesnumber]; TGeoVolume* carbonfibersupport[kshapesnumber]; @@ -2054,8 +1902,8 @@ TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){ ///////////////////////////////////////////////////////////// const Int_t kvertexnumber = 6; TGeoXtru* carbonfiberjunctionshape = new TGeoXtru(2); - Double_t reflectionparam[3] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0] - * TMath::DegToRad()),-1.,0.}; + Double_t reflectionparam[4] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0] + * TMath::DegToRad()),-1.,0.,0.}; TVector3* vertex[kvertexnumber]; vertex[0] = new TVector3(); vertex[3] = new TVector3(fgkCarbonFiberJunctionEdge[0] @@ -2063,10 +1911,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){ * TMath::DegToRad()), fgkCarbonFiberJunctionEdge[0] * TMath::Sin(fgkCarbonFiberJunctionAngle[0] - * TMath::DegToRad())); - vertex[4] = new TVector3(fgkCarbonFiberJunctionLength, - fgkCarbonFiberJunctionEdge[1]); - vertex[5] = new TVector3(fgkCarbonFiberJunctionLength); + * TMath::DegToRad()), 0); + vertex[4] = new TVector3(fgkCarbonFiberJunctionLength-fgkSSDTolerance, + fgkCarbonFiberJunctionEdge[1], 0); + vertex[5] = new TVector3(fgkCarbonFiberJunctionLength-fgkSSDTolerance, 0, 0); vertex[1] = GetReflection(vertex[5],reflectionparam); vertex[2] = GetReflection(vertex[4],reflectionparam); Double_t xvertexpoints[6], yvertexpoints[6]; @@ -2098,27 +1946,27 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){ for(Int_t i = 0; iX(), vertexposition[0][0]->X()*TMath::Tan(theta) - + fgkCarbonFiberLowerSupportVolumePosition[0]); + + fgkCarbonFiberLowerSupportVolumePosition[0], 0); vertexposition[1][1] = new TVector3(vertexposition[0][1]->X(), vertexposition[0][1]->X()*TMath::Tan(theta) - + fgkCarbonFiberLowerSupportVolumePosition[0]); - vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]); + + fgkCarbonFiberLowerSupportVolumePosition[0], 0); + vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0], 0); vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength, - fgkCarbonFiberLowerSupportVolumePosition[1]); - char* carbonfiberlowersupportshapename[kshapesnumber] = + fgkCarbonFiberLowerSupportVolumePosition[1], 0); + const char* carbonfiberlowersupportshapename[kshapesnumber] = {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"}; - char* carbonfiberlowersupportname[kshapesnumber] = + const char* carbonfiberlowersupportname[kshapesnumber] = {"CarbonFiberLowerSupport1","CarbonFiberLowerSupport2"}; TGeoArb8* carbonfiberlowersupportshape[kshapesnumber]; TGeoVolume* carbonfiberlowersupport[kshapesnumber]; @@ -2146,7 +1994,7 @@ TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){ } /////////////////////////////////////////////////////////////////////////////// TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t height, - Double_t width, Double_t* thickness)const{ + Double_t width, const Double_t* thickness)const{ ///////////////////////////////////////////////////////////// // Method generating the Sensor Support ///////////////////////////////////////////////////////////// @@ -2154,11 +2002,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t TGeoXtru* ssdsensorsupportshape = new TGeoXtru(2); TVector3* vertexposition[kvertexnumber]; vertexposition[0] = new TVector3(); - vertexposition[1] = new TVector3(0.0,length); - vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y()); - vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0]); - vertexposition[4] = new TVector3(height,vertexposition[3]->Y()); - vertexposition[5] = new TVector3(vertexposition[4]->X()); + vertexposition[1] = new TVector3(0.0,length,0); + vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y(),0); + vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0],0); + vertexposition[4] = new TVector3(height,vertexposition[3]->Y(),0); + vertexposition[5] = new TVector3(vertexposition[4]->X(),0,0); Double_t xvertexpoints[6], yvertexpoints[6]; for(Int_t i=0; iX(), @@ -2191,20 +2039,23 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){ // Vertex Positioning for TGeoXTru /////////////////////////////////////// TVector3** vertexposition = new TVector3*[kvertexnumber]; - vertexposition[0] = new TVector3(fgkCoolingTubeSupportRmin*CosD(angle), - fgkCoolingTubeSupportRmin*SinD(angle)); + + Double_t router = fgkCoolingTubeSupportRmin/CosD(phi/nedges); // Recalc inner radius so that tube fits inside + vertexposition[0] = new TVector3(router*CosD(angle), + router*SinD(angle), 0); vertexposition[1] = new TVector3(fgkCoolingTubeSupportRmax*CosD(angle), - fgkCoolingTubeSupportRmax*SinD(angle)); + fgkCoolingTubeSupportRmax*SinD(angle),0); vertexposition[2] = new TVector3(vertexposition[1]->X(), - fgkCoolingTubeSupportRmax); + fgkCoolingTubeSupportRmax, 0); vertexposition[3] = new TVector3(-vertexposition[1]->X(), - fgkCoolingTubeSupportRmax); + fgkCoolingTubeSupportRmax, 0); vertexposition[4] = new TVector3(-vertexposition[1]->X(), - vertexposition[1]->Y()); + vertexposition[1]->Y(), 0); + for(Int_t i=0; iX(),-virtualvertex[0]->Y()); - virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y()); - virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight); - virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y()); - virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y()); - virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y()); - virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y()); + virtualvertex[0] = new TVector3(-fgkCoolingTubeSupportRmax,-fgkCoolingTubeSupportRmax, 0); + virtualvertex[1] = new TVector3(virtualvertex[0]->X(),-virtualvertex[0]->Y(),0); + virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y(),0); + virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight,0); + virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y(),0); + virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y(),0); + virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y(),0); + virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y(),0); Double_t xmothervertex[kvirtualvertexnumber], ymothervertex[kvirtualvertexnumber]; for(Int_t i=0; i< kvirtualvertexnumber; i++) xmothervertex[i] = virtualvertex[i]->X(), @@ -2321,8 +2172,10 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){ ymothervertex); virtualCoolingTubeSupportShape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth); virtualCoolingTubeSupportShape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth); - TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport", - virtualCoolingTubeSupportShape,fSSDAir); + /*TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport", + virtualCoolingTubeSupportShape,fSSDAir); */ + TGeoVolume* virtualcoolingtubesupport = new TGeoVolumeAssembly("CoolingTubeSupport"); + //////////////////////////////////////// // Positioning Volumes in Virtual Volume //////////////////////////////////////// @@ -2331,18 +2184,18 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){ virtualcoolingtubesupport->AddNode(coolingtubesupportarc,1,coolingtubesupportrot); virtualcoolingtubesupport->AddNode(coolingtubesupportbox,1); virtualcoolingtubesupport->AddNode(coolingtubesupportseg,1); - virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot); - virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot); - virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1); - virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1); + //virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot); + //virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot); + //virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1); + //virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1); ///////////////////////////////////////////////////////////// // Deallocating memory ///////////////////////////////////////////////////////////// delete [] vertexposition; - delete xvertexpoints; - delete yvertexpoints; - delete xvert; - delete yvert; + delete [] xvertexpoints; + delete [] yvertexpoints; + delete [] xvert; + delete [] yvert; for(Int_t i=0; i< kvirtualvertexnumber; i++) delete virtualvertex[i]; ///////////////////////////////////////////////////////////// @@ -2367,109 +2220,135 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){ // Mother Volumes Containers ///////////////////////////////////////////////////////////// const Int_t kmothernumber = 2; - const Int_t kmothervertexnumber = 12; + const Int_t kmothervertexnumber = 8; Double_t xmothervertex[kmothernumber][kmothervertexnumber]; Double_t ymothervertex[kmothernumber][kmothervertexnumber]; - /////////////////////// - // Setting the vertices - /////////////////////// - xmothervertex[0][0] = -0.5*fgkSSDStiffenerLength; - xmothervertex[0][1] = xmothervertex[0][0]; - xmothervertex[0][2] = fgkSSDFlexLength[0]-0.5*fgkSSDStiffenerLength; - xmothervertex[0][3] = xmothervertex[0][2]; - xmothervertex[0][4] = xmothervertex[0][0]; - xmothervertex[0][5] = xmothervertex[0][4]; - xmothervertex[0][6] = -xmothervertex[0][0]; - xmothervertex[0][7] = xmothervertex[0][6]; - xmothervertex[0][8] = -xmothervertex[0][2]; - xmothervertex[0][9] = xmothervertex[0][8]; - xmothervertex[0][10] = xmothervertex[0][7]; - xmothervertex[0][11] = xmothervertex[0][10]; - for(Int_t i=0; iDefinePolygon(kmothervertexnumber,xmothervertex[i], - ymothervertex[i]); - ssdhybridmothershape[i]->DefineSection(0,-0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight - -fgkSSDChipCablesHeight[i+2]); - ssdhybridmothershape[i]->DefineSection(1, 0.5*fgkSSDStiffenerHeight); - ssdhybridmother[i] = new TGeoVolume(ssdhybridmothername[i],ssdhybridmothershape[i], - fSSDAir); + xmothervertex[i][0] = -0.5*fgkSSDStiffenerWidth; + ymothervertex[i][0] = 0.5*fgkSSDStiffenerHeight; + xmothervertex[i][1] = -0.5*fgkSSDStiffenerWidth; + ymothervertex[i][1] = -0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight + -fgkSSDChipCablesHeight[i+2]; + + xmothervertex[i][2] = 0.5*(fgkSSDSensorLength-ssdstiffenerseparation); //0.5*fgkSSDStiffenerWidth; + ymothervertex[i][2] = -0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight -fgkSSDChipCablesHeight[i+2]; + xmothervertex[i][3] = xmothervertex[i][2]; + ymothervertex[i][3] = ymothervertex[i][2]+fgkSSDChipCablesHeight[0]+fgkSSDChipCablesHeight[1]+fgkSSDTolerance; + + xmothervertex[i][4] = xmothervertex[i][2]-0.4; + ymothervertex[i][4] = ymothervertex[i][3]; + xmothervertex[i][5] = xmothervertex[i][4]; + ymothervertex[i][5] = ymothervertex[i][4]+2*ssdchipcablesradius[i]-fgkSSDTolerance; + + xmothervertex[i][6] = 0.5*fgkSSDStiffenerWidth+ssdchipcablesradius[i]+0.3*fgkmm; + ymothervertex[i][6] = ymothervertex[i][5]; + + xmothervertex[i][7] = xmothervertex[i][6]; + ymothervertex[i][7] = 0.5*fgkSSDStiffenerHeight; + TGeoXtru *shape = new TGeoXtru(2); + shape->DefinePolygon(8,xmothervertex[i],ymothervertex[i]); + shape->DefineSection(0,-0.5*fgkSSDStiffenerLength); + shape->DefineSection(1,0.5*fgkSSDStiffenerLength); + ssdhybridmother[i][0] = new TGeoVolume(TString(ssdhybridmothername[i])+"L",shape,fSSDAir); + ssdhybridmother[i][1] = new TGeoVolume(TString(ssdhybridmothername[i])+"R",shape,fSSDAir); + ssdhybridassembly[i] = new TGeoVolumeAssembly(ssdhybridmothername[i]); } ///////////////////////////////////////////////////////////// // SSD Stiffener ///////////////////////////////////////////////////////////// TGeoBBox* ssdstiffenershape = new TGeoBBox("SSDStiffenerShape", 0.5*fgkSSDStiffenerLength, - 0.5*fgkSSDStiffenerWidth, + 0.5*(fgkSSDStiffenerWidth-fgkSSDTolerance), 0.5*fgkSSDStiffenerHeight); TGeoVolume* ssdstiffener = new TGeoVolume("SSDStiffener",ssdstiffenershape, fSSDStiffenerMedium); ssdstiffener->SetLineColor(fColorStiffener); - TGeoTranslation* ssdstiffenertrans[kssdstiffenernumber]; - for(Int_t i=0; iSetLineColor(fColorAl); + TGeoTranslation *cap0603trans = new TGeoTranslation(0.,0.,0.); + capacitor0603mother->AddNode(capacitor0603,1,cap0603trans); + + TGeoBBox* capacitor0603capshape = new TGeoBBox("Capacitor0603CapShape", + 0.5*fgkSSDCapacitor0603CapLength, + 0.5*fgkSSDCapacitor0603Width, + 0.5*fgkSSDCapacitor0603Height); + TGeoVolume* capacitor0603cap = new TGeoVolume("Capacitor0603Cap",capacitor0603capshape, + fSSDStiffenerCapacitorCapMedium); + capacitor0603cap->SetLineColor(fColorNiSn); + TGeoTranslation *cap0603captrans1 = new TGeoTranslation(- capacitor0603shape->GetDX() - capacitor0603capshape->GetDX(),0.,0.); + capacitor0603mother->AddNode(capacitor0603cap,1,cap0603captrans1); + TGeoTranslation *cap0603captrans2 = new TGeoTranslation(capacitor0603shape->GetDX() + capacitor0603capshape->GetDX(),0.,0.); + capacitor0603mother->AddNode(capacitor0603cap,2,cap0603captrans2); + + + TGeoVolume* ssdchip = GetSSDChip(); + + const Int_t knedges = 5; + TGeoVolume *ssdchipcables[2]; + for(Int_t i=0; iAddNode(ssdstiffener,1,hybridmotherrotInv); + for(Int_t k=1; kAddNode(capacitor0603mother,k, + new TGeoCombiTrans("", + -0.5*(fgkSSDStiffenerWidth - fgkSSDCapacitor0603Width), + -0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height), + (k-3.)/6*fgkSSDStiffenerLength, + hybridmotherrotInv)); + } + } + + GetSSDChipCables(ssdchipcables[0],ssdchipcables[1],fgkSSDChipCablesHeight[i+2],knedges); + for(Int_t k=0; kAddNode(ssdstiffener,j+1,ssdstiffenertrans[j]); - for(Int_t k=1; kAddNode(capacitor0603,knapacitor0603number*j+k, - new TGeoTranslation((k-3.)/6*fgkSSDStiffenerLength, - j*ssdstiffenerseparation - + 0.5*((j==0? 1:-1)*fgkSSDStiffenerWidth - + (j==0? -1:+1)*fgkSSDCapacitor0603Width), - - 0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height))); - } - } - ssdhybridmother[i]->AddNode((TGeoVolume*)ssdchipsystemlist->At(i),i+1,ssdchipsystemtrans); - ssdhybridlist->Add(ssdhybridmother[i]); + ssdhybridmother[i][j]->AddNode(ssdchipcables[j],k+1,chipcabletrans); + ssdhybridmother[i][j]->AddNode(ssdchip,k+1,chiptrans); + } + } + // Final placement by assembly + ssdhybridassembly[i]->AddNode(ssdhybridmother[i][0],1,new TGeoCombiTrans(TGeoTranslation("",0,0,0),hybridmotherrotL)); + ssdhybridassembly[i]->AddNode(ssdhybridmother[i][1],1,new TGeoCombiTrans(TGeoTranslation("",0,ssdstiffenerseparation,0),hybridmotherrotR)); + ssdhybridlist->Add(ssdhybridassembly[i]); } -///////////////////////////////////////////////////////////// -// Mother Volume Containing Capacitor Part -///////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////// + // Mother Volume Containing Capacitor Part + ///////////////////////////////////////////////////////////// const Int_t kcapacitormothernumber = 8; Double_t xcapacitorvertex[kcapacitormothernumber]; Double_t ycapacitorvertex[kcapacitormothernumber]; @@ -2497,30 +2376,37 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){ ycapacitorvertex); ssdhybridcapacitormothershape->DefineSection(0,0.5*fgkSSDStiffenerHeight); ssdhybridcapacitormothershape->DefineSection(1, 0.5*fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height); - TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape, - fSSDAir); +// TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape, +// fSSDAir); + TGeoVolumeAssembly* ssdhybridcapacitormother = new TGeoVolumeAssembly("SSDHybridCapacitorMother"); //////////////////////////// // Connector /////////////////////////// - const Int_t kssdconnectornumber = 2; - TGeoBBox* ssdconnectorshape[kssdconnectornumber]; + const Int_t kssdconnectorlayernumber = 3; + TGeoBBox* ssdconnectorshape[kssdconnectorlayernumber]; + Double_t ssdConnectorThickness[kssdconnectorlayernumber]={fgkSSDConnectorAlHeight,fgkSSDConnectorNiHeight,fgkSSDConnectorSnHeight}; + /* Double_t ssdAlconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorAlHeight)}; Double_t ssdNiconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorNiHeight) + fgkSSDConnectorAlHeight}; - const char* ssdconnectorname[kssdconnectornumber] = {"SSDConnectorAl","SSDConnectorNi"}; - TGeoVolume* ssdconnector[kssdconnectornumber]; - for(Int_t i=0; iSetLineColor(i==0 ? fColorAl : fColorPhynox); + ssdConnectorMedium[i]); + ssdconnector[i]->SetLineColor(i==0 ? fColorAl : fColorNiSn); } - TGeoTranslation* ssdconnectortrans[2*kssdconnectornumber]; + const Int_t kssdconnectornumber = 4; + TGeoTranslation* ssdconnectortrans[kssdconnectornumber]; ssdconnectortrans[0] = new TGeoTranslation(-ssdstiffenershape->GetDX() + fgkSSDConnectorPosition[0] - fgkSSDConnectorSeparation @@ -2548,25 +2434,49 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){ -(ssdstiffenershape->GetDY() - fgkSSDConnectorPosition[1] - ssdconnectorshape[0]->GetDY()),0.0); - for(Int_t i=0; i<2*kssdconnectornumber; i++) - for(Int_t j=0; jAddNode(ssdconnector[j],i+1,ssdconnectortrans[i]); + for(Int_t i=0; iAddNode(ssdconnector[j],i+1,ssdconnectortrans[i]); + } //////////////////////////// // Capacitor 1812-330 nF /////////////////////////// - Double_t ssdcapacitor1812origin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)}; +// Double_t ssdcapacitor1812origin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)}; TGeoBBox* capacitor1812shape = new TGeoBBox("Capacitor1812Shape", 0.5*fgkSSDCapacitor1812Length, 0.5*fgkSSDCapacitor1812Width, - 0.5*fgkSSDCapacitor1812Height, - ssdcapacitor1812origin); + 0.5*fgkSSDCapacitor1812Height); + // ssdcapacitor1812origin); TGeoVolume* capacitor1812 = new TGeoVolume("Capacitor1812",capacitor1812shape, fSSDStiffener1812CapacitorMedium); capacitor1812->SetLineColor(fColorAl); TGeoTranslation* capacitor1812trans = new TGeoTranslation(0.0, 0.5*fgkSSDStiffenerWidth+ssdstiffenerseparation - - capacitor1812shape->GetDY()-fgkSSDConnectorPosition[1],0.0); + - capacitor1812shape->GetDY()-fgkSSDConnectorPosition[1],0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)); ssdhybridcapacitormother->AddNode(capacitor1812,1,capacitor1812trans); + + TGeoBBox* capacitor1812capshape = new TGeoBBox("Capacitor1812CapShape", + 0.5*fgkSSDCapacitor1812CapLength, 0.5*fgkSSDCapacitor1812Width, + 0.5*fgkSSDCapacitor1812Height); + TGeoVolume* capacitor1812cap = new TGeoVolume("Capacitor1812Cap",capacitor1812capshape, + fSSDStiffenerCapacitorCapMedium); + capacitor1812cap->SetLineColor(fColorNiSn); + TGeoTranslation* capacitor1812captrans1 = new TGeoTranslation( + - capacitor1812shape->GetDX() - capacitor1812capshape->GetDX(), + 0.5*fgkSSDStiffenerWidth+ssdstiffenerseparation + - capacitor1812shape->GetDY() - fgkSSDConnectorPosition[1], + 0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)); + ssdhybridcapacitormother->AddNode(capacitor1812cap,1,capacitor1812captrans1); + TGeoTranslation* capacitor1812captrans2 = new TGeoTranslation( + capacitor1812shape->GetDX() + capacitor1812capshape->GetDX(), + 0.5*fgkSSDStiffenerWidth+ssdstiffenerseparation + - capacitor1812shape->GetDY() - fgkSSDConnectorPosition[1], + 0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)); + ssdhybridcapacitormother->AddNode(capacitor1812cap,2,capacitor1812captrans2); + //////////////////////////// //Hybrid Wire //////////////////////////// @@ -2575,8 +2485,8 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){ - fgkSSDConnectorSeparation; Double_t wirey = ssdstiffenerseparation+fgkSSDStiffenerWidth - 2.*fgkSSDConnectorPosition[1]-fgkSSDConnectorWidth; - Double_t ssdwireradius = TMath::Sqrt(TMath::Power(wirex,2.) - + TMath::Power(wirey,2)); + Double_t ssdwireradius = TMath::Sqrt(wirex*wirex+wirey*wirey); + Double_t wireangle = TMath::ATan(wirex/wirey); TGeoTube *hybridwireshape = new TGeoTube("HybridWireShape", 0., fgkSSDWireRadius, 0.5*ssdwireradius); @@ -2590,7 +2500,7 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){ 0.5*ssdwireradius-0.5*fgkSSDStiffenerWidth + fgkSSDConnectorPosition[1]+0.5*fgkSSDConnectorWidth, ssdstiffenershape->GetDZ() - + fgkSSDWireRadius+fgkSSDConnectorAlHeight+fgkSSDConnectorNiHeight, + + fgkSSDWireRadius+fgkSSDConnectorAlHeight+fgkSSDConnectorNiHeight+fgkSSDConnectorSnHeight, new TGeoRotation("HybridWireRot1",0.,90.,0.)); hybridwirecombitrans[1] = new TGeoCombiTrans("HybridWireCombiTrans2", 0.0, @@ -2608,7 +2518,6 @@ TList* AliITSv11GeometrySSD::GetSSDHybridParts(){ ///////////////////////////////////////////////////////////// delete hybridwirecombitrans[0]; delete hybridwirecombitrans[1]; - delete ssdchipsystemlist; return ssdhybridlist; ///////////////////////////////////////////////////////////// } @@ -2623,115 +2532,39 @@ TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){ localcoolingblockrot->SetAngles(0.,90.,0.); TGeoCombiTrans localcoolingblockmatrix(0.,0.5*fgkSSDCoolingBlockWidth,0.,localcoolingblockrot); TVector3* coolingblocktransvector; - coolingblocktransvector = new TVector3(fgkSSDModuleSensorSupportDistance - + fgkSSDCoolingBlockLength, + coolingblocktransvector = new TVector3(fgkCoolingTubeSeparation, fgkSSDSensorLength - 2.*fgkSSDModuleStiffenerPosition[1] - - fgkSSDCoolingBlockWidth); + - fgkSSDCoolingBlockWidth, 0); const Int_t kcoolingblocktransnumber = 2; const Int_t kcoolingblocknumber = 4; TGeoHMatrix* coolingblockmatrix[kcoolingblocknumber]; - TGeoHMatrix* coolingtubematrix[kcoolingblocknumber]; TGeoRotation* localcoolingtuberot = new TGeoRotation(); localcoolingtuberot->SetAngles(0.0,90.0,0.0); - TGeoTranslation* localcoolingtubetrans = new TGeoTranslation(); - localcoolingtubetrans->SetTranslation(0.5*fgkSSDCoolingBlockLength, - 0.5*fgkSSDCoolingBlockWidth, - fgkSSDCoolingBlockHoleCenter); - TGeoCombiTrans localcoolingtubematrix (*localcoolingtubetrans,*localcoolingtuberot); - Double_t coolingtubedistance = fgkCoolingTubeSupportRmax-fgkCoolingTubeSupportRmin; for(Int_t i=0; iX()+2*coolingtubedistance, + TGeoTranslation localcoolingblocktrans(i*coolingblocktransvector->X(),//+2*coolingtubedistance, j*coolingblocktransvector->Y(), - 0.5*(fgkSSDCoolingBlockHoleCenter + fgkCoolingTubeRmax)); coolingblockmatrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingblockmatrix); - coolingtubematrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingtubematrix); } } - ///////////////////////////////////////////////////////////// - // Virtual Volume containing CoolingBlock System - ///////////////////////////////////////////////////////////// - TGeoXtru* coolingsystemothershape = new TGeoXtru(2); - const Int_t kmothervertexnumber = 16; - Double_t xmothervertex[kmothervertexnumber]; - Double_t ymothervertex[kmothervertexnumber]; - /////////////////////// - // Setting the vertices - ///////////////////////fgkCoolingTubeSupportRmax - xmothervertex[0] = 0.0,ymothervertex[0] = 0.0; - xmothervertex[1] = xmothervertex[0], ymothervertex[1] = coolingblocktransvector->Y() - + fgkSSDCoolingBlockWidth; - xmothervertex[2] = coolingblocktransvector->X() - + fgkSSDCoolingBlockLength - + 4*coolingtubedistance; - ymothervertex[2] = ymothervertex[1]; - xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0]; - xmothervertex[4] = xmothervertex[3]-2.*coolingtubedistance-fgkSSDCoolingBlockLength; - ymothervertex[4] = ymothervertex[0]; - xmothervertex[5] = xmothervertex[4], ymothervertex[5] = fgkSSDCoolingBlockWidth; - xmothervertex[6] = xmothervertex[3]-coolingtubedistance; - ymothervertex[6] = ymothervertex[5]; - xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2] - - fgkSSDCoolingBlockWidth; - xmothervertex[8] = xmothervertex[5], ymothervertex[8] = ymothervertex[7]; - xmothervertex[9] = xmothervertex[8], ymothervertex[9] = ymothervertex[2] - - coolingtubedistance; - xmothervertex[10] = fgkSSDCoolingBlockLength+2.*coolingtubedistance; - ymothervertex[10] = ymothervertex[9]; - xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[8]; - xmothervertex[12] = coolingtubedistance, ymothervertex[12] = ymothervertex[11]; - xmothervertex[13] = xmothervertex[12], ymothervertex[13] = fgkSSDCoolingBlockWidth; - xmothervertex[14] = 2.*coolingtubedistance+fgkSSDCoolingBlockLength; - ymothervertex[14] = ymothervertex[13]; - xmothervertex[15] = xmothervertex[14], ymothervertex[15] = ymothervertex[0]; - ////////////////////////////////////////////////////////// - coolingsystemothershape->DefinePolygon(kmothervertexnumber, - xmothervertex,ymothervertex); - coolingsystemothershape->DefineSection(0,-0.5*(fgkSSDCoolingBlockHoleCenter - + fgkCoolingTubeRmax)); - coolingsystemothershape->DefineSection(1, 0.5*(fgkSSDCoolingBlockHoleCenter - + fgkCoolingTubeRmax)); - TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem", - coolingsystemothershape,fSSDAir); - ///////////////////////////////////////////////////////////// - // SSD Cooling Tube Part - ///////////////////////////////////////////////////////////// - TGeoTube* coolingtubeshape[fgkcoolingtubenumber]; - coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.5*fgkSSDCoolingBlockWidth); - coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - 0.5*fgkSSDCoolingBlockWidth); - TGeoVolume* coolingtube[fgkcoolingtubenumber]; - coolingtube[0] = new TGeoVolume("OuterCoolingTube",coolingtubeshape[0], - fSSDCoolingTubePhynox); - coolingtube[1] = new TGeoVolume("InnerCoolingTube",coolingtubeshape[1], - fSSDCoolingTubeWater); - coolingtube[0]->SetLineColor(fColorPhynox); - coolingtube[1]->SetLineColor(fColorWater); + TGeoVolume* coolingsystemother = new TGeoVolumeAssembly("CoolingBlockSystem"); TGeoVolume* ssdcoolingblock = GetSSDCoolingBlock(30); ///////////////////////////////////////////////////////////// // Adding Cooling block to mother volume ///////////////////////////////////////////////////////////// - for(Int_t i=0; iAddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]); - coolingsystemother->AddNode(coolingtube[0],i+1,coolingtubematrix[i]); - coolingsystemother->AddNode(coolingtube[1],i+1,coolingtubematrix[i]); + for(Int_t i=0; iAddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]); } ///////////////////////////////////////////////////////////// // Deallocating memory ///////////////////////////////////////////////////////////// - delete coolingblocktransvector; - delete localcoolingblockrot; - delete localcoolingtubetrans; - delete localcoolingtuberot; - ///////////////////////////////////////////////////////////// - // Checking overlaps - ///////////////////////////////////////////////////////////// - //coolingsystemother->CheckOverlaps(0.01); - ///////////////////////////////////////////////////////////// - return coolingsystemother; + delete coolingblocktransvector; + delete localcoolingblockrot; + + return coolingsystemother; } ///////////////////////////////////////////////////////////////////////////////// TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{ @@ -2812,8 +2645,9 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{ ymothervertex); ssdflexmothershape->DefineSection(0,-1.5*fgkSSDFlexHeight[0]-2.*fgkSSDFlexHeight[1]); ssdflexmothershape->DefineSection(1, 0.5*fgkSSDFlexHeight[0]); - TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape, - fSSDAir); + TGeoVolumeAssembly* ssdflexmother = new TGeoVolumeAssembly("SSDFlexMother"); +// TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape, +// fSSDAir); ///////////////////////////////////////////////////////////// // SSDFlex Layer Shapes ///////////////////////////////////////////////////////////// @@ -2842,7 +2676,6 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{ + fgkSSDFlexHeight[1])); ssdflexmother->AddNode(ssdflex[i],1,ssdflextrans[i]); } - //ssdflexmother->CheckOverlaps(0.01); return ssdflexmother; } ///////////////////////////////////////////////////////////////////////////////// @@ -2855,7 +2688,8 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){ Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle * TMath::DegToRad()*ssdflexradiusmax - fgkSSDFlexLength[2]-TMath::Pi() - * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]; + * fgkSSDStiffenerHeight-fgkSSDFlexLength[0] + - 0.1*fgkSSDFlexFullLength; const Int_t knedges = 20; const Int_t karcnumber = 2; TVector3* vertexposition[karcnumber*(knedges+1)]; @@ -2867,14 +2701,14 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){ TVector3* referencetrans[karcnumber]; referencetrans[0] = new TVector3(ssdflexboxlength*CosD(2.*fgkSSDFlexAngle) + radius[0]*SinD(2.*fgkSSDFlexAngle), - radius[0]); + radius[0], 0); referencetrans[1] = new TVector3(referencetrans[0]->X() + fgkSSDFlexLength[2], - - fgkSSDStiffenerHeight); + - fgkSSDStiffenerHeight, 0); for(Int_t i=0; iX(),transvector[i]->Y()); - vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y()); + vertex[i][0] = new TVector3(transvector[i]->X(),transvector[i]->Y(),0); + vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y(),0); for(Int_t j=0; jX()*ratioradius[0][i+1], - vertexposition[j]->Y()*ratioradius[0][i+1]); + vertexposition[j]->Y()*ratioradius[0][i+1], 0); vertex[i][j+2]->RotateZ(referenceangle[0]); *vertex[i][j+2] += *referencetrans[0]; vertex[i][4*(knedges+1)-j+1] = new TVector3(vertexposition[j]->X()*ratioradius[0][i], - vertexposition[j]->Y()*ratioradius[0][i]); + vertexposition[j]->Y()*ratioradius[0][i], 0); vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[0]); *vertex[i][4*(knedges+1)-j+1] += *referencetrans[0]; } else{ vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[1][i+1], - vertexposition[j]->Y()*ratioradius[1][i+1]); + vertexposition[j]->Y()*ratioradius[1][i+1],0); vertex[i][j+2]->RotateZ(referenceangle[1]); *vertex[i][j+2] += *referencetrans[1]; vertex[i][4*(knedges+1)-j+1] = new TVector3(vertexposition[j]->X()*ratioradius[1][i], - vertexposition[j]->Y()*ratioradius[1][i]); + vertexposition[j]->Y()*ratioradius[1][i], + 0); vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[1]); *vertex[i][4*(knedges+1)-j+1] += *referencetrans[1]; } @@ -2958,8 +2793,9 @@ for(Int_t i=0; iDefineSection(0,-0.5*fgkSSDFlexWidth[0]); ssdendflexmothershape->DefineSection(1, 0.5*fgkSSDFlexWidth[0]); - TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother", - ssdendflexmothershape,fSSDAir); +// TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother", +// ssdendflexmothershape,fSSDAir); + TGeoVolumeAssembly* ssdendflexmother = new TGeoVolumeAssembly("SSDEndFlexMother"); ////////////////////////////////////// // End Flex TGeoXtru Layer Definition ////////////////////////////////////// @@ -3021,8 +2857,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ - fgkSSDMountingBlockScrewHoleRadius[0]; xvertex[7] = xvertex[6]; yvertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor - + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0] - - fgkSSDModuleVerticalDisalignment; + + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0]; yvertex[1] = 0.5*fgkSSDMountingBlockHeight[0]; yvertex[2] = yvertex[1]; yvertex[3] = fgkSSDMountingBlockHeight[1]-yvertex[1]; @@ -3031,6 +2866,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ - fgkSSDMountingBlockHeight[0]; yvertex[6] = yvertex[5]; yvertex[7] = yvertex[0]; + /////////////////////////////////////////////////////////////////////// // TGeoXTru Volume definition for Mounting Block Part /////////////////////////////////////////////////////////////////////// @@ -3063,7 +2899,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ screwvertex[i] = new TVector3(fgkSSDMountingBlockScrewHoleRadius[0] *CosD(phi0+i*deltaphi), fgkSSDMountingBlockScrewHoleRadius[0] - *SinD(phi0+i*deltaphi)); + *SinD(phi0+i*deltaphi), 0); Double_t xscrewvertex[kscrewvertexnumber+6]; Double_t yscrewvertex[kscrewvertexnumber+6]; xscrewvertex[0] = - fgkSSDMountingBlockScrewHoleRadius[0]; @@ -3152,11 +2988,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ xmothervertex[6] = xvertex[5]+fgkSSDMountingBlockLength[2]; ymothervertex[6] = ymothervertex[5]; xmothervertex[7] = xmothervertex[6]; - ymothervertex[7] = ymothervertex[4]; + ymothervertex[7] = ymothervertex[4] - fgkSSDTolerance; xmothervertex[8] = xmothervertex[7] + 0.5*(fgkSSDMountingBlockLength[1] - fgkSSDMountingBlockLength[2]); - ymothervertex[8] = ymothervertex[4]; + ymothervertex[8] = ymothervertex[7]; xmothervertex[9] = xmothervertex[8]; ymothervertex[9] = ymothervertex[2]; xmothervertex[10] = xvertex[0]+fgkSSDMountingBlockLength[0]; @@ -3209,8 +3045,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ xmothervertex[8] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1]); xmothervertex[9] = xmothervertex[8]; ymothervertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor - + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0] - - fgkSSDModuleVerticalDisalignment; + + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0]; ymothervertex[1] = 0.5*fgkSSDMountingBlockHeight[0]+fgkMountingBlockClipThickness; ymothervertex[2] = ymothervertex[1]; ymothervertex[3] = ymothervertex[2]+(fgkSSDMountingBlockHeight[1] @@ -3222,6 +3057,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ ymothervertex[7] = ymothervertex[6]-fgkMountingBlockClipThickness; ymothervertex[8] = ymothervertex[7]; ymothervertex[9] = ymothervertex[0]; + /////////////////////////////////////////////////////////////////////// // TGeoXTru Volume definition for Mounting Block Clip Part /////////////////////////////////////////////////////////////////////// @@ -3285,7 +3121,7 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ Int_t edgesnumber[2] = {50,6}; Double_t section[2] = {-0.5*(ymothervertex[3]-ymothervertex[2]), +0.5*(ymothervertex[3]-ymothervertex[2])}; - TGeoXtru* clipscrewshape = GetScrewShape(radius,edgesnumber,section); + TGeoShape* clipscrewshape = GetScrewShape(radius,edgesnumber,section); TGeoVolume* clipscrew = new TGeoVolume("ClipScrewShape",clipscrewshape,fSSDSupportRingAl); clipscrew->SetLineColor(12); TGeoRotation* screwrot = new TGeoRotation(); @@ -3311,183 +3147,87 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){ return ssdmountingblockclip; } /////////////////////////////////////////////////////////////////////////////// -TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{ +void AliITSv11GeometrySSD::CreateCoolingTubes() { ///////////////////////////////////////////////////////////// // Method generating the Cooling Tube + // sets fcoolingtube and returns list for endladdercoolingtube ///////////////////////////////////////////////////////////// - TGeoTube** coolingtubeshape[fgkcoolingtubenumber]; - for(Int_t i=0; iGetDz()); - coolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.5*(fgkSSDModuleStiffenerPosition[1] - - fgkSSDSensorOverlap)); - coolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - coolingtubeshape[1][0]->GetDz()); - coolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.5*fgkSSDModuleStiffenerPosition[1]); - coolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - coolingtubeshape[2][0]->GetDz()); - // End Ladder Cooling Tubes - TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber]; - for(Int_t i=0; iGetDz()); - endladdercoolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.50 * (fgkendladdercoolingsupportdistance[0] - + fgkendladdercoolingsupportdistance[1] - - fgkCoolingTubeSupportWidth)); - endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - endladdercoolingtubeshape[1][0]->GetDz()); - endladdercoolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0] - - fgkEndLadderMountingBlockPosition[0] - - fgkendladdercoolingsupportdistance[1] - - fgkCoolingTubeSupportWidth)); - endladdercoolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - endladdercoolingtubeshape[2][0]->GetDz()); - endladdercoolingtubeshape[3][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.50 * (fgkMountingBlockToSensorSupport - - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth) - - fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1] - + fgkSSDSensorOverlap - + fgkEndLadderCarbonFiberLowerJunctionLength[1] - - fgkendladdercoolingsupportdistance[2] - - fgkEndLadderMountingBlockPosition[1] - - fgkCoolingTubeSupportWidth)); - endladdercoolingtubeshape[3][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - endladdercoolingtubeshape[3][0]->GetDz()); - endladdercoolingtubeshape[4][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, - 0.50 * fgkendladdercoolingsupportdistance[2]); - endladdercoolingtubeshape[4][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, - endladdercoolingtubeshape[4][0]->GetDz()); - // Ladder Cooling Tubes - TGeoVolume** coolingtube[fgkcoolingtubenumber]; - for(Int_t i=0; iSetLineColor(fColorPhynox); - coolingtube[i][1]->SetLineColor(fColorWater); - } - // End Ladder Cooling Tubes - TGeoVolume** endladdercoolingtube[fgkendladdercoolingtubenumber]; - for(Int_t i=0; iSetLineColor(fColorPhynox); - endladdercoolingtube[i][1]->SetLineColor(fColorWater); - } + TGeoTube *coolingtubeshape[2]; + // Ladder Cooling Tubes + + // MvL: Simplified cooling tubes + coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,0.5*fgkCoolingTubeLength); + coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,coolingtubeshape[0]->GetDz()); + + // End Ladder Cooling Tubes + TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber]; + for(Int_t i=0; iGetDz()); + endladdercoolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax, + 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1] + sensZshift)); + endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin, + endladdercoolingtubeshape[1][0]->GetDz()-0.5*fgkSSDTolerance); + // Ladder Cooling Tubes + TGeoVolume* coolingtube[2]; + coolingtube[0] = new TGeoVolume("OuterCoolingTube1",coolingtubeshape[0], fSSDCoolingTubePhynox); + coolingtube[1] = new TGeoVolume("InnerCoolingTube1",coolingtubeshape[1], fSSDCoolingTubeWater); + coolingtube[0]->SetLineColor(fColorPhynox); + coolingtube[1]->SetLineColor(fColorWater); + + // End Ladder Cooling Tubes + TGeoVolume** endladdercoolingtube[fgkendladdercoolingtubenumber]; + for(Int_t i=0; iSetLineColor(fColorPhynox); + endladdercoolingtube[i][1]->SetLineColor(fColorWater); + } + ///////////////////////////////////////////////////////////// // Virtual Volume containing Cooling Tubes ///////////////////////////////////////////////////////////// // Ladder Cooling Tubes - TGeoTube* virtualcoolingtubeshape[fgkcoolingtubenumber]; - for(Int_t i=0; iGetRmin(), - coolingtubeshape[i][0]->GetRmax(), - coolingtubeshape[i][0]->GetDz()); - TGeoVolume* virtualcoolingtube[fgkcoolingtubenumber]; - virtualcoolingtube[0] = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape[0], - fSSDAir); - virtualcoolingtube[1] = new TGeoVolume("CoolingTube2",virtualcoolingtubeshape[1], - fSSDAir); - virtualcoolingtube[2] = new TGeoVolume("CoolingTube3",virtualcoolingtubeshape[2], - fSSDAir); + TGeoTube* virtualcoolingtubeshape = new TGeoTube(coolingtubeshape[1]->GetRmin(), + coolingtubeshape[0]->GetRmax(), + coolingtubeshape[0]->GetDz()); + fcoolingtube = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape, fSSDAir); + fcoolingtube->AddNode(coolingtube[0],1); + fcoolingtube->AddNode(coolingtube[1],1); + // End Ladder Cooling Tubes TGeoTube* endladdervirtualcoolingtubeshape[fgkendladdercoolingtubenumber]; for(Int_t i=0; iGetRmin(), - endladdercoolingtubeshape[i][0]->GetRmax(), - endladdercoolingtubeshape[i][0]->GetDz()); - TGeoVolume* endladdervirtualcoolingtube[fgkendladdercoolingtubenumber]; - endladdervirtualcoolingtube[0] = new TGeoVolume("EndLadderCoolingTube1", - endladdervirtualcoolingtubeshape[0], - fSSDAir); - endladdervirtualcoolingtube[1] = new TGeoVolume("EndLadderCoolingTube2", - endladdervirtualcoolingtubeshape[1], - fSSDAir); - endladdervirtualcoolingtube[2] = new TGeoVolume("EndLadderCoolingTube3", - endladdervirtualcoolingtubeshape[2], - fSSDAir); - endladdervirtualcoolingtube[3] = new TGeoVolume("EndLadderCoolingTube4", - endladdervirtualcoolingtubeshape[3], - fSSDAir); - endladdervirtualcoolingtube[4] = new TGeoVolume("EndLadderCoolingTube5", - endladdervirtualcoolingtubeshape[4], - fSSDAir); - TList* coolingtubelist = new TList(); - for(Int_t i=0; iAddNode(coolingtube[i][0],1); - virtualcoolingtube[i]->AddNode(coolingtube[i][1],1); - coolingtubelist->Add(virtualcoolingtube[i]); - } - endladdervirtualcoolingtube[0]->AddNode(endladdercoolingtube[0][0],1); - endladdervirtualcoolingtube[0]->AddNode(endladdercoolingtube[0][1],1); - coolingtubelist->Add(endladdervirtualcoolingtube[0]); - endladdervirtualcoolingtube[1]->AddNode(endladdercoolingtube[1][0],1); - endladdervirtualcoolingtube[1]->AddNode(endladdercoolingtube[1][1],1); - coolingtubelist->Add(endladdervirtualcoolingtube[1]); - endladdervirtualcoolingtube[2]->AddNode(endladdercoolingtube[2][0],1); - endladdervirtualcoolingtube[2]->AddNode(endladdercoolingtube[2][1],1); - coolingtubelist->Add(endladdervirtualcoolingtube[2]); - endladdervirtualcoolingtube[3]->AddNode(endladdercoolingtube[3][0],1); - endladdervirtualcoolingtube[3]->AddNode(endladdercoolingtube[3][1],1); - coolingtubelist->Add(endladdervirtualcoolingtube[3]); - endladdervirtualcoolingtube[4]->AddNode(endladdercoolingtube[4][0],1); - endladdervirtualcoolingtube[4]->AddNode(endladdercoolingtube[4][1],1); - coolingtubelist->Add(endladdervirtualcoolingtube[4]); - return coolingtubelist; + endladdervirtualcoolingtubeshape[i] = new TGeoTube(endladdercoolingtubeshape[i][1]->GetRmin(), + endladdercoolingtubeshape[i][0]->GetRmax(), + endladdercoolingtubeshape[i][0]->GetDz()); + fendladdercoolingtube[0] = new TGeoVolume("EndLadderCoolingTube1", + endladdervirtualcoolingtubeshape[0], + fSSDAir); + fendladdercoolingtube[1] = new TGeoVolume("EndLadderCoolingTube2", + endladdervirtualcoolingtubeshape[1], + fSSDAir); + fendladdercoolingtube[0]->AddNode(endladdercoolingtube[0][0],1); + fendladdercoolingtube[0]->AddNode(endladdercoolingtube[0][1],1); + fendladdercoolingtube[1]->AddNode(endladdercoolingtube[1][0],1); + fendladdercoolingtube[1]->AddNode(endladdercoolingtube[1][1],1); } /////////////////////////////////////////////////////////////////////////////// TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){ @@ -3499,25 +3239,25 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){ // Vertex Positioning for TGeoXTru /////////////////////////////////////// TVector3** vertexposition = new TVector3*[2*kvertexnumber+nedges+1]; - vertexposition[0] = new TVector3(0.0,0.0); - vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1]); + vertexposition[0] = new TVector3(0.0,0.0, 0.); + vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1],0); vertexposition[2] = new TVector3(fgkSSDCoolingBlockHoleLength[1], - vertexposition[1]->Y()); + vertexposition[1]->Y(),0); vertexposition[3] = new TVector3(vertexposition[2]->X(), - vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2]); - vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y()); + vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2],0); + vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y(),0); vertexposition[5] = new TVector3(vertexposition[4]->X(), - + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1]); + + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1],0); vertexposition[6] = new TVector3(Xfrom2Points(vertexposition[5]->X(), vertexposition[5]->Y(),0.5*(fgkSSDCoolingBlockLength - fgkSSDCoolingBlockHoleLength[0] - 4.*fgkSSDCoolingBlockHoleRadius[1]), fgkSSDCoolingBlockHeight[0] - fgkSSDCoolingBlockHoleRadius[1], - fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0]); + fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0], 0); vertexposition[7] = new TVector3(0.5*(fgkSSDCoolingBlockLength - fgkSSDCoolingBlockHoleLength[0]), - vertexposition[6]->Y()); + vertexposition[6]->Y(), 0); Double_t alpha = TMath::ACos(0.5*fgkSSDCoolingBlockHoleLength[0] / fgkSSDCoolingBlockHoleRadius[0])*TMath::RadToDeg(); Double_t phi = 180.-alpha; @@ -3525,10 +3265,11 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){ Double_t deltapsi = psi/nedges; Double_t radius = fgkSSDCoolingBlockHoleRadius[0]/CosD(0.5*deltapsi); TVector3* transvector = new TVector3(0.5*fgkSSDCoolingBlockLength, - fgkSSDCoolingBlockHoleCenter); + fgkSSDCoolingBlockHoleCenter, 0); for(Int_t i=0; iX(), vertexposition[i][2*(nedges+1)+2]->Y() - - fgkSSDChipCablesHeight[i]); + - fgkSSDChipCablesHeight[i], 0); for(Int_t j=0; jSetX(ssdchipcablesradius[0]*CosD(angle)); @@ -3646,14 +3385,14 @@ TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth, new TVector3(*vertex+*transvector[i]); vertexposition[1][(nedges+1)*i+j+2] = new TVector3(vertex->X()*ratio[2*i]+transvector[i]->X(), - vertex->Y()*ratio[2*i]+transvector[i]->Y()); + vertex->Y()*ratio[2*i]+transvector[i]->Y(), 0); vertexposition[0][(4-i)*(nedges+1)+4-j-1] = new TVector3(*vertexposition[1][(nedges+1)*i+j+2]); vertexposition[1][(4-i)*(nedges+1)+4-j-1] = new TVector3(vertex->X()*ratio[2*i+1] + transvector[i]->X(), vertex->Y()*ratio[2*i+1] - + transvector[i]->Y()); + + transvector[i]->Y(), 0); } } for(Int_t i=0; iAddNode(ssdchipcable[0],1,ssdchipcablesrot[4]); - ssdchipcablesmother->AddNode(ssdchipcable[1],1,ssdchipcablesrot[4]); - ssdchipcablesmother->AddNode(ssdchipcable[2],1,ssdchipcablescombitrans); - ssdchipcablesmother->AddNode(ssdchipcable[3],1,ssdchipcablescombitrans); + static const Int_t kmothervertexnumber = 8; + Double_t xmothervertex[kmothervertexnumber]; + Double_t ymothervertex[kmothervertexnumber]; + xmothervertex[0] = xvertexpoints[0][1]; + ymothervertex[0] = yvertexpoints[0][1]; + xmothervertex[1] = xvertexpoints[0][2+nedges/2]; + ymothervertex[1] = yvertexpoints[0][1]; + xmothervertex[2] = xvertexpoints[0][2+nedges/2]; + ymothervertex[2] = yvertexpoints[0][2+nedges]; + xmothervertex[3] = xvertexpoints[0][3+nedges]; + ymothervertex[3] = yvertexpoints[0][3+nedges]; + xmothervertex[4] = xvertexpoints[0][3+2*nedges]; + ymothervertex[4] = yvertexpoints[0][3+2*nedges]+fgkSSDTolerance; + xmothervertex[5] = xvertexpoints[0][4+2*nedges]; + ymothervertex[5] = yvertexpoints[0][4+2*nedges]+fgkSSDTolerance; + xmothervertex[6] = xvertexpoints[1][5+2*nedges]; + ymothervertex[6] = yvertexpoints[1][5+2*nedges]; + xmothervertex[7] = xvertexpoints[0][1]; + ymothervertex[7] = yvertexpoints[1][5+2*nedges]; + TGeoXtru *ssdchipcablemothershape = new TGeoXtru(2); + ssdchipcablemothershape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex); + ssdchipcablemothershape->DefineSection(0,-0.5*fgkSSDChipCablesLength[1]); + ssdchipcablemothershape->DefineSection(1,+0.5*fgkSSDChipCablesLength[1]); + + cableL = new TGeoVolume("SSDChipCableMotherLeft",ssdchipcablemothershape,fSSDAir); + cableR = new TGeoVolume("SSDChipCableMotherRight",ssdchipcablemothershape,fSSDAir); + + cableL->AddNode(ssdchipcable[0],1); + cableL->AddNode(ssdchipcable[1],1); + cableR->AddNode(ssdchipcable[2],1); + cableR->AddNode(ssdchipcable[3],1); + ///////////////////////////////////////////////////////////// // Deallocating memory ///////////////////////////////////////////////////////////// - for(Int_t i=0; iDefinePolygon(kmothervertexnumber, - xmothervertex[i],ymothervertex[i]); - chipsystemothershape[i]->DefineSection(0,-fgkSSDChipCablesHeight[i+2] - -0.5*fgkSSDChipHeight); - chipsystemothershape[i]->DefineSection(1,0.5*fgkSSDChipHeight); - chipsystemother[i] = new TGeoVolume(chipsytemothername[i], - chipsystemothershape[i],fSSDAir); - } - ///////////////////////////////////////////////////////////// - // SSD Chip Cables - ///////////////////////////////////////////////////////////// - TGeoVolume* ssdchipcables[kchipsystemnumber]; - TGeoRotation** ssdchipcablesrot[kchipsystemnumber]; - TGeoTranslation** ssdchipcablestrans[kchipsystemnumber]; - TGeoCombiTrans** ssdchipcablescombitrans[kchipsystemnumber]; - ////////////////// - for(Int_t i=0; iSetAngles(-90.0,0.0,0.0); - ssdchipcablestrans[i][j]->SetTranslation(j*(fgkSSDChipLength - + fgkSSDChipSeparationLength), - 0.5*fgkSSDChipWidth, - - 0.5*fgkSSDChipHeight - - fgkSSDChipCablesHeight[i+2]); - ssdchipcablescombitrans[i][j]->SetRotation(*ssdchipcablesrot[i][j]); - ssdchipcablescombitrans[i][j]->SetTranslation(*ssdchipcablestrans[i][j]); - chipsystemother[i]->AddNode(ssdchipcables[i],j+1,ssdchipcablescombitrans[i][j]); - } - chipsystemother[i]->AddNode(ssdchipassembly,i+1); - ssdchipsystemlist->Add(chipsystemother[i]); - } - ///////////////////////////////////////////////////////////// - // Deallocating memory - ///////////////////////////////////////////////////////////// - for(Int_t i=0; iAddNode(ssdchipcomp[i],1,ssdchipcomptrans[i]); - Double_t ssdchipseparation[2] = {fgkSSDChipLength+fgkSSDChipSeparationLength, - fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1] - - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist - - 0.5*fgkSSDChipWidth)}; - ///////////////////////////////////////////////////////////// - // Virtual Volume containing SSDChipAssembly - ///////////////////////////////////////////////////////////// - TGeoXtru* ssdchipmothershape = new TGeoXtru(2); - const Int_t kssdmothervertexnumber = 2*fgkSSDChipNumber; - Double_t xmothervertex[kssdmothervertexnumber]; - Double_t ymothervertex[kssdmothervertexnumber]; - /////////////////////// - // Setting the vertices - /////////////////////// - xmothervertex[0] = -0.5*fgkSSDChipLength,ymothervertex[0] = -0.5*fgkSSDChipWidth; - xmothervertex[1] = xmothervertex[0], ymothervertex[1] = ssdchipseparation[1] - - ymothervertex[0]; - xmothervertex[2] = (fgkSSDChipNumber-1)*ssdchipseparation[0]-xmothervertex[0]; - ymothervertex[2] = ymothervertex[1]; - xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0]; - xmothervertex[4] = ssdchipseparation[0]+xmothervertex[0]; - ymothervertex[4] = ymothervertex[0]; - xmothervertex[5] = xmothervertex[4], ymothervertex[5] = -ymothervertex[4]; - xmothervertex[6] = (fgkSSDChipNumber-1)*ssdchipseparation[0] - + (0.5*fgkSSDChipLength-fgkSSDChipWidth); - ymothervertex[6] = ymothervertex[5]; - xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2] - - fgkSSDChipWidth; - xmothervertex[8] = -0.5*fgkSSDChipLength+fgkSSDChipWidth; - ymothervertex[8] = ymothervertex[7]; - xmothervertex[9] = -0.5*fgkSSDChipLength+fgkSSDChipWidth; - ymothervertex[9] = ymothervertex[6]; - xmothervertex[10] = -xmothervertex[0], ymothervertex[10] = ymothervertex[9]; - xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[0]; - ////////////////////////////////////////////////////////// - ssdchipmothershape->DefinePolygon(kssdmothervertexnumber, - xmothervertex,ymothervertex); - ssdchipmothershape->DefineSection(0,-0.5*fgkSSDChipHeight); - ssdchipmothershape->DefineSection(1, 0.5*fgkSSDChipHeight); - TGeoVolume* ssdchipmother = new TGeoVolume("SSDChipContainer", - ssdchipmothershape,fSSDAir); - ///////////////////////////////////////////////////////////// - for(Int_t i=0; iAddNode(ssdchip,fgkSSDChipNumber*i+j+1, - new TGeoTranslation(j*ssdchipseparation[0],i*ssdchipseparation[1],0.)); - return ssdchipmother; + return ssdchip; } ///////////////////////////////////////////////////////////////////////////////// TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelength){ ///////////////////////////////////////////////////////////// // Method returning a List containing pointers to Ladder Cable Volumes + // + // Return list contains 3 assemblies: cable box, cable arb shape and the end part of the cable + // each contains 2 volumes, one for polyamide and one for aluminium ///////////////////////////////////////////////////////////// const Int_t kladdercablesegmentnumber = 2; ///////////////////////////////////////// // LadderSegmentBBox Volume ///////////////////////////////////////// - TGeoBBox* laddercablesegmentbboxshape[kladdercablesegmentnumber]; + static TGeoBBox* laddercablesegmentbboxshape[kladdercablesegmentnumber] = {0,0}; const char* laddercablesegmentbboxshapename[kladdercablesegmentnumber] = {"LadderCableSegmentBBoxShape1","LadderCableSegmentBBoxShape2"}; + + + const char* laddercablesegmentbboxname[kladdercablesegmentnumber] = + {"LadderCableSegmentBBox1","LadderCableSegmentBBox2"}; + static TGeoVolume* laddercablesegmentbbox[kladdercablesegmentnumber]; + + static TGeoTranslation* laddercablesegmentbboxtrans[kladdercablesegmentnumber] = { + new TGeoTranslation("LadderCableSegmentBBoxTrans1", + 0.5*fgkSSDFlexWidth[0], + 0.5*fgkSSDLadderCableWidth, + 0.5*fgkSSDLadderCableHeight[0]), + new TGeoTranslation("LadderCableSegmentBBoxTrans2", + 0.5*fgkSSDFlexWidth[0], + 0.5*fgkSSDLadderCableWidth, + fgkSSDLadderCableHeight[0] + +0.5*fgkSSDLadderCableHeight[1]) + }; + static TGeoVolume* laddercablesegmentbboxassembly = new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly") ; + static TGeoVolume* laddercablesegmentarbassembly = + new TGeoVolumeAssembly("LadderCableSegmentArbAssembly"); + + static TGeoArb8* laddercablesegmentarbshape[kladdercablesegmentnumber]; + static TGeoVolume* laddercablesegmentarb[kladdercablesegmentnumber]; + + if (laddercablesegmentbboxshape[0] == 0) { + // Initialise static shapes and volumes for(Int_t i=0; iSetLineColor(i==0 ? fColorAl : fColorPolyhamide); } - TGeoTranslation* laddercablesegmentbboxtrans[kladdercablesegmentnumber]; - laddercablesegmentbboxtrans[0] = - new TGeoTranslation("LadderCableSegmentBBoxTrans1", - 0.5*fgkSSDFlexWidth[0], - 0.5*fgkSSDLadderCableWidth, - 0.5*fgkSSDFlexHeight[0]); - laddercablesegmentbboxtrans[1] = - new TGeoTranslation("LadderCableSegmentBBoxTrans2", - 0.5*fgkSSDFlexWidth[0], - 0.5*fgkSSDLadderCableWidth, - fgkSSDFlexHeight[0] - +0.5*fgkSSDFlexHeight[1]); - TGeoVolume* laddercablesegmentbboxassembly = - new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly"); + for(Int_t i=0; iAddNode(laddercablesegmentbbox[i],1, laddercablesegmentbboxtrans[i]); @@ -3979,21 +3561,21 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen new TVector3*[kvertexnumber]; //Shape Vertex Positioning for(Int_t i=0; iX(), - laddercablesegmentvertexposition[i][2]->Y()); + laddercablesegmentvertexposition[i][2]->Y(), 0); } Double_t laddercablesegmentwidth[2][2] = {{fgkSSDFlexHeight[0],fgkSSDFlexHeight[0]}, {fgkSSDFlexHeight[1],fgkSSDFlexHeight[1]}}; - char* laddercablesegmentarbshapename[kladdercablesegmentnumber] = + const char* laddercablesegmentarbshapename[kladdercablesegmentnumber] = {"LadderCableSegmentArbShape1","LadderCableSegmentArbShape2"}; - TGeoArb8* laddercablesegmentarbshape[kladdercablesegmentnumber]; + for(Int_t i = 0; i< kladdercablesegmentnumber; i++) laddercablesegmentarbshape[i] = GetArbShape(laddercablesegmentvertexposition[i], laddercablesegmentwidth[i], @@ -4001,7 +3583,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen laddercablesegmentarbshapename[i]); const char* laddercablesegmentarbname[kladdercablesegmentnumber] = {"LadderCableSegmentArb1","LadderCableSegmentArb2"}; - TGeoVolume* laddercablesegmentarb[kladdercablesegmentnumber]; + for(Int_t i=0; iAddNode(laddercablesegmentarb[i],1, laddercablesegmentarbcombitrans); + } // End of static initialisations ///////////////////////////////////////// // End Ladder Cable Volume +// Note: this part depends explicitly on the length passed as an argument to the function ///////////////////////////////////////// TGeoBBox* ladderendcablesegmentbboxshape[kladdercablesegmentnumber]; const char* ladderendcablesegmentbboxshapename[kladdercablesegmentnumber] = @@ -4037,7 +3619,7 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen new TGeoBBox(ladderendcablesegmentbboxshapename[i], 0.5*ssdendladdercablelength, 0.5*fgkSSDLadderCableWidth, - 0.5*fgkSSDFlexHeight[i]); + 0.5*fgkSSDLadderCableHeight[i]); const char* ladderendcablesegmentbboxname[kladdercablesegmentnumber] = {"LadderEndCableSegmentBBox1","LadderEndCableSegmentBBox2"}; TGeoVolume* ladderendcablesegmentbbox[kladdercablesegmentnumber]; @@ -4055,13 +3637,13 @@ TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelen new TGeoTranslation("LadderEndCableSegmentBBoxTrans0", 0.5*ssdendladdercablelength, 0.5*fgkSSDLadderCableWidth, - 0.5*fgkSSDFlexHeight[0]); + 0.5*fgkSSDLadderCableHeight[0]); ladderendcablesegmentbboxtrans[1] = new TGeoTranslation("LadderEndCableSegmentBBoxTrans1", 0.5*ssdendladdercablelength, 0.5*fgkSSDLadderCableWidth, - fgkSSDFlexHeight[0] - +0.5*fgkSSDFlexHeight[1]); + fgkSSDLadderCableHeight[0] + +0.5*fgkSSDLadderCableHeight[1]); TGeoVolume* ladderendcablesegmentbboxassembly = new TGeoVolumeAssembly("LadderEndCableSegmentBBoxAssembly"); for(Int_t i=0; iAdd(laddercablesegmentarbassembly); laddercablesegmentlist->Add(ladderendcablesegmentbboxassembly); return laddercablesegmentlist; - } +} + ///////////////////////////////////////////////////////////////////////////////// TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t ssdendladdercablelength){ ///////////////////////////////////////////////////////////// - // Method generating Ladder Cable Volumes Assemblies + // Method generating Ladder Cable of given length (n modules + end) + // Called by GetLadderCableAssembly ///////////////////////////////////////////////////////////// TList* laddercablesegmentlist = GetLadderCableSegment(ssdendladdercablelength); TGeoVolume* laddercable = new TGeoVolumeAssembly("LadderCable"); @@ -4085,43 +3669,48 @@ TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t ssdendladderc TGeoTranslation* laddercabletrans = new TGeoTranslation( i*(fgkCarbonFiberJunctionWidth), fgkSSDLadderCableWidth-fgkSSDFlexWidth[0], - i*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1])); + i*(fgkSSDLadderCableHeight[0]+fgkSSDLadderCableHeight[1])); laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(0),i+1,laddercabletrans); - if(i!=n-1) laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(1),i+1,laddercabletrans); + if(i!=n-1) laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(1),i+1,laddercabletrans); + } TGeoTranslation* endladdercabletrans = new TGeoTranslation("EndLadderCableTrans", (n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0], - fgkSSDLadderCableWidth-fgkSSDFlexWidth[0], - (n-1)*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1])); + fgkSSDLadderCableWidth-fgkSSDFlexWidth[0], + (n-1)*(fgkSSDLadderCableHeight[0]+fgkSSDLadderCableHeight[1])); laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(2),1,endladdercabletrans); return laddercable; } ///////////////////////////////////////////////////////////////////////////////// TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t ssdendladdercablelength){ - ///////////////////////////////////////////////////////////// - // Method generating Ladder Cable Volumes Assembly - ///////////////////////////////////////////////////////////// - TGeoVolume* laddercableassembly = new TGeoVolumeAssembly("LadderCableAssembly"); - char laddercabletransname[30]; + /////////////////////////////////////////////////////////////////// + // Main method generating Ladder Cable bundles containing n cables + /////////////////////////////////////////////////////////////////// + Double_t totalLength = ssdendladdercablelength+(n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0]; + Double_t cableOrig[3] = {0.5*totalLength,1.5*fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],0.5*n*(fgkSSDLadderCableHeight[0]+fgkSSDLadderCableHeight[1])}; + TGeoBBox *laddercableshape = new TGeoBBox(0.5*totalLength,0.5*fgkSSDLadderCableWidth,0.5*n*(fgkSSDLadderCableHeight[0]+fgkSSDLadderCableHeight[1]),cableOrig); + TGeoVolume* laddercable = new TGeoVolume("LadderCableMother", laddercableshape, fSSDAir); + char laddercabletransname[100]; 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 laddercableassembly; + return laddercable; } ///////////////////////////////////////////////////////////////////////////////// TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdendladdercablelength){ ///////////////////////////////////////////////////////////// // Method generating Ladder Cable List Assemblies + // containing two cables bundles, i.e. P+N readout for one endcap ///////////////////////////////////////////////////////////// - const Int_t kladdercableassemblynumber = 2; + const Int_t kladdercableassemblynumber = 2; TGeoVolume* laddercableassembly = GetLadderCableAssembly(n,ssdendladdercablelength); TGeoVolume* ladderCable[kladdercableassemblynumber]; - char laddercableassemblyname[30]; + char laddercableassemblyname[100]; TList* laddercableassemblylist = new TList(); for(Int_t i=0; iAddNode(laddercableassembly,i+1,i==0 ? NULL : new TGeoCombiTrans((n-1) @@ -4139,6 +3728,19 @@ void AliITSv11GeometrySSD::SetLadderSegment(){ ///////////////////////////////////////////////////////////// fladdersegment[0] = new TGeoVolumeAssembly("LadderSegment1"); fladdersegment[1] = new TGeoVolumeAssembly("LadderSegment2"); + + /* MvL: tried to create mother volume. Requires changes in all rotations, bc xtru is always along z-axis + TGeoXtru *laddersegmentshape = new TGeoXtru(2); + static const Int_t ntrianglevtx = 3; + Double_t xtrianglevtx[ntrianglevtx]={-0.5*fgkCarbonFiberTriangleLength,fgkCarbonFiberTriangleLength, 0}; + Double_t ytrianglevtx[ntrianglevtx]={0, 0, fgkCarbonFiberTriangleLength * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad())}; + laddersegmentshape->DefinePolygon(ntrianglevtx,xtrianglevtx,ytrianglevtx); + laddersegmentshape->DefineSection(0,0); + laddersegmentshape->DefineSection(1,fgkCarbonFiberJunctionWidth); // MVL + fladdersegment[0] = new TGeoVolume("LadderSegment1",laddersegmentshape,fSSDAir); + fladdersegment[1] = new TGeoVolume("LadderSegment2",laddersegmentshape,fSSDAir); + */ + if(!fCreateMaterials) CreateMaterials(); if(!fTransformationMatrices) CreateTransformationMatrices(); if(!fBasicObjects) CreateBasicObjects(); @@ -4151,16 +3753,18 @@ void AliITSv11GeometrySSD::SetLadderSegment(){ fcarbonfibersupportmatrix[j]); } // Placing Carbon Fiber Junction - for(Int_t j=0; jAddNode(fcarbonfiberjunction,j+1, fcarbonfiberjunctionmatrix[j]); + } // Placing Carbon Fiber Lower Support - for(Int_t j=0; jAddNode(fcarbonfiberlowersupport[j],j+1, fcarbonfiberlowersupportrans[j]); + } // Placing SSD Sensor Support for(Int_t j=0; jAddNode(j<2 ? fssdsensorsupport[0][i] : + fladdersegment[i]->AddNode(j<2 ? fssdsensorsupport[0][i] : fssdsensorsupport[1][i], j+1,fssdsensorsupportmatrix[j]); // Placing SSD Cooling Tube Support @@ -4168,11 +3772,8 @@ void AliITSv11GeometrySSD::SetLadderSegment(){ fladdersegment[i]->AddNode(fcoolingtubesupport,j+1, fcoolingtubesupportmatrix[j]); // Placing SSD Cooling Tube - for(Int_t j=0; j<2; j++) - for(Int_t k=0; k<2; k++){ - fladdersegment[i]->AddNode(fcoolingtube[0],2*j+k+1,fcoolingtubematrix[j][k]); - fladdersegment[i]->AddNode(fcoolingtube[j+1],k+1,fcoolingtubematrix[2+j][k]); - } + fladdersegment[i]->AddNode(fcoolingtube,1,fcoolingtubematrix[0]); + fladdersegment[i]->AddNode(fcoolingtube,2,fcoolingtubematrix[1]); // Placing SSD Hybrid switch(i){ case 0: @@ -4185,12 +3786,12 @@ void AliITSv11GeometrySSD::SetLadderSegment(){ break; } // Placing Cooling Block System - fladdersegment[i]->AddNode(fssdcoolingblocksystem,1,fcoolingblocksystematrix); + fladdersegment[i]->AddNode(fssdcoolingblocksystem,1,fcoolingblocksystematrix); // Placing SSD Flex - for(Int_t j=0; jAddNode(fssdstiffenerflex,j+1,fstiffenerflexmatrix[j]); - fladdersegment[i]->AddNode(fssdendflex,j+1,fendflexmatrix[j]); - } + for(Int_t j=0; jAddNode(fssdstiffenerflex,j+1,fstiffenerflexmatrix[j]); + fladdersegment[i]->AddNode(fssdendflex,j+1,fendflexmatrix[j]); + } } } /////////////////////////////////////////////////////////////////////////////// @@ -4206,7 +3807,7 @@ void AliITSv11GeometrySSD::SetEndLadderSegment(){ if(!fTransformationMatrices) CreateTransformationMatrices(); if(!fBasicObjects) CreateBasicObjects(); for(Int_t i=0; iAddNode(j==2 ? fendladdercarbonfiberjunction[i][1] : fendladdercarbonfiberjunction[i][0], @@ -4254,16 +3855,10 @@ void AliITSv11GeometrySSD::SetEndLadderSegment(){ ///////////////////////////////////////////////////////////// // End Ladder Cooling Tube Support ///////////////////////////////////////////////////////////// - fendladdersegment[0]->AddNode(fendladdercoolingtube[0],1,fendladdercoolingtubematrix[0][0]); - fendladdersegment[0]->AddNode(fendladdercoolingtube[0],2,fendladdercoolingtubematrix[0][1]); - fendladdersegment[0]->AddNode(fendladdercoolingtube[1],1,fendladdercoolingtubematrix[0][2]); - fendladdersegment[0]->AddNode(fendladdercoolingtube[1],2,fendladdercoolingtubematrix[0][3]); - fendladdersegment[0]->AddNode(fendladdercoolingtube[2],1,fendladdercoolingtubematrix[0][4]); - fendladdersegment[0]->AddNode(fendladdercoolingtube[2],2,fendladdercoolingtubematrix[0][5]); - fendladdersegment[1]->AddNode(fendladdercoolingtube[3],1,fendladdercoolingtubematrix[1][0]); - fendladdersegment[1]->AddNode(fendladdercoolingtube[3],2,fendladdercoolingtubematrix[1][1]); - fendladdersegment[1]->AddNode(fendladdercoolingtube[4],1,fendladdercoolingtubematrix[1][2]); - fendladdersegment[1]->AddNode(fendladdercoolingtube[4],2,fendladdercoolingtubematrix[1][3]); + fendladdersegment[0]->AddNode(fendladdercoolingtube[0],1,fendladdercoolingtubematrix[0][0]); + fendladdersegment[0]->AddNode(fendladdercoolingtube[0],2,fendladdercoolingtubematrix[0][1]); + fendladdersegment[1]->AddNode(fendladdercoolingtube[1],1,fendladdercoolingtubematrix[1][0]); + fendladdersegment[1]->AddNode(fendladdercoolingtube[1],2,fendladdercoolingtubematrix[1][1]); } /////////////////////////////////////////////////////////////////////////////// void AliITSv11GeometrySSD::SetLadder(){ @@ -4275,8 +3870,9 @@ void AliITSv11GeometrySSD::SetLadder(){ ///////////////////////////////////////////////////////////////////////////// /// Generating Ladder Mother Volume Containing Ladder ///////////////////////////////////////////////////////////////////////////// - TGeoXtru* laddershape[fgkladdernumber]; + /* TGeoXtru* laddershape[fgkladdernumber]; for(Int_t i=0; iSetName("Lay5Left1LadderSegmentContainer"); + leftladdershape2[0]->SetName("Lay5Left2LadderSegmentContainer"); + leftladdershape1[1]->SetName("Lay6Left1LadderSegmentContainer"); + leftladdershape2[1]->SetName("Lay6Left2LadderSegmentContainer"); + centersensorladdershape[0]->SetName("Lay5CenterSensorContainer"); + centersensorladdershape[1]->SetName("Lay6CenterSensorContainer"); + rightladdershape1[0]->SetName("Lay5Right1LadderSegmentContainer"); + rightladdershape2[0]->SetName("Lay5Right2LadderSegmentContainer"); + rightladdershape1[1]->SetName("Lay6Right1LadderSegmentContainer"); + rightladdershape2[1]->SetName("Lay6Right2LadderSegmentContainer"); + ////////////////////////////////////// + Double_t xend1laddervertex[fgkladdernumber][kmothervertexnumber]; + Double_t yend1laddervertex[fgkladdernumber][kmothervertexnumber]; + Double_t xcentersensorvertex[fgkladdernumber][kmothervertexnumber]; + Double_t ycentersensorvertex[fgkladdernumber][kmothervertexnumber]; + Double_t xend2laddervertex[fgkladdernumber][kmothervertexnumber]; + Double_t yend2laddervertex[fgkladdernumber][kmothervertexnumber]; + for(Int_t i=0; iDefinePolygon(kmothervertexnumber,xcentersensorvertex[i], + ycentersensorvertex[i]); + centersensorladdershape[i]->DefineSection(0, - fgkEndLadderCarbonFiberLowerJunctionLength[1] + + 1.45*fgkSSDMountingBlockWidth); + centersensorladdershape[i]->DefineSection(1, ssdlaysensorsnumber[i] * fgkCarbonFiberJunctionWidth + + fgkEndLadderCarbonFiberLowerJunctionLength[0] + - 2.4*fgkSSDMountingBlockWidth); + + // Left and Right Ladder Pieces: Mother volumes around ladder mounting areas + + // Cuts off first corner (neg x) + xend1laddervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]; + xend1laddervertex[i][1] = -0.5*fgkSSDMountingBlockLength[0]; + // Cuts off last part (pos x) + xend2laddervertex[i][6] = 0.5*fgkSSDMountingBlockLength[0]; + xend2laddervertex[i][7] = 0.5*fgkSSDMountingBlockLength[0]; + + leftladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i], + yend1laddervertex[i]); + leftladdershape1[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]); + leftladdershape1[i]->DefineSection(1, fendladdersegmentmatrix[0][i]->GetTranslation()[2] + - fgkEndLadderMountingBlockPosition[0]); + + leftladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i], + yend2laddervertex[i]); + leftladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[0][i]->GetTranslation()[2] + - fgkEndLadderMountingBlockPosition[0]); + leftladdershape2[i]->DefineSection(1,- fgkEndLadderCarbonFiberLowerJunctionLength[1] + + 1.45*fgkSSDMountingBlockWidth); // connect to main volume at -1.6725 cm + + rightladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i], + yend1laddervertex[i]); + rightladdershape1[i]->DefineSection(0,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth + +fgkEndLadderCarbonFiberLowerJunctionLength[0] + -2.4*fgkSSDMountingBlockWidth); + rightladdershape1[i]->DefineSection(1,fendladdersegmentmatrix[1][i]->GetTranslation()[2] + + fgkEndLadderMountingBlockPosition[1]); + + rightladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i], + yend2laddervertex[i]); + rightladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[1][i]->GetTranslation()[2] + + fgkEndLadderMountingBlockPosition[1]); + rightladdershape2[i]->DefineSection(1, ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth + + fgkEndLadderCarbonFiberLowerJunctionLength[0]); + } + TGeoCompositeShape* laddershapecontainer[2]; + laddershapecontainer[0] = new TGeoCompositeShape("Lay5LadderCompositeShape", + "Lay5Left1LadderSegmentContainer+Lay5Left2LadderSegmentContainer" + "+Lay5CenterSensorContainer" + "+Lay5Right1LadderSegmentContainer+Lay5Right2LadderSegmentContainer"); + laddershapecontainer[1] = new TGeoCompositeShape("Lay6LadderCompositeShape", + "Lay6Left1LadderSegmentContainer+Lay6Left2LadderSegmentContainer" + "+Lay6CenterSensorContainer" + "+Lay6Right1LadderSegmentContainer+Lay6Right2LadderSegmentContainer"); const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"}; for(Int_t i=0; iDefinePolygon(kmothervertexnumber,xmothervertex[i], - ymothervertex[i]); - laddershape[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]); - laddershape[i]->DefineSection(1,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth - +fgkEndLadderCarbonFiberLowerJunctionLength[0]); - fladder[i] = new TGeoVolume(laddername[i],laddershape[i],fSSDAir); - fladder[i]->SetLineColor(4); - } + fladder[i] = new TGeoVolume(laddername[i],laddershapecontainer[i],fSSDAir); + fladder[i]->SetLineColor(4); + } /////////////////////////////////////////////////////////////////////////// if(!fCreateMaterials) CreateMaterials(); if(!fTransformationMatrices) CreateTransformationMatrices(); @@ -4334,13 +4032,14 @@ void AliITSv11GeometrySSD::SetLadder(){ ////////////////////////// /// Placing SSD Sensor ////////////////////////// + if(i==0&&ssdlaysensorsnumber[i]-j-1==13) fSSDSensor5->SetLineColor(kRed); fladder[i]->AddNode(i==0?fSSDSensor5:fSSDSensor6,ssdlaysensorsnumber[i]-j-1, fssdsensormatrix[i][j]); } /////////////////////////////// /// Placing End Ladder Segment /////////////////////////////// - fladder[i]->AddNode(fendladdersegment[0],1,fendladdersegmentmatrix[0][i]); + fladder[i]->AddNode(fendladdersegment[0],1,fendladdersegmentmatrix[0][i]); fladder[i]->AddNode(fendladdersegment[1],1,fendladdersegmentmatrix[1][i]); } ///////////////////////////////////////////////////////////////////////////// @@ -4382,17 +4081,21 @@ void AliITSv11GeometrySSD::SetLadder(){ - fgkSSDModuleStiffenerPosition[1] - fgkSSDStiffenerWidth) + fgkEndLadderCarbonFiberLowerJunctionLength[0]-0.000001*kendladdercablecorrection; + TList* laddercableassemblylist[4]; const Int_t kendladdercablesnumber = 4; + TGeoRotation *laddercablerot = new TGeoRotation(); + laddercablerot->SetAngles(90.,60.,-90.); for(Int_t i=0; iAddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1), + fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1), j<2?1:2,fladdercablematrix[i][j]); } } + //////////////////////////////////////////////////////////////////////////////// void AliITSv11GeometrySSD::SetLayer(){ //////////////////////////////////////////////////////////////////////////////// @@ -4422,7 +4125,7 @@ void AliITSv11GeometrySSD::SetLayer(){ ///////////////////////////////////////////////////////////// // Deallocating memory ///////////////////////////////////////////////////////////// - for(Int_t i=0; iSetX(-0.5*fgkSSDMountingBlockLength[0]); - mountingsupportedgevector[i]->SetY(fgkMountingBlockSupportRadius[i]*TMath::Sqrt(1. - -TMath::Power(mountingsupportedgevector[i]->X() - / fgkMountingBlockSupportRadius[i],2))); + mountingsupportedgevector[i]->SetX(-0.5*fgkSSDMountingBlockLength[0]); + mountingsupportedgevector[i]->SetY(fgkMountingBlockSupportRadius[i]*TMath::Sqrt( + (1.-mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])* + (1.+mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i]))); psi0[i] = 0.5*TMath::Pi()-phi[i]; deltapsi[i] = (theta[i]+phi[i])/nedges; } @@ -4495,7 +4198,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ for(Int_t i=0; iX()>mountingsupportedgevector[i]->X()) indexedge[i]++; vertexlist[i]->Add(vertex[i][j]); } @@ -4560,16 +4263,16 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ TGeoVolume* centermountingblocksupport[fgklayernumber]; TGeoVolume* sideladdersupportpiece[fgklayernumber]; TGeoVolume* centerladdersupportpiece[fgklayernumber]; - char sidemountingblockname[40]; - char centermountingblockname[40]; - char sideladdersupportpiecename[40]; - char centerladdersupportpiecename[40]; + char sidemountingblockname[100]; + char centermountingblockname[100]; + 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] @@ -4585,6 +4288,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ centermountingsupportshape[i]->DefineSection(0,0.); centermountingsupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1] -fgkMountingBlockSupportWidth[0]); + centermountingblocksupport[i] = new TGeoVolume(centermountingblockname, centermountingsupportshape[i], fSSDAlCoolBlockMedium); @@ -4630,23 +4334,23 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ Double_t mountingblockpieceupyvertex[fgklayernumber][8]; Double_t mountingblockpiecedownxvertex[fgklayernumber][8]; Double_t mountingblockpiecedownyvertex[fgklayernumber][8]; - char mountingblockpiecedownname[34]; - char mountingblockpieceupname[34]; + char mountingblockpiecedownname[100]; + char mountingblockpieceupname[100]; for(Int_t i=0; iSetLineColor(fColorG10); + /////////////////////////// // 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]; + + fgkMountingBlockSupportUpHeight[i] + - fgkSSDLadderVerticalDisalignment; mountingblockpieceupxvertex[i][1] = mountingblockpieceupxvertex[i][0]; mountingblockpieceupyvertex[i][1] = mountingblockpieceupyvertex[i][0] + fgkSSDMountingBlockHeight[1] - 0.5*fgkCoolingTubeSupportHeight - - fgkSSDModuleCoolingBlockToSensor - - 2.*fgkSSDModuleVerticalDisalignment; + - fgkSSDModuleCoolingBlockToSensor; mountingblockpieceupxvertex[i][2] = 0.5*fgkSSDMountingBlockLength[0]; mountingblockpieceupyvertex[i][2] = mountingblockpieceupyvertex[i][1]; mountingblockpieceupxvertex[i][3] = mountingblockpieceupxvertex[i][2]; @@ -4696,6 +4401,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ mountingblockpieceupyvertex[i][6] = mountingblockpieceupyvertex[i][5]; mountingblockpieceupxvertex[i][7] = mountingblockpieceupxvertex[i][6]; mountingblockpieceupyvertex[i][7] = mountingblockpieceupyvertex[i][0]; + mountingblockpieceupshape[i]->DefinePolygon(8,mountingblockpieceupxvertex[i], mountingblockpieceupyvertex[i]); mountingblockpieceupshape[i]->DefineSection(0,0.0); @@ -4715,8 +4421,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ Double_t mountingblocksupportrapezoidownyvertex[fgklayernumber][5]; Double_t mountingblocksupportrapezoidupxvertex[fgklayernumber][5]; Double_t mountingblocksupportrapezoidupyvertex[fgklayernumber][5]; - char mountingblocksupportrapezoidowname[40]; - char mountingblocksupportrapezoidupname[40]; + char mountingblocksupportrapezoidowname[100]; + char mountingblocksupportrapezoidupname[100]; Double_t scalefactor = 3./4.; for(Int_t i=0; iDefinePolygon(5,mountingblocksupportrapezoidownxvertex[i], mountingblocksupportrapezoidownyvertex[i]); 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); @@ -4765,12 +4472,13 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ mountingblocksupportrapezoidupyvertex[i][3] = mountingblocksupportrapezoidupyvertex[i][2]; mountingblocksupportrapezoidupxvertex[i][4] = mountingblocksupportrapezoidupxvertex[i][3]; mountingblocksupportrapezoidupyvertex[i][4] = mountingblocksupportrapezoidupyvertex[i][0]; + mountingblocksupportrapezoidupshape[i]->DefinePolygon(5,mountingblocksupportrapezoidupxvertex[i], mountingblocksupportrapezoidupyvertex[i]); 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); @@ -4780,8 +4488,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ for(Int_t i=0; iSetAngles(90.,180.,-90); TGeoRotation* globalrefladdersupportrot = new TGeoRotation(); @@ -4802,8 +4510,8 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ TGeoVolume* downmotherladdersupport[fgklayernumber]; TGeoXtru* upmotherladdersupportshape[fgklayernumber]; TGeoVolume* upmotherladdersupport[fgklayernumber]; - char upmotheladdersupportname[30]; - char downmotheladdersupportname[30]; + char upmotheladdersupportname[100]; + char downmotheladdersupportname[100]; for(Int_t i=0; iDefinePolygon(8,xmothervertex[i],ymothervertex[i]); downmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]); - downmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1] + downmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1] + fgkMountingBlockSupportDownHeight + fgkSSDMountingBlockHeight[1] - 0.5*fgkCoolingTubeSupportHeight - fgkSSDModuleCoolingBlockToSensor - - 2.*fgkSSDModuleVerticalDisalignment); - downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname, - downmotherladdersupportshape[i],fSSDAir); + - fgkSSDLadderVerticalDisalignment); + +// - fgkSSDModuleVerticalDisalignment); + //downmotherladdersupport[i] = new TGeoVolumeAssembly(downmotheladdersupportname); + + downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname, + downmotherladdersupportshape[i],fSSDAir); upmotherladdersupportshape[i] = new TGeoXtru(2); upmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]); upmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]); @@ -4844,8 +4558,9 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ + fgkSSDMountingBlockHeight[1] - 0.5*fgkCoolingTubeSupportHeight - fgkSSDModuleCoolingBlockToSensor - - 2.*fgkSSDModuleVerticalDisalignment); - upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname, + - fgkSSDLadderVerticalDisalignment); + + upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname, upmotherladdersupportshape[i],fSSDAir); } for(Int_t i=0; iSetLineColor(9); mountingblocksupportboxup[i][j]->SetLineColor(9); for(Int_t k=0; k<2; k++){ @@ -4924,7 +4640,7 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ downmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]); downmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]); downmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]); - downmotherladdersupport[i]->AddNode(mountingblockpiecedown[i],k+1,laddersupportmatrix[k]); + downmotherladdersupport[i]->AddNode(mountingblockpiecedown[i],k+1,laddersupportmatrix[k]); downmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidown[i],k+1,laddersupportmatrix[k]); upmotherladdersupport[i]->AddNode(centermountingblocksupport[i],k+1,laddersupportmatrix[k]); upmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]); @@ -4956,15 +4672,17 @@ void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){ delete [] ysidelowervertex[i]; delete [] xcenterlowervertex[i]; delete [] ycenterlowervertex[i]; + delete [] xmothervertex[i]; + delete [] ymothervertex[i]; } - delete xsidevertex; - delete ysidevertex; - delete xcentervertex; - delete ycentervertex; - delete xsidelowervertex; - delete ysidelowervertex; - delete xcenterlowervertex; - delete ycenterlowervertex; + delete [] xsidevertex; + delete [] ysidevertex; + delete [] xcentervertex; + delete [] ycentervertex; + delete [] xsidelowervertex; + delete [] ysidelowervertex; + delete [] xcenterlowervertex; + delete [] ycenterlowervertex; delete globalrefladdersupportrot; delete mountingblocksupportrot; ///////////////////// @@ -4989,7 +4707,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ for(Int_t i=0; iY()); + ringsupportvertex[i][0]->Y(), 0); ringsupportvertex[i][2] = new TVector3(0.5*fgkSSDMountingBlockLength[0], - ringsupportvertex[i][1]->Y()); + ringsupportvertex[i][1]->Y(),0); ringsupportvertex[i][2]->RotateZ(theta[i]+phi[i]); for(Int_t j=1; jY()-fgkLadderSupportHeigth)*CosD(90.0-j*angle), - (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeigth)*SinD(90.0-j*angle)); + new TVector3((ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*CosD(90.0-j*angle), + (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*SinD(90.0-j*angle), 0); } } Double_t **xmothervertex = new Double_t*[fgklayernumber]; @@ -5059,7 +4777,38 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ymothervertex[i][j] = ringsupportvertex[i][j]->Y(); } } - char lowerladdersupportname[30]; +//////////////////////////////////////////////////////////////////////////////// +// Start Corrections 13/06/08 +//////////////////////////////////////////////////////////////////////////////// + char lowerladderpconsupportname[100]; + TGeoPcon* lowerladderpconsupportshape[fgklayernumber]; + TGeoVolume* lowerladderpconsupport[fgklayernumber]; + Double_t lowerladderpconezsection[2] = {0.,fgkMountingBlockSupportWidth[1]}; + Double_t lowerladderpconradiusmax[fgklayernumber]; + Double_t lowerladderpconradiusmin[fgklayernumber]; + TGeoRotation* lowerladdersupportrot = new TGeoRotation(); + lowerladdersupportrot->SetAngles(90.,180.,-90); + for(Int_t i=0; iDefineSection(j, + lowerladderpconezsection[j],lowerladderpconradiusmin[i], + lowerladderpconradiusmax[i]); + 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); + (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],2,lowerladdersupportrot); + } +//////////////////////////////////////////////////////////////////////////////// +// End Corrections 13/06/08 +//////////////////////////////////////////////////////////////////////////////// + /*char lowerladdersupportname[30]; TGeoXtru* lowerladdersupportshape[fgklayernumber]; TGeoVolume* lowerladdersupport[fgklayernumber]; TGeoRotation* lowerladdersupportrot = new TGeoRotation(); @@ -5076,7 +4825,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ lowerladdersupport[i]->SetLineColor(fColorAl); (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],1); (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],2,lowerladdersupportrot); - } + }*/ ///////////////////////////////////////////////////////////// // Deallocating memory ///////////////////////////////////////////////////////////// @@ -5089,8 +4838,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ delete [] xmothervertex[i]; delete [] ymothervertex[i]; } - delete xmothervertex; - delete ymothervertex; + delete [] xmothervertex; + delete [] ymothervertex; delete globalrot; for(Int_t i=0; iSetLineColor(6); - TGeoXtru* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius, + TGeoShape* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius, nendcapcoverplateholedges,holesection); TGeoVolume* endcapcoverplatebighole = new TGeoVolume("EndCapCoverPlateBigHole", endcapcoverplatebigholeshape,fSSDAlCoolBlockMedium); @@ -5198,7 +4947,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ fSSDAlCoolBlockMedium); endcapfillingbox->SetLineColor(6); //////////////////////////// - // Contour Xtru Definition + // Contour shape Definition //////////////////////////// const Int_t kcontourvertexnumber = 10; Double_t xcontourvertex[kcontourvertexnumber]; @@ -5228,17 +4977,112 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ + fgkEndCapCoverPlateSmallHoleRadius; ycontourvertex[8] = ycontourvertex[7]; ycontourvertex[9] = ycontourvertex[0]; - TGeoXtru* contourshape = new TGeoXtru(2); - contourshape->DefinePolygon(kcontourvertexnumber,xcontourvertex,ycontourvertex); - contourshape->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness); - contourshape->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness); + + 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 Xtru Definition + // Hole Contour Shape Definition //////////////////////////// - const Int_t kholecontourvertexnumber = 10; + 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]; @@ -5295,24 +5139,11 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ yholecontourvertex[1][8] = yholecontourvertex[1][7]; yholecontourvertex[1][9] = yholecontourvertex[1][0]; - TGeoXtru* holecontourshape[2]; - holecontourshape[0] = new TGeoXtru(2); - holecontourshape[0]->DefinePolygon(kholecontourvertexnumber,xholecontourvertex[0], - yholecontourvertex[0]); - holecontourshape[0]->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness); - holecontourshape[0]->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness); - - holecontourshape[1] = new TGeoXtru(2); - holecontourshape[1]->DefinePolygon(kholecontourvertexnumber,xholecontourvertex[1], - yholecontourvertex[1]); - holecontourshape[1]->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness); - holecontourshape[1]->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness); - TGeoVolume* holecontour[2]; - holecontour[0] = new TGeoVolume("EndCapCoverPlateContour1",holecontourshape[0], + holecontour[0] = new TGeoVolume("EndCapCoverPlateContour1",contourshape1, fSSDAlCoolBlockMedium); holecontour[0]->SetLineColor(6); - holecontour[1] = new TGeoVolume("EndCapCoverPlateContour2",holecontourshape[1], + holecontour[1] = new TGeoVolume("EndCapCoverPlateContour2",contourshape2, fSSDAlCoolBlockMedium); holecontour[1]->SetLineColor(6); TGeoTranslation* holecontourtrans = new TGeoTranslation(fgkEndCapCoverPlateLength[3] @@ -5406,6 +5237,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; } @@ -5418,39 +5253,39 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ TGeoVolume* endcapcoolingtubetorus[5]; TGeoTube* endcapcoolingtubeshape[4]; TGeoVolume* endcapcoolingtube[4]; - char endcapcoolingtubetorusname[30]; - char endcapcoolingtubename[30]; + char endcapcoolingtubetorusname[100]; + char endcapcoolingtubename[100]; TGeoTorus* endcapcoolingwatertubetorushape[5]; TGeoVolume* endcapcoolingwatertubetorus[5]; TGeoTube* endcapcoolingwatertubeshape[4]; TGeoVolume* endcapcoolingwatertube[4]; - char endcapcoolingwatertubetorusname[30]; - char endcapcoolingwatertubename[30]; + 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); @@ -5792,10 +5627,19 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ yvertex[12] = yvertex[9]+2.*fgkEndCapSideCoverWidth[5]+fgkEndCapSideCoverLength[4]; yvertex[13] = yvertex[12]; yvertex[14] = yvertex[6]; - TGeoXtru* endcapsidecovershape = new TGeoXtru(2); - endcapsidecovershape->DefinePolygon(kvertexnumber,xvertex,yvertex); - endcapsidecovershape->DefineSection(0,-0.5*fgkEndCapSideCoverThickness); - endcapsidecovershape->DefineSection(1,0.5*fgkEndCapSideCoverThickness); + 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); @@ -5882,7 +5726,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 { @@ -6600,7 +6445,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t screwcoverplatesection[2] = {0.5*fgkEndCapCoverPlateThickness, fgkEndCapCoverPlateThickness + fgkEndCapCoolingTubeRadiusMax}; - TGeoXtru* screwcoverplateshape = GetScrewShape(screwcoverplateradius, + TGeoShape* screwcoverplateshape = GetScrewShape(screwcoverplateradius, screwcoverplatedgesnumber, screwcoverplatesection); TGeoVolume* screwcoverplate = new TGeoVolume("EndCapScrewCoverPlate", @@ -6873,14 +6718,13 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t radiusmax, Double_t width, Int_t ncables, - char* volname){ + const char* volname){ ///////////////////////////////////////////////////////////// // Generating EndCap High Voltage Tubes ///////////////////////////////////////////////////////////// Double_t effectiveinneradius = TMath::Sqrt(ncables)*radiusmin; - Double_t effectiveouteradius = TMath::Sqrt(TMath::Power(effectiveinneradius,2.) - + TMath::Power(radiusmax,2.) - - TMath::Power(radiusmin,2.)); + 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); @@ -6936,10 +6780,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ //////////////////////////////////// TGeoXtru* upendcapsupportshape[klayernumber]; TGeoVolume* upendcapsupport[klayernumber]; - char upendcapsupportname[30]; + 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); @@ -6973,10 +6817,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ //////////////////////////////////// TGeoXtru* downendcapsupportshape[klayernumber]; TGeoVolume* downendcapsupport[klayernumber]; - char downendcapsupportname[30]; + char downendcapsupportname[100]; for(Int_t i=0; iDefinePolygon(2*(knedges+1),xdownvertex[i],ydownvertex[i]); if(i==0){ @@ -7000,10 +6844,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ TGeoPgon* endcapsupportmothershape[klayernumber]; TGeoVolume** endcapsupportmother; endcapsupportmother = new TGeoVolume*[klayernumber]; - char endcapsupportmothername[30]; + 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]); @@ -7052,10 +6896,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ // Setting TGeoPgon Volume for Mother Container /////////////////////////////////////////////// TGeoPgon* endcapsupportsystemshape[klayernumber]; - char endcapsupportsystemothername[30]; + char endcapsupportsystemothername[100]; for(Int_t i=0; iDefineSection(0,-(fgkEndCapCoverPlateWidth[1] - fgkEndCapCoverPlateWidth[0]),*radiusmin[i], (*radiusmax[i]*CosD(0.5*upedgeangle[i]) @@ -7124,7 +6968,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ for(Int_t j=0; jSetLineColor(9); - TGeoTranslation* ssdcablelay5rightrans = - new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay5ITSPosition - + fgkEndCapSupportCenterLay5Position - + 0.5*ssdcablelay5rightsidelength); + ///////////////////////////////////////////////////////////// + // 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); + //ssdcablesmother->AddNode(ssdcablelay5righttube,1,ssdcablelay5rightrans); //////////////////////////////////// // TGeoPCone Volumes /////////////////////////////////// @@ -7589,26 +7443,41 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcableslay5pconzsection[6]; Double_t ssdcableslay5pconrmin[6]; Double_t ssdcableslay5pconrmax[6]; - ssdcableslay5pconrmin[0] = ssdcablelay5rightubeshape->GetRmin(); - ssdcableslay5pconrmax[0] = ssdcablelay5rightubeshape->GetRmax(); + ssdcableslay5pconrmin[0] = fgkEndCapSupportMiddleRadius[0]+kSSDCablesLay5TubeRadiusMin; ssdcableslay5pconrmin[1] = fgkSSDPConeUpRadius*(1.0+ssdcablelayvertical); - ssdcableslay5pconrmax[1] = ssdcableslay5pconrmin[1]+fgkSSDCablesLay5RightSideHeight; + ssdcableslay5pconzsection[0] = fgkEndCapSupportCenterLay5ITSPosition - + fgkEndCapSupportCenterLay5Position - + 2.*ssdcablelay5rightubeshape->GetDz(); + + 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 @@ -7617,20 +7486,21 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcableangle = (fgkSSDPConeTrapezoidBasis-2.*(fgkSSDPConeUpMaxRadius - fgkSSDPConeUpRadius)/TanD(fgkSSDPConeTrapezoidAngle)) / fgkSSDPConeUpRadius*TMath::RadToDeg()*2; - ssdcableslay5pconshape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle, - ssdcableangle,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]; + ssdcableslay5pconrmax[2] = ssdcableslay5pconrmax[1]; ssdcableslay5pconrmin[3] = 0.25*(fgkSSDPConeUpMaxRadius+3.*fgkSSDPConeUpRadius - 4.*fgkSSDLowerPConeRadius)+fgkSSDLowerPConeRadius; ssdcableslay5pconrmin[3]*=(1.0+ssdcablelayvertical); - ssdcableslay5pconrmax[3] = ssdcableslay5pconrmin[3]+fgkSSDCablesLay5RightSideHeight; + 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-fgkSSDCableAngle-0.5*ssdcableangle, + ssdcableslay5pconshape[2] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle, ssdcableangle,2); ssdcableslay5pconrmin[4] = ssdcableslay5pconrmin[3]; ssdcableslay5pconrmax[4] = ssdcableslay5pconrmax[3]; @@ -7653,6 +7523,8 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ 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(); @@ -7660,11 +7532,6 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ //////////////////////////////////// // Positioning Left SSD Cables Part //////////////////////////////////// - TGeoTranslation* ssdcablesLay5RightTubeToLeftrans = new TGeoTranslation(0.,0., - - 0.5*ssdcablelay5rightsidelength - - fgkEndCapSupportCenterLay5Position - - fgkEndCapSupportCenterLay5ITSPosition); - ssdcablesmother->AddNode(ssdcablelay5righttube,2,ssdcablesLay5RightTubeToLeftrans); TGeoRotation* ssdcablesLay5RightPConToLeftRot = new TGeoRotation(); ssdcablesLay5RightPConToLeftRot->SetAngles(90.,180.,-90); ssdcablesmother->AddNode(ssdcableslay5pcon[0],2,ssdcablesLay5RightPConToLeftRot); @@ -7682,9 +7549,41 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ///////////////////////////////////////////////////////////// // 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 - + fgkSSDCablesLay5RightSideWaterHeight, + + kSSDCablesLay5RightSideWaterHeight, 0.5*ssdcablelay5rightsidelength); TGeoVolume* ssdcablelay5rightwatertube = new TGeoVolume("SSDCableLay5RightSideWaterTube", ssdcablelay5rightubewatershape, @@ -7692,6 +7591,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ssdcablelay5rightwatertube->SetLineColor(7); ssdcablesmother->AddNode(ssdcablelay5rightwatertube,1,ssdcablelay5rightrans); ssdcablesmother->AddNode(ssdcablelay5rightwatertube,2,ssdcablesLay5RightTubeToLeftrans); + */ //////////////////////////////////// // TGeoPCone Water Volumes Layer /////////////////////////////////// @@ -7703,10 +7603,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcableslay5pconwaterrmax[6]; ssdcableslay5pcwateronrmin[0] = ssdcableslay5pconrmax[0]; ssdcableslay5pconwaterrmax[0] = ssdcableslay5pcwateronrmin[0] - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcableslay5pcwateronrmin[1] = ssdcableslay5pconrmax[1]; ssdcableslay5pconwaterrmax[1] = ssdcableslay5pcwateronrmin[1] - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcableslay5pconwaterzsection[0] = ssdcableslay5pconzsection[0]; ssdcableslay5pconwaterzsection[1] = ssdcableslay5pconzsection[1]; for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[0]->DefineSection(i,ssdcableslay5pconwaterzsection[i], @@ -7719,28 +7619,28 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ //////////////////////////////////// ssdcableslay5pconwaterzsection[2] = ssdcableslay5pconzsection[2]; ssdcableslay5pconwaterzsection[3] = ssdcableslay5pconzsection[3]; - ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle, + ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle, ssdcableangle,2); ssdcableslay5pcwateronrmin[2] = ssdcableslay5pconrmax[1]; ssdcableslay5pconwaterrmax[2] = ssdcableslay5pcwateronrmin[2] - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcableslay5pcwateronrmin[3] = ssdcableslay5pconrmax[3]; ssdcableslay5pconwaterrmax[3] = ssdcableslay5pcwateronrmin[3] - + fgkSSDCablesLay5RightSideWaterHeight; + + 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-fgkSSDCableAngle-0.5*ssdcableangle, + ssdcableslay5pconwatershape[2] = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle, ssdcableangle,2); ssdcableslay5pcwateronrmin[4] = ssdcableslay5pconrmax[3]; ssdcableslay5pconwaterrmax[4] = ssdcableslay5pcwateronrmin[4] - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcableslay5pcwateronrmin[5] = ssdcableslay5pconrmax[4]; ssdcableslay5pconwaterrmax[5] = ssdcableslay5pcwateronrmin[4] - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcableslay5pconwaterzsection[4] = ssdcableslay5pconzsection[4]; ssdcableslay5pconwaterzsection[5] = ssdcableslay5pconzsection[5]; for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[2]->DefineSection(i,ssdcableslay5pconwaterzsection[i+4], @@ -7764,9 +7664,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ///////////////////////// // SSD Layer 6 Cables ///////////////////////// - Double_t ssdcableslay6rigthsideradiusmin = fgkEndCapSupportMiddleRadius[1]+fgkSSDCablesLay6TubeRadiusMin; - Double_t ssdcablelay6rightsidelength = 2.*ssdcablelay5rightsidelength; - Double_t ssdcableslay6rightsideradiusmax = ssdcableslay6rigthsideradiusmin+fgkSSDCablesLay6RightSideHeight; + 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); @@ -7784,10 +7685,15 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ - 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(); //////////////////////////////////// - TGeoPcon* ssdcableslay6pconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle, + // 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]; @@ -7803,6 +7709,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ 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); @@ -7810,6 +7717,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ssdcablesmother->AddNode(ssdcableslay6pcon,i+1,ssdcableslay5pconrot[i]); ssdcablesmother->AddNode(ssdcableslay6pcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]); } + */ //////////////////////////////////// //cablescapacity[9] = 8.*ssdcableslay6pconshape->Capacity(); ///////////////////////// @@ -7817,7 +7725,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ///////////////////////// TGeoTube* ssdcablelay6righwatertubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax, ssdcableslay6rightsideradiusmax - + fgkSSDCablesLay5RightSideWaterHeight, + + kSSDCablesLay5RightSideWaterHeight, 0.5*ssdcablelay6rightsidelength); TGeoVolume* ssdcablelay6rightwatertube = new TGeoVolume("SSDCableLay6RightSideWaterTube", ssdcablelay6righwatertubeshape, @@ -7825,7 +7733,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ssdcablelay6rightwatertube->SetLineColor(7); ssdcablesmother->AddNode(ssdcablelay6rightwatertube,1,ssdcablelay6rightrans); ssdcablesmother->AddNode(ssdcablelay6rightwatertube,2,ssdcablesLay6RightTubeToLeftrans); - TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle, + TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-kSSDCableAngle-0.5*ssdcableangle, ssdcableangle,2); TGeoVolume* ssdcableslay6waterpcon; Double_t ssdcableslay6waterpconrmin[2]; @@ -7833,7 +7741,7 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcableslay6waterpconzsection[2]; ssdcableslay6waterpconrmin[0] = ssdcableslay6rightsideradiusmax; ssdcableslay6waterpconrmax[0] = ssdcableslay6rightsideradiusmax - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcableslay6waterpconrmin[1] = ssdcableslay6waterpconrmin[0]; ssdcableslay6waterpconrmax[1] = ssdcableslay6waterpconrmax[0]; ssdcableslay6waterpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition @@ -7863,35 +7771,37 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcablepatchpanel3BB26radiusmin[2]; Double_t ssdcablepatchpanel3BB26radiusmax[2]; Double_t ssdcablepatchpanel3RB26zsection[2]; - ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*fgkSSDPatchPanelHeigth+2.8; + ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*kSSDPatchPanelHeight;// +2.8+0.003;//Avoid small overlap with SPDshieldring; ssdcablepatchpanel3BB26radiusmax[0] = ssdcablepatchpanel3BB26radiusmin[0] - + fgkSSDCablesLay5RightSideHeight - + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth; - ssdcablepatchpanel3BB26radiusmin[1] = fgkSSDPatchPanel2RB26Radius; + + kSSDCablesHeight; + ssdcablepatchpanel3BB26radiusmin[1] = kSSDPatchPanel2RB26Radius; ssdcablepatchpanel3BB26radiusmax[1] = ssdcablepatchpanel3BB26radiusmin[1] - + 0.*fgkSSDCablesLay5RightSideHeight - + 0.*fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth; + + kSSDCablesHeight; ssdcablepatchpanel3RB26zsection[0] = 0.5*fgkSSDCentralSupportLength - + fgkSSDCentralAL3SupportLength + + fgkSSDCentralAL3SupportLength + fgkSSDPConeZLength[0]; - ssdcablepatchpanel3RB26zsection[1] = fgkSSDPatchPanel2RB26ITSDistance; + 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-fgkSSDCablesPatchPanel2RB26Angle[0] + 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[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] - + fgkSSDCablesPatchPanel2RB26Angle[1],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+fgkSSDCablesPatchPanel2RB26Angle[0] - + fgkSSDCablesPatchPanel2RB26Angle[1],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(); //////////////////////////////////////// @@ -7904,29 +7814,28 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ + fgkSSDCentralAL3SupportLength + (4.0/5.0)*fgkSSDPConeZLength[0]; ssdcableitsring3BB26pconzsection[1] = ssdcablepatchpanel3RB26zsection[0]; - ssdcableitsring3BB26pconrmin[0] = fgkSSDPConeUpRadius-0.5*fgkSSDPatchPanelHeigth; - ssdcableitsring3BB26pconrmax[0] = ssdcableitsring3BB26pconrmin[0] - + fgkSSDCablesLay5RightSideHeight - + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth; + 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-fgkSSDCablesPatchPanel2RB26Angle[0] + ssdcableitsring3BB26pconshape[0] = new TGeoPcon(90.0 - kSSDCablesPatchPanel2RB26Angle[0] - 0.5*ssdcableangle,ssdcableangle - + (fgkSSDCablesPatchPanel2RB26Angle[0] - - fgkSSDCableAngle),2); - ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0+fgkSSDCablesPatchPanel2RB26Angle[1] + + (kSSDCablesPatchPanel2RB26Angle[0] + - kSSDCableAngle),2); + ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0 + kSSDCablesPatchPanel2RB26Angle[1] - 0.5*ssdcableangle,ssdcableangle - + 3.0*fgkSSDCableAngle - - fgkSSDCablesPatchPanel2RB26Angle[1],2); - ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-fgkSSDCablesPatchPanel2RB26Angle[0] + + 3.0*kSSDCableAngle + - kSSDCablesPatchPanel2RB26Angle[1],2); + ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-kSSDCablesPatchPanel2RB26Angle[0] - 0.5*ssdcableangle,ssdcableangle - - fgkSSDCableAngle - + fgkSSDCablesPatchPanel2RB26Angle[0],2); - ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+fgkSSDCablesPatchPanel2RB26Angle[1] + - kSSDCableAngle + + kSSDCablesPatchPanel2RB26Angle[0],2); + ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+kSSDCablesPatchPanel2RB26Angle[1] - 0.5*ssdcableangle,ssdcableangle - + 3.0*fgkSSDCableAngle - - fgkSSDCablesPatchPanel2RB26Angle[1],2); + + 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], @@ -7942,8 +7851,10 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ssdcableitsring3BB26pconshape[3],fSSDCopper); for(Int_t i=0;i<4;i++){ ssdcableitsring3BB26pcon[i]->SetLineColor(9); - ssdcablesmother->AddNode(ssdcableitsring3BB26pcon[i],i+1); + 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() @@ -7957,17 +7868,16 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcablepatchpanel3RB24zsection[2]; ssdcablepatchpanel3BB24radiusmin[0] = ssdcablepatchpanel3BB26radiusmin[0]; ssdcablepatchpanel3BB24radiusmax[0] = ssdcablepatchpanel3BB26radiusmax[0]; - ssdcablepatchpanel3BB24radiusmin[1] = fgkSSDPatchPanel2RB24Radius; + ssdcablepatchpanel3BB24radiusmin[1] = kSSDPatchPanel2RB24Radius; ssdcablepatchpanel3BB24radiusmax[1] = ssdcablepatchpanel3BB24radiusmin[1] - + 0.*fgkSSDCablesLay5RightSideHeight - + 0.*fgkSSDCablesLay6RightSideHeight - + 0.5*fgkSSDPatchPanelHeigth; + + kSSDCablesHeight; ssdcablepatchpanel3RB24zsection[0] = -0.5*fgkSSDCentralSupportLength - fgkSSDCentralAL3SupportLength - fgkSSDPConeZLength[0]; - ssdcablepatchpanel3RB24zsection[1] = -fgkSSDPatchPanel2RB24ITSDistance; + ssdcablepatchpanel3RB24zsection[1] = -kSSDPatchPanel2RB24ITSDistance; + //Printf(Form("RB24 cable length %g",ssdcablepatchpanel3RB24zsection[1]-ssdcablepatchpanel3RB24zsection[0])); TGeoPcon* ssdcablepatchpanel3RB24pconshape = - new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB24Angle[1] + 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]); @@ -7975,15 +7885,16 @@ 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(0.0,0.0,0.0); - ssdcablepatchpanel3B24rot[1]->SetAngles(fgkSSDCablesPatchPanel2RB24Angle[0] - + fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0); - ssdcablepatchpanel3B24rot[2]->SetAngles(180.0,0.0,0.0); - ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB24Angle[0] - + fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0); + 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(); //////////////////////////////////////// @@ -7994,25 +7905,24 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ Double_t ssdcableitsring3BB24pconrmax[2]; ssdcableitsring3BB24pconzsection[0] = -ssdcableitsring3BB26pconzsection[0]; ssdcableitsring3BB24pconzsection[1] = ssdcablepatchpanel3RB24zsection[0]; - ssdcableitsring3BB24pconrmin[0] = fgkSSDPConeUpRadius-0.5*fgkSSDPatchPanelHeigth; - ssdcableitsring3BB24pconrmax[0] = ssdcableitsring3BB24pconrmin[0] - + fgkSSDCablesLay5RightSideHeight - + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeigth; + 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(fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle - + (90.0-fgkSSDCablesPatchPanel2RB24Angle[1] - - fgkSSDCableAngle),2); - ssdcableitsring3BB24pconshape[1] = new TGeoPcon(90.0+fgkSSDCableAngle-0.5*ssdcableangle, - ssdcableangle-fgkSSDCableAngle - + fgkSSDCablesPatchPanel2RB24Angle[0],2); - ssdcableitsring3BB24pconshape[2] = new TGeoPcon(180.0+fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle - - fgkSSDCableAngle - + 90.0-fgkSSDCablesPatchPanel2RB24Angle[1],2); - ssdcableitsring3BB24pconshape[3] = new TGeoPcon(fgkSSDCableAngle-0.5*ssdcableangle, - ssdcableangle-fgkSSDCableAngle - + fgkSSDCablesPatchPanel2RB24Angle[0],2); + 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], @@ -8028,38 +7938,29 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ ssdcableitsring3BB24pconshape[3],fSSDCopper); for(Int_t i=0;i<4;i++){ ssdcableitsring3BB24pcon[i]->SetLineColor(9); - ssdcablesmother->AddNode(ssdcableitsring3BB24pcon[i],i+1); + 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(); - //////////////////////////////////// - // Volumes for Material Budget - //////////////////////////////////// - TGeoTube* ssdcablelay6materialbudgetubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax - + fgkSSDCablesLay5RightSideWaterHeight, - ssdcableslay6rightsideradiusmax - + fgkSSDCablesLay5RightSideWaterHeight - + fgkSSDCableMaterialBudgetHeight,0.5*ssdcablelay6rightsidelength); - TGeoVolume* ssdcablelay6materialbudgetube = new TGeoVolume("SSDCableLay6MaterialBudgetTube", - ssdcablelay6materialbudgetubeshape, - fSSDCopper); - ssdcablelay6materialbudgetube->SetLineColor(9); - ssdcablesmother->AddNode(ssdcablelay6materialbudgetube,1,ssdcablelay6rightrans); - ssdcablesmother->AddNode(ssdcablelay6materialbudgetube,2,ssdcablesLay6RightTubeToLeftrans); + // MvL: Pcon are connection to patch panels (part of) + // Removed; do not contribute much; put into ring structure + /* TGeoPcon* ssdcablelay6materialbudgetpconshape = - new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle,2); + 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 - + fgkSSDCablesLay5RightSideWaterHeight; + + kSSDCablesLay5RightSideWaterHeight; ssdcablelay6materialbudgetpconrmax[0] = ssdcablelay6materialbudgetpconrmin[0] - + fgkSSDCableMaterialBudgetHeight; + + kSSDCableMaterialBudgetHeight; ssdcablelay6materialbudgetpconrmin[1] = ssdcablelay6materialbudgetpconrmin[0]; ssdcablelay6materialbudgetpconrmax[1] = ssdcablelay6materialbudgetpconrmax[0]; ssdcablelay6materialbudgetpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition @@ -8077,46 +7978,59 @@ void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){ 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* vertexpos[], Double_t* width, - Double_t height, char* shapename, Int_t isign) const{ +TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3 const * const vertexpos[4] , const Double_t* width, + Double_t height, const char* shapename, Int_t isign) const{ ///////////////////////////////////////////////////////////// // Method generating an Arb shape ///////////////////////////////////////////////////////////// const Int_t kvertexnumber = 8; const Int_t ktransvectnumber = 2; - TVector3* vertex[kvertexnumber]; - TVector3* transvector[2]; - for(Int_t i=0; iSetVertex(i,vertex[i]->X(),vertex[i]->Y()); - ///////////////////////////////////////////////////////////// - // Deallocating memory - ///////////////////////////////////////////////////////////// - for(Int_t i=0; i< kvertexnumber; i++) delete vertex[i]; - for(Int_t i=0; i< ktransvectnumber; i++) delete transvector[i]; - ///////////////////////////////////////////////////////////// + for(Int_t i = 0; iSetVertex(i,vertex[i].X(),vertex[i].Y()); + } + return arbshape; } /////////////////////////////////////////////////////////////////////////////// @@ -8132,8 +8046,8 @@ TGeoXtru* AliITSv11GeometrySSD::GetArcShape(Double_t phi, Double_t rmin, Double_t angle = 0.; for(Int_t i=0; iDefinePolygon(outvertexnumber+invertexnumber+2,xscrewvertex,yscrewvertex); - screwshape->DefineSection(0,section[0]); - screwshape->DefineSection(1,section[1]); + TGeoXtru* screwshapeout = new TGeoXtru(2); + screwshapeout->DefinePolygon(outvertexnumber,xscrewvertex,yscrewvertex); + screwshapeout->DefineSection(0,section[0]); + screwshapeout->DefineSection(1,section[1]); + TGeoXtru* screwshapein = new TGeoXtru(2); + screwshapein->DefinePolygon(invertexnumber,&xscrewvertex[outvertexnumber],&yscrewvertex[outvertexnumber]); + screwshapein->DefineSection(0,section[0]-0.01); // make inner part bigger in Z + screwshapein->DefineSection(1,section[1]+0.01); // safer when we subtract it + TGeoSubtraction *snode = new TGeoSubtraction(screwshapeout, screwshapein); + TGeoCompositeShape *screwshape = new TGeoCompositeShape("", snode); + delete [] xscrewvertex; delete [] yscrewvertex; return screwshape; } //////////////////////////////////////////////////////////////////////////////// -TGeoXtru* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, Double_t *section) const { +TGeoShape* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, const Double_t *section) const { /////////////////////////////////////////////////////////////////////// // Method Generating the Hole Shape // radius of the Hole // nedges: number of edges to approximate the circle /////////////////////////////////////////////////////////////////////// - Int_t vertexnumber = nedges+6; - Double_t* xholevertex = new Double_t[vertexnumber]; - Double_t* yholevertex = new Double_t[vertexnumber]; - xholevertex[0] = radius; - xholevertex[1] = xholevertex[0]; - xholevertex[2] = -xholevertex[1]; - xholevertex[3] = xholevertex[2]; - xholevertex[4] = xholevertex[0]; - yholevertex[0] = 0.; - yholevertex[1] = -radius; - yholevertex[2] = yholevertex[1]; - yholevertex[3] = -yholevertex[1]; - yholevertex[4] = yholevertex[3]; - for(Int_t i=0; i TGeoShape::Tolerance()) { + tr = new TGeoTranslation(0.,0.,z); + tr->RegisterYourself(); + } + TGeoBBox *box = new TGeoBBox("",radius,radius,dz); + for(Int_t i=0; iDefinePolygon(vertexnumber,xholevertex,yholevertex); - holeshape->DefineSection(0,section[0]); - holeshape->DefineSection(1,section[1]); + TGeoXtru* holeshapeout = new TGeoXtru(2); + holeshapeout->DefinePolygon(nedges,xholevertex,yholevertex); + holeshapeout->DefineSection(0,section[0]-0.01); // make subtracted part larger in Z + holeshapeout->DefineSection(1,section[1]+0.01); + TGeoSubtraction *snode = new TGeoSubtraction(box,holeshapeout,tr); + TGeoCompositeShape *holeshape = new TGeoCompositeShape("", snode); + delete [] xholevertex; delete [] yholevertex; return holeshape; } //////////////////////////////////////////////////////////////////////////////// -TVector3* AliITSv11GeometrySSD::GetReflection(TVector3* vector,Double_t* param) const{ +TVector3* AliITSv11GeometrySSD::GetReflection(const TVector3* vector,const Double_t* param) const{ ///////////////////////////////////////////////////////////// // Given an axis specified by param, it gives the reflection of the point // respect to the axis @@ -8250,7 +8171,7 @@ TVector3* AliITSv11GeometrySSD::GetReflection(TVector3* vector,Double_t* param) return reflectedvector; } //////////////////////////////////////////////////////////////////////////////// -TGeoHMatrix* AliITSv11GeometrySSD::AddTranslationToHMatrix(TGeoHMatrix* ct, +TGeoHMatrix* AliITSv11GeometrySSD::AddTranslationToHMatrix(const TGeoHMatrix* ct, Double_t dx, Double_t dy, Double_t dz) const{ @@ -8270,11 +8191,11 @@ TGeoMedium* AliITSv11GeometrySSD::GetMedium(const char* mediumName) { ///////////////////////////////////////////////////////////// // Method returning the Medium type ///////////////////////////////////////////////////////////// - char ch[30]; - sprintf(ch, "ITS_%s",mediumName); + char ch[100]; + snprintf(ch,100, "ITS_%s",mediumName); TGeoMedium* medium = gGeoManager->GetMedium(ch); if (! medium) - printf("Error(AliITSv11GeometrySSD)::medium %s not found !\n", mediumName); + AliError(Form("medium %s not found !\n", mediumName)); return medium; } //////////////////////////////////////////////////////////////////////////////// @@ -8304,6 +8225,7 @@ void AliITSv11GeometrySSD::CreateMaterials(){ //////////////////////////////// fSSDStiffener0603CapacitorMedium = GetMedium("SDD ruby sph. Al2O3$"); fSSDStiffener1812CapacitorMedium = GetMedium("SDD ruby sph. Al2O3$"); + fSSDStiffenerCapacitorCapMedium = GetMedium("NiSn$"); /////////////////////////// // Stiffener Hybrid Wire /////////////////////////// @@ -8345,6 +8267,8 @@ void AliITSv11GeometrySSD::CreateMaterials(){ ///////////////////////////////////////////////////////////////////// fSSDAir = GetMedium("SDD AIR$"); fSSDCopper = GetMedium("COPPER$"); + fSSDSn = GetMedium("Sn$"); fCreateMaterials = kTRUE; } ///////////////////////////////////////////////////////////////////// +