#include "TList.h"
#include "TGeoMatrix.h"
#include "TGeoCompositeShape.h"
+#include "TGeoBoolNode.h"
#include "TGeoTube.h"
#include "TGeoBBox.h"
#include "TGeoXtru.h"
// Variable for Vertical Disalignement of Modules
/////////////////////////////////////////////////////////////////////////////////
const Double_t AliITSv11GeometrySSD::fgkSSDTolerance = 0.0001*fgkmm;
-//const Double_t AliITSv11GeometrySSD::fgkSSDTolerance = 1.*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment = 0.*fgkmm;
-const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment2 = 0.2*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment = 0.2*fgkmm;
+const Double_t AliITSv11GeometrySSD::fgkSSDModuleSideDisalignment = 0.2*fgkmm;
/////////////////////////////////////////////////////////////////////////////////
// Layer5 (lengths are in mm and angles in degrees)
/////////////////////////////////////////////////////////////////////////////////
const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth =
2.000*fgkmm;
const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] =
- { 4.620*fgkmm-fgkSSDModuleVerticalDisalignment2,
- 5.180*fgkmm-fgkSSDModuleVerticalDisalignment2};
+ { 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.014*fgkmm, 0.010*fgkmm, fgkSSDModuleCoolingBlockToSensor
- (fgkSSDSensorSideSupportHeight[1]
- fgkSSDSensorSideSupportHeight[0])
- - fgkSSDModuleVerticalDisalignment2
+ - fgkSSDModuleVerticalDisalignment
- fgkSSDCoolingBlockHoleCenter
- fgkSSDStiffenerHeight
- fgkSSDChipHeight-fgkSSDSensorHeight,
fgkSSDModuleCoolingBlockToSensor
- - fgkSSDModuleVerticalDisalignment2
+ - fgkSSDModuleVerticalDisalignment
- fgkSSDCoolingBlockHoleCenter
- fgkSSDStiffenerHeight
- fgkSSDChipHeight-fgkSSDSensorHeight};
/////////////////////////////////////////////////////////////////////////////////
// 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
- 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::fgkLadderSupportRingLay5Position = 451.35*fgkmm;
- fgkSSDSensorCenterSupportThickness[0]),
- (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight
- fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight
- - fgkSSDModuleVerticalDisalignment2));
+ - fgkSSDModuleVerticalDisalignment));
fhybridmatrix = new TGeoHMatrix();
for(Int_t i=0; i<khybridmatrixnumber; i++) fhybridmatrix->MultiplyLeft(localhybridtrans[i]);
/////////////////////////////////////////////////////////////
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];
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])
- + 0.5*fgkSSDModuleVerticalDisalignment2);
+ - 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
- + 0.5*fgkSSDModuleVerticalDisalignment2);
+ -fgkSSDModuleCoolingBlockToSensor);
for(Int_t i=0; i<2; i++)
localssdsensorcombitrans[i] = new TGeoCombiTrans(*localssdsensortrans[i],
*localssdsensorrot);
for(Int_t j=0; j<kvertexnumber; j++) vertexposition[1][j] =
new TVector3((GetReflection(vertexposition[0][j],param))->X(),
(GetReflection(vertexposition[0][j],param))->Y());
- char* carbonfibersupportshapename[kshapesnumber] =
+ const char* carbonfibersupportshapename[kshapesnumber] =
{"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
- char* carbonfibersupportname[kshapesnumber] =
+ const char* carbonfibersupportname[kshapesnumber] =
{"CarbonFiberSupport1","CarbonFiberSupport2"};
TGeoArb8* carbonfibersupportshape[kshapesnumber];
TGeoVolume* carbonfibersupport[kshapesnumber];
vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
fgkCarbonFiberLowerSupportVolumePosition[1]);
- char* carbonfiberlowersupportshapename[kshapesnumber] =
+ const char* carbonfiberlowersupportshapename[kshapesnumber] =
{"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
- char* carbonfiberlowersupportname[kshapesnumber] =
+ const char* carbonfiberlowersupportname[kshapesnumber] =
{"CarbonFiberLowerSupport1","CarbonFiberLowerSupport2"};
TGeoArb8* carbonfiberlowersupportshape[kshapesnumber];
TGeoVolume* carbonfiberlowersupport[kshapesnumber];
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)];
xmothervertex,ymothervertex);
ssdendflexmothershape->DefineSection(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
//////////////////////////////////////
- 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];
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]
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();
// Ladder Cooling Tubes
coolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
0.25 * (fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
- - 2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth));
+ - 2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
+ -0.5*fgkSSDTolerance);
coolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
coolingtubeshape[0][0]->GetDz());
coolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
0.5*(fgkSSDModuleStiffenerPosition[1]
- - fgkSSDSensorOverlap));
+ - fgkSSDSensorOverlap-fgkSSDTolerance));
coolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
coolingtubeshape[1][0]->GetDz());
coolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
- 0.5*(fgkSSDModuleStiffenerPosition[1]));
+ 0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDTolerance));
coolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
- coolingtubeshape[2][0]->GetDz());
+ coolingtubeshape[2][0]->GetDz()-0.5*fgkSSDTolerance);
// End Ladder Cooling Tubes
TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber];
for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
+ fgkendladdercoolingsupportdistance[1]
- fgkCoolingTubeSupportWidth-fgkSSDTolerance));
endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
- endladdercoolingtubeshape[1][0]->GetDz());
+ endladdercoolingtubeshape[1][0]->GetDz()-0.5*fgkSSDTolerance);
endladdercoolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
- fgkEndLadderMountingBlockPosition[0]
- fgkendladdercoolingsupportdistance[1]
- fgkCoolingTubeSupportWidth-fgkSSDTolerance));
endladdercoolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
- endladdercoolingtubeshape[2][0]->GetDz());
+ endladdercoolingtubeshape[2][0]->GetDz()-0.5*fgkSSDTolerance);
endladdercoolingtubeshape[3][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
0.50 * (fgkMountingBlockToSensorSupport
- 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
- fgkEndLadderMountingBlockPosition[1]
- fgkCoolingTubeSupportWidth-fgkSSDTolerance));
endladdercoolingtubeshape[3][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
- endladdercoolingtubeshape[3][0]->GetDz());
+ endladdercoolingtubeshape[3][0]->GetDz()-0.5*fgkSSDTolerance);
endladdercoolingtubeshape[4][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
0.50 * (fgkendladdercoolingsupportdistance[2]-fgkSSDTolerance));
endladdercoolingtubeshape[4][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
- endladdercoolingtubeshape[4][0]->GetDz());
+ endladdercoolingtubeshape[4][0]->GetDz()-0.5*fgkSSDTolerance);
// Ladder Cooling Tubes
TGeoVolume** coolingtube[fgkcoolingtubenumber];
for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtube[i] =
endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
endladdercoolingtube[i][1]->SetLineColor(fColorWater);
}
+
/////////////////////////////////////////////////////////////
// Virtual Volume containing Cooling Tubes
/////////////////////////////////////////////////////////////
+fgkSSDChipCablesWidth[2]);
Double_t dy = fgkSSDChipCablesLength[1];
Double_t dz = SSDChipCablesHeigth;
- TGeoBBox* ssdchipcablesmotherbox = new TGeoBBox(0.5*dx,0.5*dy,0.5*dz,boxorigin);
+ new TGeoBBox(0.5*dx,0.5*dy,0.5*dz,boxorigin);
TGeoVolumeAssembly* ssdchipcablesmother = new TGeoVolumeAssembly("SSDChipCablesMother");
// TGeoVolume* ssdchipcablesmother = new TGeoVolume("SSDChipCablesMother",
// ssdchipcablesmotherbox,fSSDAir);
}
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] =
Double_t laddercablethickness = (fgkSSDLay6SensorsNumber+2)
* (fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]);
xmothervertex[0][0] = -0.5*fgkSSDSensorWidth;
- ymothervertex[0][0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor
- - fgkSSDModuleVerticalDisalignment;
+ ymothervertex[0][0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor;
xmothervertex[0][1] = xmothervertex[0][0];
ymothervertex[0][1] = 0.0;
xmothervertex[0][2] = - 0.5*fgkSSDModuleSensorSupportDistance-2.*fgkCoolingTubeSupportRmax
xmothervertex[1][i] = xmothervertex[0][i];
ymothervertex[1][i] = ymothervertex[0][i];
}
- const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
+///////////////////////////////////////////////////////////////////////////
+// Disalignement Mother Volume corrections 25/08/08
+///////////////////////////////////////////////////////////////////////////
+ TGeoXtru* leftladdershape[fgkladdernumber];
+ TGeoXtru* centersensorladdershape[fgkladdernumber];
+ TGeoXtru* rightladdershape[fgkladdernumber];
for(Int_t i=0; i<fgkladdernumber; i++){
- laddershape[i]->DefinePolygon(kmothervertexnumber,xmothervertex[i],
- ymothervertex[i]);
- laddershape[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
- laddershape[i]->DefineSection(1,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
+ leftladdershape[i] = new TGeoXtru(2);
+ centersensorladdershape[i] = new TGeoXtru(2);
+ rightladdershape[i] = new TGeoXtru(2);
+ }
+ //////////////////////////////////////
+ // Setting the names for shapes
+ //////////////////////////////////////
+ leftladdershape[0]->SetName("Lay5LeftLadderSegmentContainer");
+ leftladdershape[1]->SetName("Lay6LeftLadderSegmentContainer");
+ centersensorladdershape[0]->SetName("Lay5CenterSensorContainer");
+ centersensorladdershape[1]->SetName("Lay6CenterSensorContainer");
+ rightladdershape[0]->SetName("Lay5RightLadderSegmentContainer");
+ rightladdershape[1]->SetName("Lay6RightLadderSegmentContainer");
+ //////////////////////////////////////
+ Double_t xleftladdervertex[fgkladdernumber][kmothervertexnumber];
+ Double_t yleftladdervertex[fgkladdernumber][kmothervertexnumber];
+ Double_t xcentersensorvertex[fgkladdernumber][kmothervertexnumber];
+ Double_t ycentersensorvertex[fgkladdernumber][kmothervertexnumber];
+ Double_t xrightladdervertex[fgkladdernumber][kmothervertexnumber];
+ Double_t yrightladdervertex[fgkladdernumber][kmothervertexnumber];
+ for(Int_t i=0; i<fgkladdernumber; i++)
+ for(Int_t j=0; j<kmothervertexnumber; j++){
+ xleftladdervertex[i][j] = xmothervertex[i][j];
+ yleftladdervertex[i][j] = ymothervertex[i][j];
+ xcentersensorvertex[i][j] = xmothervertex[i][j];
+ ycentersensorvertex[i][j] = ymothervertex[i][j];
+ xrightladdervertex[i][j] = xmothervertex[i][j];
+ yrightladdervertex[i][j] = ymothervertex[i][j];
+ }
+ xcentersensorvertex[0][0] -= fgkSSDModuleSideDisalignment;
+ xcentersensorvertex[0][1] = xcentersensorvertex[0][0];
+ xcentersensorvertex[0][6] = -xcentersensorvertex[0][1];
+ xcentersensorvertex[0][7] = -xcentersensorvertex[0][0];
+
+ xcentersensorvertex[1][0] = xcentersensorvertex[0][0];
+ xcentersensorvertex[1][1] = xcentersensorvertex[0][1];
+ xcentersensorvertex[1][6] = xcentersensorvertex[0][6];
+ xcentersensorvertex[1][7] = xcentersensorvertex[0][7];
+
+ ycentersensorvertex[0][0] -= fgkSSDModuleVerticalDisalignment;
+ ycentersensorvertex[0][7] = ycentersensorvertex[0][0];
+
+ ycentersensorvertex[1][0] = ycentersensorvertex[0][0];
+ ycentersensorvertex[1][7] = ycentersensorvertex[0][7];
+ for(Int_t i=0; i<fgkladdernumber; i++){
+ // Left Ladder Piece
+ leftladdershape[i]->DefinePolygon(kmothervertexnumber,xleftladdervertex[i],
+ yleftladdervertex[i]);
+ leftladdershape[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
+ leftladdershape[i]->DefineSection(1,-fgkEndLadderCarbonFiberLowerJunctionLength[1]
+ +1.45*fgkSSDMountingBlockWidth);
+ // Center Ladder Piece
+ centersensorladdershape[i]->DefinePolygon(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);
+ // Right Ladder Piece
+ rightladdershape[i]->DefinePolygon(kmothervertexnumber,xrightladdervertex[i],
+ yrightladdervertex[i]);
+ rightladdershape[i]->DefineSection(0,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
+ +fgkEndLadderCarbonFiberLowerJunctionLength[0]
+ -2.4*fgkSSDMountingBlockWidth);
+ rightladdershape[i]->DefineSection(1,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
+fgkEndLadderCarbonFiberLowerJunctionLength[0]);
- fladder[i] = new TGeoVolume(laddername[i],laddershape[i],fSSDAir);
- fladder[i]->SetLineColor(4);
- }
+ }
+ TGeoCompositeShape* laddershapecontainer[2];
+ laddershapecontainer[0] = new TGeoCompositeShape("Lay5LadderCompositeShape",
+ "Lay5LeftLadderSegmentContainer+Lay5CenterSensorContainer+Lay5RightLadderSegmentContainer");
+ laddershapecontainer[1] = new TGeoCompositeShape("Lay6LadderCompositeShape",
+ "Lay6LeftLadderSegmentContainer+Lay6CenterSensorContainer+Lay6RightLadderSegmentContainer");
+ const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
+ for(Int_t i=0; i<fgkladdernumber; i++){
+ fladder[i] = new TGeoVolume(laddername[i],laddershapecontainer[i],fSSDAir);
+ fladder[i]->SetLineColor(4);
+ }
///////////////////////////////////////////////////////////////////////////
if(!fCreateMaterials) CreateMaterials();
if(!fTransformationMatrices) CreateTransformationMatrices();
laddercableassemblylist[j] =
GetLadderCableAssemblyList(sidecablenumber[i][j<2?0:1],
ssdendladdercablelength[j]);
-// fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1),
-// j<2?1:2,fladdercablematrix[i][j]);
+ fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1),
+ j<2?1:2,fladdercablematrix[i][j]);
}
}
////////////////////////////////////////////////////////////////////////////////
mountingblockpiecedownyvertex[i][1] = mountingblockpiecedownyvertex[i][0]
+ fgkSSDMountingBlockHeight[1]
- 0.5*fgkCoolingTubeSupportHeight
- - fgkSSDModuleCoolingBlockToSensor
- - 2.*fgkSSDModuleVerticalDisalignment;
+ - fgkSSDModuleCoolingBlockToSensor;
mountingblockpiecedownxvertex[i][2] = 0.5*fgkSSDMountingBlockLength[0];
mountingblockpiecedownyvertex[i][2] = mountingblockpiecedownyvertex[i][1];
mountingblockpiecedownxvertex[i][3] = mountingblockpiecedownxvertex[i][2];
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];
+ fgkMountingBlockSupportDownHeight
+ fgkSSDMountingBlockHeight[1]
- 0.5*fgkCoolingTubeSupportHeight
- - fgkSSDModuleCoolingBlockToSensor
- - 2.*fgkSSDModuleVerticalDisalignment);
+ - fgkSSDModuleCoolingBlockToSensor);
downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname,
downmotherladdersupportshape[i],fSSDAir);
upmotherladdersupportshape[i] = new TGeoXtru(2);
+ fgkMountingBlockSupportUpHeight[i]
+ fgkSSDMountingBlockHeight[1]
- 0.5*fgkCoolingTubeSupportHeight
- - fgkSSDModuleCoolingBlockToSensor
- - 2.*fgkSSDModuleVerticalDisalignment);
+ - fgkSSDModuleCoolingBlockToSensor);
upmotherladdersupport[i] = new TGeoVolumeAssembly(upmotheladdersupportname);
// upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
// upmotherladdersupportshape[i],fSSDAir);
const Int_t kendcapcoverplatesmallholenumber[2] = {4,9};
Double_t holesection[2] = {-0.5*fgkEndCapCoverPlateThickness,
0.5*fgkEndCapCoverPlateThickness};
- TGeoXtru* endcapcoverplatesmallholeshape = GetHoleShape(fgkEndCapCoverPlateSmallHoleRadius,
+ TGeoShape* endcapcoverplatesmallholeshape = GetHoleShape(fgkEndCapCoverPlateSmallHoleRadius,
nendcapcoverplateholedges,holesection);
TGeoVolume* endcapcoverplatesmallhole = new TGeoVolume("EndCapCoverPlateSmallHole",
endcapcoverplatesmallholeshape,fSSDAlCoolBlockMedium);
endcapcoverplatesmallhole->SetLineColor(6);
- TGeoXtru* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius,
+ TGeoShape* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius,
nendcapcoverplateholedges,holesection);
TGeoVolume* endcapcoverplatebighole = new TGeoVolume("EndCapCoverPlateBigHole",
endcapcoverplatebigholeshape,fSSDAlCoolBlockMedium);
fSSDAlCoolBlockMedium);
endcapfillingbox->SetLineColor(6);
////////////////////////////
- // Contour Xtru Definition
+ // Contour shape Definition
////////////////////////////
const Int_t kcontourvertexnumber = 10;
Double_t xcontourvertex[kcontourvertexnumber];
+ 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];
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]
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);
Double_t screwcoverplatesection[2] = {0.5*fgkEndCapCoverPlateThickness,
fgkEndCapCoverPlateThickness
+ fgkEndCapCoolingTubeRadiusMax};
- TGeoXtru* screwcoverplateshape = GetScrewShape(screwcoverplateradius,
+ TGeoShape* screwcoverplateshape = GetScrewShape(screwcoverplateradius,
screwcoverplatedgesnumber,
screwcoverplatesection);
TGeoVolume* screwcoverplate = new TGeoVolume("EndCapScrewCoverPlate",
Double_t radiusmax,
Double_t width,
Int_t ncables,
- char* volname){
+ const char* volname){
/////////////////////////////////////////////////////////////
// Generating EndCap High Voltage Tubes
/////////////////////////////////////////////////////////////
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);
+ + fgkSSDCablesPatchPanel2RB26Angle[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);
+ + fgkSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB26pcon,i+1,ssdcablepatchpanel3B26rot[i]);
////////////////////////////////////
//cablescapacity[10] = 4.*ssdcablepatchpanel3RB26pconshape->Capacity();
ssdcablepatchpanel3RB24pcon->SetLineColor(9);
TGeoRotation* ssdcablepatchpanel3B24rot[3];
for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B24rot[i] = new TGeoRotation();
- ssdcablepatchpanel3B24rot[0]->SetAngles(0.0,0.0,0.0);
+ ssdcablepatchpanel3B24rot[0]->SetAngles(-6.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[2]->SetAngles(174.0,0.0,0.0);
ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB24Angle[0]
+ fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB24pcon,i+1,ssdcablepatchpanel3B24rot[i]);
}
////////////////////////////////////////////////////////////////////////////////
TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3* vertexpos[], Double_t* width,
- Double_t height, char* shapename, Int_t isign) const{
+ Double_t height, const char* shapename, Int_t isign) const{
/////////////////////////////////////////////////////////////
// Method generating an Arb shape
/////////////////////////////////////////////////////////////
return arcshape;
}
////////////////////////////////////////////////////////////////////////////////
-TGeoXtru* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumber,Double_t* section) const {
+TGeoShape* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumber,Double_t* section) const {
///////////////////////////////////////////////////////////////////////
// Method Generating the Screw Shape
// radius[0]: outer radius
Double_t inradius = radius[1];
Int_t outvertexnumber = edgesnumber[0];
Int_t invertexnumber = edgesnumber[1];
- Double_t* xscrewvertex = new Double_t[outvertexnumber+invertexnumber+2];
- Double_t* yscrewvertex = new Double_t[outvertexnumber+invertexnumber+2];
- for(Int_t i=0; i<outvertexnumber+1; i++){
+ Double_t* xscrewvertex = new Double_t[outvertexnumber+invertexnumber];
+ Double_t* yscrewvertex = new Double_t[outvertexnumber+invertexnumber];
+ for(Int_t i=0; i<outvertexnumber; i++){
xscrewvertex[i] = outradius*CosD(90.+i*360./outvertexnumber);
yscrewvertex[i] = outradius*SinD(90.+i*360./outvertexnumber);
}
- for(Int_t i=0; i<invertexnumber+1; i++){
- xscrewvertex[outvertexnumber+i+1] = inradius*CosD(90.-i*360./invertexnumber);
- yscrewvertex[outvertexnumber+i+1] = inradius*SinD(90.-i*360./invertexnumber);
+ for(Int_t i=0; i<invertexnumber; i++){
+ xscrewvertex[outvertexnumber+i] = inradius*CosD(90.+i*360./invertexnumber);
+ yscrewvertex[outvertexnumber+i] = inradius*SinD(90.+i*360./invertexnumber);
}
- TGeoXtru* screwshape = new TGeoXtru(2);
- screwshape->DefinePolygon(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, 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<nedges+1; i++){
- xholevertex[i+5] = radius*CosD(i*360./nedges);
- yholevertex[i+5] = radius*SinD(i*360./nedges);
+ Double_t* xholevertex = new Double_t[nedges];
+ Double_t* yholevertex = new Double_t[nedges];
+ Double_t z = 0.5*(section[0]+section[1]);
+ Double_t dz = 0.5*(section[1]-section[0]);
+ TGeoTranslation *tr = 0;
+ if (TMath::Abs(z) > TGeoShape::Tolerance()) {
+ tr = new TGeoTranslation(0.,0.,z);
+ tr->RegisterYourself();
+ }
+ TGeoBBox *box = new TGeoBBox("",radius,radius,dz);
+ for(Int_t i=0; i<nedges; i++){
+ xholevertex[i] = radius*CosD(i*360./nedges);
+ yholevertex[i] = radius*SinD(i*360./nedges);
}
- TGeoXtru* holeshape = new TGeoXtru(2);
- holeshape->DefinePolygon(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;
fCreateMaterials = kTRUE;
}
/////////////////////////////////////////////////////////////////////
-