from Y. Schutz
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySSD.cxx
CommitLineData
d7599219 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16
17//*************************************************************************
18// SSD geometry, based on ROOT geometrical modeler
19//
20// Enrico Cattaruzza ecattar@ts.infn.it
21//*************************************************************************
22#include "TMath.h"
23#include "TGeoVolume.h"
d7599219 24#include "TGeoMatrix.h"
25#include <TGeoManager.h>
d7599219 26#include "TVector3.h"
27#include "TGeoArb8.h"
28#include "TList.h"
29#include "TGeoMatrix.h"
30#include "TGeoCompositeShape.h"
31#include "TGeoTube.h"
32#include "TGeoBBox.h"
bf210566 33#include "TGeoXtru.h"
44285dfa 34#include "AliITSv11GeometrySSD.h"
d7599219 35/////////////////////////////////////////////////////////////////////////////////
bf210566 36// Names of the Sensitive Volumes of Layer 5 and Layer 6
37/////////////////////////////////////////////////////////////////////////////////
38const char* AliITSv11GeometrySSD::fgSDDsensitiveVolName5 = "ITSsddSensitivL5";
39const char* AliITSv11GeometrySSD::fgSDDsensitiveVolName6 = "ITSsddSensitivL6";
40/////////////////////////////////////////////////////////////////////////////////
d7599219 41//Parameters for SSD Geometry
42/////////////////////////////////////////////////////////////////////////////////
43// Layer5 (lengths are in mm and angles in degrees)
44/////////////////////////////////////////////////////////////////////////////////
9acf2ecc 45const Double_t AliITSv11GeometrySSD::fgkSSDLay5LadderLength = 950.7*fgkmm;
d7599219 46const Int_t AliITSv11GeometrySSD::fgkSSDLay5SensorsNumber = 22;
47const Int_t AliITSv11GeometrySSD::fgkSSDLay5LadderNumber = 34;
9acf2ecc 48const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMin = 378.0*fgkmm;
49const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMax = 384.0*fgkmm;
50const Double_t AliITSv11GeometrySSD::fgkLay5CenterITSPosition = 467.85*fgkmm;
d7599219 51/////////////////////////////////////////////////////////////////////////////////
52// Layer6 (lengths are in mm and angles in degrees)
53/////////////////////////////////////////////////////////////////////////////////
9acf2ecc 54const Double_t AliITSv11GeometrySSD::fgkSSDLay6LadderLength = 1068.0*fgkmm;
d7599219 55const Int_t AliITSv11GeometrySSD::fgkSSDLay6SensorsNumber = 25;
56const Int_t AliITSv11GeometrySSD::fgkSSDLay6LadderNumber = 38;
9acf2ecc 57const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMin = 428.0*fgkmm;
58const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMax = 434.0*fgkmm;
59const Double_t AliITSv11GeometrySSD::fgkLay6CenterITSPosition = 526.50*fgkmm;
d7599219 60/////////////////////////////////////////////////////////////////////////////////
61// SSD Chips and Hybrid (lengths are in mm and angles in degrees)
62/////////////////////////////////////////////////////////////////////////////////
63const Int_t AliITSv11GeometrySSD::fgkSSDChipNumber = 6;
9acf2ecc 64const Double_t AliITSv11GeometrySSD::fgkSSDChipLength = 11.100*fgkmm;
65const Double_t AliITSv11GeometrySSD::fgkSSDChipWidth = 3.850*fgkmm;
66const Double_t AliITSv11GeometrySSD::fgkSSDChipHeight = 0.180*fgkmm;
67const Double_t AliITSv11GeometrySSD::fgkSSDChipSeparationLength = 1.000*fgkmm;
bf210566 68const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueLength = fgkSSDChipLength;
69const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueWidth = fgkSSDChipWidth;
9acf2ecc 70const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueHeight = 0.030*fgkmm;
d7599219 71/////////////////////////////////////////////////////////////////////////////////
72// Stiffener (lengths are in mm and angles in degrees)
73/////////////////////////////////////////////////////////////////////////////////
9acf2ecc 74const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerLength = 73.000*fgkmm;
75const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerWidth = 6.500*fgkmm;
bf210566 76//const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 3.315;
9acf2ecc 77const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 0.315*fgkmm;
78const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerToChipDist = 2.500*fgkmm;
bf210566 79const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Length = 1.600*fgkmm;
9acf2ecc 80const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Width = 0.870*fgkmm;
81const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Height = 0.800*fgkmm;
82const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Length = 4.600*fgkmm;
83const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Width = 3.400*fgkmm;
bf210566 84const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Height = 0.700*fgkmm; // multiplied by 0.5
9acf2ecc 85const Double_t AliITSv11GeometrySSD::fgkSSDWireLength = 30.000*fgkmm;
86const Double_t AliITSv11GeometrySSD::fgkSSDWireRadius = 0.185*fgkmm;
bf210566 87const Double_t AliITSv11GeometrySSD::fgkSSDConnectorPosition[2] =
88 {44.32*fgkmm, 0.33*fgkmm};
89const Double_t AliITSv11GeometrySSD::fgkSSDConnectorSeparation = 0.44*fgkmm;
90const Double_t AliITSv11GeometrySSD::fgkSSDConnectorLength = 2.16*fgkmm;
91const Double_t AliITSv11GeometrySSD::fgkSSDConnectorWidth = 3.60*fgkmm;
d7599219 92const Double_t AliITSv11GeometrySSD::fgkSSDConnectorHeight =
bf210566 93 0.25*fgkSSDStiffenerHeight;
94const Double_t AliITSv11GeometrySSD::fgkSSDConnectorAlHeight = 0.030*fgkmm;
95const Double_t AliITSv11GeometrySSD::fgkSSDConnectorNiHeight = 0.002*fgkmm;
d7599219 96/////////////////////////////////////////////////////////////////////////////////
97// Cooling Block (lengths are in mm and angles in degrees)
98/////////////////////////////////////////////////////////////////////////////////
9acf2ecc 99const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockLength = 3.000*fgkmm;
100const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockWidth = 4.000*fgkmm;
bf210566 101const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHeight[3] =
102 {1.950*fgkmm, 0.240*fgkmm, 0.300*fgkmm};
d7599219 103const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleRadius[2] =
bf210566 104 {1.000*fgkmm, 0.120*fgkmm};
d7599219 105const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleLength[2] =
bf210566 106 {1.900*fgkmm, 0.400*fgkmm};
d7599219 107const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleCenter =
9acf2ecc 108 1.500*fgkmm;
d7599219 109const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleHeight =
9acf2ecc 110 0.300*fgkmm;
d7599219 111/////////////////////////////////////////////////////////////////////////////////
112// SSD Sensor (lengths are in mm and angles in degrees)
113/////////////////////////////////////////////////////////////////////////////////
114const char* AliITSv11GeometrySSD::fgkSSDSensitiveVolName =
bf210566 115 "SSDSensorSensitiveVol";
9acf2ecc 116const Double_t AliITSv11GeometrySSD::fgkSSDSensorLength = 42.000*fgkmm;
117const Double_t AliITSv11GeometrySSD::fgkSSDSensorHeight = 0.300*fgkmm;
118const Double_t AliITSv11GeometrySSD::fgkSSDSensorWidth = 75.000*fgkmm;
d7599219 119const Double_t AliITSv11GeometrySSD::fgkSSDSensorOverlap =
9acf2ecc 120 fgkSSDSensorLength-39.1*fgkmm;
bf210566 121const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveLength = 1.*fgkmm;
122const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveWidth = 1.*fgkmm;
d7599219 123/////////////////////////////////////////////////////////////////////////////////
124// Flex (lengths are in mm and angles in degrees)
125/////////////////////////////////////////////////////////////////////////////////
9acf2ecc 126const Double_t AliITSv11GeometrySSD::fgkSSDFlexFullLength = 106.000*fgkmm;
d7599219 127const Double_t AliITSv11GeometrySSD::fgkSSDFlexLength[4] =
bf210566 128 {0.5 * (fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
129 + (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
130 0.5 * (fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
131 + (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength)
132 - 4.000*fgkmm, 9.500*fgkmm, 10.000*fgkmm};
d7599219 133const Double_t AliITSv11GeometrySSD::fgkSSDFlexWidth[2] =
bf210566 134 { 9.340*fgkmm, 5.380*fgkmm};
d7599219 135const Double_t AliITSv11GeometrySSD::fgkSSDFlexHeight[2] =
bf210566 136 { 0.030*fgkmm, 0.020*fgkmm};
d7599219 137const Double_t AliITSv11GeometrySSD::fgkSSDFlexAngle = 30.000;
9acf2ecc 138const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleLength = 1.430*fgkmm;
139const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleWidth = 3.000*fgkmm;
d7599219 140const Double_t AliITSv11GeometrySSD::fgkSSDEndFlexCompLength[6] =
bf210566 141 {3.30*fgkmm,4.12*fgkmm,4.22*fgkmm,1.70*fgkmm,0.75*fgkmm,7.18*fgkmm};
d7599219 142const Double_t AliITSv11GeometrySSD:: fgkSSDEndFlexCompWidth[3] =
bf210566 143 {15.03*fgkmm,23.48*fgkmm,12.28*fgkmm};
d7599219 144/////////////////////////////////////////////////////////////////////////////////
145// SSD Ladder Cable (lengths are in mm and angles in degrees)
146/////////////////////////////////////////////////////////////////////////////////
bf210566 147const Double_t AliITSv11GeometrySSD::fgkSSDLadderCableWidth = 23.5*fgkmm;
d7599219 148/////////////////////////////////////////////////////////////////////////////////
149// SSD Module (lengths are in mm and angles in degrees)
150/////////////////////////////////////////////////////////////////////////////////
151const Double_t AliITSv11GeometrySSD::fgkSSDModuleStiffenerPosition[2] =
bf210566 152 { 1.000*fgkmm, 3.900*fgkmm};
d7599219 153const Double_t AliITSv11GeometrySSD::fgkSSDModuleSensorSupportDistance =
9acf2ecc 154 45.600*fgkmm;
d7599219 155const Double_t AliITSv11GeometrySSD::fgkSSDModuleCoolingBlockToSensor =
9acf2ecc 156 5.075*fgkmm;
d7599219 157/////////////////////////////////////////////////////////////////////////////////
158// Sensor Support (lengths are in mm and angles in degrees)
159/////////////////////////////////////////////////////////////////////////////////
bf210566 160const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportLength =
161 5.800*fgkmm;
d7599219 162const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth =
bf210566 163 2.000*fgkmm;
d7599219 164const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] =
bf210566 165 { 4.620*fgkmm, 5.180*fgkmm};
166const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportThickness[2] =
167 { 0.450*fgkmm, 0.450*fgkmm};
168const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportPosition
169 = 0.5 * (fgkSSDModuleSensorSupportDistance
170 + fgkSSDSensorSideSupportThickness[0])
171 - fgkSSDSensorSideSupportLength;
d7599219 172const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportLength =
bf210566 173 5.250*fgkmm;
d7599219 174const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportWidth =
bf210566 175 1.680*fgkmm;
176const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportHeight[2]
177 = {fgkSSDSensorSideSupportHeight[0]
178 + fgkSSDSensorSideSupportThickness[0],
179 fgkSSDSensorSideSupportHeight[1]
180 + fgkSSDSensorSideSupportThickness[1]};
181const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportThickness[2]
182 = {fgkSSDSensorSideSupportThickness[0],
183 fgkSSDSensorSideSupportThickness[1]};
d7599219 184const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportPosition =
bf210566 185 19.000*fgkmm;
d7599219 186/////////////////////////////////////////////////////////////////////////////////
187// Chip Cables (lengths are in mm and angles in degrees)
188/////////////////////////////////////////////////////////////////////////////////
189const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesLength[2] =
bf210566 190 {73.12/fgkSSDChipNumber*fgkmm,fgkSSDChipLength+2.*0.19*fgkmm};
d7599219 191const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesHeight[4] =
bf210566 192 { 0.014*fgkmm, 0.010*fgkmm, fgkSSDModuleCoolingBlockToSensor
193 - (fgkSSDSensorSideSupportHeight[1]
194 - fgkSSDSensorSideSupportHeight[0])
195 - fgkSSDCoolingBlockHoleCenter
196 - fgkSSDStiffenerHeight
197 - fgkSSDChipHeight-fgkSSDSensorHeight,
198 fgkSSDModuleCoolingBlockToSensor
199 - fgkSSDCoolingBlockHoleCenter
200 - fgkSSDStiffenerHeight
201 - fgkSSDChipHeight-fgkSSDSensorHeight};
d7599219 202const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesWidth[3] =
bf210566 203 { 11.000*fgkmm, 0.800*fgkmm, 0.600*fgkmm};
d7599219 204/////////////////////////////////////////////////////////////////////////////////
205// Carbon Fiber Junction Parameters (lengths are in mm and angles in degrees)
206/////////////////////////////////////////////////////////////////////////////////
207const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
bf210566 208 3.820*fgkmm;
209//const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
210// 3.780;
d7599219 211const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionWidth =
bf210566 212 fgkSSDSensorLength-fgkSSDSensorOverlap;
d7599219 213const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionEdge[2] =
bf210566 214 { 0.86*fgkmm, 0.30*fgkmm};
d7599219 215const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionAngle[2] =
bf210566 216 { 30.00, 90.00};
d7599219 217const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionToSensorSupport =
bf210566 218 1.78*fgkmm;
d7599219 219/////////////////////////////////////////////////////////////////////////////////
220//Carbon Fiber Parameters (lengths are in mm and angles in degrees)
221/////////////////////////////////////////////////////////////////////////////////
bf210566 222const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleLength
223 = fgkSSDModuleSensorSupportDistance
224 - 2. * fgkCarbonFiberJunctionToSensorSupport;
225const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleAngle = 60.00;
d7599219 226const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportTopEdgeDist[2] =
bf210566 227 { 0.751*fgkmm, 0.482*fgkmm};
228const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportEdgeLength =
229 1.630*fgkmm;
230const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportWidth = 0.950*fgkmm;
231const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportXAxisLength
232 = fgkCarbonFiberTriangleLength
233 - 0.5*fgkCarbonFiberSupportTopEdgeDist[1]
234 / TMath::Cos(fgkCarbonFiberTriangleAngle
235 * TMath::DegToRad());
236const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportYAxisLength
237 = 0.5*(fgkCarbonFiberJunctionWidth
238 - fgkCarbonFiberSupportWidth)
239 - fgkCarbonFiberSupportTopEdgeDist[0]
240 - fgkCarbonFiberSupportWidth;
d7599219 241/////////////////////////////////////////////////////////////////////////////////
242// Carbon Fiber Lower Support Parameters (lengths are in mm)
243/////////////////////////////////////////////////////////////////////////////////
244const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportWidth
9acf2ecc 245 = 0.950*fgkmm;
d7599219 246const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportLowerLenght
9acf2ecc 247 = 1.600*fgkmm;
d7599219 248const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportHeight
9acf2ecc 249 = 0.830*fgkmm;
d7599219 250const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumeSeparation
251 = 0.5*fgkCarbonFiberSupportWidth;
252const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportTransverseWidth
bf210566 253 = fgkCarbonFiberJunctionWidth
254 - 2. * (fgkCarbonFiberLowerSupportWidth
255 + fgkCarbonFiberLowerSupportVolumeSeparation);
d7599219 256const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumePosition[2]
bf210566 257 = {fgkCarbonFiberLowerSupportWidth
258 + fgkCarbonFiberLowerSupportVolumeSeparation,
259 fgkCarbonFiberLowerSupportWidth
260 + fgkCarbonFiberLowerSupportVolumeSeparation
261 + fgkCarbonFiberLowerSupportTransverseWidth};
d7599219 262/////////////////////////////////////////////////////////////////////////////////
263// End Ladder Carbon Fiber Junction Parameters (lengths are in mm and angles in degrees)
264/////////////////////////////////////////////////////////////////////////////////
265const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberLowerJunctionLength[2] =
bf210566 266 {0.5 * (fgkSSDLay5LadderLength
267 - fgkSSDLay5SensorsNumber
268 * fgkCarbonFiberJunctionWidth
269 - fgkCarbonFiberLowerSupportWidth),
270 0.5 * (fgkSSDLay5LadderLength
271 - fgkSSDLay5SensorsNumber
272 * fgkCarbonFiberJunctionWidth
273 + fgkCarbonFiberLowerSupportWidth)};
d7599219 274const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberUpperJunctionLength[2] =
bf210566 275 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-20.4*fgkmm,
276 fgkEndLadderCarbonFiberLowerJunctionLength[1]-20.6*fgkmm};
d7599219 277const Double_t AliITSv11GeometrySSD::fgkEndLadderMountingBlockPosition[2] =
bf210566 278 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-16.50*fgkmm,
279 fgkEndLadderCarbonFiberLowerJunctionLength[1]-31.50*fgkmm};
d7599219 280/////////////////////////////////////////////////////////////////////////////////
281// Cooling Tube Support (lengths are in mm and angles in degrees)
282/////////////////////////////////////////////////////////////////////////////////
bf210566 283const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmax = 1.45*fgkmm;
d7599219 284const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmin
285 = fgkSSDCoolingBlockHoleRadius[0];
bf210566 286const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportLength = 8.55*fgkmm;
287const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportHeight = 0.85*fgkmm;
288const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportWidth = 2.00*fgkmm;
d7599219 289const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportSeparation =
bf210566 290 fgkSSDSensorLength-2.*fgkSSDSensorOverlap;
291const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportToCarbonFiber =
292 11.70*fgkmm;
d7599219 293/////////////////////////////////////////////////////////////////////////////////
294// Cooling Tube (lengths are in mm and angles in degrees)
295/////////////////////////////////////////////////////////////////////////////////
bf210566 296const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmax = fgkCoolingTubeSupportRmin;
297const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmin = 0.96*fgkmm;
298const Double_t AliITSv11GeometrySSD::fgkCoolingTubeLength =
d7599219 299 fgkCarbonFiberJunctionWidth;
300const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSeparation =
bf210566 301 fgkSSDModuleSensorSupportDistance
302 + fgkSSDCoolingBlockLength;
303//const Double_t AliITSv11GeometrySSD_ct::fgkCoolingTubeLength = 39.1;
d7599219 304/////////////////////////////////////////////////////////////////////////////////
305// SSD Mounting Block Parameters (lengths are in mm and angles in degrees)
306/////////////////////////////////////////////////////////////////////////////////
307const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockLength[3] =
bf210566 308 { 60.0*fgkmm, 42.2*fgkmm, 34.0*fgkmm};
d7599219 309const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHeight[4] =
bf210566 310 { 4.0*fgkmm, 8.0*fgkmm, 5.0*fgkmm, 0.2*fgkmm};
d7599219 311const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockWidth =
bf210566 312 20.0*fgkmm;
d7599219 313const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidAngle =
bf210566 314 40.0;
d7599219 315const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidHeight =
316 0.30*(fgkSSDMountingBlockHeight[1]-fgkSSDMountingBlockHeight[2]);
317const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidUpBasis =
bf210566 318 2.5*fgkmm;
d7599219 319const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeLength[2] =
bf210566 320 { 56.0*fgkmm, 12.0*fgkmm};
d7599219 321const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeWidth[2] =
bf210566 322 { 5.0*fgkmm, 2.9*fgkmm};
d7599219 323const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleRadius =
bf210566 324 1.0*fgkmm;
d7599219 325const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleEdge =
bf210566 326 6.0*fgkmm;
d7599219 327const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeigth =
bf210566 328 4.0*fgkmm;
d7599219 329const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleRadius[2] =
bf210566 330 { 1.5*fgkmm,fgkSSDMountingBlockScrewHoleEdge/6.};
d7599219 331/////////////////////////////////////////////////////////////////////////////////
44285dfa 332ClassImp(AliITSv11GeometrySSD)
333/////////////////////////////////////////////////////////////////////////////////
9acf2ecc 334AliITSv11GeometrySSD::AliITSv11GeometrySSD():
335 AliITSv11Geometry(),
44285dfa 336 fSSDChipMedium(),
337 fSSDChipGlueMedium(),
338 fSSDStiffenerMedium(),
339 fSSDStiffenerConnectorMedium(),
340 fSSDStiffener0603CapacitorMedium(),
341 fSSDStiffener1812CapacitorMedium(),
342 fSSDStiffenerHybridWireMedium(),
343 fSSDKaptonFlexMedium(),
344 fSSDAlTraceFlexMedium(),
345 fSSDAlTraceLadderCableMedium(),
346 fSSDKaptonLadderCableMedium(),
347 fSSDKaptonChipCableMedium(),
348 fSSDAlTraceChipCableMedium(),
349 fSSDAlCoolBlockMedium(),
350 fSSDSensorMedium(),
351 fSSDSensorSupportMedium(),
352 fSSDCarbonFiberMedium(),
353 fSSDTubeHolderMedium(),
354 fSSDCoolingTubeWater(),
355 fSSDCoolingTubePhynox(),
356 fSSDMountingBlockMedium(),
bf210566 357 fSSDAir(),
358 fCreateMaterials(kFALSE),
359 fTransformationMatrices(kFALSE),
360 fBasicObjects(kFALSE),
361 fcarbonfiberjunction(),
362 fcoolingtubesupport(),
363 fhybridmatrix(),
364 fssdcoolingblocksystem(),
365 fcoolingblocksystematrix(),
366 fssdstiffenerflex(),
367 fssdendflex(),
368 fendladdermountingblock(),
369 fSSDSensor5(),
370 fSSDSensor6(),
371 fSSDLayer5(),
372 fSSDLayer6(),
373 fMotherVol(),
44285dfa 374 fColorCarbonFiber(4),
375 fColorRyton(5),
bf210566 376 fColorPhynox(14),
44285dfa 377 fColorSilicon(3),
bf210566 378 fColorAl(38),
44285dfa 379 fColorKapton(6),
380 fColorPolyhamide(5),
381 fColorStiffener(9),
bf210566 382 fColorEpoxy(30),
383 fColorWater(7),
384 fColorG10(41)
44285dfa 385{
386 ////////////////////////
387 // Standard constructor
388 ////////////////////////
44285dfa 389}
390/////////////////////////////////////////////////////////////////////////////////
391AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
9acf2ecc 392 AliITSv11Geometry(s.GetDebug()),
44285dfa 393 fSSDChipMedium(s.fSSDChipMedium),
394 fSSDChipGlueMedium(s.fSSDChipGlueMedium),
395 fSSDStiffenerMedium(s.fSSDStiffenerMedium),
396 fSSDStiffenerConnectorMedium(s.fSSDStiffenerConnectorMedium),
397 fSSDStiffener0603CapacitorMedium(s.fSSDStiffener0603CapacitorMedium),
398 fSSDStiffener1812CapacitorMedium(s.fSSDStiffener1812CapacitorMedium),
399 fSSDStiffenerHybridWireMedium(s.fSSDStiffenerHybridWireMedium),
400 fSSDKaptonFlexMedium(s.fSSDKaptonFlexMedium),
401 fSSDAlTraceFlexMedium(s.fSSDAlTraceFlexMedium),
402 fSSDAlTraceLadderCableMedium(s.fSSDAlTraceLadderCableMedium),
403 fSSDKaptonLadderCableMedium(s.fSSDKaptonLadderCableMedium),
404 fSSDKaptonChipCableMedium(s.fSSDKaptonChipCableMedium),
405 fSSDAlTraceChipCableMedium(s.fSSDAlTraceChipCableMedium),
406 fSSDAlCoolBlockMedium(s.fSSDAlCoolBlockMedium),
407 fSSDSensorMedium(s.fSSDSensorMedium),
408 fSSDSensorSupportMedium(s.fSSDSensorSupportMedium),
409 fSSDCarbonFiberMedium(s.fSSDCarbonFiberMedium),
410 fSSDTubeHolderMedium(s.fSSDTubeHolderMedium),
411 fSSDCoolingTubeWater(s.fSSDCoolingTubeWater),
412 fSSDCoolingTubePhynox(s.fSSDCoolingTubePhynox),
413 fSSDMountingBlockMedium(s.fSSDMountingBlockMedium),
bf210566 414 fSSDAir(s.fSSDAir),
415 fCreateMaterials(s.fCreateMaterials),
416 fTransformationMatrices(s.fTransformationMatrices),
417 fBasicObjects(s.fBasicObjects),
418 fcarbonfiberjunction(s.fcarbonfiberjunction),
419 fcoolingtubesupport(s.fcoolingtubesupport),
420 fhybridmatrix(s.fhybridmatrix),
421 fssdcoolingblocksystem(s.fssdcoolingblocksystem),
422 fcoolingblocksystematrix(s.fcoolingblocksystematrix),
423 fssdstiffenerflex(s.fssdstiffenerflex),
424 fssdendflex(s.fssdendflex),
425 fendladdermountingblock(s.fendladdermountingblock),
426 fSSDSensor5(s.fSSDSensor5),
427 fSSDSensor6(s.fSSDSensor6),
428 fSSDLayer5(s.fSSDLayer5),
429 fSSDLayer6(s.fSSDLayer6),
44285dfa 430 fMotherVol(s.fMotherVol),
431 fColorCarbonFiber(s.fColorCarbonFiber),
432 fColorRyton(s.fColorRyton),
433 fColorPhynox(s.fColorPhynox),
434 fColorSilicon(s.fColorSilicon),
435 fColorAl(s.fColorAl),
436 fColorKapton(s.fColorKapton),
437 fColorPolyhamide(s.fColorPolyhamide),
438 fColorStiffener(s.fColorStiffener),
bf210566 439 fColorEpoxy(s.fColorEpoxy),
440 fColorWater(s.fColorWater),
441 fColorG10(s.fColorG10)
44285dfa 442{
443 ////////////////////////
444 // Copy Constructor
445 ////////////////////////
d7599219 446}
447/////////////////////////////////////////////////////////////////////////////////
44285dfa 448AliITSv11GeometrySSD& AliITSv11GeometrySSD::
449operator=(const AliITSv11GeometrySSD &s){
450 ////////////////////////
451 // Assignment operator
452 ////////////////////////
453 this->~AliITSv11GeometrySSD();
454 new(this) AliITSv11GeometrySSD(s);
455 return *this;
456/*
457 if(&s == this) return *this;
458 fMotherVol = s.fMotherVol;
459 return *this;
460 */
461}
bf210566 462///////////////////////////////////////////////////////////////////////////////
463void AliITSv11GeometrySSD::CreateTransformationMatrices(){
464 ///////////////////////////////////////////////////////////////////////
465 // Method generating the trasformation matrix for the whole SSD Geometry
466 ///////////////////////////////////////////////////////////////////////
467 // Setting some variables for Carbon Fiber Supportmatrix creation
468 //////////////////////////////////////////////////////////////////////
469 Double_t carbonfibersupportxaxisEdgeproj = fgkCarbonFiberSupportEdgeLength
470 * CosD(fgkCarbonFiberJunctionAngle[0]);
471 Double_t symmetryplaneposition = (fgkCarbonFiberSupportYAxisLength
472 + fgkCarbonFiberSupportTopEdgeDist[0]
473 + fgkCarbonFiberSupportWidth);
474 Double_t carbonfibersupportheight = carbonfibersupportxaxisEdgeproj
475 * TanD(fgkCarbonFiberJunctionAngle[0]);
476 TGeoRotation* carbonfiberot[3];
477 for(Int_t i=0; i<3; i++) carbonfiberot[i] = new TGeoRotation();
478 carbonfiberot[0]->SetAngles(0.0,180.0,0.0);
479 carbonfiberot[1]->SetAngles(90.,-fgkCarbonFiberTriangleAngle,-90.);
480 carbonfiberot[2]->SetRotation((*carbonfiberot[1])*(*carbonfiberot[0]));
481 Double_t transvector[3] = {fgkCarbonFiberTriangleLength
482 * CosD(fgkCarbonFiberTriangleAngle),0.,
483 - fgkCarbonFiberTriangleLength
484 * SinD(fgkCarbonFiberTriangleAngle)};
485 ///////////////////////////////////////////
486 //Setting Local Translations and Rotations:
487 ///////////////////////////////////////////
488 TGeoCombiTrans* localcarbonfibersupportmatrix[3];
489 localcarbonfibersupportmatrix[0] = new TGeoCombiTrans(0.0,0.0,
490 0.5*carbonfibersupportheight,NULL);
491 localcarbonfibersupportmatrix[1] = new TGeoCombiTrans(transvector[0],
492 2.*symmetryplaneposition+transvector[1],
493 transvector[2], carbonfiberot[2]);
494 localcarbonfibersupportmatrix[2] = new TGeoCombiTrans(*carbonfiberot[1]);
495 /////////////////////////////////////////////////////////////
496 // Carbon Fiber Support Transformations
497 /////////////////////////////////////////////////////////////
498 const Int_t kcarbonfibersupportmatrixnumber[2] = {2,3};
499 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++){
500 fcarbonfibersupportmatrix[i] = new TGeoHMatrix();
501 for(Int_t j=0; j<kcarbonfibersupportmatrixnumber[i]; j++)
502 fcarbonfibersupportmatrix[i]->MultiplyLeft(localcarbonfibersupportmatrix[i==0?2*j:j]);
503 }
504 /////////////////////////////////////////////////////////////
505 // Carbon Fiber Junction Transformation
506 /////////////////////////////////////////////////////////////
507 const Int_t kcarbonfiberjunctionmatrixnumber = 2;
508 TGeoCombiTrans** localcarbonfiberjunctionmatrix[fgkcarbonfiberjunctionumber];
509 TGeoRotation** localcarbonfiberjunctionrot[fgkcarbonfiberjunctionumber];
510 TGeoTranslation** localcarbonfiberjunctiontrans[fgkcarbonfiberjunctionumber];
511 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++){
512 localcarbonfiberjunctionmatrix[i] =
513 new TGeoCombiTrans*[kcarbonfiberjunctionmatrixnumber];
514 localcarbonfiberjunctionrot[i] =
515 new TGeoRotation*[kcarbonfiberjunctionmatrixnumber];
516 localcarbonfiberjunctiontrans[i] =
517 new TGeoTranslation*[kcarbonfiberjunctionmatrixnumber];
d7599219 518 }
bf210566 519 ///////////////////////
520 // Setting Translations
521 ///////////////////////
522 localcarbonfiberjunctiontrans[0][0] = new TGeoTranslation(0.,0.,0.);
523 localcarbonfiberjunctiontrans[1][0] =
524 new TGeoTranslation(fgkCarbonFiberTriangleLength,0.0,0.0);
525 localcarbonfiberjunctiontrans[2][0] =
526 new TGeoTranslation(fgkCarbonFiberTriangleLength
527 * TMath::Cos(fgkCarbonFiberTriangleAngle*TMath::DegToRad()),
528 fgkCarbonFiberTriangleLength
529 * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad()),0.0);
530 localcarbonfiberjunctiontrans[0][1] =
531 new TGeoTranslation(0.0,0.5*fgkCarbonFiberJunctionWidth,0.0);
532 localcarbonfiberjunctiontrans[1][1] =
533 new TGeoTranslation(*localcarbonfiberjunctiontrans[0][1]);
534 localcarbonfiberjunctiontrans[2][1] =
535 new TGeoTranslation(*localcarbonfiberjunctiontrans[0][1]);
536 ////////////////////
537 // Setting Rotations
538 ////////////////////
539 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++)
540 for(Int_t j=0; j<kcarbonfiberjunctionmatrixnumber; j++)
541 localcarbonfiberjunctionrot[i][j] = new TGeoRotation();
542 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++)
543 localcarbonfiberjunctionrot[i][0]->SetAngles(120.*i,0.0,0.0);
544 localcarbonfiberjunctionrot[0][1]->SetAngles(0.0,90.0,0.0);
545 localcarbonfiberjunctionrot[1][1]->SetRotation(*localcarbonfiberjunctionrot[0][1]);
546 localcarbonfiberjunctionrot[2][1]->SetRotation(*localcarbonfiberjunctionrot[0][1]);
547 ////////////////////////////////////////
548 // Setting Carbon Fiber Junction matrix
549 ////////////////////////////////////////
550 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++){
551 fcarbonfiberjunctionmatrix[i] = new TGeoHMatrix();
552 for(Int_t j=0; j<kcarbonfiberjunctionmatrixnumber; j++){
553 localcarbonfiberjunctionmatrix[i][j] =
554 new TGeoCombiTrans(*localcarbonfiberjunctiontrans[i][j],
555 *localcarbonfiberjunctionrot[i][j]);
556 fcarbonfiberjunctionmatrix[i]->MultiplyLeft(localcarbonfiberjunctionmatrix[i][j]);
557 }
d7599219 558 }
bf210566 559 /////////////////////////////////////////////////////////////
560 // Carbon Fiber Lower Support Transformations
561 /////////////////////////////////////////////////////////////
562 TGeoTranslation* localcarbonfiberlowersupportrans[2];
563 localcarbonfiberlowersupportrans[0] = new TGeoTranslation(0.0,
564 fgkCarbonFiberLowerSupportVolumePosition[1]
565 + fgkCarbonFiberLowerSupportVolumePosition[0],
566 0.0);
567 localcarbonfiberlowersupportrans[1] = new TGeoTranslation(0.0,
568 fgkCarbonFiberJunctionWidth
569 - fgkCarbonFiberLowerSupportWidth
570 - fgkCarbonFiberLowerSupportVolumePosition[0]
571 - fgkCarbonFiberLowerSupportVolumePosition[1],
572 - 0.5*fgkCarbonFiberLowerSupportHeight);
573 localcarbonfiberlowersupportrans[0]->Add(localcarbonfiberlowersupportrans[1]);
574 fcarbonfiberlowersupportrans[0] =
575 new TGeoTranslation(*localcarbonfiberlowersupportrans[0]);
576 fcarbonfiberlowersupportrans[1] =
577 new TGeoTranslation(*localcarbonfiberlowersupportrans[1]);
578 /////////////////////////////////////////////////////////////
579 // SSD Sensor Support Transformations
580 /////////////////////////////////////////////////////////////
581 const Int_t kssdsensorsupportmatrixnumber = 3;
582 TGeoCombiTrans** localssdsensorsupportmatrix[fgkssdsensorsupportnumber];
583 TGeoRotation** localssdsensorsupportrot[fgkssdsensorsupportnumber];
584 TGeoTranslation** localssdsensorsupportrans[fgkssdsensorsupportnumber];
585 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
586 localssdsensorsupportmatrix[i] =
587 new TGeoCombiTrans*[kssdsensorsupportmatrixnumber];
588 localssdsensorsupportrot[i] =
589 new TGeoRotation*[kssdsensorsupportmatrixnumber];
590 localssdsensorsupportrans[i] =
591 new TGeoTranslation*[kssdsensorsupportmatrixnumber];
d7599219 592 }
bf210566 593 ///////////////////////
594 // Setting Translations
595 ///////////////////////
596 localssdsensorsupportrans[0][0] = new TGeoTranslation(0.0,
597 0.5*fgkSSDSensorSideSupportWidth,
598 0.0);
599 localssdsensorsupportrans[1][0] =
600 new TGeoTranslation(*localssdsensorsupportrans[0][0]);
601 localssdsensorsupportrans[2][0] =
602 new TGeoTranslation(*localssdsensorsupportrans[0][0]);
603 localssdsensorsupportrans[0][1] =
604 new TGeoTranslation(-0.5*fgkSSDSensorSideSupportWidth,
605 0.5*fgkSSDSensorSideSupportThickness[0],
606 0.0);
607 localssdsensorsupportrans[1][1] =
608 new TGeoTranslation(0.5*fgkSSDSensorSideSupportWidth,
609 - 0.5*fgkSSDSensorSideSupportThickness[0]
610 - fgkSSDModuleSensorSupportDistance,
611 0.0);
612 localssdsensorsupportrans[2][1] =
613 new TGeoTranslation(0.5*fgkSSDSensorCenterSupportThickness[0]
614 - fgkSSDSensorCenterSupportPosition,
615 0.5*fgkSSDSensorCenterSupportWidth
616 - 0.5*fgkSSDModuleSensorSupportDistance,
617 fgkSSDSensorCenterSupportThickness[0]);
618 localssdsensorsupportrans[0][2] =
619 new TGeoTranslation(fgkCarbonFiberTriangleLength
620 + fgkCarbonFiberJunctionToSensorSupport,
621 fgkCarbonFiberJunctionWidth
622 - 0.5*(fgkCarbonFiberLowerSupportWidth
623 + fgkSSDSensorCenterSupportLength
624 - fgkSSDSensorCenterSupportThickness[0])
625 - fgkSSDSensorCenterSupportPosition,
626 0.0);
627 localssdsensorsupportrans[1][2] =
628 new TGeoTranslation(*localssdsensorsupportrans[0][2]);
629 localssdsensorsupportrans[2][2] =
630 new TGeoTranslation(*localssdsensorsupportrans[0][2]);
631 ////////////////////
632 // Setting Rotations
633 ////////////////////
634 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++)
635 for(Int_t j=0; j<kssdsensorsupportmatrixnumber; j++)
636 localssdsensorsupportrot[i][j] = new TGeoRotation();
637 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
638 localssdsensorsupportrot[i][0]->SetAngles(0.0,90.0,0.0);
639 localssdsensorsupportrot[i][2]->SetAngles(-90.0,0.0,0.0);
d7599219 640 }
bf210566 641 localssdsensorsupportrot[0][1]->SetAngles(0.0,90.0,-90.0);
642 localssdsensorsupportrot[1][1]->SetAngles(180.0,90.0,-90.0);
643 localssdsensorsupportrot[2][1]->SetAngles(270.0,90.0,-90.0);
644 ////////////////////////////////////////
645 // SSD Sensor Support matrix
646 ////////////////////////////////////////
647 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
648 fssdsensorsupportmatrix[i] = new TGeoHMatrix();
649 for(Int_t j=0; j<kssdsensorsupportmatrixnumber; j++){
650 localssdsensorsupportmatrix[i][j] =
651 new TGeoCombiTrans(*localssdsensorsupportrans[i][j],
652 *localssdsensorsupportrot[i][j]);
653 fssdsensorsupportmatrix[i]->MultiplyLeft(localssdsensorsupportmatrix[i][j]);
654 }
d7599219 655 }
44285dfa 656 /////////////////////////////////////////////////////////////
bf210566 657 // SSD Cooling Tube Support Transformations
44285dfa 658 /////////////////////////////////////////////////////////////
bf210566 659 const Int_t kcoolingtubesupportmatrixnumber = 2;
660 TGeoCombiTrans* localcoolingtubesupportmatrix[kcoolingtubesupportmatrixnumber];
661 TGeoTranslation* localcoolingtubesupportrans[kcoolingtubesupportmatrixnumber];
662 TGeoRotation* localcoolingtubesupportrot[kcoolingtubesupportmatrixnumber];
44285dfa 663 Double_t phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
d7599219 664 /fgkCoolingTubeSupportRmax);
bf210566 665 localcoolingtubesupportrans[0] =
666 new TGeoTranslation(2.*fgkCoolingTubeSupportRmax*TMath::Cos(phi)
d7599219 667 + 2.*(fgkCoolingTubeSupportLength
44285dfa 668 - fgkCoolingTubeSupportRmax*(1.+TMath::Cos(phi)))
d7599219 669 + fgkCarbonFiberTriangleLength
bf210566 670 - 2.0*fgkCarbonFiberJunctionLength,0.0,0.0);
671 localcoolingtubesupportrans[1] =
672 new TGeoTranslation(fgkCarbonFiberJunctionLength
673 - (fgkCoolingTubeSupportLength-fgkCoolingTubeSupportRmax),
674 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
675 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
676 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
677 - 0.5*(fgkCarbonFiberLowerSupportWidth
678 + fgkSSDSensorCenterSupportLength
679 - fgkSSDSensorCenterSupportThickness[0])
680 + 0.5*fgkSSDSensorLength,
681 - 0.5*fgkCoolingTubeSupportHeight);
682 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++)
683 localcoolingtubesupportrot[i] = new TGeoRotation();
684 localcoolingtubesupportrot[0]->SetAngles(180.0,0.0,0.0);
685 localcoolingtubesupportrot[1]->SetAngles(0.0,90.0,0.0);
686 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++)
687 localcoolingtubesupportmatrix[i] =
688 new TGeoCombiTrans(*localcoolingtubesupportrans[i],
689 *localcoolingtubesupportrot[i]);
690 fcoolingtubesupportmatrix[0] = new TGeoHMatrix(*localcoolingtubesupportmatrix[1]);
691 fcoolingtubesupportmatrix[1] = new TGeoHMatrix((*localcoolingtubesupportmatrix[1])*
692 (*localcoolingtubesupportmatrix[0]));
693 /////////////////////////////////////////////////////////////
694 // SSD Cooling Tube Transformations
695 /////////////////////////////////////////////////////////////
696 TGeoRotation* localcoolingtuberot = new TGeoRotation();
697 localcoolingtuberot->SetAngles(0.,90.,0.);
698 TGeoTranslation** localcoolingtubetrans[4];
699 TVector3** localcoolingtubevect[4];
700 for(Int_t i=0; i<4; i++){
701 localcoolingtubevect[i] = new TVector3*[2];
702 localcoolingtubetrans[i] = new TGeoTranslation*[2];
703 fcoolingtubematrix[i] = new TGeoHMatrix*[2];
d7599219 704 }
bf210566 705 localcoolingtubevect[0][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
706 -fgkCarbonFiberTriangleLength),
707 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
708 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
709 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
710 - 0.5*(fgkCarbonFiberLowerSupportWidth
711 + fgkSSDSensorCenterSupportLength
712 - fgkSSDSensorCenterSupportThickness[0])+
713 0.5*fgkSSDSensorLength-0.25*(fgkSSDSensorLength
714 - 2.0*fgkSSDModuleStiffenerPosition[1]
715 - 2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
716 - 0.5*fgkCoolingTubeSupportWidth,
717 - 0.5*fgkCoolingTubeSupportHeight);
718 localcoolingtubevect[0][1] = new TVector3(localcoolingtubevect[0][0]->X(),
719 localcoolingtubevect[0][0]->Y()+0.5*(fgkSSDSensorLength
720 - 2.0*fgkSSDModuleStiffenerPosition[1]
721 - 2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
722 + fgkCoolingTubeSupportWidth,
723 localcoolingtubevect[0][0]->Z());
724 localcoolingtubevect[1][0] = new TVector3(-localcoolingtubevect[0][0]->X()
725 + fgkCarbonFiberTriangleLength,
726 localcoolingtubevect[0][0]->Y(),
727 localcoolingtubevect[0][0]->Z());
728 localcoolingtubevect[1][1] = new TVector3(-localcoolingtubevect[0][1]->X()
729 + fgkCarbonFiberTriangleLength,
730 localcoolingtubevect[0][1]->Y(),
731 localcoolingtubevect[0][1]->Z());
732 localcoolingtubevect[2][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
733 - fgkCarbonFiberTriangleLength),
734 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
735 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
736 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
737 - 0.5*(fgkCarbonFiberLowerSupportWidth
738 + fgkSSDSensorCenterSupportLength
739 - fgkSSDSensorCenterSupportThickness[0])
740 + fgkSSDModuleStiffenerPosition[1]
741 - 0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDSensorOverlap),
742 - 0.5*fgkCoolingTubeSupportHeight);
743 localcoolingtubevect[2][1] = new TVector3(-localcoolingtubevect[2][0]->X()
744 + fgkCarbonFiberTriangleLength,
745 localcoolingtubevect[2][0]->Y(),
746 localcoolingtubevect[2][0]->Z());
747 localcoolingtubevect[3][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
748 - fgkCarbonFiberTriangleLength),
749 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
750 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
751 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
752 - 0.5*(fgkCarbonFiberLowerSupportWidth
753 + fgkSSDSensorCenterSupportLength
754 - fgkSSDSensorCenterSupportThickness[0])
755 + fgkSSDSensorLength
756 - 0.5*fgkSSDModuleStiffenerPosition[1],
757 - 0.5*fgkCoolingTubeSupportHeight);
758 localcoolingtubevect[3][1] = new TVector3(-localcoolingtubevect[3][0]->X()
759 + fgkCarbonFiberTriangleLength,
760 localcoolingtubevect[3][0]->Y(),
761 - 0.5*fgkCoolingTubeSupportHeight);
762 for(Int_t i=0; i<4; i++)
763 for(Int_t j=0; j<2; j++){
764 localcoolingtubetrans[i][j] =
765 new TGeoTranslation(localcoolingtubevect[i][j]->X(),
766 localcoolingtubevect[i][j]->Y(),
767 localcoolingtubevect[i][j]->Z());
768 fcoolingtubematrix[i][j] = new TGeoHMatrix((*localcoolingtubetrans[i][j])
769 * (*localcoolingtuberot));
770 }
771 /////////////////////////////////////////////////////////////
772 // SSD Hybrid Components Transformations
773 /////////////////////////////////////////////////////////////
774 const Int_t khybridmatrixnumber = 3;
775 TGeoTranslation* localhybridtrans[khybridmatrixnumber];
776 localhybridtrans[0] = new TGeoTranslation(0.5*fgkSSDStiffenerLength,
777 0.5*fgkSSDStiffenerWidth,
778 0.5*fgkSSDStiffenerHeight);
779 localhybridtrans[1] = new TGeoTranslation(fgkSSDModuleStiffenerPosition[0],
780 fgkSSDModuleStiffenerPosition[1],0.0);
781
782 localhybridtrans[2] = new TGeoTranslation(
783 - 0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
784 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
785 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
786 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
787 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
788 - fgkSSDSensorCenterSupportThickness[0]),
789 - (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight
790 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight));
791 fhybridmatrix = new TGeoHMatrix();
792 for(Int_t i=0; i<khybridmatrixnumber; i++) fhybridmatrix->MultiplyLeft(localhybridtrans[i]);
793 /////////////////////////////////////////////////////////////
794 // SSD Cooling Block Transformations
795 /////////////////////////////////////////////////////////////
796 const Int_t kcoolingblockmatrixnumber = 4;
797 TGeoTranslation* localcoolingblocktrans[kcoolingblockmatrixnumber];
798 localcoolingblocktrans[0] = new TGeoTranslation(-2.*(fgkCoolingTubeSupportRmax
799 - fgkCoolingTubeSupportRmin),0.0,
800 0.5*(fgkSSDCoolingBlockHoleCenter+fgkCoolingTubeRmax));
801 localcoolingblocktrans[1] = new TGeoTranslation(0.5*fgkSSDStiffenerLength
802 - 0.5*fgkSSDModuleSensorSupportDistance-fgkSSDCoolingBlockLength,
803 0.0,fgkSSDStiffenerHeight);
804 localcoolingblocktrans[2] = new TGeoTranslation(*localhybridtrans[1]);
805 localcoolingblocktrans[3] = new TGeoTranslation(*localhybridtrans[2]);
806 fcoolingblocksystematrix = new TGeoHMatrix();
807 for(Int_t i=0; i<kcoolingblockmatrixnumber; i++)
808 fcoolingblocksystematrix->MultiplyLeft(localcoolingblocktrans[i]);
809 /////////////////////////////////////////////////////////////
810 // SSD Stiffener Flex Transformations
811 /////////////////////////////////////////////////////////////
812 const Int_t klocalflexmatrixnumber = 4;
813 TGeoCombiTrans** localflexmatrix[fgkflexnumber];
814 for(Int_t i=0; i<fgkflexnumber; i++)
815 localflexmatrix[i] = new TGeoCombiTrans*[klocalflexmatrixnumber];
816 for(Int_t i=0; i<fgkflexnumber; i++)
817 for(Int_t j =0; j<klocalflexmatrixnumber; j++)
818 localflexmatrix[i][j] = new TGeoCombiTrans();
819 Double_t ssdstiffenerseparation = fgkSSDSensorLength
820 - 2.*fgkSSDModuleStiffenerPosition[1]
821 - fgkSSDStiffenerWidth;
822 localflexmatrix[0][0]->SetTranslation(-fgkSSDFlexLength[0]
823 +0.5*fgkSSDStiffenerLength,
824 0.5*fgkSSDStiffenerWidth,
825 -0.5*fgkSSDStiffenerHeight
826 -0.5*fgkSSDFlexHeight[0]);
827 localflexmatrix[1][0]->SetTranslation(-(fgkSSDStiffenerLength-fgkSSDFlexLength[0])
828 +0.5*fgkSSDStiffenerLength,ssdstiffenerseparation
829 -0.5*fgkSSDStiffenerWidth,
830 -0.5*fgkSSDStiffenerHeight
831 -0.5*fgkSSDFlexHeight[0]);
832 TGeoRotation* localflexrot = new TGeoRotation();
833 localflexrot->SetAngles(180.,0.,0.);
834 localflexmatrix[1][0]->SetRotation(localflexrot);
835 for(Int_t i=0; i<fgkflexnumber; i++)
836 for(Int_t j =1; j<klocalflexmatrixnumber; j++)
837 localflexmatrix[i][j]->SetTranslation(*localhybridtrans[j-1]);
838 for(Int_t i=0; i<fgkflexnumber; i++){
839 fstiffenerflexmatrix[i] = new TGeoHMatrix();
840 for(Int_t j =0; j<klocalflexmatrixnumber; j++)
841 fstiffenerflexmatrix[i]->MultiplyLeft(localflexmatrix[i][j]);
d7599219 842 }
bf210566 843 /////////////////////////////////////////////////////////////
844 // SSD End Flex Transformations
845 /////////////////////////////////////////////////////////////
846 TGeoRotation* localendflexrot = new TGeoRotation();
847 localendflexrot->SetAngles(0.0,90.0,0.0);
848 TGeoCombiTrans* localendflexmatrix = new TGeoCombiTrans();
849 Double_t ssdflexradiusmax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
850 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
851 Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
852 * TMath::DegToRad()*ssdflexradiusmax
853 - fgkSSDFlexLength[2]-TMath::Pi()
854 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0];
855 Double_t trans = ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
856 + (ssdflexradiusmax-fgkSSDStiffenerHeight)*SinD(2.*fgkSSDFlexAngle)
857 + fgkSSDFlexLength[2];
858 localendflexmatrix->SetTranslation(fgkSSDFlexLength[0]-trans,
859 0.5*fgkSSDFlexWidth[0],
860 2.*fgkSSDStiffenerHeight
861 + 0.5*fgkSSDFlexHeight[0]);
862 localendflexmatrix->SetRotation(localendflexrot);
863 for(Int_t i=0; i<fgkflexnumber; i++)
864 fendflexmatrix[i] = new TGeoHMatrix((*fstiffenerflexmatrix[i])*(*localendflexmatrix));
865 /////////////////////////////////////////////////////////////
866 // End Ladder Carbon Fiber Junction
867 /////////////////////////////////////////////////////////////
868 TGeoCombiTrans** localendladdercarbonfiberjunctionmatrix[fgkendlabbercarbonfiberjunctionumber];
869 TGeoRotation** localendladdercarbonfiberjunctionrot[fgkendlabbercarbonfiberjunctionumber];
870 TGeoTranslation** localendladdercarbonfiberjunctiontrans[fgkendlabbercarbonfiberjunctionumber];
871 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
872 localendladdercarbonfiberjunctionmatrix[i]
873 = new TGeoCombiTrans*[fgkendladdercabonfiberjunctionmatrixnumber];
874 localendladdercarbonfiberjunctionrot[i]
875 = new TGeoRotation*[fgkendladdercabonfiberjunctionmatrixnumber];
876 localendladdercarbonfiberjunctiontrans[i]
877 = new TGeoTranslation*[fgkendladdercabonfiberjunctionmatrixnumber];
878 fendladdercarbonfiberjunctionmatrix[i]
879 = new TGeoHMatrix*[fgkendladdercabonfiberjunctionmatrixnumber];
d7599219 880 }
bf210566 881 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
882 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
883 localendladdercarbonfiberjunctionrot[i][j] = new TGeoRotation();
884 localendladdercarbonfiberjunctiontrans[i][j] = new TGeoTranslation();
885 }
886 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
887 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
888 localendladdercarbonfiberjunctionrot[i][j]->SetAngles(120.*j,0.,0.);
889 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
890 localendladdercarbonfiberjunctiontrans[i][1]->SetTranslation(fgkCarbonFiberTriangleLength,
891 0.0,0.0);
892 localendladdercarbonfiberjunctiontrans[i][2]->SetTranslation(fgkCarbonFiberTriangleLength
893 * CosD(fgkCarbonFiberTriangleAngle),fgkCarbonFiberTriangleLength
894 * SinD(fgkCarbonFiberTriangleAngle),
895 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[i]
896 - fgkEndLadderCarbonFiberUpperJunctionLength[i]));
897 }
898 TGeoCombiTrans* localendladdercarbonfiberjunctionglobalmatrix[fgkendlabbercarbonfiberjunctionumber];
899 TGeoRotation* localendladdercarbonfiberjunctionglobalrot[fgkendlabbercarbonfiberjunctionumber];
900 TGeoTranslation* localendladdercarbonfiberjunctionglobaltrans[fgkendlabbercarbonfiberjunctionumber];
901 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
902 localendladdercarbonfiberjunctionglobalrot[i] = new TGeoRotation();
903 localendladdercarbonfiberjunctionglobaltrans[i] = new TGeoTranslation();
904 localendladdercarbonfiberjunctionglobalrot[i]->SetAngles(0.0,90.0,0.0);
905 localendladdercarbonfiberjunctionglobaltrans[i]->SetTranslation(0.0,
906 0.5*fgkEndLadderCarbonFiberLowerJunctionLength[i],0.0);
907 localendladdercarbonfiberjunctionglobalmatrix[i] =
908 new TGeoCombiTrans(*localendladdercarbonfiberjunctionglobaltrans[i],
909 *localendladdercarbonfiberjunctionglobalrot[i]);
910 }
911 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
912 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
913 localendladdercarbonfiberjunctionmatrix[i][j] =
914 new TGeoCombiTrans(*localendladdercarbonfiberjunctiontrans[i][j],
915 *localendladdercarbonfiberjunctionrot[i][j]);
916 fendladdercarbonfiberjunctionmatrix[i][j] =
917 new TGeoHMatrix((*localendladdercarbonfiberjunctionglobalmatrix[i])
918 * (*localendladdercarbonfiberjunctionmatrix[i][j]));
919 }
920 /////////////////////////////////////////////////////////////
921 // End Ladder Carbon Fiber Support
922 /////////////////////////////////////////////////////////////
923 TGeoTranslation* localendladdercarbonfibertrans[fgkendladdercarbonfibermatrixnumber];
924 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++){
925 localendladdercarbonfibertrans[i] = new TGeoTranslation();
926 localendladdercarbonfibertrans[i]->SetTranslation(0.0,
927 i==0 ? 0.0 :fgkCarbonFiberLowerSupportWidth,0.0);
928 fendladdercarbonfibermatrix[i] = new TGeoHMatrix*[fgkcarbonfibersupportnumber];
929 }
930 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++)
931 for(Int_t j=0; j<fgkcarbonfibersupportnumber; j++)
932 fendladdercarbonfibermatrix[i][j] =
933 new TGeoHMatrix((*localendladdercarbonfibertrans[i])
934 *(*fcarbonfibersupportmatrix[j]));
935 /////////////////////////////////////////////////////////////
936 // End Ladder SSD Mounting Block
937 /////////////////////////////////////////////////////////////
938 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
939 fendladdermountingblocktrans[i] =
940 new TGeoTranslation(- 0.25*(fgkSSDMountingBlockLength[0]
941 + fgkSSDMountingBlockLength[1])
942 + 0.5*fgkCarbonFiberTriangleLength,
943 fgkEndLadderMountingBlockPosition[i],
944 - fgkSSDMountingBlockHeight[1]
945 + 0.5*fgkSSDMountingBlockHeight[0]);
946 /////////////////////////////////////////////////////////////
947 // End Ladder Carbon Fiber Lower Support
948 /////////////////////////////////////////////////////////////
949 for(Int_t i=0; i<fgkendladderlowersuppnumber; i++)
950 fendladderlowersupptrans[i] =
951 new TGeoTranslation(0.0,(1-i)*(fgkEndLadderMountingBlockPosition[i]
952 + 0.5*fgkSSDMountingBlockWidth),
953 - 0.5*fgkCarbonFiberLowerSupportHeight);
954 fendladderlowersupptrans[2] = new TGeoTranslation(0.0,
955 fgkCarbonFiberLowerSupportVolumePosition[1]
956 + fgkCarbonFiberLowerSupportVolumePosition[0],
957 0.0);
958 fendladderlowersupptrans[2]->Add(fendladderlowersupptrans[1]);
959 /////////////////////////////////////////////////////////////
960 // Matrix for positioning Ladder into mother volume
961 /////////////////////////////////////////////////////////////
962 TGeoHMatrix** ladderglobalmatrix[fgkladdernumber];
963 for(Int_t i=0; i<fgkladdernumber; i++)
964 ladderglobalmatrix[i] = new TGeoHMatrix*[fgkladdernumber];
965 TGeoRotation* localladdermotherrot = new TGeoRotation();
966 localladdermotherrot->SetAngles(0.,90.,0.);
967 TGeoTranslation* localladdermothertrans[fgkladdernumber];
968 TGeoCombiTrans* localladdermothercombitrans[fgkladdernumber];
969 for(Int_t i=0; i<fgkladdernumber; i++){
970 localladdermothertrans[i] = new TGeoTranslation(0.,
971 - fgkEndLadderCarbonFiberLowerJunctionLength[1]
972 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
973 + (i==0?fgkSSDLay5SensorsNumber:fgkSSDLay6SensorsNumber)
974 * fgkCarbonFiberJunctionWidth,0.);
975 localladdermothercombitrans[i] = new TGeoCombiTrans(*localladdermothertrans[i],
976 *localladdermotherrot);
977 ladderglobalmatrix[0][i] = new TGeoHMatrix(*localladdermothercombitrans[i]);
978 ladderglobalmatrix[1][i] = new TGeoHMatrix(ladderglobalmatrix[0][i]->Inverse());
d7599219 979 }
44285dfa 980 /////////////////////////////////////////////////////////////
bf210566 981 // Ladder Cables Matrices
44285dfa 982 /////////////////////////////////////////////////////////////
44285dfa 983 Double_t ssdflexradius = fgkSSDStiffenerHeight+2*fgkSSDFlexHeight[0]
d7599219 984 + fgkSSDFlexHeight[1];
44285dfa 985 Double_t ssdladdercabletransx[3];
986 ssdladdercabletransx[0] = (ssdflexradiusmax-fgkSSDFlexHeight[1]-ssdflexradius)
bf210566 987 * SinD(2.*fgkSSDFlexAngle)
988 * CosD(2.*fgkSSDFlexAngle);
44285dfa 989 ssdladdercabletransx[1] = ((ssdflexradiusmax-fgkSSDFlexHeight[1]-ssdflexradius)
990 - ssdladdercabletransx[0]
bf210566 991 / SinD(2.*fgkSSDFlexAngle))
992 * CosD(fgkSSDFlexAngle);
44285dfa 993 ssdladdercabletransx[2] = (fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
994 * TMath::DegToRad()*ssdflexradiusmax
d7599219 995 - fgkSSDFlexLength[2]-TMath::Pi()
996 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
997 - fgkSSDLadderCableWidth)
bf210566 998 * CosD(2.*fgkSSDFlexAngle);
44285dfa 999 Double_t ssdladdercabletransz[3] = {ssdladdercabletransx[0]
bf210566 1000 * TanD(2.*fgkSSDFlexAngle),
44285dfa 1001 ssdladdercabletransx[1]
bf210566 1002 * TanD(fgkSSDFlexAngle),
44285dfa 1003 ssdladdercabletransx[2]
bf210566 1004 * TanD(2.*fgkSSDFlexAngle)};
44285dfa 1005 TGeoRotation* localladdercablerot[3];
bf210566 1006 for(Int_t i=0; i<3; i++) localladdercablerot[i] = new TGeoRotation();
1007 localladdercablerot[0]->SetAngles(90.,0.,0.);
1008 localladdercablerot[1]->SetAngles(90.,60.,-90.);
44285dfa 1009 localladdercablerot[2]->SetRotation((*localladdercablerot[1])
1010 * (*localladdercablerot[0]));
1011 ////////////////////////////////////////////
1012 // LocalLadderCableCombiTransMatrix
1013 ////////////////////////////////////////////
1014 const Int_t klocalladdersidecablesnumber = 2;
1015 const Int_t klocalladdercombitransnumber = 5;
1016 TGeoCombiTrans** localladdercablecombitransmatrix[klocalladdersidecablesnumber];
1017 for(Int_t i=0; i<klocalladdersidecablesnumber; i++)
1018 localladdercablecombitransmatrix[i] =
1019 new TGeoCombiTrans*[klocalladdercombitransnumber];
1020 ///////////////////////////////////////////
1021 // Left Side Ladder Cables Transformations
1022 ///////////////////////////////////////////
1023 localladdercablecombitransmatrix[0][0] =
d7599219 1024 new TGeoCombiTrans(-0.5*fgkCarbonFiberTriangleLength,
1025 0.,0.,NULL);
bf210566 1026 localladdercablecombitransmatrix[0][1] =
1027 new TGeoCombiTrans(-0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
1028 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1029 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1030 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1031 - 0.5*(fgkCarbonFiberLowerSupportWidth
1032 + fgkSSDSensorCenterSupportLength
1033 - fgkSSDSensorCenterSupportThickness[0]),
1034 - (fgkSSDModuleCoolingBlockToSensor
1035 + 0.5*fgkCoolingTubeSupportHeight
1036 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]
1037 - fgkSSDChipHeight),NULL);
44285dfa 1038 localladdercablecombitransmatrix[0][2] =
d7599219 1039 new TGeoCombiTrans(fgkSSDModuleStiffenerPosition[0],
1040 fgkSSDModuleStiffenerPosition[1],0.,0);
bf210566 1041 localladdercablecombitransmatrix[0][3] = new TGeoCombiTrans(
1042 0.5*(fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
1043 +(fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
1044 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
1045 - fgkSSDStiffenerWidth,- 0.5*fgkSSDChipHeight,
1046 new TGeoRotation("",180.,0.,0.));
44285dfa 1047 localladdercablecombitransmatrix[0][4] =
1048 new TGeoCombiTrans(-ssdladdercabletransx[0]
1049 - ssdladdercabletransx[1]-ssdladdercabletransx[2]
d7599219 1050 + fgkSSDFlexLength[0]-fgkSSDFlexLength[2],
1051 0.,
1052 0.5*fgkSSDFlexHeight[0]+2.*(fgkSSDFlexHeight[0]
1053 + fgkSSDFlexHeight[1])+2.*fgkSSDStiffenerHeight
44285dfa 1054 + ssdladdercabletransz[0]-ssdladdercabletransz[1]
1055 + ssdladdercabletransz[2],localladdercablerot[2]);
1056 ///////////////////////////////////////////
1057 // Rigth Side Ladder Cables Transformations
1058 ///////////////////////////////////////////
bf210566 1059 TGeoCombiTrans* localladdercablessdmodulematrix =
1060 new TGeoCombiTrans(0.5*(fgkSSDStiffenerLength-fgkSSDChipNumber*fgkSSDChipLength
1061 - (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
1062 fgkSSDStiffenerWidth,
1063 - 0.5*fgkSSDFlexHeight[0],NULL);
44285dfa 1064 for(Int_t i=0; i<klocalladdercombitransnumber; i++)
1065 localladdercablecombitransmatrix[1][i] =
bf210566 1066 (i!=3 ? new TGeoCombiTrans(*localladdercablecombitransmatrix[0][i]):
1067 new TGeoCombiTrans(*localladdercablessdmodulematrix));
44285dfa 1068 ///////////////////////////////////////////
bf210566 1069 // Setting LadderCableHMatrix
44285dfa 1070 ///////////////////////////////////////////
bf210566 1071 Int_t beamaxistrans[2][3];
1072 beamaxistrans[0][0] = fgkSSDLay5SensorsNumber/2;
1073 beamaxistrans[0][1] = beamaxistrans[0][0]+1;
1074 beamaxistrans[0][2] = beamaxistrans[0][0]-1;
1075 beamaxistrans[1][0] = (fgkSSDLay6SensorsNumber-1)/2;
1076 beamaxistrans[1][1] = beamaxistrans[1][0]+1;
1077 beamaxistrans[1][2] = beamaxistrans[1][0];
1078 TGeoHMatrix** localladdercablehmatrix[fgkladdercablesnumber];
1079 TGeoRotation* laddercablerot = new TGeoRotation();
1080 TGeoTranslation* laddercabletrans = new TGeoTranslation();
1081 TGeoCombiTrans* laddercablecombitrans = new TGeoCombiTrans();
1082 Double_t* laddercabletransvector;
1083 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1084 localladdercablehmatrix[i] = new TGeoHMatrix*[klocalladdersidecablesnumber];
1085 fladdercablematrix[i] = new TGeoHMatrix*[fgkladdercablematrixnumber];
1086 }
1087 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1088 for(Int_t j=0; j<klocalladdersidecablesnumber; j++){
1089 localladdercablehmatrix[i][j] = new TGeoHMatrix();
1090 for(Int_t k=0; k<klocalladdercombitransnumber; k++){
1091 localladdercablehmatrix[i][j]->MultiplyLeft(
1092 localladdercablecombitransmatrix[j][klocalladdercombitransnumber-k-1]);
1093 }
1094 laddercablerot->SetMatrix(localladdercablehmatrix[i][j]->GetRotationMatrix());
1095 laddercabletransvector = localladdercablehmatrix[i][j]->GetTranslation();
1096 laddercabletrans->SetTranslation(laddercabletransvector[0],
44285dfa 1097 laddercabletransvector[1]
bf210566 1098 + (j==0 ? beamaxistrans[i][0] : 0.)
d7599219 1099 * fgkCarbonFiberJunctionWidth,
bf210566 1100 laddercabletransvector[2]);
1101 laddercablecombitrans->SetRotation(*laddercablerot);
1102 laddercablecombitrans->SetTranslation(*laddercabletrans);
1103 fladdercablematrix[i][j] = new TGeoHMatrix(*laddercablecombitrans);
1104 }
1105 fladdercablematrix[i][2] =
1106 AddTranslationToHMatrix(fladdercablematrix[i][1],0.,
1107 beamaxistrans[i][1]*fgkCarbonFiberJunctionWidth,0.);
1108 fladdercablematrix[i][3] =
1109 AddTranslationToHMatrix(fladdercablematrix[i][0],0.,
1110 beamaxistrans[i][2]*fgkCarbonFiberJunctionWidth,0.);
d7599219 1111 }
bf210566 1112 for(Int_t i=0; i<fgkladdercablesnumber; i++)
1113 for(Int_t j=0; j<klocalladdercombitransnumber-1; j++)
1114 fladdercablematrix[i][j]->MultiplyLeft(ladderglobalmatrix[1][i]);
1115 ///////////////////////////////////////////
1116 // Setting Ladder HMatrix
1117 ///////////////////////////////////////////
1118 Int_t ssdlaysensorsnumber[fgkladdernumber] = {fgkSSDLay5SensorsNumber,
1119 fgkSSDLay6SensorsNumber};
1120 for(Int_t i=0; i<fgkladdernumber; i++){
1121 fladdermatrix[i] = new TGeoHMatrix*[ssdlaysensorsnumber[i]];
1122 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
1123 fladdermatrix[i][j] = new TGeoHMatrix();
1124 fladdermatrix[i][j]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1125 fladdermatrix[i][j]->SetDy(fgkCarbonFiberJunctionWidth*j);
1126 fladdermatrix[i][j]->MultiplyLeft(ladderglobalmatrix[1][i]);
1127 }
d7599219 1128 }
bf210566 1129 ///////////////////////////////////////////
1130 // Setting SSD Sensor Matrix
1131 ///////////////////////////////////////////
1132 TGeoCombiTrans* localssdsensorcombitrans[2];
1133 TGeoRotation* localssdsensorrot = new TGeoRotation();
1134 localssdsensorrot->SetAngles(0.,90.,0.);
1135 TGeoTranslation* localssdsensortrans[2];
1136 for(Int_t i=0; i<2; i++) localssdsensortrans[i] = new TGeoTranslation();
1137 localssdsensortrans[0]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
1138 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1139 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1140 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1141 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
1142 - fgkSSDSensorCenterSupportThickness[0])+0.5*fgkSSDSensorLength,
1143 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
1144 - fgkSSDModuleCoolingBlockToSensor+(fgkSSDSensorSideSupportHeight[1]
1145 - fgkSSDSensorSideSupportHeight[0]));
1146 localssdsensortrans[1]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
1147 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1148 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1149 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1150 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
1151 - fgkSSDSensorCenterSupportThickness[0])+0.5*fgkSSDSensorLength,
1152 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
1153 -fgkSSDModuleCoolingBlockToSensor);
1154 for(Int_t i=0; i<2; i++)
1155 localssdsensorcombitrans[i] = new TGeoCombiTrans(*localssdsensortrans[i],
1156 *localssdsensorrot);
1157 for(Int_t i=0; i<fgkladdernumber; i++){
1158 fssdsensormatrix[i] = new TGeoHMatrix*[ssdlaysensorsnumber[i]];
1159 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
1160 switch(i){
1161 case 0: //Ladder of Layer5
1162 fssdsensormatrix[i][j] = new TGeoHMatrix((*fladdermatrix[i][j])
1163 * ((j%2==0 ? *localssdsensorcombitrans[0] :
1164 *localssdsensorcombitrans[1])));
1165 break;
1166 case 1: //Ladder of Layer6
1167 fssdsensormatrix[i][j] = new TGeoHMatrix((*fladdermatrix[i][j])
1168 * ((j%2==0 ? *localssdsensorcombitrans[1] :
1169 *localssdsensorcombitrans[0])));
1170 break;
1171 }
1172 }
1173 }
1174 //////////////////////////
1175 // Setting SSD End Ladder
1176 //////////////////////////
1177 for(Int_t i=0; i<2; i++) fendladdersegmentmatrix[i] = new TGeoHMatrix*[2];
1178 for(Int_t i=0; i<2; i++){
1179 fendladdersegmentmatrix[0][i] = new TGeoHMatrix();
1180 fendladdersegmentmatrix[0][i]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1181 fendladdersegmentmatrix[0][i]->SetDy(fgkCarbonFiberJunctionWidth*ssdlaysensorsnumber[i]);
1182 fendladdersegmentmatrix[0][i]->MultiplyLeft(ladderglobalmatrix[1][i]);
1183 fendladdersegmentmatrix[1][i] = new TGeoHMatrix();
1184 fendladdersegmentmatrix[1][i]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1185 fendladdersegmentmatrix[1][i]->RotateZ(180.0);
1186 fendladdersegmentmatrix[1][i]->MultiplyLeft(ladderglobalmatrix[1][i]);
1187 }
1188 /////////////////////////////////////////////////////
1189 // Setting the CombiTransformation to pass ITS center
1190 /////////////////////////////////////////////////////
1191 Double_t itscentertransz[fgklayernumber];
1192 itscentertransz[0] = fgkSSDLay5LadderLength
1193 - fgkLay5CenterITSPosition;
1194 itscentertransz[1] = fgkSSDLay6LadderLength
1195 - fgkLay6CenterITSPosition;
1196 Double_t itssensortransy = fgkSSDModuleCoolingBlockToSensor
1197 + 0.5*fgkCoolingTubeSupportHeight;
1198 TGeoRotation* itscenterrot[3];
1199 for(Int_t i=0; i<fgklayernumber; i++) itscenterrot[i] = new TGeoRotation();
1200 itscenterrot[0]->SetAngles(90.,180.,-90.);
1201 itscenterrot[1]->SetAngles(0.,90.,0.);
1202 itscenterrot[2] = new TGeoRotation((*itscenterrot[1])*(*itscenterrot[0]));
1203 TGeoCombiTrans* itscentercombitrans[fgklayernumber];
1204 for(Int_t i=0; i<fgklayernumber; i++)
1205 itscentercombitrans[i] = new TGeoCombiTrans(0.,
1206 itssensortransy,
1207 fgkEndLadderCarbonFiberLowerJunctionLength[1]
1208 - itscentertransz[i],itscenterrot[2]);
1209 TGeoRotation** locallayerrot[fgklayernumber];
1210 TGeoTranslation** locallayertrans[fgklayernumber];
1211 TGeoCombiTrans** locallayercombitrans[fgklayernumber];
1212 TGeoTranslation* localbeamaxistrans[fgklayernumber];
1213 localbeamaxistrans[0] = new TGeoTranslation(0.,0.,0.5*fgkSSDLay5LadderLength
1214 - fgkLay5CenterITSPosition);
1215 localbeamaxistrans[1] = new TGeoTranslation(0.,0.,0.5*fgkSSDLay6LadderLength
1216 - fgkLay6CenterITSPosition);
1217 const Int_t kssdlayladdernumber[fgklayernumber] =
1218 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
1219 for(Int_t i=0; i<fgklayernumber; i++){
1220 locallayerrot[i] = new TGeoRotation*[kssdlayladdernumber[i]];
1221 locallayertrans[i] = new TGeoTranslation*[kssdlayladdernumber[i]];
1222 locallayercombitrans[i] = new TGeoCombiTrans*[kssdlayladdernumber[i]];
1223 flayermatrix[i] = new TGeoHMatrix*[kssdlayladdernumber[i]];
d7599219 1224 }
bf210566 1225 Double_t layerladderangleposition[fgklayernumber] =
1226 {360./fgkSSDLay5LadderNumber,360./fgkSSDLay6LadderNumber};
1227 Double_t layerradius = 0.;
1228 for(Int_t i=0; i<fgklayernumber; i++){
1229 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
1230 switch(i){
1231 case 0: //Ladder of Layer5
1232 layerradius = (j%2==0 ? fgkSSDLay5RadiusMin: fgkSSDLay5RadiusMax);
1233 break;
1234 case 1: //Ladder of Layer6
1235 layerradius = (j%2==0 ? fgkSSDLay6RadiusMin: fgkSSDLay6RadiusMax);
1236 break;
1237 }
1238 locallayerrot[i][j] = new TGeoRotation();
1239 locallayertrans[i][j] = new TGeoTranslation();
1240 locallayerrot[i][j]->SetAngles(j*layerladderangleposition[i],0.,0.);
1241 locallayertrans[i][j]->SetTranslation(layerradius
1242 * CosD(90.0+j*layerladderangleposition[i]),
1243 layerradius
1244 * SinD(90.0+j*layerladderangleposition[i]),0.);
1245 locallayercombitrans[i][j] = new TGeoCombiTrans(*locallayertrans[i][j],
1246 *locallayerrot[i][j]);
1247 flayermatrix[i][j] = new TGeoHMatrix((*locallayercombitrans[i][j])*(*itscentercombitrans[i]));
1248 flayermatrix[i][j]->Multiply(ladderglobalmatrix[0][i]);
1249 flayermatrix[i][j]->MultiplyLeft(localbeamaxistrans[i]);
d7599219 1250 }
bf210566 1251 }
44285dfa 1252 /////////////////////////////////////////////////////////////
bf210566 1253 // Deallocating memory
44285dfa 1254 /////////////////////////////////////////////////////////////
bf210566 1255 for(Int_t i=0; i< kcarbonfibersupportmatrixnumber[1]; i++){
1256 delete carbonfiberot[i];
1257 delete localcarbonfibersupportmatrix[i];
d7599219 1258 }
bf210566 1259 for(Int_t i=0; i< fgkcarbonfiberjunctionumber; i++){
1260 for(Int_t j=0; j< kcarbonfiberjunctionmatrixnumber; j++){
1261 delete localcarbonfiberjunctionmatrix[i][j];
1262 delete localcarbonfiberjunctionrot[i][j];
1263 delete localcarbonfiberjunctiontrans[i][j];
1264 }
1265 delete [] localcarbonfiberjunctionmatrix[i];
1266 delete [] localcarbonfiberjunctionrot[i];
1267 delete [] localcarbonfiberjunctiontrans[i];
d7599219 1268 }
bf210566 1269 for(Int_t i=0; i<fgkcarbonfiberlowersupportnumber; i++)
1270 delete localcarbonfiberlowersupportrans[i];
1271 for(Int_t i=0; i< fgkssdsensorsupportnumber; i++){
1272 for(Int_t j=0; j< kssdsensorsupportmatrixnumber; j++){
1273 delete localssdsensorsupportmatrix[i][j];
1274 delete localssdsensorsupportrot[i][j];
1275 delete localssdsensorsupportrans[i][j];
1276 }
1277 delete [] localssdsensorsupportmatrix[i];
1278 delete [] localssdsensorsupportrot[i];
1279 delete [] localssdsensorsupportrans[i];
d7599219 1280 }
bf210566 1281 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++){
1282 delete localcoolingtubesupportmatrix[i];
1283 delete localcoolingtubesupportrot[i];
1284 delete localcoolingtubesupportrans[i];
1285 }
1286 for(Int_t i=0; i<4; i++){
1287 for(Int_t j=0; j<2; j++){
1288 delete localcoolingtubevect[i][j];
1289 delete localcoolingtubetrans[i][j];
1290 }
1291 delete [] localcoolingtubevect[i];
1292 delete [] localcoolingtubetrans[i];
1293 }
1294 for(Int_t i=0; i<khybridmatrixnumber; i++) delete localhybridtrans[i];
1295 for(Int_t i=0; i<kcoolingblockmatrixnumber; i++) delete localcoolingblocktrans[i];
1296 for(Int_t i=0; i<fgkflexnumber; i++){
1297 for(Int_t j=1; j<klocalflexmatrixnumber; j++)
1298 delete localflexmatrix[i][j];
1299 delete [] localflexmatrix[i];
1300 }
1301 delete localflexrot;
1302 delete localendflexrot;
1303 delete localendflexmatrix;
1304 for(Int_t i=0; i<fgkladdernumber; i++){
1305 delete localladdermothertrans[i];
1306 delete localladdermothercombitrans[i];
1307 }
1308 delete localladdermotherrot;
1309 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1310 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1311 delete localendladdercarbonfiberjunctionmatrix[i][j];
1312 delete localendladdercarbonfiberjunctionrot[i][j];
1313 delete localendladdercarbonfiberjunctiontrans[i][j];
1314 }
1315 delete [] localendladdercarbonfiberjunctionmatrix[i];
1316 delete [] localendladdercarbonfiberjunctionrot[i];
1317 delete [] localendladdercarbonfiberjunctiontrans[i];
1318 delete localendladdercarbonfiberjunctionglobalrot[i];
1319 delete localendladdercarbonfiberjunctionglobaltrans[i];
1320 delete localendladdercarbonfiberjunctionglobalmatrix[i];
1321 }
1322 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++)
1323 delete localendladdercarbonfibertrans[i];
1324 for(Int_t i=0; i<3; i++) delete localladdercablerot[i];
1325 for(Int_t i=0; i<klocalladdersidecablesnumber; i++){
1326 for(Int_t j=0; j<klocalladdercombitransnumber; j++)
1327 delete localladdercablecombitransmatrix[i][j];
1328 delete []localladdercablecombitransmatrix[i];
1329 }
1330 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1331 for(Int_t j=0; j<klocalladdersidecablesnumber; j++)
1332 delete localladdercablehmatrix[i][j];
1333 delete []localladdercablehmatrix[i];
1334 }
1335 delete laddercablerot;
1336 delete laddercabletrans;
1337 delete laddercablecombitrans;
1338 delete localladdercablessdmodulematrix;
1339 delete localssdsensorrot;
1340 for(Int_t i=0; i<2; i++){
1341 delete localssdsensortrans[i];
1342 delete localssdsensorcombitrans[i];
1343 }
1344 for(Int_t i=0; i<fgklayernumber; i++){
1345 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
1346 delete locallayerrot[i][j];
1347 delete locallayertrans[i][j];
1348 delete locallayercombitrans[i][j];
d7599219 1349 }
bf210566 1350 delete [] locallayerrot[i];
1351 delete [] locallayertrans[i];
1352 delete [] locallayercombitrans[i];
1353 delete localbeamaxistrans[i];
1354 }
1355 for(Int_t i=0; i<3; i++) delete itscenterrot[i];
1356 for(Int_t i=0; i<fgkladdernumber; i++){
1357 for(Int_t j=0; j<fgkladdernumber; j++)
1358 delete ladderglobalmatrix[i][j];
1359 delete [] ladderglobalmatrix[i];
1360 }
1361 /////////////////////////////////////////////////////////////
1362 fTransformationMatrices = kTRUE;
d7599219 1363}
bf210566 1364///////////////////////////////////////////////////////////////////////////////
1365void AliITSv11GeometrySSD::CreateBasicObjects(){
1366 /////////////////////////////////////////////////////////////
1367 // Method generating the Objects of SSD Geometry
44285dfa 1368 /////////////////////////////////////////////////////////////
bf210566 1369 // SSD Sensor
1370 ///////////////////////////////////
1371 SetSSDSensor();
1372 /////////////////////////////////////////////////////////////
1373 // Carbon Fiber Support
1374 /////////////////////////////////////////////////////////////
1375 TList* carbonfibersupportlist = GetCarbonFiberSupportList();
1376 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++)
1377 fcarbonfibersupport[i] = (TGeoVolume*)carbonfibersupportlist->At(i);
44285dfa 1378 /////////////////////////////////////////////////////////////
bf210566 1379 // Carbon Fiber Junction
44285dfa 1380 /////////////////////////////////////////////////////////////
bf210566 1381 fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth);
44285dfa 1382 /////////////////////////////////////////////////////////////
bf210566 1383 // Carbon Fiber Lower Support
44285dfa 1384 /////////////////////////////////////////////////////////////
bf210566 1385 TList* carbonfiberlowersupportlist = GetCarbonFiberLowerSupportList();
1386 for(Int_t i=0; i<fgkcarbonfiberlowersupportnumber; i++)
1387 fcarbonfiberlowersupport[i] = (TGeoVolume*)carbonfiberlowersupportlist->At(i);
d7599219 1388 /////////////////////////////
bf210566 1389 // SSD Sensor Support
d7599219 1390 /////////////////////////////
bf210566 1391 for(Int_t i=0; i<fgkvolumekind; i++) fssdsensorsupport[i] =
1392 new TGeoVolume*[fgkssdsensorsupportnumber];
1393 Double_t sidesupporthickness[2] = {fgkSSDSensorSideSupportThickness[0],
1394 fgkSSDSensorSideSupportThickness[1]};
1395 for(Int_t i=0; i<fgkssdsensorsupportnumber-1; i++){
1396 fssdsensorsupport[0][i] = GetSSDSensorSupport(fgkSSDSensorSideSupportLength,
1397 fgkSSDSensorSideSupportHeight[i],
1398 fgkSSDSensorSideSupportWidth,
1399 sidesupporthickness);
1400 fssdsensorsupport[1][i] = GetSSDSensorSupport(fgkSSDSensorCenterSupportLength,
1401 fgkSSDSensorCenterSupportHeight[i],
1402 fgkSSDSensorCenterSupportWidth,
1403 sidesupporthickness);
1404 }
44285dfa 1405 /////////////////////////////////////////////////////////////
bf210566 1406 // SSD Cooling Tube Support
44285dfa 1407 /////////////////////////////////////////////////////////////
bf210566 1408 Int_t edgesnumber = 16;
1409 fcoolingtubesupport = GetCoolingTubeSupport(edgesnumber);
44285dfa 1410 /////////////////////////////////////////////////////////////
bf210566 1411 // SSD Hybrid
44285dfa 1412 /////////////////////////////////////////////////////////////
bf210566 1413 TList* ssdhybridcomponentslist = GetSSDHybridParts();
1414 for(Int_t i=0; i<fgkhybridcompnumber; i++)
1415 fssdhybridcomponent[i] = (TGeoVolume*)ssdhybridcomponentslist->At(i);
44285dfa 1416 /////////////////////////////////////////////////////////////
bf210566 1417 // SSD Cooling Block System
44285dfa 1418 /////////////////////////////////////////////////////////////
bf210566 1419 fssdcoolingblocksystem = GetCoolingBlockSystem();
1420 /////////////////////////////////////////////////////////////
1421 // SSD Cooling Tube
44285dfa 1422 /////////////////////////////////////////////////////////////
bf210566 1423 TList* coolingtubelist = GetCoolingTubeList();
1424 for(Int_t i=0; i<fgkcoolingtubenumber; i++)
1425 fcoolingtube[i] = (TGeoVolume*)coolingtubelist->At(i);
44285dfa 1426 /////////////////////////////////////////////////////////////
bf210566 1427 // SSD Flex
1428 /////////////////////////////////////////////////////////////
1429 fssdstiffenerflex = GetSSDStiffenerFlex();
1430 fssdendflex = GetSSDEndFlex();
1431 ///////////////////////////////////
1432 // End Ladder Carbon Fiber Junction
1433 ///////////////////////////////////
1434 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1435 fendladdercarbonfiberjunction[i] =
1436 new TGeoVolume*[fgkendlabbercarbonfiberjunctionumber];
1437 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1438 fendladdercarbonfiberjunction[i][0] =
1439 GetCarbonFiberJunction(fgkEndLadderCarbonFiberLowerJunctionLength[i]);
1440 fendladdercarbonfiberjunction[i][1] =
1441 GetCarbonFiberJunction(fgkEndLadderCarbonFiberUpperJunctionLength[i]);
d7599219 1442 }
bf210566 1443 ///////////////////////////////////
1444 // End Ladder Mounting Block
1445 ///////////////////////////////////
1446 fendladdermountingblock = GetSSDMountingBlock();
44285dfa 1447 /////////////////////////////////////////////////////////////
bf210566 1448 // Deallocating memory
1449 /////////////////////////////////////////////////////////////
1450 delete carbonfibersupportlist;
1451 delete carbonfiberlowersupportlist;
1452 delete ssdhybridcomponentslist;
1453 /////////////////////////////////////////////////////////////
1454 fBasicObjects = kTRUE;
d7599219 1455}
1456/////////////////////////////////////////////////////////////////////////////////
bf210566 1457void AliITSv11GeometrySSD::SetSSDSensor(){
1458 ////////////////////////////////////////////////////////////////
1459 // Method generating SSD Sensors: it sets the private variables
1460 // fSSDSensor5, fSSDSensor6
1461 ////////////////////////////////////////////////////////////////
1462 Double_t ssdsensitivelength = fgkSSDSensorLength-2.*fgkSSDSensorInsensitiveLength;
1463 Double_t ssdsensitivewidth = fgkSSDSensorWidth-2.*fgkSSDSensorInsensitiveWidth;
1464 TGeoBBox* ssdsensorsensitiveshape = new TGeoBBox("SSDSensorSensitiveShape",
1465 0.5*ssdsensitivewidth,
1466 0.5*fgkSSDSensorHeight,
1467 0.5*ssdsensitivelength);
1468 TGeoVolume* ssdsensorsensitiveLay5 =
1469 new TGeoVolume(fgSDDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
1470 TGeoVolume* ssdsensorsensitiveLay6 =
1471 new TGeoVolume(fgSDDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
1472 ssdsensorsensitiveLay5->SetLineColor(fColorSilicon);
1473 ssdsensorsensitiveLay6->SetLineColor(fColorSilicon);
1474 TGeoBBox* ssdsensorinsensitiveshape[2];
1475 ssdsensorinsensitiveshape[0] = new TGeoBBox("SSDSensorInsensitiveShape1",
1476 0.5*fgkSSDSensorInsensitiveWidth,
1477 0.5*fgkSSDSensorHeight,
1478 0.5*fgkSSDSensorLength);
1479 ssdsensorinsensitiveshape[1] = new TGeoBBox("SSDSensorInsensitiveShape2",
1480 0.5*ssdsensitivewidth,
1481 0.5*fgkSSDSensorHeight,
1482 0.5*fgkSSDSensorInsensitiveWidth);
1483 const char* ssdsensorinsensitivename[2] = {"SSDSensorInsensitive1",
1484 "SSDSensorInsensitive2"};
1485 TGeoVolume* ssdsensorinsensitive[2];
1486 for(Int_t i=0; i<2; i++){ ssdsensorinsensitive[i] =
1487 new TGeoVolume(ssdsensorinsensitivename[i],ssdsensorinsensitiveshape[i],
1488 fSSDSensorMedium);
1489 ssdsensorinsensitive[i]->SetLineColor(fColorCarbonFiber);
1490 }
44285dfa 1491 /////////////////////////////////////////////////////////////
bf210566 1492 // Virtual Volume containing SSD Sensor
1493 /////////////////////////////////////////////////////////////
1494 TGeoBBox* virtualSSDSensorShape = new TGeoBBox("SSDSensorShape",
1495 0.5*fgkSSDSensorWidth,
1496 0.5*fgkSSDSensorHeight,
1497 0.5*fgkSSDSensorLength);
1498 fSSDSensor5 = new TGeoVolume("ITSsddSensor5",virtualSSDSensorShape,
1499 fSSDAir);
1500 fSSDSensor6 = new TGeoVolume("ITSsddSensor6",virtualSSDSensorShape,
1501 fSSDAir);
1502 /////////////////////////////////////////////////////////////
1503 for(Int_t i=0; i<4; i++){
1504 fSSDSensor5->AddNode(i%2==0 ? ssdsensorinsensitive[0]:
1505 ssdsensorinsensitive[1],i<2?1:2,
1506 new TGeoTranslation(
1507 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1508 * (ssdsensorsensitiveshape->GetDX()+ssdsensorinsensitiveshape[0]->GetDX()),0.,
1509 0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1510 * (ssdsensorsensitiveshape->GetDZ()+ssdsensorinsensitiveshape[1]->GetDZ())));
1511 fSSDSensor6->AddNode(i%2==0 ? ssdsensorinsensitive[0]:
1512 ssdsensorinsensitive[1],i<2?1:2,
1513 new TGeoTranslation(
1514 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1515 * (ssdsensorsensitiveshape->GetDX()+ssdsensorinsensitiveshape[0]->GetDX()),0.,
1516 0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1517 * (ssdsensorsensitiveshape->GetDZ()+ssdsensorinsensitiveshape[1]->GetDZ())));
d7599219 1518 }
bf210566 1519 fSSDSensor5->AddNode(ssdsensorsensitiveLay5,1);
1520 fSSDSensor6->AddNode(ssdsensorsensitiveLay6,1);
d7599219 1521}
bf210566 1522///////////////////////////////////////////////////////////////////////////////
1523TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
1524 /////////////////////////////////////////////////////////////
44285dfa 1525 // Method generating the Carbon Fiber Support
1526 /////////////////////////////////////////////////////////////
1527 const Int_t kvertexnumber = 4;
1528 const Int_t kshapesnumber = 2;
1529 TVector3** vertexposition[kshapesnumber];
1530 for(Int_t i=0; i<kshapesnumber; i++) vertexposition[i] = new TVector3*[kvertexnumber];
1531 Double_t carbonfibersupportxaxisEdgeproj =
d7599219 1532 fgkCarbonFiberSupportEdgeLength*TMath::Cos(fgkCarbonFiberJunctionAngle[0]
1533 * TMath::DegToRad());
44285dfa 1534 Double_t theta = TMath::ATan(fgkCarbonFiberSupportYAxisLength
d7599219 1535 / fgkCarbonFiberSupportXAxisLength);
1536 /////////////////////
1537 //Vertex Positioning
1538 ////////////////////
44285dfa 1539 vertexposition[0][0] = new TVector3();
1540 vertexposition[0][1] = new TVector3(fgkCarbonFiberSupportXAxisLength,
d7599219 1541 fgkCarbonFiberSupportYAxisLength);
44285dfa 1542 vertexposition[0][2] = new TVector3(carbonfibersupportxaxisEdgeproj,
1543 carbonfibersupportxaxisEdgeproj
1544 * TMath::Tan(theta));
1545 vertexposition[0][3] = new TVector3(fgkCarbonFiberSupportXAxisLength
1546 - carbonfibersupportxaxisEdgeproj,
d7599219 1547 fgkCarbonFiberSupportYAxisLength
44285dfa 1548 - vertexposition[0][2]->Y());
d7599219 1549 ////////////////////////////////////////////////////
1550 //Setting the parameters for Isometry Transformation
1551 ////////////////////////////////////////////////////
44285dfa 1552 Double_t symmetryplaneposition = (fgkCarbonFiberSupportYAxisLength
d7599219 1553 + fgkCarbonFiberSupportTopEdgeDist[0]
1554 + fgkCarbonFiberSupportWidth);
1555 Double_t* param = new Double_t[4];
44285dfa 1556 param[0] = 0., param[1] = 1., param[2] = 0., param[3] = -symmetryplaneposition;
1557 for(Int_t j=0; j<kvertexnumber; j++) vertexposition[1][j] =
1558 new TVector3((GetReflection(vertexposition[0][j],param))->X(),
1559 (GetReflection(vertexposition[0][j],param))->Y());
1560 char* carbonfibersupportshapename[kshapesnumber] =
d7599219 1561 {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
bf210566 1562 char* carbonfibersupportname[kshapesnumber] =
1563 {"CarbonFiberSupport1","CarbonFiberSupport2"};
44285dfa 1564 TGeoArb8* carbonfibersupportshape[kshapesnumber];
bf210566 1565 TGeoVolume* carbonfibersupport[kshapesnumber];
1566 TList* carbonfibersupportlist = new TList();
44285dfa 1567 Double_t width[2] = {fgkCarbonFiberSupportWidth,fgkCarbonFiberSupportWidth};
1568 Double_t carbonfibersupportheight =
1569 carbonfibersupportxaxisEdgeproj*TMath::Tan(fgkCarbonFiberJunctionAngle[0]
d7599219 1570 *TMath::DegToRad());
bf210566 1571 for(Int_t i = 0; i< kshapesnumber; i++){
1572 carbonfibersupportshape[i] =
44285dfa 1573 GetArbShape(vertexposition[i],width,carbonfibersupportheight,
bf210566 1574 carbonfibersupportshapename[i],i==0 ? 1: -1);
1575 carbonfibersupport[i] = new TGeoVolume(carbonfibersupportname[i],
1576 carbonfibersupportshape[i],fSSDCarbonFiberMedium);
1577 carbonfibersupport[i]->SetLineColor(fColorCarbonFiber);
1578 carbonfibersupportlist->Add(carbonfibersupport[i]);
1579 }
1580 /////////////////////////////////////////////////////////////
1581 // Deallocating memory
1582 /////////////////////////////////////////////////////////////
1583 for(Int_t i=0; i< kshapesnumber; i++){
1584 for(Int_t j=0; j< kvertexnumber; j++)
1585 delete vertexposition[i][j];
1586 delete [] vertexposition[i];
1587 }
1588 delete [] param;
1589 /////////////////////////////////////////////////////////////
1590 return carbonfibersupportlist;
1591}
1592/////////////////////////////////////////////////////////////////////////////////
1593TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){
1594 /////////////////////////////////////////////////////////////
1595 // Method generating SSD Carbon Fiber Junction
1596 /////////////////////////////////////////////////////////////
1597 const Int_t kvertexnumber = 6;
1598 TGeoXtru* carbonfiberjunctionshape = new TGeoXtru(2);
1599 Double_t reflectionparam[3] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0]
1600 * TMath::DegToRad()),-1.,0.};
1601 TVector3* vertex[kvertexnumber];
1602 vertex[0] = new TVector3();
1603 vertex[3] = new TVector3(fgkCarbonFiberJunctionEdge[0]
1604 * TMath::Cos(fgkCarbonFiberJunctionAngle[0]
1605 * TMath::DegToRad()),
1606 fgkCarbonFiberJunctionEdge[0]
1607 * TMath::Sin(fgkCarbonFiberJunctionAngle[0]
1608 * TMath::DegToRad()));
1609 vertex[4] = new TVector3(fgkCarbonFiberJunctionLength,
1610 fgkCarbonFiberJunctionEdge[1]);
1611 vertex[5] = new TVector3(fgkCarbonFiberJunctionLength);
1612 vertex[1] = GetReflection(vertex[5],reflectionparam);
1613 vertex[2] = GetReflection(vertex[4],reflectionparam);
1614 Double_t xvertexpoints[6], yvertexpoints[6];
1615 for(Int_t i=0; i<kvertexnumber; i++)
1616 xvertexpoints[i] = vertex[i]->X(), yvertexpoints[i] = vertex[i]->Y();
1617 carbonfiberjunctionshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
1618 carbonfiberjunctionshape->DefineSection(0,-0.5*width);
1619 carbonfiberjunctionshape->DefineSection(1,0.5*width);
1620 TGeoVolume* carbonfiberjunction = new TGeoVolume("CarbonFiberJunction",
1621 carbonfiberjunctionshape,fSSDCarbonFiberMedium);
1622 carbonfiberjunction->SetLineColor(fColorCarbonFiber);
1623 /////////////////////////////////////////////////////////////
1624 // Deallocating memory
1625 /////////////////////////////////////////////////////////////
1626 for (Int_t i=0; i<kvertexnumber; i++) delete vertex[i];
1627 /////////////////////////////////////////////////////////////
1628 return carbonfiberjunction;
d7599219 1629}
1630////////////////////////////////////////////////////////////////////////////////
bf210566 1631TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){
44285dfa 1632 /////////////////////////////////////////////////////////////
1633 // Method generating the Carbon Fiber Lower Support
1634 /////////////////////////////////////////////////////////////
1635 const Int_t kvertexnumber = 4;
1636 const Int_t kshapesnumber = 2;
1637 Double_t width[2] = {fgkCarbonFiberLowerSupportWidth,
d7599219 1638 fgkCarbonFiberLowerSupportWidth};
44285dfa 1639 TVector3** vertexposition[kshapesnumber];
1640 for(Int_t i = 0; i<kshapesnumber; i++) vertexposition[i] =
1641 new TVector3*[kvertexnumber];
d7599219 1642 //First Shape Vertex Positioning
44285dfa 1643 vertexposition[0][0] = new TVector3(fgkCarbonFiberLowerSupportLowerLenght);
1644 vertexposition[0][1] = new TVector3(fgkCarbonFiberTriangleLength
d7599219 1645 - fgkCarbonFiberLowerSupportLowerLenght);
44285dfa 1646 vertexposition[0][2] = new TVector3();
1647 vertexposition[0][3] = new TVector3(fgkCarbonFiberTriangleLength);
d7599219 1648 //Second Shape Vertex Positioning
44285dfa 1649 Double_t theta = TMath::ATan((fgkCarbonFiberLowerSupportVolumePosition[1]
d7599219 1650 - fgkCarbonFiberLowerSupportVolumePosition[0])
1651 / fgkCarbonFiberTriangleLength);
44285dfa 1652 vertexposition[1][0] = new TVector3(vertexposition[0][0]->X(),
1653 vertexposition[0][0]->X()*TMath::Tan(theta)
d7599219 1654 + fgkCarbonFiberLowerSupportVolumePosition[0]);
44285dfa 1655 vertexposition[1][1] = new TVector3(vertexposition[0][1]->X(),
1656 vertexposition[0][1]->X()*TMath::Tan(theta)
d7599219 1657 + fgkCarbonFiberLowerSupportVolumePosition[0]);
44285dfa 1658 vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
1659 vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
d7599219 1660 fgkCarbonFiberLowerSupportVolumePosition[1]);
bf210566 1661 char* carbonfiberlowersupportshapename[kshapesnumber] =
d7599219 1662 {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
bf210566 1663 char* carbonfiberlowersupportname[kshapesnumber] =
1664 {"CarbonFiberLowerSupport1","CarbonFiberLowerSupport2"};
44285dfa 1665 TGeoArb8* carbonfiberlowersupportshape[kshapesnumber];
bf210566 1666 TGeoVolume* carbonfiberlowersupport[kshapesnumber];
1667 TList* carbonfiberlowersupportlist = new TList();
1668 for(Int_t i = 0; i< kshapesnumber; i++){
1669 carbonfiberlowersupportshape[i] =
44285dfa 1670 GetArbShape(vertexposition[i],width,
d7599219 1671 fgkCarbonFiberLowerSupportHeight,
bf210566 1672 carbonfiberlowersupportshapename[i]);
1673 carbonfiberlowersupport[i] = new TGeoVolume(carbonfiberlowersupportname[i],
1674 carbonfiberlowersupportshape[i],fSSDCarbonFiberMedium);
1675 carbonfiberlowersupport[i]->SetLineColor(fColorCarbonFiber);
1676 carbonfiberlowersupportlist->Add(carbonfiberlowersupport[i]);
1677 }
1678 /////////////////////////////////////////////////////////////
1679 // Deallocating memory
1680 /////////////////////////////////////////////////////////////
1681 for(Int_t i=0; i< kshapesnumber; i++){
1682 for(Int_t j=0; j< kvertexnumber; j++)
1683 delete vertexposition[i][j];
1684 delete [] vertexposition[i];
1685 }
1686 /////////////////////////////////////////////////////////////
1687 return carbonfiberlowersupportlist;
d7599219 1688}
bf210566 1689///////////////////////////////////////////////////////////////////////////////
1690TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t height,
1691 Double_t width, Double_t* thickness)const{
44285dfa 1692 /////////////////////////////////////////////////////////////
bf210566 1693 // Method generating the Sensor Support
44285dfa 1694 /////////////////////////////////////////////////////////////
bf210566 1695 const Int_t kvertexnumber = 6;
1696 TGeoXtru* ssdsensorsupportshape = new TGeoXtru(2);
1697 TVector3* vertexposition[kvertexnumber];
1698 vertexposition[0] = new TVector3();
1699 vertexposition[1] = new TVector3(0.0,length);
1700 vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y());
1701 vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0]);
1702 vertexposition[4] = new TVector3(height,vertexposition[3]->Y());
1703 vertexposition[5] = new TVector3(vertexposition[4]->X());
1704 Double_t xvertexpoints[6], yvertexpoints[6];
1705 for(Int_t i=0; i<kvertexnumber; i++)
1706 xvertexpoints[i] = vertexposition[i]->X(),
1707 yvertexpoints[i] = vertexposition[i]->Y();
1708 ssdsensorsupportshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
1709 ssdsensorsupportshape->DefineSection(0,-0.5*width);
1710 ssdsensorsupportshape->DefineSection(1,0.5*width);
1711 TGeoVolume* ssdsensorsupport = new TGeoVolume("SSDSensorSupport",
1712 ssdsensorsupportshape,fSSDSensorSupportMedium);
1713 /////////////////////////////////////////////////////////////
1714 // Deallocating memory
1715 /////////////////////////////////////////////////////////////
1716 for (Int_t i=0; i<kvertexnumber; i++)
1717 delete vertexposition[i];
1718 /////////////////////////////////////////////////////////////
1719 return ssdsensorsupport;
d7599219 1720}
1721////////////////////////////////////////////////////////////////////////////////
bf210566 1722TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
44285dfa 1723 /////////////////////////////////////////////////////////////
1724 // Method generating the Cooling Tube Support
bf210566 1725 /////////////////////////////////////////////////////////////
1726 if(nedges%2!=0) nedges--;
1727 const Int_t kvertexnumber = nedges+5;
44285dfa 1728 Double_t phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
d7599219 1729 / fgkCoolingTubeSupportRmax)*TMath::RadToDeg();
bf210566 1730 Double_t angle = 90.+phi;
1731 Double_t psi = 90.-phi;
1732 ///////////////////////////////////////
1733 // Vertex Positioning for TGeoXTru
1734 ///////////////////////////////////////
1735 TVector3** vertexposition = new TVector3*[kvertexnumber];
1736 vertexposition[0] = new TVector3(fgkCoolingTubeSupportRmin*CosD(angle),
1737 fgkCoolingTubeSupportRmin*SinD(angle));
1738 vertexposition[1] = new TVector3(fgkCoolingTubeSupportRmax*CosD(angle),
1739 fgkCoolingTubeSupportRmax*SinD(angle));
44285dfa 1740 vertexposition[2] = new TVector3(vertexposition[1]->X(),
bf210566 1741 fgkCoolingTubeSupportRmax);
1742 vertexposition[3] = new TVector3(-vertexposition[1]->X(),
1743 fgkCoolingTubeSupportRmax);
1744 vertexposition[4] = new TVector3(-vertexposition[1]->X(),
1745 vertexposition[1]->Y());
1746 for(Int_t i=0; i<nedges; i++)
1747 vertexposition[i+5] =
1748 new TVector3(fgkCoolingTubeSupportRmin*CosD(psi+i*(2.*phi/nedges)),
1749 fgkCoolingTubeSupportRmin*SinD(psi+i*(2.*phi/nedges)));
1750 ///////////////////////////////////////////////////////////////////////
1751 // TGeoXTru Volume definition for Cooling Tube Support Arc Part
1752 ///////////////////////////////////////////////////////////////////////
1753 TGeoXtru* coolingtubesupportarcshape = new TGeoXtru(2);
1754 Double_t* xvertexpoints = new Double_t[kvertexnumber];
1755 Double_t* yvertexpoints = new Double_t[kvertexnumber];
1756 for(Int_t i=0; i<kvertexnumber; i++){
1757 xvertexpoints[i] = vertexposition[i]->X();
1758 yvertexpoints[i] = vertexposition[i]->Y();
1759 }
1760 coolingtubesupportarcshape->DefinePolygon(kvertexnumber,xvertexpoints,
1761 yvertexpoints);
1762 coolingtubesupportarcshape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
1763 coolingtubesupportarcshape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
1764 TGeoVolume* coolingtubesupportarc = new TGeoVolume("CoolingTubeSupportArc",
1765 coolingtubesupportarcshape,
1766 fSSDTubeHolderMedium);
1767 coolingtubesupportarc->SetLineColor(fColorG10);
1768 //////////////////////////////////////////////////////////////////////////
1769 // TGeoTubeSeg Volume definition for Cooling Tube Support TGeoTubeSeg Part
1770 //////////////////////////////////////////////////////////////////////////
1771 TGeoTubeSeg* coolingtubesupportsegshape =
1772 new TGeoTubeSeg(fgkCoolingTubeSupportRmin,
1773 fgkCoolingTubeSupportRmax,
1774 0.5*fgkCoolingTubeSupportWidth,
1775 phi,360-phi);
1776 TGeoVolume* coolingtubesupportseg = new TGeoVolume("CoolingTubeSupportSeg",
1777 coolingtubesupportsegshape,
1778 fSSDTubeHolderMedium);
1779 coolingtubesupportseg->SetLineColor(fColorG10);
1780 //////////////////////////////////////////////////////////////////////////
1781 // TGeoBBox Volume definition for Cooling Tube Support Box Part
1782 //////////////////////////////////////////////////////////////////////////
44285dfa 1783 Double_t* boxorigin = new Double_t[3];
bf210566 1784 Double_t boxlength = fgkCoolingTubeSupportLength-2.*fgkCoolingTubeSupportRmax;
1785 boxorigin[0] = fgkCoolingTubeSupportRmax+0.5*boxlength, boxorigin[1] = boxorigin[2] = 0.;
1786 TGeoBBox* coolingtubesupportboxshape = new TGeoBBox(0.5*boxlength,
1787 0.5*fgkCoolingTubeSupportHeight,
1788 0.5*fgkCoolingTubeSupportWidth,boxorigin);
1789 TGeoVolume* coolingtubesupportbox = new TGeoVolume("CoolingTubeSupportBox",
1790 coolingtubesupportboxshape,fSSDTubeHolderMedium);
1791 coolingtubesupportbox->SetLineColor(fColorG10);
1792 //////////////////////////////////////////////////////////////////////////
1793 // Cooling Tube for Cooling Tube Support
1794 //////////////////////////////////////////////////////////////////////////
1795 TGeoXtru* coolingtubearcshape[2];
1796 coolingtubearcshape[0] = new TGeoXtru(2);
1797 Double_t* xvert = new Double_t[nedges+2];
1798 Double_t* yvert = new Double_t[nedges+2];
1799 Double_t ratio = fgkCoolingTubeRmin/fgkCoolingTubeSupportRmin;
1800 ////////////////////////////////////////
1801 // Positioning the vertices for TGeoXTru
1802 ////////////////////////////////////////
1803 xvert[0] = 0., yvert[0] = 0.;
1804 xvert[1] = vertexposition[0]->X()*ratio, yvert[1] = vertexposition[0]->Y()*ratio;
1805 for(Int_t i=0; i< nedges; i++)
1806 xvert[i+2] = vertexposition[kvertexnumber-i-1]->X()*ratio,
1807 yvert[i+2] = vertexposition[kvertexnumber-i-1]->Y()*ratio;
1808 ////////////////////////////////////////
1809 // Defining TGeoXTru PolyGone
1810 ////////////////////////////////////////
1811 coolingtubearcshape[0]->DefinePolygon(nedges+2,xvert,yvert);
1812 coolingtubearcshape[0]->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
1813 coolingtubearcshape[0]->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
1814 coolingtubearcshape[1] = GetArcShape(2.*phi,fgkCoolingTubeRmin,
1815 fgkCoolingTubeRmax,nedges,fgkCoolingTubeSupportWidth);
1816 TGeoVolume* coolingtubearc[2];
1817 coolingtubearc[0] = new TGeoVolume("CoolingTubeWaterArcPart",
1818 coolingtubearcshape[0],fSSDCoolingTubeWater);
1819 coolingtubearc[1] = new TGeoVolume("CoolingTubePhynoxArcPart",
1820 coolingtubearcshape[1],fSSDCoolingTubePhynox);
1821 coolingtubearc[0]->SetLineColor(fColorWater);
1822 coolingtubearc[1]->SetLineColor(fColorPhynox);
1823 ////////////////////////////////////////////
1824 // Defining TGeoTubeSeg Part of Cooling Tube
1825 ////////////////////////////////////////////
1826 TGeoTubeSeg* coolingtubesegshape[2];
1827 coolingtubesegshape[0] = new TGeoTubeSeg(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
1828 0.5*fgkCoolingTubeSupportWidth,phi,360-phi);
1829 coolingtubesegshape[1] = new TGeoTubeSeg(0.,fgkCoolingTubeRmin,
1830 0.5*fgkCoolingTubeSupportWidth,phi,360-phi);
1831 TGeoVolume* coolingtubeseg[2];
1832 coolingtubeseg[0] = new TGeoVolume("CoolingTubePhynoxPart",
1833 coolingtubesegshape[0],fSSDCoolingTubePhynox);
1834 coolingtubeseg[1] = new TGeoVolume("CoolingTubeWaterPart",
1835 coolingtubesegshape[1],fSSDCoolingTubeWater);
1836 coolingtubeseg[0]->SetLineColor(fColorPhynox);
1837 coolingtubeseg[1]->SetLineColor(fColorWater);
1838 /////////////////////////////////////////////////////////////
1839 // Virtual Volume containing Cooling Tube Support
1840 /////////////////////////////////////////////////////////////
1841 TGeoXtru* virtualCoolingTubeSupportShape = new TGeoXtru(2);
1842 const Int_t kvirtualvertexnumber = 8;
1843 TVector3* virtualvertex[kvirtualvertexnumber];
1844 ////////////////////////////////////////
1845 // Positioning the vertices for TGeoXTru
1846 ////////////////////////////////////////
1847 virtualvertex[0] = new TVector3(-fgkCoolingTubeSupportRmax,-fgkCoolingTubeSupportRmax);
1848 virtualvertex[1] = new TVector3(virtualvertex[0]->X(),-virtualvertex[0]->Y());
1849 virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y());
1850 virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight);
1851 virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y());
1852 virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y());
1853 virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y());
1854 virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y());
1855 Double_t xmothervertex[kvirtualvertexnumber], ymothervertex[kvirtualvertexnumber];
1856 for(Int_t i=0; i< kvirtualvertexnumber; i++)
1857 xmothervertex[i] = virtualvertex[i]->X(),
1858 ymothervertex[i] = virtualvertex[i]->Y();
1859 ////////////////////////////////////////
1860 // Defining TGeoXTru PolyGone
1861 ////////////////////////////////////////
1862 virtualCoolingTubeSupportShape->DefinePolygon(kvirtualvertexnumber,xmothervertex,
1863 ymothervertex);
1864 virtualCoolingTubeSupportShape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
1865 virtualCoolingTubeSupportShape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
1866 TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport",
1867 virtualCoolingTubeSupportShape,fSSDAir);
1868 ////////////////////////////////////////
1869 // Positioning Volumes in Virtual Volume
1870 ////////////////////////////////////////
1871 TGeoRotation* coolingtubesupportrot = new TGeoRotation();
1872 coolingtubesupportrot->SetAngles(-90.0,0.0,0.0);
1873 virtualcoolingtubesupport->AddNode(coolingtubesupportarc,1,coolingtubesupportrot);
1874 virtualcoolingtubesupport->AddNode(coolingtubesupportbox,1);
1875 virtualcoolingtubesupport->AddNode(coolingtubesupportseg,1);
1876 virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot);
1877 virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot);
1878 virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1);
1879 virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1);
1880 /////////////////////////////////////////////////////////////
1881 // Deallocating memory
1882 /////////////////////////////////////////////////////////////
1883 delete [] vertexposition;
1884 delete xvertexpoints;
1885 delete yvertexpoints;
1886 delete xvert;
1887 delete yvert;
1888 for(Int_t i=0; i< kvirtualvertexnumber; i++)
1889 delete virtualvertex[i];
1890 /////////////////////////////////////////////////////////////
1891 return virtualcoolingtubesupport;
d7599219 1892}
bf210566 1893/////////////////////////////////////////////////////////////////////////////////
1894TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
1895 /////////////////////////////////////////////////////////////
1896 // Method generating List containing SSD Hybrid Components
1897 /////////////////////////////////////////////////////////////
1898 TList* ssdhybridlist = new TList();
1899 const Int_t kssdstiffenernumber = 2;
1900 Double_t ssdstiffenerseparation = fgkSSDSensorLength
1901 - 2.*fgkSSDModuleStiffenerPosition[1]
1902 - fgkSSDStiffenerWidth;
1903 Double_t ssdchipcablesradius[kssdstiffenernumber];
1904 for(Int_t i=0; i<kssdstiffenernumber; i++)
1905 ssdchipcablesradius[i] = 0.25*(fgkSSDChipCablesHeight[i+2]
1906 - fgkSSDChipCablesHeight[0]
1907 - fgkSSDChipCablesHeight[1]);
1908 /////////////////////////////////////////////////////////////
1909 // Mother Volumes Containers
1910 /////////////////////////////////////////////////////////////
1911 const Int_t kmothernumber = 2;
1912 const Int_t kmothervertexnumber = 12;
1913 Double_t xmothervertex[kmothernumber][kmothervertexnumber];
1914 Double_t ymothervertex[kmothernumber][kmothervertexnumber];
1915 ///////////////////////
1916 // Setting the vertices
1917 ///////////////////////
1918 xmothervertex[0][0] = -0.5*fgkSSDStiffenerLength;
1919 xmothervertex[0][1] = xmothervertex[0][0];
1920 xmothervertex[0][2] = fgkSSDFlexLength[0]-0.5*fgkSSDStiffenerLength;
1921 xmothervertex[0][3] = xmothervertex[0][2];
1922 xmothervertex[0][4] = xmothervertex[0][0];
1923 xmothervertex[0][5] = xmothervertex[0][4];
1924 xmothervertex[0][6] = -xmothervertex[0][0];
1925 xmothervertex[0][7] = xmothervertex[0][6];
1926 xmothervertex[0][8] = -xmothervertex[0][2];
1927 xmothervertex[0][9] = xmothervertex[0][8];
1928 xmothervertex[0][10] = xmothervertex[0][7];
1929 xmothervertex[0][11] = xmothervertex[0][10];
1930 for(Int_t i=0; i<kmothervertexnumber; i++) xmothervertex[1][i] = xmothervertex[0][i];
1931 for(Int_t i = 0; i<kmothernumber; i++){
1932 ymothervertex[i][0] = -(fgkSSDChipWidth-(0.5*fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist)
1933 + ssdchipcablesradius[i]+fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2]);
1934 ymothervertex[i][1] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexWidth[0];
1935 ymothervertex[i][2] = ymothervertex[i][1];
1936 ymothervertex[i][3] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth;
1937 ymothervertex[i][4] = ymothervertex[i][3];
1938 ymothervertex[i][5] = ymothervertex[i][4]+0.5*fgkSSDStiffenerWidth-ymothervertex[i][0];
1939 ymothervertex[i][6] = ymothervertex[i][5];
1940 ymothervertex[i][7] = 0.5*fgkSSDStiffenerWidth+fgkSSDFlexWidth[0];
1941 ymothervertex[i][8] = ymothervertex[i][7];
1942 ymothervertex[i][9] = 0.5*fgkSSDStiffenerWidth;
1943 ymothervertex[i][10] = ymothervertex[i][9];
1944 ymothervertex[i][11] = ymothervertex[i][0];
1945 }
1946 TGeoXtru* ssdhybridmothershape[kmothernumber];
1947 TGeoVolume* ssdhybridmother[kmothernumber];
1948 const char* ssdhybridmothername[kmothernumber] = {"SSDHybridMother1","SSDHybridMother2"};
1949 for(Int_t i=0; i<kmothernumber; i++){
1950 ssdhybridmothershape[i] = new TGeoXtru(2);
1951 ssdhybridmothershape[i]->DefinePolygon(kmothervertexnumber,xmothervertex[i],
1952 ymothervertex[i]);
1953 ssdhybridmothershape[i]->DefineSection(0,-0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight
1954 -fgkSSDChipCablesHeight[i+2]);
1955 ssdhybridmothershape[i]->DefineSection(1, 0.5*fgkSSDStiffenerHeight);
1956 ssdhybridmother[i] = new TGeoVolume(ssdhybridmothername[i],ssdhybridmothershape[i],
1957 fSSDAir);
1958 }
1959 /////////////////////////////////////////////////////////////
1960 // SSD Stiffener
1961 /////////////////////////////////////////////////////////////
1962 TGeoBBox* ssdstiffenershape = new TGeoBBox("SSDStiffenerShape",
1963 0.5*fgkSSDStiffenerLength,
1964 0.5*fgkSSDStiffenerWidth,
1965 0.5*fgkSSDStiffenerHeight);
1966 TGeoVolume* ssdstiffener = new TGeoVolume("SSDStiffener",ssdstiffenershape,
1967 fSSDStiffenerMedium);
1968 ssdstiffener->SetLineColor(fColorStiffener);
1969 TGeoTranslation* ssdstiffenertrans[kssdstiffenernumber];
1970 for(Int_t i=0; i<kssdstiffenernumber; i++)
1971 ssdstiffenertrans[i] = new TGeoTranslation(0.,i*ssdstiffenerseparation,0.);
1972 /////////////////////////////////////////////////////////////
1973 // SSD Chip System
1974 /////////////////////////////////////////////////////////////
1975 TList* ssdchipsystemlist = GetSSDChipSystem();
1976 Double_t ssdchipseparation = fgkSSDSensorLength
1977 - 2.*fgkSSDModuleStiffenerPosition[1]
1978 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
1979 - 0.5*fgkSSDChipWidth);
1980 Double_t ssdchipsystemlength = (fgkSSDChipNumber-1)*(fgkSSDChipLength
1981 + fgkSSDChipSeparationLength)+fgkSSDChipCablesLength[1];
1982 TGeoTranslation* ssdchipsystemtrans = new TGeoTranslation(0.5*fgkSSDChipCablesLength[1]
1983 - 0.5*ssdchipsystemlength,
1984 0.5*(ssdstiffenerseparation-ssdchipseparation),
1985 - 0.5*(fgkSSDChipHeight+fgkSSDStiffenerHeight));
1986////////////////////////////
1987// Capacitor 0603-2200 nF
1988///////////////////////////
1989 const Int_t knapacitor0603number = 5;
1990 TGeoBBox* capacitor0603shape = new TGeoBBox("Capacitor0603Shape",
1991 0.5*fgkSSDCapacitor0603Length,
1992 0.5*fgkSSDCapacitor0603Width,
1993 0.5*fgkSSDCapacitor0603Height);
1994 TGeoVolume* capacitor0603 = new TGeoVolume("Capacitor0603",capacitor0603shape,
1995 fSSDStiffener0603CapacitorMedium);
1996 capacitor0603->SetLineColor(fColorAl);
1997 for(Int_t i=0; i<kmothernumber; i++){
1998 for(Int_t j=0; j<kssdstiffenernumber; j++){
1999 ssdhybridmother[i]->AddNode(ssdstiffener,j+1,ssdstiffenertrans[j]);
2000 for(Int_t k=1; k<knapacitor0603number+1; k++){
2001 ssdhybridmother[i]->AddNode(capacitor0603,knapacitor0603number*j+k,
2002 new TGeoTranslation((k-3.)/6*fgkSSDStiffenerLength,
2003 j*ssdstiffenerseparation
2004 + 0.5*((j==0? 1:-1)*fgkSSDStiffenerWidth
2005 + (j==0? -1:+1)*fgkSSDCapacitor0603Width),
2006 - 0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height)));
2007 }
2008 }
2009 ssdhybridmother[i]->AddNode((TGeoVolume*)ssdchipsystemlist->At(i),i+1,ssdchipsystemtrans);
2010 ssdhybridlist->Add(ssdhybridmother[i]);
2011 }
2012/////////////////////////////////////////////////////////////
2013// Mother Volume Containing Capacitor Part
2014/////////////////////////////////////////////////////////////
2015 const Int_t kcapacitormothernumber = 8;
2016 Double_t xcapacitorvertex[kcapacitormothernumber];
2017 Double_t ycapacitorvertex[kcapacitormothernumber];
2018 ///////////////////////
2019 // Setting the vertices
2020 ///////////////////////
2021 xcapacitorvertex[0] = -fgkSSDConnectorPosition[0]+ssdstiffenershape->GetDX();
2022 xcapacitorvertex[1] = xcapacitorvertex[0];
2023 xcapacitorvertex[2] = 0.5*fgkSSDFlexHoleWidth;
2024 xcapacitorvertex[3] = xcapacitorvertex[2];
2025 xcapacitorvertex[4] = xcapacitorvertex[0];
2026 xcapacitorvertex[5] = xcapacitorvertex[0];
2027 xcapacitorvertex[6] = -xcapacitorvertex[0];
2028 xcapacitorvertex[7] = xcapacitorvertex[6];
2029 ycapacitorvertex[0] = -0.5*fgkSSDStiffenerWidth;
2030 ycapacitorvertex[1] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexHoleLength;
2031 ycapacitorvertex[2] = ycapacitorvertex[1];
2032 ycapacitorvertex[3] = ycapacitorvertex[2]+fgkSSDFlexHoleLength;
2033 ycapacitorvertex[4] = ycapacitorvertex[3];
2034 ycapacitorvertex[5] = ycapacitorvertex[4]+fgkSSDStiffenerWidth;
2035 ycapacitorvertex[6] = ycapacitorvertex[5];
2036 ycapacitorvertex[7] = ycapacitorvertex[0];
2037 TGeoXtru* ssdhybridcapacitormothershape = new TGeoXtru(2);
2038 ssdhybridcapacitormothershape->DefinePolygon(kcapacitormothernumber,xcapacitorvertex,
2039 ycapacitorvertex);
2040 ssdhybridcapacitormothershape->DefineSection(0,0.5*fgkSSDStiffenerHeight);
2041 ssdhybridcapacitormothershape->DefineSection(1, 0.5*fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height);
2042 TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape,
2043 fSSDAir);
2044////////////////////////////
2045// Connector
2046///////////////////////////
2047 const Int_t kssdconnectornumber = 2;
2048 TGeoBBox* ssdconnectorshape[kssdconnectornumber];
2049 Double_t ssdAlconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorAlHeight)};
2050 Double_t ssdNiconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorNiHeight)
2051 + fgkSSDConnectorAlHeight};
2052 const char* ssdconnectorname[kssdconnectornumber] = {"SSDConnectorAl","SSDConnectorNi"};
2053 TGeoVolume* ssdconnector[kssdconnectornumber];
2054 for(Int_t i=0; i<kssdconnectornumber; i++){
2055 ssdconnectorshape[i] = new TGeoBBox(0.5*fgkSSDConnectorLength,
2056 0.5*fgkSSDConnectorWidth,
2057 0.5*((1-i)*fgkSSDConnectorAlHeight
2058 + i*fgkSSDConnectorNiHeight),
2059 i==0? ssdAlconnectororigin : ssdNiconnectororigin);
2060 ssdconnector[i] = new TGeoVolume(ssdconnectorname[i],ssdconnectorshape[i],
2061 i==0 ? fSSDAlTraceFlexMedium
2062 : fSSDStiffenerConnectorMedium);
2063 ssdconnector[i]->SetLineColor(i==0 ? fColorAl : fColorPhynox);
2064 }
2065 TGeoTranslation* ssdconnectortrans[2*kssdconnectornumber];
2066 ssdconnectortrans[0] = new TGeoTranslation(-ssdstiffenershape->GetDX()
2067 + fgkSSDConnectorPosition[0]
2068 - fgkSSDConnectorSeparation
2069 - 1.5*fgkSSDConnectorLength,
2070 ssdstiffenerseparation+ssdstiffenershape->GetDY()
2071 - fgkSSDConnectorPosition[1]
2072 - ssdconnectorshape[0]->GetDY(),0.0);
2073 ssdconnectortrans[1] = new TGeoTranslation(
2074 - ssdstiffenershape->GetDX()
2075 + fgkSSDConnectorPosition[0]
2076 - 0.5*fgkSSDConnectorLength,
2077 ssdstiffenerseparation+ssdstiffenershape->GetDY()
2078 - fgkSSDConnectorPosition[1]
2079 - ssdconnectorshape[0]->GetDY(),0.0);
2080 ssdconnectortrans[2] = new TGeoTranslation(+ssdstiffenershape->GetDX()
2081 - fgkSSDConnectorPosition[0]
2082 + fgkSSDConnectorSeparation
2083 + 1.5*fgkSSDConnectorLength,
2084 -(ssdstiffenershape->GetDY()
2085 - fgkSSDConnectorPosition[1]
2086 - ssdconnectorshape[0]->GetDY()),0.0);
2087 ssdconnectortrans[3] = new TGeoTranslation(+ssdstiffenershape->GetDX()
2088 - fgkSSDConnectorPosition[0]
2089 + 0.5*fgkSSDConnectorLength,
2090 -(ssdstiffenershape->GetDY()
2091 - fgkSSDConnectorPosition[1]
2092 - ssdconnectorshape[0]->GetDY()),0.0);
2093 for(Int_t i=0; i<2*kssdconnectornumber; i++)
2094 for(Int_t j=0; j<kssdconnectornumber; j++)
2095 ssdhybridcapacitormother->AddNode(ssdconnector[j],i+1,ssdconnectortrans[i]);
2096////////////////////////////
2097// Capacitor 1812-330 nF
2098///////////////////////////
2099 Double_t ssdcapacitor1812origin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)};
2100 TGeoBBox* capacitor1812shape = new TGeoBBox("Capacitor1812Shape",
2101 0.5*fgkSSDCapacitor1812Length,
2102 0.5*fgkSSDCapacitor1812Width,
2103 0.5*fgkSSDCapacitor1812Height,
2104 ssdcapacitor1812origin);
2105 TGeoVolume* capacitor1812 = new TGeoVolume("Capacitor1812",capacitor1812shape,
2106 fSSDStiffener1812CapacitorMedium);
2107 capacitor1812->SetLineColor(fColorAl);
2108 TGeoTranslation* capacitor1812trans = new TGeoTranslation(0.0,
2109 0.5*fgkSSDStiffenerWidth+ssdstiffenerseparation
2110 - capacitor1812shape->GetDY()-fgkSSDConnectorPosition[1],0.0);
2111 ssdhybridcapacitormother->AddNode(capacitor1812,1,capacitor1812trans);
2112////////////////////////////
2113//Hybrid Wire
2114////////////////////////////
2115 Double_t wirex = 2.*(fgkSSDConnectorPosition[0]-0.5*fgkSSDStiffenerLength
2116 - 0.5*fgkSSDConnectorLength)-fgkSSDConnectorLength
2117 - fgkSSDConnectorSeparation;
2118 Double_t wirey = ssdstiffenerseparation+fgkSSDStiffenerWidth
2119 - 2.*fgkSSDConnectorPosition[1]-fgkSSDConnectorWidth;
2120 Double_t ssdwireradius = TMath::Sqrt(TMath::Power(wirex,2.)
2121 + TMath::Power(wirey,2));
2122 Double_t wireangle = TMath::ATan(wirex/wirey);
2123 TGeoTube *hybridwireshape = new TGeoTube("HybridWireShape", 0.,
2124 fgkSSDWireRadius, 0.5*ssdwireradius);
2125 TGeoVolume* hybridwire = new TGeoVolume("HybridWire",hybridwireshape,
2126 fSSDStiffenerHybridWireMedium);
2127 hybridwire->SetLineColor(fColorPhynox);
2128 TGeoCombiTrans* hybridwirecombitrans[2];
2129 hybridwirecombitrans[0] = new TGeoCombiTrans("HybridWireCombiTrans1",
2130 0.5*fgkSSDStiffenerLength-fgkSSDConnectorPosition[0]
2131 + 1.5*fgkSSDConnectorLength+fgkSSDConnectorSeparation,
2132 0.5*ssdwireradius-0.5*fgkSSDStiffenerWidth
2133 + fgkSSDConnectorPosition[1]+0.5*fgkSSDConnectorWidth,
2134 ssdstiffenershape->GetDZ()
2135 + fgkSSDWireRadius+fgkSSDConnectorAlHeight+fgkSSDConnectorNiHeight,
2136 new TGeoRotation("HybridWireRot1",0.,90.,0.));
2137 hybridwirecombitrans[1] = new TGeoCombiTrans("HybridWireCombiTrans2",
2138 0.0,
2139 - 0.5*fgkSSDConnectorWidth+fgkSSDWireRadius,
2140 0.0,
2141 new TGeoRotation("HybridWireRot2",
2142 - wireangle*TMath::RadToDeg(),0.,0.));
2143 TGeoHMatrix* hybridwirematrix = new TGeoHMatrix();
2144 hybridwirematrix->MultiplyLeft(hybridwirecombitrans[0]);
2145 hybridwirematrix->MultiplyLeft(hybridwirecombitrans[1]);
2146 ssdhybridcapacitormother->AddNode(hybridwire,1,hybridwirematrix);
2147 ssdhybridlist->Add(ssdhybridcapacitormother);
2148 /////////////////////////////////////////////////////////////
2149 // Deallocating memory
2150 /////////////////////////////////////////////////////////////
2151 delete hybridwirecombitrans[0];
2152 delete hybridwirecombitrans[1];
2153 delete ssdchipsystemlist;
2154 return ssdhybridlist;
44285dfa 2155 /////////////////////////////////////////////////////////////
d7599219 2156}
bf210566 2157///////////////////////////////////////////////////////////////////////////////
2158TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
2159 /////////////////////////////////////////////////////////////
2160 // SSD Cooling Block System
2161 /////////////////////////////////////////////////////////////
2162 // SSD Cooling Block and Cooling Tube Transformations
2163 /////////////////////////////////////////////////////////////
2164 TGeoRotation* localcoolingblockrot = new TGeoRotation();
2165 localcoolingblockrot->SetAngles(0.,90.,0.);
2166 TGeoCombiTrans* localcoolingblockmatrix =
2167 new TGeoCombiTrans(0.,0.5*fgkSSDCoolingBlockWidth,0.,localcoolingblockrot);
2168 TGeoTranslation* localcoolingblocktrans;
2169 TVector3* coolingblocktransvector;
2170 coolingblocktransvector = new TVector3(fgkSSDModuleSensorSupportDistance
2171 + fgkSSDCoolingBlockLength,
2172 fgkSSDSensorLength
2173 - 2.*fgkSSDModuleStiffenerPosition[1]
2174 - fgkSSDCoolingBlockWidth);
2175 const Int_t kcoolingblocktransnumber = 2;
2176 const Int_t kcoolingblocknumber = 4;
2177 TGeoHMatrix* coolingblockmatrix[kcoolingblocknumber];
2178 TGeoHMatrix* coolingtubematrix[kcoolingblocknumber];
2179 TGeoRotation* localcoolingtuberot = new TGeoRotation();
2180 localcoolingtuberot->SetAngles(0.0,90.0,0.0);
2181 TGeoTranslation* localcoolingtubetrans = new TGeoTranslation();
2182 localcoolingtubetrans->SetTranslation(0.5*fgkSSDCoolingBlockLength,
2183 0.5*fgkSSDCoolingBlockWidth,
2184 fgkSSDCoolingBlockHoleCenter);
2185 TGeoCombiTrans* localcoolingtubematrix = new TGeoCombiTrans(*localcoolingtubetrans,
2186 *localcoolingtuberot);
2187 Double_t coolingtubedistance = fgkCoolingTubeSupportRmax-fgkCoolingTubeSupportRmin;
2188 for(Int_t i=0; i<kcoolingblocktransnumber; i++){
2189 for(Int_t j=0; j<kcoolingblocktransnumber; j++){
2190 localcoolingblocktrans=
2191 new TGeoTranslation(i*coolingblocktransvector->X()+2*coolingtubedistance,
2192 j*coolingblocktransvector->Y(),
2193 - 0.5*(fgkSSDCoolingBlockHoleCenter
2194 + fgkCoolingTubeRmax));
2195 coolingblockmatrix[2*i+j] = new TGeoHMatrix((*localcoolingblocktrans)
2196 *(*localcoolingblockmatrix));
2197 coolingtubematrix[2*i+j] = new TGeoHMatrix((*localcoolingblocktrans)
2198 *(*localcoolingtubematrix));
2199 }
2200 }
44285dfa 2201 /////////////////////////////////////////////////////////////
bf210566 2202 // Virtual Volume containing CoolingBlock System
44285dfa 2203 /////////////////////////////////////////////////////////////
bf210566 2204 TGeoXtru* coolingsystemothershape = new TGeoXtru(2);
2205 const Int_t kmothervertexnumber = 16;
2206 Double_t xmothervertex[kmothervertexnumber];
2207 Double_t ymothervertex[kmothervertexnumber];
2208 ///////////////////////
2209 // Setting the vertices
2210 ///////////////////////fgkCoolingTubeSupportRmax
2211 xmothervertex[0] = 0.0,ymothervertex[0] = 0.0;
2212 xmothervertex[1] = xmothervertex[0], ymothervertex[1] = coolingblocktransvector->Y()
2213 + fgkSSDCoolingBlockWidth;
2214 xmothervertex[2] = coolingblocktransvector->X()
2215 + fgkSSDCoolingBlockLength
2216 + 4*coolingtubedistance;
2217 ymothervertex[2] = ymothervertex[1];
2218 xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0];
2219 xmothervertex[4] = xmothervertex[3]-2.*coolingtubedistance-fgkSSDCoolingBlockLength;
2220 ymothervertex[4] = ymothervertex[0];
2221 xmothervertex[5] = xmothervertex[4], ymothervertex[5] = fgkSSDCoolingBlockWidth;
2222 xmothervertex[6] = xmothervertex[3]-coolingtubedistance;
2223 ymothervertex[6] = ymothervertex[5];
2224 xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2]
2225 - fgkSSDCoolingBlockWidth;
2226 xmothervertex[8] = xmothervertex[5], ymothervertex[8] = ymothervertex[7];
2227 xmothervertex[9] = xmothervertex[8], ymothervertex[9] = ymothervertex[2]
2228 - coolingtubedistance;
2229 xmothervertex[10] = fgkSSDCoolingBlockLength+2.*coolingtubedistance;
2230 ymothervertex[10] = ymothervertex[9];
2231 xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[8];
2232 xmothervertex[12] = coolingtubedistance, ymothervertex[12] = ymothervertex[11];
2233 xmothervertex[13] = xmothervertex[12], ymothervertex[13] = fgkSSDCoolingBlockWidth;
2234 xmothervertex[14] = 2.*coolingtubedistance+fgkSSDCoolingBlockLength;
2235 ymothervertex[14] = ymothervertex[13];
2236 xmothervertex[15] = xmothervertex[14], ymothervertex[15] = ymothervertex[0];
2237 //////////////////////////////////////////////////////////
2238 coolingsystemothershape->DefinePolygon(kmothervertexnumber,
2239 xmothervertex,ymothervertex);
2240 coolingsystemothershape->DefineSection(0,-0.5*(fgkSSDCoolingBlockHoleCenter
2241 + fgkCoolingTubeRmax));
2242 coolingsystemothershape->DefineSection(1, 0.5*(fgkSSDCoolingBlockHoleCenter
2243 + fgkCoolingTubeRmax));
2244 TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem",
2245 coolingsystemothershape,fSSDAir);
2246 /////////////////////////////////////////////////////////////
2247 // SSD Cooling Tube Part
2248 /////////////////////////////////////////////////////////////
2249 TGeoTube* coolingtubeshape[fgkcoolingtubenumber];
2250 coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2251 0.5*fgkSSDCoolingBlockWidth);
2252 coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
2253 0.5*fgkSSDCoolingBlockWidth);
2254 TGeoVolume* coolingtube[fgkcoolingtubenumber];
2255 coolingtube[0] = new TGeoVolume("OuterCoolingTube",coolingtubeshape[0],
2256 fSSDCoolingTubePhynox);
2257 coolingtube[1] = new TGeoVolume("InnerCoolingTube",coolingtubeshape[1],
2258 fSSDCoolingTubeWater);
2259 coolingtube[0]->SetLineColor(fColorPhynox);
2260 coolingtube[1]->SetLineColor(fColorWater);
2261 TGeoVolume* ssdcoolingblock = GetSSDCoolingBlock(30);
2262 /////////////////////////////////////////////////////////////
2263 // Adding Cooling block to mother volume
2264 /////////////////////////////////////////////////////////////
2265 for(Int_t i=0; i<kcoolingblocknumber; i++){
2266 coolingsystemother->AddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]);
2267 coolingsystemother->AddNode(coolingtube[0],i+1,coolingtubematrix[i]);
2268 coolingsystemother->AddNode(coolingtube[1],i+1,coolingtubematrix[i]);
2269 }
2270 /////////////////////////////////////////////////////////////
2271 // Deallocating memory
2272 /////////////////////////////////////////////////////////////
2273 delete coolingblocktransvector;
2274 delete localcoolingblocktrans;
2275 delete localcoolingblockrot;
2276 delete localcoolingblockmatrix;
2277 delete localcoolingtubetrans;
2278 delete localcoolingtuberot;
2279 /////////////////////////////////////////////////////////////
2280 // Checking overlaps
2281 /////////////////////////////////////////////////////////////
2282 //coolingsystemother->CheckOverlaps(0.01);
2283 /////////////////////////////////////////////////////////////
2284 return coolingsystemother;
d7599219 2285}
bf210566 2286/////////////////////////////////////////////////////////////////////////////////
2287TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
44285dfa 2288 /////////////////////////////////////////////////////////////
bf210566 2289 // SSD Flex
44285dfa 2290 /////////////////////////////////////////////////////////////
bf210566 2291 const Int_t kssdflexlayernumber = 2;
2292 TGeoXtru* ssdflexshape[kssdflexlayernumber];
2293 for(Int_t i=0; i<kssdflexlayernumber; i++) ssdflexshape[i] = new TGeoXtru(2);
2294 const Int_t kmothervertexnumber = 17;
2295 Double_t xmothervertex[kmothervertexnumber];
2296 Double_t ymothervertex[kmothervertexnumber];
2297 /////////////////////////////////////////////
2298 // Auxiliary variables for vertex positioning
2299 /////////////////////////////////////////////
2300 const Int_t kssdflexboxnumber = 5;
2301 Double_t ssdflexboxlength[kssdflexboxnumber];
2302 ssdflexboxlength[0] = 0.5*(fgkSSDChipNumber
2303 * fgkSSDChipLength+(fgkSSDChipNumber-1)
2304 * fgkSSDChipSeparationLength
2305 - fgkSSDModuleSensorSupportDistance-fgkSSDFlexHoleLength)
2306 - (fgkSSDFlexLength[0]-fgkSSDFlexLength[1]);
2307 ssdflexboxlength[1] = fgkSSDModuleSensorSupportDistance+fgkSSDFlexHoleLength;
2308 ssdflexboxlength[2] = 0.5*(fgkSSDModuleSensorSupportDistance
2309 - fgkSSDFlexHoleLength-fgkSSDFlexHoleWidth);
2310 ssdflexboxlength[3] = fgkSSDFlexHoleWidth;
2311 ssdflexboxlength[4] = fgkSSDFlexLength[1]-ssdflexboxlength[0]
2312 - ssdflexboxlength[1];
2313 Double_t ssdflexboxwidth[kssdflexboxnumber];
2314 ssdflexboxwidth[0] = fgkSSDFlexWidth[0];
2315 ssdflexboxwidth[1] = fgkSSDFlexWidth[0]-fgkSSDFlexHoleWidth;
2316 ssdflexboxwidth[2] = fgkSSDFlexHoleWidth;
2317 ssdflexboxwidth[3] = ssdflexboxwidth[2]-fgkSSDFlexHoleLength;
2318 ssdflexboxwidth[4] = fgkSSDFlexWidth[0];
2319 ///////////////////////
2320 // Setting the vertices
2321 ///////////////////////
2322 xmothervertex[0] = 0.0;
2323 xmothervertex[1] = xmothervertex[0];
2324 xmothervertex[2] = fgkSSDFlexLength[0]-fgkSSDFlexLength[1];
2325 xmothervertex[3] = xmothervertex[2]+ssdflexboxlength[0]+ssdflexboxlength[1]
2326 + ssdflexboxlength[4];
2327 xmothervertex[4] = xmothervertex[3];
2328 xmothervertex[5] = xmothervertex[4]-ssdflexboxlength[4];
2329 xmothervertex[6] = xmothervertex[5];
2330 xmothervertex[7] = xmothervertex[6]-fgkSSDFlexHoleLength;
2331 xmothervertex[8] = xmothervertex[7];
2332 xmothervertex[9] = xmothervertex[8]-ssdflexboxlength[2];
2333 xmothervertex[10] = xmothervertex[9];
2334 xmothervertex[11] = xmothervertex[10]-ssdflexboxlength[3];
2335 xmothervertex[12] = xmothervertex[11];
2336 xmothervertex[13] = xmothervertex[12]-ssdflexboxlength[2];
2337 xmothervertex[14] = xmothervertex[13];
2338 xmothervertex[15] = xmothervertex[14]-fgkSSDFlexHoleLength;
2339 xmothervertex[16] = xmothervertex[15];
2340 ymothervertex[0] = 0.0;
2341 ymothervertex[1] = fgkSSDFlexWidth[1];
2342 ymothervertex[2] = fgkSSDFlexWidth[0];
2343 ymothervertex[3] = ymothervertex[2];
2344 ymothervertex[4] = ymothervertex[0];
2345 ymothervertex[5] = ymothervertex[4];
2346 ymothervertex[6] = ssdflexboxwidth[2];
2347 ymothervertex[7] = ymothervertex[6];
2348 ymothervertex[8] = ymothervertex[0];
2349 ymothervertex[9] = ymothervertex[8];
2350 ymothervertex[10] = ssdflexboxwidth[2]-ssdflexboxwidth[3];
2351 ymothervertex[11] = ymothervertex[10];
2352 ymothervertex[12] = ymothervertex[0];
2353 ymothervertex[13] = ymothervertex[12];
2354 ymothervertex[14] = ymothervertex[7];
2355 ymothervertex[15] = ymothervertex[14];
2356 ymothervertex[16] = ymothervertex[0];
2357 /////////////////////////////////////////////////////////////
2358 // First Mother Volume containing SSDFlex
2359 /////////////////////////////////////////////////////////////
2360 TGeoXtru* ssdflexmothershape = new TGeoXtru(2);
2361 ssdflexmothershape->DefinePolygon(kmothervertexnumber,xmothervertex,
2362 ymothervertex);
2363 ssdflexmothershape->DefineSection(0,-1.5*fgkSSDFlexHeight[0]-2.*fgkSSDFlexHeight[1]);
2364 ssdflexmothershape->DefineSection(1, 0.5*fgkSSDFlexHeight[0]);
2365 TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape,
2366 fSSDAir);
2367 /////////////////////////////////////////////////////////////
2368 // SSDFlex Layer Shapes
2369 /////////////////////////////////////////////////////////////
2370 for(Int_t i=0; i<kssdflexlayernumber; i++){
2371 ssdflexshape[i]->DefinePolygon(kmothervertexnumber,xmothervertex,
2372 ymothervertex);
2373 ssdflexshape[i]->DefineSection(0,-0.5*fgkSSDFlexHeight[i]);
2374 ssdflexshape[i]->DefineSection(1, 0.5*fgkSSDFlexHeight[i]);
2375 }
2376 /////////////////////////////////////
2377 // Setting Layers into Mother Volume
2378 /////////////////////////////////////
2379 Int_t ssdflexcolor[kssdflexlayernumber] = {fColorAl,fColorPolyhamide};
2380 TGeoMedium* ssdflexmed[kssdflexlayernumber] = {fSSDAlTraceFlexMedium,
2381 fSSDKaptonFlexMedium};
2382 const char* ssdflexname[2*kssdflexlayernumber] = {"AlFlexLay1","KaptonFlexLay1",
2383 "AlFlexLay2","KaptonFlexLay2"};
2384 TGeoVolume* ssdflex[2*kssdflexlayernumber];
2385 TGeoTranslation* ssdflextrans[2*kssdflexlayernumber];
2386 for(Int_t i=0; i<2*kssdflexlayernumber; i++){
2387 ssdflex[i] = new TGeoVolume(ssdflexname[i],
2388 i%2==0 ? ssdflexshape[0] : ssdflexshape[1],
2389 i%2==0 ? ssdflexmed[0] : ssdflexmed[1]);
2390 ssdflex[i]->SetLineColor(i%2==0 ? ssdflexcolor[0] : ssdflexcolor[1]);
2391 ssdflextrans[i] = new TGeoTranslation(0.,0.,-0.5*i*(fgkSSDFlexHeight[0]
2392 + fgkSSDFlexHeight[1]));
2393 ssdflexmother->AddNode(ssdflex[i],1,ssdflextrans[i]);
2394 }
2395 //ssdflexmother->CheckOverlaps(0.01);
2396 return ssdflexmother;
2397}
2398/////////////////////////////////////////////////////////////////////////////////
2399TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){
2400 /////////////////////////////////////////////////////////////
2401 // Method generating SSD End Flex
2402 /////////////////////////////////////////
2403 Double_t ssdflexradiusmax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
2404 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
2405 Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
2406 * TMath::DegToRad()*ssdflexradiusmax
2407 - fgkSSDFlexLength[2]-TMath::Pi()
2408 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0];
2409 const Int_t knedges = 20;
2410 const Int_t karcnumber = 2;
2411 TVector3* vertexposition[karcnumber*(knedges+1)];
2412 Double_t deltangle[karcnumber] = {2.*fgkSSDFlexAngle/knedges,180.0/knedges};
2413 Double_t angle[karcnumber] = {90.-2.*fgkSSDFlexAngle,180.0};
2414 Double_t radius[karcnumber] = {ssdflexradiusmax-fgkSSDStiffenerHeight,fgkSSDStiffenerHeight};
2415 Double_t referenceangle[karcnumber] = {-180.0*TMath::DegToRad(),
2416 - 90.0*TMath::DegToRad()};
2417 TVector3* referencetrans[karcnumber];
2418 referencetrans[0] = new TVector3(ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
2419 + radius[0]*SinD(2.*fgkSSDFlexAngle),
2420 radius[0]);
2421 referencetrans[1] = new TVector3(referencetrans[0]->X()
2422 + fgkSSDFlexLength[2],
2423 - fgkSSDStiffenerHeight);
2424for(Int_t i=0; i<karcnumber; i++){
2425 for(Int_t j=0; j<knedges+1; j++){
2426 vertexposition[j+i*(knedges+1)] = new TVector3(radius[i]*CosD(angle[i]),
2427 radius[i]*SinD(angle[i]));
2428 angle[i] += deltangle[i]*(1.0-2.0*i);
2429 }
2430 }
2431 ///////////////////////
2432 // Setting the vertices
2433 ///////////////////////
2434 const Int_t kendflexlayernumber = 4;
2435 const Int_t kendflexvertexnumber = 4*(knedges+1)+2;
2436 TVector3** vertex[kendflexlayernumber];
2437 for(Int_t i=0; i<kendflexlayernumber; i++)
2438 vertex[i] = new TVector3*[kendflexvertexnumber];
2439 TVector3* transvector[kendflexlayernumber+1];
2440 TVector3* deltatransvector = new TVector3();
2441 for(Int_t i=0; i<kendflexlayernumber+1; i++) transvector[i] = new TVector3();
2442 transvector[0]->SetXYZ(0.0,ssdflexboxlength*SinD(2.*fgkSSDFlexAngle)
2443 + radius[0]*(1.0-CosD(2.*fgkSSDFlexAngle)),0.0);
2444 for(Int_t i=1; i<kendflexlayernumber+1; i++){
2445 deltatransvector->SetXYZ((i%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2446 * CosD(fgkSSDFlexAngle),
2447 (i%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2448 * SinD(fgkSSDFlexAngle),0.0);
2449 *transvector[i] = *transvector[i-1]+*deltatransvector;
2450 }
2451 Double_t ratioradius[karcnumber][kendflexlayernumber+1];
2452 ratioradius[0][0] = 1., ratioradius[1][0] = 1.;
2453 for(Int_t i=0; i<karcnumber; i++){
2454 for(Int_t j=1; j<kendflexlayernumber+1; j++){
2455 ratioradius[i][j] = ratioradius[i][j-1]-TMath::Power(-1.0,i)
2456 * (j%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2457 /radius[i];
2458 }
2459 }
2460 for(Int_t i=0; i<kendflexlayernumber; i++){
2461 vertex[i][0] = new TVector3(transvector[i]->X(),transvector[i]->Y());
2462 vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y());
2463 for(Int_t j=0; j<karcnumber*(knedges+1); j++){
2464 if(j<(knedges+1)){
2465 vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[0][i+1],
2466 vertexposition[j]->Y()*ratioradius[0][i+1]);
2467 vertex[i][j+2]->RotateZ(referenceangle[0]);
2468 *vertex[i][j+2] += *referencetrans[0];
2469 vertex[i][4*(knedges+1)-j+1] =
2470 new TVector3(vertexposition[j]->X()*ratioradius[0][i],
2471 vertexposition[j]->Y()*ratioradius[0][i]);
2472 vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[0]);
2473 *vertex[i][4*(knedges+1)-j+1] += *referencetrans[0];
2474 }
2475 else{
2476
2477 vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[1][i+1],
2478 vertexposition[j]->Y()*ratioradius[1][i+1]);
2479 vertex[i][j+2]->RotateZ(referenceangle[1]);
2480 *vertex[i][j+2] += *referencetrans[1];
2481 vertex[i][4*(knedges+1)-j+1] =
2482 new TVector3(vertexposition[j]->X()*ratioradius[1][i],
2483 vertexposition[j]->Y()*ratioradius[1][i]);
2484 vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[1]);
2485 *vertex[i][4*(knedges+1)-j+1] += *referencetrans[1];
2486 }
2487 }
2488 }
2489 /////////////////////////////////////////////////////////////
2490 // First Mother Volume containing SSDEndFlex
2491 /////////////////////////////////////////////////////////////
2492 TGeoXtru* ssdendflexmothershape = new TGeoXtru(2);
2493 Double_t xmothervertex[kendflexvertexnumber];
2494 Double_t ymothervertex[kendflexvertexnumber];
2495 xmothervertex[0] = vertex[0][0]->X();
2496 ymothervertex[0] = vertex[0][0]->Y();
2497 for(Int_t i=1; i<kendflexvertexnumber; i++){
2498 if(i<2*(knedges+1)+2){
2499 xmothervertex[i] = vertex[3][i]->X();
2500 ymothervertex[i] = vertex[3][i]->Y();
2501 }
2502 else{
2503 xmothervertex[i] = vertex[0][i]->X();
2504 ymothervertex[i] = vertex[0][i]->Y();
2505 }
2506 }
2507 ssdendflexmothershape->DefinePolygon(kendflexvertexnumber,
2508 xmothervertex,ymothervertex);
2509 ssdendflexmothershape->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
2510 ssdendflexmothershape->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
2511 TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother",
2512 ssdendflexmothershape,fSSDAir);
2513 //////////////////////////////////////
2514 // End Flex TGeoXtru Layer Definition
2515 //////////////////////////////////////
2516 TGeoXtru* ssdendflexshape[kendflexlayernumber];
2517 TGeoVolume* ssdendflex[kendflexlayernumber];
2518 for(Int_t i=0; i<kendflexlayernumber; i++) ssdendflexshape[i] = new TGeoXtru(2);
2519 Double_t xvertex[kendflexlayernumber][kendflexvertexnumber];
2520 Double_t yvertex[kendflexlayernumber][kendflexvertexnumber];
2521 Int_t ssdendflexcolor[kendflexlayernumber] = {fColorAl,fColorPolyhamide};
2522 TGeoMedium* ssdendflexmed[kendflexlayernumber] = {fSSDAlTraceFlexMedium,
2523 fSSDKaptonFlexMedium};
2524 const char* ssdendflexname[kendflexlayernumber] = {"AlEndFlexLay1","KaptonEndFlexLay1",
2525 "AlEndFlexLay2","KaptonEndFlexLay2"};
2526 for(Int_t i=0; i<kendflexlayernumber; i++){
2527 for(Int_t j=0; j<4*(knedges+1)+2; j++){
2528 xvertex[i][j] = vertex[i][j]->X();
2529 yvertex[i][j] = vertex[i][j]->Y();
2530 }
2531 ssdendflexshape[i]->DefinePolygon(kendflexvertexnumber,xvertex[i],yvertex[i]);
2532 ssdendflexshape[i]->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
2533 ssdendflexshape[i]->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
2534 ssdendflex[i] = new TGeoVolume(ssdendflexname[i],ssdendflexshape[i],
2535 i%2==0 ? ssdendflexmed[0] : ssdendflexmed[1]);
2536 ssdendflex[i]->SetLineColor(i%2==0 ? ssdendflexcolor[0] : ssdendflexcolor[1]);
2537 ssdendflexmother->AddNode(ssdendflex[i],1);
2538 }
2539 /////////////////////////////////////////////////////////////
2540 // Deallocating memory
2541 /////////////////////////////////////////////////////////////
2542 for(Int_t i=0; i<karcnumber*(knedges+1); i++) delete vertexposition[i];
2543 for(Int_t i=0; i<karcnumber; i++) delete referencetrans[i];
2544 for(Int_t i=0; i<kendflexlayernumber; i++){
2545 for(Int_t j=0; j<kendflexvertexnumber; j++) delete vertex[i][j];
2546 delete [] vertex[i];
2547 }
2548 for(Int_t i=0; i<kendflexlayernumber+1; i++) delete transvector[i];
2549 delete deltatransvector;
2550 /////////////////////////////////////////////////////////////
2551 //ssdendflexmother->CheckOverlaps(0.01);
2552 return ssdendflexmother;
d7599219 2553}
2554////////////////////////////////////////////////////////////////////////////////
2555TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
44285dfa 2556 /////////////////////////////////////////////////////////////
2557 // Method generating the Mounting Block
2558 /////////////////////////////////////////////////////////////
d7599219 2559 // Mounting Block Boxes Shapes
2560 ///////////////////////////////////////
44285dfa 2561 const Int_t kmountingblockboxnumber = 3;
2562 TGeoBBox* mountingblockboxshape[kmountingblockboxnumber];
2563 mountingblockboxshape[0] = new TGeoBBox("MountingBlockBoxShape0",
d7599219 2564 0.25*(fgkSSDMountingBlockLength[0]
2565 - fgkSSDMountingBlockLength[1]),
2566 0.5*fgkSSDMountingBlockWidth,
2567 0.5*fgkSSDMountingBlockHeight[0]);
44285dfa 2568 mountingblockboxshape[1] = new TGeoBBox("MountingBlockBoxShape1",
d7599219 2569 0.25*(fgkSSDMountingBlockLength[1]
2570 - fgkSSDMountingBlockLength[2]),
2571 0.5*fgkSSDMountingBlockWidth,
2572 0.5*(fgkSSDMountingBlockHeight[1]
2573 - fgkSSDMountingBlockHeight[3]));
44285dfa 2574 mountingblockboxshape[2] = new TGeoBBox("MountingBlockBoxShape2",
d7599219 2575 0.5*fgkSSDMountingBlockLength[2],
2576 0.5*fgkSSDMountingBlockWidth,
2577 0.5*(fgkSSDMountingBlockHeight[2]
2578 - fgkSSDMountingBlockHeight[3]));
44285dfa 2579 TGeoTranslation* mountingblockboxtrans[kmountingblockboxnumber+2];
2580 mountingblockboxtrans[0] = new TGeoTranslation("MountingBlockBoxTrans0",0.,0.,0.);
2581 mountingblockboxtrans[1] = new TGeoTranslation("MountingBlockBoxTrans1",
2582 mountingblockboxshape[0]->GetDX()
2583 + mountingblockboxshape[1]->GetDX(),
d7599219 2584 0.0,
44285dfa 2585 mountingblockboxshape[1]->GetDZ()
2586 - mountingblockboxshape[0]->GetDZ()
d7599219 2587 + fgkSSDMountingBlockHeight[3]);
44285dfa 2588 mountingblockboxtrans[2] = new TGeoTranslation("MountingBlockBoxTrans2",
2589 mountingblockboxshape[0]->GetDX()
2590 + 2.*mountingblockboxshape[1]->GetDX()
2591 + mountingblockboxshape[2]->GetDX(),
d7599219 2592 0.0,
44285dfa 2593 mountingblockboxshape[2]->GetDZ()
2594 - mountingblockboxshape[0]->GetDZ()
d7599219 2595 + fgkSSDMountingBlockHeight[3]);
44285dfa 2596 mountingblockboxtrans[3] = new TGeoTranslation("MountingBlockBoxTrans3",
2597 mountingblockboxshape[0]->GetDX()
2598 + mountingblockboxshape[1]->GetDX()
2599 + 2.*(mountingblockboxshape[1]->GetDX()
2600 + mountingblockboxshape[2]->GetDX()),
d7599219 2601 0.0,
44285dfa 2602 mountingblockboxshape[1]->GetDZ()
2603 - mountingblockboxshape[0]->GetDZ()
d7599219 2604 + fgkSSDMountingBlockHeight[3]);
44285dfa 2605 mountingblockboxtrans[4] = new TGeoTranslation("MountingBlockBoxTrans4",
2606 2.*(mountingblockboxshape[0]->GetDX()
2607 + 2.*mountingblockboxshape[1]->GetDX()
2608 + mountingblockboxshape[2]->GetDX()),
d7599219 2609 0.0,
2610 0.0);
44285dfa 2611 for(Int_t i=0; i<kmountingblockboxnumber+2; i++)
2612 mountingblockboxtrans[i]->RegisterYourself();
d7599219 2613 ///////////////////////////////////////
2614 // Mounting Block Trapezoid Hole Shapes
2615 ///////////////////////////////////////
44285dfa 2616 const Int_t kholetrapezoidvertexnumber = 4;
2617 TVector3* holetrapezoidvertex[kholetrapezoidvertexnumber];
2618 holetrapezoidvertex[0] = new TVector3();
2619 holetrapezoidvertex[1] = new TVector3(fgkSSDMountingBlockHoleTrapezoidHeight);
2620 holetrapezoidvertex[2] = new TVector3(*holetrapezoidvertex[0]);
2621 holetrapezoidvertex[3] = new TVector3(*holetrapezoidvertex[1]);
2622 Double_t holetrapezoidwidth[2] = {fgkSSDMountingBlockHoleTrapezoidUpBasis
2623 + 2.*mountingblockboxshape[1]->GetDX()
d7599219 2624 * TMath::Tan(fgkSSDMountingBlockHoleTrapezoidAngle
2625 * TMath::DegToRad()),
2626 fgkSSDMountingBlockHoleTrapezoidUpBasis};
44285dfa 2627 GetArbShape(holetrapezoidvertex,
2628 holetrapezoidwidth,
2629 2.*mountingblockboxshape[1]->GetDX(),
d7599219 2630 "HoleTrapezoidShape");
44285dfa 2631 TGeoRotation* holetrapezoidshaperot[2];
2632 holetrapezoidshaperot[0] = new TGeoRotation("HoleTrapezoidShapeRot0",
d7599219 2633 90.,-90.,-90.);
44285dfa 2634 holetrapezoidshaperot[1] = new TGeoRotation("HoleTrapezoidShapeRot1",
d7599219 2635 -180.,0.,0.);
44285dfa 2636 TGeoCombiTrans* holetrapezoidshapecombitrans =
d7599219 2637 new TGeoCombiTrans("HoleTrapezoidShapeCombiTrans",
44285dfa 2638 mountingblockboxshape[0]->GetDX()
2639 + 3.*mountingblockboxshape[1]->GetDX()
2640 + 2.*mountingblockboxshape[2]->GetDX(),
d7599219 2641 0.5*fgkSSDMountingBlockWidth,
2642 - fgkSSDMountingBlockHoleTrapezoidHeight
44285dfa 2643 + 2.*mountingblockboxshape[1]->GetDZ()
2644 - mountingblockboxshape[0]->GetDZ()
d7599219 2645 + fgkSSDMountingBlockHeight[3],
44285dfa 2646 new TGeoRotation((*holetrapezoidshaperot[1])
2647 * (*holetrapezoidshaperot[0])));
2648 holetrapezoidshapecombitrans->RegisterYourself();
d7599219 2649 ///////////////////////////////////
2650 // Mounting Block Screw Hole Shapes
2651 ///////////////////////////////////
44285dfa 2652 const Int_t kmountingblocktubenumber = 2;
2653 TGeoTube* mountingblocktubeshape[kmountingblocktubenumber];
2654 mountingblocktubeshape[0] = new TGeoTube("MountingBlockTubeShape0",0.0,
d7599219 2655 fgkSSDMountingBlockHoleRadius,
44285dfa 2656 mountingblockboxshape[0]->GetDZ());
2657 mountingblocktubeshape[1] = new TGeoTube("MountingBlockTubeShape1",0.0,
d7599219 2658 fgkSSDMountingBlockHoleRadius,
44285dfa 2659 mountingblockboxshape[2]->GetDZ());
2660 TGeoTranslation* mountingblocktubetrans[2*kmountingblocktubenumber];
2661 mountingblocktubetrans[0] = new TGeoTranslation("MountingBlockTubeTrans0",
d7599219 2662 - 0.5*(fgkSSDMountingBlockLength[0]
2663 - fgkSSDMountingBlockHoleTubeLength[0]),
2664 0.5*fgkSSDMountingBlockWidth
2665 - fgkSSDMountingBlockHoleTubeWidth[0],0.);
44285dfa 2666 mountingblocktubetrans[1] = new TGeoTranslation("MountingBlockTubeTrans1",
d7599219 2667 - 0.5*(fgkSSDMountingBlockLength[0]
2668 - fgkSSDMountingBlockHoleTubeLength[0])
2669 + fgkSSDMountingBlockHoleTubeLength[0],
2670 - 0.5*fgkSSDMountingBlockWidth
2671 + fgkSSDMountingBlockHoleTubeWidth[0],
2672 0.);
44285dfa 2673 mountingblocktubetrans[2] = new TGeoTranslation("MountingBlockTubeTrans2",
2674 - mountingblockboxshape[0]->GetDX()
d7599219 2675 + 0.5*fgkSSDMountingBlockLength[0]
2676 - fgkSSDMountingBlockHoleTubeLength[1],
2677 0.5*fgkSSDMountingBlockWidth
2678 - fgkSSDMountingBlockHoleTubeWidth[0],
44285dfa 2679 mountingblockboxshape[2]->GetDZ()
2680 - mountingblockboxshape[0]->GetDZ()
d7599219 2681 + fgkSSDMountingBlockHeight[3]);
44285dfa 2682 mountingblocktubetrans[3] = new TGeoTranslation("MountingBlockTubeTrans3",
2683 - mountingblockboxshape[0]->GetDX()
d7599219 2684 + 0.5*fgkSSDMountingBlockLength[0],
2685 - 0.5*fgkSSDMountingBlockWidth
2686 + fgkSSDMountingBlockHoleTubeWidth[1],
44285dfa 2687 mountingblockboxshape[2]->GetDZ()
2688 - mountingblockboxshape[0]->GetDZ()
d7599219 2689 + fgkSSDMountingBlockHeight[3]);
44285dfa 2690 for(Int_t i=0; i<2*kmountingblocktubenumber; i++)
2691 mountingblocktubetrans[i]->RegisterYourself();
d7599219 2692 new TGeoCompositeShape("MountingBlockMainShape",
2693 "MountingBlockBoxShape0:MountingBlockBoxTrans0+"
2694 "MountingBlockBoxShape1:MountingBlockBoxTrans1+"
2695 "MountingBlockBoxShape2:MountingBlockBoxTrans2+"
2696 "MountingBlockBoxShape1:MountingBlockBoxTrans3+"
2697 "MountingBlockBoxShape0:MountingBlockBoxTrans4");
2698 ////////////////////////////////////////////
2699 // Mounting Block Screw Composite Hole Shapes
2700 ////////////////////////////////////////////
44285dfa 2701 const Int_t kmountingblockholetubesegnumber = 4;
d7599219 2702 new TGeoTubeSeg("MountingBlockHoleTubeSegShape",
2703 0.0,
2704 fgkSSDMountingBlockScrewHoleRadius[0],
2705 0.5*fgkSSDMountingBlockScrewHoleHeigth,-90.,180.);
44285dfa 2706 TGeoCombiTrans* mountingblockholetubesegcombitrans[kmountingblockholetubesegnumber];
2707 char* mountingblockholetubesegcombitransname[kmountingblockholetubesegnumber] =
d7599219 2708 { "MountingBlockHoleTubeSegCombiTrans0",
2709 "MountingBlockHoleTubeSegCombiTrans1",
2710 "MountingBlockHoleTubeSegCombiTrans2",
2711 "MountingBlockHoleTubeSegCombiTrans3"};
44285dfa 2712 for(Int_t i=0; i<kmountingblockholetubesegnumber; i++){
2713 mountingblockholetubesegcombitrans[i] =
2714 new TGeoCombiTrans(mountingblockholetubesegcombitransname[i],
d7599219 2715 0.5*fgkSSDMountingBlockScrewHoleEdge*TMath::Sqrt(2)
2716 * TMath::Cos(45*(2*i+1)*TMath::DegToRad()),
2717 0.5*fgkSSDMountingBlockScrewHoleEdge*TMath::Sqrt(2)
2718 * TMath::Sin(45*(2*i+1)*TMath::DegToRad()),
2719 0.0,
2720 new TGeoRotation("",90.*i,0.,0.));
44285dfa 2721 mountingblockholetubesegcombitrans[i]->RegisterYourself();
d7599219 2722 }
44285dfa 2723 TGeoBBox* mountingblockholeboxshape =
d7599219 2724 new TGeoBBox("MountingBlockHoleBoxShape",
2725 0.5*fgkSSDMountingBlockScrewHoleEdge,
2726 0.5*fgkSSDMountingBlockScrewHoleEdge,
2727 0.5*fgkSSDMountingBlockScrewHoleHeigth);
44285dfa 2728 TGeoCompositeShape* mountingblockscrewhole[2];
2729 mountingblockscrewhole[0] =
d7599219 2730 new TGeoCompositeShape("MountingBlockScrewHole0",
2731 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans0+"
2732 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans1+"
2733 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans2+"
2734 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans3+"
2735 "MountingBlockHoleBoxShape");
d7599219 2736 new TGeoTubeSeg("MountingBlockLowerHoleTubeSegShape",
2737 0.0,
2738 fgkSSDMountingBlockScrewHoleRadius[1],
2739 0.5*(fgkSSDMountingBlockHoleTubeWidth[0]
2740 - fgkSSDMountingBlockScrewHoleHeigth
2741 - fgkSSDMountingBlockHeight[3]),0.,90.);
44285dfa 2742 TGeoCombiTrans* mountingblocklowerholetubesegcombitrans[kmountingblockholetubesegnumber];
2743 char* mountingblocklowerholetubesegcombitransname[kmountingblockholetubesegnumber] =
d7599219 2744 { "MountingBlockLowerHoleTubeSegCombiTrans0",
2745 "MountingBlockLowerHoleTubeSegCombiTrans1",
2746 "MountingBlockLowerHoleTubeSegCombiTrans2",
2747 "MountingBlockLowerHoleTubeSegCombiTrans3"};
44285dfa 2748 for(Int_t i=0; i<kmountingblockholetubesegnumber; i++){
2749 mountingblocklowerholetubesegcombitrans[i] =
2750 new TGeoCombiTrans(mountingblocklowerholetubesegcombitransname[i],
d7599219 2751 0.5*(fgkSSDMountingBlockScrewHoleEdge
2752 - 2.*fgkSSDMountingBlockScrewHoleRadius[1])
2753 * TMath::Sqrt(2)*TMath::Cos(45*(2*i+1)*TMath::DegToRad()),
2754 0.5*(fgkSSDMountingBlockScrewHoleEdge
2755 - 2.0*fgkSSDMountingBlockScrewHoleRadius[1])
2756 * TMath::Sqrt(2)*TMath::Sin(45*(2*i+1)*TMath::DegToRad()),0.,
2757 new TGeoRotation("",90.*i,0.,0.));
44285dfa 2758 mountingblocklowerholetubesegcombitrans[i]->RegisterYourself();
d7599219 2759 }
2760 Double_t fgkSSDMountingBlockLowerScrewHoleEdge = fgkSSDMountingBlockScrewHoleEdge
2761 - 2.*fgkSSDMountingBlockScrewHoleRadius[1];
44285dfa 2762 TGeoBBox* mountingblocklowerholeboxshape[2];
2763 mountingblocklowerholeboxshape[0] =
d7599219 2764 new TGeoBBox("MountingBlockLowerHoleBoxShape0",
2765 0.5*fgkSSDMountingBlockLowerScrewHoleEdge,
2766 0.5*fgkSSDMountingBlockLowerScrewHoleEdge,
2767 0.5*(fgkSSDMountingBlockHoleTubeWidth[0]
2768 - fgkSSDMountingBlockScrewHoleHeigth
2769 - fgkSSDMountingBlockHeight[3]));
44285dfa 2770 mountingblocklowerholeboxshape[1] =
d7599219 2771 new TGeoBBox("MountingBlockLowerHoleBoxShape1",
2772 0.5*fgkSSDMountingBlockLowerScrewHoleEdge,
2773 0.5*fgkSSDMountingBlockScrewHoleRadius[1],
2774 0.5*(fgkSSDMountingBlockHoleTubeWidth[0]
2775 - fgkSSDMountingBlockScrewHoleHeigth
2776 - fgkSSDMountingBlockHeight[3]));
44285dfa 2777 TGeoCombiTrans* mountingblocklowerholeBoxcombitrans[kmountingblockholetubesegnumber];
2778 char* mountingBlockLowerHoleBoxCombiTransName[kmountingblockholetubesegnumber] =
d7599219 2779 { "MountingBlockLowerHoleBoxCombiTrans0",
2780 "MountingBlockLowerHoleBoxCombiTrans1",
2781 "MountingBlockLowerHoleBoxCombiTrans2",
2782 "MountingBlockLowerHoleBoxCombiTrans3"};
44285dfa 2783 for(Int_t i=0; i<kmountingblockholetubesegnumber; i++){
2784 mountingblocklowerholeBoxcombitrans[i] =
2785 new TGeoCombiTrans(mountingBlockLowerHoleBoxCombiTransName[i],
d7599219 2786 0.5*(fgkSSDMountingBlockLowerScrewHoleEdge
2787 + fgkSSDMountingBlockScrewHoleRadius[1])
2788 * TMath::Cos(90*(i+1)*TMath::DegToRad()),
2789 0.5*(fgkSSDMountingBlockLowerScrewHoleEdge
2790 + fgkSSDMountingBlockScrewHoleRadius[1])
2791 * TMath::Sin(90*(i+1)*TMath::DegToRad()),0.,
2792 new TGeoRotation("",90.*i,0.,0.));
44285dfa 2793 mountingblocklowerholeBoxcombitrans[i]->RegisterYourself();
d7599219 2794 }
44285dfa 2795 mountingblockscrewhole[1] = new TGeoCompositeShape("MountingBlockScrewHole1",
d7599219 2796 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans0+"
2797 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans1+"
2798 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans2+"
2799 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans3+"
2800 "MountingBlockLowerHoleBoxShape0+"
2801 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans0+"
2802 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans1+"
2803 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans2+"
2804 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans3");
44285dfa 2805 TGeoTranslation* mountingblockscrewhole1trans =
d7599219 2806 new TGeoTranslation("MountingBlockScrewHole1Trans",0.,0.,
44285dfa 2807 - mountingblocklowerholeboxshape[0]->GetDZ()
2808 - mountingblockholeboxshape->GetDZ());
2809 mountingblockscrewhole1trans->RegisterYourself();
d7599219 2810 new TGeoCompositeShape("MountingBlockHole",
2811 "MountingBlockScrewHole0+MountingBlockScrewHole1:MountingBlockScrewHole1Trans");
44285dfa 2812 TGeoTranslation* mountingblockholetrans = new TGeoTranslation("MountingBlockHoleTrans",
d7599219 2813 0.5*fgkSSDMountingBlockLength[0]
44285dfa 2814 - mountingblockboxshape[0]->GetDZ(),
d7599219 2815 0.0,
44285dfa 2816 2.*mountingblockboxshape[2]->GetDZ()
2817 - mountingblockboxshape[0]->GetDZ()
d7599219 2818 + fgkSSDMountingBlockHeight[3]
44285dfa 2819 - mountingblockholeboxshape->GetDZ());
2820 mountingblockholetrans->RegisterYourself();
2821 TGeoCompositeShape* mountingblockshape = new TGeoCompositeShape("MountingBlockShape",
d7599219 2822 "MountingBlockMainShape-(MountingBlockTubeShape0:MountingBlockTubeTrans0+"
2823 "MountingBlockTubeShape0:MountingBlockTubeTrans1+"
2824 "MountingBlockTubeShape1:MountingBlockTubeTrans2+"
2825 "MountingBlockTubeShape1:MountingBlockTubeTrans3+"
2826 "HoleTrapezoidShape:HoleTrapezoidShapeCombiTrans+"
2827 "MountingBlockHole:MountingBlockHoleTrans)");
44285dfa 2828 TGeoVolume* ssdmountingblock = new TGeoVolume("SSDMountingBlock",
2829 mountingblockshape,fSSDMountingBlockMedium);
2830 return ssdmountingblock;
d7599219 2831}
bf210566 2832///////////////////////////////////////////////////////////////////////////////
2833TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{
44285dfa 2834 /////////////////////////////////////////////////////////////
bf210566 2835 // Method generating the Cooling Tube
44285dfa 2836 /////////////////////////////////////////////////////////////
bf210566 2837 TGeoTube** coolingtubeshape[fgkcoolingtubenumber];
2838 for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtubeshape[i] =
2839 new TGeoTube*[2];
2840 coolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2841 0.25 * (fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
2842 - 2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth));
2843 coolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
2844 coolingtubeshape[0][0]->GetDz());
2845 coolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2846 0.5*(fgkSSDModuleStiffenerPosition[1]
2847 - fgkSSDSensorOverlap));
2848 coolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
2849 coolingtubeshape[1][0]->GetDz());
2850 coolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2851 0.5*fgkSSDModuleStiffenerPosition[1]);
2852 coolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
2853 coolingtubeshape[2][0]->GetDz());
2854 TGeoVolume** coolingtube[fgkcoolingtubenumber];
2855 for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtube[i] =
2856 new TGeoVolume*[2];
2857 coolingtube[0][0] = new TGeoVolume("OuterCoolingTube1",coolingtubeshape[0][0],
2858 fSSDCoolingTubePhynox);
2859 coolingtube[0][1] = new TGeoVolume("InnerCoolingTube1",coolingtubeshape[0][1],
2860 fSSDCoolingTubeWater);
2861 coolingtube[1][0] = new TGeoVolume("OuterCoolingTube2",coolingtubeshape[1][0],
2862 fSSDCoolingTubePhynox);
2863 coolingtube[1][1] = new TGeoVolume("InnerCoolingTube2",coolingtubeshape[1][1],
2864 fSSDCoolingTubeWater);
2865 coolingtube[2][0] = new TGeoVolume("OuterCoolingTube3",coolingtubeshape[2][0],
2866 fSSDCoolingTubePhynox);
2867 coolingtube[2][1] = new TGeoVolume("InnerCoolingTube3",coolingtubeshape[2][1],
2868 fSSDCoolingTubeWater);
2869 for(Int_t i=0; i<fgkcoolingtubenumber; i++){
2870 coolingtube[i][0]->SetLineColor(fColorPhynox);
2871 coolingtube[i][1]->SetLineColor(fColorWater);
2872 }
2873 /////////////////////////////////////////////////////////////
2874 // Virtual Volume containing Cooling Tubes
2875 /////////////////////////////////////////////////////////////
2876 TGeoTube* virtualcoolingtubeshape[fgkcoolingtubenumber];
2877 for(Int_t i=0; i<fgkcoolingtubenumber; i++)
2878 virtualcoolingtubeshape[i] = new TGeoTube(coolingtubeshape[i][1]->GetRmin(),
2879 coolingtubeshape[i][0]->GetRmax(),
2880 coolingtubeshape[i][0]->GetDz());
2881 TGeoVolume* virtualcoolingtube[fgkcoolingtubenumber];
2882 virtualcoolingtube[0] = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape[0],
2883 fSSDAir);
2884 virtualcoolingtube[1] = new TGeoVolume("CoolingTube2",virtualcoolingtubeshape[1],
2885 fSSDAir);
2886 virtualcoolingtube[2] = new TGeoVolume("CoolingTube3",virtualcoolingtubeshape[2],
2887 fSSDAir);
2888 TList* coolingtubelist = new TList();
2889 for(Int_t i=0; i<fgkcoolingtubenumber; i++){
2890 virtualcoolingtube[i]->AddNode(coolingtube[i][0],1);
2891 virtualcoolingtube[i]->AddNode(coolingtube[i][1],1);
2892 coolingtubelist->Add(virtualcoolingtube[i]);
2893 }
2894 return coolingtubelist;
2895}
2896///////////////////////////////////////////////////////////////////////////////
2897TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
2898 /////////////////////////////////////////////////////////////
2899 // Method generating SSD Cooling Block
2900 /////////////////////////////////////////////////////////////
2901 const Int_t kvertexnumber = 8;
2902 ///////////////////////////////////////
2903 // Vertex Positioning for TGeoXTru
2904 ///////////////////////////////////////
2905 TVector3** vertexposition = new TVector3*[2*kvertexnumber+nedges+1];
2906 vertexposition[0] = new TVector3(0.0,0.0);
2907 vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1]);
2908 vertexposition[2] = new TVector3(fgkSSDCoolingBlockHoleLength[1],
2909 vertexposition[1]->Y());
2910 vertexposition[3] = new TVector3(vertexposition[2]->X(),
2911 vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2]);
2912 vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y());
2913 vertexposition[5] = new TVector3(vertexposition[4]->X(),
2914 + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1]);
2915 vertexposition[6] = new TVector3(Xfrom2Points(vertexposition[5]->X(),
2916 vertexposition[5]->Y(),0.5*(fgkSSDCoolingBlockLength
2917 - fgkSSDCoolingBlockHoleLength[0]
2918 - 4.*fgkSSDCoolingBlockHoleRadius[1]),
2919 fgkSSDCoolingBlockHeight[0]
2920 - fgkSSDCoolingBlockHoleRadius[1],
2921 fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0]);
2922 vertexposition[7] = new TVector3(0.5*(fgkSSDCoolingBlockLength
2923 - fgkSSDCoolingBlockHoleLength[0]),
2924 vertexposition[6]->Y());
2925 Double_t alpha = TMath::ACos(0.5*fgkSSDCoolingBlockHoleLength[0]
2926 / fgkSSDCoolingBlockHoleRadius[0])*TMath::RadToDeg();
2927 Double_t phi = 180.-alpha;
2928 Double_t psi = 180.+2.*alpha;
2929 Double_t deltapsi = psi/nedges;
2930 Double_t radius = fgkSSDCoolingBlockHoleRadius[0]/CosD(0.5*deltapsi);
2931 TVector3* transvector = new TVector3(0.5*fgkSSDCoolingBlockLength,
2932 fgkSSDCoolingBlockHoleCenter);
2933 for(Int_t i=0; i<nedges+1; i++){
2934 vertexposition[kvertexnumber+i] = new TVector3(radius*CosD(phi+i*deltapsi),
2935 radius*SinD(phi+i*deltapsi));
2936 *vertexposition[kvertexnumber+i] += (*transvector);
2937 }
2938 Double_t param[4] = {1.0,0.0,0.0,-0.5*fgkSSDCoolingBlockLength};
2939 for(Int_t i=0; i<kvertexnumber; i++)
2940 vertexposition[kvertexnumber+nedges+1+i] =
2941 GetReflection(vertexposition[kvertexnumber-1-i],param);
2942 ///////////////////////////////////////////////////////////////////////
2943 // TGeoXTru Volume definition for Cooling Tube Support Arc Part
2944 ///////////////////////////////////////////////////////////////////////
2945 TGeoXtru* ssdcoolingblockshape = new TGeoXtru(2);
2946 Double_t* xvertexpoints = new Double_t[2*kvertexnumber+nedges+1];
2947 Double_t* yvertexpoints = new Double_t[2*kvertexnumber+nedges+1];
2948 for(Int_t i=0; i<2*kvertexnumber+nedges+1; i++){
2949 xvertexpoints[i] = vertexposition[i]->X();
2950 yvertexpoints[i] = vertexposition[i]->Y();
2951 }
2952 ssdcoolingblockshape->DefinePolygon(2*kvertexnumber+nedges+1,xvertexpoints,
2953 yvertexpoints);
2954 ssdcoolingblockshape->DefineSection(0,-0.5*fgkSSDCoolingBlockWidth);
2955 ssdcoolingblockshape->DefineSection(1,0.5*fgkSSDCoolingBlockWidth);
2956 TGeoVolume* ssdcoolingblock = new TGeoVolume("SSDCoolingBlock",
2957 ssdcoolingblockshape,
2958 fSSDAlCoolBlockMedium);
2959 ssdcoolingblock->SetLineColor(fColorAl);
2960 /////////////////////////////////////////////////////////////
2961 // Deallocating memory
2962 /////////////////////////////////////////////////////////////
2963 delete [] vertexposition;
2964 delete xvertexpoints;
2965 delete yvertexpoints;
2966 /////////////////////////////////////////////////////////////
2967 return ssdcoolingblock;
2968}
2969/////////////////////////////////////////////////////////////////////////////////
2970TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth, Int_t nedges){
2971 ///////////////////////////////////////////////////////
2972 const Int_t kssdchipcablesnumber = 2;
2973 const Int_t kssdchipcableslaynumber = 2;
2974 const Int_t kvertexnumber = 4*(nedges+1)+4;
2975 Int_t ssdchipcablescolor[kssdchipcableslaynumber] = {fColorAl,fColorPolyhamide};
2976 Double_t ssdchipcablesradius[kssdchipcableslaynumber];
2977 ssdchipcablesradius[0] = 0.25*(SSDChipCablesHeigth
2978 - fgkSSDChipCablesHeight[0]
2979 - fgkSSDChipCablesHeight[1]);
2980 ssdchipcablesradius[1] = ssdchipcablesradius[0]-fgkSSDChipCablesHeight[0];
2981 Double_t ssdchipcablespiecelength[kssdchipcablesnumber];
2982 ssdchipcablespiecelength[0] = 0.5*(fgkSSDChipCablesWidth[0]
2983 - 2.*TMath::Pi()*ssdchipcablesradius[0]
2984 - ssdchipcablesradius[0]
2985 - fgkSSDChipCablesWidth[1]
2986 - fgkSSDChipCablesWidth[2]);
2987 ssdchipcablespiecelength[1] = ssdchipcablespiecelength[0]
2988 - 0.5*(fgkSSDModuleStiffenerPosition[1]
2989 + fgkSSDChipCablesHeight[1]
2990 + fgkSSDSensorHeight);
2991 ///////////////////////////////////////////////////////
2992 // Vertex Positioning for TGeoXTrue Layer 1 and Layer 2
2993 ///////////////////////////////////////////////////////
2994 TVector3** vertexposition[kssdchipcableslaynumber];
2995 for(Int_t i=0; i<kssdchipcableslaynumber; i++) vertexposition[i] =
2996 new TVector3*[4*(nedges+1)+4];
2997 Double_t ratio[4];
2998 ratio[0] = ssdchipcablesradius[1]/ssdchipcablesradius[0];
2999 ratio[1] = (ssdchipcablesradius[1]-fgkSSDChipCablesHeight[1])
3000 / ssdchipcablesradius[0];
3001 ratio[2] = (ssdchipcablesradius[0]+fgkSSDChipCablesHeight[0])
3002 / ssdchipcablesradius[0];
3003 ratio[3] = (ssdchipcablesradius[0]+fgkSSDChipCablesHeight[0]
3004 + fgkSSDChipCablesHeight[1])
3005 / ssdchipcablesradius[0];
3006 Double_t phi = 180.;
3007 Double_t deltaphi = 180./nedges;
3008 Double_t angle = 0.0;
3009 Double_t **xvertexpoints = new Double_t*[kssdchipcableslaynumber];
3010 Double_t **yvertexpoints = new Double_t*[kssdchipcableslaynumber];
3011 for(Int_t i=0; i<kssdchipcableslaynumber;i++){
3012 xvertexpoints[i] = new Double_t[kvertexnumber];
3013 yvertexpoints[i] = new Double_t[kvertexnumber];
3014 }
3015 TVector3* vertex = new TVector3();
3016 TVector3* transvector[kssdchipcableslaynumber];
3017 transvector[0] = new TVector3(fgkSSDChipWidth,
3018 SSDChipCablesHeigth-ssdchipcablesradius[0]);
3019 transvector[1] = new TVector3();
3020 TGeoXtru* ssdchipcableshape[kssdchipcableslaynumber*kssdchipcableslaynumber];
3021 TGeoVolume* ssdchipcable[kssdchipcableslaynumber*kssdchipcableslaynumber];
3022 const char* ssdchipcablename[kssdchipcableslaynumber*kssdchipcableslaynumber] =
3023 {"SSDChipcableAllay1Left","SSDChipcableKaptonlay2Left",
3024 "SSDChipcableAllay1Right","SSDChipcableKaptonlay2Right"};
3025 for(Int_t k=0; k<kssdchipcablesnumber; k++){
3026 transvector[1]->SetX(fgkSSDChipWidth-ssdchipcablespiecelength[k]);
3027 transvector[1]->SetY(ssdchipcablesradius[0]
3028 + fgkSSDChipCablesHeight[0]
3029 + fgkSSDChipCablesHeight[1]);
3030 for(Int_t i=0; i<kssdchipcableslaynumber; i++){
3031 vertexposition[i][0] = new TVector3(0.,SSDChipCablesHeigth
3032 - fgkSSDChipCablesHeight[0]-i*fgkSSDChipCablesHeight[1]);
3033 vertexposition[i][1] = new TVector3(0.,SSDChipCablesHeigth
3034 - i*fgkSSDChipCablesHeight[0]);
3035 vertexposition[i][2*(nedges+1)+2] =
3036 new TVector3(fgkSSDChipWidth+ssdchipcablesradius[0]
3037 + fgkSSDChipCablesWidth[1]
3038 + fgkSSDChipCablesWidth[2],
3039 ((1.-i)*fgkSSDChipCablesHeight[i]
3040 + fgkSSDChipCablesHeight[1]));
3041 vertexposition[i][2*(nedges+1)+3] =
3042 new TVector3(vertexposition[i][2*(nedges+1)+2]->X(),
3043 vertexposition[i][2*(nedges+1)+2]->Y()
3044 - fgkSSDChipCablesHeight[i]);
3045 for(Int_t j=0; j<nedges+1; j++){
3046 angle = 0.5*phi+TMath::Power(-1,i+1)*j*deltaphi;
3047 vertex->SetX(ssdchipcablesradius[0]*CosD(angle));
3048 vertex->SetY(ssdchipcablesradius[0]*SinD(angle));
3049 vertexposition[0][(nedges+1)*i+j+2] =
3050 new TVector3(*vertex+*transvector[i]);
3051 vertexposition[1][(nedges+1)*i+j+2] =
3052 new TVector3(vertex->X()*ratio[2*i]+transvector[i]->X(),
3053 vertex->Y()*ratio[2*i]+transvector[i]->Y());
3054 vertexposition[0][(4-i)*(nedges+1)+4-j-1] =
3055 new TVector3(*vertexposition[1][(nedges+1)*i+j+2]);
3056 vertexposition[1][(4-i)*(nedges+1)+4-j-1] =
3057 new TVector3(vertex->X()*ratio[2*i+1]
3058 + transvector[i]->X(),
3059 vertex->Y()*ratio[2*i+1]
3060 + transvector[i]->Y());
3061 }
3062 }
3063 for(Int_t i=0; i<kssdchipcableslaynumber; i++){
3064 for(Int_t j=0; j<kvertexnumber; j++){
3065 xvertexpoints[i][j] = vertexposition[i][j]->X();
3066 yvertexpoints[i][j] = vertexposition[i][j]->Y();
3067 }
3068 ssdchipcableshape[kssdchipcablesnumber*k+i] = new TGeoXtru(2);
3069 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefinePolygon(kvertexnumber,
3070 xvertexpoints[i],yvertexpoints[i]);
3071 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefineSection(0,-0.5*fgkSSDChipCablesLength[1]);
3072 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefineSection(1,+0.5*fgkSSDChipCablesLength[1]);
3073 ssdchipcable[kssdchipcablesnumber*k+i] =
3074 new TGeoVolume(ssdchipcablename[kssdchipcablesnumber*k+i],
3075 ssdchipcableshape[kssdchipcablesnumber*k+i],
3076 (kssdchipcablesnumber*k+i)%2==0?
3077 fSSDAlTraceChipCableMedium:fSSDKaptonChipCableMedium);
3078 ssdchipcable[kssdchipcablesnumber*k+i]->SetLineColor(ssdchipcablescolor[i]);
3079 }
3080 for(Int_t i=0; i<kssdchipcableslaynumber; i++)
3081 for(Int_t j=0; j<kvertexnumber; j++) delete vertexposition[i][j];
3082 }
3083 /////////////////////////////////////////////////////////////
3084 // Mother Volume definition
3085 /////////////////////////////////////////////////////////////
3086 Double_t ssdchipseparation = fgkSSDSensorLength
3087 - 2.*fgkSSDModuleStiffenerPosition[1]
3088 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
3089 - 0.5*fgkSSDChipWidth)-fgkSSDChipWidth;
3090 Double_t boxorigin[3] = {-0.5*ssdchipseparation,0.,0.5*SSDChipCablesHeigth};
3091 Double_t dx = ssdchipseparation+2.*(fgkSSDChipWidth+ssdchipcablesradius[0]
3092 +fgkSSDChipCablesWidth[1]
3093 +fgkSSDChipCablesWidth[2]);
3094 Double_t dy = fgkSSDChipCablesLength[1];
3095 Double_t dz = SSDChipCablesHeigth;
3096 TGeoBBox* ssdchipcablesmotherbox = new TGeoBBox(0.5*dx,0.5*dy,0.5*dz,boxorigin);
3097 TGeoVolume* ssdchipcablesmother = new TGeoVolume("SSDChipCablesMother",
3098 ssdchipcablesmotherbox,fSSDAir);
3099 /////////////////////////////////////////////////////////////
3100 // Rotation and Translation Definition for positioning
3101 /////////////////////////////////////////////////////////////
3102 TGeoRotation* ssdchipcablesrot[5];
3103 ssdchipcablesrot[0] = new TGeoRotation("",90.,180.,-90);
3104 ssdchipcablesrot[1] = new TGeoRotation("",0.0,90.0,0.0);
3105 ssdchipcablesrot[2] = new TGeoRotation((*ssdchipcablesrot[1])*(*ssdchipcablesrot[0]));
3106 ssdchipcablesrot[3] = new TGeoRotation("",180.,0.0,0.0);
3107 ssdchipcablesrot[4] = new TGeoRotation((*ssdchipcablesrot[3])*(*ssdchipcablesrot[2]));
3108 TGeoCombiTrans* ssdchipcablescombitrans = new TGeoCombiTrans(-ssdchipseparation,
3109 0.,0.,ssdchipcablesrot[2]);
3110 ssdchipcablesmother->AddNode(ssdchipcable[0],1,ssdchipcablesrot[4]);
3111 ssdchipcablesmother->AddNode(ssdchipcable[1],1,ssdchipcablesrot[4]);
3112 ssdchipcablesmother->AddNode(ssdchipcable[2],1,ssdchipcablescombitrans);
3113 ssdchipcablesmother->AddNode(ssdchipcable[3],1,ssdchipcablescombitrans);
3114 /////////////////////////////////////////////////////////////
3115 // Deallocating memory
3116 /////////////////////////////////////////////////////////////
3117 for(Int_t i=0; i<kssdchipcableslaynumber;i++){
3118 delete [] xvertexpoints[i];
3119 delete [] yvertexpoints[i];
3120 }
3121 for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete [] vertexposition[i];
3122 for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete transvector[i];
3123 delete vertex;
3124 delete ssdchipcablesrot[0];
3125 delete ssdchipcablesrot[1];
3126 delete ssdchipcablesrot[3];
3127 /////////////////////////////////////////////////////////////
3128 return ssdchipcablesmother;
3129}
3130///////////////////////////////////////////////////////////////////////////////
3131TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
3132 /////////////////////////////////////////////////////////////
3133 // SSD Chip Assembly
3134 /////////////////////////////////////////////////////////////
3135 TGeoVolume* ssdchipassembly = GetSSDChips();
3136 TList* ssdchipsystemlist = new TList();
3137 const Int_t knedges = 20;
3138 const Int_t kchipsystemnumber = 2;
3139 /////////////////////////////////////////////////////////////
3140 // Mother Volume containing SSDChipSystem
3141 /////////////////////////////////////////////////////////////
3142 TGeoXtru* chipsystemothershape[kchipsystemnumber];
3143 for(Int_t i=0; i<kchipsystemnumber; i++) chipsystemothershape[i] = new TGeoXtru(2);
3144 const Int_t kmothervertexnumber = 12;
3145 Double_t xmothervertex[kchipsystemnumber][kmothervertexnumber];
3146 Double_t ymothervertex[kchipsystemnumber][kmothervertexnumber];
3147 Double_t ssdchipcablesradius[kchipsystemnumber];
3148 Double_t ssdchipseparation = fgkSSDSensorLength
3149 - 2.*fgkSSDModuleStiffenerPosition[1]
3150 - 2.*(fgkSSDStiffenerWidth
3151 - fgkSSDStiffenerToChipDist-0.5*fgkSSDChipWidth);
3152 for(Int_t i=0; i<kchipsystemnumber; i++)
3153 ssdchipcablesradius[i] = 0.25*(fgkSSDChipCablesHeight[i+2]
3154 - fgkSSDChipCablesHeight[0]
3155 - fgkSSDChipCablesHeight[1]);
3156 ///////////////////////
3157 // Setting the vertices
3158 ///////////////////////
3159 xmothervertex[0][0] = -0.5*fgkSSDChipCablesLength[1];
3160 xmothervertex[0][1] = xmothervertex[0][0];
3161 xmothervertex[0][2] = (fgkSSDChipNumber-1)*(fgkSSDChipLength
3162 + fgkSSDChipSeparationLength)+0.5*fgkSSDChipCablesLength[1];
3163 xmothervertex[0][3] = xmothervertex[0][2];
3164 xmothervertex[0][4] = 0.5*fgkSSDChipCablesLength[1];
3165 xmothervertex[0][5] = xmothervertex[0][4];
3166 xmothervertex[0][6] = xmothervertex[0][2]-0.5*fgkSSDChipCablesLength[1];
3167 xmothervertex[0][7] = xmothervertex[0][6];
3168 xmothervertex[0][8] = 0.0;
3169 xmothervertex[0][9] = xmothervertex[0][8];
3170 xmothervertex[0][10] = xmothervertex[0][4];
3171 xmothervertex[0][11] = xmothervertex[0][10];
3172 for(Int_t i=0; i<kmothervertexnumber; i++)
3173 xmothervertex[1][i] = xmothervertex[0][i];
3174 for(Int_t i=0; i<kchipsystemnumber; i++){
3175 ymothervertex[i][0] = -0.5*fgkSSDChipWidth-ssdchipcablesradius[i]
3176 - fgkSSDChipCablesWidth[1]-fgkSSDChipCablesWidth[2];
3177 ymothervertex[i][1] = ssdchipseparation-ymothervertex[i][0];
3178 ymothervertex[i][2] = ymothervertex[i][1];
3179 ymothervertex[i][3] = ymothervertex[i][0];
3180 ymothervertex[i][4] = ymothervertex[i][0];
3181 ymothervertex[i][5] = 0.5*fgkSSDChipWidth;
3182 ymothervertex[i][6] = ymothervertex[i][5];
3183 ymothervertex[i][7] = ssdchipseparation-0.5*fgkSSDChipWidth;
3184 ymothervertex[i][8] = ymothervertex[i][7];
3185 ymothervertex[i][9] = ymothervertex[i][5];
3186 ymothervertex[i][10] = ymothervertex[i][5];
3187 ymothervertex[i][11] = ymothervertex[i][4];
3188 }
3189 //////////////////////////////////////////////////////////
3190 TGeoVolume* chipsystemother[kchipsystemnumber];
3191 const char* chipsytemothername[kchipsystemnumber] =
3192 {"SSDChipSytemother1","SSDChipSytemother2"};
3193 for(Int_t i=0; i<kchipsystemnumber; i++){
3194 chipsystemothershape[i]->DefinePolygon(kmothervertexnumber,
3195 xmothervertex[i],ymothervertex[i]);
3196 chipsystemothershape[i]->DefineSection(0,-fgkSSDChipCablesHeight[i+2]
3197 -0.5*fgkSSDChipHeight);
3198 chipsystemothershape[i]->DefineSection(1,0.5*fgkSSDChipHeight);
3199 chipsystemother[i] = new TGeoVolume(chipsytemothername[i],
3200 chipsystemothershape[i],fSSDAir);
3201 }
3202 /////////////////////////////////////////////////////////////
3203 // SSD Chip Cables
3204 /////////////////////////////////////////////////////////////
3205 TGeoVolume* ssdchipcables[kchipsystemnumber];
3206 TGeoRotation** ssdchipcablesrot[kchipsystemnumber];
3207 TGeoTranslation** ssdchipcablestrans[kchipsystemnumber];
3208 TGeoCombiTrans** ssdchipcablescombitrans[kchipsystemnumber];
3209 //////////////////
3210 for(Int_t i=0; i<kchipsystemnumber; i++){
3211 ssdchipcables[i] =
3212 GetSSDChipCables(fgkSSDChipCablesHeight[i+2],knedges);
3213 ssdchipcablestrans[i] = new TGeoTranslation*[fgkSSDChipNumber];
3214 ssdchipcablesrot[i] = new TGeoRotation*[fgkSSDChipNumber];
3215 ssdchipcablescombitrans[i] = new TGeoCombiTrans*[fgkSSDChipNumber];
3216 }
3217 for(Int_t i=0; i<kchipsystemnumber; i++){
3218 for(Int_t j=0; j<fgkSSDChipNumber; j++){
3219 ssdchipcablestrans[i][j] = new TGeoTranslation();
3220 ssdchipcablesrot[i][j] = new TGeoRotation();
3221 ssdchipcablescombitrans[i][j] = new TGeoCombiTrans();
3222 ssdchipcablesrot[i][j]->SetAngles(-90.0,0.0,0.0);
3223 ssdchipcablestrans[i][j]->SetTranslation(j*(fgkSSDChipLength
3224 + fgkSSDChipSeparationLength),
3225 0.5*fgkSSDChipWidth,
3226 - 0.5*fgkSSDChipHeight
3227 - fgkSSDChipCablesHeight[i+2]);
3228 ssdchipcablescombitrans[i][j]->SetRotation(*ssdchipcablesrot[i][j]);
3229 ssdchipcablescombitrans[i][j]->SetTranslation(*ssdchipcablestrans[i][j]);
3230 chipsystemother[i]->AddNode(ssdchipcables[i],j+1,ssdchipcablescombitrans[i][j]);
3231
3232 }
3233 chipsystemother[i]->AddNode(ssdchipassembly,i+1);
3234 ssdchipsystemlist->Add(chipsystemother[i]);
3235 }
3236 /////////////////////////////////////////////////////////////
3237 // Deallocating memory
3238 /////////////////////////////////////////////////////////////
3239 for(Int_t i=0; i<kchipsystemnumber; i++){
3240 for(Int_t j=0; j<fgkSSDChipNumber; j++){
3241 delete ssdchipcablesrot[i][j];
3242 delete ssdchipcablestrans[i][j];
3243 }
3244 delete ssdchipcablesrot[i];
3245 delete ssdchipcablestrans[i];
3246 }
3247 /////////////////////////////////////////////////////////////
3248 return ssdchipsystemlist;
3249}
3250///////////////////////////////////////////////////////////////////////////////
3251TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
3252 /////////////////////////////////////////////////////////////
3253 // SSD Chip Assembly Generation
3254 /////////////////////////////////////////////////////////////
3255 const Int_t kssdchiprownumber = 2;
3256 TGeoBBox* ssdchipcompshape[2];
3257 ssdchipcompshape[0] = new TGeoBBox("SSDChipCompShape",
3258 0.5*fgkSSDChipLength,
3259 0.5*fgkSSDChipWidth,
3260 0.5*(fgkSSDChipHeight-fgkSSDChipGlueHeight));
3261 ssdchipcompshape[1] = new TGeoBBox("SSDChipGlueCompShape",
3262 0.5*fgkSSDChipLength,
3263 0.5*fgkSSDChipWidth,
3264 0.5*fgkSSDChipGlueHeight);
3265 TGeoVolume* ssdchipcomp[2];
3266 ssdchipcomp[0] = new TGeoVolume("SSDChipComp",ssdchipcompshape[0],fSSDChipMedium);
3267 ssdchipcomp[1] = new TGeoVolume("SSDChipGlueComp",ssdchipcompshape[1],
3268 fSSDChipGlueMedium);
3269 ssdchipcomp[0]->SetLineColor(fColorSilicon);
3270 ssdchipcomp[1]->SetLineColor(fColorEpoxy);
3271 TGeoTranslation* ssdchipcomptrans[2];
3272 ssdchipcomptrans[0] = new TGeoTranslation(0.,0.,-ssdchipcompshape[1]->GetDZ());
3273 ssdchipcomptrans[1] = new TGeoTranslation(0.,0.,ssdchipcompshape[0]->GetDZ());
3274 /////////////////////////////////////////////////////////////
3275 // Virtual Volume containing SSDChip
3276 /////////////////////////////////////////////////////////////
3277 TGeoBBox* ssdvirtualchipshape = new TGeoBBox("SSDChipShape",0.5*fgkSSDChipLength,
3278 0.5*fgkSSDChipWidth,
3279 0.5*fgkSSDChipHeight);
3280 TGeoVolume* ssdchip = new TGeoVolume("SSDChip",ssdvirtualchipshape,fSSDAir);
3281 /////////////////////////////////////////////////////////////
3282 for(Int_t i=0; i<2; i++) ssdchip->AddNode(ssdchipcomp[i],1,ssdchipcomptrans[i]);
3283 Double_t ssdchipseparation[2] = {fgkSSDChipLength+fgkSSDChipSeparationLength,