1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //*************************************************************************
19 // SSD geometry, based on ROOT geometrical modeler
21 // Enrico Cattaruzza ecattar@ts.infn.it
22 //*************************************************************************
24 #include "TGeoVolume.h"
25 #include "TGeoMatrix.h"
26 #include <TGeoManager.h>
30 #include "TGeoMatrix.h"
31 #include "TGeoCompositeShape.h"
32 #include "TGeoBoolNode.h"
36 #include "TGeoTorus.h"
39 #include "TRotation.h"
40 #include "AliITSv11GeometrySSD.h"
41 #include "Riostream.h"
42 /////////////////////////////////////////////////////////////////////////////////
43 // Names of the Sensitive Volumes of Layer 5 and Layer 6
44 /////////////////////////////////////////////////////////////////////////////////
45 const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName5 = "ITSssdSensitivL5";
46 const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName6 = "ITSssdSensitivL6";
47 /////////////////////////////////////////////////////////////////////////////////
48 //Parameters for SSD Geometry
49 /////////////////////////////////////////////////////////////////////////////////
50 // Variable for Vertical Disalignement of Modules
51 /////////////////////////////////////////////////////////////////////////////////
52 const Double_t AliITSv11GeometrySSD::fgkSSDTolerance = 0.0001*fgkmm;
53 const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment = 0.2*fgkmm;
54 const Double_t AliITSv11GeometrySSD::fgkSSDModuleSideDisalignment = 0.2*fgkmm;
56 const Double_t AliITSv11GeometrySSD::fgkSSDLadderVerticalDisalignment = 0.520*fgkmm;
57 /////////////////////////////////////////////////////////////////////////////////
58 // Layer5 (lengths are in mm and angles in degrees)
59 /////////////////////////////////////////////////////////////////////////////////
60 const Double_t AliITSv11GeometrySSD::fgkSSDLay5LadderLength = 950.7*fgkmm;
61 const Int_t AliITSv11GeometrySSD::fgkSSDLay5SensorsNumber = 22;
62 const Int_t AliITSv11GeometrySSD::fgkSSDLay5LadderNumber = 34;
63 const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMin = 378.0*fgkmm;
64 const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMax = 384.0*fgkmm;
65 const Double_t AliITSv11GeometrySSD::fgkLay5CenterITSPosition = 467.85*fgkmm;
66 /////////////////////////////////////////////////////////////////////////////////
67 // Layer6 (lengths are in mm and angles in degrees)
68 /////////////////////////////////////////////////////////////////////////////////
69 const Double_t AliITSv11GeometrySSD::fgkSSDLay6LadderLength = 1068.0*fgkmm;
70 const Int_t AliITSv11GeometrySSD::fgkSSDLay6SensorsNumber = 25;
71 const Int_t AliITSv11GeometrySSD::fgkSSDLay6LadderNumber = 38;
72 const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMin = 428.0*fgkmm;
73 const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMax = 434.0*fgkmm;
74 const Double_t AliITSv11GeometrySSD::fgkLay6CenterITSPosition = 526.50*fgkmm;
75 /////////////////////////////////////////////////////////////////////////////////
76 // SSD Chips and Hybrid (lengths are in mm and angles in degrees)
77 /////////////////////////////////////////////////////////////////////////////////
78 const Int_t AliITSv11GeometrySSD::fgkSSDChipNumber = 6;
79 const Double_t AliITSv11GeometrySSD::fgkSSDChipLength = 11.100*fgkmm;
80 const Double_t AliITSv11GeometrySSD::fgkSSDChipWidth = 3.850*fgkmm;
81 const Double_t AliITSv11GeometrySSD::fgkSSDChipHeight = 0.180*fgkmm;
82 const Double_t AliITSv11GeometrySSD::fgkSSDChipSeparationLength = 1.000*fgkmm;
83 const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueLength = fgkSSDChipLength;
84 const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueWidth = fgkSSDChipWidth;
85 const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueHeight = 0.030*fgkmm;
86 /////////////////////////////////////////////////////////////////////////////////
87 // Stiffener (lengths are in mm and angles in degrees)
88 /////////////////////////////////////////////////////////////////////////////////
89 const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerLength = 73.000*fgkmm;
90 const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerWidth = 6.500*fgkmm;
91 //const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 3.315;
92 const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 0.315*fgkmm;
93 const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerToChipDist = 2.500*fgkmm;
94 const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Length = 1.600*fgkmm;
95 const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Width = 0.870*fgkmm;
96 const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Height = 0.800*fgkmm;
97 const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Length = 4.600*fgkmm;
98 const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Width = 3.400*fgkmm;
99 const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Height = 0.700*fgkmm; // multiplied by 0.5
100 const Double_t AliITSv11GeometrySSD::fgkSSDWireLength = 30.000*fgkmm;
101 const Double_t AliITSv11GeometrySSD::fgkSSDWireRadius = 0.185*fgkmm;
102 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorPosition[2] =
103 {44.32*fgkmm, 0.33*fgkmm};
104 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorSeparation = 0.44*fgkmm;
105 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorLength = 2.16*fgkmm;
106 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorWidth = 3.60*fgkmm;
107 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorHeight =
108 0.25*fgkSSDStiffenerHeight;
109 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorAlHeight = 0.030*fgkmm;
110 const Double_t AliITSv11GeometrySSD::fgkSSDConnectorNiHeight = 0.002*fgkmm;
111 /////////////////////////////////////////////////////////////////////////////////
112 // Cooling Block (lengths are in mm and angles in degrees)
113 /////////////////////////////////////////////////////////////////////////////////
114 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockLength = 3.000*fgkmm;
115 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockWidth = 4.000*fgkmm;
116 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHeight[3] =
117 {1.950*fgkmm, 0.240*fgkmm, 0.300*fgkmm};
118 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleRadius[2] =
119 {1.000*fgkmm, 0.120*fgkmm};
120 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleLength[2] =
121 {1.900*fgkmm, 0.400*fgkmm};
122 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleCenter =
124 const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleHeight =
126 /////////////////////////////////////////////////////////////////////////////////
127 // SSD Sensor (lengths are in mm and angles in degrees)
128 /////////////////////////////////////////////////////////////////////////////////
129 const char* AliITSv11GeometrySSD::fgkSSDSensitiveVolName =
130 "SSDSensorSensitiveVol";
131 const Double_t AliITSv11GeometrySSD::fgkSSDSensorLength = 42.000*fgkmm;
132 const Double_t AliITSv11GeometrySSD::fgkSSDSensorHeight = 0.300*fgkmm;
133 const Double_t AliITSv11GeometrySSD::fgkSSDSensorWidth = 75.000*fgkmm;
134 const Double_t AliITSv11GeometrySSD::fgkSSDSensorOverlap =
135 fgkSSDSensorLength-39.1*fgkmm;
136 const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveLength = 1.*fgkmm;
137 const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveWidth = 1.*fgkmm;
138 /////////////////////////////////////////////////////////////////////////////////
139 // Flex (lengths are in mm and angles in degrees)
140 /////////////////////////////////////////////////////////////////////////////////
141 const Double_t AliITSv11GeometrySSD::fgkSSDFlexFullLength = 106.000*fgkmm;
142 const Double_t AliITSv11GeometrySSD::fgkSSDFlexLength[4] =
143 {0.5 * (fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
144 + (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
145 0.5 * (fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
146 + (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength)
147 - 4.000*fgkmm, 9.500*fgkmm, 10.000*fgkmm};
148 const Double_t AliITSv11GeometrySSD::fgkSSDFlexWidth[2] =
149 { 9.340*fgkmm, 5.380*fgkmm};
150 const Double_t AliITSv11GeometrySSD::fgkSSDFlexHeight[2] =
151 { 0.030*fgkmm, 0.020*fgkmm};
152 const Double_t AliITSv11GeometrySSD::fgkSSDFlexAngle = 30.000;
153 const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleLength = 1.430*fgkmm;
154 const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleWidth = 3.000*fgkmm;
155 const Double_t AliITSv11GeometrySSD::fgkSSDEndFlexCompLength[6] =
156 {3.30*fgkmm,4.12*fgkmm,4.22*fgkmm,1.70*fgkmm,0.75*fgkmm,7.18*fgkmm};
157 const Double_t AliITSv11GeometrySSD:: fgkSSDEndFlexCompWidth[3] =
158 {15.03*fgkmm,23.48*fgkmm,12.28*fgkmm};
159 /////////////////////////////////////////////////////////////////////////////////
160 // SSD Ladder Cable (lengths are in mm and angles in degrees)
161 /////////////////////////////////////////////////////////////////////////////////
162 const Double_t AliITSv11GeometrySSD::fgkSSDLadderCableWidth = 23.5*fgkmm;
163 /////////////////////////////////////////////////////////////////////////////////
164 // SSD Module (lengths are in mm and angles in degrees)
165 /////////////////////////////////////////////////////////////////////////////////
166 const Double_t AliITSv11GeometrySSD::fgkSSDModuleStiffenerPosition[2] =
167 { 1.000*fgkmm, 3.900*fgkmm};
168 const Double_t AliITSv11GeometrySSD::fgkSSDModuleSensorSupportDistance =
170 const Double_t AliITSv11GeometrySSD::fgkSSDModuleCoolingBlockToSensor =
172 /////////////////////////////////////////////////////////////////////////////////
173 // Sensor Support (lengths are in mm and angles in degrees)
174 /////////////////////////////////////////////////////////////////////////////////
175 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportLength =
177 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth =
179 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] =
180 { 4.620*fgkmm-fgkSSDModuleVerticalDisalignment,
181 5.220*fgkmm-fgkSSDModuleVerticalDisalignment};
182 //const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] =
183 // { 4.520*fgkmm, 5.130*fgkmm};
184 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportThickness[2] =
185 { 0.450*fgkmm, 0.450*fgkmm};
186 const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportPosition
187 = 0.5 * (fgkSSDModuleSensorSupportDistance
188 + fgkSSDSensorSideSupportThickness[0])
189 - fgkSSDSensorSideSupportLength;
190 const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportLength =
192 const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportWidth =
194 const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportHeight[2]
195 = {fgkSSDSensorSideSupportHeight[0]
196 + fgkSSDSensorSideSupportThickness[0],
197 fgkSSDSensorSideSupportHeight[1]
198 + fgkSSDSensorSideSupportThickness[1]};
199 const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportThickness[2]
200 = {fgkSSDSensorSideSupportThickness[0],
201 fgkSSDSensorSideSupportThickness[1]};
202 const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportPosition =
204 /////////////////////////////////////////////////////////////////////////////////
205 // Chip Cables (lengths are in mm and angles in degrees)
206 /////////////////////////////////////////////////////////////////////////////////
207 const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesLength[2] =
208 {73.12/fgkSSDChipNumber*fgkmm,fgkSSDChipLength+2.*0.19*fgkmm};
209 const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesHeight[4] =
210 { 0.014*fgkmm, 0.010*fgkmm, fgkSSDModuleCoolingBlockToSensor
211 - (fgkSSDSensorSideSupportHeight[1]
212 - fgkSSDSensorSideSupportHeight[0])
213 - fgkSSDModuleVerticalDisalignment
214 - fgkSSDCoolingBlockHoleCenter
215 - fgkSSDStiffenerHeight
216 - fgkSSDChipHeight-fgkSSDSensorHeight,
217 fgkSSDModuleCoolingBlockToSensor
218 - fgkSSDModuleVerticalDisalignment
219 - fgkSSDCoolingBlockHoleCenter
220 - fgkSSDStiffenerHeight
221 - fgkSSDChipHeight-fgkSSDSensorHeight};
222 const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesWidth[3] =
223 { 11.000*fgkmm, 0.800*fgkmm, 0.600*fgkmm};
224 /////////////////////////////////////////////////////////////////////////////////
225 // Carbon Fiber Junction Parameters (lengths are in mm and angles in degrees)
226 /////////////////////////////////////////////////////////////////////////////////
227 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
229 //const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
231 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionWidth =
232 fgkSSDSensorLength-fgkSSDSensorOverlap;
233 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionEdge[2] =
234 { 0.86*fgkmm, 0.30*fgkmm};
235 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionAngle[2] =
237 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionToSensorSupport =
239 /////////////////////////////////////////////////////////////////////////////////
240 //Carbon Fiber Parameters (lengths are in mm and angles in degrees)
241 /////////////////////////////////////////////////////////////////////////////////
242 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleLength
243 = fgkSSDModuleSensorSupportDistance
244 - 2. * fgkCarbonFiberJunctionToSensorSupport;
245 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleAngle = 60.00;
246 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportTopEdgeDist[2] =
247 { 0.751*fgkmm, 0.482*fgkmm};
248 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportEdgeLength =
250 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportWidth = 0.950*fgkmm;
251 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportXAxisLength
252 = fgkCarbonFiberTriangleLength
253 - 0.5*fgkCarbonFiberSupportTopEdgeDist[1]
254 / TMath::Cos(fgkCarbonFiberTriangleAngle
255 * TMath::DegToRad());
256 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportYAxisLength
257 = 0.5*(fgkCarbonFiberJunctionWidth
258 - fgkCarbonFiberSupportWidth)
259 - fgkCarbonFiberSupportTopEdgeDist[0]
260 - fgkCarbonFiberSupportWidth;
261 /////////////////////////////////////////////////////////////////////////////////
262 // Carbon Fiber Lower Support Parameters (lengths are in mm)
263 /////////////////////////////////////////////////////////////////////////////////
264 const Double_t AliITSv11GeometrySSD::fgkLowerSupportToSensorZ = 11.575*fgkmm;
265 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportWidth
267 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportLowerLenght
269 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportHeight
271 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumeSeparation
272 = 0.5*fgkCarbonFiberSupportWidth;
273 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportTransverseWidth
274 = fgkCarbonFiberJunctionWidth
275 - 2. * (fgkCarbonFiberLowerSupportWidth
276 + fgkCarbonFiberLowerSupportVolumeSeparation);
277 const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumePosition[2]
278 = {fgkCarbonFiberLowerSupportWidth
279 + fgkCarbonFiberLowerSupportVolumeSeparation,
280 fgkCarbonFiberLowerSupportWidth
281 + fgkCarbonFiberLowerSupportVolumeSeparation
282 + fgkCarbonFiberLowerSupportTransverseWidth};
283 /////////////////////////////////////////////////////////////////////////////////
284 // End Ladder Carbon Fiber Junction Parameters (lengths are in mm and angles in degrees)
285 /////////////////////////////////////////////////////////////////////////////////
286 const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberLowerJunctionLength[2] =
287 {0.5 * (fgkSSDLay5LadderLength
288 - fgkSSDLay5SensorsNumber
289 * fgkCarbonFiberJunctionWidth
290 - fgkCarbonFiberLowerSupportWidth),
291 0.5 * (fgkSSDLay5LadderLength
292 - fgkSSDLay5SensorsNumber
293 * fgkCarbonFiberJunctionWidth
294 + fgkCarbonFiberLowerSupportWidth)};
295 const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberUpperJunctionLength[2] =
296 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-20.4*fgkmm,
297 fgkEndLadderCarbonFiberLowerJunctionLength[1]-20.6*fgkmm};
298 const Double_t AliITSv11GeometrySSD::fgkEndLadderMountingBlockPosition[2] =
299 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-16.50*fgkmm,
300 fgkEndLadderCarbonFiberLowerJunctionLength[1]-31.50*fgkmm};
301 const Double_t AliITSv11GeometrySSD::fgkendladdercoolingsupportdistance[3] =
302 {15.0*fgkmm, 13.5*fgkmm, 14.5*fgkmm};
303 /////////////////////////////////////////////////////////////////////////////////
304 // Cooling Tube Support (lengths are in mm and angles in degrees)
305 /////////////////////////////////////////////////////////////////////////////////
306 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmax = 1.45*fgkmm;
307 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmin
308 = fgkSSDCoolingBlockHoleRadius[0];
309 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportLength = 8.55*fgkmm;
310 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportHeight = 0.85*fgkmm;
311 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportWidth = 2.00*fgkmm;
312 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportSeparation =
313 fgkSSDSensorLength-2.*fgkSSDSensorOverlap;
314 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportToCarbonFiber =
316 /////////////////////////////////////////////////////////////////////////////////
317 // Cooling Tube (lengths are in mm and angles in degrees)
318 /////////////////////////////////////////////////////////////////////////////////
319 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmax = fgkCoolingTubeSupportRmin;
320 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmin = 0.96*fgkmm;
321 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeLength =
322 fgkCarbonFiberJunctionWidth;
323 const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSeparation =
324 fgkSSDModuleSensorSupportDistance
325 + fgkSSDCoolingBlockLength;
326 const Double_t AliITSv11GeometrySSD::fgkMountingBlockToSensorSupport = 30.7*fgkmm;
327 /////////////////////////////////////////////////////////////////////////////////
328 // SSD Mounting Block Parameters (lengths are in mm and angles in degrees)
329 /////////////////////////////////////////////////////////////////////////////////
330 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockLength[3] =
331 { 60.0*fgkmm, 42.2*fgkmm, 34.0*fgkmm};
332 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHeight[4] =
333 { 4.0*fgkmm, 8.0*fgkmm, 5.0*fgkmm, 0.2*fgkmm};
334 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockWidth =
336 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidAngle =
338 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidHeight =
339 0.30*(fgkSSDMountingBlockHeight[1]-fgkSSDMountingBlockHeight[2]);
340 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidUpBasis =
342 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeLength[2] =
343 { 56.0*fgkmm, 12.0*fgkmm};
344 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeWidth[2] =
345 { 5.0*fgkmm, 2.9*fgkmm};
346 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleRadius =
348 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleEdge =
350 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeight =
352 const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleRadius[2] =
353 { 1.5*fgkmm,fgkSSDMountingBlockScrewHoleEdge/6.};
354 /////////////////////////////////////////////////////////////////////////////////
355 // SSD Mounting Block Clip Parameters (lengths are in mm and angles in degrees)
356 /////////////////////////////////////////////////////////////////////////////////
357 const Double_t AliITSv11GeometrySSD::fgkMountingBlockClipLength = 15.1*fgkmm;
358 const Double_t AliITSv11GeometrySSD::fgkMountingBlockClipThickness = 0.3*fgkmm;
359 const Double_t AliITSv11GeometrySSD::fgkMountingBlockClibScrewRadius = 1.6*fgkmm;
360 const Double_t AliITSv11GeometrySSD::fgkMountingBlockClibScrewPosition = 4.0*fgkmm;
361 const Double_t AliITSv11GeometrySSD::fgkMountingBlockClibWidth = 9.0*fgkmm;
362 /////////////////////////////////////////////////////////////////////////////////
363 // SSD Mounting Block Support Parameters (lengths are in mm and angles in degrees)
364 /////////////////////////////////////////////////////////////////////////////////
365 const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportWidth[2] = {9.5*fgkmm,10.0*fgkmm};
366 const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportDownHeight = 4.0*fgkmm;
367 const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportRadius[2] = {fgkSSDLay5RadiusMin
368 - fgkSSDMountingBlockHeight[1]
369 + 0.5*fgkCoolingTubeSupportHeight
370 + fgkSSDModuleCoolingBlockToSensor
371 - fgkMountingBlockSupportDownHeight,
373 - fgkSSDMountingBlockHeight[1]
374 + 0.5*fgkCoolingTubeSupportHeight
375 + fgkSSDModuleCoolingBlockToSensor
376 - fgkMountingBlockSupportDownHeight};
377 const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportUpHeight[2] = {fgkSSDLay5RadiusMax
378 - fgkSSDMountingBlockHeight[1]
379 + 0.5*fgkCoolingTubeSupportHeight
380 + fgkSSDModuleCoolingBlockToSensor
381 - fgkMountingBlockSupportRadius[0],
383 - fgkSSDMountingBlockHeight[1]
384 + 0.5*fgkCoolingTubeSupportHeight
385 + fgkSSDModuleCoolingBlockToSensor
386 - fgkMountingBlockSupportRadius[1]};
387 const Double_t AliITSv11GeometrySSD::fgkLadderSupportHeight = 10.0*fgkmm; // To be verified
388 const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay5Position = 451.35*fgkmm;
389 const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay6Position = 510.00*fgkmm;
390 /////////////////////////////////////////////////////////////////////////////////
391 // SSD End Cap Cover Plate Parameters (lengths are in mm and angles in degrees)
392 /////////////////////////////////////////////////////////////////////////////////
393 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateSmallHoleRadius = 1.25*fgkmm;
394 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateBigHoleRadius = 2.45*fgkmm;
395 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateThickness = 0.5*fgkmm;
396 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateSmallHoleSeparation[3] =
397 {16.5*fgkmm,22.0*fgkmm,7.*fgkmm};
398 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateLength[6] =
399 {7.*fgkmm,55.*fgkmm,8.0*fgkmm,53.*fgkmm,61.0*fgkmm,25.5*fgkmm};
400 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateWidth[3] =
401 {68.5*fgkmm,75.5*fgkmm,6.5*fgkmm};
402 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateScrewRadiusMin = 0.750*fgkmm;
403 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateScrewRadiusMax = 2.*fgkmm;
404 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateClipLength = 10.4*fgkmm;
405 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateClipWidth = 6.0*fgkmm;
406 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateDownClipLength = 5.7*fgkmm;
407 const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateDownClipWidth = 5.0*fgkmm;
408 /////////////////////////////////////////////////////////////////////////////////
409 // SSD End Cap Kapton Foil Parameters (lengths are in mm and angles in degrees)
410 /////////////////////////////////////////////////////////////////////////////////
411 const Double_t AliITSv11GeometrySSD::fgkEndCapKaptonFoilThickness = 0.4*fgkmm;
412 const Double_t AliITSv11GeometrySSD::fgkEndCapKaptonFoilLength = 68.0*fgkmm;
413 const Double_t AliITSv11GeometrySSD::fgkEndCapKaptonFoilWidth = 75.0*fgkmm;
414 /////////////////////////////////////////////////////////////////////////////////
415 // SSD End Cap Cooling Tube Parameters (lengths are in mm and angles in degrees)
416 /////////////////////////////////////////////////////////////////////////////////
417 const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeAxialRadius[2] =
418 {10.5*fgkmm,9.25*fgkmm};
419 const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeRadiusMin = 1.3*fgkmm;
420 const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeRadiusMax = 1.5*fgkmm;
421 const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeAngle[5] =
422 {182.3,177.9,84.4,70.0,35.0};
423 const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeLength[5] =
424 {49.5*fgkmm,41.7*fgkmm,47.6*fgkmm,5.0*fgkmm};
425 const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeToCoverSide = 13.0*fgkmm;
426 /////////////////////////////////////////////////////////////////////////////////
427 // SSD End Cap Cover Side Parameters (lengths are in mm and angles in degrees)
428 /////////////////////////////////////////////////////////////////////////////////
429 const Double_t AliITSv11GeometrySSD::fgkEndCapSideCoverLength[5] = {3.5*fgkmm,
430 6.5*fgkmm,75.0*fgkmm,8.0*fgkmm,2.0*fgkmm};
431 const Double_t AliITSv11GeometrySSD::fgkEndCapSideCoverWidth[7] = {30.9*fgkmm,
432 47.5*fgkmm,12.6*fgkmm,5.6*fgkmm,
433 20.0*fgkmm,7.0*fgkmm,5.9*fgkmm};
434 const Double_t AliITSv11GeometrySSD::fgkEndCapSideCoverThickness = 0.4*fgkmm;
435 /////////////////////////////////////////////////////////////////////////////////
436 // SSD End Cap Cards Parameters (lengths are in mm and angles in degrees)
437 /////////////////////////////////////////////////////////////////////////////////
438 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackLength[3] =
439 {62.0*fgkmm,21.87*fgkmm};
440 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackWidth[2] =
441 {47.0*fgkmm,0.35*fgkmm};
442 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackThickness =
444 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLength = 61.8*fgkmm;
445 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLayerWidth[2] =
446 {43.5*fgkmm, 0.70*fgkmm};
447 const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLayerThickness =
449 const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorThickness =
451 const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorLength[2] =
452 {4.80*fgkmm,1.1*fgkmm};
453 const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorWidth[2] =
454 {3.3*fgkmm,1.10*fgkmm};
455 const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorToLayer =
457 const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorLength[3] =
458 {5.2*fgkmm,3.5*fgkmm,1.2*fgkmm};
459 const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorWidth[2] =
460 {1.9*fgkmm,0.15*fgkmm};
461 const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorThickness =
463 const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorDistance =
465 const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorToLayer =
467 const Double_t AliITSv11GeometrySSD::fgkEndCapStripConnectionLength =
469 const Double_t AliITSv11GeometrySSD::fgkEndCapStripConnectionThickness =
471 const Double_t AliITSv11GeometrySSD::fgkEndCapStripConnectionWidth = 3.0*fgkmm;
472 const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBLength[7] =
473 {3.1*fgkmm,68.0*fgkmm,3.6*fgkmm,
474 1.9*fgkmm,2.5*fgkmm,14.2*fgkmm,1.5*fgkmm};
475 const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBWidth[5] =
476 {17.0*fgkmm,10.0*fgkmm,5.9*fgkmm,6.4*fgkmm,3.9*fgkmm};
477 const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBThickness =
479 const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceElectBoardCardBThickness
481 const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBJMDConnectorSeparation =
483 const Double_t AliITSv11GeometrySSD::fgkEndCapStiffenerLength = 68.0*fgkmm;
484 const Double_t AliITSv11GeometrySSD::fgkEndCapStiffenerWidth = 5.0*fgkmm;
485 const Double_t AliITSv11GeometrySSD::fgkEndCapStiffenerThickness = 5.0*fgkmm;
486 const Double_t AliITSv11GeometrySSD::fgkEndCapEffectiveCableRadiusMin = 1.25*fgkmm; // To Be Checked
487 const Double_t AliITSv11GeometrySSD::fgkEndCapEffectiveCableRadiusMax = 1.575*fgkmm; // To Be Checked
488 /////////////////////////////////////////////////////////////////////////////////
489 // SSD End Cap SupportLayer5/6 Side Parameters (lengths are in mm and angles in degrees)
490 /////////////////////////////////////////////////////////////////////////////////
491 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLength[2] = {70.424*fgkmm,72.919*fgkmm};
492 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportMiddleRadius[2] = {377.0*fgkmm,437.0*fgkmm};
493 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowRadius[2] = {375.0*fgkmm,435.0*fgkmm};
494 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportHighWidth = 20.0*fgkmm;
495 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowWidth[2] = {3.0*fgkmm,3.0*fgkmm};
496 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5ITSPosition = 625.0*fgkmm;
497 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5Position = 2.5*fgkmm;
498 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6ITSPosition = 635.0*fgkmm;
499 const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6Position = 2.5*fgkmm;
500 /////////////////////////////////////////////////////////////////////////////////
501 // SSD Cone Parameters (lengths are in mm and angles in degrees)
502 /////////////////////////////////////////////////////////////////////////////////
503 const Double_t AliITSv11GeometrySSD::fgkSSDLowerPConeRadius = 296.5*fgkmm;
504 const Double_t AliITSv11GeometrySSD::fgkSSDPConeAngle = 39.0;
505 const Double_t AliITSv11GeometrySSD::fgkSSDPConeZLength[2] = {168.0*fgkmm,153.0*fgkmm};
506 const Double_t AliITSv11GeometrySSD::fgkSSDPConeLittleHoleRadius = 317.5*fgkmm;
507 const Double_t AliITSv11GeometrySSD::fgkSSDPConeLittleHoleLength = 20.*fgkmm;
508 const Double_t AliITSv11GeometrySSD::fgkSSDConeMiddleRadius = 350.*fgkmm;
509 const Double_t AliITSv11GeometrySSD::fgkSSDPConeMiddleLength = 30.*fgkmm;
510 const Double_t AliITSv11GeometrySSD::fgkSSDPConeMiddleWidth = 40.*fgkmm;
511 const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpRadius = 400.*fgkmm;
512 const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpMaxRadius = 459.*fgkmm;
513 const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpMiddleRadius = 472.5*fgkmm;
514 const Double_t AliITSv11GeometrySSD::fgkSSDPConeDownRadius = 282.0*fgkmm;
515 const Double_t AliITSv11GeometrySSD::fgkSSDPConeTrapezoidAngle = 42.0;
516 const Double_t AliITSv11GeometrySSD::fgkSSDPConeTrapezoidBasis = 200.0*fgkmm;
517 const Double_t AliITSv11GeometrySSD::fgkSSDPConeExternalRadius = 492.5*fgkmm;
518 const Double_t AliITSv11GeometrySSD::fgkSSDPConeRadiusWidth = 16.75*fgkmm;
519 const Double_t AliITSv11GeometrySSD::fgkSSDPConeLength = 168.0*fgkmm;
520 const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportLength = 1020.*fgkmm;
521 const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportRadius = 297.5*fgkmm;
522 const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportWidth = 6.28*fgkmm;
523 const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportLength = 60.0*fgkmm;
524 const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportWidth = 2.5*fgkSSDCentralSupportWidth;
525 /////////////////////////////////////////////////////////////////////////////////
526 // SSD Cables Parameters (lengths are in mm and angles in degrees)
527 /////////////////////////////////////////////////////////////////////////////////
528 const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5TubeRadiusMin = 11.9*fgkmm;
529 const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6TubeRadiusMin = 11.9*fgkmm;
530 const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideHeight = 7.*fgkmm; // to be fixed in order to reproduce material budget
531 const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6RightSideHeight = 7.*fgkmm; // to be fixed in order to reproduce material budget
532 const Double_t AliITSv11GeometrySSD::fgkSSDCableAngle = 22.5;
533 const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideWaterHeight = 2.5*fgkmm; // to be fixed in order to reproduce material budget
534 const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB26Angle[2] = {25.0,53.2};
535 const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB24Angle[2] = {23.0,53.6};
536 const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26ITSDistance = 975.0*fgkmm;
537 const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24ITSDistance = 1020.0*fgkmm;
538 const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = 451.3*fgkmm;
539 const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = 451.3*fgkmm;
540 const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanelHeight = 87.5*fgkmm;
541 const Double_t AliITSv11GeometrySSD::fgkSSDCableMaterialBudgetHeight = 20.0*fgkmm;
542 //const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = fgkSSDPConeExternalRadius;
543 //const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = fgkSSDPConeExternalRadius;
544 /////////////////////////////////////////////////////////////////////////////////
545 ClassImp(AliITSv11GeometrySSD)
546 /////////////////////////////////////////////////////////////////////////////////
547 AliITSv11GeometrySSD::AliITSv11GeometrySSD():
550 fSSDChipGlueMedium(),
551 fSSDStiffenerMedium(),
552 fSSDStiffenerConnectorMedium(),
553 fSSDStiffener0603CapacitorMedium(),
554 fSSDStiffener1812CapacitorMedium(),
555 fSSDStiffenerHybridWireMedium(),
556 fSSDKaptonFlexMedium(),
557 fSSDAlTraceFlexMedium(),
558 fSSDAlTraceLadderCableMedium(),
559 fSSDKaptonLadderCableMedium(),
560 fSSDKaptonChipCableMedium(),
561 fSSDAlTraceChipCableMedium(),
562 fSSDAlCoolBlockMedium(),
564 fSSDSensorSupportMedium(),
565 fSSDCarbonFiberMedium(),
566 fSSDTubeHolderMedium(),
567 fSSDCoolingTubeWater(),
568 fSSDCoolingTubePhynox(),
570 fSSDMountingBlockMedium(),
574 fCreateMaterials(kFALSE),
575 fTransformationMatrices(kFALSE),
576 fBasicObjects(kFALSE),
577 fcarbonfiberjunction(),
578 fcoolingtubesupport(),
580 fssdcoolingblocksystem(),
581 fcoolingblocksystematrix(),
585 fendladdercoolingtubesupportmatrix(),
586 fendladdermountingblock(),
587 fendladdermountingblockclip(),
593 fLay5LadderSupportRing(),
594 fLay6LadderSupportRing(),
595 fgkEndCapSupportSystem(),
597 fColorCarbonFiber(4),
609 ////////////////////////
610 // Standard constructor
611 ////////////////////////
613 /////////////////////////////////////////////////////////////////////////////////
614 AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
615 AliITSv11Geometry(s.GetDebug()),
616 fSSDChipMedium(s.fSSDChipMedium),
617 fSSDChipGlueMedium(s.fSSDChipGlueMedium),
618 fSSDStiffenerMedium(s.fSSDStiffenerMedium),
619 fSSDStiffenerConnectorMedium(s.fSSDStiffenerConnectorMedium),
620 fSSDStiffener0603CapacitorMedium(s.fSSDStiffener0603CapacitorMedium),
621 fSSDStiffener1812CapacitorMedium(s.fSSDStiffener1812CapacitorMedium),
622 fSSDStiffenerHybridWireMedium(s.fSSDStiffenerHybridWireMedium),
623 fSSDKaptonFlexMedium(s.fSSDKaptonFlexMedium),
624 fSSDAlTraceFlexMedium(s.fSSDAlTraceFlexMedium),
625 fSSDAlTraceLadderCableMedium(s.fSSDAlTraceLadderCableMedium),
626 fSSDKaptonLadderCableMedium(s.fSSDKaptonLadderCableMedium),
627 fSSDKaptonChipCableMedium(s.fSSDKaptonChipCableMedium),
628 fSSDAlTraceChipCableMedium(s.fSSDAlTraceChipCableMedium),
629 fSSDAlCoolBlockMedium(s.fSSDAlCoolBlockMedium),
630 fSSDSensorMedium(s.fSSDSensorMedium),
631 fSSDSensorSupportMedium(s.fSSDSensorSupportMedium),
632 fSSDCarbonFiberMedium(s.fSSDCarbonFiberMedium),
633 fSSDTubeHolderMedium(s.fSSDTubeHolderMedium),
634 fSSDCoolingTubeWater(s.fSSDCoolingTubeWater),
635 fSSDCoolingTubePhynox(s.fSSDCoolingTubePhynox),
636 fSSDSupportRingAl(s.fSSDSupportRingAl),
637 fSSDMountingBlockMedium(s.fSSDMountingBlockMedium),
638 fSSDRohaCellCone(s.fSSDRohaCellCone),
640 fSSDCopper(s.fSSDCopper),
641 fCreateMaterials(s.fCreateMaterials),
642 fTransformationMatrices(s.fTransformationMatrices),
643 fBasicObjects(s.fBasicObjects),
644 fcarbonfiberjunction(s.fcarbonfiberjunction),
645 fcoolingtubesupport(s.fcoolingtubesupport),
646 fhybridmatrix(s.fhybridmatrix),
647 fssdcoolingblocksystem(s.fssdcoolingblocksystem),
648 fcoolingblocksystematrix(s.fcoolingblocksystematrix),
649 fssdstiffenerflex(s.fssdstiffenerflex),
650 fssdendflex(s.fssdendflex),
651 fcoolingtube(s.fcoolingtube),
652 fendladdercoolingtubesupportmatrix(s.fendladdercoolingtubesupportmatrix),
653 fendladdermountingblock(s.fendladdermountingblock),
654 fendladdermountingblockclip(s.fendladdermountingblockclip),
655 fSSDSensor5(s.fSSDSensor5),
656 fSSDSensor6(s.fSSDSensor6),
657 fSSDLayer5(s.fSSDLayer5),
658 fSSDLayer6(s.fSSDLayer6),
659 fMotherVol(s.fMotherVol),
660 fLay5LadderSupportRing(s.fLay5LadderSupportRing),
661 fLay6LadderSupportRing(s.fLay6LadderSupportRing),
662 fgkEndCapSupportSystem(s.fgkEndCapSupportSystem),
663 fSSDCone(s.fSSDCone),
664 fColorCarbonFiber(s.fColorCarbonFiber),
665 fColorRyton(s.fColorRyton),
666 fColorPhynox(s.fColorPhynox),
667 fColorSilicon(s.fColorSilicon),
668 fColorAl(s.fColorAl),
669 fColorKapton(s.fColorKapton),
670 fColorPolyhamide(s.fColorPolyhamide),
671 fColorStiffener(s.fColorStiffener),
672 fColorEpoxy(s.fColorEpoxy),
673 fColorWater(s.fColorWater),
674 fColorG10(s.fColorG10)
676 ////////////////////////
678 ////////////////////////
680 /////////////////////////////////////////////////////////////////////////////////
681 AliITSv11GeometrySSD& AliITSv11GeometrySSD::
682 operator=(const AliITSv11GeometrySSD &s){
683 ////////////////////////
684 // Assignment operator
685 ////////////////////////
686 this->~AliITSv11GeometrySSD();
687 new(this) AliITSv11GeometrySSD(s);
690 if(&s == this) return *this;
691 fMotherVol = s.fMotherVol;
695 ///////////////////////////////////////////////////////////////////////////////
696 void AliITSv11GeometrySSD::CreateTransformationMatrices(){
697 ///////////////////////////////////////////////////////////////////////
698 // Method generating the trasformation matrix for the whole SSD Geometry
699 ///////////////////////////////////////////////////////////////////////
700 // Setting some variables for Carbon Fiber Supportmatrix creation
701 //////////////////////////////////////////////////////////////////////
702 Double_t carbonfibersupportxaxisEdgeproj = fgkCarbonFiberSupportEdgeLength
703 * CosD(fgkCarbonFiberJunctionAngle[0]);
704 Double_t symmetryplaneposition = (fgkCarbonFiberSupportYAxisLength
705 + fgkCarbonFiberSupportTopEdgeDist[0]
706 + fgkCarbonFiberSupportWidth);
707 Double_t carbonfibersupportheight = carbonfibersupportxaxisEdgeproj
708 * TanD(fgkCarbonFiberJunctionAngle[0]);
709 TGeoRotation* carbonfiberot[3];
710 for(Int_t i=0; i<3; i++) carbonfiberot[i] = new TGeoRotation();
711 carbonfiberot[0]->SetAngles(0.0,180.0,0.0);
712 carbonfiberot[1]->SetAngles(90.,-fgkCarbonFiberTriangleAngle,-90.);
713 carbonfiberot[2]->SetRotation((*carbonfiberot[1])*(*carbonfiberot[0]));
714 Double_t transvector[3] = {fgkCarbonFiberTriangleLength
715 * CosD(fgkCarbonFiberTriangleAngle),0.,
716 - fgkCarbonFiberTriangleLength
717 * SinD(fgkCarbonFiberTriangleAngle)};
718 ///////////////////////////////////////////
719 //Setting Local Translations and Rotations:
720 ///////////////////////////////////////////
721 TGeoCombiTrans* localcarbonfibersupportmatrix[3];
722 localcarbonfibersupportmatrix[0] = new TGeoCombiTrans(0.0,0.0,
723 0.5*carbonfibersupportheight,NULL);
724 localcarbonfibersupportmatrix[1] = new TGeoCombiTrans(transvector[0],
725 2.*symmetryplaneposition+transvector[1],
726 transvector[2], carbonfiberot[2]);
727 localcarbonfibersupportmatrix[2] = new TGeoCombiTrans(*carbonfiberot[1]);
728 /////////////////////////////////////////////////////////////
729 // Carbon Fiber Support Transformations
730 /////////////////////////////////////////////////////////////
731 const Int_t kcarbonfibersupportmatrixnumber[2] = {2,3};
732 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++){
733 fcarbonfibersupportmatrix[i] = new TGeoHMatrix();
734 for(Int_t j=0; j<kcarbonfibersupportmatrixnumber[i]; j++)
735 fcarbonfibersupportmatrix[i]->MultiplyLeft(localcarbonfibersupportmatrix[i==0?2*j:j]);
737 /////////////////////////////////////////////////////////////
738 // Carbon Fiber Junction Transformation
739 /////////////////////////////////////////////////////////////
740 const Int_t kcarbonfiberjunctionmatrixnumber = 2;
741 TGeoCombiTrans** localcarbonfiberjunctionmatrix[fgkcarbonfiberjunctionumber];
742 TGeoRotation** localcarbonfiberjunctionrot[fgkcarbonfiberjunctionumber];
743 TGeoTranslation** localcarbonfiberjunctiontrans[fgkcarbonfiberjunctionumber];
744 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++){
745 localcarbonfiberjunctionmatrix[i] =
746 new TGeoCombiTrans*[kcarbonfiberjunctionmatrixnumber];
747 localcarbonfiberjunctionrot[i] =
748 new TGeoRotation*[kcarbonfiberjunctionmatrixnumber];
749 localcarbonfiberjunctiontrans[i] =
750 new TGeoTranslation*[kcarbonfiberjunctionmatrixnumber];
752 ///////////////////////
753 // Setting Translations
754 ///////////////////////
755 localcarbonfiberjunctiontrans[0][0] = new TGeoTranslation(0.,0.,0.);
756 localcarbonfiberjunctiontrans[1][0] =
757 new TGeoTranslation(fgkCarbonFiberTriangleLength,0.0,0.0);
758 localcarbonfiberjunctiontrans[2][0] =
759 new TGeoTranslation(fgkCarbonFiberTriangleLength
760 * TMath::Cos(fgkCarbonFiberTriangleAngle*TMath::DegToRad()),
761 fgkCarbonFiberTriangleLength
762 * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad()),0.0);
763 localcarbonfiberjunctiontrans[0][1] =
764 new TGeoTranslation(0.0,0.5*fgkCarbonFiberJunctionWidth,0.0);
765 localcarbonfiberjunctiontrans[1][1] =
766 new TGeoTranslation(*localcarbonfiberjunctiontrans[0][1]);
767 localcarbonfiberjunctiontrans[2][1] =
768 new TGeoTranslation(*localcarbonfiberjunctiontrans[0][1]);
772 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++)
773 for(Int_t j=0; j<kcarbonfiberjunctionmatrixnumber; j++)
774 localcarbonfiberjunctionrot[i][j] = new TGeoRotation();
775 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++)
776 localcarbonfiberjunctionrot[i][0]->SetAngles(120.*i,0.0,0.0);
777 localcarbonfiberjunctionrot[0][1]->SetAngles(0.0,90.0,0.0);
778 localcarbonfiberjunctionrot[1][1]->SetRotation(*localcarbonfiberjunctionrot[0][1]);
779 localcarbonfiberjunctionrot[2][1]->SetRotation(*localcarbonfiberjunctionrot[0][1]);
780 ////////////////////////////////////////
781 // Setting Carbon Fiber Junction matrix
782 ////////////////////////////////////////
783 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++){
784 fcarbonfiberjunctionmatrix[i] = new TGeoHMatrix();
785 for(Int_t j=0; j<kcarbonfiberjunctionmatrixnumber; j++){
786 localcarbonfiberjunctionmatrix[i][j] =
787 new TGeoCombiTrans(*localcarbonfiberjunctiontrans[i][j],
788 *localcarbonfiberjunctionrot[i][j]);
789 fcarbonfiberjunctionmatrix[i]->MultiplyLeft(localcarbonfiberjunctionmatrix[i][j]);
792 /////////////////////////////////////////////////////////////
793 // Carbon Fiber Lower Support Transformations
794 /////////////////////////////////////////////////////////////
795 TGeoTranslation* localcarbonfiberlowersupportrans[2];
796 localcarbonfiberlowersupportrans[0] = new TGeoTranslation(0.0,
797 fgkCarbonFiberLowerSupportVolumePosition[1]
798 + fgkCarbonFiberLowerSupportVolumePosition[0],
800 localcarbonfiberlowersupportrans[1] = new TGeoTranslation(0.0,
801 fgkCarbonFiberJunctionWidth
802 - fgkCarbonFiberLowerSupportWidth
803 - fgkCarbonFiberLowerSupportVolumePosition[0]
804 - fgkCarbonFiberLowerSupportVolumePosition[1],
805 - 0.5*fgkCarbonFiberLowerSupportHeight);
806 localcarbonfiberlowersupportrans[0]->Add(localcarbonfiberlowersupportrans[1]);
807 fcarbonfiberlowersupportrans[0] =
808 new TGeoTranslation(*localcarbonfiberlowersupportrans[0]);
809 fcarbonfiberlowersupportrans[1] =
810 new TGeoTranslation(*localcarbonfiberlowersupportrans[1]);
811 /////////////////////////////////////////////////////////////
812 // SSD Sensor Support Transformations
813 /////////////////////////////////////////////////////////////
814 const Int_t kssdsensorsupportmatrixnumber = 3;
815 TGeoCombiTrans** localssdsensorsupportmatrix[fgkssdsensorsupportnumber];
816 TGeoRotation** localssdsensorsupportrot[fgkssdsensorsupportnumber];
817 TGeoTranslation** localssdsensorsupportrans[fgkssdsensorsupportnumber];
818 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
819 localssdsensorsupportmatrix[i] =
820 new TGeoCombiTrans*[kssdsensorsupportmatrixnumber];
821 localssdsensorsupportrot[i] =
822 new TGeoRotation*[kssdsensorsupportmatrixnumber];
823 localssdsensorsupportrans[i] =
824 new TGeoTranslation*[kssdsensorsupportmatrixnumber];
826 ///////////////////////
827 // Setting Translations
828 ///////////////////////
829 localssdsensorsupportrans[0][0] = new TGeoTranslation(0.0,
830 0.5*fgkSSDSensorSideSupportWidth,
832 localssdsensorsupportrans[1][0] =
833 new TGeoTranslation(*localssdsensorsupportrans[0][0]);
834 localssdsensorsupportrans[2][0] =
835 new TGeoTranslation(*localssdsensorsupportrans[0][0]);
836 localssdsensorsupportrans[0][1] =
837 new TGeoTranslation(-0.5*fgkSSDSensorSideSupportWidth,
838 0.5*fgkSSDSensorSideSupportThickness[0],
840 localssdsensorsupportrans[1][1] =
841 new TGeoTranslation(0.5*fgkSSDSensorSideSupportWidth,
842 - 0.5*fgkSSDSensorSideSupportThickness[0]
843 - fgkSSDModuleSensorSupportDistance,
845 localssdsensorsupportrans[2][1] =
846 new TGeoTranslation(0.5*fgkSSDSensorCenterSupportThickness[0]
847 - fgkSSDSensorCenterSupportPosition,
848 0.5*fgkSSDSensorCenterSupportWidth
849 - 0.5*fgkSSDModuleSensorSupportDistance,
850 fgkSSDSensorCenterSupportThickness[0]);
851 localssdsensorsupportrans[0][2] =
852 new TGeoTranslation(fgkCarbonFiberTriangleLength
853 + fgkCarbonFiberJunctionToSensorSupport,
854 fgkCarbonFiberJunctionWidth
855 - 0.5*(fgkCarbonFiberLowerSupportWidth
856 + fgkSSDSensorCenterSupportLength
857 - fgkSSDSensorCenterSupportThickness[0])
858 - fgkSSDSensorCenterSupportPosition,
860 localssdsensorsupportrans[1][2] =
861 new TGeoTranslation(*localssdsensorsupportrans[0][2]);
862 localssdsensorsupportrans[2][2] =
863 new TGeoTranslation(*localssdsensorsupportrans[0][2]);
867 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++)
868 for(Int_t j=0; j<kssdsensorsupportmatrixnumber; j++)
869 localssdsensorsupportrot[i][j] = new TGeoRotation();
870 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
871 localssdsensorsupportrot[i][0]->SetAngles(0.0,90.0,0.0);
872 localssdsensorsupportrot[i][2]->SetAngles(-90.0,0.0,0.0);
874 localssdsensorsupportrot[0][1]->SetAngles(0.0,90.0,-90.0);
875 localssdsensorsupportrot[1][1]->SetAngles(180.0,90.0,-90.0);
876 localssdsensorsupportrot[2][1]->SetAngles(270.0,90.0,-90.0);
877 ////////////////////////////////////////
878 // SSD Sensor Support matrix
879 ////////////////////////////////////////
880 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
881 fssdsensorsupportmatrix[i] = new TGeoHMatrix();
882 for(Int_t j=0; j<kssdsensorsupportmatrixnumber; j++){
883 localssdsensorsupportmatrix[i][j] =
884 new TGeoCombiTrans(*localssdsensorsupportrans[i][j],
885 *localssdsensorsupportrot[i][j]);
886 fssdsensorsupportmatrix[i]->MultiplyLeft(localssdsensorsupportmatrix[i][j]);
889 /////////////////////////////////////////////////////////////
890 // SSD Cooling Tube Support Transformations
891 /////////////////////////////////////////////////////////////
892 const Int_t kcoolingtubesupportmatrixnumber = 2;
893 TGeoCombiTrans* localcoolingtubesupportmatrix[kcoolingtubesupportmatrixnumber];
894 TGeoTranslation* localcoolingtubesupportrans[kcoolingtubesupportmatrixnumber];
895 TGeoRotation* localcoolingtubesupportrot[kcoolingtubesupportmatrixnumber];
896 Double_t phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
897 /fgkCoolingTubeSupportRmax);
898 localcoolingtubesupportrans[0] =
899 new TGeoTranslation(2.*fgkCoolingTubeSupportRmax*TMath::Cos(phi)
900 + 2.*(fgkCoolingTubeSupportLength
901 - fgkCoolingTubeSupportRmax*(1.+TMath::Cos(phi)))
902 + fgkCarbonFiberTriangleLength
903 - 2.0*fgkCarbonFiberJunctionLength,0.0,0.0);
904 localcoolingtubesupportrans[1] =
905 new TGeoTranslation(fgkCarbonFiberJunctionLength
906 - (fgkCoolingTubeSupportLength-fgkCoolingTubeSupportRmax),
907 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
908 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
909 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
910 - 0.5*(fgkCarbonFiberLowerSupportWidth
911 + fgkSSDSensorCenterSupportLength
912 - fgkSSDSensorCenterSupportThickness[0])
913 + 0.5*fgkSSDSensorLength,
914 - 0.5*fgkCoolingTubeSupportHeight);
915 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++)
916 localcoolingtubesupportrot[i] = new TGeoRotation();
917 localcoolingtubesupportrot[0]->SetAngles(180.0,0.0,0.0);
918 localcoolingtubesupportrot[1]->SetAngles(0.0,90.0,0.0);
919 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++)
920 localcoolingtubesupportmatrix[i] =
921 new TGeoCombiTrans(*localcoolingtubesupportrans[i],
922 *localcoolingtubesupportrot[i]);
923 fcoolingtubesupportmatrix[0] = new TGeoHMatrix(*localcoolingtubesupportmatrix[1]);
924 fcoolingtubesupportmatrix[1] = new TGeoHMatrix((*localcoolingtubesupportmatrix[1])*
925 (*localcoolingtubesupportmatrix[0]));
926 /////////////////////////////////////////////////////////////
927 // End Ladder SSD Cooling Tube Support Transformations
928 /////////////////////////////////////////////////////////////
929 TGeoTranslation** localendladdercooltubetrans[2];
930 localendladdercooltubetrans[0] = new TGeoTranslation*[4];
931 localendladdercooltubetrans[1] = new TGeoTranslation*[2];
932 for(Int_t i=0; i<4; i++) localendladdercooltubetrans[0][i] = new TGeoTranslation();
933 localendladdercooltubetrans[0][0]->SetTranslation(fgkCarbonFiberJunctionLength
934 - (fgkCoolingTubeSupportLength
935 - fgkCoolingTubeSupportRmax),
936 fgkEndLadderMountingBlockPosition[0]
937 - fgkendladdercoolingsupportdistance[0]
938 + 0.5*fgkCoolingTubeSupportWidth,
939 - 0.5*fgkCoolingTubeSupportHeight);
940 localendladdercooltubetrans[0][1]->SetTranslation(fgkCarbonFiberJunctionLength
941 - (fgkCoolingTubeSupportLength
942 - fgkCoolingTubeSupportRmax),
943 fgkEndLadderMountingBlockPosition[0]
944 + fgkendladdercoolingsupportdistance[1]
945 + 0.5*fgkCoolingTubeSupportWidth,
946 - 0.5*fgkCoolingTubeSupportHeight);
947 localendladdercooltubetrans[0][2]->SetTranslation(2*(fgkCoolingTubeSupportLength
948 - fgkCoolingTubeSupportRmax)
949 + fgkCarbonFiberTriangleLength
950 - 2.0*fgkCarbonFiberJunctionLength,
953 localendladdercooltubetrans[0][3]->SetTranslation(0.0,
954 fgkendladdercoolingsupportdistance[0]
955 + fgkendladdercoolingsupportdistance[1],
957 for(Int_t i=0; i<2; i++) localendladdercooltubetrans[1][i] = new TGeoTranslation();
958 localendladdercooltubetrans[1][0]->SetTranslation(fgkCoolingTubeSupportRmax
959 + fgkCarbonFiberJunctionLength
960 - fgkCoolingTubeSupportLength,
961 fgkEndLadderCarbonFiberLowerJunctionLength[1]
962 - 0.5*fgkCoolingTubeSupportWidth
963 -fgkendladdercoolingsupportdistance[2],
964 - 0.5*fgkCoolingTubeSupportHeight);
965 localendladdercooltubetrans[1][1]->SetTranslation(fgkCarbonFiberTriangleLength
966 + fgkCoolingTubeSupportLength
967 - fgkCoolingTubeSupportRmax
968 - fgkCarbonFiberJunctionLength,
969 fgkEndLadderCarbonFiberLowerJunctionLength[1]
970 - 0.5*fgkCoolingTubeSupportWidth
971 - fgkendladdercoolingsupportdistance[2],
972 - 0.5*fgkCoolingTubeSupportHeight);
973 fendladdercoolingtubesupportmatrix = new TGeoHMatrix**[kcoolingtubesupportmatrixnumber];
974 fendladdercoolingtubesupportmatrix[0] = new TGeoHMatrix*[4];
975 fendladdercoolingtubesupportmatrix[1] = new TGeoHMatrix*[2];
976 fendladdercoolingtubesupportmatrix[0][0] = new TGeoHMatrix((*localendladdercooltubetrans[0][0])*
977 (*localcoolingtubesupportrot[1]));
978 fendladdercoolingtubesupportmatrix[0][1] = new TGeoHMatrix((*localendladdercooltubetrans[0][1])*
979 (*localcoolingtubesupportrot[1]));
980 fendladdercoolingtubesupportmatrix[0][2] = new TGeoHMatrix(*fendladdercoolingtubesupportmatrix[0][0]);
981 fendladdercoolingtubesupportmatrix[0][2]->Multiply(localcoolingtubesupportrot[0]);
982 fendladdercoolingtubesupportmatrix[0][2]->MultiplyLeft(localendladdercooltubetrans[0][2]);
983 fendladdercoolingtubesupportmatrix[0][3] = new TGeoHMatrix(*fendladdercoolingtubesupportmatrix[0][2]);
984 fendladdercoolingtubesupportmatrix[0][3]->MultiplyLeft(localendladdercooltubetrans[0][3]);
986 fendladdercoolingtubesupportmatrix[1][0] =
987 new TGeoHMatrix((*localendladdercooltubetrans[1][0])
988 *(*localcoolingtubesupportrot[1]));
989 fendladdercoolingtubesupportmatrix[1][1] = new TGeoHMatrix(*localcoolingtubesupportrot[1]);
990 fendladdercoolingtubesupportmatrix[1][1]->Multiply(localcoolingtubesupportrot[0]);
991 fendladdercoolingtubesupportmatrix[1][1]->MultiplyLeft(localendladdercooltubetrans[1][1]);
992 /////////////////////////////////////////////////////////////
993 // SSD Cooling Tube Transformations
994 /////////////////////////////////////////////////////////////
995 TGeoRotation* localcoolingtuberot = new TGeoRotation();
996 localcoolingtuberot->SetAngles(0.,90.,0.);
997 TGeoTranslation* localcoolingtubetrans[2];
998 TVector3* localcoolingtubevect[2];
1000 localcoolingtubevect[0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
1001 -fgkCarbonFiberTriangleLength),
1002 fgkCarbonFiberJunctionWidth // Y-coord is local Z, from sensor translation
1003 - fgkCarbonFiberLowerSupportWidth
1004 - fgkLowerSupportToSensorZ ,
1005 - 0.5*fgkCoolingTubeSupportHeight);
1006 localcoolingtubevect[1] = new TVector3( -localcoolingtubevect[0]->X()+fgkCarbonFiberTriangleLength,
1007 localcoolingtubevect[0]->Y(),
1008 localcoolingtubevect[0]->Z());
1009 for(Int_t j=0; j<2; j++){
1010 localcoolingtubetrans[j] =
1011 new TGeoTranslation(localcoolingtubevect[j]->X(),
1012 localcoolingtubevect[j]->Y(),
1013 localcoolingtubevect[j]->Z());
1014 fcoolingtubematrix[j] = new TGeoHMatrix((*localcoolingtubetrans[j])
1015 * (*localcoolingtuberot));
1017 /////////////////////////////////////////////////////////////
1018 // SSD End Ladder Cooling Tube Transformations
1019 /////////////////////////////////////////////////////////////
1020 TGeoRotation* localendlladdercoolingtuberot = new TGeoRotation();
1021 localendlladdercoolingtuberot->SetAngles(0.,90.,0.);
1022 TGeoTranslation** localendlladdercoolingtubetrans[2];
1023 localendlladdercoolingtubetrans[0] = new TGeoTranslation*[2];
1024 localendlladdercoolingtubetrans[1] = new TGeoTranslation*[2];
1025 for(Int_t i=0; i<2; i++)
1026 for(Int_t j=0; j<2; j++)
1027 localendlladdercoolingtubetrans[i][j] = new TGeoTranslation();
1029 Double_t sensZshift = 0.5*fgkCarbonFiberJunctionWidth - fgkCarbonFiberLowerSupportWidth - fgkLowerSupportToSensorZ;
1030 localendlladdercoolingtubetrans[0][0]->SetTranslation(-(fgkCoolingTubeSupportLength
1031 - fgkCoolingTubeSupportRmax)
1032 + fgkCarbonFiberJunctionLength,
1033 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0]+sensZshift),
1034 - 0.5*fgkCoolingTubeSupportHeight);
1035 localendlladdercoolingtubetrans[0][1]->SetTranslation((fgkCoolingTubeSupportLength
1036 - fgkCoolingTubeSupportRmax)
1037 - fgkCarbonFiberJunctionLength
1038 + fgkCarbonFiberTriangleLength,
1039 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0]+sensZshift),
1040 - 0.5*fgkCoolingTubeSupportHeight);
1042 localendlladdercoolingtubetrans[1][0]->SetTranslation(-(fgkCoolingTubeSupportLength
1043 - fgkCoolingTubeSupportRmax)
1044 + fgkCarbonFiberJunctionLength,
1045 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1]-sensZshift),
1046 - 0.5*fgkCoolingTubeSupportHeight);
1047 localendlladdercoolingtubetrans[1][1]->SetTranslation((fgkCoolingTubeSupportLength
1048 - fgkCoolingTubeSupportRmax)
1049 - fgkCarbonFiberJunctionLength
1050 + fgkCarbonFiberTriangleLength,
1051 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1]-sensZshift),
1052 - 0.5*fgkCoolingTubeSupportHeight);
1053 for(Int_t i=0; i<2; i++)
1054 for(Int_t j=0; j<2; j++){
1055 fendladdercoolingtubematrix[i][j] = new TGeoHMatrix(*localendlladdercoolingtuberot);
1056 fendladdercoolingtubematrix[i][j]->MultiplyLeft(localendlladdercoolingtubetrans[i][j]);
1058 /////////////////////////////////////////////////////////////
1059 // SSD Hybrid Components Transformations
1060 /////////////////////////////////////////////////////////////
1061 const Int_t khybridmatrixnumber = 3;
1062 TGeoTranslation* localhybridtrans[khybridmatrixnumber];
1063 localhybridtrans[0] = new TGeoTranslation(0.5*fgkSSDStiffenerLength,
1064 0.5*fgkSSDStiffenerWidth,
1065 0.5*fgkSSDStiffenerHeight);
1066 localhybridtrans[1] = new TGeoTranslation(fgkSSDModuleStiffenerPosition[0],
1067 fgkSSDModuleStiffenerPosition[1],0.0);
1069 localhybridtrans[2] = new TGeoTranslation(
1070 - 0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
1071 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1072 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1073 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1074 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
1075 - fgkSSDSensorCenterSupportThickness[0]),
1076 - (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight
1077 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight
1078 - fgkSSDModuleVerticalDisalignment));
1079 fhybridmatrix = new TGeoHMatrix();
1080 for(Int_t i=0; i<khybridmatrixnumber; i++) fhybridmatrix->MultiplyLeft(localhybridtrans[i]);
1081 /////////////////////////////////////////////////////////////
1082 // SSD Cooling Block Transformations
1083 /////////////////////////////////////////////////////////////
1084 const Int_t kcoolingblockmatrixnumber = 4;
1085 TGeoTranslation* localcoolingblocktrans[kcoolingblockmatrixnumber];
1086 localcoolingblocktrans[0] = new TGeoTranslation(-2.*(fgkCoolingTubeSupportRmax
1087 - fgkCoolingTubeSupportRmin),0.0,
1088 0.5*(fgkSSDCoolingBlockHoleCenter+fgkCoolingTubeRmax));
1089 localcoolingblocktrans[1] = new TGeoTranslation(0.5*fgkSSDStiffenerLength
1090 - 0.5*fgkSSDModuleSensorSupportDistance-fgkSSDCoolingBlockLength,
1091 0.0,fgkSSDStiffenerHeight);
1092 localcoolingblocktrans[2] = new TGeoTranslation(*localhybridtrans[1]);
1093 localcoolingblocktrans[3] = new TGeoTranslation(*localhybridtrans[2]);
1094 fcoolingblocksystematrix = new TGeoHMatrix();
1095 for(Int_t i=0; i<kcoolingblockmatrixnumber; i++)
1096 fcoolingblocksystematrix->MultiplyLeft(localcoolingblocktrans[i]);
1097 /////////////////////////////////////////////////////////////
1098 // SSD Stiffener Flex Transformations
1099 /////////////////////////////////////////////////////////////
1100 const Int_t klocalflexmatrixnumber = 4;
1101 TGeoCombiTrans** localflexmatrix[fgkflexnumber];
1102 for(Int_t i=0; i<fgkflexnumber; i++)
1103 localflexmatrix[i] = new TGeoCombiTrans*[klocalflexmatrixnumber];
1104 for(Int_t i=0; i<fgkflexnumber; i++)
1105 for(Int_t j =0; j<klocalflexmatrixnumber; j++)
1106 localflexmatrix[i][j] = new TGeoCombiTrans();
1107 Double_t ssdstiffenerseparation = fgkSSDSensorLength
1108 - 2.*fgkSSDModuleStiffenerPosition[1]
1109 - fgkSSDStiffenerWidth;
1110 localflexmatrix[0][0]->SetTranslation(-fgkSSDFlexLength[0]
1111 +0.5*fgkSSDStiffenerLength,
1112 0.5*fgkSSDStiffenerWidth,
1113 -0.5*fgkSSDStiffenerHeight
1114 -0.5*fgkSSDFlexHeight[0]);
1115 localflexmatrix[1][0]->SetTranslation(-(fgkSSDStiffenerLength-fgkSSDFlexLength[0])
1116 +0.5*fgkSSDStiffenerLength,ssdstiffenerseparation
1117 -0.5*fgkSSDStiffenerWidth,
1118 -0.5*fgkSSDStiffenerHeight
1119 -0.5*fgkSSDFlexHeight[0]);
1120 TGeoRotation* localflexrot = new TGeoRotation();
1121 localflexrot->SetAngles(180.,0.,0.);
1122 localflexmatrix[1][0]->SetRotation(localflexrot);
1123 for(Int_t i=0; i<fgkflexnumber; i++)
1124 for(Int_t j =1; j<klocalflexmatrixnumber; j++)
1125 localflexmatrix[i][j]->SetTranslation(*localhybridtrans[j-1]);
1126 for(Int_t i=0; i<fgkflexnumber; i++){
1127 fstiffenerflexmatrix[i] = new TGeoHMatrix();
1128 for(Int_t j =0; j<klocalflexmatrixnumber; j++)
1129 fstiffenerflexmatrix[i]->MultiplyLeft(localflexmatrix[i][j]);
1131 /////////////////////////////////////////////////////////////
1132 // SSD End Flex Transformations
1133 /////////////////////////////////////////////////////////////
1134 TGeoRotation* localendflexrot = new TGeoRotation();
1135 localendflexrot->SetAngles(0.0,90.0,0.0);
1136 TGeoCombiTrans* localendflexmatrix = new TGeoCombiTrans();
1137 Double_t ssdflexradiusmax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
1138 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
1139 Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
1140 * TMath::DegToRad()*ssdflexradiusmax
1141 - fgkSSDFlexLength[2]-TMath::Pi()
1142 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
1143 - 0.1*fgkSSDFlexFullLength;
1144 Double_t trans = ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
1145 + (ssdflexradiusmax-fgkSSDStiffenerHeight)*SinD(2.*fgkSSDFlexAngle)
1146 + fgkSSDFlexLength[2];
1147 localendflexmatrix->SetTranslation(fgkSSDFlexLength[0]-trans,
1148 0.5*fgkSSDFlexWidth[0],
1149 2.*fgkSSDStiffenerHeight
1150 + 0.5*fgkSSDFlexHeight[0]);
1151 localendflexmatrix->SetRotation(localendflexrot);
1152 for(Int_t i=0; i<fgkflexnumber; i++)
1153 fendflexmatrix[i] = new TGeoHMatrix((*fstiffenerflexmatrix[i])*(*localendflexmatrix));
1154 /////////////////////////////////////////////////////////////
1155 // End Ladder Carbon Fiber Junction
1156 /////////////////////////////////////////////////////////////
1157 TGeoCombiTrans** localendladdercarbonfiberjunctionmatrix[fgkendlabbercarbonfiberjunctionumber];
1158 TGeoRotation** localendladdercarbonfiberjunctionrot[fgkendlabbercarbonfiberjunctionumber];
1159 TGeoTranslation** localendladdercarbonfiberjunctiontrans[fgkendlabbercarbonfiberjunctionumber];
1160 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1161 localendladdercarbonfiberjunctionmatrix[i]
1162 = new TGeoCombiTrans*[fgkendladdercabonfiberjunctionmatrixnumber];
1163 localendladdercarbonfiberjunctionrot[i]
1164 = new TGeoRotation*[fgkendladdercabonfiberjunctionmatrixnumber];
1165 localendladdercarbonfiberjunctiontrans[i]
1166 = new TGeoTranslation*[fgkendladdercabonfiberjunctionmatrixnumber];
1167 fendladdercarbonfiberjunctionmatrix[i]
1168 = new TGeoHMatrix*[fgkendladdercabonfiberjunctionmatrixnumber];
1170 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1171 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1172 localendladdercarbonfiberjunctionrot[i][j] = new TGeoRotation();
1173 localendladdercarbonfiberjunctiontrans[i][j] = new TGeoTranslation();
1175 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1176 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
1177 localendladdercarbonfiberjunctionrot[i][j]->SetAngles(120.*j,0.,0.);
1178 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1179 localendladdercarbonfiberjunctiontrans[i][1]->SetTranslation(fgkCarbonFiberTriangleLength,
1181 localendladdercarbonfiberjunctiontrans[i][2]->SetTranslation(fgkCarbonFiberTriangleLength
1182 * CosD(fgkCarbonFiberTriangleAngle),fgkCarbonFiberTriangleLength
1183 * SinD(fgkCarbonFiberTriangleAngle),
1184 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[i]
1185 - fgkEndLadderCarbonFiberUpperJunctionLength[i]));
1187 TGeoCombiTrans* localendladdercarbonfiberjunctionglobalmatrix[fgkendlabbercarbonfiberjunctionumber];
1188 TGeoRotation* localendladdercarbonfiberjunctionglobalrot[fgkendlabbercarbonfiberjunctionumber];
1189 TGeoTranslation* localendladdercarbonfiberjunctionglobaltrans[fgkendlabbercarbonfiberjunctionumber];
1190 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1191 localendladdercarbonfiberjunctionglobalrot[i] = new TGeoRotation();
1192 localendladdercarbonfiberjunctionglobaltrans[i] = new TGeoTranslation();
1193 localendladdercarbonfiberjunctionglobalrot[i]->SetAngles(0.0,90.0,0.0);
1194 localendladdercarbonfiberjunctionglobaltrans[i]->SetTranslation(0.0,
1195 0.5*fgkEndLadderCarbonFiberLowerJunctionLength[i],0.0);
1196 localendladdercarbonfiberjunctionglobalmatrix[i] =
1197 new TGeoCombiTrans(*localendladdercarbonfiberjunctionglobaltrans[i],
1198 *localendladdercarbonfiberjunctionglobalrot[i]);
1200 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1201 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1202 localendladdercarbonfiberjunctionmatrix[i][j] =
1203 new TGeoCombiTrans(*localendladdercarbonfiberjunctiontrans[i][j],
1204 *localendladdercarbonfiberjunctionrot[i][j]);
1205 fendladdercarbonfiberjunctionmatrix[i][j] =
1206 new TGeoHMatrix((*localendladdercarbonfiberjunctionglobalmatrix[i])
1207 * (*localendladdercarbonfiberjunctionmatrix[i][j]));
1209 /////////////////////////////////////////////////////////////
1210 // End Ladder Carbon Fiber Support
1211 /////////////////////////////////////////////////////////////
1212 TGeoTranslation* localendladdercarbonfibertrans[fgkendladdercarbonfibermatrixnumber];
1213 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++){
1214 localendladdercarbonfibertrans[i] = new TGeoTranslation();
1215 localendladdercarbonfibertrans[i]->SetTranslation(0.0,
1216 i==0 ? 0.0 :fgkCarbonFiberLowerSupportWidth,0.0);
1217 fendladdercarbonfibermatrix[i] = new TGeoHMatrix*[fgkcarbonfibersupportnumber];
1219 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++)
1220 for(Int_t j=0; j<fgkcarbonfibersupportnumber; j++)
1221 fendladdercarbonfibermatrix[i][j] =
1222 new TGeoHMatrix((*localendladdercarbonfibertrans[i])
1223 *(*fcarbonfibersupportmatrix[j]));
1224 /////////////////////////////////////////////////////////////
1225 // End Ladder SSD Mounting Block
1226 /////////////////////////////////////////////////////////////
1227 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1228 fendladdermountingblockcombitrans[i] = new TGeoCombiTrans();
1229 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1230 fendladdermountingblockcombitrans[i]->SetTranslation(- 0.25*(fgkSSDMountingBlockLength[0]
1231 + fgkSSDMountingBlockLength[1])
1232 + 0.5*fgkCarbonFiberTriangleLength,
1233 fgkEndLadderMountingBlockPosition[i],
1234 - fgkSSDMountingBlockHeight[1]
1235 + 0.5*fgkSSDMountingBlockHeight[0]);
1236 TGeoRotation* endladdermountingblockrot = new TGeoRotation();
1237 endladdermountingblockrot->SetAngles(0.,90.,0.);
1238 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1239 fendladdermountingblockcombitrans[i]->SetRotation(*endladdermountingblockrot);
1240 /////////////////////////////////////////////////////////////
1241 // End Ladder SSD Mounting Block Clip Matrix
1242 /////////////////////////////////////////////////////////////
1243 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1244 fendladdermountingblockclipmatrix[i] = new TGeoHMatrix*[2];
1246 TGeoRotation* localendladdercliprot = new TGeoRotation();
1247 TGeoTranslation* localendladdercliptrans = new TGeoTranslation();
1248 localendladdercliptrans->SetTranslation(-0.5*(fgkSSDMountingBlockLength[0]
1249 - fgkSSDMountingBlockLength[1])
1250 + fgkSSDMountingBlockLength[0],0.,0.);
1251 localendladdercliprot->SetAngles(90.,180.,-90.);
1252 TGeoCombiTrans* localendladderclipcombitrans =
1253 new TGeoCombiTrans(*localendladdercliptrans,*localendladdercliprot);
1254 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1255 for(Int_t j=0; j<2; j++){
1256 fendladdermountingblockclipmatrix[i][j] =
1257 new TGeoHMatrix(*fendladdermountingblockcombitrans[i]);
1258 if(j!=0) fendladdermountingblockclipmatrix[i][j]->Multiply(localendladderclipcombitrans);
1260 /////////////////////////////////////////////////////////////
1261 // End Ladder Carbon Fiber Lower Support
1262 /////////////////////////////////////////////////////////////
1263 for(Int_t i=0; i<fgkendladderlowersuppnumber; i++)
1264 fendladderlowersupptrans[i] =
1265 new TGeoTranslation(0.0,(1-i)*(fgkEndLadderMountingBlockPosition[i]
1266 + 0.5*fgkSSDMountingBlockWidth),
1267 - 0.5*fgkCarbonFiberLowerSupportHeight);
1268 fendladderlowersupptrans[2] = new TGeoTranslation(0.0,
1269 fgkCarbonFiberLowerSupportVolumePosition[1]
1270 + fgkCarbonFiberLowerSupportVolumePosition[0],
1272 fendladderlowersupptrans[2]->Add(fendladderlowersupptrans[1]);
1273 /////////////////////////////////////////////////////////////
1274 // Matrix for positioning Ladder into mother volume
1275 /////////////////////////////////////////////////////////////
1276 TGeoHMatrix** ladderglobalmatrix[fgkladdernumber];
1277 for(Int_t i=0; i<fgkladdernumber; i++)
1278 ladderglobalmatrix[i] = new TGeoHMatrix*[fgkladdernumber];
1279 TGeoRotation* localladdermotherrot = new TGeoRotation();
1280 localladdermotherrot->SetAngles(0.,90.,0.);
1281 TGeoTranslation* localladdermothertrans[fgkladdernumber];
1282 TGeoCombiTrans* localladdermothercombitrans[fgkladdernumber];
1283 for(Int_t i=0; i<fgkladdernumber; i++){
1284 localladdermothertrans[i] = new TGeoTranslation(0.,
1285 - fgkEndLadderCarbonFiberLowerJunctionLength[1]
1286 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
1287 + (i==0?fgkSSDLay5SensorsNumber:fgkSSDLay6SensorsNumber)
1288 * fgkCarbonFiberJunctionWidth,0.);
1289 localladdermothercombitrans[i] = new TGeoCombiTrans(*localladdermothertrans[i],
1290 *localladdermotherrot);
1291 ladderglobalmatrix[0][i] = new TGeoHMatrix(*localladdermothercombitrans[i]);
1292 ladderglobalmatrix[1][i] = new TGeoHMatrix(ladderglobalmatrix[0][i]->Inverse());
1294 /////////////////////////////////////////////////////////////
1295 // Ladder Cables Matrices
1296 /////////////////////////////////////////////////////////////
1297 Double_t ssdflexradius = fgkSSDStiffenerHeight+2*fgkSSDFlexHeight[0]
1298 + fgkSSDFlexHeight[1];
1299 Double_t ssdladdercabletransx[3];
1300 ssdladdercabletransx[0] = (ssdflexradiusmax-fgkSSDFlexHeight[1]-ssdflexradius)
1301 * SinD(2.*fgkSSDFlexAngle)
1302 * CosD(2.*fgkSSDFlexAngle);
1303 ssdladdercabletransx[1] = ((ssdflexradiusmax-fgkSSDFlexHeight[1]-ssdflexradius)
1304 - ssdladdercabletransx[0]
1305 / SinD(2.*fgkSSDFlexAngle))
1306 * CosD(fgkSSDFlexAngle);
1307 ssdladdercabletransx[2] = (fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
1308 * TMath::DegToRad()*ssdflexradiusmax
1309 - fgkSSDFlexLength[2]-TMath::Pi()
1310 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
1311 - fgkSSDLadderCableWidth)
1312 * CosD(2.*fgkSSDFlexAngle);
1313 Double_t ssdladdercabletransz[3] = {ssdladdercabletransx[0]
1314 * TanD(2.*fgkSSDFlexAngle),
1315 ssdladdercabletransx[1]
1316 * TanD(fgkSSDFlexAngle),
1317 ssdladdercabletransx[2]
1318 * TanD(2.*fgkSSDFlexAngle)};
1319 TGeoRotation* localladdercablerot[3];
1320 for(Int_t i=0; i<3; i++) localladdercablerot[i] = new TGeoRotation();
1321 localladdercablerot[0]->SetAngles(90.,0.,0.);
1322 localladdercablerot[1]->SetAngles(90.,60.,-90.);
1323 localladdercablerot[2]->SetRotation((*localladdercablerot[1])
1324 * (*localladdercablerot[0]));
1325 //TGeoRotation* localladdercablerot = new TGeoRotation();
1326 //localladdercablerot->SetAngles(90.,0.,0.);
1327 ////////////////////////////////////////////
1328 // LocalLadderCableCombiTransMatrix
1329 ////////////////////////////////////////////
1330 const Int_t klocalladdersidecablesnumber = 2;
1331 const Int_t klocalladdercombitransnumber = 5;
1332 TGeoCombiTrans** localladdercablecombitransmatrix[klocalladdersidecablesnumber];
1333 for(Int_t i=0; i<klocalladdersidecablesnumber; i++)
1334 localladdercablecombitransmatrix[i] =
1335 new TGeoCombiTrans*[klocalladdercombitransnumber];
1336 ///////////////////////////////////////////
1337 // Left Side Ladder Cables Transformations
1338 ///////////////////////////////////////////
1339 localladdercablecombitransmatrix[0][0] =
1340 new TGeoCombiTrans(-0.5*fgkCarbonFiberTriangleLength,
1342 localladdercablecombitransmatrix[0][1] =
1343 new TGeoCombiTrans(-0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
1344 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1345 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1346 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1347 - 0.5*(fgkCarbonFiberLowerSupportWidth
1348 + fgkSSDSensorCenterSupportLength
1349 - fgkSSDSensorCenterSupportThickness[0]),
1350 - (fgkSSDModuleCoolingBlockToSensor
1351 + 0.5*fgkCoolingTubeSupportHeight
1352 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]
1353 - fgkSSDChipHeight),NULL);
1354 localladdercablecombitransmatrix[0][2] =
1355 new TGeoCombiTrans(fgkSSDModuleStiffenerPosition[0],
1356 fgkSSDModuleStiffenerPosition[1],0.,0);
1357 localladdercablecombitransmatrix[0][3] = new TGeoCombiTrans(
1358 0.5*(fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
1359 +(fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
1360 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
1361 - fgkSSDStiffenerWidth,- 0.5*fgkSSDChipHeight,
1362 new TGeoRotation("",180.,0.,0.));
1363 localladdercablecombitransmatrix[0][4] =
1364 new TGeoCombiTrans(-ssdladdercabletransx[0]
1365 - ssdladdercabletransx[1]-ssdladdercabletransx[2]
1366 + fgkSSDFlexLength[0]-fgkSSDFlexLength[2],
1368 0.5*fgkSSDFlexHeight[0]+2.*(fgkSSDFlexHeight[0]
1369 + fgkSSDFlexHeight[1])+2.*fgkSSDStiffenerHeight
1370 + ssdladdercabletransz[0]-ssdladdercabletransz[1]
1371 + ssdladdercabletransz[2],localladdercablerot[2]);
1372 ///////////////////////////////////////////
1373 // Rigth Side Ladder Cables Transformations
1374 ///////////////////////////////////////////
1375 TGeoCombiTrans* localladdercablessdmodulematrix =
1376 new TGeoCombiTrans(0.5*(fgkSSDStiffenerLength-fgkSSDChipNumber*fgkSSDChipLength
1377 - (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
1378 fgkSSDStiffenerWidth,
1379 - 0.5*fgkSSDFlexHeight[0],NULL);
1380 for(Int_t i=0; i<klocalladdercombitransnumber; i++)
1381 localladdercablecombitransmatrix[1][i] =
1382 (i!=3 ? new TGeoCombiTrans(*localladdercablecombitransmatrix[0][i]):
1383 new TGeoCombiTrans(*localladdercablessdmodulematrix));
1384 ///////////////////////////////////////////
1385 // Setting LadderCableHMatrix
1386 ///////////////////////////////////////////
1387 Int_t beamaxistrans[2][3];
1388 beamaxistrans[0][0] = fgkSSDLay5SensorsNumber/2;
1389 beamaxistrans[0][1] = beamaxistrans[0][0]+1;
1390 beamaxistrans[0][2] = beamaxistrans[0][0]-1;
1391 beamaxistrans[1][0] = (fgkSSDLay6SensorsNumber-1)/2;
1392 beamaxistrans[1][1] = beamaxistrans[1][0]+1;
1393 beamaxistrans[1][2] = beamaxistrans[1][0];
1394 TGeoHMatrix** localladdercablehmatrix[fgkladdercablesnumber];
1395 TGeoRotation* laddercablerot = new TGeoRotation();
1396 TGeoTranslation* laddercabletrans = new TGeoTranslation();
1397 TGeoCombiTrans* laddercablecombitrans = new TGeoCombiTrans();
1398 Double_t* laddercabletransvector;
1399 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1400 localladdercablehmatrix[i] = new TGeoHMatrix*[klocalladdersidecablesnumber];
1401 fladdercablematrix[i] = new TGeoHMatrix*[fgkladdercablematrixnumber];
1403 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1404 for(Int_t j=0; j<klocalladdersidecablesnumber; j++){
1405 localladdercablehmatrix[i][j] = new TGeoHMatrix();
1406 for(Int_t k=0; k<klocalladdercombitransnumber; k++){
1407 localladdercablehmatrix[i][j]->MultiplyLeft(
1408 localladdercablecombitransmatrix[j][klocalladdercombitransnumber-k-1]);
1410 laddercablerot->SetMatrix(localladdercablehmatrix[i][j]->GetRotationMatrix());
1411 laddercabletransvector = localladdercablehmatrix[i][j]->GetTranslation();
1412 laddercabletrans->SetTranslation(laddercabletransvector[0],
1413 laddercabletransvector[1]
1414 + (j==0 ? beamaxistrans[i][0] : 0.)
1415 * fgkCarbonFiberJunctionWidth,
1416 laddercabletransvector[2]);
1417 laddercablecombitrans->SetRotation(*laddercablerot);
1418 laddercablecombitrans->SetTranslation(*laddercabletrans);
1419 fladdercablematrix[i][j] = new TGeoHMatrix(*laddercablecombitrans);
1421 fladdercablematrix[i][2] =
1422 AddTranslationToHMatrix(fladdercablematrix[i][1],0.,
1423 beamaxistrans[i][1]*fgkCarbonFiberJunctionWidth,0.);
1424 fladdercablematrix[i][3] =
1425 AddTranslationToHMatrix(fladdercablematrix[i][0],0.,
1426 beamaxistrans[i][2]*fgkCarbonFiberJunctionWidth,0.);
1428 for(Int_t i=0; i<fgkladdercablesnumber; i++)
1429 for(Int_t j=0; j<klocalladdercombitransnumber-1; j++)
1430 fladdercablematrix[i][j]->MultiplyLeft(ladderglobalmatrix[1][i]);
1431 ///////////////////////////////////////////
1432 // Setting Ladder HMatrix
1433 ///////////////////////////////////////////
1434 Int_t ssdlaysensorsnumber[fgkladdernumber] = {fgkSSDLay5SensorsNumber,
1435 fgkSSDLay6SensorsNumber};
1436 for(Int_t i=0; i<fgkladdernumber; i++){
1437 fladdermatrix[i] = new TGeoHMatrix*[ssdlaysensorsnumber[i]];
1438 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
1439 fladdermatrix[i][j] = new TGeoHMatrix();
1440 fladdermatrix[i][j]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1441 fladdermatrix[i][j]->SetDy(fgkCarbonFiberJunctionWidth*j);
1442 fladdermatrix[i][j]->MultiplyLeft(ladderglobalmatrix[1][i]);
1445 ///////////////////////////////////////////
1446 // Setting SSD Sensor Matrix
1447 ///////////////////////////////////////////
1448 TGeoCombiTrans* localssdsensorcombitrans[2];
1449 TGeoRotation* localssdsensorrot = new TGeoRotation();
1450 localssdsensorrot->SetAngles(0.,90.,0.);
1451 TGeoTranslation* localssdsensortrans[2];
1452 for(Int_t i=0; i<2; i++) localssdsensortrans[i] = new TGeoTranslation();
1453 localssdsensortrans[0]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
1454 fgkCarbonFiberJunctionWidth
1455 - fgkCarbonFiberLowerSupportWidth
1456 - fgkLowerSupportToSensorZ,
1457 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
1458 - fgkSSDModuleCoolingBlockToSensor
1459 + (fgkSSDSensorSideSupportHeight[1]
1460 - fgkSSDSensorSideSupportHeight[0]));
1461 localssdsensortrans[1]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
1462 fgkCarbonFiberJunctionWidth
1463 - fgkCarbonFiberLowerSupportWidth
1464 - fgkLowerSupportToSensorZ,
1465 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
1466 -fgkSSDModuleCoolingBlockToSensor);
1468 for(Int_t i=0; i<2; i++)
1469 localssdsensorcombitrans[i] = new TGeoCombiTrans(*localssdsensortrans[i],
1470 *localssdsensorrot);
1471 for(Int_t i=0; i<fgkladdernumber; i++){
1472 fssdsensormatrix[i] = new TGeoHMatrix*[ssdlaysensorsnumber[i]];
1473 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
1475 case 0: //Ladder of Layer5
1476 fssdsensormatrix[i][j] = new TGeoHMatrix((*fladdermatrix[i][j])
1477 * ((j%2==0 ? *localssdsensorcombitrans[0] :
1478 *localssdsensorcombitrans[1])));
1480 case 1: //Ladder of Layer6
1481 fssdsensormatrix[i][j] = new TGeoHMatrix((*fladdermatrix[i][j])
1482 * ((j%2==0 ? *localssdsensorcombitrans[1] :
1483 *localssdsensorcombitrans[0])));
1488 //////////////////////////
1489 // Setting SSD End Ladder
1490 //////////////////////////
1491 for(Int_t i=0; i<2; i++) fendladdersegmentmatrix[i] = new TGeoHMatrix*[2];
1492 for(Int_t i=0; i<2; i++){
1493 fendladdersegmentmatrix[0][i] = new TGeoHMatrix();
1494 fendladdersegmentmatrix[0][i]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1495 fendladdersegmentmatrix[0][i]->SetDy(fgkCarbonFiberJunctionWidth*ssdlaysensorsnumber[i]);
1496 fendladdersegmentmatrix[0][i]->MultiplyLeft(ladderglobalmatrix[1][i]);
1497 fendladdersegmentmatrix[1][i] = new TGeoHMatrix();
1498 fendladdersegmentmatrix[1][i]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1499 fendladdersegmentmatrix[1][i]->RotateZ(180.0);
1500 fendladdersegmentmatrix[1][i]->MultiplyLeft(ladderglobalmatrix[1][i]);
1502 /////////////////////////////////////////////////////
1503 // Setting the CombiTransformation to pass ITS center
1504 /////////////////////////////////////////////////////
1505 Double_t itscentertransz[fgklayernumber];
1506 itscentertransz[0] = fgkSSDLay5LadderLength
1507 - fgkLay5CenterITSPosition;
1508 itscentertransz[1] = fgkSSDLay6LadderLength
1509 - fgkLay6CenterITSPosition;
1510 Double_t itssensortransy = fgkSSDModuleCoolingBlockToSensor
1511 + 0.5*fgkCoolingTubeSupportHeight;
1512 TGeoRotation* itscenterrot[3];
1513 for(Int_t i=0; i<fgklayernumber; i++) itscenterrot[i] = new TGeoRotation();
1514 itscenterrot[0]->SetAngles(90.,180.,-90.);
1515 itscenterrot[1]->SetAngles(0.,90.,0.);
1516 itscenterrot[2] = new TGeoRotation((*itscenterrot[1])*(*itscenterrot[0]));
1517 TGeoCombiTrans* itscentercombitrans[fgklayernumber];
1518 for(Int_t i=0; i<fgklayernumber; i++)
1519 itscentercombitrans[i] = new TGeoCombiTrans(0.,
1521 fgkEndLadderCarbonFiberLowerJunctionLength[1]
1522 - itscentertransz[i],itscenterrot[2]);
1523 TGeoRotation** locallayerrot[fgklayernumber];
1524 TGeoTranslation** locallayertrans[fgklayernumber];
1525 TGeoCombiTrans** locallayercombitrans[fgklayernumber];
1526 TGeoTranslation* localbeamaxistrans[fgklayernumber];
1527 localbeamaxistrans[0] = new TGeoTranslation(0.,0.,0.5*fgkSSDLay5LadderLength
1528 - fgkLay5CenterITSPosition);
1529 localbeamaxistrans[1] = new TGeoTranslation(0.,0.,0.5*fgkSSDLay6LadderLength
1530 - fgkLay6CenterITSPosition);
1531 const Int_t kssdlayladdernumber[fgklayernumber] =
1532 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
1533 for(Int_t i=0; i<fgklayernumber; i++){
1534 locallayerrot[i] = new TGeoRotation*[kssdlayladdernumber[i]];
1535 locallayertrans[i] = new TGeoTranslation*[kssdlayladdernumber[i]];
1536 locallayercombitrans[i] = new TGeoCombiTrans*[kssdlayladdernumber[i]];
1537 flayermatrix[i] = new TGeoHMatrix*[kssdlayladdernumber[i]];
1539 Double_t layerladderangleposition[fgklayernumber] =
1540 {360./fgkSSDLay5LadderNumber,360./fgkSSDLay6LadderNumber};
1541 Double_t layerradius = 0.;
1542 for(Int_t i=0; i<fgklayernumber; i++){
1543 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
1545 case 0: //Ladder of Layer5
1546 layerradius = (j%2==0 ? fgkSSDLay5RadiusMin: fgkSSDLay5RadiusMax);
1548 case 1: //Ladder of Layer6
1549 layerradius = (j%2==0 ? fgkSSDLay6RadiusMin: fgkSSDLay6RadiusMax);
1552 locallayerrot[i][j] = new TGeoRotation();
1553 locallayertrans[i][j] = new TGeoTranslation();
1554 locallayerrot[i][j]->SetAngles(j*layerladderangleposition[i],0.,0.);
1555 locallayertrans[i][j]->SetTranslation(layerradius
1556 * CosD(90.0+j*layerladderangleposition[i]),
1558 * SinD(90.0+j*layerladderangleposition[i]),0.);
1559 locallayercombitrans[i][j] = new TGeoCombiTrans(*locallayertrans[i][j],
1560 *locallayerrot[i][j]);
1561 flayermatrix[i][j] = new TGeoHMatrix((*locallayercombitrans[i][j])*(*itscentercombitrans[i]));
1562 flayermatrix[i][j]->Multiply(ladderglobalmatrix[0][i]);
1563 flayermatrix[i][j]->MultiplyLeft(localbeamaxistrans[i]);
1566 /////////////////////////////////////////////////////////////
1567 // Deallocating memory
1568 /////////////////////////////////////////////////////////////
1569 for(Int_t i=0; i< kcarbonfibersupportmatrixnumber[1]; i++){
1570 delete carbonfiberot[i];
1571 delete localcarbonfibersupportmatrix[i];
1573 for(Int_t i=0; i< fgkcarbonfiberjunctionumber; i++){
1574 for(Int_t j=0; j< kcarbonfiberjunctionmatrixnumber; j++){
1575 delete localcarbonfiberjunctionmatrix[i][j];
1576 delete localcarbonfiberjunctionrot[i][j];
1577 delete localcarbonfiberjunctiontrans[i][j];
1579 delete [] localcarbonfiberjunctionmatrix[i];
1580 delete [] localcarbonfiberjunctionrot[i];
1581 delete [] localcarbonfiberjunctiontrans[i];
1583 for(Int_t i=0; i<fgkcarbonfiberlowersupportnumber; i++)
1584 delete localcarbonfiberlowersupportrans[i];
1585 for(Int_t i=0; i< fgkssdsensorsupportnumber; i++){
1586 for(Int_t j=0; j< kssdsensorsupportmatrixnumber; j++){
1587 delete localssdsensorsupportmatrix[i][j];
1588 delete localssdsensorsupportrot[i][j];
1589 delete localssdsensorsupportrans[i][j];
1591 delete [] localssdsensorsupportmatrix[i];
1592 delete [] localssdsensorsupportrot[i];
1593 delete [] localssdsensorsupportrans[i];
1595 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++){
1596 delete localcoolingtubesupportmatrix[i];
1597 delete localcoolingtubesupportrot[i];
1598 delete localcoolingtubesupportrans[i];
1600 for(Int_t j=0; j<2; j++){
1601 delete localcoolingtubevect[j];
1602 delete localcoolingtubetrans[j];
1604 delete endladdermountingblockrot;
1605 for(Int_t i=0; i<khybridmatrixnumber; i++) delete localhybridtrans[i];
1606 for(Int_t i=0; i<kcoolingblockmatrixnumber; i++) delete localcoolingblocktrans[i];
1607 for(Int_t i=0; i<fgkflexnumber; i++){
1608 for(Int_t j=1; j<klocalflexmatrixnumber; j++)
1609 delete localflexmatrix[i][j];
1610 delete [] localflexmatrix[i];
1612 delete localendlladdercoolingtuberot;
1613 for(Int_t i=0; i<2; i++){
1614 for(Int_t j=0; j<2; j++)
1615 delete localendlladdercoolingtubetrans[i][j];
1616 delete [] localendlladdercoolingtubetrans[i];
1619 delete localflexrot;
1620 delete localendflexrot;
1621 delete localendflexmatrix;
1622 for(Int_t i=0; i<fgkladdernumber; i++){
1623 delete localladdermothertrans[i];
1624 delete localladdermothercombitrans[i];
1626 delete localladdermotherrot;
1627 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1628 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1629 delete localendladdercarbonfiberjunctionmatrix[i][j];
1630 delete localendladdercarbonfiberjunctionrot[i][j];
1631 delete localendladdercarbonfiberjunctiontrans[i][j];
1633 delete [] localendladdercarbonfiberjunctionmatrix[i];
1634 delete [] localendladdercarbonfiberjunctionrot[i];
1635 delete [] localendladdercarbonfiberjunctiontrans[i];
1636 delete localendladdercarbonfiberjunctionglobalrot[i];
1637 delete localendladdercarbonfiberjunctionglobaltrans[i];
1638 delete localendladdercarbonfiberjunctionglobalmatrix[i];
1640 for(Int_t i=0; i<2; i++){
1641 for(Int_t j=0; j<(i==0?4:2); j++) delete localendladdercooltubetrans[i][j];
1642 delete [] localendladdercooltubetrans[i];
1644 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++)
1645 delete localendladdercarbonfibertrans[i];
1646 for(Int_t i=0; i<3; i++) delete localladdercablerot[i];
1647 for(Int_t i=0; i<klocalladdersidecablesnumber; i++){
1648 for(Int_t j=0; j<klocalladdercombitransnumber; j++)
1649 delete localladdercablecombitransmatrix[i][j];
1650 delete []localladdercablecombitransmatrix[i];
1652 delete localendladdercliprot;
1653 delete localendladdercliptrans;
1654 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1655 for(Int_t j=0; j<klocalladdersidecablesnumber; j++)
1656 delete localladdercablehmatrix[i][j];
1657 delete []localladdercablehmatrix[i];
1659 delete laddercablerot;
1660 delete laddercabletrans;
1661 delete laddercablecombitrans;
1662 delete localladdercablessdmodulematrix;
1663 delete localssdsensorrot;
1664 for(Int_t i=0; i<2; i++){
1665 delete localssdsensortrans[i];
1666 delete localssdsensorcombitrans[i];
1668 for(Int_t i=0; i<fgklayernumber; i++){
1669 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
1670 delete locallayerrot[i][j];
1671 delete locallayertrans[i][j];
1672 delete locallayercombitrans[i][j];
1674 delete [] locallayerrot[i];
1675 delete [] locallayertrans[i];
1676 delete [] locallayercombitrans[i];
1677 delete localbeamaxistrans[i];
1679 for(Int_t i=0; i<3; i++) delete itscenterrot[i];
1680 for(Int_t i=0; i<fgkladdernumber; i++){
1681 for(Int_t j=0; j<fgkladdernumber; j++)
1682 delete ladderglobalmatrix[i][j];
1683 delete [] ladderglobalmatrix[i];
1685 /////////////////////////////////////////////////////////////
1686 fTransformationMatrices = kTRUE;
1688 ///////////////////////////////////////////////////////////////////////////////
1689 void AliITSv11GeometrySSD::CreateBasicObjects(){
1690 /////////////////////////////////////////////////////////////
1691 // Method generating the Objects of SSD Geometry
1692 /////////////////////////////////////////////////////////////
1694 ///////////////////////////////////
1696 /////////////////////////////////////////////////////////////
1697 // Carbon Fiber Support
1698 /////////////////////////////////////////////////////////////
1699 TList* carbonfibersupportlist = GetCarbonFiberSupportList();
1700 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++)
1701 fcarbonfibersupport[i] = (TGeoVolume*)carbonfibersupportlist->At(i);
1702 /////////////////////////////////////////////////////////////
1703 // Carbon Fiber Junction
1704 /////////////////////////////////////////////////////////////
1705 fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth-fgkSSDTolerance);
1706 /////////////////////////////////////////////////////////////
1707 // Carbon Fiber Lower Support
1708 /////////////////////////////////////////////////////////////
1709 TList* carbonfiberlowersupportlist = GetCarbonFiberLowerSupportList();
1710 for(Int_t i=0; i<fgkcarbonfiberlowersupportnumber; i++)
1711 fcarbonfiberlowersupport[i] = (TGeoVolume*)carbonfiberlowersupportlist->At(i);
1712 /////////////////////////////
1713 // SSD Sensor Support
1714 /////////////////////////////
1715 for(Int_t i=0; i<fgkvolumekind; i++) fssdsensorsupport[i] =
1716 new TGeoVolume*[fgkssdsensorsupportnumber];
1717 Double_t sidesupporthickness[2] = {fgkSSDSensorSideSupportThickness[0],
1718 fgkSSDSensorSideSupportThickness[1]};
1719 for(Int_t i=0; i<fgkssdsensorsupportnumber-1; i++){
1720 fssdsensorsupport[0][i] = GetSSDSensorSupport(fgkSSDSensorSideSupportLength,
1721 fgkSSDSensorSideSupportHeight[i],
1722 fgkSSDSensorSideSupportWidth,
1723 sidesupporthickness);
1724 fssdsensorsupport[1][i] = GetSSDSensorSupport(fgkSSDSensorCenterSupportLength,
1725 fgkSSDSensorCenterSupportHeight[i],
1726 fgkSSDSensorCenterSupportWidth,
1727 sidesupporthickness);
1729 /////////////////////////////////////////////////////////////
1730 // SSD Cooling Tube Support
1731 /////////////////////////////////////////////////////////////
1732 Int_t edgesnumber = 3;
1733 fcoolingtubesupport = GetCoolingTubeSupport(edgesnumber);
1734 /////////////////////////////////////////////////////////////
1736 /////////////////////////////////////////////////////////////
1737 TList* ssdhybridcomponentslist = GetSSDHybridParts();
1738 for(Int_t i=0; i<fgkhybridcompnumber; i++)
1739 fssdhybridcomponent[i] = (TGeoVolume*)ssdhybridcomponentslist->At(i);
1740 /////////////////////////////////////////////////////////////
1741 // SSD Cooling Block System
1742 /////////////////////////////////////////////////////////////
1743 fssdcoolingblocksystem = GetCoolingBlockSystem();
1744 /////////////////////////////////////////////////////////////
1746 /////////////////////////////////////////////////////////////
1747 CreateCoolingTubes();
1748 /////////////////////////////////////////////////////////////
1750 /////////////////////////////////////////////////////////////
1751 fssdstiffenerflex = GetSSDStiffenerFlex();
1752 fssdendflex = GetSSDEndFlex();
1753 ///////////////////////////////////
1754 // End Ladder Carbon Fiber Junction
1755 ///////////////////////////////////
1756 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1757 fendladdercarbonfiberjunction[i] =
1758 new TGeoVolume*[fgkendlabbercarbonfiberjunctionumber];
1759 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1760 fendladdercarbonfiberjunction[i][0] =
1761 GetCarbonFiberJunction(fgkEndLadderCarbonFiberLowerJunctionLength[i]-fgkSSDTolerance);
1762 fendladdercarbonfiberjunction[i][1] =
1763 GetCarbonFiberJunction(fgkEndLadderCarbonFiberUpperJunctionLength[i]-fgkSSDTolerance);
1765 ///////////////////////////////////
1766 // End Ladder Mounting Block
1767 ///////////////////////////////////
1768 fendladdermountingblock = GetSSDMountingBlock();
1769 ///////////////////////////////////
1770 // End Ladder Mounting Block
1771 ///////////////////////////////////
1772 fendladdermountingblockclip = GetMountingBlockClip();
1773 ///////////////////////////////////
1775 ///////////////////////////////////
1776 TList* laddersupportlist = GetMountingBlockSupport(20);
1777 fLay5LadderSupport[0] = (TGeoVolume*)laddersupportlist->At(0);
1778 fLay5LadderSupport[1] = (TGeoVolume*)laddersupportlist->At(1);
1779 fLay6LadderSupport[0] = (TGeoVolume*)laddersupportlist->At(2);
1780 fLay6LadderSupport[1] = (TGeoVolume*)laddersupportlist->At(3);
1781 /////////////////////////////////////////////////////////////
1782 // Deallocating memory
1783 /////////////////////////////////////////////////////////////
1784 delete carbonfibersupportlist;
1785 delete carbonfiberlowersupportlist;
1786 delete ssdhybridcomponentslist;
1787 delete laddersupportlist;
1788 /////////////////////////////////////////////////////////////
1789 fBasicObjects = kTRUE;
1791 /////////////////////////////////////////////////////////////////////////////////
1792 void AliITSv11GeometrySSD::SetSSDSensor(){
1793 ////////////////////////////////////////////////////////////////
1794 // Method generating SSD Sensors: it sets the private variables
1795 // fSSDSensor5, fSSDSensor6
1796 ////////////////////////////////////////////////////////////////
1797 Double_t ssdsensitivelength = fgkSSDSensorLength-2.*fgkSSDSensorInsensitiveLength;
1798 Double_t ssdsensitivewidth = fgkSSDSensorWidth-2.*fgkSSDSensorInsensitiveWidth;
1799 TGeoBBox* ssdsensorsensitiveshape = new TGeoBBox("SSDSensorSensitiveShape",
1800 0.5*ssdsensitivewidth,
1801 0.5*fgkSSDSensorHeight,
1802 0.5*ssdsensitivelength);
1803 TGeoVolume* ssdsensorsensitiveLay5 =
1804 new TGeoVolume(fgSSDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
1805 TGeoVolume* ssdsensorsensitiveLay6 =
1806 new TGeoVolume(fgSSDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
1807 ssdsensorsensitiveLay5->SetLineColor(fColorSilicon);
1808 ssdsensorsensitiveLay6->SetLineColor(fColorSilicon);
1809 TGeoBBox* ssdsensorinsensitiveshape[2];
1810 ssdsensorinsensitiveshape[0] = new TGeoBBox("SSDSensorInsensitiveShape1",
1811 0.5*fgkSSDSensorInsensitiveWidth,
1812 0.5*fgkSSDSensorHeight,
1813 0.5*fgkSSDSensorLength);
1814 ssdsensorinsensitiveshape[1] = new TGeoBBox("SSDSensorInsensitiveShape2",
1815 0.5*ssdsensitivewidth,
1816 0.5*fgkSSDSensorHeight,
1817 0.5*fgkSSDSensorInsensitiveWidth);
1818 const char* ssdsensorinsensitivename[2] = {"SSDSensorInsensitive1",
1819 "SSDSensorInsensitive2"};
1820 TGeoVolume* ssdsensorinsensitive[2];
1821 for(Int_t i=0; i<2; i++){ ssdsensorinsensitive[i] =
1822 new TGeoVolume(ssdsensorinsensitivename[i],ssdsensorinsensitiveshape[i],
1824 ssdsensorinsensitive[i]->SetLineColor(fColorCarbonFiber);
1826 /////////////////////////////////////////////////////////////
1827 // Virtual Volume containing SSD Sensor
1828 /////////////////////////////////////////////////////////////
1829 TGeoBBox* virtualSSDSensorShape = new TGeoBBox("SSDSensorShape",
1830 0.5*fgkSSDSensorWidth,
1831 0.5*fgkSSDSensorHeight,
1832 0.5*fgkSSDSensorLength);
1833 fSSDSensor5 = new TGeoVolume("ITSssdSensor5",virtualSSDSensorShape,
1835 fSSDSensor6 = new TGeoVolume("ITSssdSensor6",virtualSSDSensorShape,
1837 /////////////////////////////////////////////////////////////
1838 for(Int_t i=0; i<4; i++){
1839 fSSDSensor5->AddNode(i%2==0 ? ssdsensorinsensitive[0]:
1840 ssdsensorinsensitive[1],i<2?1:2,
1841 new TGeoTranslation(
1842 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1843 * (ssdsensorsensitiveshape->GetDX()+ssdsensorinsensitiveshape[0]->GetDX()),0.,
1844 0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1845 * (ssdsensorsensitiveshape->GetDZ()+ssdsensorinsensitiveshape[1]->GetDZ())));
1846 fSSDSensor6->AddNode(i%2==0 ? ssdsensorinsensitive[0]:
1847 ssdsensorinsensitive[1],i<2?1:2,
1848 new TGeoTranslation(
1849 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1850 * (ssdsensorsensitiveshape->GetDX()+ssdsensorinsensitiveshape[0]->GetDX()),0.,
1851 0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1852 * (ssdsensorsensitiveshape->GetDZ()+ssdsensorinsensitiveshape[1]->GetDZ())));
1854 fSSDSensor5->AddNode(ssdsensorsensitiveLay5,1);
1855 fSSDSensor6->AddNode(ssdsensorsensitiveLay6,1);
1857 ///////////////////////////////////////////////////////////////////////////////
1858 TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
1859 /////////////////////////////////////////////////////////////
1860 // Method generating the Carbon Fiber Support
1861 /////////////////////////////////////////////////////////////
1862 const Int_t kvertexnumber = 4;
1863 const Int_t kshapesnumber = 2;
1864 TVector3** vertexposition[kshapesnumber];
1865 for(Int_t i=0; i<kshapesnumber; i++) vertexposition[i] = new TVector3*[kvertexnumber];
1866 Double_t carbonfibersupportxaxisEdgeproj =
1867 fgkCarbonFiberSupportEdgeLength*TMath::Cos(fgkCarbonFiberJunctionAngle[0]
1868 * TMath::DegToRad());
1869 Double_t theta = TMath::ATan(fgkCarbonFiberSupportYAxisLength
1870 / fgkCarbonFiberSupportXAxisLength);
1871 /////////////////////
1872 //Vertex Positioning
1873 ////////////////////
1874 vertexposition[0][0] = new TVector3();
1875 vertexposition[0][1] = new TVector3(fgkCarbonFiberSupportXAxisLength,
1876 fgkCarbonFiberSupportYAxisLength);
1877 vertexposition[0][2] = new TVector3(carbonfibersupportxaxisEdgeproj,
1878 carbonfibersupportxaxisEdgeproj
1879 * TMath::Tan(theta));
1880 vertexposition[0][3] = new TVector3(fgkCarbonFiberSupportXAxisLength
1881 - carbonfibersupportxaxisEdgeproj,
1882 fgkCarbonFiberSupportYAxisLength
1883 - vertexposition[0][2]->Y());
1884 ////////////////////////////////////////////////////
1885 //Setting the parameters for Isometry Transformation
1886 ////////////////////////////////////////////////////
1887 Double_t symmetryplaneposition = (fgkCarbonFiberSupportYAxisLength
1888 + fgkCarbonFiberSupportTopEdgeDist[0]
1889 + fgkCarbonFiberSupportWidth);
1890 Double_t* param = new Double_t[4];
1891 param[0] = 0., param[1] = 1., param[2] = 0., param[3] = -symmetryplaneposition;
1892 for(Int_t j=0; j<kvertexnumber; j++) vertexposition[1][j] =
1893 new TVector3((GetReflection(vertexposition[0][j],param))->X(),
1894 (GetReflection(vertexposition[0][j],param))->Y());
1895 const char* carbonfibersupportshapename[kshapesnumber] =
1896 {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
1897 const char* carbonfibersupportname[kshapesnumber] =
1898 {"CarbonFiberSupport1","CarbonFiberSupport2"};
1899 TGeoArb8* carbonfibersupportshape[kshapesnumber];
1900 TGeoVolume* carbonfibersupport[kshapesnumber];
1901 TList* carbonfibersupportlist = new TList();
1902 Double_t width[2] = {fgkCarbonFiberSupportWidth,fgkCarbonFiberSupportWidth};
1903 Double_t carbonfibersupportheight =
1904 carbonfibersupportxaxisEdgeproj*TMath::Tan(fgkCarbonFiberJunctionAngle[0]
1905 *TMath::DegToRad());
1906 for(Int_t i = 0; i< kshapesnumber; i++){
1907 carbonfibersupportshape[i] =
1908 GetArbShape(vertexposition[i],width,carbonfibersupportheight,
1909 carbonfibersupportshapename[i],i==0 ? 1: -1);
1910 carbonfibersupport[i] = new TGeoVolume(carbonfibersupportname[i],
1911 carbonfibersupportshape[i],fSSDCarbonFiberMedium);
1912 carbonfibersupport[i]->SetLineColor(fColorCarbonFiber);
1913 carbonfibersupportlist->Add(carbonfibersupport[i]);
1915 /////////////////////////////////////////////////////////////
1916 // Deallocating memory
1917 /////////////////////////////////////////////////////////////
1918 for(Int_t i=0; i< kshapesnumber; i++){
1919 for(Int_t j=0; j< kvertexnumber; j++)
1920 delete vertexposition[i][j];
1921 delete [] vertexposition[i];
1924 /////////////////////////////////////////////////////////////
1925 return carbonfibersupportlist;
1927 /////////////////////////////////////////////////////////////////////////////////
1928 TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){
1929 /////////////////////////////////////////////////////////////
1930 // Method generating SSD Carbon Fiber Junction
1931 /////////////////////////////////////////////////////////////
1932 const Int_t kvertexnumber = 6;
1933 TGeoXtru* carbonfiberjunctionshape = new TGeoXtru(2);
1934 Double_t reflectionparam[4] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0]
1935 * TMath::DegToRad()),-1.,0.,0.};
1936 TVector3* vertex[kvertexnumber];
1937 vertex[0] = new TVector3();
1938 vertex[3] = new TVector3(fgkCarbonFiberJunctionEdge[0]
1939 * TMath::Cos(fgkCarbonFiberJunctionAngle[0]
1940 * TMath::DegToRad()),
1941 fgkCarbonFiberJunctionEdge[0]
1942 * TMath::Sin(fgkCarbonFiberJunctionAngle[0]
1943 * TMath::DegToRad()));
1944 vertex[4] = new TVector3(fgkCarbonFiberJunctionLength,
1945 fgkCarbonFiberJunctionEdge[1]);
1946 vertex[5] = new TVector3(fgkCarbonFiberJunctionLength);
1947 vertex[1] = GetReflection(vertex[5],reflectionparam);
1948 vertex[2] = GetReflection(vertex[4],reflectionparam);
1949 Double_t xvertexpoints[6], yvertexpoints[6];
1950 for(Int_t i=0; i<kvertexnumber; i++)
1951 xvertexpoints[i] = vertex[i]->X(), yvertexpoints[i] = vertex[i]->Y();
1952 carbonfiberjunctionshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
1953 carbonfiberjunctionshape->DefineSection(0,-0.5*width);
1954 carbonfiberjunctionshape->DefineSection(1,0.5*width);
1955 TGeoVolume* carbonfiberjunction = new TGeoVolume("CarbonFiberJunction",
1956 carbonfiberjunctionshape,fSSDCarbonFiberMedium);
1957 carbonfiberjunction->SetLineColor(fColorCarbonFiber);
1958 /////////////////////////////////////////////////////////////
1959 // Deallocating memory
1960 /////////////////////////////////////////////////////////////
1961 for (Int_t i=0; i<kvertexnumber; i++) delete vertex[i];
1962 /////////////////////////////////////////////////////////////
1963 return carbonfiberjunction;
1965 ////////////////////////////////////////////////////////////////////////////////
1966 TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){
1967 /////////////////////////////////////////////////////////////
1968 // Method generating the Carbon Fiber Lower Support
1969 /////////////////////////////////////////////////////////////
1970 const Int_t kvertexnumber = 4;
1971 const Int_t kshapesnumber = 2;
1972 Double_t width[2] = {fgkCarbonFiberLowerSupportWidth,
1973 fgkCarbonFiberLowerSupportWidth};
1974 TVector3** vertexposition[kshapesnumber];
1975 for(Int_t i = 0; i<kshapesnumber; i++) vertexposition[i] =
1976 new TVector3*[kvertexnumber];
1977 //First Shape Vertex Positioning
1978 vertexposition[0][0] = new TVector3(fgkCarbonFiberLowerSupportLowerLenght);
1979 vertexposition[0][1] = new TVector3(fgkCarbonFiberTriangleLength
1980 - fgkCarbonFiberLowerSupportLowerLenght);
1981 vertexposition[0][2] = new TVector3();
1982 vertexposition[0][3] = new TVector3(fgkCarbonFiberTriangleLength);
1983 //Second Shape Vertex Positioning
1984 Double_t theta = TMath::ATan((fgkCarbonFiberLowerSupportVolumePosition[1]
1985 - fgkCarbonFiberLowerSupportVolumePosition[0])
1986 / fgkCarbonFiberTriangleLength);
1987 vertexposition[1][0] = new TVector3(vertexposition[0][0]->X(),
1988 vertexposition[0][0]->X()*TMath::Tan(theta)
1989 + fgkCarbonFiberLowerSupportVolumePosition[0]);
1990 vertexposition[1][1] = new TVector3(vertexposition[0][1]->X(),
1991 vertexposition[0][1]->X()*TMath::Tan(theta)
1992 + fgkCarbonFiberLowerSupportVolumePosition[0]);
1993 vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
1994 vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
1995 fgkCarbonFiberLowerSupportVolumePosition[1]);
1996 const char* carbonfiberlowersupportshapename[kshapesnumber] =
1997 {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
1998 const char* carbonfiberlowersupportname[kshapesnumber] =
1999 {"CarbonFiberLowerSupport1","CarbonFiberLowerSupport2"};
2000 TGeoArb8* carbonfiberlowersupportshape[kshapesnumber];
2001 TGeoVolume* carbonfiberlowersupport[kshapesnumber];
2002 TList* carbonfiberlowersupportlist = new TList();
2003 for(Int_t i = 0; i< kshapesnumber; i++){
2004 carbonfiberlowersupportshape[i] =
2005 GetArbShape(vertexposition[i],width,
2006 fgkCarbonFiberLowerSupportHeight,
2007 carbonfiberlowersupportshapename[i]);
2008 carbonfiberlowersupport[i] = new TGeoVolume(carbonfiberlowersupportname[i],
2009 carbonfiberlowersupportshape[i],fSSDCarbonFiberMedium);
2010 carbonfiberlowersupport[i]->SetLineColor(fColorCarbonFiber);
2011 carbonfiberlowersupportlist->Add(carbonfiberlowersupport[i]);
2013 /////////////////////////////////////////////////////////////
2014 // Deallocating memory
2015 /////////////////////////////////////////////////////////////
2016 for(Int_t i=0; i< kshapesnumber; i++){
2017 for(Int_t j=0; j< kvertexnumber; j++)
2018 delete vertexposition[i][j];
2019 delete [] vertexposition[i];
2021 /////////////////////////////////////////////////////////////
2022 return carbonfiberlowersupportlist;
2024 ///////////////////////////////////////////////////////////////////////////////
2025 TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t height,
2026 Double_t width, Double_t* thickness)const{
2027 /////////////////////////////////////////////////////////////
2028 // Method generating the Sensor Support
2029 /////////////////////////////////////////////////////////////
2030 const Int_t kvertexnumber = 6;
2031 TGeoXtru* ssdsensorsupportshape = new TGeoXtru(2);
2032 TVector3* vertexposition[kvertexnumber];
2033 vertexposition[0] = new TVector3();
2034 vertexposition[1] = new TVector3(0.0,length);
2035 vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y());
2036 vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0]);
2037 vertexposition[4] = new TVector3(height,vertexposition[3]->Y());
2038 vertexposition[5] = new TVector3(vertexposition[4]->X());
2039 Double_t xvertexpoints[6], yvertexpoints[6];
2040 for(Int_t i=0; i<kvertexnumber; i++)
2041 xvertexpoints[i] = vertexposition[i]->X(),
2042 yvertexpoints[i] = vertexposition[i]->Y();
2043 ssdsensorsupportshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
2044 ssdsensorsupportshape->DefineSection(0,-0.5*width);
2045 ssdsensorsupportshape->DefineSection(1,0.5*width);
2046 TGeoVolume* ssdsensorsupport = new TGeoVolume("SSDSensorSupport",
2047 ssdsensorsupportshape,fSSDSensorSupportMedium);
2048 /////////////////////////////////////////////////////////////
2049 // Deallocating memory
2050 /////////////////////////////////////////////////////////////
2051 for (Int_t i=0; i<kvertexnumber; i++)
2052 delete vertexposition[i];
2053 /////////////////////////////////////////////////////////////
2054 return ssdsensorsupport;
2056 ////////////////////////////////////////////////////////////////////////////////
2057 TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
2058 /////////////////////////////////////////////////////////////
2059 // Method generating the Cooling Tube Support
2060 /////////////////////////////////////////////////////////////
2061 if(nedges%2!=0) nedges--;
2062 const Int_t kvertexnumber = nedges+5;
2063 Double_t phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
2064 / fgkCoolingTubeSupportRmax)*TMath::RadToDeg();
2065 Double_t angle = 90.+phi;
2066 Double_t psi = 90.-phi;
2067 ///////////////////////////////////////
2068 // Vertex Positioning for TGeoXTru
2069 ///////////////////////////////////////
2070 TVector3** vertexposition = new TVector3*[kvertexnumber];
2072 Double_t Router = fgkCoolingTubeSupportRmin/CosD(phi/nedges); // Recalc inner radius so that tube fits inside
2073 vertexposition[0] = new TVector3(Router*CosD(angle),
2074 Router*SinD(angle));
2075 vertexposition[1] = new TVector3(fgkCoolingTubeSupportRmax*CosD(angle),
2076 fgkCoolingTubeSupportRmax*SinD(angle));
2077 vertexposition[2] = new TVector3(vertexposition[1]->X(),
2078 fgkCoolingTubeSupportRmax);
2079 vertexposition[3] = new TVector3(-vertexposition[1]->X(),
2080 fgkCoolingTubeSupportRmax);
2081 vertexposition[4] = new TVector3(-vertexposition[1]->X(),
2082 vertexposition[1]->Y());
2084 for(Int_t i=0; i<nedges; i++)
2085 vertexposition[i+5] =
2086 new TVector3(Router*CosD(psi+i*(2.*phi/nedges)),
2087 Router*SinD(psi+i*(2.*phi/nedges)));
2088 ///////////////////////////////////////////////////////////////////////
2089 // TGeoXTru Volume definition for Cooling Tube Support Arc Part
2090 ///////////////////////////////////////////////////////////////////////
2091 TGeoXtru* coolingtubesupportarcshape = new TGeoXtru(2);
2092 Double_t* xvertexpoints = new Double_t[kvertexnumber];
2093 Double_t* yvertexpoints = new Double_t[kvertexnumber];
2094 for(Int_t i=0; i<kvertexnumber; i++){
2095 xvertexpoints[i] = vertexposition[i]->X();
2096 yvertexpoints[i] = vertexposition[i]->Y();
2098 coolingtubesupportarcshape->DefinePolygon(kvertexnumber,xvertexpoints,
2100 coolingtubesupportarcshape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
2101 coolingtubesupportarcshape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
2102 TGeoVolume* coolingtubesupportarc = new TGeoVolume("CoolingTubeSupportArc",
2103 coolingtubesupportarcshape,
2104 fSSDTubeHolderMedium);
2105 coolingtubesupportarc->SetLineColor(fColorG10);
2106 //////////////////////////////////////////////////////////////////////////
2107 // TGeoTubeSeg Volume definition for Cooling Tube Support TGeoTubeSeg Part
2108 //////////////////////////////////////////////////////////////////////////
2109 TGeoTubeSeg* coolingtubesupportsegshape =
2110 new TGeoTubeSeg(fgkCoolingTubeSupportRmin,
2111 fgkCoolingTubeSupportRmax,
2112 0.5*fgkCoolingTubeSupportWidth,
2114 TGeoVolume* coolingtubesupportseg = new TGeoVolume("CoolingTubeSupportSeg",
2115 coolingtubesupportsegshape,
2116 fSSDTubeHolderMedium);
2117 coolingtubesupportseg->SetLineColor(fColorG10);
2118 //////////////////////////////////////////////////////////////////////////
2119 // TGeoBBox Volume definition for Cooling Tube Support Box Part
2120 //////////////////////////////////////////////////////////////////////////
2121 Double_t* boxorigin = new Double_t[3];
2122 Double_t boxlength = fgkCoolingTubeSupportLength-2.*fgkCoolingTubeSupportRmax;
2123 boxorigin[0] = fgkCoolingTubeSupportRmax+0.5*boxlength, boxorigin[1] = boxorigin[2] = 0.;
2124 TGeoBBox* coolingtubesupportboxshape = new TGeoBBox(0.5*boxlength,
2125 0.5*fgkCoolingTubeSupportHeight,
2126 0.5*fgkCoolingTubeSupportWidth,boxorigin);
2127 TGeoVolume* coolingtubesupportbox = new TGeoVolume("CoolingTubeSupportBox",
2128 coolingtubesupportboxshape,fSSDTubeHolderMedium);
2129 coolingtubesupportbox->SetLineColor(fColorG10);
2130 //////////////////////////////////////////////////////////////////////////
2131 // Cooling Tube for Cooling Tube Support
2132 //////////////////////////////////////////////////////////////////////////
2133 TGeoXtru* coolingtubearcshape[2];
2134 coolingtubearcshape[0] = new TGeoXtru(2);
2135 Double_t* xvert = new Double_t[nedges+2];
2136 Double_t* yvert = new Double_t[nedges+2];
2137 Double_t ratio = fgkCoolingTubeRmin/fgkCoolingTubeSupportRmin;
2138 ////////////////////////////////////////
2139 // Positioning the vertices for TGeoXTru
2140 ////////////////////////////////////////
2141 xvert[0] = 0., yvert[0] = 0.;
2142 xvert[1] = vertexposition[0]->X()*ratio, yvert[1] = vertexposition[0]->Y()*ratio;
2143 for(Int_t i=0; i< nedges; i++)
2144 xvert[i+2] = vertexposition[kvertexnumber-i-1]->X()*ratio,
2145 yvert[i+2] = vertexposition[kvertexnumber-i-1]->Y()*ratio;
2146 ////////////////////////////////////////
2147 // Defining TGeoXTru PolyGone
2148 ////////////////////////////////////////
2149 coolingtubearcshape[0]->DefinePolygon(nedges+2,xvert,yvert);
2150 coolingtubearcshape[0]->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
2151 coolingtubearcshape[0]->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
2152 coolingtubearcshape[1] = GetArcShape(2.*phi,fgkCoolingTubeRmin,
2153 fgkCoolingTubeRmax,nedges,fgkCoolingTubeSupportWidth);
2154 TGeoVolume* coolingtubearc[2];
2155 coolingtubearc[0] = new TGeoVolume("CoolingTubeWaterArcPart",
2156 coolingtubearcshape[0],fSSDCoolingTubeWater);
2157 coolingtubearc[1] = new TGeoVolume("CoolingTubePhynoxArcPart",
2158 coolingtubearcshape[1],fSSDCoolingTubePhynox);
2159 coolingtubearc[0]->SetLineColor(fColorWater);
2160 coolingtubearc[1]->SetLineColor(fColorPhynox);
2161 ////////////////////////////////////////////
2162 // Defining TGeoTubeSeg Part of Cooling Tube
2163 ////////////////////////////////////////////
2164 TGeoTubeSeg* coolingtubesegshape[2];
2165 coolingtubesegshape[0] = new TGeoTubeSeg(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2166 0.5*fgkCoolingTubeSupportWidth,phi,360-phi);
2167 coolingtubesegshape[1] = new TGeoTubeSeg(0.,fgkCoolingTubeRmin,
2168 0.5*fgkCoolingTubeSupportWidth,phi,360-phi);
2169 TGeoVolume* coolingtubeseg[2];
2170 coolingtubeseg[0] = new TGeoVolume("CoolingTubePhynoxPart",
2171 coolingtubesegshape[0],fSSDCoolingTubePhynox);
2172 coolingtubeseg[1] = new TGeoVolume("CoolingTubeWaterPart",
2173 coolingtubesegshape[1],fSSDCoolingTubeWater);
2174 coolingtubeseg[0]->SetLineColor(fColorPhynox);
2175 coolingtubeseg[1]->SetLineColor(fColorWater);
2176 /////////////////////////////////////////////////////////////
2177 // Virtual Volume containing Cooling Tube Support
2178 /////////////////////////////////////////////////////////////
2179 TGeoXtru* virtualCoolingTubeSupportShape = new TGeoXtru(2);
2180 const Int_t kvirtualvertexnumber = 8;
2181 TVector3* virtualvertex[kvirtualvertexnumber];
2182 ////////////////////////////////////////
2183 // Positioning the vertices for TGeoXTru
2184 ////////////////////////////////////////
2185 virtualvertex[0] = new TVector3(-fgkCoolingTubeSupportRmax,-fgkCoolingTubeSupportRmax);
2186 virtualvertex[1] = new TVector3(virtualvertex[0]->X(),-virtualvertex[0]->Y());
2187 virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y());
2188 virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight);
2189 virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y());
2190 virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y());
2191 virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y());
2192 virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y());
2193 Double_t xmothervertex[kvirtualvertexnumber], ymothervertex[kvirtualvertexnumber];
2194 for(Int_t i=0; i< kvirtualvertexnumber; i++)
2195 xmothervertex[i] = virtualvertex[i]->X(),
2196 ymothervertex[i] = virtualvertex[i]->Y();
2197 ////////////////////////////////////////
2198 // Defining TGeoXTru PolyGone
2199 ////////////////////////////////////////
2200 virtualCoolingTubeSupportShape->DefinePolygon(kvirtualvertexnumber,xmothervertex,
2202 virtualCoolingTubeSupportShape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
2203 virtualCoolingTubeSupportShape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
2204 /*TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport",
2205 virtualCoolingTubeSupportShape,fSSDAir); */
2206 TGeoVolume* virtualcoolingtubesupport = new TGeoVolumeAssembly("CoolingTubeSupport");
2208 ////////////////////////////////////////
2209 // Positioning Volumes in Virtual Volume
2210 ////////////////////////////////////////
2211 TGeoRotation* coolingtubesupportrot = new TGeoRotation();
2212 coolingtubesupportrot->SetAngles(-90.0,0.0,0.0);
2213 virtualcoolingtubesupport->AddNode(coolingtubesupportarc,1,coolingtubesupportrot);
2214 virtualcoolingtubesupport->AddNode(coolingtubesupportbox,1);
2215 virtualcoolingtubesupport->AddNode(coolingtubesupportseg,1);
2216 //virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot);
2217 //virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot);
2218 //virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1);
2219 //virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1);
2220 /////////////////////////////////////////////////////////////
2221 // Deallocating memory
2222 /////////////////////////////////////////////////////////////
2223 delete [] vertexposition;
2224 delete [] xvertexpoints;
2225 delete [] yvertexpoints;
2228 for(Int_t i=0; i< kvirtualvertexnumber; i++)
2229 delete virtualvertex[i];
2230 /////////////////////////////////////////////////////////////
2231 return virtualcoolingtubesupport;
2233 /////////////////////////////////////////////////////////////////////////////////
2234 TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
2235 /////////////////////////////////////////////////////////////
2236 // Method generating List containing SSD Hybrid Components
2237 /////////////////////////////////////////////////////////////
2238 TList* ssdhybridlist = new TList();
2239 const Int_t kssdstiffenernumber = 2;
2240 Double_t ssdstiffenerseparation = fgkSSDSensorLength
2241 - 2.*fgkSSDModuleStiffenerPosition[1]
2242 - fgkSSDStiffenerWidth;
2243 Double_t ssdchipcablesradius[kssdstiffenernumber];
2244 for(Int_t i=0; i<kssdstiffenernumber; i++)
2245 ssdchipcablesradius[i] = 0.25*(fgkSSDChipCablesHeight[i+2]
2246 - fgkSSDChipCablesHeight[0]
2247 - fgkSSDChipCablesHeight[1]);
2248 /////////////////////////////////////////////////////////////
2249 // Mother Volumes Containers
2250 /////////////////////////////////////////////////////////////
2251 const Int_t kmothernumber = 2;
2252 const Int_t kmothervertexnumber = 12;
2253 Double_t xmothervertex[kmothernumber][kmothervertexnumber];
2254 Double_t ymothervertex[kmothernumber][kmothervertexnumber];
2255 ///////////////////////
2256 // Setting the vertices
2257 ///////////////////////
2258 xmothervertex[0][0] = -0.5*fgkSSDStiffenerLength;
2259 xmothervertex[0][1] = xmothervertex[0][0];
2260 xmothervertex[0][2] = fgkSSDFlexLength[0]-0.5*fgkSSDStiffenerLength;
2261 xmothervertex[0][3] = xmothervertex[0][2];
2262 xmothervertex[0][4] = xmothervertex[0][0];
2263 xmothervertex[0][5] = xmothervertex[0][4];
2264 xmothervertex[0][6] = -xmothervertex[0][0];
2265 xmothervertex[0][7] = xmothervertex[0][6];
2266 xmothervertex[0][8] = -xmothervertex[0][2];
2267 xmothervertex[0][9] = xmothervertex[0][8];
2268 xmothervertex[0][10] = xmothervertex[0][7];
2269 xmothervertex[0][11] = xmothervertex[0][10];
2270 for(Int_t i=0; i<kmothervertexnumber; i++) xmothervertex[1][i] = xmothervertex[0][i];
2271 for(Int_t i = 0; i<kmothernumber; i++){
2272 ymothervertex[i][0] = -(fgkSSDChipWidth-(0.5*fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist)
2273 + ssdchipcablesradius[i]+fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2]);
2274 ymothervertex[i][1] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexWidth[0];
2275 ymothervertex[i][2] = ymothervertex[i][1];
2276 ymothervertex[i][3] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth;
2277 ymothervertex[i][4] = ymothervertex[i][3];
2278 ymothervertex[i][5] = ymothervertex[i][4]+0.5*fgkSSDStiffenerWidth-ymothervertex[i][0];
2279 ymothervertex[i][6] = ymothervertex[i][5];
2280 ymothervertex[i][7] = 0.5*fgkSSDStiffenerWidth+fgkSSDFlexWidth[0];
2281 ymothervertex[i][8] = ymothervertex[i][7];
2282 ymothervertex[i][9] = 0.5*fgkSSDStiffenerWidth;
2283 ymothervertex[i][10] = ymothervertex[i][9];
2284 ymothervertex[i][11] = ymothervertex[i][0];
2286 TGeoXtru* ssdhybridmothershape[kmothernumber];
2287 //TGeoVolume* ssdhybridmother[kmothernumber];
2288 TGeoVolumeAssembly* ssdhybridmother[kmothernumber];
2289 const char* ssdhybridmothername[kmothernumber] = {"SSDHybridMother1","SSDHybridMother2"};
2290 for(Int_t i=0; i<kmothernumber; i++){
2291 ssdhybridmothershape[i] = new TGeoXtru(2);
2292 ssdhybridmothershape[i]->DefinePolygon(kmothervertexnumber,xmothervertex[i],
2295 cout << "ssd hybrid mother " << i << " polygon " << endl;
2296 for (Int_t lll = 0; lll < kmothervertexnumber; lll++) {
2297 cout << "vtx " << lll << ": " << xmothervertex[i][lll] << " " << ymothervertex[i][lll] << endl;
2300 ssdhybridmothershape[i]->DefineSection(0,-0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight
2301 -fgkSSDChipCablesHeight[i+2]);
2302 ssdhybridmothershape[i]->DefineSection(1, 0.5*fgkSSDStiffenerHeight);
2303 // cout << " sections " << -0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight
2304 // -fgkSSDChipCablesHeight[i+2] << " " << 0.5*fgkSSDStiffenerHeight << endl;
2305 //ssdhybridmother[i] = new TGeoVolume(ssdhybridmothername[i],ssdhybridmothershape[i],
2307 ssdhybridmother[i] = new TGeoVolumeAssembly(ssdhybridmothername[i]);
2309 /////////////////////////////////////////////////////////////
2311 /////////////////////////////////////////////////////////////
2312 TGeoBBox* ssdstiffenershape = new TGeoBBox("SSDStiffenerShape",
2313 0.5*fgkSSDStiffenerLength,
2314 0.5*(fgkSSDStiffenerWidth-fgkSSDTolerance),
2315 0.5*fgkSSDStiffenerHeight);
2316 TGeoVolume* ssdstiffener = new TGeoVolume("SSDStiffener",ssdstiffenershape,
2317 fSSDStiffenerMedium);
2318 ssdstiffener->SetLineColor(fColorStiffener);
2319 TGeoTranslation* ssdstiffenertrans[kssdstiffenernumber];
2320 for(Int_t i=0; i<kssdstiffenernumber; i++)
2321 ssdstiffenertrans[i] = new TGeoTranslation(0.,i*ssdstiffenerseparation,0.);
2322 /////////////////////////////////////////////////////////////
2324 /////////////////////////////////////////////////////////////
2325 TList* ssdchipsystemlist = GetSSDChipSystem();
2326 Double_t ssdchipseparation = fgkSSDSensorLength
2327 - 2.*fgkSSDModuleStiffenerPosition[1]
2328 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
2329 - 0.5*fgkSSDChipWidth);
2330 Double_t ssdchipsystemlength = (fgkSSDChipNumber-1)*(fgkSSDChipLength
2331 + fgkSSDChipSeparationLength)+fgkSSDChipCablesLength[1];
2332 TGeoTranslation* ssdchipsystemtrans = new TGeoTranslation(0.5*fgkSSDChipCablesLength[1]
2333 - 0.5*ssdchipsystemlength,
2334 0.5*(ssdstiffenerseparation-ssdchipseparation),
2335 - 0.5*(fgkSSDChipHeight+fgkSSDStiffenerHeight));
2336 ////////////////////////////
2337 // Capacitor 0603-2200 nF
2338 ///////////////////////////
2339 const Int_t knapacitor0603number = 5;
2340 TGeoBBox* capacitor0603shape = new TGeoBBox("Capacitor0603Shape",
2341 0.5*fgkSSDCapacitor0603Length,
2342 0.5*(fgkSSDCapacitor0603Width),
2343 0.5*fgkSSDCapacitor0603Height);
2344 TGeoVolume* capacitor0603 = new TGeoVolume("Capacitor0603",capacitor0603shape,
2345 fSSDStiffener0603CapacitorMedium);
2346 capacitor0603->SetLineColor(fColorAl);
2347 for(Int_t i=0; i<kmothernumber; i++){
2348 for(Int_t j=0; j<kssdstiffenernumber; j++){
2349 ssdhybridmother[i]->AddNode(ssdstiffener,j+1,ssdstiffenertrans[j]);
2350 for(Int_t k=1; k<knapacitor0603number+1; k++){
2351 ssdhybridmother[i]->AddNode(capacitor0603,knapacitor0603number*j+k,
2352 new TGeoTranslation((k-3.)/6*fgkSSDStiffenerLength,
2353 j*ssdstiffenerseparation
2354 + 0.5*((j==0? 1:-1)*fgkSSDStiffenerWidth
2355 + (j==0? -1:+1)*fgkSSDCapacitor0603Width),
2356 - 0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height)));
2359 ssdhybridmother[i]->AddNode((TGeoVolume*)ssdchipsystemlist->At(i),i+1,ssdchipsystemtrans);
2360 ssdhybridlist->Add(ssdhybridmother[i]);
2362 /////////////////////////////////////////////////////////////
2363 // Mother Volume Containing Capacitor Part
2364 /////////////////////////////////////////////////////////////
2365 const Int_t kcapacitormothernumber = 8;
2366 Double_t xcapacitorvertex[kcapacitormothernumber];
2367 Double_t ycapacitorvertex[kcapacitormothernumber];
2368 ///////////////////////
2369 // Setting the vertices
2370 ///////////////////////
2371 xcapacitorvertex[0] = -fgkSSDConnectorPosition[0]+ssdstiffenershape->GetDX();
2372 xcapacitorvertex[1] = xcapacitorvertex[0];
2373 xcapacitorvertex[2] = 0.5*fgkSSDFlexHoleWidth;
2374 xcapacitorvertex[3] = xcapacitorvertex[2];
2375 xcapacitorvertex[4] = xcapacitorvertex[0];
2376 xcapacitorvertex[5] = xcapacitorvertex[0];
2377 xcapacitorvertex[6] = -xcapacitorvertex[0];
2378 xcapacitorvertex[7] = xcapacitorvertex[6];
2379 ycapacitorvertex[0] = -0.5*fgkSSDStiffenerWidth;
2380 ycapacitorvertex[1] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexHoleLength;
2381 ycapacitorvertex[2] = ycapacitorvertex[1];
2382 ycapacitorvertex[3] = ycapacitorvertex[2]+fgkSSDFlexHoleLength;
2383 ycapacitorvertex[4] = ycapacitorvertex[3];
2384 ycapacitorvertex[5] = ycapacitorvertex[4]+fgkSSDStiffenerWidth;
2385 ycapacitorvertex[6] = ycapacitorvertex[5];
2386 ycapacitorvertex[7] = ycapacitorvertex[0];
2387 TGeoXtru* ssdhybridcapacitormothershape = new TGeoXtru(2);
2388 ssdhybridcapacitormothershape->DefinePolygon(kcapacitormothernumber,xcapacitorvertex,
2390 ssdhybridcapacitormothershape->DefineSection(0,0.5*fgkSSDStiffenerHeight);
2391 ssdhybridcapacitormothershape->DefineSection(1, 0.5*fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height);
2392 // TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape,
2394 TGeoVolumeAssembly* ssdhybridcapacitormother = new TGeoVolumeAssembly("SSDHybridCapacitorMother");
2395 ////////////////////////////
2397 ///////////////////////////
2398 const Int_t kssdconnectornumber = 2;
2399 TGeoBBox* ssdconnectorshape[kssdconnectornumber];
2400 Double_t ssdAlconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorAlHeight)};
2401 Double_t ssdNiconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorNiHeight)
2402 + fgkSSDConnectorAlHeight};
2403 const char* ssdconnectorname[kssdconnectornumber] = {"SSDConnectorAl","SSDConnectorNi"};
2404 TGeoVolume* ssdconnector[kssdconnectornumber];
2405 for(Int_t i=0; i<kssdconnectornumber; i++){
2406 ssdconnectorshape[i] = new TGeoBBox(0.5*fgkSSDConnectorLength,
2407 0.5*fgkSSDConnectorWidth,
2408 0.5*((1-i)*fgkSSDConnectorAlHeight
2409 + i*fgkSSDConnectorNiHeight),
2410 i==0? ssdAlconnectororigin : ssdNiconnectororigin);
2411 ssdconnector[i] = new TGeoVolume(ssdconnectorname[i],ssdconnectorshape[i],
2412 i==0 ? fSSDAlTraceFlexMedium
2413 : fSSDStiffenerConnectorMedium);
2414 ssdconnector[i]->SetLineColor(i==0 ? fColorAl : fColorPhynox);
2416 TGeoTranslation* ssdconnectortrans[2*kssdconnectornumber];
2417 ssdconnectortrans[0] = new TGeoTranslation(-ssdstiffenershape->GetDX()
2418 + fgkSSDConnectorPosition[0]
2419 - fgkSSDConnectorSeparation
2420 - 1.5*fgkSSDConnectorLength,
2421 ssdstiffenerseparation+ssdstiffenershape->GetDY()
2422 - fgkSSDConnectorPosition[1]
2423 - ssdconnectorshape[0]->GetDY(),0.0);
2424 ssdconnectortrans[1] = new TGeoTranslation(
2425 - ssdstiffenershape->GetDX()
2426 + fgkSSDConnectorPosition[0]
2427 - 0.5*fgkSSDConnectorLength,
2428 ssdstiffenerseparation+ssdstiffenershape->GetDY()
2429 - fgkSSDConnectorPosition[1]
2430 - ssdconnectorshape[0]->GetDY(),0.0);
2431 ssdconnectortrans[2] = new TGeoTranslation(+ssdstiffenershape->GetDX()
2432 - fgkSSDConnectorPosition[0]
2433 + fgkSSDConnectorSeparation
2434 + 1.5*fgkSSDConnectorLength,
2435 -(ssdstiffenershape->GetDY()
2436 - fgkSSDConnectorPosition[1]
2437 - ssdconnectorshape[0]->GetDY()),0.0);
2438 ssdconnectortrans[3] = new TGeoTranslation(+ssdstiffenershape->GetDX()
2439 - fgkSSDConnectorPosition[0]
2440 + 0.5*fgkSSDConnectorLength,
2441 -(ssdstiffenershape->GetDY()
2442 - fgkSSDConnectorPosition[1]
2443 - ssdconnectorshape[0]->GetDY()),0.0);
2444 for(Int_t i=0; i<2*kssdconnectornumber; i++)
2445 for(Int_t j=0; j<kssdconnectornumber; j++)
2446 ssdhybridcapacitormother->AddNode(ssdconnector[j],i+1,ssdconnectortrans[i]);
2447 ////////////////////////////
2448 // Capacitor 1812-330 nF
2449 ///////////////////////////
2450 Double_t ssdcapacitor1812origin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)};
2451 TGeoBBox* capacitor1812shape = new TGeoBBox("Capacitor1812Shape",
2452 0.5*fgkSSDCapacitor1812Length,
2453 0.5*fgkSSDCapacitor1812Width,
2454 0.5*fgkSSDCapacitor1812Height,
2455 ssdcapacitor1812origin);
2456 TGeoVolume* capacitor1812 = new TGeoVolume("Capacitor1812",capacitor1812shape,
2457 fSSDStiffener1812CapacitorMedium);
2458 capacitor1812->SetLineColor(fColorAl);
2459 TGeoTranslation* capacitor1812trans = new TGeoTranslation(0.0,
2460 0.5*fgkSSDStiffenerWidth+ssdstiffenerseparation
2461 - capacitor1812shape->GetDY()-fgkSSDConnectorPosition[1],0.0);
2462 ssdhybridcapacitormother->AddNode(capacitor1812,1,capacitor1812trans);
2463 ////////////////////////////
2465 ////////////////////////////
2466 Double_t wirex = 2.*(fgkSSDConnectorPosition[0]-0.5*fgkSSDStiffenerLength
2467 - 0.5*fgkSSDConnectorLength)-fgkSSDConnectorLength
2468 - fgkSSDConnectorSeparation;
2469 Double_t wirey = ssdstiffenerseparation+fgkSSDStiffenerWidth
2470 - 2.*fgkSSDConnectorPosition[1]-fgkSSDConnectorWidth;
2471 Double_t ssdwireradius = TMath::Sqrt(wirex*wirex+wirey*wirey);
2473 Double_t wireangle = TMath::ATan(wirex/wirey);
2474 TGeoTube *hybridwireshape = new TGeoTube("HybridWireShape", 0.,
2475 fgkSSDWireRadius, 0.5*ssdwireradius);
2476 TGeoVolume* hybridwire = new TGeoVolume("HybridWire",hybridwireshape,
2477 fSSDStiffenerHybridWireMedium);
2478 hybridwire->SetLineColor(fColorPhynox);
2479 TGeoCombiTrans* hybridwirecombitrans[2];
2480 hybridwirecombitrans[0] = new TGeoCombiTrans("HybridWireCombiTrans1",
2481 0.5*fgkSSDStiffenerLength-fgkSSDConnectorPosition[0]
2482 + 1.5*fgkSSDConnectorLength+fgkSSDConnectorSeparation,
2483 0.5*ssdwireradius-0.5*fgkSSDStiffenerWidth
2484 + fgkSSDConnectorPosition[1]+0.5*fgkSSDConnectorWidth,
2485 ssdstiffenershape->GetDZ()
2486 + fgkSSDWireRadius+fgkSSDConnectorAlHeight+fgkSSDConnectorNiHeight,
2487 new TGeoRotation("HybridWireRot1",0.,90.,0.));
2488 hybridwirecombitrans[1] = new TGeoCombiTrans("HybridWireCombiTrans2",
2490 - 0.5*fgkSSDConnectorWidth+fgkSSDWireRadius,
2492 new TGeoRotation("HybridWireRot2",
2493 - wireangle*TMath::RadToDeg(),0.,0.));
2494 TGeoHMatrix* hybridwirematrix = new TGeoHMatrix();
2495 hybridwirematrix->MultiplyLeft(hybridwirecombitrans[0]);
2496 hybridwirematrix->MultiplyLeft(hybridwirecombitrans[1]);
2497 ssdhybridcapacitormother->AddNode(hybridwire,1,hybridwirematrix);
2498 ssdhybridlist->Add(ssdhybridcapacitormother);
2499 /////////////////////////////////////////////////////////////
2500 // Deallocating memory
2501 /////////////////////////////////////////////////////////////
2502 delete hybridwirecombitrans[0];
2503 delete hybridwirecombitrans[1];
2504 delete ssdchipsystemlist;
2505 return ssdhybridlist;
2506 /////////////////////////////////////////////////////////////
2508 ///////////////////////////////////////////////////////////////////////////////
2509 TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
2510 /////////////////////////////////////////////////////////////
2511 // SSD Cooling Block System
2512 /////////////////////////////////////////////////////////////
2513 // SSD Cooling Block and Cooling Tube Transformations
2514 /////////////////////////////////////////////////////////////
2515 TGeoRotation* localcoolingblockrot = new TGeoRotation();
2516 localcoolingblockrot->SetAngles(0.,90.,0.);
2517 TGeoCombiTrans localcoolingblockmatrix(0.,0.5*fgkSSDCoolingBlockWidth,0.,localcoolingblockrot);
2518 TVector3* coolingblocktransvector;
2519 coolingblocktransvector = new TVector3(fgkSSDModuleSensorSupportDistance
2520 + fgkSSDCoolingBlockLength,
2522 - 2.*fgkSSDModuleStiffenerPosition[1]
2523 - fgkSSDCoolingBlockWidth);
2524 const Int_t kcoolingblocktransnumber = 2;
2525 const Int_t kcoolingblocknumber = 4;
2526 TGeoHMatrix* coolingblockmatrix[kcoolingblocknumber];
2527 TGeoHMatrix* coolingtubematrix[kcoolingblocknumber];
2528 TGeoRotation* localcoolingtuberot = new TGeoRotation();
2529 localcoolingtuberot->SetAngles(0.0,90.0,0.0);
2530 TGeoTranslation* localcoolingtubetrans = new TGeoTranslation();
2531 localcoolingtubetrans->SetTranslation(0.5*fgkSSDCoolingBlockLength,
2532 0.5*fgkSSDCoolingBlockWidth,
2533 fgkSSDCoolingBlockHoleCenter);
2534 TGeoCombiTrans localcoolingtubematrix (*localcoolingtubetrans,*localcoolingtuberot);
2535 Double_t coolingtubedistance = fgkCoolingTubeSupportRmax-fgkCoolingTubeSupportRmin;
2536 for(Int_t i=0; i<kcoolingblocktransnumber; i++){
2537 for(Int_t j=0; j<kcoolingblocktransnumber; j++){
2538 TGeoTranslation localcoolingblocktrans(i*coolingblocktransvector->X()+2*coolingtubedistance,
2539 j*coolingblocktransvector->Y(),
2540 - 0.5*(fgkSSDCoolingBlockHoleCenter
2541 + fgkCoolingTubeRmax));
2542 coolingblockmatrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingblockmatrix);
2543 coolingtubematrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingtubematrix);
2546 /////////////////////////////////////////////////////////////
2547 // Virtual Volume containing CoolingBlock System
2548 /////////////////////////////////////////////////////////////
2549 TGeoXtru* coolingsystemothershape = new TGeoXtru(2);
2550 const Int_t kmothervertexnumber = 16;
2551 Double_t xmothervertex[kmothervertexnumber];
2552 Double_t ymothervertex[kmothervertexnumber];
2553 ///////////////////////
2554 // Setting the vertices
2555 ///////////////////////fgkCoolingTubeSupportRmax
2556 xmothervertex[0] = 0.0,ymothervertex[0] = 0.0;
2557 xmothervertex[1] = xmothervertex[0], ymothervertex[1] = coolingblocktransvector->Y()
2558 + fgkSSDCoolingBlockWidth;
2559 xmothervertex[2] = coolingblocktransvector->X()
2560 + fgkSSDCoolingBlockLength
2561 + 4*coolingtubedistance;
2562 ymothervertex[2] = ymothervertex[1];
2563 xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0];
2564 xmothervertex[4] = xmothervertex[3]-2.*coolingtubedistance-fgkSSDCoolingBlockLength;
2565 ymothervertex[4] = ymothervertex[0];
2566 xmothervertex[5] = xmothervertex[4], ymothervertex[5] = fgkSSDCoolingBlockWidth;
2567 xmothervertex[6] = xmothervertex[3]-coolingtubedistance;
2568 ymothervertex[6] = ymothervertex[5];
2569 xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2]
2570 - fgkSSDCoolingBlockWidth;
2571 xmothervertex[8] = xmothervertex[5], ymothervertex[8] = ymothervertex[7];
2572 xmothervertex[9] = xmothervertex[8], ymothervertex[9] = ymothervertex[2]
2573 - coolingtubedistance;
2574 xmothervertex[10] = fgkSSDCoolingBlockLength+2.*coolingtubedistance;
2575 ymothervertex[10] = ymothervertex[9];
2576 xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[8];
2577 xmothervertex[12] = coolingtubedistance, ymothervertex[12] = ymothervertex[11];
2578 xmothervertex[13] = xmothervertex[12], ymothervertex[13] = fgkSSDCoolingBlockWidth;
2579 xmothervertex[14] = 2.*coolingtubedistance+fgkSSDCoolingBlockLength;
2580 ymothervertex[14] = ymothervertex[13];
2581 xmothervertex[15] = xmothervertex[14], ymothervertex[15] = ymothervertex[0];
2582 //////////////////////////////////////////////////////////
2583 coolingsystemothershape->DefinePolygon(kmothervertexnumber,
2584 xmothervertex,ymothervertex);
2585 coolingsystemothershape->DefineSection(0,-0.5*(fgkSSDCoolingBlockHoleCenter
2586 + fgkCoolingTubeRmax));
2587 coolingsystemothershape->DefineSection(1, 0.5*(fgkSSDCoolingBlockHoleCenter
2588 + fgkCoolingTubeRmax));
2589 TGeoVolume* coolingsystemother = new TGeoVolumeAssembly("CoolingBlockSystem");
2590 // TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem",
2591 // coolingsystemothershape,fSSDAir);
2592 /////////////////////////////////////////////////////////////
2593 // SSD Cooling Tube Part
2594 /////////////////////////////////////////////////////////////
2596 TGeoTube* coolingtubeshape[fgkcoolingtubenumber];
2597 coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2598 0.5*(fgkSSDCoolingBlockWidth-fgkSSDTolerance));
2599 coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
2600 0.5*(fgkSSDCoolingBlockWidth-fgkSSDTolerance));
2601 TGeoVolume* coolingtube[fgkcoolingtubenumber];
2602 coolingtube[0] = new TGeoVolume("OuterCoolingTube",coolingtubeshape[0],
2603 fSSDCoolingTubePhynox);
2604 coolingtube[1] = new TGeoVolume("InnerCoolingTube",coolingtubeshape[1],
2605 fSSDCoolingTubeWater);
2606 coolingtube[0]->SetLineColor(fColorPhynox);
2607 coolingtube[1]->SetLineColor(fColorWater);
2609 TGeoVolume* ssdcoolingblock = GetSSDCoolingBlock(30);
2610 /////////////////////////////////////////////////////////////
2611 // Adding Cooling block to mother volume
2612 /////////////////////////////////////////////////////////////
2613 for(Int_t i=0; i<kcoolingblocknumber; i++){
2614 coolingsystemother->AddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]);
2615 //coolingsystemother->AddNode(coolingtube[0],i+1,coolingtubematrix[i]);
2616 //coolingsystemother->AddNode(coolingtube[1],i+1,coolingtubematrix[i]);
2618 /////////////////////////////////////////////////////////////
2619 // Deallocating memory
2620 /////////////////////////////////////////////////////////////
2621 delete coolingblocktransvector;
2622 delete localcoolingblockrot;
2623 //delete localcoolingtubetrans;
2624 //delete localcoolingtuberot;
2625 /////////////////////////////////////////////////////////////
2626 // Checking overlaps
2627 /////////////////////////////////////////////////////////////
2628 //coolingsystemother->CheckOverlaps(0.01);
2629 /////////////////////////////////////////////////////////////
2630 return coolingsystemother;
2632 /////////////////////////////////////////////////////////////////////////////////
2633 TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
2634 /////////////////////////////////////////////////////////////
2636 /////////////////////////////////////////////////////////////
2637 const Int_t kssdflexlayernumber = 2;
2638 TGeoXtru* ssdflexshape[kssdflexlayernumber];
2639 for(Int_t i=0; i<kssdflexlayernumber; i++) ssdflexshape[i] = new TGeoXtru(2);
2640 const Int_t kmothervertexnumber = 17;
2641 Double_t xmothervertex[kmothervertexnumber];
2642 Double_t ymothervertex[kmothervertexnumber];
2643 /////////////////////////////////////////////
2644 // Auxiliary variables for vertex positioning
2645 /////////////////////////////////////////////
2646 const Int_t kssdflexboxnumber = 5;
2647 Double_t ssdflexboxlength[kssdflexboxnumber];
2648 ssdflexboxlength[0] = 0.5*(fgkSSDChipNumber
2649 * fgkSSDChipLength+(fgkSSDChipNumber-1)
2650 * fgkSSDChipSeparationLength
2651 - fgkSSDModuleSensorSupportDistance-fgkSSDFlexHoleLength)
2652 - (fgkSSDFlexLength[0]-fgkSSDFlexLength[1]);
2653 ssdflexboxlength[1] = fgkSSDModuleSensorSupportDistance+fgkSSDFlexHoleLength;
2654 ssdflexboxlength[2] = 0.5*(fgkSSDModuleSensorSupportDistance
2655 - fgkSSDFlexHoleLength-fgkSSDFlexHoleWidth);
2656 ssdflexboxlength[3] = fgkSSDFlexHoleWidth;
2657 ssdflexboxlength[4] = fgkSSDFlexLength[1]-ssdflexboxlength[0]
2658 - ssdflexboxlength[1];
2659 Double_t ssdflexboxwidth[kssdflexboxnumber];
2660 ssdflexboxwidth[0] = fgkSSDFlexWidth[0];
2661 ssdflexboxwidth[1] = fgkSSDFlexWidth[0]-fgkSSDFlexHoleWidth;
2662 ssdflexboxwidth[2] = fgkSSDFlexHoleWidth;
2663 ssdflexboxwidth[3] = ssdflexboxwidth[2]-fgkSSDFlexHoleLength;
2664 ssdflexboxwidth[4] = fgkSSDFlexWidth[0];
2665 ///////////////////////
2666 // Setting the vertices
2667 ///////////////////////
2668 xmothervertex[0] = 0.0;
2669 xmothervertex[1] = xmothervertex[0];
2670 xmothervertex[2] = fgkSSDFlexLength[0]-fgkSSDFlexLength[1];
2671 xmothervertex[3] = xmothervertex[2]+ssdflexboxlength[0]+ssdflexboxlength[1]
2672 + ssdflexboxlength[4];
2673 xmothervertex[4] = xmothervertex[3];
2674 xmothervertex[5] = xmothervertex[4]-ssdflexboxlength[4];
2675 xmothervertex[6] = xmothervertex[5];
2676 xmothervertex[7] = xmothervertex[6]-fgkSSDFlexHoleLength;
2677 xmothervertex[8] = xmothervertex[7];
2678 xmothervertex[9] = xmothervertex[8]-ssdflexboxlength[2];
2679 xmothervertex[10] = xmothervertex[9];
2680 xmothervertex[11] = xmothervertex[10]-ssdflexboxlength[3];
2681 xmothervertex[12] = xmothervertex[11];
2682 xmothervertex[13] = xmothervertex[12]-ssdflexboxlength[2];
2683 xmothervertex[14] = xmothervertex[13];
2684 xmothervertex[15] = xmothervertex[14]-fgkSSDFlexHoleLength;
2685 xmothervertex[16] = xmothervertex[15];
2686 ymothervertex[0] = 0.0;
2687 ymothervertex[1] = fgkSSDFlexWidth[1];
2688 ymothervertex[2] = fgkSSDFlexWidth[0];
2689 ymothervertex[3] = ymothervertex[2];
2690 ymothervertex[4] = ymothervertex[0];
2691 ymothervertex[5] = ymothervertex[4];
2692 ymothervertex[6] = ssdflexboxwidth[2];
2693 ymothervertex[7] = ymothervertex[6];
2694 ymothervertex[8] = ymothervertex[0];
2695 ymothervertex[9] = ymothervertex[8];
2696 ymothervertex[10] = ssdflexboxwidth[2]-ssdflexboxwidth[3];
2697 ymothervertex[11] = ymothervertex[10];
2698 ymothervertex[12] = ymothervertex[0];
2699 ymothervertex[13] = ymothervertex[12];
2700 ymothervertex[14] = ymothervertex[7];
2701 ymothervertex[15] = ymothervertex[14];
2702 ymothervertex[16] = ymothervertex[0];
2703 /////////////////////////////////////////////////////////////
2704 // First Mother Volume containing SSDFlex
2705 /////////////////////////////////////////////////////////////
2706 TGeoXtru* ssdflexmothershape = new TGeoXtru(2);
2707 ssdflexmothershape->DefinePolygon(kmothervertexnumber,xmothervertex,
2709 ssdflexmothershape->DefineSection(0,-1.5*fgkSSDFlexHeight[0]-2.*fgkSSDFlexHeight[1]);
2710 ssdflexmothershape->DefineSection(1, 0.5*fgkSSDFlexHeight[0]);
2711 TGeoVolumeAssembly* ssdflexmother = new TGeoVolumeAssembly("SSDFlexMother");
2712 // TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape,
2714 /////////////////////////////////////////////////////////////
2715 // SSDFlex Layer Shapes
2716 /////////////////////////////////////////////////////////////
2717 for(Int_t i=0; i<kssdflexlayernumber; i++){
2718 ssdflexshape[i]->DefinePolygon(kmothervertexnumber,xmothervertex,
2720 ssdflexshape[i]->DefineSection(0,-0.5*fgkSSDFlexHeight[i]);
2721 ssdflexshape[i]->DefineSection(1, 0.5*fgkSSDFlexHeight[i]);
2723 /////////////////////////////////////
2724 // Setting Layers into Mother Volume
2725 /////////////////////////////////////
2726 Int_t ssdflexcolor[kssdflexlayernumber] = {fColorAl,fColorPolyhamide};
2727 TGeoMedium* ssdflexmed[kssdflexlayernumber] = {fSSDAlTraceFlexMedium,
2728 fSSDKaptonFlexMedium};
2729 const char* ssdflexname[2*kssdflexlayernumber] = {"AlFlexLay1","KaptonFlexLay1",
2730 "AlFlexLay2","KaptonFlexLay2"};
2731 TGeoVolume* ssdflex[2*kssdflexlayernumber];
2732 TGeoTranslation* ssdflextrans[2*kssdflexlayernumber];
2733 for(Int_t i=0; i<2*kssdflexlayernumber; i++){
2734 ssdflex[i] = new TGeoVolume(ssdflexname[i],
2735 i%2==0 ? ssdflexshape[0] : ssdflexshape[1],
2736 i%2==0 ? ssdflexmed[0] : ssdflexmed[1]);
2737 ssdflex[i]->SetLineColor(i%2==0 ? ssdflexcolor[0] : ssdflexcolor[1]);
2738 ssdflextrans[i] = new TGeoTranslation(0.,0.,-0.5*i*(fgkSSDFlexHeight[0]
2739 + fgkSSDFlexHeight[1]));
2740 ssdflexmother->AddNode(ssdflex[i],1,ssdflextrans[i]);
2742 return ssdflexmother;
2744 /////////////////////////////////////////////////////////////////////////////////
2745 TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){
2746 /////////////////////////////////////////////////////////////
2747 // Method generating SSD End Flex
2748 /////////////////////////////////////////
2749 Double_t ssdflexradiusmax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
2750 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
2751 Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
2752 * TMath::DegToRad()*ssdflexradiusmax
2753 - fgkSSDFlexLength[2]-TMath::Pi()
2754 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
2755 - 0.1*fgkSSDFlexFullLength;
2756 const Int_t knedges = 20;
2757 const Int_t karcnumber = 2;
2758 TVector3* vertexposition[karcnumber*(knedges+1)];
2759 Double_t deltangle[karcnumber] = {2.*fgkSSDFlexAngle/knedges,180.0/knedges};
2760 Double_t angle[karcnumber] = {90.-2.*fgkSSDFlexAngle,180.0};
2761 Double_t radius[karcnumber] = {ssdflexradiusmax-fgkSSDStiffenerHeight,fgkSSDStiffenerHeight};
2762 Double_t referenceangle[karcnumber] = {-180.0*TMath::DegToRad(),
2763 - 90.0*TMath::DegToRad()};
2764 TVector3* referencetrans[karcnumber];
2765 referencetrans[0] = new TVector3(ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
2766 + radius[0]*SinD(2.*fgkSSDFlexAngle),
2768 referencetrans[1] = new TVector3(referencetrans[0]->X()
2769 + fgkSSDFlexLength[2],
2770 - fgkSSDStiffenerHeight);
2771 for(Int_t i=0; i<karcnumber; i++){
2772 for(Int_t j=0; j<knedges+1; j++){
2773 vertexposition[j+i*(knedges+1)] = new TVector3(radius[i]*CosD(angle[i]),
2774 radius[i]*SinD(angle[i]));
2775 angle[i] += deltangle[i]*(1.0-2.0*i);
2778 ///////////////////////
2779 // Setting the vertices
2780 ///////////////////////
2781 const Int_t kendflexlayernumber = 4;
2782 const Int_t kendflexvertexnumber = 4*(knedges+1)+2;
2783 TVector3** vertex[kendflexlayernumber];
2784 for(Int_t i=0; i<kendflexlayernumber; i++)
2785 vertex[i] = new TVector3*[kendflexvertexnumber];
2786 TVector3* transvector[kendflexlayernumber+1];
2787 TVector3* deltatransvector = new TVector3();
2788 for(Int_t i=0; i<kendflexlayernumber+1; i++) transvector[i] = new TVector3();
2789 transvector[0]->SetXYZ(0.0,ssdflexboxlength*SinD(2.*fgkSSDFlexAngle)
2790 + radius[0]*(1.0-CosD(2.*fgkSSDFlexAngle)),0.0);
2791 for(Int_t i=1; i<kendflexlayernumber+1; i++){
2792 deltatransvector->SetXYZ((i%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2793 * CosD(fgkSSDFlexAngle),
2794 (i%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2795 * SinD(fgkSSDFlexAngle),0.0);
2796 *transvector[i] = *transvector[i-1]+*deltatransvector;
2798 Double_t ratioradius[karcnumber][kendflexlayernumber+1];
2799 ratioradius[0][0] = 1., ratioradius[1][0] = 1.;
2800 for(Int_t i=0; i<karcnumber; i++){
2801 for(Int_t j=1; j<kendflexlayernumber+1; j++){
2802 ratioradius[i][j] = ratioradius[i][j-1]-TMath::Power(-1.0,i)
2803 * (j%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2807 for(Int_t i=0; i<kendflexlayernumber; i++){
2808 vertex[i][0] = new TVector3(transvector[i]->X(),transvector[i]->Y());
2809 vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y());
2810 for(Int_t j=0; j<karcnumber*(knedges+1); j++){
2812 vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[0][i+1],
2813 vertexposition[j]->Y()*ratioradius[0][i+1]);
2814 vertex[i][j+2]->RotateZ(referenceangle[0]);
2815 *vertex[i][j+2] += *referencetrans[0];
2816 vertex[i][4*(knedges+1)-j+1] =
2817 new TVector3(vertexposition[j]->X()*ratioradius[0][i],
2818 vertexposition[j]->Y()*ratioradius[0][i]);
2819 vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[0]);
2820 *vertex[i][4*(knedges+1)-j+1] += *referencetrans[0];
2824 vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[1][i+1],
2825 vertexposition[j]->Y()*ratioradius[1][i+1]);
2826 vertex[i][j+2]->RotateZ(referenceangle[1]);
2827 *vertex[i][j+2] += *referencetrans[1];
2828 vertex[i][4*(knedges+1)-j+1] =
2829 new TVector3(vertexposition[j]->X()*ratioradius[1][i],
2830 vertexposition[j]->Y()*ratioradius[1][i]);
2831 vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[1]);
2832 *vertex[i][4*(knedges+1)-j+1] += *referencetrans[1];
2836 /////////////////////////////////////////////////////////////
2837 // First Mother Volume containing SSDEndFlex
2838 /////////////////////////////////////////////////////////////
2839 TGeoXtru* ssdendflexmothershape = new TGeoXtru(2);
2840 Double_t xmothervertex[kendflexvertexnumber];
2841 Double_t ymothervertex[kendflexvertexnumber];
2842 xmothervertex[0] = vertex[0][0]->X();
2843 ymothervertex[0] = vertex[0][0]->Y();
2844 for(Int_t i=1; i<kendflexvertexnumber; i++){
2845 if(i<2*(knedges+1)+2){
2846 xmothervertex[i] = vertex[3][i]->X();
2847 ymothervertex[i] = vertex[3][i]->Y();
2850 xmothervertex[i] = vertex[0][i]->X();
2851 ymothervertex[i] = vertex[0][i]->Y();
2854 ssdendflexmothershape->DefinePolygon(kendflexvertexnumber,
2855 xmothervertex,ymothervertex);
2856 ssdendflexmothershape->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
2857 ssdendflexmothershape->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
2858 // TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother",
2859 // ssdendflexmothershape,fSSDAir);
2860 TGeoVolumeAssembly* ssdendflexmother = new TGeoVolumeAssembly("SSDEndFlexMother");
2861 //////////////////////////////////////
2862 // End Flex TGeoXtru Layer Definition
2863 //////////////////////////////////////
2864 TGeoXtru* ssdendflexshape[kendflexlayernumber];
2865 TGeoVolume* ssdendflex[kendflexlayernumber];
2866 for(Int_t i=0; i<kendflexlayernumber; i++) ssdendflexshape[i] = new TGeoXtru(2);
2867 Double_t xvertex[kendflexlayernumber][kendflexvertexnumber];
2868 Double_t yvertex[kendflexlayernumber][kendflexvertexnumber];
2869 Int_t ssdendflexcolor[kendflexlayernumber] = {fColorAl,fColorPolyhamide};
2870 TGeoMedium* ssdendflexmed[kendflexlayernumber] = {fSSDAlTraceFlexMedium,
2871 fSSDKaptonFlexMedium};
2872 const char* ssdendflexname[kendflexlayernumber] = {"AlEndFlexLay1","KaptonEndFlexLay1",
2873 "AlEndFlexLay2","KaptonEndFlexLay2"};
2874 for(Int_t i=0; i<kendflexlayernumber; i++){
2875 for(Int_t j=0; j<4*(knedges+1)+2; j++){
2876 xvertex[i][j] = vertex[i][j]->X();
2877 yvertex[i][j] = vertex[i][j]->Y();
2879 ssdendflexshape[i]->DefinePolygon(kendflexvertexnumber,xvertex[i],yvertex[i]);
2880 ssdendflexshape[i]->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
2881 ssdendflexshape[i]->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
2882 ssdendflex[i] = new TGeoVolume(ssdendflexname[i],ssdendflexshape[i],
2883 i%2==0 ? ssdendflexmed[0] : ssdendflexmed[1]);
2884 ssdendflex[i]->SetLineColor(i%2==0 ? ssdendflexcolor[0] : ssdendflexcolor[1]);
2885 ssdendflexmother->AddNode(ssdendflex[i],1);
2887 /////////////////////////////////////////////////////////////
2888 // Deallocating memory
2889 /////////////////////////////////////////////////////////////
2890 for(Int_t i=0; i<karcnumber*(knedges+1); i++) delete vertexposition[i];
2891 for(Int_t i=0; i<karcnumber; i++) delete referencetrans[i];
2892 for(Int_t i=0; i<kendflexlayernumber; i++){
2893 for(Int_t j=0; j<kendflexvertexnumber; j++) delete vertex[i][j];
2894 delete [] vertex[i];
2896 for(Int_t i=0; i<kendflexlayernumber+1; i++) delete transvector[i];
2897 delete deltatransvector;
2898 /////////////////////////////////////////////////////////////
2899 //ssdendflexmother->CheckOverlaps(0.01);
2900 return ssdendflexmother;
2902 ///////////////////////////////////////////////////////////////////////////////
2903 TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
2904 /////////////////////////////////////////////////////////////
2905 // Method generating the Mounting Block
2906 /////////////////////////////////////////////////////////////
2907 const Int_t kvertexnumber = 8;
2908 Double_t xvertex[kvertexnumber];
2909 Double_t yvertex[kvertexnumber];
2910 xvertex[0] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1]);
2911 xvertex[1] = xvertex[0];
2912 xvertex[2] = -xvertex[0];
2913 xvertex[3] = xvertex[2];
2914 xvertex[4] = xvertex[3]+0.5*(fgkSSDMountingBlockLength[1]
2915 - fgkSSDMountingBlockLength[2]);
2916 xvertex[5] = xvertex[4];
2917 xvertex[6] = 0.5*fgkSSDMountingBlockLength[0]-xvertex[2]
2918 - 0.5*fgkSSDMountingBlockScrewHoleEdge
2919 - fgkSSDMountingBlockScrewHoleRadius[0];
2920 xvertex[7] = xvertex[6];
2921 yvertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor
2922 + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0];
2923 yvertex[1] = 0.5*fgkSSDMountingBlockHeight[0];
2924 yvertex[2] = yvertex[1];
2925 yvertex[3] = fgkSSDMountingBlockHeight[1]-yvertex[1];
2926 yvertex[4] = yvertex[3];
2927 yvertex[5] = yvertex[2]+fgkSSDMountingBlockHeight[2]
2928 - fgkSSDMountingBlockHeight[0];
2929 yvertex[6] = yvertex[5];
2930 yvertex[7] = yvertex[0];
2932 ///////////////////////////////////////////////////////////////////////
2933 // TGeoXTru Volume definition for Mounting Block Part
2934 ///////////////////////////////////////////////////////////////////////
2935 TGeoXtru* ssdmountingblockshape = new TGeoXtru(2);
2936 ssdmountingblockshape->DefinePolygon(kvertexnumber,xvertex,yvertex);
2937 ssdmountingblockshape->DefineSection(0,-0.5*fgkSSDMountingBlockWidth);
2938 ssdmountingblockshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
2939 TGeoVolume* ssdmountingblock = new TGeoVolume("SSDMountingBlock",
2940 ssdmountingblockshape,
2941 fSSDMountingBlockMedium);
2942 ssdmountingblock->SetLineColor(fColorG10);
2943 TGeoCombiTrans* mountingblockcombitrans = new TGeoCombiTrans();
2944 mountingblockcombitrans->SetTranslation(2.*xvertex[2]+fgkSSDMountingBlockLength[1],0.,0.);
2945 TGeoRotation* mountingblockrot = new TGeoRotation();
2946 mountingblockrot->SetAngles(90.,180.,-90.);
2947 mountingblockcombitrans->SetRotation(*mountingblockrot);
2948 /////////////////////////////////////////////////////////////
2949 // Generating the Mounting Block Screw Vertices
2950 /////////////////////////////////////////////////////////////
2951 const Int_t kscrewvertexnumber = 15;
2952 Double_t alpha = TMath::ACos(0.5*(fgkSSDMountingBlockHeight[1]
2953 - fgkSSDMountingBlockScrewHoleEdge)
2954 / fgkSSDMountingBlockScrewHoleRadius[0])
2955 * TMath::RadToDeg();
2956 Double_t phi0 = 90.+alpha;
2957 Double_t phi = 270.-2*alpha;
2958 Double_t deltaphi = phi/kscrewvertexnumber;
2959 TVector3* screwvertex[kscrewvertexnumber+1];
2960 for(Int_t i=0; i<kscrewvertexnumber+1; i++)
2961 screwvertex[i] = new TVector3(fgkSSDMountingBlockScrewHoleRadius[0]
2962 *CosD(phi0+i*deltaphi),
2963 fgkSSDMountingBlockScrewHoleRadius[0]
2964 *SinD(phi0+i*deltaphi));
2965 Double_t xscrewvertex[kscrewvertexnumber+6];
2966 Double_t yscrewvertex[kscrewvertexnumber+6];
2967 xscrewvertex[0] = - fgkSSDMountingBlockScrewHoleRadius[0];
2968 yscrewvertex[0] = -0.5*(fgkSSDMountingBlockWidth
2969 - fgkSSDMountingBlockScrewHoleEdge);
2970 xscrewvertex[1] = xscrewvertex[0];
2971 yscrewvertex[1] = 0.5*fgkSSDMountingBlockScrewHoleEdge;
2972 xscrewvertex[2] = screwvertex[0]->X();
2973 yscrewvertex[2] = yscrewvertex[1];
2974 for(Int_t i=0; i<kscrewvertexnumber+1; i++){
2975 xscrewvertex[i+3] = screwvertex[i]->X();
2976 yscrewvertex[i+3] = screwvertex[i]->Y();
2978 xscrewvertex[kscrewvertexnumber+4] = 0.5*fgkSSDMountingBlockScrewHoleEdge;
2979 yscrewvertex[kscrewvertexnumber+4] = yscrewvertex[kscrewvertexnumber+3];
2980 xscrewvertex[kscrewvertexnumber+5] = xscrewvertex[kscrewvertexnumber+4];
2981 yscrewvertex[kscrewvertexnumber+5] = yscrewvertex[0];
2982 TGeoXtru* ssdmountingblockscrewshape = new TGeoXtru(2);
2983 ssdmountingblockscrewshape->DefinePolygon(kscrewvertexnumber+6,xscrewvertex,yscrewvertex);
2984 ssdmountingblockscrewshape->DefineSection(0,yvertex[0]);
2985 ssdmountingblockscrewshape->DefineSection(1,-0.5*fgkSSDMountingBlockHeight[0]
2986 + fgkSSDMountingBlockHeight[2]);
2987 TGeoVolume* ssdmountingblockscrew = new TGeoVolume("SSDMountingBlockScrew",
2988 ssdmountingblockscrewshape,
2989 fSSDMountingBlockMedium);
2990 ssdmountingblockscrew->SetLineColor(fColorG10);
2991 TGeoCombiTrans* ssdmountingblockscrewcombitrans[4];
2992 for(Int_t i=0; i<4; i++) ssdmountingblockscrewcombitrans[i] = new TGeoCombiTrans();
2993 ssdmountingblockscrewcombitrans[0]->SetTranslation(-0.5*fgkSSDMountingBlockScrewHoleEdge,
2995 0.5*fgkSSDMountingBlockHeight[0]
2996 - fgkSSDMountingBlockHeight[2]
2997 + 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
2998 + fgkSSDMountingBlockHeight[2]
3000 ssdmountingblockscrewcombitrans[1]->SetTranslation(0.5*fgkSSDMountingBlockScrewHoleEdge,
3001 -0.5*fgkSSDMountingBlockScrewHoleEdge,
3003 -0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3004 +fgkSSDMountingBlockHeight[2]
3006 ssdmountingblockscrewcombitrans[2]->SetTranslation(-0.5*fgkSSDMountingBlockScrewHoleEdge,
3008 - 0.5*fgkSSDMountingBlockHeight[0]
3009 + fgkSSDMountingBlockHeight[2]
3010 - 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3011 + fgkSSDMountingBlockHeight[2]
3013 ssdmountingblockscrewcombitrans[3]->SetTranslation(0.5*fgkSSDMountingBlockScrewHoleEdge,
3016 + 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3017 + fgkSSDMountingBlockHeight[2]
3019 TGeoRotation* ssdmountingblockscrewrot[4];
3020 for(Int_t i=0; i<4; i++) ssdmountingblockscrewrot[i] = new TGeoRotation();
3021 ssdmountingblockscrewrot[1]->SetAngles(90.,-180.,-90.);
3022 ssdmountingblockscrewrot[2]->SetAngles(0.,180.,0.);
3023 ssdmountingblockscrewrot[3]->SetAngles(180.,0.,0.);
3024 for(Int_t i=1; i<4; i++)
3025 ssdmountingblockscrewcombitrans[i]->SetRotation(*ssdmountingblockscrewrot[i]);
3026 TGeoRotation* ssdmountingblockglobalrot = new TGeoRotation();
3027 ssdmountingblockglobalrot->SetAngles(0.,90.,0.);
3028 TGeoTranslation* ssdmountingblockglobaltrans = new TGeoTranslation();
3029 ssdmountingblockglobaltrans->SetTranslation(0.5*fgkSSDMountingBlockLength[0]
3030 + xvertex[0],yscrewvertex[1]
3031 - 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3032 + fgkSSDMountingBlockHeight[2]
3034 TGeoHMatrix* ssdmountingblockscrewmatrix[4];
3035 for(Int_t i=0; i<4; i++){
3036 ssdmountingblockscrewmatrix[i] =
3037 new TGeoHMatrix((*ssdmountingblockglobalrot)*(*ssdmountingblockscrewcombitrans[i]));
3038 ssdmountingblockscrewmatrix[i]->MultiplyLeft(ssdmountingblockglobaltrans);
3040 ///////////////////////////////////////////////////////////////////////
3041 // TGeoXtru for Mother Volume
3042 ///////////////////////////////////////////////////////////////////////
3043 const Int_t kvertexmothernumber = 12;
3044 Double_t xmothervertex[kvertexmothernumber];
3045 Double_t ymothervertex[kvertexmothernumber];
3046 for(Int_t i=0; i<6; i++){
3047 xmothervertex[i] = xvertex[i];
3048 ymothervertex[i] = yvertex[i];
3050 xmothervertex[6] = xvertex[5]+fgkSSDMountingBlockLength[2];
3051 ymothervertex[6] = ymothervertex[5];
3052 xmothervertex[7] = xmothervertex[6];
3053 ymothervertex[7] = ymothervertex[4];
3054 xmothervertex[8] = xmothervertex[7]
3055 + 0.5*(fgkSSDMountingBlockLength[1]
3056 - fgkSSDMountingBlockLength[2]);
3057 ymothervertex[8] = ymothervertex[4];
3058 xmothervertex[9] = xmothervertex[8];
3059 ymothervertex[9] = ymothervertex[2];
3060 xmothervertex[10] = xvertex[0]+fgkSSDMountingBlockLength[0];
3061 ymothervertex[10] = ymothervertex[1];
3062 xmothervertex[11] = xmothervertex[10];
3063 ymothervertex[11] = ymothervertex[0];
3064 TGeoXtru* ssdmountingblockmothershape = new TGeoXtru(2);
3065 ssdmountingblockmothershape->DefinePolygon(kvertexmothernumber,xmothervertex,ymothervertex);
3066 ssdmountingblockmothershape->DefineSection(0,-0.5*fgkSSDMountingBlockWidth);
3067 ssdmountingblockmothershape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3068 TGeoVolume* ssdmountingblockmother = new TGeoVolume("SSDMountingBlockMother",
3069 ssdmountingblockmothershape,
3071 /////////////////////////////////////////////////////////////
3072 // Placing the Volumes into Mother Volume
3073 /////////////////////////////////////////////////////////////
3074 ssdmountingblockmother->AddNode(ssdmountingblock,1);
3075 ssdmountingblockmother->AddNode(ssdmountingblock,2,mountingblockcombitrans);
3076 for(Int_t i=0; i<4; i++)
3077 ssdmountingblockmother->AddNode(ssdmountingblockscrew,i+1,
3078 ssdmountingblockscrewmatrix[i]);
3079 /////////////////////////////////////////////////////////////
3080 // Deallocating memory
3081 /////////////////////////////////////////////////////////////
3082 delete mountingblockrot;
3083 for(Int_t i=0; i<4; i++) delete ssdmountingblockscrewrot[i];
3084 delete ssdmountingblockglobalrot;
3085 delete ssdmountingblockglobaltrans;
3086 /////////////////////////////////////////////////////////////
3087 return ssdmountingblockmother;
3089 ///////////////////////////////////////////////////////////////////////////////
3090 TGeoVolume* AliITSv11GeometrySSD::GetMountingBlockClip() const {
3091 /////////////////////////////////////////////////////////////
3092 // Method generating the Mounting Block Clip
3093 /////////////////////////////////////////////////////////////
3094 const Int_t kmothervertexnumber = 10;
3095 Double_t xmothervertex[kmothervertexnumber];
3096 Double_t ymothervertex[kmothervertexnumber];
3097 xmothervertex[0] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1])
3098 - 0.5*(fgkSSDSensorWidth-fgkSSDMountingBlockLength[0]);
3099 xmothervertex[1] = xmothervertex[0];
3100 xmothervertex[2] = xmothervertex[0]+0.5*(fgkMountingBlockClibScrewPosition
3101 - fgkMountingBlockClibScrewRadius);
3102 xmothervertex[3] = xmothervertex[2];
3103 xmothervertex[4] = xmothervertex[3]+2.*fgkMountingBlockClibScrewRadius;
3104 xmothervertex[5] = xmothervertex[4];
3105 xmothervertex[6] = xmothervertex[0]+fgkMountingBlockClipLength;
3106 xmothervertex[7] = xmothervertex[6];
3107 xmothervertex[8] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1]);
3108 xmothervertex[9] = xmothervertex[8];
3109 ymothervertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor
3110 + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0];
3111 ymothervertex[1] = 0.5*fgkSSDMountingBlockHeight[0]+fgkMountingBlockClipThickness;
3112 ymothervertex[2] = ymothervertex[1];
3113 ymothervertex[3] = ymothervertex[2]+(fgkSSDMountingBlockHeight[1]
3114 - fgkSSDMountingBlockHeight[0]-fgkMountingBlockClipThickness
3115 - 0.5*fgkCoolingTubeSupportHeight-fgkCoolingTubeSupportRmax);
3116 ymothervertex[4] = ymothervertex[3];
3117 ymothervertex[5] = ymothervertex[2];
3118 ymothervertex[6] = ymothervertex[5];
3119 ymothervertex[7] = ymothervertex[6]-fgkMountingBlockClipThickness;
3120 ymothervertex[8] = ymothervertex[7];
3121 ymothervertex[9] = ymothervertex[0];
3123 ///////////////////////////////////////////////////////////////////////
3124 // TGeoXTru Volume definition for Mounting Block Clip Part
3125 ///////////////////////////////////////////////////////////////////////
3126 TGeoXtru* ssdmountingblockclipshape = new TGeoXtru(2);
3127 ssdmountingblockclipshape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
3128 ssdmountingblockclipshape->DefineSection(0,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockSupportWidth[0]);
3129 ssdmountingblockclipshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3130 TGeoVolume* ssdmountingblockclip = new TGeoVolume("SSDMountingBlockClip",
3131 ssdmountingblockclipshape,fSSDAir);
3132 ssdmountingblockclip->SetLineColor(4);
3133 ///////////////////////////////////////////////////////////////////////
3134 // TGeoXTru Volume definition for Clip
3135 ///////////////////////////////////////////////////////////////////////
3136 const Int_t kclipvertexnumber = 6;
3137 Double_t xclipvertex[kclipvertexnumber];
3138 Double_t yclipvertex[kclipvertexnumber];
3139 xclipvertex[0] = xmothervertex[0];
3140 xclipvertex[1] = xclipvertex[0];
3141 xclipvertex[2] = xmothervertex[6];
3142 xclipvertex[3] = xclipvertex[2];
3143 xclipvertex[4] = xclipvertex[0]+fgkMountingBlockClipThickness;
3144 xclipvertex[5] = xclipvertex[4];
3145 yclipvertex[0] = ymothervertex[0];
3146 yclipvertex[1] = ymothervertex[1];
3147 yclipvertex[2] = yclipvertex[1];
3148 yclipvertex[3] = yclipvertex[1]-fgkMountingBlockClipThickness;
3149 yclipvertex[4] = yclipvertex[3];
3150 yclipvertex[5] = yclipvertex[0];
3151 TGeoXtru* clipshape = new TGeoXtru(2);
3152 clipshape->DefinePolygon(kclipvertexnumber,xclipvertex,yclipvertex);
3153 clipshape->DefineSection(0,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockClibWidth);
3154 clipshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockSupportWidth[0]
3155 + fgkMountingBlockClibWidth);
3156 TGeoVolume* clip = new TGeoVolume("SSDClip",clipshape,fSSDMountingBlockMedium);
3157 clip->SetLineColor(18);
3158 ///////////////////////////////////////////////////////////////////////
3159 // Ladder Support Piece
3160 ///////////////////////////////////////////////////////////////////////
3161 const Int_t ksupportvertexnumber = 4;
3162 Double_t xsupportvertex[ksupportvertexnumber];
3163 Double_t ysupportvertex[ksupportvertexnumber];
3164 xsupportvertex[0] = xclipvertex[5];
3165 xsupportvertex[1] = xsupportvertex[0];
3166 xsupportvertex[2] = xmothervertex[9];
3167 xsupportvertex[3] = xsupportvertex[2];
3168 ysupportvertex[0] = yclipvertex[0];
3169 ysupportvertex[1] = yclipvertex[3];
3170 ysupportvertex[2] = ysupportvertex[1];
3171 ysupportvertex[3] = ysupportvertex[0];
3172 TGeoXtru* supportshape = new TGeoXtru(2);
3173 supportshape->DefinePolygon(ksupportvertexnumber,xsupportvertex,ysupportvertex);
3174 supportshape->DefineSection(0,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockSupportWidth[0]);
3175 supportshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3176 TGeoVolume* support = new TGeoVolume("RingSupport",supportshape,fSSDMountingBlockMedium);
3177 support->SetLineColor(9);
3178 ///////////////////////////////////////////////////////////////////////
3179 // TGeoXTru Volume definition for Screw
3180 ///////////////////////////////////////////////////////////////////////
3181 Double_t radius[2] = {fgkMountingBlockClibScrewRadius,
3182 0.5*fgkMountingBlockClibScrewRadius};
3183 Int_t edgesnumber[2] = {50,6};
3184 Double_t section[2] = {-0.5*(ymothervertex[3]-ymothervertex[2]),
3185 +0.5*(ymothervertex[3]-ymothervertex[2])};
3186 TGeoShape* clipscrewshape = GetScrewShape(radius,edgesnumber,section);
3187 TGeoVolume* clipscrew = new TGeoVolume("ClipScrewShape",clipscrewshape,fSSDSupportRingAl);
3188 clipscrew->SetLineColor(12);
3189 TGeoRotation* screwrot = new TGeoRotation();
3190 screwrot->SetAngles(0.,90.,0.);
3191 TGeoTranslation* screwtrans = new TGeoTranslation();
3192 screwtrans->SetTranslation(xmothervertex[3]+fgkMountingBlockClibScrewRadius,
3193 0.5*(ymothervertex[3]+ymothervertex[2]),
3194 0.5*fgkSSDMountingBlockWidth+
3195 -0.5*fgkMountingBlockSupportWidth[0]);
3196 TGeoCombiTrans* screwcombitrans = new TGeoCombiTrans(*screwtrans,*screwrot);
3197 ///////////////////////////////////////////////////////////////////////
3198 // Placing the Volumes
3199 ///////////////////////////////////////////////////////////////////////
3200 ssdmountingblockclip->AddNode(clip,1);
3201 ssdmountingblockclip->AddNode(support,1);
3202 ssdmountingblockclip->AddNode(clipscrew,1,screwcombitrans);
3203 /////////////////////////////////////////////////////////////
3204 // Deallocating memory
3205 /////////////////////////////////////////////////////////////
3208 /////////////////////////////////////////////////////////////
3209 return ssdmountingblockclip;
3211 ///////////////////////////////////////////////////////////////////////////////
3212 void AliITSv11GeometrySSD::CreateCoolingTubes() {
3213 /////////////////////////////////////////////////////////////
3214 // Method generating the Cooling Tube
3215 // sets fcoolingtube and returns list for endladdercoolingtube
3216 /////////////////////////////////////////////////////////////
3217 TGeoTube *coolingtubeshape[2];
3218 // Ladder Cooling Tubes
3220 // MvL: Simplified cooling tubes
3221 coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,0.5*fgkCoolingTubeLength);
3222 coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,coolingtubeshape[0]->GetDz());
3224 // End Ladder Cooling Tubes
3225 TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber];
3226 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
3227 endladdercoolingtubeshape[i] = new TGeoTube*[2];
3229 Double_t sensZshift = 0.5*fgkCarbonFiberJunctionWidth - fgkCarbonFiberLowerSupportWidth - fgkLowerSupportToSensorZ;
3230 endladdercoolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3231 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[0] - sensZshift));
3232 endladdercoolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3233 endladdercoolingtubeshape[0][0]->GetDz());
3234 endladdercoolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3235 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[1] + sensZshift));
3236 endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3237 endladdercoolingtubeshape[1][0]->GetDz()-0.5*fgkSSDTolerance);
3238 // Ladder Cooling Tubes
3239 TGeoVolume* coolingtube[2];
3240 coolingtube[0] = new TGeoVolume("OuterCoolingTube1",coolingtubeshape[0], fSSDCoolingTubePhynox);
3241 coolingtube[1] = new TGeoVolume("InnerCoolingTube1",coolingtubeshape[1], fSSDCoolingTubeWater);
3242 coolingtube[0]->SetLineColor(fColorPhynox);
3243 coolingtube[1]->SetLineColor(fColorWater);
3245 // End Ladder Cooling Tubes
3246 TGeoVolume** endladdercoolingtube[fgkendladdercoolingtubenumber];
3247 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
3248 endladdercoolingtube[i] = new TGeoVolume*[2];
3249 endladdercoolingtube[0][0] = new TGeoVolume("OuterEndLadderCoolingTube1",
3250 endladdercoolingtubeshape[0][0],
3251 fSSDCoolingTubePhynox);
3252 endladdercoolingtube[0][1] = new TGeoVolume("InnerEndlLadderCoolingTube1",
3253 endladdercoolingtubeshape[0][1],
3254 fSSDCoolingTubeWater);
3255 endladdercoolingtube[1][0] = new TGeoVolume("OuterEndLadderCoolingTube2",
3256 endladdercoolingtubeshape[1][0],
3257 fSSDCoolingTubePhynox);
3258 endladdercoolingtube[1][1] = new TGeoVolume("InnerEndlLadderCoolingTube2",
3259 endladdercoolingtubeshape[1][1],
3260 fSSDCoolingTubeWater);
3261 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++){
3262 endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
3263 endladdercoolingtube[i][1]->SetLineColor(fColorWater);
3266 /////////////////////////////////////////////////////////////
3267 // Virtual Volume containing Cooling Tubes
3268 /////////////////////////////////////////////////////////////
3269 // Ladder Cooling Tubes
3270 TGeoTube* virtualcoolingtubeshape = new TGeoTube(coolingtubeshape[1]->GetRmin(),
3271 coolingtubeshape[0]->GetRmax(),
3272 coolingtubeshape[0]->GetDz());
3273 fcoolingtube = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape, fSSDAir);
3274 fcoolingtube->AddNode(coolingtube[0],1);
3275 fcoolingtube->AddNode(coolingtube[1],1);
3277 // End Ladder Cooling Tubes
3278 TGeoTube* endladdervirtualcoolingtubeshape[fgkendladdercoolingtubenumber];
3279 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
3280 endladdervirtualcoolingtubeshape[i] = new TGeoTube(endladdercoolingtubeshape[i][1]->GetRmin(),
3281 endladdercoolingtubeshape[i][0]->GetRmax(),
3282 endladdercoolingtubeshape[i][0]->GetDz());
3283 fendladdercoolingtube[0] = new TGeoVolume("EndLadderCoolingTube1",
3284 endladdervirtualcoolingtubeshape[0],
3286 fendladdercoolingtube[1] = new TGeoVolume("EndLadderCoolingTube2",
3287 endladdervirtualcoolingtubeshape[1],
3289 fendladdercoolingtube[0]->AddNode(endladdercoolingtube[0][0],1);
3290 fendladdercoolingtube[0]->AddNode(endladdercoolingtube[0][1],1);
3291 fendladdercoolingtube[1]->AddNode(endladdercoolingtube[1][0],1);
3292 fendladdercoolingtube[1]->AddNode(endladdercoolingtube[1][1],1);
3294 ///////////////////////////////////////////////////////////////////////////////
3295 TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
3296 /////////////////////////////////////////////////////////////
3297 // Method generating SSD Cooling Block
3298 /////////////////////////////////////////////////////////////
3299 const Int_t kvertexnumber = 8;
3300 ///////////////////////////////////////
3301 // Vertex Positioning for TGeoXTru
3302 ///////////////////////////////////////
3303 TVector3** vertexposition = new TVector3*[2*kvertexnumber+nedges+1];
3304 vertexposition[0] = new TVector3(0.0,0.0);
3305 vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1]);
3306 vertexposition[2] = new TVector3(fgkSSDCoolingBlockHoleLength[1],
3307 vertexposition[1]->Y());
3308 vertexposition[3] = new TVector3(vertexposition[2]->X(),
3309 vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2]);
3310 vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y());
3311 vertexposition[5] = new TVector3(vertexposition[4]->X(),
3312 + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1]);
3313 vertexposition[6] = new TVector3(Xfrom2Points(vertexposition[5]->X(),
3314 vertexposition[5]->Y(),0.5*(fgkSSDCoolingBlockLength
3315 - fgkSSDCoolingBlockHoleLength[0]
3316 - 4.*fgkSSDCoolingBlockHoleRadius[1]),
3317 fgkSSDCoolingBlockHeight[0]
3318 - fgkSSDCoolingBlockHoleRadius[1],
3319 fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0]);
3320 vertexposition[7] = new TVector3(0.5*(fgkSSDCoolingBlockLength
3321 - fgkSSDCoolingBlockHoleLength[0]),
3322 vertexposition[6]->Y());
3323 Double_t alpha = TMath::ACos(0.5*fgkSSDCoolingBlockHoleLength[0]
3324 / fgkSSDCoolingBlockHoleRadius[0])*TMath::RadToDeg();
3325 Double_t phi = 180.-alpha;
3326 Double_t psi = 180.+2.*alpha;
3327 Double_t deltapsi = psi/nedges;
3328 Double_t radius = fgkSSDCoolingBlockHoleRadius[0]/CosD(0.5*deltapsi);
3329 TVector3* transvector = new TVector3(0.5*fgkSSDCoolingBlockLength,
3330 fgkSSDCoolingBlockHoleCenter);
3331 for(Int_t i=0; i<nedges+1; i++){
3332 vertexposition[kvertexnumber+i] = new TVector3(radius*CosD(phi+i*deltapsi),
3333 radius*SinD(phi+i*deltapsi));
3334 *vertexposition[kvertexnumber+i] += (*transvector);
3336 Double_t param[4] = {1.0,0.0,0.0,-0.5*fgkSSDCoolingBlockLength};
3337 for(Int_t i=0; i<kvertexnumber; i++)
3338 vertexposition[kvertexnumber+nedges+1+i] =
3339 GetReflection(vertexposition[kvertexnumber-1-i],param);
3340 ///////////////////////////////////////////////////////////////////////
3341 // TGeoXTru Volume definition for Cooling Tube Support Arc Part
3342 ///////////////////////////////////////////////////////////////////////
3343 TGeoXtru* ssdcoolingblockshape = new TGeoXtru(2);
3344 Double_t* xvertexpoints = new Double_t[2*kvertexnumber+nedges+1];
3345 Double_t* yvertexpoints = new Double_t[2*kvertexnumber+nedges+1];
3346 for(Int_t i=0; i<2*kvertexnumber+nedges+1; i++){
3347 xvertexpoints[i] = vertexposition[i]->X();
3348 yvertexpoints[i] = vertexposition[i]->Y();
3350 ssdcoolingblockshape->DefinePolygon(2*kvertexnumber+nedges+1,xvertexpoints,
3352 ssdcoolingblockshape->DefineSection(0,-0.5*fgkSSDCoolingBlockWidth);
3353 ssdcoolingblockshape->DefineSection(1,0.5*fgkSSDCoolingBlockWidth);
3354 TGeoVolume* ssdcoolingblock = new TGeoVolume("SSDCoolingBlock",
3355 ssdcoolingblockshape,
3356 fSSDAlCoolBlockMedium);
3357 ssdcoolingblock->SetLineColor(fColorAl);
3358 /////////////////////////////////////////////////////////////
3359 // Deallocating memory
3360 /////////////////////////////////////////////////////////////
3361 delete [] vertexposition;
3362 delete [] xvertexpoints;
3363 delete [] yvertexpoints;
3364 /////////////////////////////////////////////////////////////
3365 return ssdcoolingblock;
3367 /////////////////////////////////////////////////////////////////////////////////
3368 TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeight, Int_t nedges){
3369 ///////////////////////////////////////////////////////
3370 static const Int_t kssdchipcablesnumber = 2; // Number of cables: left and right
3371 static const Int_t kssdchipcableslaynumber = 2; // Number of layers: Al and Kapton
3372 static const Int_t kvertexnumber = 4*(nedges+1)+4;
3373 Int_t ssdchipcablescolor[kssdchipcableslaynumber] = {fColorAl,fColorPolyhamide};
3374 Double_t ssdchipcablesradius[kssdchipcableslaynumber];
3375 ssdchipcablesradius[0] = 0.25*(SSDChipCablesHeight
3376 - fgkSSDChipCablesHeight[0]
3377 - fgkSSDChipCablesHeight[1]);
3378 ssdchipcablesradius[1] = ssdchipcablesradius[0]-fgkSSDChipCablesHeight[0];
3379 Double_t ssdchipcablespiecelength[kssdchipcablesnumber];
3380 ssdchipcablespiecelength[0] = 0.5*(fgkSSDChipCablesWidth[0]
3381 - 2.*TMath::Pi()*ssdchipcablesradius[0]
3382 - ssdchipcablesradius[0]
3383 - fgkSSDChipCablesWidth[1]
3384 - fgkSSDChipCablesWidth[2]);
3385 ssdchipcablespiecelength[1] = ssdchipcablespiecelength[0]
3386 - 0.5*(fgkSSDModuleStiffenerPosition[1]
3387 + fgkSSDChipCablesHeight[1]
3388 + fgkSSDSensorHeight);
3389 ///////////////////////////////////////////////////////
3390 // Vertex Positioning for TGeoXTrue Layer 1 and Layer 2
3391 ///////////////////////////////////////////////////////
3392 TVector3** vertexposition[kssdchipcableslaynumber];
3393 for(Int_t i=0; i<kssdchipcableslaynumber; i++) vertexposition[i] =
3394 new TVector3*[4*(nedges+1)+4];
3396 ratio[0] = ssdchipcablesradius[1]/ssdchipcablesradius[0];
3397 ratio[1] = (ssdchipcablesradius[1]-fgkSSDChipCablesHeight[1])
3398 / ssdchipcablesradius[0];
3399 ratio[2] = (ssdchipcablesradius[0]+fgkSSDChipCablesHeight[0])
3400 / ssdchipcablesradius[0];
3401 ratio[3] = (ssdchipcablesradius[0]+fgkSSDChipCablesHeight[0]
3402 + fgkSSDChipCablesHeight[1])
3403 / ssdchipcablesradius[0];
3404 Double_t phi = 180.;
3405 Double_t deltaphi = 180./nedges;
3406 Double_t angle = 0.0;
3407 Double_t **xvertexpoints = new Double_t*[kssdchipcableslaynumber];
3408 Double_t **yvertexpoints = new Double_t*[kssdchipcableslaynumber];
3409 for(Int_t i=0; i<kssdchipcableslaynumber;i++){
3410 xvertexpoints[i] = new Double_t[kvertexnumber];
3411 yvertexpoints[i] = new Double_t[kvertexnumber];
3413 TVector3* vertex = new TVector3();
3414 TVector3* transvector[kssdchipcableslaynumber];
3415 transvector[0] = new TVector3(fgkSSDChipWidth,
3416 SSDChipCablesHeight-ssdchipcablesradius[0]);
3417 transvector[1] = new TVector3();
3418 TGeoXtru* ssdchipcableshape[kssdchipcableslaynumber*kssdchipcablesnumber];
3419 TGeoVolume* ssdchipcable[kssdchipcableslaynumber*kssdchipcablesnumber];
3420 const char* ssdchipcablename[kssdchipcableslaynumber*kssdchipcablesnumber] =
3421 {"SSDChipcableAllay1Left","SSDChipcableKaptonlay2Left",
3422 "SSDChipcableAllay1Right","SSDChipcableKaptonlay2Right"};
3423 for(Int_t k=0; k<kssdchipcablesnumber; k++){
3424 transvector[1]->SetX(fgkSSDChipWidth-ssdchipcablespiecelength[k]);
3425 transvector[1]->SetY(ssdchipcablesradius[0]
3426 + fgkSSDChipCablesHeight[0]
3427 + fgkSSDChipCablesHeight[1]);
3428 for(Int_t i=0; i<kssdchipcableslaynumber; i++){
3429 vertexposition[i][0] = new TVector3(0.,SSDChipCablesHeight
3430 - fgkSSDChipCablesHeight[0]-i*fgkSSDChipCablesHeight[1]);
3431 vertexposition[i][1] = new TVector3(0.,SSDChipCablesHeight
3432 - i*fgkSSDChipCablesHeight[0]);
3433 vertexposition[i][2*(nedges+1)+2] =
3434 new TVector3(fgkSSDChipWidth+ssdchipcablesradius[0]
3435 + fgkSSDChipCablesWidth[1]
3436 + fgkSSDChipCablesWidth[2],
3437 ((1.-i)*fgkSSDChipCablesHeight[i]
3438 + fgkSSDChipCablesHeight[1]));
3439 vertexposition[i][2*(nedges+1)+3] =
3440 new TVector3(vertexposition[i][2*(nedges+1)+2]->X(),
3441 vertexposition[i][2*(nedges+1)+2]->Y()
3442 - fgkSSDChipCablesHeight[i]);
3443 for(Int_t j=0; j<nedges+1; j++){
3444 angle = 0.5*phi+TMath::Power(-1,i+1)*j*deltaphi;
3445 vertex->SetX(ssdchipcablesradius[0]*CosD(angle));
3446 vertex->SetY(ssdchipcablesradius[0]*SinD(angle));
3447 vertexposition[0][(nedges+1)*i+j+2] =
3448 new TVector3(*vertex+*transvector[i]);
3449 vertexposition[1][(nedges+1)*i+j+2] =
3450 new TVector3(vertex->X()*ratio[2*i]+transvector[i]->X(),
3451 vertex->Y()*ratio[2*i]+transvector[i]->Y());
3452 vertexposition[0][(4-i)*(nedges+1)+4-j-1] =
3453 new TVector3(*vertexposition[1][(nedges+1)*i+j+2]);
3454 vertexposition[1][(4-i)*(nedges+1)+4-j-1] =
3455 new TVector3(vertex->X()*ratio[2*i+1]
3456 + transvector[i]->X(),
3457 vertex->Y()*ratio[2*i+1]
3458 + transvector[i]->Y());
3461 for(Int_t i=0; i<kssdchipcableslaynumber; i++){
3462 for(Int_t j=0; j<kvertexnumber; j++){
3463 xvertexpoints[i][j] = vertexposition[i][j]->X();
3464 yvertexpoints[i][j] = vertexposition[i][j]->Y();
3466 ssdchipcableshape[kssdchipcablesnumber*k+i] = new TGeoXtru(2);
3467 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefinePolygon(kvertexnumber,
3468 xvertexpoints[i],yvertexpoints[i]);
3469 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefineSection(0,-0.5*fgkSSDChipCablesLength[1]);
3470 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefineSection(1,+0.5*fgkSSDChipCablesLength[1]);
3471 ssdchipcable[kssdchipcablesnumber*k+i] =
3472 new TGeoVolume(ssdchipcablename[kssdchipcablesnumber*k+i],
3473 ssdchipcableshape[kssdchipcablesnumber*k+i],
3474 (kssdchipcablesnumber*k+i)%2==0?
3475 fSSDAlTraceChipCableMedium:fSSDKaptonChipCableMedium);
3476 ssdchipcable[kssdchipcablesnumber*k+i]->SetLineColor(ssdchipcablescolor[i]);
3478 for(Int_t i=0; i<kssdchipcableslaynumber; i++)
3479 for(Int_t j=0; j<kvertexnumber; j++) delete vertexposition[i][j];
3481 /////////////////////////////////////////////////////////////
3482 // Mother Volume definition
3483 /////////////////////////////////////////////////////////////
3484 Double_t ssdchipseparation = fgkSSDSensorLength
3485 - 2.*fgkSSDModuleStiffenerPosition[1]
3486 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
3487 - 0.5*fgkSSDChipWidth)-fgkSSDChipWidth;
3489 static const Int_t kmothervertexnumber = 8;
3490 Double_t xmothervertex[kmothervertexnumber];
3491 Double_t ymothervertex[kmothervertexnumber];
3492 xmothervertex[0] = xvertexpoints[0][1];
3493 ymothervertex[0] = yvertexpoints[0][1];
3494 xmothervertex[1] = xvertexpoints[0][2+nedges/2];
3495 ymothervertex[1] = yvertexpoints[0][1];
3496 xmothervertex[2] = xvertexpoints[0][2+nedges/2];
3497 ymothervertex[2] = yvertexpoints[0][2+nedges];
3498 xmothervertex[3] = xvertexpoints[0][3+nedges];
3499 ymothervertex[3] = yvertexpoints[0][3+nedges];
3500 xmothervertex[4] = xvertexpoints[0][3+2*nedges];
3501 ymothervertex[4] = yvertexpoints[0][3+2*nedges];
3502 xmothervertex[5] = xvertexpoints[0][4+2*nedges];
3503 ymothervertex[5] = yvertexpoints[0][4+2*nedges];
3504 xmothervertex[6] = xvertexpoints[1][5+2*nedges];
3505 ymothervertex[6] = yvertexpoints[1][5+2*nedges];
3506 xmothervertex[7] = xvertexpoints[0][1];
3507 ymothervertex[7] = yvertexpoints[1][5+2*nedges];
3508 TGeoXtru *ssdchipcablemothershape = new TGeoXtru(2);
3509 ssdchipcablemothershape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
3510 ssdchipcablemothershape->DefineSection(0,-0.5*fgkSSDChipCablesLength[1]);
3511 ssdchipcablemothershape->DefineSection(1,+0.5*fgkSSDChipCablesLength[1]);
3513 TGeoVolume* ssdchipcablesmother[kssdchipcablesnumber];
3514 ssdchipcablesmother[0] = new TGeoVolume("SSDChipCableMotherLeft",ssdchipcablemothershape,fSSDAir);
3515 ssdchipcablesmother[1] = new TGeoVolume("SSDChipCableMotherRight",ssdchipcablemothershape,fSSDAir);
3517 /////////////////////////////////////////////////////////////
3518 // Rotation and Translation Definition for positioning
3519 /////////////////////////////////////////////////////////////
3520 TGeoRotation* ssdchipcablesrot[5];
3521 ssdchipcablesrot[0] = new TGeoRotation("",90.,180.,-90);
3522 ssdchipcablesrot[1] = new TGeoRotation("",0.0,90.0,0.0);
3523 ssdchipcablesrot[2] = new TGeoRotation((*ssdchipcablesrot[1])*(*ssdchipcablesrot[0]));
3524 ssdchipcablesrot[3] = new TGeoRotation("",180.,0.0,0.0);
3525 ssdchipcablesrot[4] = new TGeoRotation((*ssdchipcablesrot[3])*(*ssdchipcablesrot[2]));
3526 TGeoCombiTrans* ssdchipcablescombitrans = new TGeoCombiTrans(-ssdchipseparation,0.,0.,ssdchipcablesrot[2]);
3527 ssdchipcablesmother[0]->AddNode(ssdchipcable[0],1);
3528 ssdchipcablesmother[0]->AddNode(ssdchipcable[1],1);
3529 ssdchipcablesmother[1]->AddNode(ssdchipcable[2],1);
3530 ssdchipcablesmother[1]->AddNode(ssdchipcable[3],1);
3532 TGeoVolumeAssembly* ssdchipcablesassembly = new TGeoVolumeAssembly("SSDChipCablesAssembly");
3533 ssdchipcablesassembly->AddNode(ssdchipcablesmother[0],1,ssdchipcablesrot[4]);
3534 ssdchipcablesassembly->AddNode(ssdchipcablesmother[1],1,ssdchipcablescombitrans);
3535 /////////////////////////////////////////////////////////////
3536 // Deallocating memory
3537 /////////////////////////////////////////////////////////////
3538 for(Int_t i=0; i<kssdchipcableslaynumber;i++){
3539 delete [] xvertexpoints[i];
3540 delete [] yvertexpoints[i];
3542 for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete [] vertexposition[i];
3543 for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete transvector[i];
3545 delete ssdchipcablesrot[0];
3546 delete ssdchipcablesrot[1];
3547 delete ssdchipcablesrot[3];
3548 /////////////////////////////////////////////////////////////
3549 return ssdchipcablesassembly;
3551 ///////////////////////////////////////////////////////////////////////////////
3552 TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
3553 /////////////////////////////////////////////////////////////
3554 // SSD Chip Assembly
3555 /////////////////////////////////////////////////////////////
3556 TGeoVolume* ssdchipassembly = GetSSDChips();
3557 TList* ssdchipsystemlist = new TList();
3558 // const Int_t knedges = 20;
3559 const Int_t knedges = 5;
3560 const Int_t kchipsystemnumber = 2;
3562 TGeoVolumeAssembly* chipsystemother[kchipsystemnumber];
3563 const char* chipsytemothername[kchipsystemnumber] =
3564 {"SSDChipSytemother1","SSDChipSytemother2"};
3565 for(Int_t i=0; i<kchipsystemnumber; i++){
3566 chipsystemother[i] = new TGeoVolumeAssembly(chipsytemothername[i]);
3568 /////////////////////////////////////////////////////////////
3570 /////////////////////////////////////////////////////////////
3571 TGeoVolume* ssdchipcables[kchipsystemnumber];
3572 TGeoRotation** ssdchipcablesrot[kchipsystemnumber];
3573 TGeoTranslation** ssdchipcablestrans[kchipsystemnumber];
3574 TGeoCombiTrans** ssdchipcablescombitrans[kchipsystemnumber];
3576 for(Int_t i=0; i<kchipsystemnumber; i++){
3578 GetSSDChipCables(fgkSSDChipCablesHeight[i+2],knedges);
3579 ssdchipcablestrans[i] = new TGeoTranslation*[fgkSSDChipNumber];
3580 ssdchipcablesrot[i] = new TGeoRotation*[fgkSSDChipNumber];
3581 ssdchipcablescombitrans[i] = new TGeoCombiTrans*[fgkSSDChipNumber];
3583 for(Int_t i=0; i<kchipsystemnumber; i++){
3584 for(Int_t j=0; j<fgkSSDChipNumber; j++){
3585 ssdchipcablestrans[i][j] = new TGeoTranslation();
3586 ssdchipcablesrot[i][j] = new TGeoRotation();
3587 ssdchipcablescombitrans[i][j] = new TGeoCombiTrans();
3588 ssdchipcablesrot[i][j]->SetAngles(-90.0,0.0,0.0);
3589 ssdchipcablestrans[i][j]->SetTranslation(j*(fgkSSDChipLength
3590 + fgkSSDChipSeparationLength),
3591 0.5*fgkSSDChipWidth,
3592 - 0.5*fgkSSDChipHeight
3593 - fgkSSDChipCablesHeight[i+2]);
3594 ssdchipcablescombitrans[i][j]->SetRotation(*ssdchipcablesrot[i][j]);
3595 ssdchipcablescombitrans[i][j]->SetTranslation(*ssdchipcablestrans[i][j]);
3596 chipsystemother[i]->AddNode(ssdchipcables[i],j+1,ssdchipcablescombitrans[i][j]);
3598 chipsystemother[i]->AddNode(ssdchipassembly,i+1);
3599 ssdchipsystemlist->Add(chipsystemother[i]);
3601 /////////////////////////////////////////////////////////////
3602 // Deallocating memory
3603 /////////////////////////////////////////////////////////////
3604 for(Int_t i=0; i<kchipsystemnumber; i++){
3605 for(Int_t j=0; j<fgkSSDChipNumber; j++){
3606 delete ssdchipcablesrot[i][j];
3607 delete ssdchipcablestrans[i][j];
3609 delete [] ssdchipcablesrot[i];
3610 delete [] ssdchipcablestrans[i];
3612 /////////////////////////////////////////////////////////////
3613 return ssdchipsystemlist;
3616 //_____________________________________________________________________________
3617 TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
3618 /////////////////////////////////////////////////////////////
3619 // SSD Chip Assembly Generation
3620 /////////////////////////////////////////////////////////////
3621 const Int_t kssdchiprownumber = 2;
3622 TGeoBBox* ssdchipcompshape[2];
3623 ssdchipcompshape[0] = new TGeoBBox("SSDChipCompShape",
3624 0.5*fgkSSDChipLength,
3625 0.5*fgkSSDChipWidth,
3626 0.5*(fgkSSDChipHeight-fgkSSDChipGlueHeight));
3627 ssdchipcompshape[1] = new TGeoBBox("SSDChipGlueCompShape",
3628 0.5*fgkSSDChipLength,
3629 0.5*fgkSSDChipWidth,
3630 0.5*fgkSSDChipGlueHeight);
3631 TGeoVolume* ssdchipcomp[2];
3632 ssdchipcomp[0] = new TGeoVolume("SSDChipComp",ssdchipcompshape[0],fSSDChipMedium);
3633 ssdchipcomp[1] = new TGeoVolume("SSDChipGlueComp",ssdchipcompshape[1],
3634 fSSDChipGlueMedium);
3635 ssdchipcomp[0]->SetLineColor(fColorSilicon);
3636 ssdchipcomp[1]->SetLineColor(fColorEpoxy);
3637 TGeoTranslation* ssdchipcomptrans[2];
3638 ssdchipcomptrans[0] = new TGeoTranslation(0.,0.,-ssdchipcompshape[1]->GetDZ());
3639 ssdchipcomptrans[1] = new TGeoTranslation(0.,0.,ssdchipcompshape[0]->GetDZ());
3640 /////////////////////////////////////////////////////////////
3641 // Virtual Volume containing SSDChip
3642 /////////////////////////////////////////////////////////////
3643 TGeoBBox* ssdvirtualchipshape = new TGeoBBox("SSDChipShape",0.5*fgkSSDChipLength,
3644 0.5*fgkSSDChipWidth,
3645 0.5*fgkSSDChipHeight);
3646 TGeoVolume* ssdchip = new TGeoVolume("SSDChip",ssdvirtualchipshape,fSSDAir);
3647 /////////////////////////////////////////////////////////////
3648 for(Int_t i=0; i<2; i++) ssdchip->AddNode(ssdchipcomp[i],1,ssdchipcomptrans[i]);
3649 Double_t ssdchipseparation[2] = {fgkSSDChipLength+fgkSSDChipSeparationLength,
3650 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
3651 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
3652 - 0.5*fgkSSDChipWidth)};
3653 /////////////////////////////////////////////////////////////
3654 // Virtual Volume containing SSDChipAssembly
3655 /////////////////////////////////////////////////////////////
3656 TGeoXtru* ssdchipmothershape = new TGeoXtru(2);
3657 const Int_t kssdmothervertexnumber = 2*fgkSSDChipNumber;
3658 Double_t xmothervertex[kssdmothervertexnumber];
3659 Double_t ymothervertex[kssdmothervertexnumber];
3660 ///////////////////////
3661 // Setting the vertices
3662 ///////////////////////
3663 xmothervertex[0] = -0.5*fgkSSDChipLength,ymothervertex[0] = -0.5*fgkSSDChipWidth;
3664 xmothervertex[1] = xmothervertex[0], ymothervertex[1] = ssdchipseparation[1]
3666 xmothervertex[2] = (fgkSSDChipNumber-1)*ssdchipseparation[0]-xmothervertex[0];
3667 ymothervertex[2] = ymothervertex[1];
3668 xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0];
3669 xmothervertex[4] = ssdchipseparation[0]+xmothervertex[0];
3670 ymothervertex[4] = ymothervertex[0];
3671 xmothervertex[5] = xmothervertex[4], ymothervertex[5] = -ymothervertex[4];
3672 xmothervertex[6] = (fgkSSDChipNumber-1)*ssdchipseparation[0]
3673 + (0.5*fgkSSDChipLength-fgkSSDChipWidth);
3674 ymothervertex[6] = ymothervertex[5];
3675 xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2]
3677 xmothervertex[8] = -0.5*fgkSSDChipLength+fgkSSDChipWidth;
3678 ymothervertex[8] = ymothervertex[7];
3679 xmothervertex[9] = -0.5*fgkSSDChipLength+fgkSSDChipWidth;
3680 ymothervertex[9] = ymothervertex[6];
3681 xmothervertex[10] = -xmothervertex[0], ymothervertex[10] = ymothervertex[9];
3682 xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[0];
3683 //////////////////////////////////////////////////////////
3684 ssdchipmothershape->DefinePolygon(kssdmothervertexnumber,
3685 xmothervertex,ymothervertex);
3686 ssdchipmothershape->DefineSection(0,-0.5*fgkSSDChipHeight);
3687 ssdchipmothershape->DefineSection(1, 0.5*fgkSSDChipHeight);
3688 // TGeoVolume* ssdchipmother = new TGeoVolume("SSDChipContainer",
3689 // ssdchipmothershape,fSSDAir);
3690 TGeoVolumeAssembly* ssdchipmother = new TGeoVolumeAssembly("SSDChipContainer");
3691 /////////////////////////////////////////////////////////////
3692 for(Int_t i=0; i<kssdchiprownumber; i++)
3693 for(Int_t j=0; j<fgkSSDChipNumber; j++)
3694 ssdchipmother->AddNode(ssdchip,fgkSSDChipNumber*i+j+1,
3695 new TGeoTranslation(j*ssdchipseparation[0],i*ssdchipseparation[1],0.));
3696 return ssdchipmother;
3698 /////////////////////////////////////////////////////////////////////////////////
3699 TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelength){
3700 /////////////////////////////////////////////////////////////
3701 // Method returning a List containing pointers to Ladder Cable Volumes
3703 // Return list contains 3 assemblies: cable box, cable arb shape and the end part of the cable
3704 // each contains 2 volumes, one for polyamide and one for aluminium
3705 /////////////////////////////////////////////////////////////
3706 const Int_t kladdercablesegmentnumber = 2;
3707 /////////////////////////////////////////
3708 // LadderSegmentBBox Volume
3709 /////////////////////////////////////////
3710 static TGeoBBox* laddercablesegmentbboxshape[kladdercablesegmentnumber] = {0,0};
3711 const char* laddercablesegmentbboxshapename[kladdercablesegmentnumber] =
3712 {"LadderCableSegmentBBoxShape1","LadderCableSegmentBBoxShape2"};
3715 const char* laddercablesegmentbboxname[kladdercablesegmentnumber] =
3716 {"LadderCableSegmentBBox1","LadderCableSegmentBBox2"};
3717 static TGeoVolume* laddercablesegmentbbox[kladdercablesegmentnumber];
3719 static TGeoTranslation* laddercablesegmentbboxtrans[kladdercablesegmentnumber] = {
3720 new TGeoTranslation("LadderCableSegmentBBoxTrans1",
3721 0.5*fgkSSDFlexWidth[0],
3722 0.5*fgkSSDLadderCableWidth,
3723 0.5*fgkSSDFlexHeight[0]),
3724 new TGeoTranslation("LadderCableSegmentBBoxTrans2",
3725 0.5*fgkSSDFlexWidth[0],
3726 0.5*fgkSSDLadderCableWidth,
3728 +0.5*fgkSSDFlexHeight[1])
3730 static TGeoVolume* laddercablesegmentbboxassembly = new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly") ;
3731 static TGeoVolume* laddercablesegmentarbassembly =
3732 new TGeoVolumeAssembly("LadderCableSegmentArbAssembly");
3734 static TGeoArb8* laddercablesegmentarbshape[kladdercablesegmentnumber];
3735 static TGeoVolume* laddercablesegmentarb[kladdercablesegmentnumber];
3737 if (laddercablesegmentbboxshape[0] == 0) {
3738 // Initialise static shapes and volumes
3739 for(Int_t i=0; i<kladdercablesegmentnumber; i++) laddercablesegmentbboxshape[i] =
3740 new TGeoBBox(laddercablesegmentbboxshapename[i],
3741 0.5*fgkSSDFlexWidth[0],
3742 0.5*fgkSSDLadderCableWidth,
3743 0.5*fgkSSDFlexHeight[i]);
3745 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3746 laddercablesegmentbbox[i] =
3747 new TGeoVolume(laddercablesegmentbboxname[i],
3748 laddercablesegmentbboxshape[i],
3749 (i==0?fSSDAlTraceLadderCableMedium:
3750 fSSDKaptonLadderCableMedium));
3751 laddercablesegmentbbox[i]->SetLineColor(i==0 ? fColorAl :
3755 for(Int_t i=0; i<kladdercablesegmentnumber; i++)
3756 laddercablesegmentbboxassembly->AddNode(laddercablesegmentbbox[i],1,
3757 laddercablesegmentbboxtrans[i]);
3758 /////////////////////////////////////////
3759 // LadderSegmentArb8 Volume
3760 /////////////////////////////////////////
3761 const Int_t kvertexnumber = 4;
3762 TVector3** laddercablesegmentvertexposition[kladdercablesegmentnumber];
3763 for(Int_t i = 0; i<kladdercablesegmentnumber; i++) laddercablesegmentvertexposition[i] =
3764 new TVector3*[kvertexnumber];
3765 //Shape Vertex Positioning
3766 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3767 laddercablesegmentvertexposition[i][0] = new TVector3(0.,i*fgkSSDFlexHeight[0]);
3768 laddercablesegmentvertexposition[i][1] = new TVector3(fgkSSDLadderCableWidth,
3769 i*fgkSSDFlexHeight[0]);
3770 laddercablesegmentvertexposition[i][2] = new TVector3(0.,fgkSSDFlexHeight[0]
3771 + fgkSSDFlexHeight[1]
3772 + i*fgkSSDFlexHeight[0]);
3773 laddercablesegmentvertexposition[i][3] =
3774 new TVector3(laddercablesegmentvertexposition[i][1]->X(),
3775 laddercablesegmentvertexposition[i][2]->Y());
3777 Double_t laddercablesegmentwidth[2][2] = {{fgkSSDFlexHeight[0],fgkSSDFlexHeight[0]},
3778 {fgkSSDFlexHeight[1],fgkSSDFlexHeight[1]}};
3779 const char* laddercablesegmentarbshapename[kladdercablesegmentnumber] =
3780 {"LadderCableSegmentArbShape1","LadderCableSegmentArbShape2"};
3782 for(Int_t i = 0; i< kladdercablesegmentnumber; i++) laddercablesegmentarbshape[i] =
3783 GetArbShape(laddercablesegmentvertexposition[i],
3784 laddercablesegmentwidth[i],
3785 fgkCarbonFiberJunctionWidth-fgkSSDFlexWidth[0],
3786 laddercablesegmentarbshapename[i]);
3787 const char* laddercablesegmentarbname[kladdercablesegmentnumber] =
3788 {"LadderCableSegmentArb1","LadderCableSegmentArb2"};
3790 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3791 laddercablesegmentarb[i] =
3792 new TGeoVolume(laddercablesegmentarbname[i],
3793 laddercablesegmentarbshape[i],
3794 (i==0?fSSDAlTraceLadderCableMedium:
3795 fSSDKaptonLadderCableMedium));
3796 laddercablesegmentarb[i]->SetLineColor(i==0 ? fColorAl :
3799 TGeoRotation* laddercablesegmentarbrot[kladdercablesegmentnumber];
3800 laddercablesegmentarbrot[0] = new TGeoRotation("LadderCableSegmentArbRot1",
3802 laddercablesegmentarbrot[1] = new TGeoRotation("LadderCableSegmentArbRot2",
3804 TGeoCombiTrans* laddercablesegmentarbcombitrans =
3805 new TGeoCombiTrans("LadderCableSegmentArbCombiTrans",
3806 0.5*(fgkCarbonFiberJunctionWidth-fgkSSDFlexWidth[0])
3807 + fgkSSDFlexWidth[0],0.,0.,
3808 new TGeoRotation((*laddercablesegmentarbrot[1])
3809 *(*laddercablesegmentarbrot[0])));
3810 for(Int_t i=0; i<kladdercablesegmentnumber; i++)
3811 laddercablesegmentarbassembly->AddNode(laddercablesegmentarb[i],1,
3812 laddercablesegmentarbcombitrans);
3813 } // End of static initialisations
3814 /////////////////////////////////////////
3815 // End Ladder Cable Volume
3816 // Note: this part depends explicitly on the length passed as an argument to the function
3817 /////////////////////////////////////////
3818 TGeoBBox* ladderendcablesegmentbboxshape[kladdercablesegmentnumber];
3819 const char* ladderendcablesegmentbboxshapename[kladdercablesegmentnumber] =
3820 {"LadderEndCableSegmentBBoxShape1","LadderEndCableSegmentBBoxShape2"};
3821 for(Int_t i=0; i<kladdercablesegmentnumber; i++) ladderendcablesegmentbboxshape[i] =
3822 new TGeoBBox(ladderendcablesegmentbboxshapename[i],
3823 0.5*ssdendladdercablelength,
3824 0.5*fgkSSDLadderCableWidth,
3825 0.5*fgkSSDFlexHeight[i]);
3826 const char* ladderendcablesegmentbboxname[kladdercablesegmentnumber] =
3827 {"LadderEndCableSegmentBBox1","LadderEndCableSegmentBBox2"};
3828 TGeoVolume* ladderendcablesegmentbbox[kladdercablesegmentnumber];
3829 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3830 ladderendcablesegmentbbox[i] =
3831 new TGeoVolume(ladderendcablesegmentbboxname[i],
3832 ladderendcablesegmentbboxshape[i],
3833 (i==0?fSSDAlTraceLadderCableMedium:
3834 fSSDKaptonLadderCableMedium));
3835 ladderendcablesegmentbbox[i]->SetLineColor(i==0 ? fColorAl :
3838 TGeoTranslation* ladderendcablesegmentbboxtrans[kladdercablesegmentnumber];
3839 ladderendcablesegmentbboxtrans[0] =
3840 new TGeoTranslation("LadderEndCableSegmentBBoxTrans0",
3841 0.5*ssdendladdercablelength,
3842 0.5*fgkSSDLadderCableWidth,
3843 0.5*fgkSSDFlexHeight[0]);
3844 ladderendcablesegmentbboxtrans[1] =
3845 new TGeoTranslation("LadderEndCableSegmentBBoxTrans1",
3846 0.5*ssdendladdercablelength,
3847 0.5*fgkSSDLadderCableWidth,
3849 +0.5*fgkSSDFlexHeight[1]);
3850 TGeoVolume* ladderendcablesegmentbboxassembly =
3851 new TGeoVolumeAssembly("LadderEndCableSegmentBBoxAssembly");
3852 for(Int_t i=0; i<kladdercablesegmentnumber; i++)
3853 ladderendcablesegmentbboxassembly->AddNode(ladderendcablesegmentbbox[i],1,
3854 ladderendcablesegmentbboxtrans[i]);
3855 /////////////////////////////////////////
3856 TList* laddercablesegmentlist = new TList();
3857 laddercablesegmentlist->Add(laddercablesegmentbboxassembly);
3858 laddercablesegmentlist->Add(laddercablesegmentarbassembly);
3859 laddercablesegmentlist->Add(ladderendcablesegmentbboxassembly);
3860 return laddercablesegmentlist;
3863 /////////////////////////////////////////////////////////////////////////////////
3864 TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t ssdendladdercablelength){
3865 /////////////////////////////////////////////////////////////
3866 // Method generating Ladder Cable of given length (n modules + end)
3867 // Called by GetLadderCableAssembly
3868 /////////////////////////////////////////////////////////////
3869 TList* laddercablesegmentlist = GetLadderCableSegment(ssdendladdercablelength);
3870 TGeoVolume* laddercable = new TGeoVolumeAssembly("LadderCable");
3871 for(Int_t i=0; i<n; i++){
3872 TGeoTranslation* laddercabletrans = new TGeoTranslation(
3873 i*(fgkCarbonFiberJunctionWidth),
3874 fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
3875 i*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
3876 laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(0),i+1,laddercabletrans);
3877 if(i!=n-1) laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(1),i+1,laddercabletrans);
3880 TGeoTranslation* endladdercabletrans = new TGeoTranslation("EndLadderCableTrans",
3881 (n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
3882 fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
3883 (n-1)*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
3884 laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(2),1,endladdercabletrans);
3887 /////////////////////////////////////////////////////////////////////////////////
3888 TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t ssdendladdercablelength){
3889 ///////////////////////////////////////////////////////////////////
3890 // Main method generating Ladder Cable bundles containing n cables
3891 ///////////////////////////////////////////////////////////////////
3892 Double_t totalLength = ssdendladdercablelength+(n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0];
3893 Double_t cableOrig[3] = {0.5*totalLength,1.5*fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],0.5*n*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1])};
3894 TGeoBBox *laddercableshape = new TGeoBBox(0.5*totalLength,0.5*fgkSSDLadderCableWidth,0.5*n*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]),cableOrig);
3895 TGeoVolume* laddercable = new TGeoVolume("LadderCableMother", laddercableshape, fSSDAir);
3896 char laddercabletransname[100];
3897 for(Int_t i=0; i<n; i++){
3898 sprintf(laddercabletransname,"LadderCableTrans%i",i+1);
3899 laddercable->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1,
3900 new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0,0));
3904 /////////////////////////////////////////////////////////////////////////////////
3905 TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdendladdercablelength){
3906 /////////////////////////////////////////////////////////////
3907 // Method generating Ladder Cable List Assemblies
3908 // containing two cables bundles, i.e. P+N readout for one endcap
3909 /////////////////////////////////////////////////////////////
3910 const Int_t kladdercableassemblynumber = 2;
3911 TGeoVolume* laddercableassembly = GetLadderCableAssembly(n,ssdendladdercablelength);
3912 TGeoVolume* ladderCable[kladdercableassemblynumber];
3913 char laddercableassemblyname[100];
3914 TList* laddercableassemblylist = new TList();
3915 for(Int_t i=0; i<kladdercableassemblynumber; i++){
3916 sprintf(laddercableassemblyname,"LadderCableAssembly%i",i+1);
3917 ladderCable[i] = new TGeoVolumeAssembly(laddercableassemblyname);
3918 ladderCable[i]->AddNode(laddercableassembly,i+1,i==0 ? NULL :
3919 new TGeoCombiTrans((n-1)
3920 * fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
3921 2.*fgkSSDLadderCableWidth+0.5*fgkSSDFlexWidth[0],
3922 0.,new TGeoRotation("",180,0.,0.)));
3923 laddercableassemblylist->Add(ladderCable[i]);
3925 return laddercableassemblylist;
3927 ///////////////////////////////////////////////////////////////////////////////
3928 void AliITSv11GeometrySSD::SetLadderSegment(){
3929 /////////////////////////////////////////////////////////////
3930 // Method Generating Ladder Segment Array
3931 /////////////////////////////////////////////////////////////
3932 fladdersegment[0] = new TGeoVolumeAssembly("LadderSegment1");
3933 fladdersegment[1] = new TGeoVolumeAssembly("LadderSegment2");
3935 /* MvL: tried to create mother volume. Requires changes in all rotations, bc xtru is always along z-axis
3936 TGeoXtru *laddersegmentshape = new TGeoXtru(2);
3937 static const Int_t ntrianglevtx = 3;
3938 Double_t xtrianglevtx[ntrianglevtx]={-0.5*fgkCarbonFiberTriangleLength,fgkCarbonFiberTriangleLength, 0};
3939 Double_t ytrianglevtx[ntrianglevtx]={0, 0, fgkCarbonFiberTriangleLength * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad())};
3940 laddersegmentshape->DefinePolygon(ntrianglevtx,xtrianglevtx,ytrianglevtx);
3941 laddersegmentshape->DefineSection(0,0);
3942 laddersegmentshape->DefineSection(1,fgkCarbonFiberJunctionWidth); // MVL
3943 fladdersegment[0] = new TGeoVolume("LadderSegment1",laddersegmentshape,fSSDAir);
3944 fladdersegment[1] = new TGeoVolume("LadderSegment2",laddersegmentshape,fSSDAir);
3947 if(!fCreateMaterials) CreateMaterials();
3948 if(!fTransformationMatrices) CreateTransformationMatrices();
3949 if(!fBasicObjects) CreateBasicObjects();
3950 for(Int_t i=0; i<fgkladdersegmentnumber; i++){
3951 // Placing Carbon Fiber Support
3952 for(Int_t j=0; j<fgkcarbonfibersupportnumber; j++){
3953 fladdersegment[i]->AddNode(fcarbonfibersupport[0],j+1,
3954 fcarbonfibersupportmatrix[j]);
3955 fladdersegment[i]->AddNode(fcarbonfibersupport[1],j+1,
3956 fcarbonfibersupportmatrix[j]);
3958 // Placing Carbon Fiber Junction
3959 for(Int_t j=0; j<fgkcarbonfiberjunctionumber; j++) {
3960 fladdersegment[i]->AddNode(fcarbonfiberjunction,j+1,
3961 fcarbonfiberjunctionmatrix[j]);
3963 // Placing Carbon Fiber Lower Support
3964 for(Int_t j=0; j<fgkcarbonfiberlowersupportnumber; j++) {
3965 fladdersegment[i]->AddNode(fcarbonfiberlowersupport[j],j+1,
3966 fcarbonfiberlowersupportrans[j]);
3968 // Placing SSD Sensor Support
3969 for(Int_t j=0; j<fgkssdsensorsupportnumber; j++)
3970 fladdersegment[i]->AddNode(j<2 ? fssdsensorsupport[0][i] :
3971 fssdsensorsupport[1][i],
3972 j+1,fssdsensorsupportmatrix[j]);
3973 // Placing SSD Cooling Tube Support
3974 for(Int_t j=0; j<fgkcoolingtubesupportnumber; j++)
3975 fladdersegment[i]->AddNode(fcoolingtubesupport,j+1,
3976 fcoolingtubesupportmatrix[j]);
3977 // Placing SSD Cooling Tube
3978 fladdersegment[i]->AddNode(fcoolingtube,1,fcoolingtubematrix[0]);
3979 fladdersegment[i]->AddNode(fcoolingtube,2,fcoolingtubematrix[1]);
3980 // Placing SSD Hybrid
3983 fladdersegment[i]->AddNode(fssdhybridcomponent[0],1,fhybridmatrix);
3984 fladdersegment[i]->AddNode(fssdhybridcomponent[2],1,fhybridmatrix);
3987 fladdersegment[i]->AddNode(fssdhybridcomponent[1],1,fhybridmatrix);
3988 fladdersegment[i]->AddNode(fssdhybridcomponent[2],1,fhybridmatrix);
3991 // Placing Cooling Block System
3992 fladdersegment[i]->AddNode(fssdcoolingblocksystem,1,fcoolingblocksystematrix);
3994 for(Int_t j=0; j<fgkflexnumber; j++){
3995 fladdersegment[i]->AddNode(fssdstiffenerflex,j+1,fstiffenerflexmatrix[j]);
3996 fladdersegment[i]->AddNode(fssdendflex,j+1,fendflexmatrix[j]);
4000 ///////////////////////////////////////////////////////////////////////////////
4001 void AliITSv11GeometrySSD::SetEndLadderSegment(){
4002 /////////////////////////////////////////////////////////////
4003 // Method Generating End Ladder
4004 /////////////////////////////////////////////////////////////
4005 // End Ladder Carbon Fiber Junction
4006 /////////////////////////////////////////////////////////////
4007 fendladdersegment[0] = new TGeoVolumeAssembly("EndLadder1");
4008 fendladdersegment[1] = new TGeoVolumeAssembly("EndLadder2");
4009 if(!fCreateMaterials) CreateMaterials();
4010 if(!fTransformationMatrices) CreateTransformationMatrices();
4011 if(!fBasicObjects) CreateBasicObjects();
4012 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
4013 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
4014 fendladdersegment[i]->AddNode(j==2 ?
4015 fendladdercarbonfiberjunction[i][1] :
4016 fendladdercarbonfiberjunction[i][0],
4017 j+1,fendladdercarbonfiberjunctionmatrix[i][j]);
4019 /////////////////////////////////////////////////////////////
4020 // End Ladder Carbon Fiber Support
4021 /////////////////////////////////////////////////////////////
4022 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++)
4023 for(Int_t j=0; j<fgkendladdercarbonfibermatrixnumber; j++){
4024 fendladdersegment[i]->AddNode(fcarbonfibersupport[0],j+1,
4025 fendladdercarbonfibermatrix[i][j]);
4026 fendladdersegment[i]->AddNode(fcarbonfibersupport[1],j+1,
4027 fendladdercarbonfibermatrix[i][j]);
4029 /////////////////////////////////////////////////////////////
4030 // End Ladder Mounting Block
4031 /////////////////////////////////////////////////////////////
4032 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
4033 fendladdersegment[i]->AddNode(fendladdermountingblock,i+1,
4034 fendladdermountingblockcombitrans[i]);
4035 /////////////////////////////////////////////////////////////
4036 // End Ladder Mounting Block Clip
4037 /////////////////////////////////////////////////////////////
4038 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
4039 for(Int_t j=0; j<2; j++)
4040 fendladdersegment[i]->AddNode(fendladdermountingblockclip,j+1,
4041 fendladdermountingblockclipmatrix[i][j]);
4042 /////////////////////////////////////////////////////////////
4043 // End Ladder Lower Supports
4044 /////////////////////////////////////////////////////////////
4045 fendladdersegment[0]->AddNode(fcarbonfiberlowersupport[0],1,
4046 fendladderlowersupptrans[0]);
4047 fendladdersegment[1]->AddNode(fcarbonfiberlowersupport[0],2,
4048 fendladderlowersupptrans[1]);
4049 fendladdersegment[1]->AddNode(fcarbonfiberlowersupport[0],3,
4050 fendladderlowersupptrans[2]);
4051 /////////////////////////////////////////////////////////////
4052 // End Ladder Cooling Tube Support
4053 /////////////////////////////////////////////////////////////
4054 for(Int_t i=0; i<2; i++)
4055 for(Int_t j=0; j<(i==0?4:2); j++)
4056 fendladdersegment[i]->AddNode(fcoolingtubesupport,j+1,
4057 fendladdercoolingtubesupportmatrix[i][j]);
4058 /////////////////////////////////////////////////////////////
4059 // End Ladder Cooling Tube Support
4060 /////////////////////////////////////////////////////////////
4061 fendladdersegment[0]->AddNode(fendladdercoolingtube[0],1,fendladdercoolingtubematrix[0][0]);
4062 fendladdersegment[0]->AddNode(fendladdercoolingtube[0],2,fendladdercoolingtubematrix[0][1]);
4063 fendladdersegment[1]->AddNode(fendladdercoolingtube[1],1,fendladdercoolingtubematrix[1][0]);
4064 fendladdersegment[1]->AddNode(fendladdercoolingtube[1],2,fendladdercoolingtubematrix[1][1]);
4066 ///////////////////////////////////////////////////////////////////////////////
4067 void AliITSv11GeometrySSD::SetLadder(){
4068 /////////////////////////////////////////////////////////////
4069 // Method Generating Ladder of Layer 5 and 6
4070 /////////////////////////////////////////////////////////////
4071 Int_t ssdlaysensorsnumber[fgkladdernumber] = {fgkSSDLay5SensorsNumber,
4072 fgkSSDLay6SensorsNumber};
4073 /////////////////////////////////////////////////////////////////////////////
4074 /// Generating Ladder Mother Volume Containing Ladder
4075 /////////////////////////////////////////////////////////////////////////////
4076 TGeoXtru* laddershape[fgkladdernumber];
4077 for(Int_t i=0; i<fgkladdernumber; i++) laddershape[i] = new TGeoXtru(2);
4078 const Int_t kmothervertexnumber = 8;
4079 Double_t xmothervertex[fgkladdernumber][kmothervertexnumber];
4080 Double_t ymothervertex[fgkladdernumber][kmothervertexnumber];
4081 ///////////////////////
4082 // Setting the vertices
4083 ///////////////////////
4084 Double_t laddercablethickness = (fgkSSDLay6SensorsNumber+2)
4085 * (fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]);
4086 xmothervertex[0][0] = -0.5*fgkSSDSensorWidth;
4087 ymothervertex[0][0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor;
4088 xmothervertex[0][1] = xmothervertex[0][0];
4089 ymothervertex[0][1] = 0.0;
4090 xmothervertex[0][2] = - 0.5*fgkSSDModuleSensorSupportDistance-2.*fgkCoolingTubeSupportRmax
4091 - laddercablethickness/SinD(2.*fgkSSDFlexAngle);
4092 ymothervertex[0][2] = ymothervertex[0][1];
4093 ymothervertex[0][3] = 0.5*fgkCarbonFiberTriangleLength*TanD(2.*fgkSSDFlexAngle);
4094 xmothervertex[0][3] = xmothervertex[0][2]+ymothervertex[0][3]/TanD(2.*fgkSSDFlexAngle);
4095 xmothervertex[0][4] = -xmothervertex[0][3];
4096 ymothervertex[0][4] = ymothervertex[0][3];
4097 xmothervertex[0][5] = -xmothervertex[0][2];
4098 ymothervertex[0][5] = ymothervertex[0][2];
4099 xmothervertex[0][6] = -xmothervertex[0][1];
4100 ymothervertex[0][6] = ymothervertex[0][1];
4101 xmothervertex[0][7] = -xmothervertex[0][0];
4102 ymothervertex[0][7] = ymothervertex[0][0];
4103 for(Int_t i=0; i<kmothervertexnumber; i++){
4104 xmothervertex[1][i] = xmothervertex[0][i];
4105 ymothervertex[1][i] = ymothervertex[0][i];
4107 ///////////////////////////////////////////////////////////////////////////
4108 // Disalignement Mother Volume corrections 25/08/08
4109 ///////////////////////////////////////////////////////////////////////////
4110 TGeoXtru* leftladdershape1[fgkladdernumber];
4111 TGeoXtru* leftladdershape2[fgkladdernumber];
4112 TGeoXtru* centersensorladdershape[fgkladdernumber];
4113 TGeoXtru* rightladdershape1[fgkladdernumber];
4114 TGeoXtru* rightladdershape2[fgkladdernumber];
4115 for(Int_t i=0; i<fgkladdernumber; i++){
4116 leftladdershape1[i] = new TGeoXtru(2);
4117 leftladdershape2[i] = new TGeoXtru(2);
4118 centersensorladdershape[i] = new TGeoXtru(2);
4119 rightladdershape1[i] = new TGeoXtru(2);
4120 rightladdershape2[i] = new TGeoXtru(2);
4122 //////////////////////////////////////
4123 // Setting the names for shapes
4124 //////////////////////////////////////
4125 leftladdershape1[0]->SetName("Lay5Left1LadderSegmentContainer");
4126 leftladdershape2[0]->SetName("Lay5Left2LadderSegmentContainer");
4127 leftladdershape1[1]->SetName("Lay6Left1LadderSegmentContainer");
4128 leftladdershape2[1]->SetName("Lay6Left2LadderSegmentContainer");
4129 centersensorladdershape[0]->SetName("Lay5CenterSensorContainer");
4130 centersensorladdershape[1]->SetName("Lay6CenterSensorContainer");
4131 rightladdershape1[0]->SetName("Lay5Right1LadderSegmentContainer");
4132 rightladdershape2[0]->SetName("Lay5Right2LadderSegmentContainer");
4133 rightladdershape1[1]->SetName("Lay6Right1LadderSegmentContainer");
4134 rightladdershape2[1]->SetName("Lay6Right2LadderSegmentContainer");
4135 //////////////////////////////////////
4136 Double_t xend1laddervertex[fgkladdernumber][kmothervertexnumber];
4137 Double_t yend1laddervertex[fgkladdernumber][kmothervertexnumber];
4138 Double_t xcentersensorvertex[fgkladdernumber][kmothervertexnumber];
4139 Double_t ycentersensorvertex[fgkladdernumber][kmothervertexnumber];
4140 Double_t xend2laddervertex[fgkladdernumber][kmothervertexnumber];
4141 Double_t yend2laddervertex[fgkladdernumber][kmothervertexnumber];
4142 for(Int_t i=0; i<fgkladdernumber; i++) {
4143 for(Int_t j=0; j<kmothervertexnumber; j++){
4144 xcentersensorvertex[i][j] = xmothervertex[i][j];
4145 ycentersensorvertex[i][j] = ymothervertex[i][j];
4146 xend1laddervertex[i][j] = xmothervertex[i][j];
4147 yend1laddervertex[i][j] = ymothervertex[i][j];
4148 xend2laddervertex[i][j] = xmothervertex[i][j];
4149 yend2laddervertex[i][j] = ymothervertex[i][j];
4151 // Add some space around sensors to accommodate misalignments
4152 xcentersensorvertex[i][0] -= fgkSSDModuleSideDisalignment;
4153 xcentersensorvertex[i][1] = xcentersensorvertex[0][0];
4154 xcentersensorvertex[i][6] = -xcentersensorvertex[0][1];
4155 xcentersensorvertex[i][7] = -xcentersensorvertex[0][0];
4157 ycentersensorvertex[i][0] -= fgkSSDModuleVerticalDisalignment;
4158 ycentersensorvertex[i][7] = ycentersensorvertex[0][0];
4160 // Center Ladder Piece
4161 centersensorladdershape[i]->DefinePolygon(kmothervertexnumber,xcentersensorvertex[i],
4162 ycentersensorvertex[i]);
4163 centersensorladdershape[i]->DefineSection(0, - fgkEndLadderCarbonFiberLowerJunctionLength[1]
4164 + 1.45*fgkSSDMountingBlockWidth);
4165 centersensorladdershape[i]->DefineSection(1, ssdlaysensorsnumber[i] * fgkCarbonFiberJunctionWidth
4166 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
4167 - 2.4*fgkSSDMountingBlockWidth);
4169 // Left and Right Ladder Pieces: Mother volumes around ladder mounting areas
4171 // Cuts off first corner (neg x)
4172 xend1laddervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
4173 xend1laddervertex[i][1] = -0.5*fgkSSDMountingBlockLength[0];
4174 // Cuts off last part (pos x)
4175 xend2laddervertex[i][6] = 0.5*fgkSSDMountingBlockLength[0];
4176 xend2laddervertex[i][7] = 0.5*fgkSSDMountingBlockLength[0];
4178 leftladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i],
4179 yend1laddervertex[i]);
4180 leftladdershape1[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
4181 leftladdershape1[i]->DefineSection(1, fendladdersegmentmatrix[0][i]->GetTranslation()[2]
4182 - fgkEndLadderMountingBlockPosition[0]);
4184 leftladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i],
4185 yend2laddervertex[i]);
4186 leftladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[0][i]->GetTranslation()[2]
4187 - fgkEndLadderMountingBlockPosition[0]);
4188 leftladdershape2[i]->DefineSection(1,- fgkEndLadderCarbonFiberLowerJunctionLength[1]
4189 + 1.45*fgkSSDMountingBlockWidth); // connect to main volume at -1.6725 cm
4191 rightladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i],
4192 yend1laddervertex[i]);
4193 rightladdershape1[i]->DefineSection(0,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
4194 +fgkEndLadderCarbonFiberLowerJunctionLength[0]
4195 -2.4*fgkSSDMountingBlockWidth);
4196 rightladdershape1[i]->DefineSection(1,fendladdersegmentmatrix[1][i]->GetTranslation()[2]
4197 + fgkEndLadderMountingBlockPosition[1]);
4199 rightladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i],
4200 yend2laddervertex[i]);
4201 rightladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[1][i]->GetTranslation()[2]
4202 + fgkEndLadderMountingBlockPosition[1]);
4203 rightladdershape2[i]->DefineSection(1, ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
4204 + fgkEndLadderCarbonFiberLowerJunctionLength[0]);
4206 TGeoCompositeShape* laddershapecontainer[2];
4207 laddershapecontainer[0] = new TGeoCompositeShape("Lay5LadderCompositeShape",
4208 "Lay5Left1LadderSegmentContainer+Lay5Left2LadderSegmentContainer"
4209 "+Lay5CenterSensorContainer"
4210 "+Lay5Right1LadderSegmentContainer+Lay5Right2LadderSegmentContainer");
4211 laddershapecontainer[1] = new TGeoCompositeShape("Lay6LadderCompositeShape",
4212 "Lay6Left1LadderSegmentContainer+Lay6Left2LadderSegmentContainer"
4213 "+Lay6CenterSensorContainer"
4214 "+Lay6Right1LadderSegmentContainer+Lay6Right2LadderSegmentContainer");
4215 const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
4216 for(Int_t i=0; i<fgkladdernumber; i++){
4217 fladder[i] = new TGeoVolume(laddername[i],laddershapecontainer[i],fSSDAir);
4218 fladder[i]->SetLineColor(4);
4220 ///////////////////////////////////////////////////////////////////////////
4221 if(!fCreateMaterials) CreateMaterials();
4222 if(!fTransformationMatrices) CreateTransformationMatrices();
4223 if(!fBasicObjects) CreateBasicObjects();
4225 SetEndLadderSegment();
4226 for(Int_t i=0; i<fgkladdernumber; i++){
4227 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
4228 //////////////////////////
4229 /// Placing Ladder Segment
4230 //////////////////////////
4231 fladder[i]->AddNode(j%2==0 ? fladdersegment[i==0 ? 0 : 1] :
4232 fladdersegment[i==0 ? 1 : 0],
4233 ssdlaysensorsnumber[i]-j-1,fladdermatrix[i][j]);
4234 //////////////////////////
4235 /// Placing SSD Sensor
4236 //////////////////////////
4237 if(i==0&&ssdlaysensorsnumber[i]-j-1==13) fSSDSensor5->SetLineColor(kRed);
4238 fladder[i]->AddNode(i==0?fSSDSensor5:fSSDSensor6,ssdlaysensorsnumber[i]-j-1,
4239 fssdsensormatrix[i][j]);
4241 ///////////////////////////////
4242 /// Placing End Ladder Segment
4243 ///////////////////////////////
4244 fladder[i]->AddNode(fendladdersegment[0],1,fendladdersegmentmatrix[0][i]);
4245 fladder[i]->AddNode(fendladdersegment[1],1,fendladdersegmentmatrix[1][i]);
4247 /////////////////////////////////////////////////////////////////////////////
4248 /// Placing Ladder Cables
4249 /////////////////////////////////////////////////////////////////////////////
4250 Int_t sidecablenumber[2][2];
4251 sidecablenumber[0][0] = fgkSSDLay5SensorsNumber/2+1;
4252 sidecablenumber[0][1] = sidecablenumber[0][0]-2;
4253 sidecablenumber[1][0] = (fgkSSDLay6SensorsNumber-1)/2+1;
4254 sidecablenumber[1][1] = sidecablenumber[1][0]-1;
4255 Double_t carbonfibertomoduleposition[3];
4256 carbonfibertomoduleposition[0] = -0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength);
4257 carbonfibertomoduleposition[1] = - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
4258 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
4259 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
4260 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
4261 - fgkSSDSensorCenterSupportThickness[0]);
4262 carbonfibertomoduleposition[2] = - (fgkSSDModuleCoolingBlockToSensor
4263 + 0.5*fgkCoolingTubeSupportHeight
4264 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight);
4265 const Double_t kendladdercablecorrection = 1.72*fgkmm; //this has to be tuned
4266 Double_t ssdendladdercablelength[4];
4267 ssdendladdercablelength[0] = carbonfibertomoduleposition[1]
4268 + fgkSSDSensorLength
4269 - fgkSSDModuleStiffenerPosition[1]
4270 - fgkSSDStiffenerWidth
4271 - fgkSSDFlexWidth[0]
4272 + fgkEndLadderCarbonFiberLowerJunctionLength[1]-0.000001*kendladdercablecorrection;
4273 ssdendladdercablelength[1] = carbonfibertomoduleposition[1]
4274 + fgkSSDModuleStiffenerPosition[1]
4275 + fgkSSDStiffenerWidth
4276 + fgkEndLadderCarbonFiberLowerJunctionLength[1]-0.000001*kendladdercablecorrection;
4277 ssdendladdercablelength[2] = ssdendladdercablelength[1]
4278 - fgkEndLadderCarbonFiberLowerJunctionLength[1]
4279 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
4280 - kendladdercablecorrection;
4281 ssdendladdercablelength[3] = fgkCarbonFiberJunctionWidth-(fgkSSDSensorLength
4282 + carbonfibertomoduleposition[1]
4283 - fgkSSDModuleStiffenerPosition[1]
4284 - fgkSSDStiffenerWidth)
4285 + fgkEndLadderCarbonFiberLowerJunctionLength[0]-0.000001*kendladdercablecorrection;
4286 TList* laddercableassemblylist[4];
4287 const Int_t kendladdercablesnumber = 4;
4288 TGeoRotation *laddercablerot = new TGeoRotation();
4289 laddercablerot->SetAngles(90.,60.,-90.);
4290 for(Int_t i=0; i<fgkladdercablesnumber; i++)
4291 for(Int_t j=0; j<kendladdercablesnumber; j++){
4292 laddercableassemblylist[j] =
4293 GetLadderCableAssemblyList(sidecablenumber[i][j<2?0:1],
4294 ssdendladdercablelength[j]);
4295 fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1),
4296 j<2?1:2,fladdercablematrix[i][j]);
4299 ////////////////////////////////////////////////////////////////////////////////
4300 void AliITSv11GeometrySSD::SetLayer(){
4301 ////////////////////////////////////////////////////////////////////////////////
4302 // Creating Ladder of Layer 5 and Layer 6
4303 /////////////////////////////////////////////////////////////
4304 if(!fCreateMaterials) CreateMaterials();
4305 if(!fTransformationMatrices) CreateTransformationMatrices();
4306 if(!fBasicObjects) CreateBasicObjects();
4307 SetLadder(); // Generating the ladder of Layer5 and Layer6
4308 const Int_t kssdlayladdernumber[fgklayernumber] =
4309 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
4310 /////////////////////////////////////////////////////////////
4311 // Generating mother volumes for Layer5 and Layer6
4312 /////////////////////////////////////////////////////////////
4313 fSSDLayer5 = new TGeoVolumeAssembly("ITSssdLayer5");
4314 fSSDLayer6 = new TGeoVolumeAssembly("ITSssdLayer6");
4315 Int_t *ladderindex[fgklayernumber];
4316 Int_t index[fgklayernumber] = {8,9};
4317 for(Int_t i=0; i<fgklayernumber; i++) ladderindex[i] = new Int_t[kssdlayladdernumber[i]];
4318 for(Int_t i=0; i<fgklayernumber; i++)
4319 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
4320 ladderindex[i][j] = ((j>=0)&&(j<=kssdlayladdernumber[i]-index[i]-1)) ?
4321 j+index[i] : j+index[i]-kssdlayladdernumber[i];
4322 i ==0 ? fSSDLayer5->AddNode(fladder[0],ladderindex[i][j],flayermatrix[i][j]) :
4323 fSSDLayer6->AddNode(fladder[1],ladderindex[i][j],flayermatrix[i][j]);
4325 /////////////////////////////////////////////////////////////
4326 // Deallocating memory
4327 /////////////////////////////////////////////////////////////
4328 for(Int_t i=0; i<fgklayernumber; i++) delete [] ladderindex[i];
4330 ////////////////////////////////////////////////////////////////////////////////
4331 void AliITSv11GeometrySSD::Layer5(TGeoVolume* moth){
4332 /////////////////////////////////////////////////////////////
4333 // Insert the layer 5 in the mother volume.
4334 /////////////////////////////////////////////////////////////
4336 AliError("Can't insert layer5, mother is null!\n");
4339 if(!fSSDLayer5) SetLayer();
4341 TGeoTranslation* centerITSlayer5trans = new TGeoTranslation(0.,0.,-0.5*fgkSSDLay5LadderLength
4342 + fgkLay5CenterITSPosition);
4343 moth->AddNode(fSSDLayer5,1,centerITSlayer5trans);
4345 ////////////////////////////////////////////////////////////////////////////////
4346 void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
4347 /////////////////////////////////////////////////////////////
4348 // Insert the layer 6 in the mother volume.
4349 /////////////////////////////////////////////////////////////
4351 AliError("AliITSv11GeometrySSD: Can't insert layer6, mother is null!\n");
4354 if(!fSSDLayer6) SetLayer();
4356 TGeoTranslation* centerITSlayer6trans = new TGeoTranslation(0.,0.,-0.5*fgkSSDLay6LadderLength
4357 + fgkLay6CenterITSPosition);
4358 moth->AddNode(fSSDLayer6,1,centerITSlayer6trans);
4360 ////////////////////////////////////////////////////////////////////////////////
4361 TList* AliITSv11GeometrySSD::GetMountingBlockSupport(Int_t nedges){
4362 /////////////////////////////////////////////////////////////
4363 // Method generating the Arc structure of Ladder Support
4364 /////////////////////////////////////////////////////////////
4365 const Int_t kssdlayladdernumber[fgklayernumber] =
4366 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
4367 Double_t mountingsupportedge[fgklayernumber];
4368 Double_t mountingblockratio[fgklayernumber];
4369 Double_t theta[fgklayernumber];
4370 Double_t phi[fgklayernumber];
4371 Double_t psi0[fgklayernumber];
4372 Double_t deltapsi[fgklayernumber];
4373 TVector3* mountingsupportedgevector[fgklayernumber];
4374 for(Int_t i=0; i<fgklayernumber; i++){
4375 mountingblockratio[i] = fgkSSDMountingBlockLength[0]/fgkMountingBlockSupportRadius[i];
4376 mountingsupportedge[i] = 0.5*fgkMountingBlockSupportRadius[i]
4377 * (TMath::Sqrt((2.-mountingblockratio[i])*(2.+mountingblockratio[i]))
4378 * TMath::Sin(2.0*TMath::Pi()/kssdlayladdernumber[i])
4379 - mountingblockratio[i]*(1.0+TMath::Cos(2.0*TMath::Pi()
4380 / kssdlayladdernumber[i])));
4381 theta[i] = TMath::ASin(0.5*mountingblockratio[i]+mountingsupportedge[i]/fgkMountingBlockSupportRadius[i]);
4382 phi[i] = TMath::ASin(0.5*mountingblockratio[i]);
4383 mountingsupportedgevector[i] = new TVector3();
4384 mountingsupportedgevector[i]->SetX(-0.5*fgkSSDMountingBlockLength[0]);
4385 mountingsupportedgevector[i]->SetY(fgkMountingBlockSupportRadius[i]*TMath::Sqrt(
4386 (1.-mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])*
4387 (1.+mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])));
4388 psi0[i] = 0.5*TMath::Pi()-phi[i];
4389 deltapsi[i] = (theta[i]+phi[i])/nedges;
4391 TVector3** vertex[fgklayernumber];
4392 TList* vertexlist[fgklayernumber];
4393 Int_t indexedge[fgklayernumber] = {0,0};
4394 for(Int_t i=0; i<fgklayernumber; i++){
4395 vertex[i] = new TVector3*[nedges+1];
4396 vertexlist[i] = new TList();
4398 for(Int_t i=0; i<fgklayernumber; i++){
4399 for(Int_t j=0; j<nedges+1; j++){
4400 vertex[i][j] = new TVector3(fgkMountingBlockSupportRadius[i]*TMath::Cos(psi0[i]+j*deltapsi[i]),
4401 fgkMountingBlockSupportRadius[i]*TMath::Sin(psi0[i]+j*deltapsi[i]));
4402 if(vertex[i][j]->X()>mountingsupportedgevector[i]->X()) indexedge[i]++;
4403 vertexlist[i]->Add(vertex[i][j]);
4405 vertexlist[i]->AddAt(mountingsupportedgevector[i],indexedge[i]);
4407 Double_t** xsidevertex = new Double_t*[fgklayernumber];
4408 Double_t** ysidevertex = new Double_t*[fgklayernumber];
4409 Double_t** xcentervertex = new Double_t*[fgklayernumber];
4410 Double_t** ycentervertex = new Double_t*[fgklayernumber];
4411 Double_t** xsidelowervertex = new Double_t*[fgklayernumber];
4412 Double_t** ysidelowervertex = new Double_t*[fgklayernumber];
4413 Double_t** xcenterlowervertex = new Double_t*[fgklayernumber];
4414 Double_t** ycenterlowervertex = new Double_t*[fgklayernumber];
4415 for(Int_t i=0; i<fgklayernumber; i++){
4416 xsidevertex[i] = new Double_t[vertexlist[i]->GetSize()+2];
4417 ysidevertex[i] = new Double_t[vertexlist[i]->GetSize()+2];
4418 xcentervertex[i] = new Double_t[indexedge[i]+3];
4419 ycentervertex[i] = new Double_t[indexedge[i]+3];
4420 xsidelowervertex[i] = new Double_t[vertexlist[i]->GetSize()+1];
4421 ysidelowervertex[i] = new Double_t[vertexlist[i]->GetSize()+1];
4422 xcenterlowervertex[i] = new Double_t[indexedge[i]+3];
4423 ycenterlowervertex[i] = new Double_t[indexedge[i]+3];
4424 for(Int_t j=0; j<vertexlist[i]->GetSize(); j++){
4425 xsidevertex[i][j!=vertexlist[i]->GetSize()-1?j+3:0] =
4426 ((TVector3*)vertexlist[i]->At(j))->X();
4427 ysidevertex[i][j!=vertexlist[i]->GetSize()-1?j+3:0] =
4428 ((TVector3*)vertexlist[i]->At(j))->Y();
4429 xsidelowervertex[i][j] = ((TVector3*)vertexlist[i]->At(vertexlist[i]->GetSize()-1-j))->X();
4430 ysidelowervertex[i][j] = ((TVector3*)vertexlist[i]->At(vertexlist[i]->GetSize()-1-j))->Y();
4431 if(j<indexedge[i]+1){
4432 xcentervertex[i][j!=indexedge[i]?j+3:0] =
4433 ((TVector3*)vertexlist[i]->At(j))->X();
4434 ycentervertex[i][j!=indexedge[i]?j+3:0] =
4435 ((TVector3*)vertexlist[i]->At(j))->Y();
4436 xcenterlowervertex[i][j+1] = ((TVector3*)vertexlist[i]->At(indexedge[i]-j))->X();
4437 ycenterlowervertex[i][j+1] = ((TVector3*)vertexlist[i]->At(indexedge[i]-j))->Y();
4440 xsidevertex[i][1] = xsidevertex[i][0];
4441 ysidevertex[i][1] = fgkMountingBlockSupportRadius[i];
4442 xsidevertex[i][2] = xsidevertex[i][3];
4443 ysidevertex[i][2] = fgkMountingBlockSupportRadius[i];
4444 xcentervertex[i][1] = xcentervertex[i][0];
4445 ycentervertex[i][1] = fgkMountingBlockSupportRadius[i];
4446 xcentervertex[i][2] = xcentervertex[i][3];
4447 ycentervertex[i][2] = fgkMountingBlockSupportRadius[i];
4448 xsidelowervertex[i][vertexlist[i]->GetSize()] = xsidelowervertex[i][vertexlist[i]->GetSize()-1];
4449 ysidelowervertex[i][vertexlist[i]->GetSize()] = ysidelowervertex[i][0];
4450 xcenterlowervertex[i][0] = xcenterlowervertex[i][1];
4451 ycenterlowervertex[i][0] = ysidevertex[i][0];
4452 xcenterlowervertex[i][indexedge[i]+2] = xsidelowervertex[i][vertexlist[i]->GetSize()];
4453 ycenterlowervertex[i][indexedge[i]+2] = ycenterlowervertex[i][0];
4455 /////////////////////////////////////////////////////////////
4456 // Building the Arc Structure of Ladder Supports
4457 /////////////////////////////////////////////////////////////
4458 TGeoXtru* sidemountingblocksupportshape[fgklayernumber];
4459 TGeoXtru* centermountingsupportshape[fgklayernumber];
4460 TGeoXtru* sideladdersupportpieceshape[fgklayernumber];
4461 TGeoXtru* centerladdersupportpieceshape[fgklayernumber];
4462 TGeoVolume* sidemountingblocksupport[fgklayernumber];
4463 TGeoVolume* centermountingblocksupport[fgklayernumber];
4464 TGeoVolume* sideladdersupportpiece[fgklayernumber];
4465 TGeoVolume* centerladdersupportpiece[fgklayernumber];
4466 char sidemountingblockname[100];
4467 char centermountingblockname[100];
4468 char sideladdersupportpiecename[100];
4469 char centerladdersupportpiecename[100];
4470 for(Int_t i=0; i<fgklayernumber; i++){
4471 sprintf(sidemountingblockname,"MountingBlockSupportSideLay%dArc",i+5);
4472 sprintf(centermountingblockname,"MountingBlockSupportCenterLay%dArc",i+5);
4473 sprintf(sideladdersupportpiecename,"SideLadderSupportPieceLay%d",i+5);
4474 sprintf(centerladdersupportpiecename,"CenterLadderSupportPieceLay%d",i+5);
4475 sidemountingblocksupportshape[i] = new TGeoXtru(2);
4476 sidemountingblocksupportshape[i]->DefinePolygon(vertexlist[i]->GetSize()+2,
4477 xsidevertex[i],ysidevertex[i]);
4478 sidemountingblocksupportshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4479 -fgkMountingBlockSupportWidth[0]);
4480 sidemountingblocksupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4481 sidemountingblocksupport[i] = new TGeoVolume(sidemountingblockname,
4482 sidemountingblocksupportshape[i],
4483 fSSDAlCoolBlockMedium);
4484 sidemountingblocksupport[i]->SetLineColor(9);
4485 centermountingsupportshape[i] = new TGeoXtru(2);
4486 centermountingsupportshape[i]->DefinePolygon(indexedge[i]+3,
4487 xcentervertex[i],ycentervertex[i]);
4488 centermountingsupportshape[i]->DefineSection(0,0.);
4489 centermountingsupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]
4490 -fgkMountingBlockSupportWidth[0]);
4492 centermountingblocksupport[i] = new TGeoVolume(centermountingblockname,
4493 centermountingsupportshape[i],
4494 fSSDAlCoolBlockMedium);
4495 centermountingblocksupport[i]->SetLineColor(9);
4496 sideladdersupportpieceshape[i] = new TGeoXtru(2);
4497 sideladdersupportpieceshape[i]->DefinePolygon(vertexlist[i]->GetSize()+1,
4498 xsidelowervertex[i],ysidelowervertex[i]);
4499 sideladdersupportpieceshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4500 -fgkMountingBlockSupportWidth[0]);
4501 sideladdersupportpieceshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4502 sideladdersupportpiece[i] = new TGeoVolume(sideladdersupportpiecename,
4503 sideladdersupportpieceshape[i],
4504 fSSDCarbonFiberMedium);
4505 sideladdersupportpiece[i]->SetLineColor(fColorAl);
4506 centerladdersupportpieceshape[i] = new TGeoXtru(2);
4507 centerladdersupportpieceshape[i]->DefinePolygon(indexedge[i]+3,
4508 xcenterlowervertex[i],ycenterlowervertex[i]);
4509 centerladdersupportpieceshape[i]->DefineSection(0,0.0);
4510 centerladdersupportpieceshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]
4511 -fgkMountingBlockSupportWidth[0]);
4512 centerladdersupportpiece[i] = new TGeoVolume(centerladdersupportpiecename,
4513 centerladdersupportpieceshape[i],
4514 fSSDCarbonFiberMedium);
4515 centerladdersupportpiece[i]->SetLineColor(fColorAl);
4517 /////////////////////////////////////////////////////////////
4518 // Building the Up Structure of Ladder Supports
4519 /////////////////////////////////////////////////////////////
4520 TGeoBBox** mountingblocksupportboxupshape[fgklayernumber];
4521 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxupshape[i] = new TGeoBBox*[2];
4522 TGeoBBox** mountingblocksupportboxdownshape[fgklayernumber];
4523 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxdownshape[i] = new TGeoBBox*[2];
4524 TGeoVolume** mountingblocksupportboxdown[fgklayernumber];
4525 //////////////////////////////////////////////////////////
4526 // Setting the volume for TGeoXtru Mounting Block Piece
4527 //////////////////////////////////////////////////////////
4528 TGeoVolume** mountingblocksupportboxup[fgklayernumber];
4529 TGeoXtru* mountingblockpiecedownshape[fgklayernumber];
4530 TGeoVolume* mountingblockpiecedown[fgklayernumber];
4531 TGeoXtru* mountingblockpieceupshape[fgklayernumber];
4532 TGeoVolume* mountingblockpieceup[fgklayernumber];
4533 Double_t mountingblockpieceupxvertex[fgklayernumber][8];
4534 Double_t mountingblockpieceupyvertex[fgklayernumber][8];
4535 Double_t mountingblockpiecedownxvertex[fgklayernumber][8];
4536 Double_t mountingblockpiecedownyvertex[fgklayernumber][8];
4537 char mountingblockpiecedownname[100];
4538 char mountingblockpieceupname[100];
4539 for(Int_t i=0; i<fgklayernumber; i++){
4540 ///////////////////////////
4541 // Mounting Block Down Vertex
4542 ///////////////////////////
4543 mountingblockpiecedownshape[i] = new TGeoXtru(2);
4544 sprintf(mountingblockpiecedownname,"MountingBlockPieceDownLay%d",i+5);
4545 mountingblockpiecedownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
4546 mountingblockpiecedownyvertex[i][0] = fgkMountingBlockSupportRadius[i]
4547 + fgkMountingBlockSupportDownHeight
4548 - fgkSSDLadderVerticalDisalignment;
4549 mountingblockpiecedownxvertex[i][1] = mountingblockpiecedownxvertex[i][0];
4550 mountingblockpiecedownyvertex[i][1] = mountingblockpiecedownyvertex[i][0]
4551 + fgkSSDMountingBlockHeight[1]
4552 - 0.5*fgkCoolingTubeSupportHeight
4553 - fgkSSDModuleCoolingBlockToSensor;
4554 mountingblockpiecedownxvertex[i][2] = 0.5*fgkSSDMountingBlockLength[0];
4555 mountingblockpiecedownyvertex[i][2] = mountingblockpiecedownyvertex[i][1];
4556 mountingblockpiecedownxvertex[i][3] = mountingblockpiecedownxvertex[i][2];
4557 mountingblockpiecedownyvertex[i][3] = mountingblockpiecedownyvertex[i][0];
4558 mountingblockpiecedownxvertex[i][4] = 0.5*fgkSSDMountingBlockLength[1];
4559 mountingblockpiecedownyvertex[i][4] = mountingblockpiecedownyvertex[i][0];
4560 mountingblockpiecedownxvertex[i][5] = mountingblockpiecedownxvertex[i][4];
4561 mountingblockpiecedownyvertex[i][5] = mountingblockpiecedownyvertex[i][4]
4562 + fgkSSDMountingBlockHeight[2]
4563 - fgkSSDMountingBlockHeight[0];
4564 mountingblockpiecedownxvertex[i][6] = -mountingblockpiecedownxvertex[i][4];
4565 mountingblockpiecedownyvertex[i][6] = mountingblockpiecedownyvertex[i][5];
4566 mountingblockpiecedownxvertex[i][7] = mountingblockpiecedownxvertex[i][6];
4567 mountingblockpiecedownyvertex[i][7] = mountingblockpiecedownyvertex[i][0];
4568 mountingblockpiecedownshape[i]->DefinePolygon(8,mountingblockpiecedownxvertex[i],
4569 mountingblockpiecedownyvertex[i]);
4570 mountingblockpiecedownshape[i]->DefineSection(0,0.0);
4571 mountingblockpiecedownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4572 mountingblockpiecedown[i] = new TGeoVolume(mountingblockpiecedownname,
4573 mountingblockpiecedownshape[i],fSSDMountingBlockMedium);
4574 mountingblockpiecedown[i]->SetLineColor(fColorG10);
4576 ///////////////////////////
4577 // Mounting Block Up Vertex
4578 ///////////////////////////
4579 mountingblockpieceupshape[i] = new TGeoXtru(2);
4580 sprintf(mountingblockpieceupname,"MountingBlockPieceUpLay%d",i+5);
4581 mountingblockpieceupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
4582 mountingblockpieceupyvertex[i][0] = fgkMountingBlockSupportRadius[i]
4583 + fgkMountingBlockSupportUpHeight[i]
4584 - fgkSSDLadderVerticalDisalignment;
4585 mountingblockpieceupxvertex[i][1] = mountingblockpieceupxvertex[i][0];
4586 mountingblockpieceupyvertex[i][1] = mountingblockpieceupyvertex[i][0]
4587 + fgkSSDMountingBlockHeight[1]
4588 - 0.5*fgkCoolingTubeSupportHeight
4589 - fgkSSDModuleCoolingBlockToSensor;
4590 mountingblockpieceupxvertex[i][2] = 0.5*fgkSSDMountingBlockLength[0];
4591 mountingblockpieceupyvertex[i][2] = mountingblockpieceupyvertex[i][1];
4592 mountingblockpieceupxvertex[i][3] = mountingblockpieceupxvertex[i][2];
4593 mountingblockpieceupyvertex[i][3] = mountingblockpieceupyvertex[i][0];
4594 mountingblockpieceupxvertex[i][4] = 0.5*fgkSSDMountingBlockLength[1];
4595 mountingblockpieceupyvertex[i][4] = mountingblockpieceupyvertex[i][0];
4596 mountingblockpieceupxvertex[i][5] = mountingblockpieceupxvertex[i][4];
4597 mountingblockpieceupyvertex[i][5] = mountingblockpieceupyvertex[i][4]
4598 + fgkSSDMountingBlockHeight[2]
4599 - fgkSSDMountingBlockHeight[0];
4600 mountingblockpieceupxvertex[i][6] = -mountingblockpieceupxvertex[i][4];
4601 mountingblockpieceupyvertex[i][6] = mountingblockpieceupyvertex[i][5];
4602 mountingblockpieceupxvertex[i][7] = mountingblockpieceupxvertex[i][6];
4603 mountingblockpieceupyvertex[i][7] = mountingblockpieceupyvertex[i][0];
4605 mountingblockpieceupshape[i]->DefinePolygon(8,mountingblockpieceupxvertex[i],
4606 mountingblockpieceupyvertex[i]);
4607 mountingblockpieceupshape[i]->DefineSection(0,0.0);
4608 mountingblockpieceupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4609 mountingblockpieceup[i] = new TGeoVolume(mountingblockpieceupname,
4610 mountingblockpieceupshape[i],fSSDMountingBlockMedium);
4611 mountingblockpieceup[i]->SetLineColor(fColorG10);
4613 ///////////////////////////////////////////////////////////////////
4614 // Setting the volume for TGeoXtru Mounting Block Support Trapezoid
4615 ///////////////////////////////////////////////////////////////////
4616 TGeoXtru* mountingblocksupportrapezoidownshape[fgklayernumber];
4617 TGeoXtru* mountingblocksupportrapezoidupshape[fgklayernumber];
4618 TGeoVolume* mountingblocksupportrapezoidown[fgklayernumber];
4619 TGeoVolume* mountingblocksupportrapezoidup[fgklayernumber];
4620 Double_t mountingblocksupportrapezoidownxvertex[fgklayernumber][5];
4621 Double_t mountingblocksupportrapezoidownyvertex[fgklayernumber][5];
4622 Double_t mountingblocksupportrapezoidupxvertex[fgklayernumber][5];
4623 Double_t mountingblocksupportrapezoidupyvertex[fgklayernumber][5];
4624 char mountingblocksupportrapezoidowname[100];
4625 char mountingblocksupportrapezoidupname[100];
4626 Double_t scalefactor = 3./4.;
4627 for(Int_t i=0; i<fgklayernumber; i++){
4628 ////////////////////////////////////////////
4629 // Mounting Block Support Down Trapezoid Vertex
4630 ////////////////////////////////////////////
4631 mountingblocksupportrapezoidownshape[i] = new TGeoXtru(2);
4632 mountingblocksupportrapezoidownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
4633 - mountingsupportedge[i];
4634 mountingblocksupportrapezoidownyvertex[i][0] = mountingblockpiecedownyvertex[i][0];
4635 mountingblocksupportrapezoidownxvertex[i][1] =
4636 mountingblocksupportrapezoidownxvertex[i][0];
4637 mountingblocksupportrapezoidownyvertex[i][1] = mountingblockpiecedownyvertex[i][0]
4638 + scalefactor*(mountingblockpiecedownyvertex[i][1]
4639 - mountingblockpiecedownyvertex[i][0]);
4640 mountingblocksupportrapezoidownxvertex[i][2] = -0.5*fgkSSDSensorWidth;
4641 mountingblocksupportrapezoidownyvertex[i][2] = mountingblockpiecedownyvertex[i][1];
4642 mountingblocksupportrapezoidownxvertex[i][3] = mountingblockpiecedownxvertex[i][0];
4643 mountingblocksupportrapezoidownyvertex[i][3] = mountingblocksupportrapezoidownyvertex[i][2];
4644 mountingblocksupportrapezoidownxvertex[i][4] = mountingblocksupportrapezoidownxvertex[i][3];
4645 mountingblocksupportrapezoidownyvertex[i][4] = mountingblocksupportrapezoidownyvertex[i][0];
4647 mountingblocksupportrapezoidownshape[i]->DefinePolygon(5,mountingblocksupportrapezoidownxvertex[i],
4648 mountingblocksupportrapezoidownyvertex[i]);
4649 mountingblocksupportrapezoidownshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4650 -fgkMountingBlockSupportWidth[0]);
4651 mountingblocksupportrapezoidownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4652 sprintf(mountingblocksupportrapezoidowname,"MountingBlockSuppTrapezoidDownLay%d",i+5);
4653 mountingblocksupportrapezoidown[i] = new TGeoVolume(mountingblocksupportrapezoidowname,
4654 mountingblocksupportrapezoidownshape[i],fSSDCarbonFiberMedium);
4655 mountingblocksupportrapezoidown[i]->SetLineColor(9);
4656 ////////////////////////////////////////////
4657 // Mounting Block Support Up Trapezoid Vertex
4658 ////////////////////////////////////////////
4659 mountingblocksupportrapezoidupshape[i] = new TGeoXtru(2);
4660 mountingblocksupportrapezoidupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
4661 - mountingsupportedge[i];
4662 mountingblocksupportrapezoidupyvertex[i][0] = mountingblockpieceupyvertex[i][0];
4663 mountingblocksupportrapezoidupxvertex[i][1] =
4664 mountingblocksupportrapezoidupxvertex[i][0];
4665 mountingblocksupportrapezoidupyvertex[i][1] =
4666 mountingblockpieceupyvertex[i][0]
4667 + scalefactor*(mountingblockpieceupyvertex[i][1]
4668 - mountingblockpieceupyvertex[i][0]);
4669 mountingblocksupportrapezoidupxvertex[i][2] = -0.5*fgkSSDSensorWidth;
4670 mountingblocksupportrapezoidupyvertex[i][2] = mountingblockpieceupyvertex[i][1];
4671 mountingblocksupportrapezoidupxvertex[i][3] = mountingblockpieceupxvertex[i][0];
4672 mountingblocksupportrapezoidupyvertex[i][3] = mountingblocksupportrapezoidupyvertex[i][2];
4673 mountingblocksupportrapezoidupxvertex[i][4] = mountingblocksupportrapezoidupxvertex[i][3];
4674 mountingblocksupportrapezoidupyvertex[i][4] = mountingblocksupportrapezoidupyvertex[i][0];
4676 mountingblocksupportrapezoidupshape[i]->DefinePolygon(5,mountingblocksupportrapezoidupxvertex[i],
4677 mountingblocksupportrapezoidupyvertex[i]);
4678 mountingblocksupportrapezoidupshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4679 -fgkMountingBlockSupportWidth[0]);
4680 mountingblocksupportrapezoidupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4681 sprintf(mountingblocksupportrapezoidupname,"MountingBlockSuppTrapezoidUpLay%d",i+5);
4682 mountingblocksupportrapezoidup[i] = new TGeoVolume(mountingblocksupportrapezoidupname,
4683 mountingblocksupportrapezoidupshape[i],fSSDCarbonFiberMedium);
4684 mountingblocksupportrapezoidup[i]->SetLineColor(9);
4686 ///////////////////////////////////////////////////////////////////
4687 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxdown[i] = new TGeoVolume*[3];
4688 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxup[i] = new TGeoVolume*[3];
4689 Double_t boxoriginup[fgklayernumber][2][3];
4690 Double_t boxorigindown[fgklayernumber][2][3];
4691 char mountingblocksupportboxdownname[100];
4692 char mountingblocksupportboxupname[100];
4693 TGeoRotation* mountingblocksupportrot = new TGeoRotation();
4694 mountingblocksupportrot->SetAngles(90.,180.,-90);
4695 TGeoRotation* globalrefladdersupportrot = new TGeoRotation();
4696 globalrefladdersupportrot->SetAngles(0.,90.,0.);
4697 TGeoHMatrix* laddersupportmatrix[2];
4698 laddersupportmatrix[0] = new TGeoHMatrix(*globalrefladdersupportrot);
4699 laddersupportmatrix[1] = new TGeoHMatrix((*globalrefladdersupportrot)*(*mountingblocksupportrot));
4700 /////////////////////////////////////////////////////////////
4701 // Creating Mother Volume for Containment
4702 /////////////////////////////////////////////////////////////
4703 Double_t *xmothervertex[fgklayernumber];
4704 Double_t *ymothervertex[fgklayernumber];
4705 for(Int_t i=0; i<fgklayernumber; i++){
4706 xmothervertex[i] = new Double_t[8];
4707 ymothervertex[i] = new Double_t[8];
4709 TGeoXtru* downmotherladdersupportshape[fgklayernumber];
4710 TGeoVolume* downmotherladdersupport[fgklayernumber];
4711 TGeoXtru* upmotherladdersupportshape[fgklayernumber];
4712 TGeoVolume* upmotherladdersupport[fgklayernumber];
4713 char upmotheladdersupportname[100];
4714 char downmotheladdersupportname[100];
4715 for(Int_t i=0; i<fgklayernumber; i++){
4716 xmothervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
4717 - mountingsupportedge[i];
4718 ymothervertex[i][0] = -fgkMountingBlockSupportWidth[1];
4719 xmothervertex[i][1] = xmothervertex[i][0];
4720 ymothervertex[i][1] = -fgkMountingBlockSupportWidth[1]
4721 + fgkMountingBlockSupportWidth[0];
4722 xmothervertex[i][2] = -0.5*fgkSSDMountingBlockLength[0];
4723 ymothervertex[i][2] = ymothervertex[i][1];
4724 xmothervertex[i][3] = xmothervertex[i][2];
4725 ymothervertex[i][3] = -ymothervertex[i][0];
4726 xmothervertex[i][4] = -xmothervertex[i][0];
4727 ymothervertex[i][4] = ymothervertex[i][3];
4728 xmothervertex[i][5] = xmothervertex[i][4];
4729 ymothervertex[i][5] = -ymothervertex[i][1];
4730 xmothervertex[i][6] = -xmothervertex[i][2];
4731 ymothervertex[i][6] = ymothervertex[i][5];
4732 xmothervertex[i][7] = xmothervertex[i][6];
4733 ymothervertex[i][7] = ymothervertex[i][0];
4735 sprintf(downmotheladdersupportname,"LadderSupportDownLay%d",i+5);
4736 sprintf(upmotheladdersupportname,"LadderSupportUpLay%d",i+5);
4738 downmotherladdersupportshape[i] = new TGeoXtru(2);
4739 downmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
4740 downmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]);
4741 downmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1]
4742 + fgkMountingBlockSupportDownHeight
4743 + fgkSSDMountingBlockHeight[1]
4744 - 0.5*fgkCoolingTubeSupportHeight
4745 - fgkSSDModuleCoolingBlockToSensor
4746 - fgkSSDLadderVerticalDisalignment);
4748 // - fgkSSDModuleVerticalDisalignment);
4749 //downmotherladdersupport[i] = new TGeoVolumeAssembly(downmotheladdersupportname);
4751 downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname,
4752 downmotherladdersupportshape[i],fSSDAir);
4753 upmotherladdersupportshape[i] = new TGeoXtru(2);
4754 upmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
4755 upmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]);
4756 upmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1]
4757 + fgkMountingBlockSupportUpHeight[i]
4758 + fgkSSDMountingBlockHeight[1]
4759 - 0.5*fgkCoolingTubeSupportHeight
4760 - fgkSSDModuleCoolingBlockToSensor
4761 - fgkSSDLadderVerticalDisalignment);
4763 upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
4764 upmotherladdersupportshape[i],fSSDAir);
4766 for(Int_t i=0; i<fgklayernumber; i++){
4767 /////////////////////////
4768 // Setting the box origin
4769 /////////////////////////
4770 boxorigindown[i][0][0] = -0.5*mountingsupportedge[i];
4771 boxorigindown[i][0][1] = fgkMountingBlockSupportRadius[i]
4772 + 0.5*fgkMountingBlockSupportDownHeight
4773 - 0.5*fgkSSDLadderVerticalDisalignment;
4774 boxorigindown[i][0][2] = fgkMountingBlockSupportWidth[1]
4775 - 0.5*fgkMountingBlockSupportWidth[0];
4777 boxorigindown[i][1][0] = 0.0;
4778 boxorigindown[i][1][1] = boxorigindown[i][0][1];
4779 boxorigindown[i][1][2] = 0.5*(fgkMountingBlockSupportWidth[1]
4780 - fgkMountingBlockSupportWidth[0]);
4782 boxoriginup[i][0][0] = -0.5*mountingsupportedge[i];
4783 boxoriginup[i][0][1] = fgkMountingBlockSupportRadius[i]
4784 + 0.5*fgkMountingBlockSupportUpHeight[i]
4785 - 0.5*fgkSSDLadderVerticalDisalignment;
4786 boxoriginup[i][0][2] = fgkMountingBlockSupportWidth[1]
4787 - 0.5*fgkMountingBlockSupportWidth[0];
4789 boxoriginup[i][1][0] = 0.0;
4790 boxoriginup[i][1][1] = boxoriginup[i][0][1];
4791 boxoriginup[i][1][2] = 0.5*(fgkMountingBlockSupportWidth[1]
4792 - fgkMountingBlockSupportWidth[0]);
4794 /////////////////////////
4795 // Setting the boxes
4796 /////////////////////////
4797 mountingblocksupportboxdownshape[i][0] = new TGeoBBox(0.5*(mountingsupportedge[i]
4798 + fgkSSDMountingBlockLength[0]),
4799 0.5*fgkMountingBlockSupportDownHeight - 0.5*fgkSSDLadderVerticalDisalignment,
4800 0.5*fgkMountingBlockSupportWidth[0],
4801 boxorigindown[i][0]);
4802 mountingblocksupportboxdownshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
4803 0.5*fgkMountingBlockSupportDownHeight - 0.5*fgkSSDLadderVerticalDisalignment,
4804 0.5*(fgkMountingBlockSupportWidth[1]
4805 - fgkMountingBlockSupportWidth[0]),
4806 boxorigindown[i][1]);
4808 mountingblocksupportboxupshape[i][0] = new TGeoBBox(0.5*(mountingsupportedge[i]
4809 + fgkSSDMountingBlockLength[0]),
4810 0.5*fgkMountingBlockSupportUpHeight[i] - 0.5*fgkSSDLadderVerticalDisalignment,
4811 0.5*fgkMountingBlockSupportWidth[0],
4814 mountingblocksupportboxupshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
4815 0.5*fgkMountingBlockSupportUpHeight[i] - 0.5*fgkSSDLadderVerticalDisalignment,
4816 0.5*(fgkMountingBlockSupportWidth[1]
4817 - fgkMountingBlockSupportWidth[0]),
4819 ///////////////////////////////////////
4820 // Adding the Volumes to Mother Volume
4821 ///////////////////////////////////////
4822 for(Int_t j=0; j<2; j++){
4823 sprintf(mountingblocksupportboxdownname,"MountingBlockSuppDownLay%dBox%d",i+5,j+1);
4824 sprintf(mountingblocksupportboxupname,"MountingBlockSuppUpLay%dBox%d",i+5,j+1);
4825 mountingblocksupportboxdown[i][j] = new TGeoVolume(mountingblocksupportboxdownname,
4826 mountingblocksupportboxdownshape[i][j],
4827 fSSDCarbonFiberMedium);
4828 mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname,
4829 mountingblocksupportboxupshape[i][j],
4830 fSSDCarbonFiberMedium);
4831 mountingblocksupportboxdown[i][j]->SetLineColor(9);
4832 mountingblocksupportboxup[i][j]->SetLineColor(9);
4833 for(Int_t k=0; k<2; k++){
4834 downmotherladdersupport[i]->AddNode(mountingblocksupportboxdown[i][j],k+1,laddersupportmatrix[k]);
4835 upmotherladdersupport[i]->AddNode(mountingblocksupportboxup[i][j],k+1,laddersupportmatrix[k]);
4838 for(Int_t k=0; k<2; k++){
4839 downmotherladdersupport[i]->AddNode(centermountingblocksupport[i],k+1,laddersupportmatrix[k]);
4840 downmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
4841 downmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
4842 downmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
4843 downmotherladdersupport[i]->AddNode(mountingblockpiecedown[i],k+1,laddersupportmatrix[k]);
4844 downmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidown[i],k+1,laddersupportmatrix[k]);
4845 upmotherladdersupport[i]->AddNode(centermountingblocksupport[i],k+1,laddersupportmatrix[k]);
4846 upmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
4847 upmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
4848 upmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
4849 upmotherladdersupport[i]->AddNode(mountingblockpieceup[i],k+1,laddersupportmatrix[k]);
4850 upmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidup[i],k+1,laddersupportmatrix[k]);
4853 TList* laddersupportlist = new TList();
4854 laddersupportlist->Add(downmotherladdersupport[0]);
4855 laddersupportlist->Add(upmotherladdersupport[0]);
4856 laddersupportlist->Add(downmotherladdersupport[1]);
4857 laddersupportlist->Add(upmotherladdersupport[1]);
4858 /////////////////////////////////////////////////////////////
4859 // Deallocating memory
4860 /////////////////////////////////////////////////////////////
4861 for(Int_t i=0; i<fgklayernumber; i++){
4862 for(Int_t j=0; j<nedges+1; j++)
4863 delete vertex[i][j];
4864 delete mountingsupportedgevector[i];
4865 delete [] vertex[i];
4866 delete vertexlist[i];
4867 delete [] xsidevertex[i];
4868 delete [] ysidevertex[i];
4869 delete [] xcentervertex[i];
4870 delete [] ycentervertex[i];
4871 delete [] xsidelowervertex[i];
4872 delete [] ysidelowervertex[i];
4873 delete [] xcenterlowervertex[i];
4874 delete [] ycenterlowervertex[i];
4875 delete [] xmothervertex[i];
4876 delete [] ymothervertex[i];
4878 delete [] xsidevertex;
4879 delete [] ysidevertex;
4880 delete [] xcentervertex;
4881 delete [] ycentervertex;
4882 delete [] xsidelowervertex;
4883 delete [] ysidelowervertex;
4884 delete [] xcenterlowervertex;
4885 delete [] ycenterlowervertex;
4886 delete globalrefladdersupportrot;
4887 delete mountingblocksupportrot;
4888 /////////////////////
4889 return laddersupportlist;
4891 ////////////////////////////////////////////////////////////////////////////////
4892 void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
4893 //////////////////////////////////////////
4894 // Method Generating Ladder Support Ring
4895 //////////////////////////////////////////
4896 if(!fCreateMaterials) CreateMaterials();
4897 if(!fTransformationMatrices) CreateTransformationMatrices();
4898 if(!fBasicObjects) CreateBasicObjects();
4899 fLay5LadderSupportRing = new TGeoVolumeAssembly("Lay5LadderSupportRing");
4900 fLay6LadderSupportRing = new TGeoVolumeAssembly("Lay6LadderSupportRing");
4901 const Int_t kssdlayladdernumber[fgklayernumber] =
4902 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
4903 Double_t mountingsupportedge[fgklayernumber];
4904 Double_t mountingblockratio[fgklayernumber];
4905 Double_t theta[fgklayernumber];
4906 Double_t phi[fgklayernumber];
4907 for(Int_t i=0; i<fgklayernumber; i++){
4908 mountingblockratio[i] = fgkSSDMountingBlockLength[0]/fgkMountingBlockSupportRadius[i];
4909 mountingsupportedge[i] = 0.5*fgkMountingBlockSupportRadius[i]
4910 *(TMath::Sqrt((2.-mountingblockratio[i])*(2.+mountingblockratio[i]))
4911 * TMath::Sin(2.0*TMath::Pi()/kssdlayladdernumber[i])
4912 - mountingblockratio[i]*(1.0+TMath::Cos(2.0*TMath::Pi()
4913 / kssdlayladdernumber[i])));
4914 theta[i] = TMath::ASin(0.5*mountingblockratio[i]+mountingsupportedge[i]
4915 / fgkMountingBlockSupportRadius[i]);
4916 phi[i] = TMath::ASin(0.5*mountingblockratio[i]);
4918 TGeoRotation* globalrot = new TGeoRotation();
4919 globalrot->SetAngles(0.,-90.,0.);
4920 TGeoRotation** laddersupportrot[fgklayernumber];
4921 TGeoHMatrix** laddersupportmatrix[fgklayernumber];
4922 for(Int_t i=0; i<fgklayernumber; i++){
4923 laddersupportrot[i] = new TGeoRotation*[kssdlayladdernumber[i]];
4924 laddersupportmatrix[i] = new TGeoHMatrix*[kssdlayladdernumber[i]];
4925 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
4926 laddersupportrot[i][j] = new TGeoRotation();
4927 laddersupportrot[i][j]->SetAngles(j*(phi[i]+theta[i])*TMath::RadToDeg(),0.,0.);
4929 case 0: //Ladder of Layer5
4930 laddersupportmatrix[i][j] = new TGeoHMatrix((*laddersupportrot[i][j])*(*globalrot));
4931 fLay5LadderSupportRing->AddNode(j%2==0?fLay5LadderSupport[0]:fLay5LadderSupport[1],j+1,
4932 laddersupportmatrix[i][j]);
4934 case 1: //Ladder of Layer6
4935 laddersupportmatrix[i][j] = new TGeoHMatrix((*laddersupportrot[i][j])*(*globalrot));
4936 fLay6LadderSupportRing->AddNode(j%2==0?fLay6LadderSupport[0]:fLay6LadderSupport[1],j+1,
4937 laddersupportmatrix[i][j]);
4942 /////////////////////////////////////////////////////////////
4943 // Creating Lower Ladder Support
4944 /////////////////////////////////////////////////////////////
4945 TVector3** ringsupportvertex[fgklayernumber];
4946 Double_t angle = 360./nedges;
4947 for(Int_t i=0; i<fgklayernumber; i++){
4948 ringsupportvertex[i] = new TVector3*[2*kssdlayladdernumber[i]+3+nedges];
4949 ringsupportvertex[i][0] = new TVector3(0.,fgkMountingBlockSupportRadius[i]
4950 * TMath::Cos(theta[i]));
4951 ringsupportvertex[i][1] = new TVector3(-0.5*fgkSSDMountingBlockLength[0]
4952 - mountingsupportedge[i],
4953 ringsupportvertex[i][0]->Y());
4954 ringsupportvertex[i][2] = new TVector3(0.5*fgkSSDMountingBlockLength[0],
4955 ringsupportvertex[i][1]->Y());
4956 ringsupportvertex[i][2]->RotateZ(theta[i]+phi[i]);
4957 for(Int_t j=1; j<kssdlayladdernumber[i]; j++){
4958 ringsupportvertex[i][2*j+1] = new TVector3(*ringsupportvertex[i][1]);
4959 ringsupportvertex[i][2*j+1]->RotateZ(j*(theta[i]+phi[i]));
4960 ringsupportvertex[i][2*j+2] = new TVector3(*ringsupportvertex[i][2]);
4961 ringsupportvertex[i][2*j+2]->RotateZ(j*(theta[i]+phi[i]));
4963 ringsupportvertex[i][2*kssdlayladdernumber[i]+1] = new TVector3(*ringsupportvertex[i][0]);
4964 for(Int_t j=0; j<nedges+1; j++){
4965 ringsupportvertex[i][2*kssdlayladdernumber[i]+2+j] =
4966 new TVector3((ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*CosD(90.0-j*angle),
4967 (ringsupportvertex[i][0]->Y()-fgkLadderSupportHeight)*SinD(90.0-j*angle));
4970 Double_t **xmothervertex = new Double_t*[fgklayernumber];
4971 Double_t **ymothervertex = new Double_t*[fgklayernumber];
4972 for(Int_t i=0; i<fgklayernumber; i++){
4973 xmothervertex[i] = new Double_t[2*kssdlayladdernumber[i]+3+nedges];
4974 ymothervertex[i] = new Double_t[2*kssdlayladdernumber[i]+3+nedges];
4975 for(Int_t j=0; j<2*kssdlayladdernumber[i]+3+nedges; j++){
4976 xmothervertex[i][j] = ringsupportvertex[i][j]->X();
4977 ymothervertex[i][j] = ringsupportvertex[i][j]->Y();
4980 ////////////////////////////////////////////////////////////////////////////////
4981 // Start Corrections 13/06/08
4982 ////////////////////////////////////////////////////////////////////////////////
4983 char lowerladderpconsupportname[100];
4984 TGeoPcon* lowerladderpconsupportshape[fgklayernumber];
4985 TGeoVolume* lowerladderpconsupport[fgklayernumber];
4986 Double_t lowerladderpconezsection[2] = {0.,fgkMountingBlockSupportWidth[1]};
4987 Double_t lowerladderpconradiusmax[fgklayernumber];
4988 Double_t lowerladderpconradiusmin[fgklayernumber];
4989 TGeoRotation* lowerladdersupportrot = new TGeoRotation();
4990 lowerladdersupportrot->SetAngles(90.,180.,-90);
4991 for(Int_t i=0; i<fgklayernumber; i++){
4992 lowerladderpconradiusmax[i] = fgkMountingBlockSupportRadius[i]
4993 * TMath::Cos(theta[i]);
4994 lowerladderpconradiusmin[i] = lowerladderpconradiusmax[i]-fgkLadderSupportHeight;
4996 for(Int_t i=0; i<fgklayernumber; i++){
4997 /////////////////////////// Modified Version ?///////////////////
4998 lowerladderpconsupportshape[i] = new TGeoPcon(0.,360.,2);
4999 for(Int_t j=0; j<2; j++) lowerladderpconsupportshape[i]->DefineSection(j,
5000 lowerladderpconezsection[j],lowerladderpconradiusmin[i],
5001 lowerladderpconradiusmax[i]);
5002 sprintf(lowerladderpconsupportname,"LowerLadderPConSupportNameLay%d",i+5);
5003 lowerladderpconsupport[i] = new TGeoVolume(lowerladderpconsupportname,lowerladderpconsupportshape[i],fSSDSupportRingAl);
5004 lowerladderpconsupport[i]->SetLineColor(fColorAl);
5005 (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],1);
5006 (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladderpconsupport[i],2,lowerladdersupportrot);
5008 ////////////////////////////////////////////////////////////////////////////////
5009 // End Corrections 13/06/08
5010 ////////////////////////////////////////////////////////////////////////////////
5011 /*char lowerladdersupportname[30];
5012 TGeoXtru* lowerladdersupportshape[fgklayernumber];
5013 TGeoVolume* lowerladdersupport[fgklayernumber];
5014 TGeoRotation* lowerladdersupportrot = new TGeoRotation();
5015 lowerladdersupportrot->SetAngles(90.,180.,-90);
5016 for(Int_t i=0; i<fgklayernumber; i++){
5017 lowerladdersupportshape[i] = new TGeoXtru(2);
5018 lowerladdersupportshape[i]->DefinePolygon(2*kssdlayladdernumber[i]+3+nedges,
5019 xmothervertex[i],ymothervertex[i]);
5020 lowerladdersupportshape[i]->DefineSection(0,0.);
5021 lowerladdersupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
5022 sprintf(lowerladdersupportname,"LowerLadderSupportNameLay%d",i+5);
5023 lowerladdersupport[i] = new TGeoVolume(lowerladdersupportname,
5024 lowerladdersupportshape[i],fSSDSupportRingAl);
5025 lowerladdersupport[i]->SetLineColor(fColorAl);
5026 (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],1);
5027 (i==0 ? fLay5LadderSupportRing: fLay6LadderSupportRing)->AddNode(lowerladdersupport[i],2,lowerladdersupportrot);
5029 /////////////////////////////////////////////////////////////
5030 // Deallocating memory
5031 /////////////////////////////////////////////////////////////
5032 for(Int_t i=0; i<fgklayernumber; i++){
5033 for(Int_t j=0; j<2*kssdlayladdernumber[i]+3+nedges; j++)
5034 delete ringsupportvertex[i][j];
5035 delete [] ringsupportvertex[i];
5037 for(Int_t i=0; i<fgklayernumber; i++){
5038 delete [] xmothervertex[i];
5039 delete [] ymothervertex[i];
5041 delete [] xmothervertex;
5042 delete [] ymothervertex;
5044 for(Int_t i=0; i<fgklayernumber; i++){
5045 for(Int_t j=0; j<kssdlayladdernumber[i]; j++)
5046 delete laddersupportrot[i][j];
5047 delete [] laddersupportrot[i];
5050 ////////////////////////////////////////////////////////////////////////////////
5051 TGeoVolume* AliITSv11GeometrySSD::GetEndCapCoverPlate(){
5052 /////////////////////////////////////////////////////////////
5053 // Method generating Endcap CoverPlate
5054 /////////////////////////////////////////////////////////////
5057 Int_t nendcapcoverplateholedges = 30;
5058 const Int_t kendcapcoverplatesmallholenumber[2] = {4,9};
5059 Double_t holesection[2] = {-0.5*fgkEndCapCoverPlateThickness,
5060 0.5*fgkEndCapCoverPlateThickness};
5061 TGeoShape* endcapcoverplatesmallholeshape = GetHoleShape(fgkEndCapCoverPlateSmallHoleRadius,
5062 nendcapcoverplateholedges,holesection);
5063 TGeoVolume* endcapcoverplatesmallhole = new TGeoVolume("EndCapCoverPlateSmallHole",
5064 endcapcoverplatesmallholeshape,fSSDAlCoolBlockMedium);
5065 endcapcoverplatesmallhole->SetLineColor(6);
5066 TGeoShape* endcapcoverplatebigholeshape = GetHoleShape(fgkEndCapCoverPlateBigHoleRadius,
5067 nendcapcoverplateholedges,holesection);
5068 TGeoVolume* endcapcoverplatebighole = new TGeoVolume("EndCapCoverPlateBigHole",
5069 endcapcoverplatebigholeshape,fSSDAlCoolBlockMedium);
5070 endcapcoverplatebighole->SetLineColor(6);
5071 //////////////////////////
5072 // Screw Piece Definition
5073 //////////////////////////
5074 Double_t smallscrewangle = 360.0/nendcapcoverplateholedges;
5075 TGeoTube* endcapsmallscrewpieceshape = new TGeoTube(0.0,fgkEndCapCoverPlateSmallHoleRadius*
5076 CosD(0.5*smallscrewangle),
5077 0.5*fgkEndCapCoverPlateThickness);
5078 TGeoVolume* endcapsmallscrewpiece = new TGeoVolume("EndCapCoverPlateSmallScrewPiece",
5079 endcapsmallscrewpieceshape,
5080 fSSDCoolingTubePhynox);
5081 endcapsmallscrewpiece->SetLineColor(fColorPhynox);
5085 TGeoBBox* endcapcoverplateboxshape[4];
5086 TGeoVolume* endcapcoverplatebox[4];
5087 Double_t boxorigin[5][3];
5088 boxorigin[0][0] = 0.;
5089 boxorigin[0][1] = 0.5*fgkEndCapCoverPlateSmallHoleSeparation[2];
5090 boxorigin[0][2] = 0.;
5092 boxorigin[1][0] = 0.5*fgkEndCapCoverPlateSmallHoleSeparation[0];
5093 boxorigin[1][1] = 4.*fgkEndCapCoverPlateSmallHoleSeparation[2];
5094 boxorigin[1][2] = 0.;
5096 boxorigin[2][0] = 1.5*fgkEndCapCoverPlateSmallHoleSeparation[0]
5097 + fgkEndCapCoverPlateSmallHoleSeparation[1];
5098 boxorigin[2][1] = boxorigin[1][1];
5099 boxorigin[2][2] = 0.;
5101 boxorigin[3][0] = fgkEndCapCoverPlateSmallHoleSeparation[0]
5102 + 0.5*fgkEndCapCoverPlateSmallHoleSeparation[1];
5103 boxorigin[3][1] = boxorigin[1][1];
5104 boxorigin[3][2] = 0.;
5106 endcapcoverplateboxshape[0] = new TGeoBBox(fgkEndCapCoverPlateSmallHoleRadius,
5107 0.5*(fgkEndCapCoverPlateSmallHoleSeparation[2]
5108 - 2.*fgkEndCapCoverPlateSmallHoleRadius),
5109 0.5*fgkEndCapCoverPlateThickness,boxorigin[0]);
5111 endcapcoverplateboxshape[1] = new TGeoBBox(0.5*(fgkEndCapCoverPlateSmallHoleSeparation[0]
5112 -2.*fgkEndCapCoverPlateSmallHoleRadius),
5113 4.*fgkEndCapCoverPlateSmallHoleSeparation[2]
5114 + fgkEndCapCoverPlateSmallHoleRadius,
5115 0.5*fgkEndCapCoverPlateThickness,boxorigin[1]);
5117 endcapcoverplateboxshape[2] = new TGeoBBox(0.5*(fgkEndCapCoverPlateSmallHoleSeparation[0]
5118 -2.*fgkEndCapCoverPlateSmallHoleRadius),
5119 4.*fgkEndCapCoverPlateSmallHoleSeparation[2]
5120 + fgkEndCapCoverPlateSmallHoleRadius,
5121 0.5*fgkEndCapCoverPlateThickness,boxorigin[2]);
5123 endcapcoverplateboxshape[3] = new TGeoBBox(0.5*(fgkEndCapCoverPlateSmallHoleSeparation[1]
5124 -2.*fgkEndCapCoverPlateSmallHoleRadius),
5125 4.*fgkEndCapCoverPlateSmallHoleSeparation[2]
5126 + fgkEndCapCoverPlateSmallHoleRadius,
5127 0.5*fgkEndCapCoverPlateThickness,boxorigin[3]);
5129 endcapcoverplatebox[0] = new TGeoVolume("EndCapCoverPlateBox1",endcapcoverplateboxshape[0],
5130 fSSDAlCoolBlockMedium);
5131 endcapcoverplatebox[1] = new TGeoVolume("EndCapCoverPlateBox2",endcapcoverplateboxshape[1],
5132 fSSDAlCoolBlockMedium);
5133 endcapcoverplatebox[2] = new TGeoVolume("EndCapCoverPlateBox3",endcapcoverplateboxshape[2],
5134 fSSDAlCoolBlockMedium);
5135 endcapcoverplatebox[3] = new TGeoVolume("EndCapCoverPlateBox4",endcapcoverplateboxshape[3],
5136 fSSDAlCoolBlockMedium);
5137 endcapcoverplatebox[0]->SetLineColor(6);
5138 endcapcoverplatebox[1]->SetLineColor(6);
5139 endcapcoverplatebox[2]->SetLineColor(6);
5140 endcapcoverplatebox[3]->SetLineColor(6);
5141 Double_t endcapfillingboxorigin[3] = {fgkEndCapCoverPlateSmallHoleSeparation[0],0.,0.};
5142 TGeoBBox* endcapfillingboxshape = new TGeoBBox(fgkEndCapCoverPlateSmallHoleRadius,
5143 fgkEndCapCoverPlateSmallHoleRadius,
5144 0.5*fgkEndCapCoverPlateThickness,
5145 endcapfillingboxorigin);
5146 TGeoVolume* endcapfillingbox = new TGeoVolume("EndCapFillingBox",endcapfillingboxshape,
5147 fSSDAlCoolBlockMedium);
5148 endcapfillingbox->SetLineColor(6);
5149 ////////////////////////////
5150 // Contour shape Definition
5151 ////////////////////////////
5152 const Int_t kcontourvertexnumber = 10;
5153 Double_t xcontourvertex[kcontourvertexnumber];
5154 Double_t ycontourvertex[kcontourvertexnumber];
5155 xcontourvertex[0] = -fgkEndCapCoverPlateLength[0];
5156 xcontourvertex[1] = xcontourvertex[0];
5157 xcontourvertex[2] = fgkEndCapCoverPlateLength[1]-xcontourvertex[0];
5158 xcontourvertex[3] = xcontourvertex[2];
5159 xcontourvertex[4] = -fgkEndCapCoverPlateSmallHoleRadius;
5160 xcontourvertex[5] = xcontourvertex[4];
5161 xcontourvertex[6] = fgkEndCapCoverPlateLength[1]+fgkEndCapCoverPlateSmallHoleRadius;
5162 xcontourvertex[7] = xcontourvertex[6];
5163 xcontourvertex[8] = xcontourvertex[4];
5164 xcontourvertex[9] = xcontourvertex[8];
5165 ycontourvertex[0] = -0.5*(fgkEndCapCoverPlateWidth[0]-fgkEndCapCoverPlateWidth[2]
5166 - (kendcapcoverplatesmallholenumber[1]-1)
5167 * fgkEndCapCoverPlateSmallHoleSeparation[2]);
5168 ycontourvertex[1] = (kendcapcoverplatesmallholenumber[1]-1)
5169 * fgkEndCapCoverPlateSmallHoleSeparation[2]-ycontourvertex[0];
5170 ycontourvertex[2] = ycontourvertex[1];
5171 ycontourvertex[3] = ycontourvertex[0];
5172 ycontourvertex[4] = ycontourvertex[3];
5173 ycontourvertex[5] = -fgkEndCapCoverPlateSmallHoleRadius;
5174 ycontourvertex[6] = ycontourvertex[5];
5175 ycontourvertex[7] = (kendcapcoverplatesmallholenumber[1]-1)
5176 * fgkEndCapCoverPlateSmallHoleSeparation[2]
5177 + fgkEndCapCoverPlateSmallHoleRadius;
5178 ycontourvertex[8] = ycontourvertex[7];
5179 ycontourvertex[9] = ycontourvertex[0];
5181 Double_t xboxin, dxboxin, yboxin, dyboxin;
5182 Double_t xboxout, dxboxout, yboxout, dyboxout;
5183 Double_t coordmin, coordmax;
5184 coordmin = -fgkEndCapCoverPlateLength[0];
5185 coordmax = fgkEndCapCoverPlateLength[1]-xcontourvertex[0];
5186 xboxout = 0.5*(coordmin+coordmax);
5187 dxboxout = 0.5*(coordmax-coordmin);
5188 coordmin = -0.5*(fgkEndCapCoverPlateWidth[0]-fgkEndCapCoverPlateWidth[2]
5189 - (kendcapcoverplatesmallholenumber[1]-1)
5190 * fgkEndCapCoverPlateSmallHoleSeparation[2]);
5191 coordmax = (kendcapcoverplatesmallholenumber[1]-1)
5192 * fgkEndCapCoverPlateSmallHoleSeparation[2]-ycontourvertex[0];
5193 yboxout = 0.5*(coordmin+coordmax);
5194 dyboxout = 0.5*(coordmax-coordmin);
5195 coordmin = -fgkEndCapCoverPlateSmallHoleRadius;
5196 coordmax = fgkEndCapCoverPlateLength[1]+fgkEndCapCoverPlateSmallHoleRadius;
5197 xboxin = 0.5*(coordmin+coordmax);
5198 dxboxin = 0.5*(coordmax-coordmin);
5199 coordmin = -fgkEndCapCoverPlateSmallHoleRadius;
5200 coordmax = (kendcapcoverplatesmallholenumber[1]-1)
5201 * fgkEndCapCoverPlateSmallHoleSeparation[2]
5202 + fgkEndCapCoverPlateSmallHoleRadius;
5203 yboxin = 0.5*(coordmin+coordmax);
5204 dyboxin = 0.5*(coordmax-coordmin);
5205 new TGeoBBox("EndCapCoverPlateContourBoxOut", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
5206 TGeoTranslation *trendCapCoverPlateContourboxout = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut",
5207 xboxout, yboxout, 0.);
5208 trendCapCoverPlateContourboxout->RegisterYourself();
5209 new TGeoBBox("EndCapCoverPlateContourBoxIn", dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
5210 TGeoTranslation *trendCapCoverPlateContourboxin = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn",
5211 xboxin, yboxin, 0.);
5212 trendCapCoverPlateContourboxin->RegisterYourself();
5213 TGeoCompositeShape *contourshape = new TGeoCompositeShape("contourShape",
5214 "EndCapCoverPlateContourBoxOut:SSD_trEndCapCoverPlateContourBoxOut-EndCapCoverPlateContourBoxIn:SSD_trEndCapCoverPlateContourBoxIn");
5216 TGeoVolume* contour = new TGeoVolume("EndCapCoverPlateContour",contourshape,
5217 fSSDAlCoolBlockMedium);
5218 contour->SetLineColor(6);
5219 /////////////////////////////
5220 // Hole Contour Shape Definition
5221 ////////////////////////////
5222 coordmin = xcontourvertex[0];
5223 coordmax = coordmin+fgkEndCapCoverPlateLength[2];
5224 xboxout = 0.5*(coordmin+coordmax);
5225 dxboxout = 0.5*(coordmax-coordmin);
5226 coordmin = ycontourvertex[1];
5227 coordmax = ycontourvertex[1]+fgkEndCapCoverPlateWidth[2];
5228 yboxout = 0.5*(coordmin+coordmax);
5229 dyboxout = 0.5*(coordmax-coordmin);
5230 coordmin = xcontourvertex[0]+ 0.5*(fgkEndCapCoverPlateLength[2]
5231 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5232 coordmax = coordmin + 2.*fgkEndCapCoverPlateBigHoleRadius;
5233 xboxin = 0.5*(coordmin+coordmax);
5234 dxboxin = 0.5*(coordmax-coordmin);
5235 coordmin = ycontourvertex[1]+0.5*(fgkEndCapCoverPlateWidth[2]
5236 - 2.*fgkEndCapCoverPlateBigHoleRadius);;
5237 coordmax = coordmin +2.*fgkEndCapCoverPlateBigHoleRadius;
5238 yboxin = 0.5*(coordmin+coordmax);
5239 dyboxin = 0.5*(coordmax-coordmin);
5240 new TGeoBBox("EndCapCoverPlateContourBoxOut1", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
5241 TGeoTranslation *trendCapCoverPlateContourboxout1 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut1",
5242 xboxout, yboxout, 0.);
5243 trendCapCoverPlateContourboxout1->RegisterYourself();
5244 new TGeoBBox("EndCapCoverPlateContourBoxIn1", dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
5245 TGeoTranslation *trendCapCoverPlateContourboxin1 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn1",
5246 xboxin, yboxin, 0.);
5247 trendCapCoverPlateContourboxin1->RegisterYourself();
5248 TGeoCompositeShape *contourshape1 = new TGeoCompositeShape("contourShape1",
5249 "EndCapCoverPlateContourBoxOut1:SSD_trEndCapCoverPlateContourBoxOut1-EndCapCoverPlateContourBoxIn1:SSD_trEndCapCoverPlateContourBoxIn1");
5252 coordmin = xcontourvertex[0]+fgkEndCapCoverPlateLength[5];
5253 coordmax = coordmin+fgkEndCapCoverPlateLength[2];
5254 xboxout = 0.5*(coordmin+coordmax);
5255 dxboxout = 0.5*(coordmax-coordmin);
5256 coordmin = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
5257 - fgkEndCapCoverPlateWidth[0]);
5258 coordmax = ycontourvertex[0];
5259 yboxout = 0.5*(coordmin+coordmax);
5260 dyboxout = 0.5*(coordmax-coordmin);
5261 coordmin = xcontourvertex[0]+fgkEndCapCoverPlateLength[5]+ 0.5*(fgkEndCapCoverPlateLength[2]
5262 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5263 coordmax = coordmin + 2.*fgkEndCapCoverPlateBigHoleRadius;
5264 xboxin = 0.5*(coordmin+coordmax);
5265 dxboxin = 0.5*(coordmax-coordmin);
5266 coordmin = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
5267 - fgkEndCapCoverPlateWidth[0])+0.5*(fgkEndCapCoverPlateWidth[1]
5268 - fgkEndCapCoverPlateWidth[0]
5269 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5270 coordmax = coordmin+2.*fgkEndCapCoverPlateBigHoleRadius;
5271 yboxin = 0.5*(coordmin+coordmax);
5272 dyboxin = 0.5*(coordmax-coordmin);
5273 new TGeoBBox("EndCapCoverPlateContourBoxOut2", dxboxout, dyboxout, 0.5*fgkEndCapCoverPlateThickness);
5274 TGeoTranslation *trendCapCoverPlateContourboxout2 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxOut2",
5275 xboxout, yboxout, 0.);
5276 trendCapCoverPlateContourboxout2->RegisterYourself();
5277 new TGeoBBox("EndCapCoverPlateContourBoxIn2", dxboxin, dyboxin, 0.5*fgkEndCapCoverPlateThickness+0.01);
5278 TGeoTranslation *trendCapCoverPlateContourboxin2 = new TGeoTranslation("SSD_trEndCapCoverPlateContourBoxIn2",
5279 xboxin, yboxin, 0.);
5280 trendCapCoverPlateContourboxin2->RegisterYourself();
5281 TGeoCompositeShape *contourshape2 = new TGeoCompositeShape("contourShape2",
5282 "EndCapCoverPlateContourBoxOut2:SSD_trEndCapCoverPlateContourBoxOut2-EndCapCoverPlateContourBoxIn2:SSD_trEndCapCoverPlateContourBoxIn2");
5284 // const Int_t kholecontourvertexnumber = 10;
5286 Double_t xholecontourvertex[2][kcontourvertexnumber];
5287 Double_t yholecontourvertex[2][kcontourvertexnumber];
5288 xholecontourvertex[0][0] = xcontourvertex[0];
5289 xholecontourvertex[0][1] = xholecontourvertex[0][0];
5290 xholecontourvertex[0][2] = xholecontourvertex[0][1]+fgkEndCapCoverPlateLength[2];
5291 xholecontourvertex[0][3] = xholecontourvertex[0][2];
5292 xholecontourvertex[0][4] = xholecontourvertex[0][0]
5293 + 0.5*(fgkEndCapCoverPlateLength[2]
5294 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5295 xholecontourvertex[0][5] = xholecontourvertex[0][4];
5296 xholecontourvertex[0][6] = xholecontourvertex[0][5]
5297 + 2.*fgkEndCapCoverPlateBigHoleRadius;
5298 xholecontourvertex[0][7] = xholecontourvertex[0][6];
5299 xholecontourvertex[0][8] = xholecontourvertex[0][4];
5300 xholecontourvertex[0][9] = xholecontourvertex[0][8];
5302 yholecontourvertex[0][0] = ycontourvertex[1];
5303 yholecontourvertex[0][1] = yholecontourvertex[0][0]+fgkEndCapCoverPlateWidth[2];
5304 yholecontourvertex[0][2] = yholecontourvertex[0][1];
5305 yholecontourvertex[0][3] = yholecontourvertex[0][0];
5306 yholecontourvertex[0][4] = yholecontourvertex[0][3];
5307 yholecontourvertex[0][5] = yholecontourvertex[0][4]+0.5*(fgkEndCapCoverPlateWidth[2]
5308 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5309 yholecontourvertex[0][6] = yholecontourvertex[0][5];
5310 yholecontourvertex[0][7] = yholecontourvertex[0][6]+2.*fgkEndCapCoverPlateBigHoleRadius;
5311 yholecontourvertex[0][8] = yholecontourvertex[0][7];
5312 yholecontourvertex[0][9] = yholecontourvertex[0][0];
5314 xholecontourvertex[1][0] = xcontourvertex[0]+fgkEndCapCoverPlateLength[5];
5315 xholecontourvertex[1][1] = xholecontourvertex[1][0];
5316 xholecontourvertex[1][2] = xholecontourvertex[1][1]+fgkEndCapCoverPlateLength[2];
5317 xholecontourvertex[1][3] = xholecontourvertex[1][2];
5318 xholecontourvertex[1][4] = xholecontourvertex[1][0]
5319 + 0.5*(fgkEndCapCoverPlateLength[2]
5320 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5321 xholecontourvertex[1][5] = xholecontourvertex[1][4];
5322 xholecontourvertex[1][6] = xholecontourvertex[1][5]
5323 + 2.*fgkEndCapCoverPlateBigHoleRadius;
5324 xholecontourvertex[1][7] = xholecontourvertex[1][6];
5325 xholecontourvertex[1][8] = xholecontourvertex[1][4];
5326 xholecontourvertex[1][9] = xholecontourvertex[1][8];
5328 yholecontourvertex[1][0] = ycontourvertex[0]-(fgkEndCapCoverPlateWidth[1]
5329 - fgkEndCapCoverPlateWidth[0]);
5330 yholecontourvertex[1][1] = ycontourvertex[0];
5331 yholecontourvertex[1][2] = yholecontourvertex[1][1];
5332 yholecontourvertex[1][3] = yholecontourvertex[1][0];
5333 yholecontourvertex[1][4] = yholecontourvertex[1][3];
5334 yholecontourvertex[1][5] = yholecontourvertex[1][4]+0.5*(fgkEndCapCoverPlateWidth[1]
5335 - fgkEndCapCoverPlateWidth[0]
5336 - 2.*fgkEndCapCoverPlateBigHoleRadius);
5337 yholecontourvertex[1][6] = yholecontourvertex[1][5];
5338 yholecontourvertex[1][7] = yholecontourvertex[1][6]+2.*fgkEndCapCoverPlateBigHoleRadius;
5339 yholecontourvertex[1][8] = yholecontourvertex[1][7];
5340 yholecontourvertex[1][9] = yholecontourvertex[1][0];
5342 TGeoVolume* holecontour[2];
5343 holecontour[0] = new TGeoVolume("EndCapCoverPlateContour1",contourshape1,
5344 fSSDAlCoolBlockMedium);
5345 holecontour[0]->SetLineColor(6);
5346 holecontour[1] = new TGeoVolume("EndCapCoverPlateContour2",contourshape2,
5347 fSSDAlCoolBlockMedium);
5348 holecontour[1]->SetLineColor(6);
5349 TGeoTranslation* holecontourtrans = new TGeoTranslation(fgkEndCapCoverPlateLength[3]
5350 + fgkEndCapCoverPlateLength[2],0.,0.);
5351 TGeoTranslation* bigholetrans[3];
5352 bigholetrans[0] = new TGeoTranslation(xholecontourvertex[0][4]+fgkEndCapCoverPlateBigHoleRadius,
5353 yholecontourvertex[0][7]-fgkEndCapCoverPlateBigHoleRadius,0.0);
5354 bigholetrans[1] = new TGeoTranslation(xholecontourvertex[0][4]+fgkEndCapCoverPlateBigHoleRadius
5355 + fgkEndCapCoverPlateLength[4],yholecontourvertex[0][7]
5356 - fgkEndCapCoverPlateBigHoleRadius,0.0);
5357 bigholetrans[2] = new TGeoTranslation(xholecontourvertex[1][4]+fgkEndCapCoverPlateBigHoleRadius,
5358 yholecontourvertex[1][5]+fgkEndCapCoverPlateBigHoleRadius,0.0);
5359 /////////////////////////////////
5360 // Mother Volume Xtru Definition
5361 /////////////////////////////////
5362 const Int_t kmothervertexnumber = 12;
5363 Double_t xmothervertex[kmothervertexnumber];
5364 Double_t ymothervertex[kmothervertexnumber];
5365 xmothervertex[0] = xcontourvertex[0];
5366 xmothervertex[1] = xmothervertex[0];
5367 xmothervertex[2] = xmothervertex[1]+fgkEndCapCoverPlateLength[2];
5368 xmothervertex[3] = xmothervertex[2];
5369 xmothervertex[4] = xmothervertex[3]+fgkEndCapCoverPlateLength[3];
5370 xmothervertex[5] = xmothervertex[4];
5371 xmothervertex[6] = xmothervertex[5]+fgkEndCapCoverPlateLength[2];
5372 xmothervertex[7] = xmothervertex[6];
5373 xmothervertex[8] = xmothervertex[0]+fgkEndCapCoverPlateLength[5]
5374 + fgkEndCapCoverPlateLength[2];
5375 xmothervertex[9] = xmothervertex[8];
5376 xmothervertex[10] = xmothervertex[9]-fgkEndCapCoverPlateLength[2];
5377 xmothervertex[11] = xmothervertex[10];
5379 ymothervertex[0] = ycontourvertex[0];
5380 ymothervertex[1] = ymothervertex[0]+fgkEndCapCoverPlateWidth[0];
5381 ymothervertex[2] = ymothervertex[1];
5382 ymothervertex[3] = ycontourvertex[1];
5383 ymothervertex[4] = ymothervertex[3];
5384 ymothervertex[5] = ymothervertex[1];
5385 ymothervertex[6] = ymothervertex[5];
5386 ymothervertex[7] = ymothervertex[0];
5387 ymothervertex[8] = ymothervertex[7];
5388 ymothervertex[9] = ymothervertex[8]
5389 - (fgkEndCapCoverPlateWidth[1]-fgkEndCapCoverPlateWidth[0]);
5390 ymothervertex[10] = ymothervertex[9];
5391 ymothervertex[11] = ymothervertex[8];
5392 TGeoXtru* mothercoverplateshape = new TGeoXtru(2);
5393 mothercoverplateshape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
5394 mothercoverplateshape->DefineSection(0,-0.5*fgkEndCapCoverPlateThickness);
5395 mothercoverplateshape->DefineSection(1,+0.5*fgkEndCapCoverPlateThickness);
5396 TGeoVolume* mothercoverplate = new TGeoVolume("EndCapCoverPlateMother",mothercoverplateshape,fSSDAir);
5397 ////////////////////////////////////////
5399 ////////////////////////////////////////
5400 // TGeoTranslation** endcapcoverplatesmallholetrans[kendcapcoverplatesmallholenumber[0]];
5401 TGeoTranslation*** endcapcoverplatesmallholetrans;
5402 endcapcoverplatesmallholetrans = new TGeoTranslation**[kendcapcoverplatesmallholenumber[0]];
5403 Double_t transx[4] = {0,
5404 fgkEndCapCoverPlateSmallHoleSeparation[0],
5405 fgkEndCapCoverPlateSmallHoleSeparation[0]
5406 + fgkEndCapCoverPlateSmallHoleSeparation[1],
5407 2.*fgkEndCapCoverPlateSmallHoleSeparation[0]
5408 + fgkEndCapCoverPlateSmallHoleSeparation[1]};
5410 for(Int_t i=0; i<kendcapcoverplatesmallholenumber[0]; i++){
5411 endcapcoverplatesmallholetrans[i] =
5412 new TGeoTranslation*[kendcapcoverplatesmallholenumber[1]];
5413 for(Int_t j=0; j<kendcapcoverplatesmallholenumber[1]; j++){
5414 index = kendcapcoverplatesmallholenumber[1]*i+j+1;
5415 endcapcoverplatesmallholetrans[i][j] =
5416 new TGeoTranslation(transx[i],
5417 j*fgkEndCapCoverPlateSmallHoleSeparation[2],0.);
5419 mothercoverplate->AddNode(endcapcoverplatesmallhole,
5420 index,endcapcoverplatesmallholetrans[i][j]);
5421 mothercoverplate->AddNode(endcapsmallscrewpiece,
5422 index,endcapcoverplatesmallholetrans[i][j]);
5424 if(j<kendcapcoverplatesmallholenumber[1]-1)
5425 mothercoverplate->AddNode(endcapcoverplatebox[0],
5426 index,endcapcoverplatesmallholetrans[i][j]);
5429 mothercoverplate->AddNode(endcapcoverplatebox[1],1);
5430 mothercoverplate->AddNode(endcapcoverplatebox[2],1);
5431 mothercoverplate->AddNode(endcapcoverplatebox[3],1);
5432 mothercoverplate->AddNode(endcapfillingbox,1);
5433 mothercoverplate->AddNode(endcapcoverplatebighole,1,bigholetrans[0]);
5434 mothercoverplate->AddNode(endcapcoverplatebighole,2,bigholetrans[1]);
5435 mothercoverplate->AddNode(endcapcoverplatebighole,3,bigholetrans[2]);
5436 mothercoverplate->AddNode(holecontour[0],1);
5437 mothercoverplate->AddNode(holecontour[0],2,holecontourtrans);
5438 mothercoverplate->AddNode(holecontour[1],1);
5439 mothercoverplate->AddNode(contour,1);
5440 /////////////////////////////////
5441 return mothercoverplate;
5443 ////////////////////////////////////////////////////////////////////////////////
5444 TGeoVolume* AliITSv11GeometrySSD::GetEndCapCoolingTube(){
5445 /////////////////////////////////////////////////////////////
5446 // Getting EndCap Cooling Tube
5447 /////////////////////////////////////////////////////////////
5448 TGeoTorus* endcapcoolingtubetorushape[5];
5449 TGeoVolume* endcapcoolingtubetorus[5];
5450 TGeoTube* endcapcoolingtubeshape[4];
5451 TGeoVolume* endcapcoolingtube[4];
5452 char endcapcoolingtubetorusname[100];
5453 char endcapcoolingtubename[100];
5454 TGeoTorus* endcapcoolingwatertubetorushape[5];
5455 TGeoVolume* endcapcoolingwatertubetorus[5];
5456 TGeoTube* endcapcoolingwatertubeshape[4];
5457 TGeoVolume* endcapcoolingwatertube[4];
5458 char endcapcoolingwatertubetorusname[100];
5459 char endcapcoolingwatertubename[100];
5460 for(Int_t i=0; i<5; i++){
5461 sprintf(endcapcoolingtubetorusname,"EndCapCoolingTubeTorus%d",i+1);
5462 sprintf(endcapcoolingtubename,"EndCapCoolingTube%d",i+1);
5463 sprintf(endcapcoolingwatertubetorusname,"EndCapCoolingWaterTubeTorus%d",i+1);
5464 sprintf(endcapcoolingwatertubename,"EndCapCoolingWaterTube%d",i+1);
5466 endcapcoolingtubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
5467 fgkEndCapCoolingTubeRadiusMin,
5468 fgkEndCapCoolingTubeRadiusMax,
5469 90.0,fgkEndCapCoolingTubeAngle[3]);
5470 endcapcoolingwatertubetorushape[i] = new TGeoTorus(fgkEndCapCoolingTubeAxialRadius[0],
5471 0.,fgkEndCapCoolingTubeRadiusMin,
5472 90.0,fgkEndCapCoolingTubeAngle[3]);
5475 endcapcoolingtubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
5476 :fgkEndCapCoolingTubeAxialRadius[1],
5477 fgkEndCapCoolingTubeRadiusMin,
5478 fgkEndCapCoolingTubeRadiusMax,
5479 0.,fgkEndCapCoolingTubeAngle[i]);
5480 endcapcoolingwatertubetorushape[i] = new TGeoTorus(i!=4?fgkEndCapCoolingTubeAxialRadius[0]
5481 :fgkEndCapCoolingTubeAxialRadius[1],
5482 0.,fgkEndCapCoolingTubeRadiusMin,
5483 0.,fgkEndCapCoolingTubeAngle[i]);
5485 endcapcoolingtubetorus[i] = new TGeoVolume(endcapcoolingtubetorusname,
5486 endcapcoolingtubetorushape[i],
5487 fSSDCoolingTubePhynox);
5488 endcapcoolingwatertubetorus[i] = new TGeoVolume(endcapcoolingwatertubetorusname,
5489 endcapcoolingwatertubetorushape[i],
5490 fSSDCoolingTubeWater);
5491 endcapcoolingtubetorus[i]->SetLineColor(fColorPhynox);
5492 endcapcoolingwatertubetorus[i]->SetLineColor(fColorWater);
5494 endcapcoolingtubeshape[i] = new TGeoTube(fgkEndCapCoolingTubeRadiusMin,
5495 fgkEndCapCoolingTubeRadiusMax,
5496 0.5*fgkEndCapCoolingTubeLength[i]);
5497 endcapcoolingwatertubeshape[i] = new TGeoTube(0.,fgkEndCapCoolingTubeRadiusMin,
5498 0.5*fgkEndCapCoolingTubeLength[i]);
5499 endcapcoolingtube[i] = new TGeoVolume(endcapcoolingtubename,
5500 endcapcoolingtubeshape[i],fSSDCoolingTubePhynox);
5501 endcapcoolingwatertube[i] = new TGeoVolume(endcapcoolingwatertubename,
5502 endcapcoolingwatertubeshape[i],fSSDCoolingTubeWater);
5503 endcapcoolingtube[i]->SetLineColor(fColorPhynox);
5504 endcapcoolingwatertube[i]->SetLineColor(fColorWater);
5507 TGeoVolumeAssembly* endcapcoolingtubemother = new TGeoVolumeAssembly("MotherEndCapCoolingTube");
5508 /////////////////////////////////////////
5509 // Transformation for Volume Positioning
5510 /////////////////////////////////////////
5511 TGeoCombiTrans* coolingtubecombitrans[6];
5512 TGeoRotation* coolingtuberot[8];
5513 TGeoTranslation* coolingtubetrans[6];
5514 TGeoHMatrix* coolingtubematrix[4];
5515 TGeoCombiTrans* torustubecombitrans[4];
5516 TGeoRotation* torustuberot[7];
5517 TGeoTranslation* torustubetrans[4];
5518 TGeoHMatrix* torustubematrix[5];
5519 TGeoCombiTrans* coolingwatertubecombitrans[6];
5520 TGeoRotation* coolingwatertuberot[8];
5521 TGeoTranslation* coolingwatertubetrans[6];
5522 TGeoHMatrix* coolingwatertubematrix[4];
5523 TGeoCombiTrans* toruswatertubecombitrans[4];
5524 TGeoRotation* toruswatertuberot[7];
5525 TGeoTranslation* toruswatertubetrans[4];
5526 TGeoHMatrix* toruswatertubematrix[5];
5527 for(Int_t i=0; i<8; i++){
5529 coolingtubetrans[i] = new TGeoTranslation();
5530 coolingwatertubetrans[i] = new TGeoTranslation();
5533 coolingtuberot[i] = new TGeoRotation();
5534 coolingwatertuberot[i] = new TGeoRotation();
5537 torustubetrans[i] = new TGeoTranslation();
5538 toruswatertubetrans[i] = new TGeoTranslation();
5541 torustuberot[i] = new TGeoRotation();
5542 toruswatertuberot[i] = new TGeoRotation();
5545 /////////////////////////////////////////
5546 // Transformation for Inox Volume Positioning
5547 /////////////////////////////////////////
5548 coolingtubetrans[0]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0],
5549 -endcapcoolingtubeshape[0]->GetDz(),0.);
5550 coolingtuberot[0]->SetAngles(0.,90.,0.);
5551 coolingtubecombitrans[0] = new TGeoCombiTrans(*coolingtubetrans[0],
5552 *coolingtuberot[0]);
5554 coolingtubetrans[1]->SetTranslation(0.,-endcapcoolingtubeshape[1]->GetDz(),0.);
5555 coolingtuberot[1]->SetAngles(0.,90.,0.);
5556 coolingtubecombitrans[1] = new TGeoCombiTrans(*coolingtubetrans[1],
5557 *coolingtuberot[1]);
5559 coolingtubetrans[2]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0]
5560 *CosD(fgkEndCapCoolingTubeAngle[0]),
5561 fgkEndCapCoolingTubeAxialRadius[0]
5562 *SinD(fgkEndCapCoolingTubeAngle[0]),
5564 coolingtuberot[2]->SetAngles(fgkEndCapCoolingTubeAngle[0]-180.,0.,0.);
5565 coolingtubecombitrans[2] = new TGeoCombiTrans(*coolingtubetrans[2],
5566 *coolingtuberot[2]);
5568 coolingtubematrix[0] = new TGeoHMatrix((*coolingtubecombitrans[2])
5569 * (*coolingtubecombitrans[1]));
5571 torustubetrans[0]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
5572 endcapcoolingtubeshape[1]->GetDz());
5573 torustuberot[0]->SetAngles(0.,90.,0.);
5574 torustubecombitrans[0] = new TGeoCombiTrans(*torustubetrans[0],*torustuberot[0]);
5576 torustubematrix[0] = new TGeoHMatrix((*coolingtubematrix[0])*(*torustubecombitrans[0]));
5578 coolingtubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],
5579 -endcapcoolingtubeshape[2]->GetDz(),0.);
5580 coolingtuberot[3]->SetAngles(0.,90.,0.);
5581 coolingtubecombitrans[3] = new TGeoCombiTrans(*coolingtubetrans[3],
5582 *coolingtuberot[3]);
5583 coolingtuberot[4]->SetAngles(-180.+fgkEndCapCoolingTubeAngle[1],0.,0.);
5584 coolingtubematrix[1] = new TGeoHMatrix((*coolingtuberot[4])*(*coolingtubecombitrans[3]));
5585 coolingtubematrix[1]->MultiplyLeft(torustubematrix[0]);
5587 torustubetrans[1]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
5588 endcapcoolingtubeshape[2]->GetDz());
5589 torustuberot[1]->SetAngles(0.,90.,0.);
5590 torustubecombitrans[1] = new TGeoCombiTrans(*torustubetrans[1],*torustuberot[1]);
5591 torustuberot[2]->SetAngles(180.,0.,0.);
5592 torustubematrix[2] = new TGeoHMatrix((*torustuberot[2])*(*torustubecombitrans[1]));
5593 torustubematrix[2]->MultiplyLeft(coolingtubematrix[1]);
5595 torustubetrans[2]->SetTranslation(0.,fgkEndCapCoolingTubeAxialRadius[0],
5596 -fgkEndCapCoolingTubeAxialRadius[0]);
5597 torustuberot[3]->SetAngles(0.,90.,0.);
5598 torustubecombitrans[2] = new TGeoCombiTrans(*torustubetrans[2],*torustuberot[3]);
5599 torustuberot[4]->SetAngles(fgkEndCapCoolingTubeAngle[2]-90.,0.,0.);
5600 torustubematrix[3] = new TGeoHMatrix((*torustuberot[4])*(*torustubecombitrans[2]));
5601 torustubematrix[3]->MultiplyLeft(torustubematrix[2]);
5603 coolingtubetrans[4]->SetTranslation(-endcapcoolingtubeshape[3]->GetDz(),
5604 fgkEndCapCoolingTubeAxialRadius[0],0.);
5605 coolingtuberot[5]->SetAngles(90.,90.,-90.);
5606 coolingtubecombitrans[4] = new TGeoCombiTrans(*coolingtubetrans[4],
5607 *coolingtuberot[5]);
5608 coolingtuberot[6]->SetAngles(fgkEndCapCoolingTubeAngle[3],0.,0.);
5609 coolingtubematrix[2] = new TGeoHMatrix((*coolingtuberot[6])*(*coolingtubecombitrans[4]));
5610 coolingtubematrix[2]->MultiplyLeft(torustubematrix[3]);
5612 torustubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[1],0.,
5613 endcapcoolingtubeshape[0]->GetDz());
5614 torustuberot[5]->SetAngles(0.,90.,0.);
5615 torustubecombitrans[3] = new TGeoCombiTrans(*torustubetrans[3],*torustuberot[5]);
5616 torustuberot[6]->SetAngles(-90.,0.,0.);
5617 torustubematrix[4] = new TGeoHMatrix((*torustuberot[6])*(*torustubecombitrans[3]));
5618 torustubematrix[4]->MultiplyLeft(coolingtubecombitrans[0]);
5620 coolingtubetrans[5]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[1],
5621 endcapcoolingtubeshape[3]->GetDz(),0.);
5622 coolingtuberot[6]->SetAngles(0.,90.,0.);
5623 coolingtubecombitrans[5] = new TGeoCombiTrans(*coolingtubetrans[5],
5624 *coolingtuberot[6]);
5625 coolingtuberot[7]->SetAngles(fgkEndCapCoolingTubeAngle[4],0.,0.);
5626 coolingtubematrix[3] = new TGeoHMatrix((*coolingtuberot[7])*(*coolingtubecombitrans[5]));
5627 coolingtubematrix[3]->MultiplyLeft(torustubematrix[4]);
5628 /////////////////////////////////////////
5629 // Transformation for Water Volume Positioning
5630 /////////////////////////////////////////
5631 coolingwatertubetrans[0]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0],
5632 -endcapcoolingwatertubeshape[0]->GetDz(),0.);
5633 coolingwatertuberot[0]->SetAngles(0.,90.,0.);
5634 coolingwatertubecombitrans[0] = new TGeoCombiTrans(*coolingwatertubetrans[0],
5635 *coolingwatertuberot[0]);
5637 coolingwatertubetrans[1]->SetTranslation(0.,-endcapcoolingwatertubeshape[1]->GetDz(),0.);
5638 coolingwatertuberot[1]->SetAngles(0.,90.,0.);
5639 coolingwatertubecombitrans[1] = new TGeoCombiTrans(*coolingwatertubetrans[1],
5640 *coolingwatertuberot[1]);
5642 coolingwatertubetrans[2]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[0]
5643 *CosD(fgkEndCapCoolingTubeAngle[0]),
5644 fgkEndCapCoolingTubeAxialRadius[0]
5645 *SinD(fgkEndCapCoolingTubeAngle[0]),
5647 coolingwatertuberot[2]->SetAngles(fgkEndCapCoolingTubeAngle[0]-180.,0.,0.);
5648 coolingwatertubecombitrans[2] = new TGeoCombiTrans(*coolingwatertubetrans[2],
5649 *coolingwatertuberot[2]);
5651 coolingwatertubematrix[0] = new TGeoHMatrix((*coolingwatertubecombitrans[2])
5652 * (*coolingwatertubecombitrans[1]));
5654 toruswatertubetrans[0]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
5655 endcapcoolingwatertubeshape[1]->GetDz());
5656 toruswatertuberot[0]->SetAngles(0.,90.,0.);
5657 toruswatertubecombitrans[0] = new TGeoCombiTrans(*toruswatertubetrans[0],
5658 *toruswatertuberot[0]);
5660 toruswatertubematrix[0] = new TGeoHMatrix((*coolingwatertubematrix[0])
5661 * (*toruswatertubecombitrans[0]));
5663 coolingwatertubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],
5664 -endcapcoolingwatertubeshape[2]->GetDz(),0.);
5665 coolingwatertuberot[3]->SetAngles(0.,90.,0.);
5666 coolingwatertubecombitrans[3] = new TGeoCombiTrans(*coolingwatertubetrans[3],
5667 *coolingwatertuberot[3]);
5668 coolingwatertuberot[4]->SetAngles(-180.+fgkEndCapCoolingTubeAngle[1],0.,0.);
5669 coolingwatertubematrix[1] = new TGeoHMatrix((*coolingwatertuberot[4])
5670 * (*coolingwatertubecombitrans[3]));
5671 coolingwatertubematrix[1]->MultiplyLeft(toruswatertubematrix[0]);
5673 toruswatertubetrans[1]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[0],0.,
5674 endcapcoolingwatertubeshape[2]->GetDz());
5675 toruswatertuberot[1]->SetAngles(0.,90.,0.);
5676 toruswatertubecombitrans[1] = new TGeoCombiTrans(*toruswatertubetrans[1],
5677 *toruswatertuberot[1]);
5678 toruswatertuberot[2]->SetAngles(180.,0.,0.);
5679 toruswatertubematrix[2] = new TGeoHMatrix((*toruswatertuberot[2])
5680 * (*toruswatertubecombitrans[1]));
5681 toruswatertubematrix[2]->MultiplyLeft(coolingwatertubematrix[1]);
5683 toruswatertubetrans[2]->SetTranslation(0.,fgkEndCapCoolingTubeAxialRadius[0],
5684 -fgkEndCapCoolingTubeAxialRadius[0]);
5685 toruswatertuberot[3]->SetAngles(0.,90.,0.);
5686 toruswatertubecombitrans[2] = new TGeoCombiTrans(*toruswatertubetrans[2],
5687 *toruswatertuberot[3]);
5688 toruswatertuberot[4]->SetAngles(fgkEndCapCoolingTubeAngle[2]-90.,0.,0.);
5689 toruswatertubematrix[3] = new TGeoHMatrix((*toruswatertuberot[4])
5690 * (*toruswatertubecombitrans[2]));
5691 toruswatertubematrix[3]->MultiplyLeft(toruswatertubematrix[2]);
5693 coolingwatertubetrans[4]->SetTranslation(-endcapcoolingwatertubeshape[3]->GetDz(),
5694 fgkEndCapCoolingTubeAxialRadius[0],0.);
5695 coolingwatertuberot[5]->SetAngles(90.,90.,-90.);
5696 coolingwatertubecombitrans[4] = new TGeoCombiTrans(*coolingwatertubetrans[4],
5697 *coolingwatertuberot[5]);
5698 coolingwatertuberot[6]->SetAngles(fgkEndCapCoolingTubeAngle[3],0.,0.);
5699 coolingwatertubematrix[2] = new TGeoHMatrix((*coolingwatertuberot[6])
5700 * (*coolingwatertubecombitrans[4]));
5701 coolingwatertubematrix[2]->MultiplyLeft(toruswatertubematrix[3]);
5703 toruswatertubetrans[3]->SetTranslation(-fgkEndCapCoolingTubeAxialRadius[1],0.,
5704 endcapcoolingwatertubeshape[0]->GetDz());
5705 toruswatertuberot[5]->SetAngles(0.,90.,0.);
5706 toruswatertubecombitrans[3] = new TGeoCombiTrans(*toruswatertubetrans[3],
5707 *toruswatertuberot[5]);
5708 toruswatertuberot[6]->SetAngles(-90.,0.,0.);
5709 toruswatertubematrix[4] = new TGeoHMatrix((*toruswatertuberot[6])
5710 * (*toruswatertubecombitrans[3]));
5711 toruswatertubematrix[4]->MultiplyLeft(coolingwatertubecombitrans[0]);
5713 coolingwatertubetrans[5]->SetTranslation(fgkEndCapCoolingTubeAxialRadius[1],
5714 endcapcoolingwatertubeshape[3]->GetDz(),0.);
5715 coolingwatertuberot[6]->SetAngles(0.,90.,0.);
5716 coolingwatertubecombitrans[5] = new TGeoCombiTrans(*coolingwatertubetrans[5],
5717 *coolingwatertuberot[6]);
5718 coolingwatertuberot[7]->SetAngles(fgkEndCapCoolingTubeAngle[4],0.,0.);
5719 coolingwatertubematrix[3] = new TGeoHMatrix((*coolingwatertuberot[7])
5720 * (*coolingwatertubecombitrans[5]));
5721 coolingwatertubematrix[3]->MultiplyLeft(toruswatertubematrix[4]);
5722 /////////////////////////////////////////
5723 // Positioning Volumes
5724 /////////////////////////////////////////
5725 endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[0],1);
5726 endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[0],1);
5728 endcapcoolingtubemother->AddNode(endcapcoolingtube[0],1,coolingtubecombitrans[0]);
5729 endcapcoolingtubemother->AddNode(endcapcoolingwatertube[0],1,coolingwatertubecombitrans[0]);
5731 endcapcoolingtubemother->AddNode(endcapcoolingtube[1],1,coolingtubematrix[0]);
5732 endcapcoolingtubemother->AddNode(endcapcoolingwatertube[1],1,coolingwatertubematrix[0]);
5734 endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[1],1,torustubematrix[0]);
5735 endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[1],1,toruswatertubematrix[0]);
5737 endcapcoolingtubemother->AddNode(endcapcoolingtube[2],1,coolingtubematrix[1]);
5738 endcapcoolingtubemother->AddNode(endcapcoolingwatertube[2],1,coolingwatertubematrix[1]);
5740 endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[2],1,torustubematrix[2]);
5741 endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[2],1,toruswatertubematrix[2]);
5743 endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[3],1,torustubematrix[3]);
5744 endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[3],1,toruswatertubematrix[3]);
5746 endcapcoolingtubemother->AddNode(endcapcoolingtube[3],1,coolingtubematrix[2]);
5747 endcapcoolingtubemother->AddNode(endcapcoolingwatertube[3],1,coolingwatertubematrix[2]);
5749 endcapcoolingtubemother->AddNode(endcapcoolingtubetorus[4],1,torustubematrix[4]);
5750 endcapcoolingtubemother->AddNode(endcapcoolingwatertubetorus[4],1,toruswatertubematrix[4]);
5752 endcapcoolingtubemother->AddNode(endcapcoolingtube[3],2,coolingtubematrix[3]);
5753 endcapcoolingtubemother->AddNode(endcapcoolingwatertube[3],2,coolingwatertubematrix[3]);
5754 /////////////////////////////////////////////////////////////
5755 // Deallocating memory
5756 /////////////////////////////////////////////////////////////
5757 for(Int_t i=0; i<8; i++){
5759 delete coolingtubetrans[i];
5760 delete coolingwatertubetrans[i];
5762 delete coolingtubecombitrans[i];
5763 delete coolingwatertubecombitrans[i];
5767 delete coolingtuberot[i];
5768 delete coolingwatertuberot[i];
5771 delete torustubetrans[i];
5772 delete toruswatertubetrans[i];
5773 delete torustubecombitrans[i];
5774 delete toruswatertubecombitrans[i];
5777 delete torustuberot[i];
5778 delete toruswatertuberot[i];
5781 /////////////////////////////////////////////////////////////
5782 return endcapcoolingtubemother;
5784 ////////////////////////////////////////////////////////////////////////////////
5785 TGeoVolume* AliITSv11GeometrySSD::GetEndCapSideCover() const {
5786 /////////////////////////////////////////////////////////////
5787 // Getting EndCap Cover Side
5788 /////////////////////////////////////////////////////////////
5789 const Int_t kendcapcoverholenumber[2] = {7,5};
5790 const Int_t kvertexnumber = 15;
5791 Double_t xvertex[kvertexnumber], yvertex[kvertexnumber];
5793 xvertex[1] = xvertex[0];
5794 xvertex[2] = fgkEndCapSideCoverLength[0];
5795 xvertex[3] = fgkEndCapSideCoverLength[1];
5796 xvertex[4] = xvertex[3];
5797 xvertex[5] = fgkEndCapSideCoverLength[2];
5798 xvertex[6] = xvertex[5];
5799 xvertex[7] = xvertex[2];
5800 xvertex[8] = xvertex[7];
5801 xvertex[9] = xvertex[6]-fgkEndCapSideCoverLength[0];
5802 xvertex[10] = xvertex[9];
5803 xvertex[11] = xvertex[5]-fgkEndCapSideCoverLength[0]-kendcapcoverholenumber[1]
5804 * fgkEndCapSideCoverLength[3]-(kendcapcoverholenumber[1]-1)
5805 * fgkEndCapSideCoverLength[4];
5806 xvertex[12] = xvertex[11];
5807 xvertex[13] = xvertex[5]-fgkEndCapSideCoverLength[0]-kendcapcoverholenumber[0]
5808 * fgkEndCapSideCoverLength[3]-(kendcapcoverholenumber[0]-1)
5809 * fgkEndCapSideCoverLength[4];
5810 xvertex[14] = xvertex[13];
5812 yvertex[1] = fgkEndCapSideCoverWidth[0];
5813 yvertex[2] = fgkEndCapSideCoverWidth[1]-fgkEndCapSideCoverWidth[2];
5814 yvertex[3] = yvertex[2];
5815 yvertex[4] = fgkEndCapSideCoverWidth[1];
5816 yvertex[5] = yvertex[4];
5817 yvertex[6] = yvertex[0];
5818 yvertex[7] = yvertex[6];
5819 yvertex[8] = fgkEndCapSideCoverWidth[6];
5820 yvertex[9] = yvertex[8];
5821 yvertex[10] = fgkEndCapSideCoverWidth[1]-fgkEndCapSideCoverWidth[3];
5822 yvertex[11] = yvertex[10];
5823 yvertex[12] = yvertex[9]+2.*fgkEndCapSideCoverWidth[5]+fgkEndCapSideCoverLength[4];
5824 yvertex[13] = yvertex[12];
5825 yvertex[14] = yvertex[6];
5826 TGeoXtru* endcapsidecovershapeout = new TGeoXtru(2);
5827 endcapsidecovershapeout->SetName("endcapsidecovershapeout");
5828 endcapsidecovershapeout->DefinePolygon(7,xvertex,yvertex);
5829 endcapsidecovershapeout->DefineSection(0,-0.5*fgkEndCapSideCoverThickness);
5830 endcapsidecovershapeout->DefineSection(1,0.5*fgkEndCapSideCoverThickness);
5831 TGeoXtru* endcapsidecovershapein = new TGeoXtru(2);
5832 endcapsidecovershapein->SetName("endcapsidecovershapein");
5833 endcapsidecovershapein->DefinePolygon(6,&xvertex[8],&yvertex[8]);
5834 endcapsidecovershapein->DefineSection(0,-0.5*fgkEndCapSideCoverThickness-0.01);
5835 endcapsidecovershapein->DefineSection(1,0.5*fgkEndCapSideCoverThickness+0.01);
5838 TGeoCompositeShape* endcapsidecovershape = new TGeoCompositeShape("endcapsidecovershape", "endcapsidecovershapeout-endcapsidecovershapein");
5839 TGeoVolume* endcapsidecover = new TGeoVolume("EndCapSideCover",
5840 endcapsidecovershape,fSSDCoolingTubePhynox);
5841 endcapsidecover->SetLineColor(fColorPhynox);
5842 ////////////////////////////////////////////
5843 // Defininition of Mother Volume
5844 ////////////////////////////////////////////
5845 const Int_t kmothervertexnumber = 7;
5846 Double_t xmothervertex[kmothervertexnumber];
5847 Double_t ymothervertex[kmothervertexnumber];
5848 for(Int_t i=0; i<kmothervertexnumber; i++){
5849 xmothervertex[i] = xvertex[i];
5850 ymothervertex[i] = yvertex[i];
5852 TGeoXtru* endcapsidecovermothershape = new TGeoXtru(2);
5853 endcapsidecovermothershape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
5854 endcapsidecovermothershape->DefineSection(0,-0.5*fgkEndCapSideCoverThickness);
5855 endcapsidecovermothershape->DefineSection(1,0.5*fgkEndCapSideCoverThickness);
5856 TGeoVolume* endcapsidecovermother = new TGeoVolume("EndCapSideCoverMother",
5857 endcapsidecovermothershape,fSSDAir);
5858 ////////////////////////////////////////////
5859 endcapsidecovermother->AddNode(endcapsidecover,1);
5860 TGeoBBox* endcapsidecoverboxshape[4];
5861 endcapsidecoverboxshape[0] = new TGeoBBox(0.5*(kendcapcoverholenumber[0]*fgkEndCapSideCoverLength[3]
5862 + (kendcapcoverholenumber[0]-1)*fgkEndCapSideCoverLength[4]),
5863 0.5*fgkEndCapSideCoverLength[4],
5864 0.5*fgkEndCapSideCoverThickness);
5865 endcapsidecoverboxshape[1] = new TGeoBBox(0.5*(kendcapcoverholenumber[1]*fgkEndCapSideCoverLength[3]
5866 + (kendcapcoverholenumber[1]-1)*fgkEndCapSideCoverLength[4]),
5867 0.5*(fgkEndCapSideCoverWidth[4]-2.*fgkEndCapSideCoverWidth[5]
5868 - fgkEndCapSideCoverLength[4]),
5869 0.5*fgkEndCapSideCoverThickness);
5870 endcapsidecoverboxshape[2] = new TGeoBBox(endcapsidecoverboxshape[1]->GetDX(),
5871 0.5*fgkEndCapSideCoverLength[4],
5872 0.5*fgkEndCapSideCoverThickness);
5873 endcapsidecoverboxshape[3] = new TGeoBBox(0.5*fgkEndCapSideCoverLength[4],
5874 0.5*fgkEndCapSideCoverWidth[5],
5875 0.5*fgkEndCapSideCoverThickness);
5876 TGeoVolume* endcapsidecoverbox[4];
5877 endcapsidecoverbox[0] = new TGeoVolume("EndCapSideCoverBox1",endcapsidecoverboxshape[0],fSSDCoolingTubePhynox);
5878 endcapsidecoverbox[1] = new TGeoVolume("EndCapSideCoverBox2",endcapsidecoverboxshape[1],fSSDCoolingTubePhynox);
5879 endcapsidecoverbox[2] = new TGeoVolume("EndCapSideCoverBox3",endcapsidecoverboxshape[2],fSSDCoolingTubePhynox);
5880 endcapsidecoverbox[3] = new TGeoVolume("EndCapSideCoverBox4",endcapsidecoverboxshape[3],fSSDCoolingTubePhynox);
5881 for(Int_t i=0; i<4; i++) endcapsidecoverbox[i]->SetLineColor(fColorPhynox);
5882 // TGeoTranslation* endcapsidecoverboxtrans[3+2*(kendcapcoverholenumber[0]-1)+2*(kendcapcoverholenumber[1]-1)];
5883 TGeoTranslation** endcapsidecoverboxtrans;
5884 endcapsidecoverboxtrans = new TGeoTranslation*[3+2*(kendcapcoverholenumber[0]-1)+2*(kendcapcoverholenumber[1]-1)];
5885 endcapsidecoverboxtrans[0] = new TGeoTranslation(endcapsidecoverboxshape[0]->GetDX()
5886 + fgkEndCapSideCoverLength[0],
5887 endcapsidecoverboxshape[0]->GetDY()
5888 + yvertex[9]+fgkEndCapSideCoverWidth[5],0.);
5889 endcapsidecoverboxtrans[1] = new TGeoTranslation(endcapsidecoverboxshape[1]->GetDX()
5891 endcapsidecoverboxshape[1]->GetDY()
5893 endcapsidecoverboxtrans[2] = new TGeoTranslation(endcapsidecoverboxshape[2]->GetDX()
5895 endcapsidecoverboxshape[2]->GetDY()
5897 + 2.*endcapsidecoverboxshape[1]->GetDY()
5898 + fgkEndCapSideCoverWidth[5],0.);
5899 endcapsidecovermother->AddNode(endcapsidecoverbox[0],1,endcapsidecoverboxtrans[0]);
5900 endcapsidecovermother->AddNode(endcapsidecoverbox[1],1,endcapsidecoverboxtrans[1]);
5901 endcapsidecovermother->AddNode(endcapsidecoverbox[2],1,endcapsidecoverboxtrans[2]);
5902 for(Int_t i=0; i<2; i++)
5903 for(Int_t j=0; j<kendcapcoverholenumber[0]-1; j++){
5904 endcapsidecoverboxtrans[i*(kendcapcoverholenumber[0]-1)+j+3] =
5905 new TGeoTranslation(endcapsidecoverboxshape[3]->GetDX()+fgkEndCapSideCoverLength[0]
5906 +(j+1)*fgkEndCapSideCoverLength[3]+j*fgkEndCapSideCoverLength[4],
5907 endcapsidecoverboxshape[3]->GetDY()+fgkEndCapSideCoverWidth[6]
5908 +i*(fgkEndCapSideCoverWidth[5]+fgkEndCapSideCoverLength[4]),0.0);
5909 endcapsidecovermother->AddNode(endcapsidecoverbox[3],i*(kendcapcoverholenumber[0]-1)+j+1,
5910 endcapsidecoverboxtrans[i*(kendcapcoverholenumber[0]-1)+j+3]);
5912 for(Int_t i=0; i<2; i++)
5913 for(Int_t j=0; j<kendcapcoverholenumber[1]-1; j++){
5914 endcapsidecoverboxtrans[2*(kendcapcoverholenumber[0]-1)+3+i*(kendcapcoverholenumber[1]-1)+j] =
5915 new TGeoTranslation(endcapsidecoverboxshape[3]->GetDX()+xvertex[12]
5916 +(j+1)*fgkEndCapSideCoverLength[3]+j*fgkEndCapSideCoverLength[4],
5917 endcapsidecoverboxshape[3]->GetDY()+fgkEndCapSideCoverWidth[6]
5918 +fgkEndCapSideCoverWidth[4]+i*(fgkEndCapSideCoverWidth[5]
5919 +fgkEndCapSideCoverLength[4]),0.0);
5920 endcapsidecovermother->AddNode(endcapsidecoverbox[3],
5921 2*(kendcapcoverholenumber[0]-1)+3+i*(kendcapcoverholenumber[1]-1)+j,
5922 endcapsidecoverboxtrans[2*(kendcapcoverholenumber[0]-1)+3
5923 +i*(kendcapcoverholenumber[1]-1)+j]);
5925 return endcapsidecovermother;
5927 ////////////////////////////////////////////////////////////////////////////////
5928 TGeoVolume** AliITSv11GeometrySSD::GetEndCapCards() const {
5929 ////////////////////////////////////////////////////////////////////////////////
5930 // Method returning Interface Card A, Interface Card B, Supply Card
5931 ////////////////////////////////////////////////////////////////////////////////
5932 /////////////////////
5934 /////////////////////
5935 // Electronic Board Back Al Plane
5936 const Int_t kelectboardbackvertexnumber = 8;
5937 Double_t xelectboardback[kelectboardbackvertexnumber];
5938 Double_t yelectboardback[kelectboardbackvertexnumber];
5939 xelectboardback[0] = 0.0;
5940 xelectboardback[1] = xelectboardback[0];
5941 xelectboardback[2] = fgkEndCapCardElectBoardBackLength[0];
5942 xelectboardback[3] = xelectboardback[2];
5943 xelectboardback[4] = xelectboardback[3]-fgkEndCapCardElectBoardBackLength[1];
5944 xelectboardback[5] = xelectboardback[4];
5945 xelectboardback[6] = fgkEndCapCardElectBoardBackLength[1];
5946 xelectboardback[7] = xelectboardback[6];
5948 yelectboardback[0] = 0.0;
5949 yelectboardback[1] = fgkEndCapCardElectBoardBackWidth[0];
5950 yelectboardback[2] = yelectboardback[1];
5951 yelectboardback[3] = yelectboardback[0];
5952 yelectboardback[4] = yelectboardback[3];
5953 yelectboardback[5] = yelectboardback[4]+fgkEndCapCardElectBoardBackWidth[1];
5954 yelectboardback[6] = yelectboardback[5];
5955 yelectboardback[7] = yelectboardback[4];
5956 TGeoXtru* electboardbackshape = new TGeoXtru(2);
5957 electboardbackshape->DefinePolygon(kelectboardbackvertexnumber,
5958 xelectboardback,yelectboardback);
5959 electboardbackshape->DefineSection(0,0.0);
5960 electboardbackshape->DefineSection(1,fgkEndCapCardElectBoardBackThickness);
5961 TGeoVolume* electboardback = new TGeoVolume("EndCapCardElectBoardBackPlane",
5962 electboardbackshape,fSSDSupportRingAl);
5963 electboardback->SetLineColor(fColorAl);
5964 // Electronic Board Kapton Layer
5965 const Int_t kelectlayervertexnumber = 8;
5966 Double_t xelectlayer[kelectlayervertexnumber];
5967 Double_t yelectlayer[kelectlayervertexnumber];
5968 xelectlayer[0] = fgkEndCapCardElectBoardBackLength[0]-fgkEndCapCardElectBoardLength;
5969 xelectlayer[1] = xelectlayer[0];
5970 xelectlayer[2] = fgkEndCapCardElectBoardLength;
5971 xelectlayer[3] = xelectlayer[2];
5972 for(Int_t i=4; i<kelectlayervertexnumber; i++) xelectlayer[i] = xelectboardback[i];
5974 yelectlayer[0] = 0.0;
5975 yelectlayer[1] = fgkEndCapCardElectBoardLayerWidth[0];
5976 yelectlayer[2] = yelectlayer[1];
5977 yelectlayer[3] = yelectlayer[0];
5978 yelectlayer[4] = yelectlayer[3];
5979 yelectlayer[5] = yelectlayer[4]+fgkEndCapCardElectBoardLayerWidth[1];
5980 yelectlayer[6] = yelectlayer[5];
5981 yelectlayer[7] = yelectlayer[4];
5982 TGeoXtru* electlayershape = new TGeoXtru(2);
5983 electlayershape->DefinePolygon(kelectlayervertexnumber,xelectlayer,yelectlayer);
5984 electlayershape->DefineSection(0,0.0);
5985 electlayershape->DefineSection(1,fgkEndCapCardElectBoardLayerThickness);
5986 TGeoVolume* electlayer = new TGeoVolume("EndCapCardElectBoardLayer",
5987 electlayershape,fSSDKaptonFlexMedium);
5988 electlayer->SetLineColor(fColorKapton);
5989 // JMD Connector Female
5990 const Int_t kjmdconnectorvertexnumber = 6;
5991 Double_t xjmdconnectorvertex[kjmdconnectorvertexnumber];
5992 Double_t yjmdconnectorvertex[kjmdconnectorvertexnumber];
5993 xjmdconnectorvertex[0] = 0.0;
5994 xjmdconnectorvertex[1] = xjmdconnectorvertex[0];
5995 xjmdconnectorvertex[2] = fgkEndCapCardJMDConnectorLength[1];
5996 xjmdconnectorvertex[3] = xjmdconnectorvertex[2];
5997 xjmdconnectorvertex[4] = fgkEndCapCardJMDConnectorLength[0];
5998 xjmdconnectorvertex[5] = xjmdconnectorvertex[4];
6000 yjmdconnectorvertex[0] = 0.0;
6001 yjmdconnectorvertex[1] = fgkEndCapCardJMDConnectorWidth[0];
6002 yjmdconnectorvertex[2] = yjmdconnectorvertex[1];
6003 yjmdconnectorvertex[3] = yjmdconnectorvertex[2]+fgkEndCapCardJMDConnectorWidth[1];
6004 yjmdconnectorvertex[4] = yjmdconnectorvertex[3];
6005 yjmdconnectorvertex[5] = yjmdconnectorvertex[0];
6006 TGeoXtru* jmdconnectorshape = new TGeoXtru(2);
6007 jmdconnectorshape->DefinePolygon(kjmdconnectorvertexnumber,xjmdconnectorvertex,
6008 yjmdconnectorvertex);
6009 jmdconnectorshape->DefineSection(0,0.0);
6010 jmdconnectorshape->DefineSection(1,fgkEndCapCardJMDConnectorThickness);
6011 TGeoVolume* jmdconnector = new TGeoVolume("EndCapCardJMDConnector",
6012 jmdconnectorshape,fSSDMountingBlockMedium);
6013 jmdconnector->SetLineColor(fColorG10);
6014 // Top Cable Connector
6015 const Int_t kcableconnectorvertexnumber = 8;
6016 Double_t xconnectorvertex[kcableconnectorvertexnumber];
6017 Double_t yconnectorvertex[kcableconnectorvertexnumber];
6018 xconnectorvertex[0] = 0.0;
6019 xconnectorvertex[1] = xconnectorvertex[0];
6020 xconnectorvertex[2] = xconnectorvertex[1]+fgkEndCapCardCableConnectorLength[1];
6021 xconnectorvertex[3] = xconnectorvertex[2];
6022 xconnectorvertex[4] = fgkEndCapCardCableConnectorLength[0]
6023 - fgkEndCapCardCableConnectorLength[2];
6024 xconnectorvertex[5] = xconnectorvertex[4];
6025 xconnectorvertex[6] = fgkEndCapCardCableConnectorLength[0];
6026 xconnectorvertex[7] = xconnectorvertex[6];
6028 yconnectorvertex[0] = 0.0;
6029 yconnectorvertex[1] = fgkEndCapCardCableConnectorWidth[0];
6030 yconnectorvertex[2] = yconnectorvertex[1];
6031 yconnectorvertex[3] = fgkEndCapCardCableConnectorWidth[1];
6032 yconnectorvertex[4] = yconnectorvertex[3];
6033 yconnectorvertex[5] = yconnectorvertex[1];
6034 yconnectorvertex[6] = yconnectorvertex[5];
6035 yconnectorvertex[7] = yconnectorvertex[0];
6036 TGeoXtru* cableconnectorshape = new TGeoXtru(2);
6037 cableconnectorshape->DefinePolygon(kcableconnectorvertexnumber,xconnectorvertex,
6039 cableconnectorshape->DefineSection(0,0.0);
6040 cableconnectorshape->DefineSection(1,fgkEndCapCardCableConnectorThickness);
6041 TGeoVolume* cableconnector = new TGeoVolume("EndCapCardTopCableConnector",
6042 cableconnectorshape,fSSDMountingBlockMedium);
6043 cableconnector->SetLineColor(fColorG10);
6045 TGeoBBox* endcapstripconnectionshape =
6046 new TGeoBBox(0.5*fgkEndCapStripConnectionLength,
6047 0.5*fgkEndCapStripConnectionThickness,
6048 0.5*fgkEndCapStripConnectionWidth);
6049 TGeoVolume* endcapstripconnection = new TGeoVolume("EndCapStripConnection",
6050 endcapstripconnectionshape,
6052 endcapstripconnection->SetLineColor(fColorAl);
6054 const Int_t kcardBvertexnumber = 12;
6055 Double_t xcardBvertexnumber[kcardBvertexnumber];
6056 Double_t ycardBvertexnumber[kcardBvertexnumber];
6058 xcardBvertexnumber[0] = 0.0;
6059 xcardBvertexnumber[1] = xcardBvertexnumber[0];
6060 xcardBvertexnumber[2] = xcardBvertexnumber[1]+fgkEndCapInterfaceCardBLength[0];
6061 xcardBvertexnumber[3] = xcardBvertexnumber[2];
6062 xcardBvertexnumber[4] = xcardBvertexnumber[1];
6063 xcardBvertexnumber[5] = xcardBvertexnumber[4];
6064 xcardBvertexnumber[6] = xcardBvertexnumber[5]+fgkEndCapInterfaceCardBLength[1];
6065 xcardBvertexnumber[7] = xcardBvertexnumber[6];
6066 xcardBvertexnumber[8] = xcardBvertexnumber[7]-fgkEndCapInterfaceCardBLength[0];
6067 xcardBvertexnumber[9] = xcardBvertexnumber[8];
6068 xcardBvertexnumber[10] = xcardBvertexnumber[7];
6069 xcardBvertexnumber[11] = xcardBvertexnumber[10];
6071 ycardBvertexnumber[0] = 0.0;
6072 ycardBvertexnumber[1] = fgkEndCapInterfaceCardBWidth[0];
6073 ycardBvertexnumber[2] = ycardBvertexnumber[1];
6074 ycardBvertexnumber[3] = ycardBvertexnumber[2]+fgkEndCapInterfaceCardBWidth[1];
6075 ycardBvertexnumber[4] = ycardBvertexnumber[3];
6076 ycardBvertexnumber[5] = ycardBvertexnumber[4]+fgkEndCapInterfaceCardBWidth[2];
6077 ycardBvertexnumber[6] = ycardBvertexnumber[5];
6078 ycardBvertexnumber[7] = ycardBvertexnumber[4];
6079 ycardBvertexnumber[8] = ycardBvertexnumber[7];
6080 ycardBvertexnumber[9] = ycardBvertexnumber[1];
6081 ycardBvertexnumber[10] = ycardBvertexnumber[9];
6082 ycardBvertexnumber[11] = ycardBvertexnumber[0];
6084 TGeoXtru* interfacecardBshape = new TGeoXtru(2);
6085 interfacecardBshape->DefinePolygon(kcardBvertexnumber,xcardBvertexnumber,ycardBvertexnumber);
6086 interfacecardBshape->DefineSection(0,0.);
6087 interfacecardBshape->DefineSection(1,fgkEndCapInterfaceCardBThickness);
6088 TGeoVolume* interfacecardB = new TGeoVolume("EndCapInterfaceCardB",interfacecardBshape,
6089 fSSDMountingBlockMedium);
6090 interfacecardB->SetLineColor(46);
6091 // Interface Card B Electronic Board
6092 const Int_t kelectboardcardBvertexnumber = 14;
6093 Double_t xelectboardcardBvertex[kelectboardcardBvertexnumber];
6094 Double_t yelectboardcardBvertex[kelectboardcardBvertexnumber];
6096 xelectboardcardBvertex[0] = xcardBvertexnumber[0]+fgkEndCapInterfaceCardBLength[2];
6097 xelectboardcardBvertex[1] = xelectboardcardBvertex[0];
6098 xelectboardcardBvertex[2] = xelectboardcardBvertex[1]+fgkEndCapInterfaceCardBLength[3];
6099 xelectboardcardBvertex[3] = xelectboardcardBvertex[2];
6100 xelectboardcardBvertex[4] = xelectboardcardBvertex[3]+fgkEndCapInterfaceCardBLength[4];
6101 xelectboardcardBvertex[5] = xelectboardcardBvertex[4];
6102 xelectboardcardBvertex[6] = xelectboardcardBvertex[5]+fgkEndCapInterfaceCardBLength[5];
6103 xelectboardcardBvertex[7] = xelectboardcardBvertex[6];
6104 xelectboardcardBvertex[8] = xelectboardcardBvertex[7]+8.0*fgkEndCapInterfaceCardBLength[4];
6105 xelectboardcardBvertex[9] = xelectboardcardBvertex[8];
6106 xelectboardcardBvertex[10] = xelectboardcardBvertex[9]+fgkEndCapInterfaceCardBLength[6];
6107 xelectboardcardBvertex[11] = xelectboardcardBvertex[10];
6108 xelectboardcardBvertex[12] = xelectboardcardBvertex[11]-9.0*fgkEndCapInterfaceCardBLength[4];
6109 xelectboardcardBvertex[13] = xelectboardcardBvertex[12];
6111 yelectboardcardBvertex[0] = ycardBvertexnumber[0]+fgkEndCapInterfaceCardBWidth[1];
6112 yelectboardcardBvertex[1] = yelectboardcardBvertex[0]+fgkEndCapInterfaceCardBWidth[3];
6113 yelectboardcardBvertex[2] = yelectboardcardBvertex[1];
6114 yelectboardcardBvertex[3] = yelectboardcardBvertex[2]+fgkEndCapInterfaceCardBWidth[3];
6115 yelectboardcardBvertex[4] = yelectboardcardBvertex[3];
6116 yelectboardcardBvertex[5] = yelectboardcardBvertex[2];
6117 yelectboardcardBvertex[6] = yelectboardcardBvertex[5];
6118 yelectboardcardBvertex[7] = yelectboardcardBvertex[6]+fgkEndCapInterfaceCardBWidth[4];
6119 yelectboardcardBvertex[8] = yelectboardcardBvertex[7];
6120 yelectboardcardBvertex[9] = yelectboardcardBvertex[8]-fgkEndCapInterfaceCardBWidth[3];
6121 yelectboardcardBvertex[10] = yelectboardcardBvertex[9];
6122 yelectboardcardBvertex[11] = yelectboardcardBvertex[10]-fgkEndCapInterfaceCardBWidth[3];
6123 yelectboardcardBvertex[12] = yelectboardcardBvertex[11];
6124 yelectboardcardBvertex[13] = yelectboardcardBvertex[0];
6126 TGeoXtru* electboardcardBshape = new TGeoXtru(2);
6127 electboardcardBshape->DefinePolygon(kelectboardcardBvertexnumber,
6128 xelectboardcardBvertex,yelectboardcardBvertex);
6129 electboardcardBshape->DefineSection(0,fgkEndCapInterfaceCardBThickness);
6130 electboardcardBshape->DefineSection(1,fgkEndCapInterfaceCardBThickness
6131 + fgkEndCapInterfaceElectBoardCardBThickness);
6132 TGeoVolume* electboardcardB = new TGeoVolume("EndCapInterfaceElectBoardCardB",electboardcardBshape,
6134 electboardcardB->SetLineColor(fColorAl);
6135 // Generating Stiffener 2
6136 TGeoBBox* endcapstiffenershape = new TGeoBBox(0.5*fgkEndCapStiffenerWidth,
6137 0.5*fgkEndCapStiffenerThickness,
6138 0.5*fgkEndCapStiffenerLength);
6139 TGeoVolume* endcapstiffener = new TGeoVolume("EndCapStiffener",endcapstiffenershape,fSSDSupportRingAl);
6140 endcapstiffener->SetLineColor(fColorAl);
6141 // Generating Mother Interface Card B Container
6142 const Int_t kinterfacecardBmothervertexnumber = 10;
6143 Double_t xinterfacecardBmothervertex[kinterfacecardBmothervertexnumber];
6144 Double_t yinterfacecardBmothervertex[kinterfacecardBmothervertexnumber];
6146 xinterfacecardBmothervertex[0] = 0.0;
6147 xinterfacecardBmothervertex[1] = xinterfacecardBmothervertex[0];
6148 xinterfacecardBmothervertex[2] = xinterfacecardBmothervertex[1]
6149 + fgkEndCapInterfaceCardBThickness;
6150 xinterfacecardBmothervertex[3] = xinterfacecardBmothervertex[2];
6151 xinterfacecardBmothervertex[4] = xinterfacecardBmothervertex[3]
6152 + fgkEndCapInterfaceElectBoardCardBThickness;
6153 xinterfacecardBmothervertex[5] = xinterfacecardBmothervertex[4];
6154 xinterfacecardBmothervertex[6] = xinterfacecardBmothervertex[3];
6155 xinterfacecardBmothervertex[7] = xinterfacecardBmothervertex[6];
6156 xinterfacecardBmothervertex[8] = xinterfacecardBmothervertex[7]
6157 + fgkEndCapCardJMDConnectorLength[0];
6158 xinterfacecardBmothervertex[9] = xinterfacecardBmothervertex[8];
6160 yinterfacecardBmothervertex[0] = 0.0;
6161 yinterfacecardBmothervertex[1] = fgkEndCapInterfaceCardBWidth[0]
6162 + fgkEndCapInterfaceCardBWidth[1]
6163 + fgkEndCapInterfaceCardBWidth[2];
6164 yinterfacecardBmothervertex[2] = yinterfacecardBmothervertex[1];
6165 yinterfacecardBmothervertex[3] = yelectboardcardBvertex[3];
6166 yinterfacecardBmothervertex[4] = yinterfacecardBmothervertex[3];
6167 yinterfacecardBmothervertex[5] = yelectboardcardBvertex[11];
6168 yinterfacecardBmothervertex[6] = yinterfacecardBmothervertex[5];
6169 yinterfacecardBmothervertex[7] = fgkEndCapCardElectBoardLayerWidth[1]
6170 + fgkEndCapCardJMDConnectorWidth[0]
6171 + fgkEndCapCardJMDConnectorWidth[1];
6172 yinterfacecardBmothervertex[8] = yinterfacecardBmothervertex[7];
6173 yinterfacecardBmothervertex[9] = yinterfacecardBmothervertex[0];
6174 TGeoXtru* interfacecardBmothershape = new TGeoXtru(2);
6175 interfacecardBmothershape->DefinePolygon(kinterfacecardBmothervertexnumber,
6176 xinterfacecardBmothervertex,
6177 yinterfacecardBmothervertex);
6178 interfacecardBmothershape->DefineSection(0,-1.e-15);
6179 interfacecardBmothershape->DefineSection(1,fgkEndCapInterfaceCardBLength[1]);
6180 TGeoVolume* interfacecardBmother = new TGeoVolume("EndCapInterfaceCardBMother",
6181 interfacecardBmothershape,fSSDAir);
6182 electboardcardB->SetLineColor(fColorAl);
6183 // Positioning Volumes Mother Interface Card B Container
6184 TGeoRotation* interfacecardBrot = new TGeoRotation();
6185 TGeoTranslation* interfacecardBtrans = new TGeoTranslation();
6186 interfacecardBrot->SetAngles(90.,-90.,-90.);
6187 interfacecardBtrans->SetTranslation(fgkEndCapInterfaceCardBThickness,0.,0.);
6188 TGeoCombiTrans* interfacecardBcombitrans = new TGeoCombiTrans(*interfacecardBtrans,*interfacecardBrot);
6189 TGeoRotation* electboardcardBrot = new TGeoRotation();
6190 TGeoTranslation* electboardcardBtrans = new TGeoTranslation();
6191 electboardcardBrot->SetAngles(90.,90.,-90.);
6192 electboardcardBtrans->SetTranslation(0.,0.,fgkEndCapInterfaceCardBLength[1]);
6193 TGeoCombiTrans* electboardcardBcombitrans =
6194 new TGeoCombiTrans(*electboardcardBtrans,*electboardcardBrot);
6195 interfacecardBmother->AddNode(interfacecardB,1,interfacecardBcombitrans);
6196 interfacecardBmother->AddNode(electboardcardB,1,electboardcardBcombitrans);
6197 TGeoRotation* jmdconnectorcardBrot = new TGeoRotation();
6198 jmdconnectorcardBrot->SetAngles(90.,180.,-90.);
6199 TGeoTranslation* jmdconnectorcardBtrans[3];
6200 TGeoCombiTrans* jmdconnectorcardBcombitrans[3];
6201 for(Int_t i=0; i<3; i++){
6202 jmdconnectorcardBtrans[i] = new TGeoTranslation(fgkEndCapInterfaceCardBThickness
6203 + fgkEndCapCardJMDConnectorLength[0],
6204 fgkEndCapCardElectBoardLayerWidth[1],
6205 0.5*fgkEndCapCardJMDConnectorThickness
6206 + 0.5*(fgkEndCapInterfaceCardBLength[1]
6207 - 2.*fgkEndCapInterfaceCardBJMDConnectorSeparation)
6208 + i *fgkEndCapInterfaceCardBJMDConnectorSeparation);
6209 jmdconnectorcardBcombitrans[i] = new TGeoCombiTrans(*jmdconnectorcardBtrans[i],
6210 *jmdconnectorcardBrot);
6211 interfacecardBmother->AddNode(jmdconnector,i+1,jmdconnectorcardBcombitrans[i]);
6213 // Mother Supply Card Container
6214 TGeoVolumeAssembly* mothersupplycard = new TGeoVolumeAssembly("EndCapCardMotherSupply");
6215 // Interface Card Container
6216 TGeoVolumeAssembly* motherinterfacecardcontainer = new TGeoVolumeAssembly("EndCapMotherInterfaceCardA");
6217 // Placing Volumes in Mother Supply Card Container
6218 // JMD Connector Positioning
6219 TGeoTranslation* jmdconnectortrans[2];
6220 for(Int_t i=0; i<2; i++) jmdconnectortrans[i] = new TGeoTranslation();
6221 jmdconnectortrans[0]->SetTranslation(0.,fgkEndCapCardElectBoardLayerWidth[1],
6222 fgkEndCapCardElectBoardBackLength[0]
6223 - fgkEndCapCardJMDConnectorThickness
6224 - fgkEndCapCardJMDConnectorToLayer);
6225 TGeoRotation* jmdconnectorot = new TGeoRotation();
6226 jmdconnectortrans[1]->SetTranslation(fgkEndCapCardElectBoardBackThickness
6227 + 2.*fgkEndCapCardJMDConnectorLength[0]
6228 + 2.*fgkEndCapCardElectBoardLayerThickness,
6229 fgkEndCapCardElectBoardLayerWidth[1],
6230 fgkEndCapCardJMDConnectorThickness
6231 + fgkEndCapCardJMDConnectorToLayer);
6232 jmdconnectorot->SetAngles(90.,180.,-90);
6233 TGeoCombiTrans* jmdconnectorcombitrans = new TGeoCombiTrans(*jmdconnectortrans[1],
6235 mothersupplycard->AddNode(jmdconnector,1,jmdconnectortrans[0]);
6236 mothersupplycard->AddNode(jmdconnector,2,jmdconnectorcombitrans);
6237 // Top Cable Connector Placing
6238 TGeoRotation* cableconnectorot[2];
6239 for(Int_t i=0; i<2; i++) cableconnectorot[i] = new TGeoRotation();
6240 TGeoTranslation* cableconnectortrans[3];
6241 for(Int_t i=0; i<3; i++) cableconnectortrans[i] = new TGeoTranslation();
6242 cableconnectorot[0]->SetAngles(90.,0.,0.);
6243 cableconnectorot[1]->SetAngles(0.,-90.,0.);
6244 cableconnectortrans[0]->SetTranslation(fgkEndCapCardJMDConnectorLength[0],0.,0.);
6245 TGeoCombiTrans* cableconnectorcombitrans = new TGeoCombiTrans(*cableconnectortrans[0],
6246 *cableconnectorot[0]);
6247 TGeoHMatrix* cableconnectormatrix[2];
6248 for(Int_t i=0; i<2; i++) cableconnectormatrix[i] =
6249 new TGeoHMatrix((*cableconnectorot[1])
6250 *(*cableconnectorcombitrans));
6251 cableconnectortrans[1]->SetTranslation(0.,fgkEndCapCardElectBoardLayerWidth[0]
6252 - fgkEndCapCardCableConnectorThickness,
6253 fgkEndCapCardCableConnectorLength[0]
6254 + fgkEndCapCardCableConnectorToLayer);
6255 cableconnectortrans[2]->SetTranslation(0.,fgkEndCapCardElectBoardLayerWidth[0]
6256 - 2.*fgkEndCapCardCableConnectorThickness
6257 - fgkEndCapCardCableConnectorDistance,
6258 fgkEndCapCardCableConnectorLength[0]
6259 + fgkEndCapCardCableConnectorToLayer);
6260 for(Int_t i=0; i<2; i++){
6261 cableconnectormatrix[i]->MultiplyLeft(cableconnectortrans[i+1]);
6262 mothersupplycard->AddNode(cableconnector,i+1,cableconnectormatrix[i]);
6264 TGeoRotation* electboardbackrot = new TGeoRotation();
6265 TGeoTranslation* electboardbacktrans = new TGeoTranslation();
6266 electboardbackrot->SetAngles(90.,-90.,-90.);
6267 electboardbacktrans->SetTranslation(fgkEndCapCardElectBoardBackThickness
6268 + fgkEndCapCardJMDConnectorLength[0]
6269 + fgkEndCapCardElectBoardLayerThickness,0.,0.);
6270 TGeoCombiTrans* electboardbackcombitrans = new TGeoCombiTrans(*electboardbacktrans,
6271 *electboardbackrot);
6272 mothersupplycard->AddNode(electboardback,1,electboardbackcombitrans);
6273 // Electronic Board Kapton Layer Positioning
6274 TGeoRotation* electlayerrot = new TGeoRotation();
6275 TGeoTranslation* electlayertrans[2];
6276 TGeoCombiTrans* electlayercombitrans[2];
6277 for(Int_t i=0; i<2; i++) electlayertrans[i] = new TGeoTranslation();
6278 electlayerrot->SetAngles(90.,-90.,-90.);
6279 electlayertrans[0]->SetTranslation(fgkEndCapCardJMDConnectorLength[0]
6280 + fgkEndCapCardElectBoardLayerThickness,0.,0.);
6281 electlayertrans[1]->SetTranslation(fgkEndCapCardJMDConnectorLength[0]
6282 + 2.*fgkEndCapCardElectBoardLayerThickness
6283 + fgkEndCapCardElectBoardBackThickness,0.,0.);
6284 for(Int_t i=0; i<2; i++){
6285 electlayercombitrans[i] = new TGeoCombiTrans(*electlayertrans[i],*electlayerrot);
6286 mothersupplycard->AddNode(electlayer,i+1,electlayercombitrans[i]);
6288 // Placing Volumes in Mother Interface Card Container
6289 motherinterfacecardcontainer->AddNode(jmdconnector,1,jmdconnectorcombitrans);
6290 motherinterfacecardcontainer->AddNode(electboardback,1,electboardbackcombitrans);
6291 for(Int_t i=0; i<2; i++){
6292 motherinterfacecardcontainer->AddNode(electlayer,i+1,electlayercombitrans[i]);
6294 /////////////////////////////////////////////////////////////
6295 // Generation of Card Interface Container
6296 /////////////////////////////////////////////////////////////
6297 Double_t stiffenertransx = fgkEndCapKaptonFoilWidth-fgkEndCapStiffenerWidth
6298 - fgkEndCapCardJMDConnectorLength[0]
6299 - fgkEndCapInterfaceCardBThickness
6300 - 9.*fgkEndCapStripConnectionThickness
6301 - 8.*fgkEndCapCardElectBoardBackThickness;
6302 const Int_t kcardinterfacecontainervertexnumber = 14;
6303 Double_t xcardinterfacecontainervertex[kcardinterfacecontainervertexnumber];
6304 Double_t ycardinterfacecontainervertex[kcardinterfacecontainervertexnumber];
6305 xcardinterfacecontainervertex[0] =-6.5*fgkEndCapCardElectBoardBackThickness
6306 - 7.0*fgkEndCapStripConnectionThickness;
6307 xcardinterfacecontainervertex[1] = xcardinterfacecontainervertex[0];
6308 xcardinterfacecontainervertex[2] = xcardinterfacecontainervertex[1]
6309 + fgkEndCapStripConnectionThickness
6310 - fgkEndCapCardElectBoardLayerThickness
6311 - fgkEndCapCardCableConnectorWidth[0];
6312 xcardinterfacecontainervertex[3] = xcardinterfacecontainervertex[2];
6313 xcardinterfacecontainervertex[4] = xcardinterfacecontainervertex[1];
6314 xcardinterfacecontainervertex[5] = xcardinterfacecontainervertex[4];
6315 xcardinterfacecontainervertex[6] = 1.5*fgkEndCapCardElectBoardBackThickness
6316 + 2.0*fgkEndCapStripConnectionThickness;
6317 xcardinterfacecontainervertex[7] = xcardinterfacecontainervertex[6];
6318 xcardinterfacecontainervertex[8] = xcardinterfacecontainervertex[7]
6319 + fgkEndCapInterfaceCardBThickness;
6320 xcardinterfacecontainervertex[9] = xcardinterfacecontainervertex[8];
6321 xcardinterfacecontainervertex[10] = xcardinterfacecontainervertex[9]
6322 + fgkEndCapInterfaceElectBoardCardBThickness;
6323 xcardinterfacecontainervertex[11] = xcardinterfacecontainervertex[10];
6324 xcardinterfacecontainervertex[12] = xcardinterfacecontainervertex[11]
6325 - fgkEndCapInterfaceElectBoardCardBThickness
6326 + fgkEndCapCardJMDConnectorLength[0]
6327 + stiffenertransx+fgkEndCapStiffenerWidth;
6328 xcardinterfacecontainervertex[13] = xcardinterfacecontainervertex[12];
6330 ycardinterfacecontainervertex[0] = 0.;
6331 ycardinterfacecontainervertex[1] = fgkEndCapCardElectBoardLayerWidth[1]
6332 + fgkEndCapCardJMDConnectorWidth[0]
6333 + fgkEndCapCardJMDConnectorWidth[1];
6334 ycardinterfacecontainervertex[2] = ycardinterfacecontainervertex[1];
6335 ycardinterfacecontainervertex[3] = fgkEndCapCardElectBoardBackWidth[0]
6336 - fgkEndCapStripConnectionWidth;
6337 ycardinterfacecontainervertex[4] = ycardinterfacecontainervertex[3];
6338 ycardinterfacecontainervertex[5] = fgkEndCapCardElectBoardBackWidth[0];
6339 ycardinterfacecontainervertex[6] = ycardinterfacecontainervertex[5];
6340 ycardinterfacecontainervertex[7] = fgkEndCapInterfaceCardBWidth[0]
6341 + fgkEndCapInterfaceCardBWidth[1]
6342 + fgkEndCapInterfaceCardBWidth[2];
6343 ycardinterfacecontainervertex[8] = ycardinterfacecontainervertex[7];
6344 ycardinterfacecontainervertex[9] = yelectboardcardBvertex[3];
6345 ycardinterfacecontainervertex[10] = ycardinterfacecontainervertex[9];
6346 ycardinterfacecontainervertex[11] = ycardinterfacecontainervertex[1];
6347 ycardinterfacecontainervertex[12] = ycardinterfacecontainervertex[11];
6348 ycardinterfacecontainervertex[13] = ycardinterfacecontainervertex[0];
6350 TGeoXtru* interfacecardmothershape = new TGeoXtru(2);
6351 interfacecardmothershape->DefinePolygon(kcardinterfacecontainervertexnumber,
6352 xcardinterfacecontainervertex,
6353 ycardinterfacecontainervertex);
6354 interfacecardmothershape->DefineSection(0,-1.e-15-0.5*(fgkEndCapStiffenerLength
6355 - fgkEndCapCardElectBoardBackLength[0]));
6356 interfacecardmothershape->DefineSection(1,0.5*(fgkEndCapStiffenerLength
6357 + fgkEndCapCardElectBoardBackLength[0]));
6358 TGeoVolume** cardinterfacecontainer;
6359 cardinterfacecontainer = new TGeoVolume*[4];
6360 cardinterfacecontainer[0] = new TGeoVolume("EndCapCardsContainerLayer5Sx",
6361 interfacecardmothershape,fSSDAir);
6362 cardinterfacecontainer[1] = new TGeoVolume("EndCapCardsContainerLayer5Dx",
6363 interfacecardmothershape,fSSDAir);
6364 cardinterfacecontainer[2] = new TGeoVolume("EndCapCardsContainerLayer6Sx",
6365 interfacecardmothershape,fSSDAir);
6366 cardinterfacecontainer[3] = new TGeoVolume("EndCapCardsContainerLayer6Dx",
6367 interfacecardmothershape,fSSDAir);
6368 /////////////////////////////////
6369 // cardinterfacecontainer[0]: Card Container End Cap Layer 5 Bellegarde Side
6370 // cardinterfacecontainer[1]: Card Container End Cap Layer 5 Gex Side
6371 // cardinterfacecontainer[2]: Card Container End Cap Layer 6 Bellegarde Side
6372 // cardinterfacecontainer[3]: Card Container End Cap Layer 6 Gex Side
6373 /////////////////////////////////
6374 TGeoRotation* endcapstripconnectionrot[2];
6375 for(Int_t i=0; i<2; i++) endcapstripconnectionrot[i] = new TGeoRotation();
6376 endcapstripconnectionrot[0]->SetAngles(0.,90.,0.);
6377 endcapstripconnectionrot[1]->SetAngles(90.,90.,-90.);
6378 TGeoHMatrix* endcapstripconnectionmatrix = new TGeoHMatrix((*endcapstripconnectionrot[1])
6379 * (*endcapstripconnectionrot[0]));
6380 TGeoTranslation* endcapstripconnectiontrans = new TGeoTranslation();
6381 endcapstripconnectiontrans->SetTranslation(-endcapstripconnectionshape->GetDY()
6382 -0.5*fgkEndCapCardElectBoardBackThickness,
6383 fgkEndCapCardElectBoardBackWidth[0]
6384 -endcapstripconnectionshape->GetDZ(),
6385 0.5*fgkEndCapCardElectBoardBackLength[0]);
6386 endcapstripconnectionmatrix->MultiplyLeft(endcapstripconnectiontrans);
6387 TGeoTranslation* cardinterfacetrans[9];
6388 TGeoHMatrix* cardinterfacematrix[9];
6389 for(Int_t i=0; i<7; i++){
6390 cardinterfacetrans[i] = new TGeoTranslation(-i*(fgkEndCapStripConnectionThickness
6391 + fgkEndCapCardElectBoardBackThickness),
6393 cardinterfacematrix[i] = new TGeoHMatrix((*cardinterfacetrans[i])
6394 * (*endcapstripconnectionmatrix));
6396 cardinterfacetrans[7] = new TGeoTranslation((fgkEndCapStripConnectionThickness
6397 + fgkEndCapCardElectBoardBackThickness),
6399 cardinterfacematrix[7] = new TGeoHMatrix((*cardinterfacetrans[7])
6400 * (*endcapstripconnectionmatrix));
6401 cardinterfacetrans[8] = new TGeoTranslation(2.*(fgkEndCapStripConnectionThickness
6402 + fgkEndCapCardElectBoardBackThickness),
6404 cardinterfacematrix[8] = new TGeoHMatrix((*cardinterfacetrans[8])
6405 * (*endcapstripconnectionmatrix));
6407 for(Int_t i=0; i<4; i++){
6408 cardinterfacecontainer[i]->AddNode(endcapstripconnection,1,
6409 cardinterfacematrix[7]);
6410 cardinterfacecontainer[i]->AddNode(endcapstripconnection,2,
6411 cardinterfacematrix[8]);
6413 TGeoTranslation* mothersupplycardtrans =
6414 new TGeoTranslation(-0.5*(fgkEndCapCardElectBoardBackThickness
6415 + 2.*fgkEndCapCardJMDConnectorLength[0]
6416 + 2.*fgkEndCapCardElectBoardLayerThickness),0.0,0.0);
6417 TGeoHMatrix* mothersupplycardmatrix[7];
6418 Int_t index[4] = {1,1,1,1};
6419 for(Int_t i=0; i<7; i++){
6420 mothersupplycardmatrix[i] = new TGeoHMatrix((*cardinterfacetrans[i])
6421 * (*mothersupplycardtrans));
6422 for(Int_t j=0; j<4; j++){
6424 case 0: //Layer5 EndCap Left Side
6425 cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
6426 cardinterfacematrix[i]);
6428 cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
6429 mothersupplycardmatrix[i]);
6434 case 1: //Layer5 EndCap Rigth Side
6435 cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
6436 cardinterfacematrix[i]);
6438 cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
6439 mothersupplycardmatrix[i]);
6443 case 2: //Layer6 EndCap Left Side
6444 cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
6445 cardinterfacematrix[i]);
6447 cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
6448 mothersupplycardmatrix[i]);
6452 case 3: //Layer6 EndCap Right Side
6453 cardinterfacecontainer[j]->AddNode(endcapstripconnection,i+3,
6454 cardinterfacematrix[i]);
6455 cardinterfacecontainer[j]->AddNode(mothersupplycard,index[j],
6456 mothersupplycardmatrix[i]);
6462 // Positioning Interface
6463 TGeoTranslation* motherinterfacecardtrans =
6464 new TGeoTranslation( -fgkEndCapCardJMDConnectorLength[0]
6465 +0.5*fgkEndCapCardElectBoardBackThickness
6466 -fgkEndCapCardElectBoardLayerThickness
6467 +fgkEndCapStripConnectionThickness,0.,0.);
6468 for(Int_t i=0; i<4; i++) cardinterfacecontainer[i]->AddNode(
6469 motherinterfacecardcontainer,i+1,motherinterfacecardtrans);
6470 // Positioning Interface Card B
6471 TGeoTranslation* interfacecardBmothertrans =
6472 new TGeoTranslation(0.5 * fgkEndCapCardElectBoardBackThickness
6473 + 2.*fgkEndCapStripConnectionThickness
6474 + fgkEndCapCardElectBoardBackThickness,0.,
6475 -0.5 * (fgkEndCapInterfaceCardBLength[1]
6476 - fgkEndCapCardElectBoardBackLength[0]));
6477 for(Int_t i=0; i<4; i++) cardinterfacecontainer[i]->AddNode(interfacecardBmother,1,
6478 interfacecardBmothertrans);
6479 // Positioning Stiffener
6480 TGeoTranslation* endcapstiffenertrans =
6481 new TGeoTranslation(1.5*fgkEndCapCardElectBoardBackThickness
6482 + 2.0*fgkEndCapStripConnectionThickness
6483 + fgkEndCapInterfaceCardBThickness
6484 + fgkEndCapCardJMDConnectorLength[0]
6486 + endcapstiffenershape->GetDX(),endcapstiffenershape->GetDY(),
6487 endcapstiffenershape->GetDZ()
6488 - 0.5*(fgkEndCapStiffenerLength
6489 - fgkEndCapCardElectBoardBackLength[0]));
6490 for(Int_t i=0; i<4; i++) cardinterfacecontainer[i]->AddNode(endcapstiffener,1,endcapstiffenertrans);
6491 /////////////////////////////////////////////////////////////
6492 // Deallocating memory
6493 /////////////////////////////////////////////////////////////
6494 delete interfacecardBrot;
6495 delete interfacecardBtrans;
6496 delete electboardcardBtrans;
6497 delete electboardcardBrot;
6498 delete jmdconnectorcardBrot;
6499 for(Int_t i=0; i<3; i++) delete jmdconnectorcardBtrans[i];
6500 delete jmdconnectorot;
6501 delete jmdconnectortrans[1];
6502 for(Int_t i=0; i<2; i++) delete cableconnectorot[i];
6503 delete cableconnectorcombitrans;
6504 delete electboardbacktrans;
6505 delete electboardbackrot;
6506 delete electlayerrot;
6507 for(Int_t i=0; i<2; i++) delete electlayertrans[i];
6508 for(Int_t i=0; i<2; i++) delete endcapstripconnectionrot[i];
6509 delete mothersupplycardtrans;
6510 for(Int_t i=0; i<7; i++) delete cardinterfacetrans[i];
6511 /////////////////////////////////////////////////////////////
6512 return cardinterfacecontainer;
6514 ////////////////////////////////////////////////////////////////////////////////
6515 TGeoVolume** AliITSv11GeometrySSD::GetEndCapAssembly(){
6516 /////////////////////////////////////////////////////////////
6517 // Method returning EndCap Mother Volume
6518 /////////////////////////////////////////////////////////////
6519 const Int_t kendcapcoverplatesmallholenumber = 9;
6520 Double_t endcapmotherorigin[3];
6521 endcapmotherorigin[0] = -fgkEndCapCoverPlateLength[0]
6522 + 0.5 *(fgkEndCapCoverPlateLength[3]
6523 + 2.0 * fgkEndCapCoverPlateLength[2]);
6524 endcapmotherorigin[1] = - 0.5 * (fgkEndCapCoverPlateWidth[0]
6525 - fgkEndCapCoverPlateWidth[2]
6526 - (kendcapcoverplatesmallholenumber-1)
6527 * fgkEndCapCoverPlateSmallHoleSeparation[2])
6528 + 0.5*(fgkEndCapSideCoverLength[2]
6529 + fgkEndCapCoverPlateWidth[1]
6530 - fgkEndCapCoverPlateWidth[0])
6531 - (fgkEndCapCoverPlateWidth[1]
6532 - fgkEndCapCoverPlateWidth[0]);
6533 endcapmotherorigin[2] = 0.5*fgkEndCapCoverPlateThickness
6534 + 2.*fgkEndCapCoolingTubeRadiusMax
6535 - 0.5*(2.*fgkEndCapCoolingTubeRadiusMax
6536 + fgkEndCapSideCoverWidth[1]
6537 + fgkEndCapSideCoverThickness
6538 + fgkEndCapKaptonFoilThickness);
6539 TGeoBBox* endcapmothershape = new TGeoBBox(0.5*(fgkEndCapCoverPlateLength[3]
6540 + 2.0* fgkEndCapCoverPlateLength[2]
6541 + 2.0* fgkEndCapSideCoverThickness),
6542 0.5* (fgkEndCapSideCoverLength[2]
6543 + fgkEndCapCoverPlateWidth[1]
6544 - fgkEndCapCoverPlateWidth[0]),
6545 0.5* (2.*fgkEndCapCoolingTubeRadiusMax
6546 + fgkEndCapSideCoverWidth[1]
6547 + fgkEndCapSideCoverThickness
6548 + fgkEndCapKaptonFoilThickness),
6549 endcapmotherorigin);
6550 TGeoVolume** endcapassembly;
6551 endcapassembly = new TGeoVolume*[4];
6552 endcapassembly[0] = new TGeoVolume("EndCapContainerLayer5Sx",
6553 endcapmothershape,fSSDAir);
6554 endcapassembly[1] = new TGeoVolume("EndCapContainerLayer5Dx",
6555 endcapmothershape,fSSDAir);
6556 endcapassembly[2] = new TGeoVolume("EndCapContainerLayer6Sx",
6557 endcapmothershape,fSSDAir);
6558 endcapassembly[3] = new TGeoVolume("EndCapContainerLayer6Dx",
6559 endcapmothershape,fSSDAir);
6560 /////////////////////////////////
6561 // endcapassembly[0]: Container End Cap Layer 5 Bellegarde Side
6562 // endcapassembly[1]: Container End Cap Layer 5 Gex Side
6563 // endcapassembly[2]: Container End Cap Layer 6 Bellegarde Side
6564 // endcapassembly[3]: Container End Cap Layer 6 Gex Side
6565 /////////////////////////////////
6566 /////////////////////////////////////////////////////
6567 // Placing Endcap Cover Plate
6568 /////////////////////////////////////////////////////
6569 TGeoVolume* endcapcoverplate = GetEndCapCoverPlate();
6570 TGeoRotation* endcapcoverplaterot = new TGeoRotation();
6571 endcapcoverplaterot->SetAngles(90.0,180.0,-90.0);
6572 TGeoCombiTrans* endcapcoverplatecombitrans =
6573 new TGeoCombiTrans(-0.5*fgkEndCapCoverPlateLength[1],0.,0.,
6574 endcapcoverplaterot);
6575 TGeoTranslation* endcapcoverplatetrans =
6576 new TGeoTranslation(1.5*fgkEndCapCoverPlateLength[1],0.,0.);
6577 TGeoHMatrix* endcapcoverplatematrix =
6578 new TGeoHMatrix((*endcapcoverplatetrans)
6579 * (*endcapcoverplatecombitrans));
6580 for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapcoverplate,1,endcapcoverplatematrix);
6581 /////////////////////////////////////////////////////
6582 // Placing Endcap Side Cover
6583 /////////////////////////////////////////////////////
6584 TGeoVolume* endcapsidecover = GetEndCapSideCover();
6585 TGeoRotation* endcapsidecoverot[2];
6586 TGeoCombiTrans* endcapsidecovercombitrans[3];
6587 for(Int_t i=0; i<2; i++) endcapsidecoverot[i] = new TGeoRotation();
6588 endcapsidecoverot[0]->SetAngles(-90.,0.,0.);
6589 endcapsidecovercombitrans[0] = new TGeoCombiTrans(0.0,
6590 - 0.5*(fgkEndCapCoverPlateWidth[0]
6591 - fgkEndCapCoverPlateWidth[2]
6592 - (kendcapcoverplatesmallholenumber-1)
6593 * fgkEndCapCoverPlateSmallHoleSeparation[2])
6594 + 0.*fgkEndCapCoverPlateWidth[0]
6595 + fgkEndCapSideCoverLength[2],
6596 0.5*(fgkEndCapSideCoverThickness
6597 + fgkEndCapCoverPlateThickness)
6598 - 0.5*fgkEndCapCoverPlateThickness,
6599 endcapsidecoverot[0]);
6600 endcapsidecoverot[1]->SetAngles(90.,-90.,-90.);
6601 endcapsidecovercombitrans[1] = new TGeoCombiTrans(-fgkEndCapCoverPlateLength[0],0.0,
6602 0.5*fgkEndCapCoverPlateThickness
6603 -fgkEndCapSideCoverWidth[1],
6604 endcapsidecoverot[1]);
6605 endcapsidecovercombitrans[2] = new TGeoCombiTrans(-fgkEndCapCoverPlateLength[0]
6606 +fgkEndCapCoverPlateLength[3]
6607 +2.*fgkEndCapCoverPlateLength[2]
6608 +fgkEndCapSideCoverThickness,0.0,
6609 0.5*fgkEndCapCoverPlateThickness
6610 -fgkEndCapSideCoverWidth[1],
6611 endcapsidecoverot[1]);
6612 TGeoHMatrix* endcapsidecovermatrix[2];
6613 for(Int_t i=0; i<2; i++){
6614 endcapsidecovermatrix[i] = new TGeoHMatrix((*endcapsidecovercombitrans[i+1])
6615 * (*endcapsidecovercombitrans[0]));
6616 for(Int_t k=0; k<4; k++) endcapassembly[k]->AddNode(endcapsidecover,i+1,
6617 endcapsidecovermatrix[i]);
6619 /////////////////////////////////////////////////////
6620 // Placing Endcap Cooling Tube
6621 /////////////////////////////////////////////////////
6622 TGeoVolume* endcapcoolingtube = GetEndCapCoolingTube();
6623 TGeoRotation* endcapcoolingtuberot = new TGeoRotation();
6624 endcapcoolingtuberot->SetAngles(0.,180.,0.);
6625 TGeoCombiTrans* endcapccolingtubecombitrans
6626 = new TGeoCombiTrans(-0.5*(fgkEndCapCoolingTubeAxialRadius[0]
6627 + fgkEndCapCoolingTubeAxialRadius[1])
6628 + fgkEndCapCoverPlateLength[0]+fgkEndCapCoverPlateLength[1]
6629 - fgkEndCapCoolingTubeToCoverSide,
6630 fgkEndCapCoolingTubeAxialRadius[0],fgkEndCapCoolingTubeRadiusMax
6631 + 0.5*fgkEndCapCoverPlateThickness,endcapcoolingtuberot);
6632 for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapcoolingtube,1,
6633 endcapccolingtubecombitrans);
6634 /////////////////////////////////////////////////////
6636 /////////////////////////////////////////////////////
6637 Double_t screwcoverplateradius[2] = {fgkEndCapCoverPlateScrewRadiusMax,
6638 fgkEndCapCoverPlateScrewRadiusMin};
6639 Int_t screwcoverplatedgesnumber[2] = {20,20};
6640 Double_t screwcoverplatesection[2] = {0.5*fgkEndCapCoverPlateThickness,
6641 fgkEndCapCoverPlateThickness
6642 + fgkEndCapCoolingTubeRadiusMax};
6643 TGeoShape* screwcoverplateshape = GetScrewShape(screwcoverplateradius,
6644 screwcoverplatedgesnumber,
6645 screwcoverplatesection);
6646 TGeoVolume* screwcoverplate = new TGeoVolume("EndCapScrewCoverPlate",
6647 screwcoverplateshape,
6648 fSSDCoolingTubePhynox);
6649 screwcoverplate->SetLineColor(12);
6650 Double_t transx[4] = {0,
6651 fgkEndCapCoverPlateSmallHoleSeparation[0],
6652 fgkEndCapCoverPlateSmallHoleSeparation[0]
6653 + fgkEndCapCoverPlateSmallHoleSeparation[1],
6654 2.*fgkEndCapCoverPlateSmallHoleSeparation[0]
6655 + fgkEndCapCoverPlateSmallHoleSeparation[1]};
6656 const Int_t kendcapcoverplatescrewnumber[2] = {4,9};
6657 // TGeoTranslation** endcapcoverplatescrewtrans[kendcapcoverplatescrewnumber[0]];
6658 TGeoTranslation*** endcapcoverplatescrewtrans;
6659 endcapcoverplatescrewtrans = new TGeoTranslation**[kendcapcoverplatescrewnumber[0]];
6661 for(Int_t i=0; i<kendcapcoverplatescrewnumber[0]; i++){
6662 endcapcoverplatescrewtrans[i] =
6663 new TGeoTranslation*[kendcapcoverplatescrewnumber[1]];
6664 for(Int_t j=0; j<kendcapcoverplatescrewnumber[1]; j++){
6665 index = kendcapcoverplatescrewnumber[1]*i+j+1;
6666 if(index==1||index==9||index==28||index==36){
6667 endcapcoverplatescrewtrans[i][j] =
6668 new TGeoTranslation(transx[i],
6669 j*fgkEndCapCoverPlateSmallHoleSeparation[2],
6670 fgkEndCapSideCoverThickness);
6673 endcapcoverplatescrewtrans[i][j] =
6674 new TGeoTranslation(transx[i],
6675 j*fgkEndCapCoverPlateSmallHoleSeparation[2],
6679 for(Int_t k=0; k<4; k++) endcapassembly[k]->AddNode(screwcoverplate,index,
6680 endcapcoverplatescrewtrans[i][j]);
6683 /////////////////////////////////////////////////////
6684 // Placing Cover Plate Clips
6685 /////////////////////////////////////////////////////
6686 TGeoBBox* endcapcoverplateclipshape = new TGeoBBox(0.5*fgkEndCapCoverPlateClipLength,
6687 0.5*fgkEndCapCoverPlateClipWidth,
6688 0.5*fgkEndCapSideCoverThickness);
6689 TGeoVolume* endcapcoverplateclip = new TGeoVolume("EndCapCoverPlateUpClip",
6690 endcapcoverplateclipshape,
6691 fSSDCoolingTubePhynox);
6692 TGeoBBox* endcapcoverplatedownclipshape = new TGeoBBox(0.5*fgkEndCapCoverPlateDownClipLength,
6693 0.5*fgkEndCapCoverPlateDownClipWidth,
6694 0.5*fgkEndCapSideCoverThickness);
6695 TGeoVolume* endcapcoverplatedownclip = new TGeoVolume("EndCapCoverPlateDownClip",
6696 endcapcoverplatedownclipshape,
6697 fSSDCoolingTubePhynox);
6698 TGeoTranslation* endcapcoverplatecliptrans[4];
6699 endcapcoverplatecliptrans[0] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
6700 - fgkEndCapCoverPlateLength[0]
6701 - fgkEndCapSideCoverThickness,
6703 0.5*(fgkEndCapSideCoverThickness
6704 + fgkEndCapCoverPlateThickness));
6705 endcapcoverplatecliptrans[1] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
6706 - fgkEndCapCoverPlateLength[0]
6707 - fgkEndCapSideCoverThickness,
6708 (kendcapcoverplatescrewnumber[1]-1)
6709 * fgkEndCapSideCoverWidth[5],
6710 0.5*(fgkEndCapSideCoverThickness
6711 + fgkEndCapCoverPlateThickness));
6712 endcapcoverplatecliptrans[2] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
6713 - fgkEndCapCoverPlateLength[0]
6714 + fgkEndCapCoverPlateLength[1]
6715 + 2.*fgkEndCapCoverPlateLength[0]
6716 - fgkEndCapCoverPlateClipLength
6717 + fgkEndCapSideCoverThickness,
6719 0.5*(fgkEndCapSideCoverThickness
6720 + fgkEndCapCoverPlateThickness));
6721 endcapcoverplatecliptrans[3] = new TGeoTranslation(0.5*fgkEndCapCoverPlateClipLength
6722 - fgkEndCapCoverPlateLength[0]
6723 + fgkEndCapCoverPlateLength[1]
6724 + 2.*fgkEndCapCoverPlateLength[0]
6725 - fgkEndCapCoverPlateClipLength
6726 + fgkEndCapSideCoverThickness,
6727 (kendcapcoverplatescrewnumber[1]-1)
6728 * fgkEndCapSideCoverWidth[5],
6729 0.5*(fgkEndCapSideCoverThickness
6730 + fgkEndCapCoverPlateThickness));
6731 endcapcoverplateclip->SetLineColor(fColorPhynox);
6732 endcapcoverplatedownclip->SetLineColor(fColorPhynox);
6733 for(Int_t i=0; i<4; i++)
6734 for(Int_t j=0; j<4; j++) endcapassembly[j]->AddNode(endcapcoverplateclip,i+1,
6735 endcapcoverplatecliptrans[i]);
6736 TGeoTranslation* endcapcoverplatedowncliptrans[4];
6737 endcapcoverplatedowncliptrans[0] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
6738 - fgkEndCapCoverPlateLength[0]
6739 - fgkEndCapSideCoverThickness,
6740 0.5*(fgkEndCapCoverPlateDownClipWidth
6741 - fgkEndCapCoverPlateClipWidth),
6742 0.5*(fgkEndCapSideCoverThickness
6743 + fgkEndCapCoverPlateThickness)
6744 - fgkEndCapSideCoverWidth[1]
6745 - fgkEndCapSideCoverThickness);
6746 endcapcoverplatedowncliptrans[1] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
6747 - fgkEndCapCoverPlateLength[0]
6748 - fgkEndCapSideCoverThickness,
6749 0.5*(fgkEndCapCoverPlateDownClipWidth
6750 - fgkEndCapCoverPlateClipWidth)
6751 + fgkEndCapSideCoverLength[2]
6752 - fgkEndCapCoverPlateDownClipWidth,
6753 0.5*(fgkEndCapSideCoverThickness
6754 + fgkEndCapCoverPlateThickness)
6755 - fgkEndCapSideCoverWidth[1]
6756 - fgkEndCapSideCoverThickness);
6757 endcapcoverplatedowncliptrans[2] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
6758 - fgkEndCapCoverPlateLength[0]
6759 + fgkEndCapSideCoverThickness
6760 + fgkEndCapCoverPlateLength[1]
6761 + 2.0*fgkEndCapCoverPlateLength[0]
6762 - fgkEndCapCoverPlateDownClipLength,
6763 0.5*(fgkEndCapCoverPlateDownClipWidth
6764 - fgkEndCapCoverPlateClipWidth),
6765 0.5*(fgkEndCapSideCoverThickness
6766 + fgkEndCapCoverPlateThickness)
6767 - fgkEndCapSideCoverWidth[1]
6768 - fgkEndCapSideCoverThickness);
6769 endcapcoverplatedowncliptrans[3] = new TGeoTranslation(0.5*fgkEndCapCoverPlateDownClipLength
6770 - fgkEndCapCoverPlateLength[0]
6771 + fgkEndCapSideCoverThickness
6772 + fgkEndCapCoverPlateLength[1]
6773 + 2.0*fgkEndCapCoverPlateLength[0]
6774 - fgkEndCapCoverPlateDownClipLength,
6775 0.5*(fgkEndCapCoverPlateDownClipWidth
6776 - fgkEndCapCoverPlateClipWidth)
6777 + fgkEndCapSideCoverLength[2]
6778 - fgkEndCapCoverPlateDownClipWidth,
6779 0.5*(fgkEndCapSideCoverThickness
6780 + fgkEndCapCoverPlateThickness)
6781 - fgkEndCapSideCoverWidth[1]
6782 - fgkEndCapSideCoverThickness);
6783 for(Int_t i=0; i<4; i++)
6784 for(Int_t k=0; k<4; k++) endcapassembly[k]->AddNode(endcapcoverplatedownclip,i+1,
6785 endcapcoverplatedowncliptrans[i]);
6786 /////////////////////////////////////////////////////
6787 // Placing Kapton Foil
6788 /////////////////////////////////////////////////////
6789 TGeoBBox* endcapkaptonfoilshape = new TGeoBBox(0.5*fgkEndCapKaptonFoilLength,
6790 0.5*fgkEndCapKaptonFoilWidth,
6791 0.5*fgkEndCapKaptonFoilThickness);
6792 TGeoVolume* endcapkaptonfoil = new TGeoVolume("EndCapKaptonFoil",
6793 endcapkaptonfoilshape,
6794 fSSDKaptonFlexMedium);
6795 endcapkaptonfoil->SetLineColor(8);
6796 TGeoTranslation* endcapkaptonfoiltrans = new TGeoTranslation(0.5*fgkEndCapCoverPlateLength[1],
6797 0.5*fgkEndCapKaptonFoilWidth
6798 - 0.5*fgkEndCapCoverPlateClipWidth,
6799 0.5*fgkEndCapCoverPlateThickness
6800 - 0.5*fgkEndCapKaptonFoilThickness
6801 - fgkEndCapSideCoverWidth[1]
6802 - fgkEndCapSideCoverThickness);
6803 for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapkaptonfoil,1,endcapkaptonfoiltrans);
6804 /////////////////////////////////////////////////////////////
6805 // Placing Electronic Tubes
6806 /////////////////////////////////////////////////////////////
6807 Double_t endcapeffectivecableswidth[2] = {fgkEndCapKaptonFoilWidth
6808 - fgkEndCapInterfaceCardBThickness
6809 - 9.*fgkEndCapStripConnectionThickness
6810 - 8.*fgkEndCapCardElectBoardBackThickness,
6811 fgkEndCapKaptonFoilWidth
6812 - fgkEndCapInterfaceCardBThickness
6813 - 9.*fgkEndCapStripConnectionThickness
6814 - 8.*fgkEndCapCardElectBoardBackThickness
6815 - fgkEndCapInterfaceElectBoardCardBThickness};
6816 TGeoVolume* endcapeffectivecables[2];
6817 endcapeffectivecables[0] = GetEndCapEffectiveCables(fgkEndCapEffectiveCableRadiusMin,
6818 fgkEndCapEffectiveCableRadiusMax,
6819 endcapeffectivecableswidth[0],
6820 10,"EndCapEffectiveCables1");
6821 endcapeffectivecables[1] = GetEndCapEffectiveCables(fgkEndCapEffectiveCableRadiusMin,
6822 fgkEndCapEffectiveCableRadiusMax,
6823 endcapeffectivecableswidth[1],
6824 25,"EndCapEffectiveCables2");
6825 TGeoRotation* endcapeffectivecablesrot = new TGeoRotation();
6826 TGeoTranslation* endcapeffectivecablestrans[2];
6827 endcapeffectivecablestrans[0] = new TGeoTranslation(0.5*fgkEndCapCoverPlateLength[1],
6828 - 0.5*endcapeffectivecableswidth[0]
6829 - 0.5*(fgkEndCapCoverPlateWidth[0]
6830 - fgkEndCapCoverPlateWidth[2]
6831 - (kendcapcoverplatesmallholenumber-1)
6832 * fgkEndCapCoverPlateSmallHoleSeparation[2])
6833 + fgkEndCapSideCoverLength[2],
6834 - 0.5*fgkEndCapCoverPlateThickness
6835 - (fgkEndCapCardElectBoardBackWidth[0]
6836 - fgkEndCapInterfaceCardBWidth[0]
6837 - fgkEndCapInterfaceCardBWidth[1]));
6838 endcapeffectivecablestrans[1] = new TGeoTranslation(0.5*fgkEndCapCoverPlateLength[1],
6839 - 0.5*endcapeffectivecableswidth[1]
6840 - 0.5*(fgkEndCapCoverPlateWidth[0]
6841 - fgkEndCapCoverPlateWidth[2]
6842 - (kendcapcoverplatesmallholenumber-1)
6843 * fgkEndCapCoverPlateSmallHoleSeparation[2])
6844 + fgkEndCapSideCoverLength[2],
6845 - 0.5*fgkEndCapCoverPlateThickness
6846 - (fgkEndCapCardElectBoardBackWidth[0]
6847 - fgkEndCapInterfaceCardBWidth[0])
6848 - 0.5*fgkEndCapInterfaceCardBWidth[2]);
6849 endcapeffectivecablesrot->SetAngles(0.,90.,0.);
6850 TGeoCombiTrans* endcapeffectivecablescombitrans[2];
6851 endcapeffectivecablescombitrans[0] = new TGeoCombiTrans(*endcapeffectivecablestrans[0],
6852 *endcapeffectivecablesrot);
6853 endcapeffectivecablescombitrans[1] = new TGeoCombiTrans(*endcapeffectivecablestrans[1],
6854 *endcapeffectivecablesrot);
6855 // for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[0],1,
6856 // endcapeffectivecablescombitrans[0]);
6857 for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapeffectivecables[1],1,
6858 endcapeffectivecablescombitrans[1]);
6859 /////////////////////////////////////////////////////////////
6860 // Placing End Cap Cards
6861 /////////////////////////////////////////////////////////////
6862 TGeoVolume** endcapcards = GetEndCapCards();
6863 TGeoRotation* endcapcardsrot[2];
6864 for(Int_t i=0; i<2; i++) endcapcardsrot[i] = new TGeoRotation();
6865 endcapcardsrot[0]->SetAngles(90.,0.,0.);
6866 TGeoTranslation* endcapcardstrans[2];
6867 endcapcardstrans[0] = new TGeoTranslation(0.,0.,0.5*(fgkEndCapInterfaceCardBLength[1]
6868 - fgkEndCapCardElectBoardBackLength[0]));
6869 TGeoCombiTrans* endcapcardscombitrans = new TGeoCombiTrans(*endcapcardstrans[0],*endcapcardsrot[0]);
6870 endcapcardsrot[1]->SetAngles(90.,90.,-90.);
6871 TGeoHMatrix* endcapcardsmatrix[2];
6872 endcapcardsmatrix[0] = new TGeoHMatrix((*endcapcardsrot[1])*(*endcapcardscombitrans));
6873 Double_t stiffenertransx = fgkEndCapKaptonFoilWidth-fgkEndCapStiffenerWidth
6874 - fgkEndCapCardJMDConnectorLength[0]
6875 - fgkEndCapInterfaceCardBThickness
6876 - 9.*fgkEndCapStripConnectionThickness
6877 - 8.*fgkEndCapCardElectBoardBackThickness;
6878 endcapcardstrans[1] = new TGeoTranslation(-0.5*fgkEndCapStiffenerLength
6879 - fgkEndCapCoverPlateLength[0]
6880 + 0.5 * (fgkEndCapCoverPlateLength[3]
6881 + 2.0 * fgkEndCapCoverPlateLength[2]),
6882 - stiffenertransx-fgkEndCapStiffenerWidth
6883 - fgkEndCapCardJMDConnectorLength[0]
6884 - fgkEndCapInterfaceCardBThickness
6885 - 2.0 * fgkEndCapStripConnectionThickness
6886 - 1.5 * fgkEndCapInterfaceCardBThickness
6887 - 0.5 * (fgkEndCapCoverPlateWidth[0]
6888 - fgkEndCapCoverPlateWidth[2]
6889 - (kendcapcoverplatesmallholenumber-1)
6890 * fgkEndCapCoverPlateSmallHoleSeparation[2])
6891 + fgkEndCapKaptonFoilWidth,
6892 0.5*fgkEndCapCoverPlateThickness
6893 - fgkEndCapSideCoverWidth[1]);
6894 endcapcardsmatrix[1] = new TGeoHMatrix((*endcapcardstrans[1])*(*endcapcardsmatrix[0]));
6895 for(Int_t i=0; i<4; i++) endcapassembly[i]->AddNode(endcapcards[i],1,endcapcardsmatrix[1]);
6896 /////////////////////////////////////////////////////////////
6897 // Deallocating memory
6898 /////////////////////////////////////////////////////////////
6899 delete endcapcoverplaterot;
6900 delete endcapcoverplatecombitrans;
6901 delete endcapcoverplatetrans;
6902 for(Int_t i=0; i<3; i++){
6903 delete endcapsidecovercombitrans[i];
6904 if(i<2) delete endcapsidecoverot[i];
6906 for(Int_t i=0; i<2; i++) delete endcapcardsrot[i];
6907 for(Int_t i=0; i<2; i++) delete endcapcardstrans[i];
6908 delete endcapcardsmatrix[0];
6909 return endcapassembly;
6911 ////////////////////////////////////////////////////////////////////////////////
6912 TGeoVolume* AliITSv11GeometrySSD::GetEndCapEffectiveCables(Double_t radiusmin,
6916 const char* volname){
6917 /////////////////////////////////////////////////////////////
6918 // Generating EndCap High Voltage Tubes
6919 /////////////////////////////////////////////////////////////
6920 Double_t effectiveinneradius = TMath::Sqrt(ncables)*radiusmin;
6921 Double_t effectiveouteradius = TMath::Sqrt(effectiveinneradius*effectiveinneradius+(radiusmax-radiusmin)*(radiusmax-radiusmin));
6923 TGeoTube* effectiveinnertubeshape = new TGeoTube(0.,effectiveinneradius,0.5*width);
6924 TGeoTube* effectiveoutertubeshape = new TGeoTube(effectiveinneradius,
6925 effectiveouteradius,0.5*width);
6926 TGeoVolume* effectiveinnertube = new TGeoVolume("EffectiveEndCapInnerTube",
6927 effectiveinnertubeshape,
6928 fSSDStiffenerConnectorMedium);
6929 effectiveinnertube->SetLineColor(41);
6930 TGeoVolume* effectiveoutertube = new TGeoVolume("EffectiveEndCapOuterTube",
6931 effectiveoutertubeshape,
6932 fSSDKaptonChipCableMedium);
6933 effectiveoutertube->SetLineColor(39);
6934 TGeoTube* effectivemothertubeshape = new TGeoTube(0.,effectiveouteradius,0.5*width);
6935 TGeoVolume* effectivemothertube = new TGeoVolume(volname,effectivemothertubeshape,fSSDAir);
6936 effectivemothertube->AddNode(effectiveinnertube,1);
6937 effectivemothertube->AddNode(effectiveoutertube,1);
6938 return effectivemothertube;
6940 ////////////////////////////////////////////////////////////////////////////////
6941 TGeoVolume** AliITSv11GeometrySSD::EndCapSupport(){
6942 /////////////////////////////////////////////////////////////
6943 // Generating EndCap Support Layer 5 and Layer 6
6944 /////////////////////////////////////////////////////////////
6945 const Int_t knedges = 5;
6946 ///////////////////////////////////////////////
6947 // Setting the vertices for TGeoXtru Up Volume
6948 ///////////////////////////////////////////////
6949 const Int_t klayernumber = 2;
6950 Double_t xupvertex[klayernumber][knedges+3];
6951 Double_t yupvertex[klayernumber][knedges+3];
6952 Double_t upedgeangle[klayernumber] = {360./fgkSSDLay5LadderNumber,360./fgkSSDLay6LadderNumber};
6953 Double_t middledgeangle[klayernumber] = {0.0,0.0};
6954 Double_t middlepsi[klayernumber] = {0.0,0.0};
6955 for(Int_t i=0; i<klayernumber; i++){
6956 xupvertex[i][0] = -fgkEndCapSupportMiddleRadius[i]*SinD(0.5*upedgeangle[i]);
6957 xupvertex[i][1] = -0.5*fgkEndCapSupportLength[i];
6958 xupvertex[i][2] = -xupvertex[i][1];
6959 xupvertex[i][3] = -xupvertex[i][0];
6961 yupvertex[i][0] = fgkEndCapSupportMiddleRadius[i]*CosD(0.5*upedgeangle[i]);
6962 yupvertex[i][1] = 0.5*fgkEndCapSupportLength[i]/TanD(0.5*upedgeangle[i]);
6963 yupvertex[i][2] = yupvertex[i][1];
6964 yupvertex[i][3] = yupvertex[i][0];
6966 middledgeangle[i] = upedgeangle[i]/knedges;
6967 middlepsi[i] = 90.0-0.5*upedgeangle[i];
6968 for(Int_t j=1; j<knedges; j++){
6969 xupvertex[i][j+3] = fgkEndCapSupportMiddleRadius[i]*CosD(middlepsi[i]+j*middledgeangle[i]);
6970 yupvertex[i][j+3] = fgkEndCapSupportMiddleRadius[i]*SinD(middlepsi[i]+j*middledgeangle[i]);
6973 ////////////////////////////////////
6974 // Generating Up TGeoXtru
6975 ////////////////////////////////////
6976 TGeoXtru* upendcapsupportshape[klayernumber];
6977 TGeoVolume* upendcapsupport[klayernumber];
6978 char upendcapsupportname[100];
6979 for(Int_t i=0; i<klayernumber; i++){
6980 upendcapsupportshape[i] = new TGeoXtru(2);
6981 sprintf(upendcapsupportname,"UpEndCapSupportPieceLayer%i",i+5);
6982 upendcapsupportshape[i]->DefinePolygon(knedges+3,xupvertex[i],yupvertex[i]);
6983 upendcapsupportshape[i]->DefineSection(0,0.);
6984 upendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
6985 upendcapsupport[i] = new TGeoVolume(upendcapsupportname,upendcapsupportshape[i],
6987 upendcapsupport[i]->SetLineColor(5);
6989 ///////////////////////////////////////////////
6990 // Setting the vertices for TGeoXtru Down Volume
6991 ///////////////////////////////////////////////
6992 Double_t xdownvertex[klayernumber][2*(knedges+1)];
6993 Double_t ydownvertex[klayernumber][2*(knedges+1)];
6994 for(Int_t i=0; i<klayernumber; i++){
6995 xdownvertex[i][0] = -fgkEndCapSupportLowRadius[i]*SinD(0.5*upedgeangle[i]);
6996 xdownvertex[i][1] = xupvertex[i][0];
6997 ydownvertex[i][0] = fgkEndCapSupportLowRadius[i]*CosD(0.5*upedgeangle[i]);
6998 ydownvertex[i][1] = yupvertex[i][0];
6999 for(Int_t j=0; j<knedges; j++){
7000 xdownvertex[i][j+2] = xupvertex[i][knedges+2-j];
7001 ydownvertex[i][j+2] = yupvertex[i][knedges+2-j];
7003 for(Int_t j=0; j<knedges; j++){
7004 xdownvertex[i][knedges+j+2] = fgkEndCapSupportLowRadius[i]
7005 * CosD(middlepsi[i]+j*middledgeangle[i]);
7006 ydownvertex[i][knedges+j+2] = fgkEndCapSupportLowRadius[i]
7007 * SinD(middlepsi[i]+j*middledgeangle[i]);
7010 ////////////////////////////////////
7011 // Generating Down TGeoXtru
7012 ////////////////////////////////////
7013 TGeoXtru* downendcapsupportshape[klayernumber];
7014 TGeoVolume* downendcapsupport[klayernumber];
7015 char downendcapsupportname[100];
7016 for(Int_t i=0; i<klayernumber; i++){
7017 downendcapsupportshape[i] = new TGeoXtru(2);
7018 sprintf(downendcapsupportname,"DownEndCapSupportPieceLayer%i",i+5);
7019 downendcapsupportshape[i] = new TGeoXtru(2);
7020 downendcapsupportshape[i]->DefinePolygon(2*(knedges+1),xdownvertex[i],ydownvertex[i]);
7022 downendcapsupportshape[i]->DefineSection(0,0.);
7023 downendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportLowWidth[i]);
7026 downendcapsupportshape[i]->DefineSection(0,fgkEndCapSupportHighWidth
7027 - fgkEndCapSupportLowWidth[i]);
7028 downendcapsupportshape[i]->DefineSection(1,fgkEndCapSupportHighWidth);
7030 downendcapsupport[i] = new TGeoVolume(downendcapsupportname,
7031 downendcapsupportshape[i],fSSDSupportRingAl);
7032 downendcapsupport[i]->SetLineColor(5);
7034 ///////////////////////////////////////////////
7035 // Setting TGeoPgon Volume
7036 ///////////////////////////////////////////////
7037 const Int_t kssdlayladdernumber[klayernumber] = {fgkSSDLay5LadderNumber,
7038 fgkSSDLay6LadderNumber};
7039 TGeoPgon* endcapsupportmothershape[klayernumber];
7040 TGeoVolume** endcapsupportmother;
7041 endcapsupportmother = new TGeoVolume*[klayernumber];
7042 char endcapsupportmothername[100];
7043 for(Int_t i=0; i<klayernumber; i++){
7044 endcapsupportmothershape[i] = new TGeoPgon(0.0,360.0,kssdlayladdernumber[i],2);
7045 sprintf(endcapsupportmothername,"EndCapSupportMotherLayer%i",i+5);
7046 endcapsupportmothershape[i]->DefineSection(0,0.,ydownvertex[i][0],yupvertex[i][1]);
7047 endcapsupportmothershape[i]->DefineSection(1,fgkEndCapSupportHighWidth,
7048 ydownvertex[i][0],yupvertex[i][1]);
7049 endcapsupportmother[i] = new TGeoVolume(endcapsupportmothername,endcapsupportmothershape[i],
7052 ////////////////////////////////////
7053 TGeoRotation** endcapsupportrot[klayernumber];
7054 for(Int_t i=0; i<2; i++){
7055 endcapsupportrot[i] = new TGeoRotation*[kssdlayladdernumber[i]];
7056 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
7057 endcapsupportrot[i][j] = new TGeoRotation();
7058 endcapsupportrot[i][j]->SetAngles(j*upedgeangle[i],0.,0.);
7059 endcapsupportmother[i]->AddNode(upendcapsupport[i],j+1,endcapsupportrot[i][j]);
7060 endcapsupportmother[i]->AddNode(downendcapsupport[i],j+1,endcapsupportrot[i][j]);
7063 return endcapsupportmother;
7065 ////////////////////////////////////////////////////////////////////////////////
7066 void AliITSv11GeometrySSD::SetEndCapSupportAssembly(){
7067 /////////////////////////////////////////////////////////////
7068 // Setting End Cap Support Layer 5 and 6.
7069 /////////////////////////////////////////////////////////////
7070 const Int_t kendcapcoverplatesmallholenumber = 9;
7071 const Int_t klayernumber = 2;
7072 const Int_t kssdlayladdernumber[klayernumber] = {fgkSSDLay5LadderNumber,
7073 fgkSSDLay6LadderNumber};
7074 Double_t upedgeangle[klayernumber] = {360.0/kssdlayladdernumber[0],
7075 360.0/kssdlayladdernumber[1]};
7076 TGeoVolume** endcapsupport = EndCapSupport();
7077 TGeoVolume** endcapassembly = GetEndCapAssembly();
7078 TGeoPgon* endcapsupportshape[klayernumber];
7079 Double_t* radiusmin[klayernumber];
7080 Double_t* radiusmax[klayernumber];
7081 for(Int_t i=0; i<klayernumber; i++){
7082 endcapsupportshape[i] = (TGeoPgon*)endcapsupport[i]->GetShape();
7083 radiusmin[i] = endcapsupportshape[i]->GetRmin();
7084 radiusmax[i] = endcapsupportshape[i]->GetRmax();
7086 TGeoBBox* endcapassemblyshape = (TGeoBBox*)endcapassembly[0]->GetShape();
7087 Double_t endcapassemblycenter[3] = {endcapassemblyshape->GetDX(),
7088 endcapassemblyshape->GetDY(),
7089 endcapassemblyshape->GetDZ()};
7090 ///////////////////////////////////////////////
7091 // Setting TGeoPgon Volume for Mother Container
7092 ///////////////////////////////////////////////
7093 TGeoPgon* endcapsupportsystemshape[klayernumber];
7094 char endcapsupportsystemothername[100];
7095 for(Int_t i=0; i<klayernumber; i++){
7096 endcapsupportsystemshape[i] = new TGeoPgon(0.0,360.0,kssdlayladdernumber[i],2);
7097 sprintf(endcapsupportsystemothername,"EndCapSupportSystemLayer%i",i+5);
7098 endcapsupportsystemshape[i]->DefineSection(0,-(fgkEndCapCoverPlateWidth[1]
7099 - fgkEndCapCoverPlateWidth[0]),*radiusmin[i],
7100 (*radiusmax[i]*CosD(0.5*upedgeangle[i])
7101 +2.*endcapassemblycenter[2])
7102 /CosD(0.5*upedgeangle[i]));
7103 endcapsupportsystemshape[i]->DefineSection(1,2.*endcapassemblycenter[1]
7104 -(fgkEndCapCoverPlateWidth[1]
7105 - fgkEndCapCoverPlateWidth[0]),
7107 (*radiusmax[i]*CosD(0.5*upedgeangle[i])
7108 +2.*endcapassemblycenter[2])
7109 /CosD(0.5*upedgeangle[i]));
7111 fgkEndCapSupportSystem = new TGeoVolume*[4];
7112 fgkEndCapSupportSystem[0] = new TGeoVolume("EndCapSupportSystemLayer5Sx",
7113 endcapsupportsystemshape[0],fSSDAir);
7114 fgkEndCapSupportSystem[1] = new TGeoVolume("EndCapSupportSystemLayer5Dx",
7115 endcapsupportsystemshape[0],fSSDAir);
7116 fgkEndCapSupportSystem[2] = new TGeoVolume("EndCapSupportSystemLayer6Sx",
7117 endcapsupportsystemshape[1],fSSDAir);
7118 fgkEndCapSupportSystem[3] = new TGeoVolume("EndCapSupportSystemLayer6Dx",
7119 endcapsupportsystemshape[1],fSSDAir);
7120 ///////////////////////////////////////////////
7121 TGeoTranslation* endcapassemblytrans[klayernumber];
7122 for(Int_t i=0; i<klayernumber; i++)
7123 endcapassemblytrans[i] = new TGeoTranslation(-fgkEndCapCoverPlateLength[0]
7124 - fgkEndCapSideCoverThickness
7125 + endcapassemblycenter[0],
7126 - 0.5*fgkEndCapCoverPlateThickness
7127 - 2.0*fgkEndCapCoolingTubeRadiusMax
7128 + 2.0*endcapassemblycenter[2]
7129 + 0.5*fgkEndCapSupportLength[i]
7130 / TanD(0.5*upedgeangle[i]),
7131 0.5*(fgkEndCapCoverPlateWidth[0]
7132 - fgkEndCapCoverPlateWidth[2]
7133 - (kendcapcoverplatesmallholenumber-1)
7134 * fgkEndCapCoverPlateSmallHoleSeparation[2]));
7135 TGeoRotation** endcapassemblyrot[klayernumber];
7136 TGeoHMatrix** endcapassemblymatrix[klayernumber];
7137 for(Int_t i=0; i<klayernumber; i++){
7138 endcapassemblyrot[i] = new TGeoRotation*[kssdlayladdernumber[i]+2];
7139 endcapassemblymatrix[i] = new TGeoHMatrix*[kssdlayladdernumber[i]+2];
7140 for(Int_t j=0; j<kssdlayladdernumber[i]+2; j++) endcapassemblyrot[i][j] = new TGeoRotation();
7141 endcapassemblyrot[i][0]->SetAngles(0.,-90.,0.);
7142 endcapassemblyrot[i][1]->SetAngles(90.,180.,-90.);
7143 endcapassemblymatrix[i][0] = new TGeoHMatrix((*endcapassemblyrot[i][1])*(*endcapassemblyrot[i][0]));
7144 endcapassemblymatrix[i][1] = new TGeoHMatrix((*endcapassemblytrans[i])*(*endcapassemblymatrix[i][0]));
7145 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
7146 endcapassemblyrot[i][j+2]->SetAngles(j*upedgeangle[i],0.,0.);
7147 endcapassemblymatrix[i][j+2] = new TGeoHMatrix((*endcapassemblyrot[i][j+2])*(*endcapassemblymatrix[i][1]));
7150 TGeoTranslation* lay6endcapassemblytrans = new TGeoTranslation(0.,0.,
7151 fgkEndCapKaptonFoilWidth-fgkEndCapSupportHighWidth);
7152 for(Int_t i=0; i<2*klayernumber; i++){
7153 for(Int_t j=0; j<(i<2? kssdlayladdernumber[0]:kssdlayladdernumber[1]); j++){
7154 fgkEndCapSupportSystem[i]->AddNode(endcapassembly[i],j+1,i<2?endcapassemblymatrix[0][j+2]:
7155 endcapassemblymatrix[1][j+2]);
7157 fgkEndCapSupportSystem[i]->AddNode(i<2?endcapsupport[0]:endcapsupport[1],1,i<2?0:lay6endcapassemblytrans);
7159 /////////////////////////////////////////////////////////////
7160 // Deallocating memory
7161 /////////////////////////////////////////////////////////////
7162 for(Int_t i=0; i<klayernumber; i++){
7163 for(Int_t j=0; j<kssdlayladdernumber[i]+2; j++){
7164 delete endcapassemblyrot[i][j];
7166 delete [] endcapassemblyrot[i];
7167 delete endcapassemblymatrix[i][0];
7168 delete endcapassemblymatrix[i][1];
7170 /////////////////////////////////////////////////////////////
7172 void AliITSv11GeometrySSD::EndCapSupportSystemLayer5(TGeoVolume* moth){
7173 /////////////////////////////////////////////////////////////
7174 // Setting End Cap Support + End Cap Assembly of Layer 5.
7175 /////////////////////////////////////////////////////////////
7177 AliError("Can't insert end cap support of layer5, mother is null!\n");
7180 if(!fgkEndCapSupportSystem) SetEndCapSupportAssembly();
7181 TGeoTranslation* endcapsupportsystemITSCentertrans[2];
7182 endcapsupportsystemITSCentertrans[0] = new TGeoTranslation(0.,0.,
7183 fgkEndCapSupportCenterLay5ITSPosition
7184 + fgkEndCapSupportCenterLay5Position
7185 - fgkEndCapSideCoverLength[2]);
7186 endcapsupportsystemITSCentertrans[1] = new TGeoTranslation(0.,0.,
7187 fgkEndCapSideCoverLength[2]
7188 - fgkEndCapSupportCenterLay5Position
7189 - fgkEndCapSupportCenterLay5ITSPosition);
7190 TGeoRotation* endcapsupportsystemrot = new TGeoRotation();
7191 endcapsupportsystemrot->SetAngles(90.,180.,-90.);
7192 TGeoCombiTrans* endcapsupportsystemITSCentercombitrans =
7193 new TGeoCombiTrans(*endcapsupportsystemITSCentertrans[1],*endcapsupportsystemrot);
7194 moth->AddNode(fgkEndCapSupportSystem[0],1,endcapsupportsystemITSCentertrans[0]);
7195 moth->AddNode(fgkEndCapSupportSystem[1],1,endcapsupportsystemITSCentercombitrans);
7196 /////////////////////////////////////////////////////////////
7197 // Deallocating memory
7198 /////////////////////////////////////////////////////////////
7199 delete endcapsupportsystemrot;
7200 delete endcapsupportsystemITSCentertrans[1];
7202 /////////////////////////////////////////////////////////////
7203 void AliITSv11GeometrySSD::EndCapSupportSystemLayer6(TGeoVolume* moth){
7204 /////////////////////////////////////////////////////////////
7205 // Setting End Cap Support + End Cap Assembly of Layer 6.
7206 /////////////////////////////////////////////////////////////
7208 AliError("Can't insert end cap support of layer6, mother is null!\n");
7211 if(!fgkEndCapSupportSystem) SetEndCapSupportAssembly();
7212 TGeoTranslation* endcapsupportsystemITSCentertrans[2];
7213 endcapsupportsystemITSCentertrans[0] = new TGeoTranslation(0.,0.,
7214 fgkEndCapSupportCenterLay6ITSPosition
7215 + fgkEndCapSupportCenterLay6Position
7216 - fgkEndCapSideCoverLength[2]);
7217 endcapsupportsystemITSCentertrans[1] = new TGeoTranslation(0.,0.,
7218 fgkEndCapSideCoverLength[2]
7219 - fgkEndCapSupportCenterLay6Position
7220 - fgkEndCapSupportCenterLay6ITSPosition);
7221 TGeoRotation* endcapsupportsystemrot = new TGeoRotation();
7222 endcapsupportsystemrot->SetAngles(90.,180.,-90.);
7223 TGeoCombiTrans* endcapsupportsystemITSCentercombitrans =
7224 new TGeoCombiTrans(*endcapsupportsystemITSCentertrans[1],*endcapsupportsystemrot);
7225 moth->AddNode(fgkEndCapSupportSystem[2],1,endcapsupportsystemITSCentertrans[0]);
7226 moth->AddNode(fgkEndCapSupportSystem[3],1,endcapsupportsystemITSCentercombitrans);
7227 /////////////////////////////////////////////////////////////
7228 // Deallocating memory
7229 /////////////////////////////////////////////////////////////
7230 delete endcapsupportsystemrot;
7231 delete endcapsupportsystemITSCentertrans[1];
7233 ////////////////////////////////////////////////////////////////////////////////
7234 void AliITSv11GeometrySSD::LadderSupportLayer5(TGeoVolume* moth){
7235 /////////////////////////////////////////////////////////////
7236 // Setting Ladder Support of Layer 5.
7237 /////////////////////////////////////////////////////////////
7239 AliError("Can't insert ladder lupport of layer5, mother is null!\n");
7242 if(!fLay5LadderSupportRing) SetLadderSupport(100);
7244 TGeoTranslation* centerITSRingSupportLay5trans[2];
7245 for(Int_t i=0; i<2; i++){
7246 centerITSRingSupportLay5trans[i] =
7247 new TGeoTranslation(0.,0.,TMath::Power(-1.,i)*fgkLadderSupportRingLay5Position);
7248 moth->AddNode(fLay5LadderSupportRing,i+1,centerITSRingSupportLay5trans[i]);
7251 ////////////////////////////////////////////////////////////////////////////////
7252 void AliITSv11GeometrySSD::LadderSupportLayer6(TGeoVolume* moth){
7253 /////////////////////////////////////////////////////////////
7254 // Setting Ladder Support of Layer 6.
7255 /////////////////////////////////////////////////////////////
7257 AliError("Can't insert ladder lupport of layer6, mother is null!\n");
7260 if(!fLay6LadderSupportRing) SetLadderSupport(100);
7262 TGeoTranslation* centerITSRingSupportLay6trans[2];
7263 for(Int_t i=0; i<2; i++){
7264 centerITSRingSupportLay6trans[i] =
7265 new TGeoTranslation(0.,0.,TMath::Power(-1.,i)*fgkLadderSupportRingLay6Position);
7266 moth->AddNode(fLay6LadderSupportRing,i+1,centerITSRingSupportLay6trans[i]);
7269 ////////////////////////////////////////////////////////////////////////////////
7270 void AliITSv11GeometrySSD::SSDCone(TGeoVolume* moth){
7271 /////////////////////////////////////////////////////////////
7272 // Setting Ladder Support of Layer 6.
7273 /////////////////////////////////////////////////////////////
7275 AliError("Can't insert SSD Cone, mother is null!\n");
7278 if(!fSSDCone) SetSSDCone();
7279 TGeoTranslation* ssdconetrans = new TGeoTranslation(0.,0.,0.5*fgkSSDCentralSupportLength
7280 + fgkSSDCentralAL3SupportLength);
7281 moth->AddNode(fSSDCone,1,ssdconetrans);
7283 ////////////////////////////////////////////////////////////////////////////////
7284 void AliITSv11GeometrySSD::SetSSDCone(){
7285 /////////////////////////////////////////////////////////////
7286 // Method generating SSDCone
7287 /////////////////////////////////////////////////////////////
7288 if(!fCreateMaterials) CreateMaterials();
7289 fSSDCone = new TGeoVolumeAssembly("ITSssdCone");
7290 Double_t ssdpconesectionradiusmax[16];
7291 Double_t ssdpconesectionradiusmin[16];
7292 Double_t ssdpconezsection[16];
7293 TGeoPcon* ssdpconelittleholeshape[8];
7294 TGeoVolume* ssdpconelittlehole[8];
7295 ssdpconezsection[0] = (fgkSSDPConeZLength[0]-fgkSSDPConeZLength[1]);
7296 ssdpconesectionradiusmin[0] = fgkSSDLowerPConeRadius;
7297 ssdpconesectionradiusmax[0] = ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
7298 / SinD(fgkSSDPConeAngle)
7299 + ssdpconesectionradiusmin[0];
7300 ssdpconesectionradiusmin[1] = fgkSSDPConeLittleHoleRadius
7301 - ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
7302 / SinD(fgkSSDPConeAngle);
7303 ssdpconesectionradiusmax[1] = fgkSSDPConeLittleHoleRadius;
7304 ssdpconezsection[1] = (ssdpconesectionradiusmin[1]-ssdpconesectionradiusmin[0])
7305 * TanD(fgkSSDPConeAngle)+ssdpconezsection[0];
7306 ssdpconelittleholeshape[0] = new TGeoPcon(0.,360.,2);
7307 for(Int_t i=0; i<2;i++) ssdpconelittleholeshape[0]->DefineSection(i,ssdpconezsection[i],
7308 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7309 ssdpconelittlehole[0] = new TGeoVolume("SSDConeLittleHole1",ssdpconelittleholeshape[0],fSSDCarbonFiberMedium);
7310 ssdpconelittlehole[0]->SetLineColor(4);
7311 /////////////////////////////////////////////////////////////
7312 ssdpconezsection[2] = ssdpconezsection[1];
7313 ssdpconesectionradiusmin[2] = ssdpconesectionradiusmin[1];
7314 ssdpconesectionradiusmax[2] = ssdpconesectionradiusmax[1];
7315 ssdpconesectionradiusmin[3] = fgkSSDPConeLittleHoleRadius+fgkSSDPConeLittleHoleLength
7316 - ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
7317 / SinD(fgkSSDPConeAngle);
7318 ssdpconesectionradiusmax[3] = ssdpconezsection[0]*CosD(fgkSSDPConeAngle)
7319 / SinD(fgkSSDPConeAngle)+ssdpconesectionradiusmin[3];
7320 ssdpconezsection[3] = (ssdpconesectionradiusmin[3]-ssdpconesectionradiusmin[2])
7321 * TanD(fgkSSDPConeAngle)+ssdpconezsection[2];
7322 Double_t ssdpconelittleholeangle = fgkSSDPConeLittleHoleLength/fgkSSDPConeLittleHoleRadius
7323 * TMath::RadToDeg();
7324 ssdpconelittleholeshape[1] = new TGeoPcon(30.+0.5*ssdpconelittleholeangle,
7325 60.-ssdpconelittleholeangle,2);
7326 for(Int_t i=2;i<4;i++) ssdpconelittleholeshape[1]->DefineSection(i-2,ssdpconezsection[i],
7327 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7328 ssdpconelittlehole[1] = new TGeoVolume("SSDConeLittleHole2",ssdpconelittleholeshape[1],fSSDCarbonFiberMedium);
7329 ssdpconelittlehole[1]->SetLineColor(4);
7330 TGeoRotation* ssdconelittleholerot[6];
7331 for(Int_t i=0; i<6; i++){
7332 ssdconelittleholerot[i] = new TGeoRotation();
7333 ssdconelittleholerot[i]->SetAngles(i*60,0.,0.);
7335 /////////////////////////////////////////////////////////////
7336 ssdpconezsection[4] = ssdpconezsection[3];
7337 ssdpconesectionradiusmin[4] = ssdpconesectionradiusmin[3];
7338 ssdpconesectionradiusmax[4] = ssdpconesectionradiusmax[3];
7339 ssdpconesectionradiusmin[5] = fgkSSDConeMiddleRadius-ssdpconezsection[0]
7340 * CosD(fgkSSDPConeAngle)
7341 / SinD(fgkSSDPConeAngle);
7342 ssdpconesectionradiusmax[5] = fgkSSDConeMiddleRadius;
7343 ssdpconezsection[5] = (ssdpconesectionradiusmin[5]-ssdpconesectionradiusmin[4])
7344 * TanD(fgkSSDPConeAngle)+ssdpconezsection[4];
7345 ssdpconelittleholeshape[2] = new TGeoPcon(0.,360.,2);
7346 for(Int_t i=4; i<6;i++) ssdpconelittleholeshape[2]->DefineSection(i-4,ssdpconezsection[i],
7347 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7348 ssdpconelittlehole[2] = new TGeoVolume("SSDConeLittleHole3",ssdpconelittleholeshape[2],fSSDCarbonFiberMedium);
7349 ssdpconelittlehole[2]->SetLineColor(4);
7350 ///////////////////////////////////////////////////
7351 ssdpconezsection[6] = ssdpconezsection[5];
7352 ssdpconesectionradiusmin[6] = ssdpconesectionradiusmin[5];
7353 ssdpconesectionradiusmax[6] = ssdpconesectionradiusmax[5];
7354 ssdpconesectionradiusmin[7] = fgkSSDConeMiddleRadius+fgkSSDPConeMiddleLength
7355 -ssdpconezsection[0]
7356 * CosD(fgkSSDPConeAngle)
7357 / SinD(fgkSSDPConeAngle);
7358 ssdpconesectionradiusmax[7] = fgkSSDConeMiddleRadius+fgkSSDPConeMiddleLength;
7359 ssdpconezsection[7] = (ssdpconesectionradiusmin[7]-ssdpconesectionradiusmin[6])
7360 * TanD(fgkSSDPConeAngle)+ssdpconezsection[6];
7361 Double_t ssdpconemiddleholeangle = fgkSSDPConeMiddleWidth/fgkSSDConeMiddleRadius
7362 * TMath::RadToDeg();
7363 ssdpconelittleholeshape[3] = new TGeoPcon(22.5+0.5*ssdpconemiddleholeangle,
7364 45.-ssdpconemiddleholeangle,2);
7365 for(Int_t i=6;i<8;i++) ssdpconelittleholeshape[3]->DefineSection(i-6,ssdpconezsection[i],
7366 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7367 ssdpconelittlehole[3] = new TGeoVolume("SSDConeLittleHole4",ssdpconelittleholeshape[3],fSSDCarbonFiberMedium);
7368 ssdpconelittlehole[3]->SetLineColor(4);
7369 TGeoRotation* ssdconemiddleholerot[8];
7370 for(Int_t i=0; i<8; i++){
7371 ssdconemiddleholerot[i] = new TGeoRotation();
7372 ssdconemiddleholerot[i]->SetAngles(i*45,0.,0.);
7374 /////////////////////////////////////////////////////////////
7375 ssdpconezsection[8] = ssdpconezsection[7];
7376 ssdpconesectionradiusmin[8] = ssdpconesectionradiusmin[7];
7377 ssdpconesectionradiusmax[8] = ssdpconesectionradiusmax[7];
7378 ssdpconesectionradiusmin[9] = fgkSSDPConeUpRadius-ssdpconezsection[0]
7379 * CosD(fgkSSDPConeAngle)
7380 / SinD(fgkSSDPConeAngle);
7381 ssdpconesectionradiusmax[9] = fgkSSDPConeUpRadius;
7382 ssdpconezsection[9] = (ssdpconesectionradiusmin[9]-ssdpconesectionradiusmin[8])
7383 * TanD(fgkSSDPConeAngle)+ssdpconezsection[8];
7384 ssdpconelittleholeshape[4] = new TGeoPcon(0.,360.,2);
7385 for(Int_t i=8; i<10;i++) ssdpconelittleholeshape[4]->DefineSection(i-8,ssdpconezsection[i],
7386 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7387 ssdpconelittlehole[4] = new TGeoVolume("SSDConeLittleHole5",ssdpconelittleholeshape[4],fSSDCarbonFiberMedium);
7388 ssdpconelittlehole[4]->SetLineColor(4);
7389 /////////////////////////////////////////////////////////////
7390 Double_t ssdconetrapezoidheight = fgkSSDPConeUpMaxRadius-fgkSSDPConeUpRadius;
7391 Double_t ssdconetrapezoidbasis = fgkSSDPConeTrapezoidBasis-2.0
7392 * (0.5*ssdconetrapezoidheight/TanD(fgkSSDPConeTrapezoidAngle)
7393 - 0.5*ssdconetrapezoidheight/(fgkSSDPConeUpMaxRadius
7394 - 0.5*ssdconetrapezoidheight)*(0.5*fgkSSDPConeTrapezoidBasis
7395 - 0.5*ssdconetrapezoidheight/TanD(fgkSSDPConeTrapezoidAngle)));
7396 Double_t ssdconetrapezoidsection = (2.0*TMath::Pi()*fgkSSDPConeUpMaxRadius-8.0*ssdconetrapezoidbasis)/8.;
7397 Double_t ssdpconetrapezoidsectionangle = ssdconetrapezoidsection/fgkSSDPConeUpMaxRadius
7398 * TMath::RadToDeg();
7399 ssdpconezsection[10] = ssdpconezsection[9];
7400 ssdpconesectionradiusmin[10] = ssdpconesectionradiusmin[9];
7401 ssdpconesectionradiusmax[10] = ssdpconesectionradiusmax[9];
7402 ssdpconesectionradiusmin[11] = fgkSSDPConeUpMaxRadius-ssdpconezsection[0]
7403 * CosD(fgkSSDPConeAngle)
7404 / SinD(fgkSSDPConeAngle);
7405 ssdpconesectionradiusmax[11] = fgkSSDPConeUpMaxRadius;
7406 ssdpconezsection[11] = (ssdpconesectionradiusmin[11]-ssdpconesectionradiusmin[10])
7407 * TanD(fgkSSDPConeAngle)+ssdpconezsection[10];
7408 ssdpconelittleholeshape[5] = new TGeoPcon(90.-0.5*ssdpconetrapezoidsectionangle,
7409 ssdpconetrapezoidsectionangle,2);
7410 for(Int_t i=10;i<12;i++) ssdpconelittleholeshape[5]->DefineSection(i-10,ssdpconezsection[i],
7411 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7412 ssdpconelittlehole[5] = new TGeoVolume("SSDConeLittleHole6",ssdpconelittleholeshape[5],fSSDCarbonFiberMedium);
7413 ssdpconelittlehole[5]->SetLineColor(4);
7414 TGeoRotation* ssdconeupradiusrot[8];
7415 for(Int_t i=0; i<8; i++){
7416 ssdconeupradiusrot[i] = new TGeoRotation();
7417 ssdconeupradiusrot[i]->SetAngles(i*45,0.,0.);
7419 /////////////////////////////////////////////////////////////
7420 ssdpconezsection[12] = ssdpconezsection[11];
7421 ssdpconezsection[13] = ssdpconezsection[12]+fgkSSDPConeRadiusWidth;
7422 ssdpconesectionradiusmin[12] = ssdpconesectionradiusmin[11];
7423 ssdpconesectionradiusmax[12] = fgkSSDPConeExternalRadius;
7424 ssdpconesectionradiusmin[13] = ssdpconesectionradiusmin[12];
7425 ssdpconesectionradiusmax[13] = fgkSSDPConeExternalRadius;
7426 ssdpconelittleholeshape[6] = new TGeoPcon(0.,360.,2);
7427 for(Int_t i=12; i<14;i++) ssdpconelittleholeshape[6]->DefineSection(i-12,ssdpconezsection[i],
7428 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7429 ssdpconelittlehole[6] = new TGeoVolume("SSDConeLittleHole7",ssdpconelittleholeshape[6],fSSDCarbonFiberMedium);
7430 ssdpconelittlehole[6]->SetLineColor(4);
7431 /////////////////////////////////////////////////////////////
7432 ssdpconezsection[14] = 0.0;
7433 ssdpconezsection[15] = ssdpconezsection[0];
7434 ssdpconesectionradiusmin[14] = ssdpconesectionradiusmin[0];
7435 ssdpconesectionradiusmax[14] = ssdpconesectionradiusmin[14];
7436 ssdpconesectionradiusmin[15] = ssdpconesectionradiusmin[0];
7437 ssdpconesectionradiusmax[15] = ssdpconesectionradiusmax[0];
7438 ssdpconelittleholeshape[7] = new TGeoPcon(0.,360.,2);
7439 for(Int_t i=14; i<16;i++) ssdpconelittleholeshape[7]->DefineSection(i-14,ssdpconezsection[i],
7440 ssdpconesectionradiusmin[i],ssdpconesectionradiusmax[i]);
7441 ssdpconelittlehole[7] = new TGeoVolume("SSDConeLittleHole8",ssdpconelittleholeshape[7],fSSDCarbonFiberMedium);
7442 ssdpconelittlehole[7]->SetLineColor(4);
7443 /////////////////////////////////////////////////////////////
7444 TGeoTube* ssdtubeconeshape[2];
7445 TGeoVolume* ssdtubecone[2];
7446 TGeoTranslation* ssdtubeconetrans[2];
7447 ssdtubeconeshape[0] = new TGeoTube(fgkSSDPConeUpMiddleRadius,
7448 fgkSSDPConeExternalRadius,
7449 0.5*(fgkSSDPConeLength-ssdpconezsection[13]));
7450 ssdtubeconeshape[1] = new TGeoTube(fgkSSDPConeDownRadius,ssdpconesectionradiusmin[0],
7451 0.5*ssdpconezsection[0]);
7452 ssdtubecone[0] = new TGeoVolume("SSDConeTube1",ssdtubeconeshape[0],fSSDSupportRingAl);
7453 ssdtubecone[1] = new TGeoVolume("SSDConeTube2",ssdtubeconeshape[1],fSSDSupportRingAl);
7454 ssdtubeconetrans[0] = new TGeoTranslation(0.,0.,
7455 0.5*(fgkSSDPConeLength-ssdpconezsection[13])
7456 + ssdpconezsection[13]);
7457 ssdtubeconetrans[1] = new TGeoTranslation(0.,0.,0.5*ssdpconezsection[0]);
7458 ssdtubecone[0]->SetLineColor(4);
7459 ssdtubecone[1]->SetLineColor(4);
7460 /////////////////////////////////////////////////////////////
7461 // Mother Volume Container
7462 /////////////////////////////////////////////////////////////
7463 Double_t ssdconemotherradiusmin[8];
7464 Double_t ssdconemotherradiusmax[8];
7465 Double_t ssdconemothersection[8];
7466 ssdconemotherradiusmin[0] = fgkSSDPConeDownRadius;
7467 ssdconemotherradiusmax[0] = ssdpconesectionradiusmin[0];
7468 ssdconemotherradiusmin[1] = fgkSSDPConeDownRadius;
7469 ssdconemotherradiusmax[1] = ssdpconesectionradiusmax[0];
7470 ssdconemotherradiusmin[2] = ssdpconesectionradiusmin[0];
7471 ssdconemotherradiusmax[2] = ssdpconesectionradiusmax[0];
7472 ssdconemotherradiusmin[3] = ssdpconesectionradiusmin[11];
7473 ssdconemotherradiusmax[3] = ssdpconesectionradiusmax[11];
7474 ssdconemotherradiusmin[4] = ssdpconesectionradiusmin[12];
7475 ssdconemotherradiusmax[4] = ssdpconesectionradiusmax[12];
7476 ssdconemotherradiusmin[5] = ssdpconesectionradiusmin[13];
7477 ssdconemotherradiusmax[5] = ssdpconesectionradiusmax[13];
7478 ssdconemotherradiusmin[6] = fgkSSDPConeUpMiddleRadius;
7479 ssdconemotherradiusmax[6] = fgkSSDPConeExternalRadius;
7480 ssdconemotherradiusmin[7] = fgkSSDPConeUpMiddleRadius;
7481 ssdconemotherradiusmax[7] = fgkSSDPConeExternalRadius;
7482 ssdconemothersection[0] = 0.0;
7483 ssdconemothersection[1] = ssdpconezsection[0];
7484 ssdconemothersection[2] = ssdpconezsection[0];
7485 ssdconemothersection[3] = ssdpconezsection[11];
7486 ssdconemothersection[4] = ssdpconezsection[11];
7487 ssdconemothersection[5] = ssdpconezsection[13];
7488 ssdconemothersection[6] = ssdpconezsection[13];
7489 ssdconemothersection[7] = fgkSSDPConeLength;
7490 TGeoPcon* ssdconemothershape = new TGeoPcon(0.,360,8);
7491 for(Int_t i=0; i<8; i++) ssdconemothershape->DefineSection(i,ssdconemothersection[i],
7492 ssdconemotherradiusmin[i],ssdconemotherradiusmax[i]);
7493 TGeoVolume* ssdconemother = new TGeoVolume("SSDMotherCone",ssdconemothershape,fSSDAir);
7494 /////////////////////////////////////////////////////////////
7495 //Placing the Volumes into Mother
7496 /////////////////////////////////////////////////////////////
7497 ssdconemother->AddNode(ssdpconelittlehole[0],1);
7498 for(Int_t i=0; i<6; i++){
7499 ssdconemother->AddNode(ssdpconelittlehole[1],i+1,ssdconelittleholerot[i]);
7501 ssdconemother->AddNode(ssdpconelittlehole[2],1);
7502 for(Int_t i=0; i<8; i++){
7503 ssdconemother->AddNode(ssdpconelittlehole[3],i+1,ssdconemiddleholerot[i]);
7505 ssdconemother->AddNode(ssdpconelittlehole[4],1);
7506 for(Int_t i=0; i<8; i++){
7507 ssdconemother->AddNode(ssdpconelittlehole[5],i+1,ssdconeupradiusrot[i]);
7509 ssdconemother->AddNode(ssdpconelittlehole[6],1);
7510 ssdconemother->AddNode(ssdpconelittlehole[7],1);
7511 ssdconemother->AddNode(ssdtubecone[0],1,ssdtubeconetrans[0]);
7512 ssdconemother->AddNode(ssdtubecone[1],1,ssdtubeconetrans[1]);
7513 /////////////////////////////////////////////////////////////
7514 // ITS General Support
7515 /////////////////////////////////////////////////////////////
7516 TGeoTube* ssdcentralsupportshape = new TGeoTube(fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth,
7517 fgkSSDCentralSupportRadius,0.5*fgkSSDCentralSupportLength);
7518 TGeoVolume* ssdcentralsupport = new TGeoVolume("SSDCentralSupport",ssdcentralsupportshape,fSSDRohaCellCone);
7519 TGeoTranslation* ssdcentralsupportrans = new TGeoTranslation(0.,0.,-0.5*fgkSSDCentralSupportLength
7520 - fgkSSDCentralAL3SupportLength);
7521 ssdcentralsupport->SetLineColor(4);
7522 fSSDCone->AddNode(ssdcentralsupport,1,ssdcentralsupportrans);
7523 TGeoTube* ssdcentralal3supportshape = new TGeoTube(fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth,
7524 fgkSSDCentralSupportRadius,0.25*fgkSSDCentralAL3SupportLength);
7525 TGeoVolume* ssdcentralal3support = new TGeoVolume("SSDCentralAl3Support",ssdcentralal3supportshape,fSSDSupportRingAl);
7526 TGeoTranslation* ssdcentralal3supportrans[3];
7527 ssdcentralal3supportrans[0] = new TGeoTranslation(0.,0.,-0.75*fgkSSDCentralAL3SupportLength);
7528 ssdcentralal3supportrans[1] = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
7529 - 1.25*fgkSSDCentralAL3SupportLength);
7530 ssdcentralal3support->SetLineColor(4);
7531 fSSDCone->AddNode(ssdcentralal3support,1,ssdcentralal3supportrans[0]);
7532 fSSDCone->AddNode(ssdcentralal3support,2,ssdcentralal3supportrans[1]);
7533 TGeoPcon* ssdpconcentralal3shape = new TGeoPcon(0.,360.,2);
7534 Double_t ssdpconcentralradiusmin[2];
7535 Double_t ssdpconcentralradiusmax[2];
7536 Double_t ssdpconcentralsection[2];
7537 ssdpconcentralradiusmin[0] = fgkSSDCentralSupportRadius-fgkSSDCentralSupportWidth;
7538 ssdpconcentralradiusmin[1] = fgkSSDCentralSupportRadius-fgkSSDCentralAL3SupportWidth;
7539 ssdpconcentralradiusmax[0] = fgkSSDCentralSupportRadius;
7540 ssdpconcentralradiusmax[1] = fgkSSDCentralSupportRadius;
7541 ssdpconcentralsection[0] = -0.5*fgkSSDCentralAL3SupportLength;
7542 ssdpconcentralsection[1] = 0.;
7543 for(Int_t i=0; i<2;i++) ssdpconcentralal3shape->DefineSection(i,ssdpconcentralsection[i],
7544 ssdpconcentralradiusmin[i],ssdpconcentralradiusmax[i]);
7545 TGeoVolume* ssdpconcentralal3 = new TGeoVolume("SSDPConeCentralAl3",ssdpconcentralal3shape,fSSDSupportRingAl);
7546 ssdpconcentralal3->SetLineColor(4);
7547 fSSDCone->AddNode(ssdpconcentralal3,1);
7548 TGeoRotation* ssdcentralal3supportrot = new TGeoRotation();
7549 ssdcentralal3supportrot->SetAngles(90.,180,-90.);
7550 ssdcentralal3supportrans[2] = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
7551 -2.*fgkSSDCentralAL3SupportLength);
7552 TGeoCombiTrans* ssdcentralal3supporcombitrans = new TGeoCombiTrans(*ssdcentralal3supportrans[2],
7553 *ssdcentralal3supportrot);
7554 fSSDCone->AddNode(ssdpconcentralal3,2,ssdcentralal3supporcombitrans);
7555 TGeoRotation* ssdconemotherot = new TGeoRotation();
7556 ssdconemotherot->SetAngles(90.,180.,-90.);
7557 TGeoTranslation* ssdconemothertrans = new TGeoTranslation(0.,0.,-fgkSSDCentralSupportLength
7558 -2.*fgkSSDCentralAL3SupportLength);
7559 TGeoCombiTrans* ssdconemothercombitrans = new TGeoCombiTrans(*ssdconemothertrans,*ssdconemotherot);
7560 fSSDCone->AddNode(ssdconemother,1);
7561 fSSDCone->AddNode(ssdconemother,2,ssdconemothercombitrans);
7562 /////////////////////////////////////////////////////////////
7563 // Deallocating memory
7564 /////////////////////////////////////////////////////////////
7565 delete ssdcentralal3supportrot;
7566 delete ssdcentralal3supportrans[2];
7567 delete ssdconemotherot;
7568 delete ssdconemothertrans;
7569 /////////////////////////////////////////////////////////////
7571 ////////////////////////////////////////////////////////////////////////////////
7572 void AliITSv11GeometrySSD::SSDCables(TGeoVolume* moth){
7573 /////////////////////////////////////////////////////////////
7574 // Setting SSD Cables
7575 /////////////////////////////////////////////////////////////
7577 AliError("Can't insert SSD Cables, mother is null!\n");
7580 TGeoVolume* ssdcables = SetSSDCables();
7581 moth->AddNode(ssdcables,1);
7583 ////////////////////////////////////////////////////////////////////////////////
7584 TGeoVolume* AliITSv11GeometrySSD::SetSSDCables(){
7585 /////////////////////////////////////////////////////////////
7586 // Method generating SSDCables
7587 /////////////////////////////////////////////////////////////
7588 // SSD Layer 5 Cables
7589 //////////////////////////////////////////////////////////////////////////////////////////////////
7590 TGeoVolumeAssembly* ssdcablesmother = new TGeoVolumeAssembly("SSDCables");
7591 Double_t ssdcablelayvertical = 0.05; // Internal variables to control overlapping with SDD cables
7592 Double_t ssdcablelaylateral = 0.55; // Internal variables to control overlapping with SDD cables
7593 Double_t ssdcablesfactor = 0.5; // Internal variables to control overlapping with SDD cables
7594 //////////////////////////////////////////////////////////////////////////////////////////////////
7595 Double_t ssdcableslay5rigthsideradiusmin = fgkEndCapSupportMiddleRadius[0]+fgkSSDCablesLay5TubeRadiusMin;
7596 Double_t ssdcableslay5endconedistance = (ssdcableslay5rigthsideradiusmin
7597 - fgkSSDLowerPConeRadius)
7598 * TanD(fgkSSDPConeAngle);
7599 Double_t ssdcableslay5startconedistance = fgkEndCapSupportCenterLay5ITSPosition
7600 + fgkEndCapSupportCenterLay5Position
7601 - 0.5*fgkSSDCentralSupportLength-fgkSSDCentralAL3SupportLength;
7602 Double_t ssdcablelay5rightsidelength = ssdcableslay5endconedistance
7603 - ssdcableslay5startconedistance;
7604 ssdcablelay5rightsidelength *= ssdcablesfactor;
7605 Double_t ssdcableslay5rightsideradiusmax = ssdcableslay5rigthsideradiusmin+fgkSSDCablesLay5RightSideHeight;
7606 TGeoTube* ssdcablelay5rightubeshape = new TGeoTube(ssdcableslay5rigthsideradiusmin,
7607 ssdcableslay5rightsideradiusmax,
7608 0.5*ssdcablelay5rightsidelength);
7609 TGeoVolume* ssdcablelay5righttube = new TGeoVolume("SSDCableLay5RightSideTube",
7610 ssdcablelay5rightubeshape,
7612 ssdcablelay5righttube->SetLineColor(9);
7613 TGeoTranslation* ssdcablelay5rightrans =
7614 new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay5ITSPosition
7615 + fgkEndCapSupportCenterLay5Position
7616 + 0.5*ssdcablelay5rightsidelength);
7617 ////////////////////////////////////
7618 // Double_t cablescapacity[20];
7619 // cablescapacity[0] = ssdcablelay5rightubeshape->Capacity();
7620 ////////////////////////////////////
7621 ssdcablesmother->AddNode(ssdcablelay5righttube,1,ssdcablelay5rightrans);
7622 ////////////////////////////////////
7623 // TGeoPCone Volumes
7624 ///////////////////////////////////
7625 TGeoPcon* ssdcableslay5pconshape[3];
7626 TGeoVolume* ssdcableslay5pcon[3];
7627 ssdcableslay5pconshape[0] = new TGeoPcon(0.,360.,2);
7628 Double_t ssdcableslay5pconzsection[6];
7629 Double_t ssdcableslay5pconrmin[6];
7630 Double_t ssdcableslay5pconrmax[6];
7631 ssdcableslay5pconrmin[0] = ssdcablelay5rightubeshape->GetRmin();
7632 ssdcableslay5pconrmax[0] = ssdcablelay5rightubeshape->GetRmax();
7633 ssdcableslay5pconrmin[1] = fgkSSDPConeUpRadius*(1.0+ssdcablelayvertical);
7634 ssdcableslay5pconrmax[1] = ssdcableslay5pconrmin[1]+fgkSSDCablesLay5RightSideHeight;
7635 ssdcableslay5pconzsection[0] = fgkEndCapSupportCenterLay5ITSPosition
7636 + fgkEndCapSupportCenterLay5Position
7637 + 2.*ssdcablelay5rightubeshape->GetDz();
7638 ssdcableslay5pconzsection[1] = 0.5*fgkSSDCentralSupportLength
7639 + fgkSSDCentralAL3SupportLength
7640 + (fgkSSDPConeUpRadius-fgkSSDLowerPConeRadius)
7641 * TanD(fgkSSDPConeAngle);
7642 for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[0]->DefineSection(i,ssdcableslay5pconzsection[i],
7643 ssdcableslay5pconrmin[i],ssdcableslay5pconrmax[i]);
7644 ssdcableslay5pcon[0] = new TGeoVolume("SSDCableLay5RightSidePCon1",
7645 ssdcableslay5pconshape[0],fSSDCopper);
7646 ssdcableslay5pcon[0]->SetLineColor(9);
7647 ssdcablesmother->AddNode(ssdcableslay5pcon[0],1);
7648 ////////////////////////////////////
7649 // cablescapacity[1] = ssdcableslay5pconshape[0]->Capacity();
7650 ////////////////////////////////////
7651 ssdcableslay5pconzsection[2] = ssdcableslay5pconzsection[1];
7652 ssdcableslay5pconzsection[3] = 0.5*fgkSSDCentralSupportLength
7653 + fgkSSDCentralAL3SupportLength
7654 + 0.25*TanD(fgkSSDPConeAngle)*(fgkSSDPConeUpMaxRadius
7655 + 3.*fgkSSDPConeUpRadius-4.*fgkSSDLowerPConeRadius);
7656 Double_t ssdcableangle = (fgkSSDPConeTrapezoidBasis-2.*(fgkSSDPConeUpMaxRadius
7657 - fgkSSDPConeUpRadius)/TanD(fgkSSDPConeTrapezoidAngle))
7658 / fgkSSDPConeUpRadius*TMath::RadToDeg()*2;
7659 ssdcableslay5pconshape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
7661 ssdcableslay5pconrmin[2] = ssdcableslay5pconrmin[1];
7662 ssdcableslay5pconrmax[2] = ssdcableslay5pconrmax[1];
7663 ssdcableslay5pconrmin[3] = 0.25*(fgkSSDPConeUpMaxRadius+3.*fgkSSDPConeUpRadius
7664 - 4.*fgkSSDLowerPConeRadius)+fgkSSDLowerPConeRadius;
7665 ssdcableslay5pconrmin[3]*=(1.0+ssdcablelayvertical);
7666 ssdcableslay5pconrmax[3] = ssdcableslay5pconrmin[3]+fgkSSDCablesLay5RightSideHeight;
7667 for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[1]->DefineSection(i,ssdcableslay5pconzsection[i+2],
7668 ssdcableslay5pconrmin[i+2],ssdcableslay5pconrmax[i+2]);
7669 ssdcableslay5pcon[1] = new TGeoVolume("SSDCableLay5RightSidePCon2",ssdcableslay5pconshape[1],fSSDCopper);
7670 ssdcableslay5pcon[1]->SetLineColor(9);
7671 ////////////////////////////////////
7672 ssdcableslay5pconshape[2] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
7674 ssdcableslay5pconrmin[4] = ssdcableslay5pconrmin[3];
7675 ssdcableslay5pconrmax[4] = ssdcableslay5pconrmax[3];
7676 ssdcableslay5pconrmin[5] = ssdcableslay5pconrmin[4];
7677 ssdcableslay5pconrmax[5] = ssdcableslay5pconrmax[4];
7678 ssdcableslay5pconzsection[4] = ssdcableslay5pconzsection[3];
7679 ssdcableslay5pconzsection[5] = (ssdcableslay5pconrmin[5]-fgkSSDLowerPConeRadius)
7680 * TanD(fgkSSDPConeAngle)
7681 + 0.5*fgkSSDCentralSupportLength
7682 + fgkSSDCentralAL3SupportLength;
7683 ssdcableslay5pconzsection[5]-= ssdcablelaylateral;
7684 for(Int_t i=0; i<2;i++) ssdcableslay5pconshape[2]->DefineSection(i,ssdcableslay5pconzsection[i+4],
7685 ssdcableslay5pconrmin[i+4],ssdcableslay5pconrmax[i+4]);
7686 ssdcableslay5pcon[2] = new TGeoVolume("SSDCableLay5RightSidePCon3",ssdcableslay5pconshape[2],fSSDCopper);
7687 ssdcableslay5pcon[2]->SetLineColor(9);
7688 ////////////////////////////////////
7689 TGeoRotation* ssdcableslay5pconrot[4];
7690 for(Int_t i=0; i<4; i++){
7691 ssdcableslay5pconrot[i] = new TGeoRotation();
7692 ssdcableslay5pconrot[i]->SetAngles(90.0*i,0.,0.);
7693 ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+1,ssdcableslay5pconrot[i]);
7694 ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+1,ssdcableslay5pconrot[i]);
7696 ////////////////////////////////////
7697 //cablescapacity[2] = 4.0*ssdcableslay5pconshape[1]->Capacity();
7698 //cablescapacity[3] = 4.0*ssdcableslay5pconshape[2]->Capacity();
7699 ////////////////////////////////////
7700 // Positioning Left SSD Cables Part
7701 ////////////////////////////////////
7702 TGeoTranslation* ssdcablesLay5RightTubeToLeftrans = new TGeoTranslation(0.,0.,
7703 - 0.5*ssdcablelay5rightsidelength
7704 - fgkEndCapSupportCenterLay5Position
7705 - fgkEndCapSupportCenterLay5ITSPosition);
7706 ssdcablesmother->AddNode(ssdcablelay5righttube,2,ssdcablesLay5RightTubeToLeftrans);
7707 TGeoRotation* ssdcablesLay5RightPConToLeftRot = new TGeoRotation();
7708 ssdcablesLay5RightPConToLeftRot->SetAngles(90.,180.,-90);
7709 ssdcablesmother->AddNode(ssdcableslay5pcon[0],2,ssdcablesLay5RightPConToLeftRot);
7710 TGeoHMatrix* ssdcablesLay5RightPConToLeftMatrix[4];
7711 for(Int_t i=0; i<4; i++){ ssdcablesLay5RightPConToLeftMatrix[i] =
7712 new TGeoHMatrix((*ssdcablesLay5RightPConToLeftRot)*(*ssdcableslay5pconrot[i]));
7713 ssdcablesmother->AddNode(ssdcableslay5pcon[1],i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
7714 ssdcablesmother->AddNode(ssdcableslay5pcon[2],i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
7716 ////////////////////////////////////
7717 //cablescapacity[4] = ssdcablelay5rightubeshape->Capacity();
7718 //cablescapacity[5] = ssdcableslay5pconshape[0]->Capacity();
7719 //cablescapacity[6] = 4.*ssdcableslay5pconshape[1]->Capacity();
7720 //cablescapacity[7] = 4.*ssdcableslay5pconshape[2]->Capacity();
7721 /////////////////////////////////////////////////////////////
7722 // Water Tubes Layer 5
7723 /////////////////////////
7724 TGeoTube* ssdcablelay5rightubewatershape = new TGeoTube(ssdcableslay5rightsideradiusmax,
7725 ssdcableslay5rightsideradiusmax
7726 + fgkSSDCablesLay5RightSideWaterHeight,
7727 0.5*ssdcablelay5rightsidelength);
7728 TGeoVolume* ssdcablelay5rightwatertube = new TGeoVolume("SSDCableLay5RightSideWaterTube",
7729 ssdcablelay5rightubewatershape,
7730 fSSDCoolingTubeWater);
7731 ssdcablelay5rightwatertube->SetLineColor(7);
7732 ssdcablesmother->AddNode(ssdcablelay5rightwatertube,1,ssdcablelay5rightrans);
7733 ssdcablesmother->AddNode(ssdcablelay5rightwatertube,2,ssdcablesLay5RightTubeToLeftrans);
7734 ////////////////////////////////////
7735 // TGeoPCone Water Volumes Layer
7736 ///////////////////////////////////
7737 TGeoPcon* ssdcableslay5pconwatershape[3];
7738 TGeoVolume* ssdcableslay5pconwater[3];
7739 ssdcableslay5pconwatershape[0] = new TGeoPcon(0.,360.,2);
7740 Double_t ssdcableslay5pconwaterzsection[6];
7741 Double_t ssdcableslay5pcwateronrmin[6];
7742 Double_t ssdcableslay5pconwaterrmax[6];
7743 ssdcableslay5pcwateronrmin[0] = ssdcableslay5pconrmax[0];
7744 ssdcableslay5pconwaterrmax[0] = ssdcableslay5pcwateronrmin[0]
7745 + fgkSSDCablesLay5RightSideWaterHeight;
7746 ssdcableslay5pcwateronrmin[1] = ssdcableslay5pconrmax[1];
7747 ssdcableslay5pconwaterrmax[1] = ssdcableslay5pcwateronrmin[1]
7748 + fgkSSDCablesLay5RightSideWaterHeight;
7749 ssdcableslay5pconwaterzsection[0] = ssdcableslay5pconzsection[0];
7750 ssdcableslay5pconwaterzsection[1] = ssdcableslay5pconzsection[1];
7751 for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[0]->DefineSection(i,ssdcableslay5pconwaterzsection[i],
7752 ssdcableslay5pcwateronrmin[i],ssdcableslay5pconwaterrmax[i]);
7753 ssdcableslay5pconwater[0] = new TGeoVolume("SSDCableLay5RightSidePConWater1",
7754 ssdcableslay5pconwatershape[0],fSSDCoolingTubeWater);
7755 ssdcableslay5pconwater[0]->SetLineColor(7);
7756 ssdcablesmother->AddNode(ssdcableslay5pconwater[0],1);
7757 ssdcablesmother->AddNode(ssdcableslay5pconwater[0],2,ssdcablesLay5RightPConToLeftRot);
7758 ////////////////////////////////////
7759 ssdcableslay5pconwaterzsection[2] = ssdcableslay5pconzsection[2];
7760 ssdcableslay5pconwaterzsection[3] = ssdcableslay5pconzsection[3];
7761 ssdcableslay5pconwatershape[1] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
7763 ssdcableslay5pcwateronrmin[2] = ssdcableslay5pconrmax[1];
7764 ssdcableslay5pconwaterrmax[2] = ssdcableslay5pcwateronrmin[2]
7765 + fgkSSDCablesLay5RightSideWaterHeight;
7766 ssdcableslay5pcwateronrmin[3] = ssdcableslay5pconrmax[3];
7767 ssdcableslay5pconwaterrmax[3] = ssdcableslay5pcwateronrmin[3]
7768 + fgkSSDCablesLay5RightSideWaterHeight;
7769 for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[1]->DefineSection(i,ssdcableslay5pconwaterzsection[i+2],
7770 ssdcableslay5pcwateronrmin[i+2],ssdcableslay5pconwaterrmax[i+2]);
7771 ssdcableslay5pconwater[1] = new TGeoVolume("SSDCableLay5RightSidePConWater2",
7772 ssdcableslay5pconwatershape[1],fSSDCoolingTubeWater);
7773 ssdcableslay5pconwater[1]->SetLineColor(7);
7774 ////////////////////////////////////
7775 ssdcableslay5pconwatershape[2] = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
7777 ssdcableslay5pcwateronrmin[4] = ssdcableslay5pconrmax[3];
7778 ssdcableslay5pconwaterrmax[4] = ssdcableslay5pcwateronrmin[4]
7779 + fgkSSDCablesLay5RightSideWaterHeight;
7780 ssdcableslay5pcwateronrmin[5] = ssdcableslay5pconrmax[4];
7781 ssdcableslay5pconwaterrmax[5] = ssdcableslay5pcwateronrmin[4]
7782 + fgkSSDCablesLay5RightSideWaterHeight;
7783 ssdcableslay5pconwaterzsection[4] = ssdcableslay5pconzsection[4];
7784 ssdcableslay5pconwaterzsection[5] = ssdcableslay5pconzsection[5];
7785 for(Int_t i=0; i<2;i++) ssdcableslay5pconwatershape[2]->DefineSection(i,ssdcableslay5pconwaterzsection[i+4],
7786 ssdcableslay5pcwateronrmin[i+4],ssdcableslay5pconwaterrmax[i+4]);
7787 ssdcableslay5pconwater[2] = new TGeoVolume("SSDCableLay5RightSidePConWater3",
7788 ssdcableslay5pconwatershape[2],fSSDCoolingTubeWater);
7789 ssdcableslay5pconwater[2]->SetLineColor(7);
7790 ////////////////////////////////////
7791 TGeoRotation* ssdcableslay5pconwaterot[4];
7792 TGeoHMatrix* ssdcablesLay5RightPConWaterToLeftMatrix[4];
7793 for(Int_t i=0; i<4; i++){
7794 ssdcableslay5pconwaterot[i] = new TGeoRotation();
7795 ssdcableslay5pconwaterot[i]->SetAngles(90.0*i+45.0,0.,0.);
7796 ssdcablesLay5RightPConWaterToLeftMatrix[i] =
7797 new TGeoHMatrix((*ssdcablesLay5RightPConToLeftRot)*(*ssdcableslay5pconwaterot[i]));
7798 ssdcablesmother->AddNode(ssdcableslay5pconwater[1],i+1,ssdcableslay5pconwaterot[i]);
7799 ssdcablesmother->AddNode(ssdcableslay5pconwater[1],i+5,ssdcablesLay5RightPConWaterToLeftMatrix[i]);
7800 ssdcablesmother->AddNode(ssdcableslay5pconwater[2],i+1,ssdcableslay5pconwaterot[i]);
7801 ssdcablesmother->AddNode(ssdcableslay5pconwater[2],i+5,ssdcablesLay5RightPConWaterToLeftMatrix[i]);
7803 /////////////////////////
7804 // SSD Layer 6 Cables
7805 /////////////////////////
7806 Double_t ssdcableslay6rigthsideradiusmin = fgkEndCapSupportMiddleRadius[1]+fgkSSDCablesLay6TubeRadiusMin;
7807 Double_t ssdcablelay6rightsidelength = 2.*ssdcablelay5rightsidelength;
7808 Double_t ssdcableslay6rightsideradiusmax = ssdcableslay6rigthsideradiusmin+fgkSSDCablesLay6RightSideHeight;
7809 TGeoTube* ssdcablelay6rightubeshape = new TGeoTube(ssdcableslay6rigthsideradiusmin,
7810 ssdcableslay6rightsideradiusmax,
7811 0.5*ssdcablelay6rightsidelength);
7812 TGeoVolume* ssdcablelay6righttube = new TGeoVolume("SSDCableLay6RightSideTube",
7813 ssdcablelay6rightubeshape,
7815 ssdcablelay6righttube->SetLineColor(9);
7816 TGeoTranslation* ssdcablelay6rightrans =
7817 new TGeoTranslation(0.,0.,fgkEndCapSupportCenterLay6ITSPosition
7818 + fgkEndCapSupportCenterLay6Position
7819 + 0.5*ssdcablelay6rightsidelength);
7820 TGeoTranslation* ssdcablesLay6RightTubeToLeftrans = new TGeoTranslation(0.,0.,
7821 - 0.5*ssdcablelay6rightsidelength
7822 - fgkEndCapSupportCenterLay6Position
7823 - fgkEndCapSupportCenterLay6ITSPosition);
7824 ssdcablesmother->AddNode(ssdcablelay6righttube,1,ssdcablelay6rightrans);
7825 ssdcablesmother->AddNode(ssdcablelay6righttube,2,ssdcablesLay6RightTubeToLeftrans);
7826 ////////////////////////////////////
7827 //cablescapacity[8] = 2.*ssdcablelay6rightubeshape->Capacity();
7828 ////////////////////////////////////
7829 TGeoPcon* ssdcableslay6pconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
7831 TGeoVolume* ssdcableslay6pcon;
7832 Double_t ssdcableslay6pconrmin[2];
7833 Double_t ssdcableslay6pconrmax[2];
7834 Double_t ssdcableslay6pconzsection[2];
7835 ssdcableslay6pconrmin[0] = ssdcableslay6rigthsideradiusmin;
7836 ssdcableslay6pconrmax[0] = ssdcableslay6rightsideradiusmax;
7837 ssdcableslay6pconrmin[1] = ssdcableslay6pconrmin[0];
7838 ssdcableslay6pconrmax[1] = ssdcableslay6pconrmax[0];
7839 ssdcableslay6pconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
7840 + fgkEndCapSupportCenterLay6Position
7841 + ssdcablelay6rightsidelength;
7842 ssdcableslay6pconzsection[1] = ssdcableslay5pconwaterzsection[5];
7843 for(Int_t i=0; i<2;i++) ssdcableslay6pconshape->DefineSection(i,ssdcableslay6pconzsection[i],
7844 ssdcableslay6pconrmin[i],ssdcableslay6pconrmax[i]);
7845 ssdcableslay6pcon = new TGeoVolume("SSDCableLay6RightSidePCon",
7846 ssdcableslay6pconshape,fSSDCopper);
7847 ssdcableslay6pcon->SetLineColor(9);
7848 for(Int_t i=0; i<4; i++){
7849 ssdcablesmother->AddNode(ssdcableslay6pcon,i+1,ssdcableslay5pconrot[i]);
7850 ssdcablesmother->AddNode(ssdcableslay6pcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
7852 ////////////////////////////////////
7853 //cablescapacity[9] = 8.*ssdcableslay6pconshape->Capacity();
7854 /////////////////////////
7855 // Water Tubes Layer 6
7856 /////////////////////////
7857 TGeoTube* ssdcablelay6righwatertubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax,
7858 ssdcableslay6rightsideradiusmax
7859 + fgkSSDCablesLay5RightSideWaterHeight,
7860 0.5*ssdcablelay6rightsidelength);
7861 TGeoVolume* ssdcablelay6rightwatertube = new TGeoVolume("SSDCableLay6RightSideWaterTube",
7862 ssdcablelay6righwatertubeshape,
7863 fSSDCoolingTubeWater);
7864 ssdcablelay6rightwatertube->SetLineColor(7);
7865 ssdcablesmother->AddNode(ssdcablelay6rightwatertube,1,ssdcablelay6rightrans);
7866 ssdcablesmother->AddNode(ssdcablelay6rightwatertube,2,ssdcablesLay6RightTubeToLeftrans);
7867 TGeoPcon* ssdcableslay6waterpconshape = new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,
7869 TGeoVolume* ssdcableslay6waterpcon;
7870 Double_t ssdcableslay6waterpconrmin[2];
7871 Double_t ssdcableslay6waterpconrmax[2];
7872 Double_t ssdcableslay6waterpconzsection[2];
7873 ssdcableslay6waterpconrmin[0] = ssdcableslay6rightsideradiusmax;
7874 ssdcableslay6waterpconrmax[0] = ssdcableslay6rightsideradiusmax
7875 + fgkSSDCablesLay5RightSideWaterHeight;
7876 ssdcableslay6waterpconrmin[1] = ssdcableslay6waterpconrmin[0];
7877 ssdcableslay6waterpconrmax[1] = ssdcableslay6waterpconrmax[0];
7878 ssdcableslay6waterpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
7879 + fgkEndCapSupportCenterLay6Position
7880 + ssdcablelay6rightsidelength;
7881 ssdcableslay6waterpconzsection[1] = ssdcableslay5pconwaterzsection[5];
7882 for(Int_t i=0; i<2;i++) ssdcableslay6waterpconshape->DefineSection(i,ssdcableslay6waterpconzsection[i],
7883 ssdcableslay6waterpconrmin[i],ssdcableslay6waterpconrmax[i]);
7884 ssdcableslay6waterpcon = new TGeoVolume("SSDCableLay6RightSideWaterPCon",
7885 ssdcableslay6waterpconshape,fSSDCoolingTubeWater);
7886 ssdcableslay6waterpcon->SetLineColor(7);
7887 TGeoRotation* ssdcableslay6pconwaterot[4];
7888 TGeoRotation* ssdcablesLay6RightPConToLeftRot = new TGeoRotation();
7889 ssdcablesLay6RightPConToLeftRot->SetAngles(90.,180.,-90);
7890 TGeoHMatrix* ssdcablesLay6RightPConToLeftMatrix[4];
7891 for(Int_t i=0; i<4; i++){
7892 ssdcableslay6pconwaterot[i] = new TGeoRotation();
7893 ssdcableslay6pconwaterot[i]->SetAngles(90.0*i+45.0,0.,0.);
7894 ssdcablesLay6RightPConToLeftMatrix[i] = new TGeoHMatrix((*ssdcablesLay6RightPConToLeftRot)
7895 * (*ssdcableslay6pconwaterot[i]));
7896 ssdcablesmother->AddNode(ssdcableslay6waterpcon,i+1,ssdcableslay6pconwaterot[i]);
7897 ssdcablesmother->AddNode(ssdcableslay6waterpcon,i+5,ssdcablesLay6RightPConToLeftMatrix[i]);
7899 ////////////////////////////////////////
7900 // From ITS Ring to Patch Panel3-RB26
7901 ////////////////////////////////////////
7902 Double_t ssdcablepatchpanel3BB26radiusmin[2];
7903 Double_t ssdcablepatchpanel3BB26radiusmax[2];
7904 Double_t ssdcablepatchpanel3RB26zsection[2];
7905 ssdcablepatchpanel3BB26radiusmin[0] = ssdcableslay5pconrmin[3]-0.5*fgkSSDPatchPanelHeight+2.8;
7906 ssdcablepatchpanel3BB26radiusmax[0] = ssdcablepatchpanel3BB26radiusmin[0]
7907 + fgkSSDCablesLay5RightSideHeight
7908 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
7909 ssdcablepatchpanel3BB26radiusmin[1] = fgkSSDPatchPanel2RB26Radius;
7910 ssdcablepatchpanel3BB26radiusmax[1] = ssdcablepatchpanel3BB26radiusmin[1]
7911 + 0.*fgkSSDCablesLay5RightSideHeight
7912 + 0.*fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
7913 ssdcablepatchpanel3RB26zsection[0] = 0.5*fgkSSDCentralSupportLength
7914 + fgkSSDCentralAL3SupportLength
7915 + fgkSSDPConeZLength[0];
7916 ssdcablepatchpanel3RB26zsection[1] = fgkSSDPatchPanel2RB26ITSDistance;
7917 TGeoPcon* ssdcablepatchpanel3RB26pconshape =
7918 new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB26Angle[0]
7919 - 0.5*ssdcableangle,ssdcableangle,2);
7920 for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB26pconshape->DefineSection(i,ssdcablepatchpanel3RB26zsection[i],
7921 ssdcablepatchpanel3BB26radiusmin[i],ssdcablepatchpanel3BB26radiusmax[i]);
7922 TGeoVolume* ssdcablepatchpanel3RB26pcon = new TGeoVolume("SSDCablePatchPanel3RB26",
7923 ssdcablepatchpanel3RB26pconshape,fSSDCopper);
7924 ssdcablepatchpanel3RB26pcon->SetLineColor(9);
7925 TGeoRotation* ssdcablepatchpanel3B26rot[3];
7926 for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B26rot[i] = new TGeoRotation();
7927 ssdcablepatchpanel3B26rot[0]->SetAngles(0.0,0.0,0.0);
7928 ssdcablepatchpanel3B26rot[1]->SetAngles(fgkSSDCablesPatchPanel2RB26Angle[0]
7929 + fgkSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
7930 ssdcablepatchpanel3B26rot[2]->SetAngles(180.0,0.0,0.0);
7931 ssdcablepatchpanel3B26rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB26Angle[0]
7932 + fgkSSDCablesPatchPanel2RB26Angle[1]+6.0,0.0,0.0);
7933 for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB26pcon,i+1,ssdcablepatchpanel3B26rot[i]);
7934 ////////////////////////////////////
7935 //cablescapacity[10] = 4.*ssdcablepatchpanel3RB26pconshape->Capacity();
7936 ////////////////////////////////////////
7937 // ITS Ring Cables RB26 Part
7938 ////////////////////////////////////////
7939 Double_t ssdcableitsring3BB26pconzsection[2];
7940 Double_t ssdcableitsring3BB26pconrmin[2];
7941 Double_t ssdcableitsring3BB26pconrmax[2];
7942 ssdcableitsring3BB26pconzsection[0] = 0.5*fgkSSDCentralSupportLength
7943 + fgkSSDCentralAL3SupportLength
7944 + (4.0/5.0)*fgkSSDPConeZLength[0];
7945 ssdcableitsring3BB26pconzsection[1] = ssdcablepatchpanel3RB26zsection[0];
7946 ssdcableitsring3BB26pconrmin[0] = fgkSSDPConeUpRadius-0.5*fgkSSDPatchPanelHeight;
7947 ssdcableitsring3BB26pconrmax[0] = ssdcableitsring3BB26pconrmin[0]
7948 + fgkSSDCablesLay5RightSideHeight
7949 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
7950 ssdcableitsring3BB26pconrmin[1] = ssdcablepatchpanel3BB26radiusmin[0];
7951 ssdcableitsring3BB26pconrmax[1] = ssdcablepatchpanel3BB26radiusmax[0];
7952 TGeoPcon* ssdcableitsring3BB26pconshape[4];
7953 ssdcableitsring3BB26pconshape[0] = new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB26Angle[0]
7954 - 0.5*ssdcableangle,ssdcableangle
7955 + (fgkSSDCablesPatchPanel2RB26Angle[0]
7956 - fgkSSDCableAngle),2);
7957 ssdcableitsring3BB26pconshape[1] = new TGeoPcon(90.0+fgkSSDCablesPatchPanel2RB26Angle[1]
7958 - 0.5*ssdcableangle,ssdcableangle
7959 + 3.0*fgkSSDCableAngle
7960 - fgkSSDCablesPatchPanel2RB26Angle[1],2);
7961 ssdcableitsring3BB26pconshape[2] = new TGeoPcon(270-fgkSSDCablesPatchPanel2RB26Angle[0]
7962 - 0.5*ssdcableangle,ssdcableangle
7964 + fgkSSDCablesPatchPanel2RB26Angle[0],2);
7965 ssdcableitsring3BB26pconshape[3] = new TGeoPcon(270.0+fgkSSDCablesPatchPanel2RB26Angle[1]
7966 - 0.5*ssdcableangle,ssdcableangle
7967 + 3.0*fgkSSDCableAngle
7968 - fgkSSDCablesPatchPanel2RB26Angle[1],2);
7969 for(Int_t i=0;i<4;i++)
7970 for(Int_t j=0; j<2; j++) ssdcableitsring3BB26pconshape[i]->DefineSection(j,ssdcableitsring3BB26pconzsection[j],
7971 ssdcableitsring3BB26pconrmin[j],
7972 ssdcableitsring3BB26pconrmax[j]);
7973 TGeoVolume* ssdcableitsring3BB26pcon[4];
7974 ssdcableitsring3BB26pcon[0] = new TGeoVolume("SSDCableITSRing3RB26Part1",
7975 ssdcableitsring3BB26pconshape[0],fSSDCopper);
7976 ssdcableitsring3BB26pcon[1] = new TGeoVolume("SSDCableITSRing3RB26Part2",
7977 ssdcableitsring3BB26pconshape[1],fSSDCopper);
7978 ssdcableitsring3BB26pcon[2] = new TGeoVolume("SSDCableITSRing3RB26Part3",
7979 ssdcableitsring3BB26pconshape[2],fSSDCopper);
7980 ssdcableitsring3BB26pcon[3] = new TGeoVolume("SSDCableITSRing3RB26Part4",
7981 ssdcableitsring3BB26pconshape[3],fSSDCopper);
7982 for(Int_t i=0;i<4;i++){
7983 ssdcableitsring3BB26pcon[i]->SetLineColor(9);
7984 ssdcablesmother->AddNode(ssdcableitsring3BB26pcon[i],1);
7986 ////////////////////////////////////
7987 //cablescapacity[11] = ssdcableitsring3BB26pconshape[0]->Capacity()
7988 // + ssdcableitsring3BB26pconshape[1]->Capacity()
7989 // + ssdcableitsring3BB26pconshape[2]->Capacity()
7990 // + ssdcableitsring3BB26pconshape[3]->Capacity();
7991 ////////////////////////////////////////
7992 // From ITS Ring to Patch Panel2-RB24
7993 ////////////////////////////////////////
7994 Double_t ssdcablepatchpanel3BB24radiusmin[2];
7995 Double_t ssdcablepatchpanel3BB24radiusmax[2];
7996 Double_t ssdcablepatchpanel3RB24zsection[2];
7997 ssdcablepatchpanel3BB24radiusmin[0] = ssdcablepatchpanel3BB26radiusmin[0];
7998 ssdcablepatchpanel3BB24radiusmax[0] = ssdcablepatchpanel3BB26radiusmax[0];
7999 ssdcablepatchpanel3BB24radiusmin[1] = fgkSSDPatchPanel2RB24Radius;
8000 ssdcablepatchpanel3BB24radiusmax[1] = ssdcablepatchpanel3BB24radiusmin[1]
8001 + 0.*fgkSSDCablesLay5RightSideHeight
8002 + 0.*fgkSSDCablesLay6RightSideHeight
8003 + 0.5*fgkSSDPatchPanelHeight;
8004 ssdcablepatchpanel3RB24zsection[0] = -0.5*fgkSSDCentralSupportLength
8005 - fgkSSDCentralAL3SupportLength
8006 - fgkSSDPConeZLength[0];
8007 ssdcablepatchpanel3RB24zsection[1] = -fgkSSDPatchPanel2RB24ITSDistance;
8008 TGeoPcon* ssdcablepatchpanel3RB24pconshape =
8009 new TGeoPcon(90.0-fgkSSDCablesPatchPanel2RB24Angle[1]
8010 - 0.5*ssdcableangle,ssdcableangle,2);
8011 for(Int_t i=0; i<2;i++) ssdcablepatchpanel3RB24pconshape->DefineSection(i,ssdcablepatchpanel3RB24zsection[i],
8012 ssdcablepatchpanel3BB24radiusmin[i],ssdcablepatchpanel3BB24radiusmax[i]);
8013 TGeoVolume* ssdcablepatchpanel3RB24pcon = new TGeoVolume("SSDCablePatchPanel3RB24",
8014 ssdcablepatchpanel3RB24pconshape,
8016 ssdcablepatchpanel3RB24pcon->SetLineColor(9);
8017 TGeoRotation* ssdcablepatchpanel3B24rot[3];
8018 for(Int_t i=0; i<4; i++) ssdcablepatchpanel3B24rot[i] = new TGeoRotation();
8019 ssdcablepatchpanel3B24rot[0]->SetAngles(-6.0,0.0,0.0);
8020 ssdcablepatchpanel3B24rot[1]->SetAngles(fgkSSDCablesPatchPanel2RB24Angle[0]
8021 + fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
8022 ssdcablepatchpanel3B24rot[2]->SetAngles(174.0,0.0,0.0);
8023 ssdcablepatchpanel3B24rot[3]->SetAngles(180.0+fgkSSDCablesPatchPanel2RB24Angle[0]
8024 + fgkSSDCablesPatchPanel2RB24Angle[1],0.0,0.0);
8025 for(Int_t i=0; i<4; i++) ssdcablesmother->AddNode(ssdcablepatchpanel3RB24pcon,i+1,ssdcablepatchpanel3B24rot[i]);
8026 ////////////////////////////////////
8027 //cablescapacity[12] = 4.*ssdcablepatchpanel3RB24pconshape->Capacity();
8028 ////////////////////////////////////////
8029 // ITS Ring Cables RB24 Part
8030 ////////////////////////////////////////
8031 Double_t ssdcableitsring3BB24pconzsection[2];
8032 Double_t ssdcableitsring3BB24pconrmin[2];
8033 Double_t ssdcableitsring3BB24pconrmax[2];
8034 ssdcableitsring3BB24pconzsection[0] = -ssdcableitsring3BB26pconzsection[0];
8035 ssdcableitsring3BB24pconzsection[1] = ssdcablepatchpanel3RB24zsection[0];
8036 ssdcableitsring3BB24pconrmin[0] = fgkSSDPConeUpRadius-0.5*fgkSSDPatchPanelHeight;
8037 ssdcableitsring3BB24pconrmax[0] = ssdcableitsring3BB24pconrmin[0]
8038 + fgkSSDCablesLay5RightSideHeight
8039 + fgkSSDCablesLay6RightSideHeight+0.5*fgkSSDPatchPanelHeight;
8040 ssdcableitsring3BB24pconrmin[1] = ssdcablepatchpanel3BB24radiusmin[0];
8041 ssdcableitsring3BB24pconrmax[1] = ssdcablepatchpanel3BB24radiusmax[0];
8042 TGeoPcon* ssdcableitsring3BB24pconshape[4];
8043 ssdcableitsring3BB24pconshape[0] = new TGeoPcon(fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle
8044 + (90.0-fgkSSDCablesPatchPanel2RB24Angle[1]
8045 - fgkSSDCableAngle),2);
8046 ssdcableitsring3BB24pconshape[1] = new TGeoPcon(90.0+fgkSSDCableAngle-0.5*ssdcableangle,
8047 ssdcableangle-fgkSSDCableAngle
8048 + fgkSSDCablesPatchPanel2RB24Angle[0],2);
8049 ssdcableitsring3BB24pconshape[2] = new TGeoPcon(180.0+fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle
8051 + 90.0-fgkSSDCablesPatchPanel2RB24Angle[1],2);
8052 ssdcableitsring3BB24pconshape[3] = new TGeoPcon(270.0+fgkSSDCableAngle-0.5*ssdcableangle,
8053 ssdcableangle-fgkSSDCableAngle
8054 + fgkSSDCablesPatchPanel2RB24Angle[0],2);
8055 for(Int_t i=0;i<4;i++)
8056 for(Int_t j=0; j<2; j++) ssdcableitsring3BB24pconshape[i]->DefineSection(j,ssdcableitsring3BB24pconzsection[j],
8057 ssdcableitsring3BB24pconrmin[j],
8058 ssdcableitsring3BB24pconrmax[j]);
8059 TGeoVolume* ssdcableitsring3BB24pcon[4];
8060 ssdcableitsring3BB24pcon[0] = new TGeoVolume("SSDCableITSRing3RB24Part1",
8061 ssdcableitsring3BB24pconshape[0],fSSDCopper);
8062 ssdcableitsring3BB24pcon[1] = new TGeoVolume("SSDCableITSRing3RB24Part2",
8063 ssdcableitsring3BB24pconshape[1],fSSDCopper);
8064 ssdcableitsring3BB24pcon[2] = new TGeoVolume("SSDCableITSRing3RB24Part3",
8065 ssdcableitsring3BB24pconshape[2],fSSDCopper);
8066 ssdcableitsring3BB24pcon[3] = new TGeoVolume("SSDCableITSRing3RB24Part4",
8067 ssdcableitsring3BB24pconshape[3],fSSDCopper);
8068 for(Int_t i=0;i<4;i++){
8069 ssdcableitsring3BB24pcon[i]->SetLineColor(9);
8070 ssdcablesmother->AddNode(ssdcableitsring3BB24pcon[i],1);
8072 ////////////////////////////////////
8073 //cablescapacity[13] = ssdcableitsring3BB24pconshape[0]->Capacity()
8074 // + ssdcableitsring3BB24pconshape[1]->Capacity()
8075 // + ssdcableitsring3BB24pconshape[2]->Capacity()
8076 // + ssdcableitsring3BB24pconshape[3]->Capacity();
8077 ////////////////////////////////////
8078 // Volumes for Material Budget
8079 ////////////////////////////////////
8080 TGeoTube* ssdcablelay6materialbudgetubeshape = new TGeoTube(ssdcableslay6rightsideradiusmax
8081 + fgkSSDCablesLay5RightSideWaterHeight,
8082 ssdcableslay6rightsideradiusmax
8083 + fgkSSDCablesLay5RightSideWaterHeight
8084 + fgkSSDCableMaterialBudgetHeight,0.5*ssdcablelay6rightsidelength);
8085 TGeoVolume* ssdcablelay6materialbudgetube = new TGeoVolume("SSDCableLay6MaterialBudgetTube",
8086 ssdcablelay6materialbudgetubeshape,
8088 ssdcablelay6materialbudgetube->SetLineColor(9);
8089 ssdcablesmother->AddNode(ssdcablelay6materialbudgetube,1,ssdcablelay6rightrans);
8090 ssdcablesmother->AddNode(ssdcablelay6materialbudgetube,2,ssdcablesLay6RightTubeToLeftrans);
8092 TGeoPcon* ssdcablelay6materialbudgetpconshape =
8093 new TGeoPcon(90.0-fgkSSDCableAngle-0.5*ssdcableangle,ssdcableangle,2);
8094 TGeoVolume* ssdcablelay6materialbudgetpcon;
8095 Double_t ssdcablelay6materialbudgetpconrmin[2];
8096 Double_t ssdcablelay6materialbudgetpconrmax[2];
8097 Double_t ssdcablelay6materialbudgetpconzsection[2];
8098 ssdcablelay6materialbudgetpconrmin[0] = ssdcableslay6rightsideradiusmax
8099 + fgkSSDCablesLay5RightSideWaterHeight;
8100 ssdcablelay6materialbudgetpconrmax[0] = ssdcablelay6materialbudgetpconrmin[0]
8101 + fgkSSDCableMaterialBudgetHeight;
8102 ssdcablelay6materialbudgetpconrmin[1] = ssdcablelay6materialbudgetpconrmin[0];
8103 ssdcablelay6materialbudgetpconrmax[1] = ssdcablelay6materialbudgetpconrmax[0];
8104 ssdcablelay6materialbudgetpconzsection[0] = fgkEndCapSupportCenterLay6ITSPosition
8105 + fgkEndCapSupportCenterLay6Position
8106 + ssdcablelay6rightsidelength;
8107 ssdcablelay6materialbudgetpconzsection[1] = ssdcableslay5pconwaterzsection[5];
8108 for(Int_t i=0; i<2;i++) ssdcablelay6materialbudgetpconshape->DefineSection(i,
8109 ssdcablelay6materialbudgetpconzsection[i],
8110 ssdcablelay6materialbudgetpconrmin[i],
8111 ssdcablelay6materialbudgetpconrmax[i]);
8112 ssdcablelay6materialbudgetpcon = new TGeoVolume("SSDCableLay6MaterialBudgetPCon",
8113 ssdcablelay6materialbudgetpconshape,fSSDCopper);
8114 ssdcablelay6materialbudgetpcon->SetLineColor(9);
8115 for(Int_t i=0; i<4; i++){
8116 ssdcablesmother->AddNode(ssdcablelay6materialbudgetpcon,i+1,ssdcableslay5pconrot[i]);
8117 ssdcablesmother->AddNode(ssdcablelay6materialbudgetpcon,i+5,ssdcablesLay5RightPConToLeftMatrix[i]);
8119 ////////////////////////////////////
8120 /* cablescapacity[14] = 2.*ssdcablelay6materialbudgetubeshape->Capacity();
8121 cablescapacity[15] = 2.*ssdcablelay6materialbudgetpconshape->Capacity();
8122 Double_t ssdcablesvolume = 0.0;
8123 for(Int_t i=0;i<16;i++) ssdcablesvolume+=cablescapacity[i];
8124 std::cout << ssdcablesvolume << std::endl;*/
8125 return ssdcablesmother;
8127 ////////////////////////////////////////////////////////////////////////////////
8128 TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3* vertexpos[], Double_t* width,
8129 Double_t height, const char* shapename, Int_t isign) const{
8130 /////////////////////////////////////////////////////////////
8131 // Method generating an Arb shape
8132 /////////////////////////////////////////////////////////////
8133 const Int_t kvertexnumber = 8;
8134 const Int_t ktransvectnumber = 2;
8135 TVector3 vertex[kvertexnumber];
8136 TVector3 transvector[2];
8137 for(Int_t i=0; i<ktransvectnumber; i++) transvector[i].SetY(width[i]);
8138 /////////////////////////////////////////////////////////////
8139 //Setting the vertices for TGeoArb8
8140 /////////////////////////////////////////////////////////////
8141 vertex[0] = *vertexpos[0];
8142 vertex[1] = *vertexpos[1];
8143 vertex[2] = vertex[1];
8144 vertex[3] = vertex[0];
8145 vertex[4] = *vertexpos[2];
8146 vertex[5] = *vertexpos[3];
8147 vertex[6] = vertex[5];
8148 vertex[7] = vertex[4];
8150 // NB: order of points is clockwise
8152 vertex[2] -= transvector[0];
8153 vertex[3] -= transvector[0];
8154 vertex[6] -= transvector[1];
8155 vertex[7] -= transvector[1];
8158 vertex[0] += transvector[0];
8159 vertex[1] += transvector[0];
8160 vertex[4] += transvector[1];
8161 vertex[5] += transvector[1];
8164 /////////////////////////////////////////////////////////////
8165 TGeoArb8* arbshape = new TGeoArb8(shapename,0.5*height);
8166 for(Int_t i = 0; i<kvertexnumber;i++) {
8167 arbshape->SetVertex(i,vertex[i].X(),vertex[i].Y());
8172 ///////////////////////////////////////////////////////////////////////////////
8173 TGeoXtru* AliITSv11GeometrySSD::GetArcShape(Double_t phi, Double_t rmin,
8174 Double_t rmax, Int_t nedges, Double_t height){
8175 /////////////////////////////////////////////////////////////
8176 // Method generating Arc shape
8177 /////////////////////////////////////////////////////////////
8178 const Int_t kvertexnumber = 2*nedges+2;
8179 TGeoXtru* arcshape = new TGeoXtru(2);
8180 TVector3** vertexposition[2];
8181 for(Int_t i=0; i<2; i++) vertexposition[i] = new TVector3*[nedges+1];
8182 Double_t angle = 0.;
8183 for(Int_t i=0; i<nedges+1; i++){
8184 angle = 90.+0.5*phi-i*(phi/nedges);
8185 vertexposition[0][i] = new TVector3(rmin*CosD(angle),rmin*SinD(angle));
8186 vertexposition[1][i] = new TVector3(rmax*CosD(angle),rmax*SinD(angle));
8188 Double_t *xvertexpoints = new Double_t[kvertexnumber];
8189 Double_t *yvertexpoints = new Double_t[kvertexnumber];
8190 for(Int_t i=0; i<kvertexnumber; i++){
8191 if(i==0){ xvertexpoints[i] = vertexposition[0][i]->X(),
8192 yvertexpoints[i] = vertexposition[0][i]->Y();
8194 else if(i>=1&&i<nedges+2)
8196 xvertexpoints[i] = vertexposition[1][i-1]->X();
8197 yvertexpoints[i] = vertexposition[1][i-1]->Y();
8201 xvertexpoints[i] = vertexposition[0][kvertexnumber-i]->X();
8202 yvertexpoints[i] = vertexposition[0][kvertexnumber-i]->Y();
8205 arcshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
8206 arcshape->DefineSection(0,-0.5*height);
8207 arcshape->DefineSection(1,0.5*height);
8208 /////////////////////////////////////////////////////////////
8209 // Deallocating memory
8210 /////////////////////////////////////////////////////////////
8211 for(Int_t i=0; i<2; i++){
8212 for(Int_t j=0; j<nedges+1; j++)
8213 delete vertexposition[i][j];
8214 delete [] vertexposition[i];
8216 delete [] xvertexpoints;
8217 delete [] yvertexpoints;
8218 /////////////////////////////////////////////////////////////
8221 ////////////////////////////////////////////////////////////////////////////////
8222 TGeoShape* AliITSv11GeometrySSD::GetScrewShape(Double_t* radius,Int_t* edgesnumber,Double_t* section) const {
8223 ///////////////////////////////////////////////////////////////////////
8224 // Method Generating the Screw Shape
8225 // radius[0]: outer radius
8226 // radius[1]: inner radius
8227 // edgesnumber[0]: outer number of edges
8228 // edgesnumber[1]: inner number of edges
8229 // section[0]: lower section position
8230 // section[1]: higher section position
8231 ///////////////////////////////////////////////////////////////////////
8232 Double_t outradius = radius[0];
8233 Double_t inradius = radius[1];
8234 Int_t outvertexnumber = edgesnumber[0];
8235 Int_t invertexnumber = edgesnumber[1];
8236 Double_t* xscrewvertex = new Double_t[outvertexnumber+invertexnumber];
8237 Double_t* yscrewvertex = new Double_t[outvertexnumber+invertexnumber];
8238 for(Int_t i=0; i<outvertexnumber; i++){
8239 xscrewvertex[i] = outradius*CosD(90.+i*360./outvertexnumber);
8240 yscrewvertex[i] = outradius*SinD(90.+i*360./outvertexnumber);
8242 for(Int_t i=0; i<invertexnumber; i++){
8243 xscrewvertex[outvertexnumber+i] = inradius*CosD(90.+i*360./invertexnumber);
8244 yscrewvertex[outvertexnumber+i] = inradius*SinD(90.+i*360./invertexnumber);
8246 TGeoXtru* screwshapeout = new TGeoXtru(2);
8247 screwshapeout->DefinePolygon(outvertexnumber,xscrewvertex,yscrewvertex);
8248 screwshapeout->DefineSection(0,section[0]);
8249 screwshapeout->DefineSection(1,section[1]);
8250 TGeoXtru* screwshapein = new TGeoXtru(2);
8251 screwshapein->DefinePolygon(invertexnumber,&xscrewvertex[outvertexnumber],&yscrewvertex[outvertexnumber]);
8252 screwshapein->DefineSection(0,section[0]-0.01); // make inner part bigger in Z
8253 screwshapein->DefineSection(1,section[1]+0.01); // safer when we subtract it
8254 TGeoSubtraction *snode = new TGeoSubtraction(screwshapeout, screwshapein);
8255 TGeoCompositeShape *screwshape = new TGeoCompositeShape("", snode);
8257 delete [] xscrewvertex;
8258 delete [] yscrewvertex;
8261 ////////////////////////////////////////////////////////////////////////////////
8262 TGeoShape* AliITSv11GeometrySSD::GetHoleShape(Double_t radius, Int_t nedges, Double_t *section) const {
8263 ///////////////////////////////////////////////////////////////////////
8264 // Method Generating the Hole Shape
8265 // radius of the Hole
8266 // nedges: number of edges to approximate the circle
8267 ///////////////////////////////////////////////////////////////////////
8268 Double_t* xholevertex = new Double_t[nedges];
8269 Double_t* yholevertex = new Double_t[nedges];
8270 Double_t z = 0.5*(section[0]+section[1]);
8271 Double_t dz = 0.5*(section[1]-section[0]);
8272 TGeoTranslation *tr = 0;
8273 if (TMath::Abs(z) > TGeoShape::Tolerance()) {
8274 tr = new TGeoTranslation(0.,0.,z);
8275 tr->RegisterYourself();
8277 TGeoBBox *box = new TGeoBBox("",radius,radius,dz);
8278 for(Int_t i=0; i<nedges; i++){
8279 xholevertex[i] = radius*CosD(i*360./nedges);
8280 yholevertex[i] = radius*SinD(i*360./nedges);
8282 TGeoXtru* holeshapeout = new TGeoXtru(2);
8283 holeshapeout->DefinePolygon(nedges,xholevertex,yholevertex);
8284 holeshapeout->DefineSection(0,section[0]-0.01); // make subtracted part larger in Z
8285 holeshapeout->DefineSection(1,section[1]+0.01);
8286 TGeoSubtraction *snode = new TGeoSubtraction(box,holeshapeout,tr);
8287 TGeoCompositeShape *holeshape = new TGeoCompositeShape("", snode);
8289 delete [] xholevertex;
8290 delete [] yholevertex;
8293 ////////////////////////////////////////////////////////////////////////////////
8294 TVector3* AliITSv11GeometrySSD::GetReflection(TVector3* vector,Double_t* param) const{
8295 /////////////////////////////////////////////////////////////
8296 // Given an axis specified by param, it gives the reflection of the point
8297 // respect to the axis
8298 /////////////////////////////////////////////////////////////
8299 TVector3* n = new TVector3(param[0],param[1],param[2]);
8300 Double_t d = ((*vector)*(*n)+param[3])/n->Mag2();
8301 TVector3* reflectedvector = new TVector3(*vector-2*d*(*n));
8302 /////////////////////////////////////////////////////////////
8303 // Deallocating memory
8304 /////////////////////////////////////////////////////////////
8306 /////////////////////////////////////////////////////////////
8307 return reflectedvector;
8309 ////////////////////////////////////////////////////////////////////////////////
8310 TGeoHMatrix* AliITSv11GeometrySSD::AddTranslationToHMatrix(TGeoHMatrix* ct,
8314 /////////////////////////////////////////////////////////////
8315 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
8316 /////////////////////////////////////////////////////////////
8317 TGeoHMatrix* hmatrix = new TGeoHMatrix(*ct);
8318 const Double_t *vect = hmatrix->GetTranslation();
8319 Double_t newvect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
8320 hmatrix->SetTranslation(newvect);
8321 TGeoHMatrix* matrix = new TGeoHMatrix(*hmatrix);
8325 ////////////////////////////////////////////////////////////////////////////////
8326 TGeoMedium* AliITSv11GeometrySSD::GetMedium(const char* mediumName) {
8327 /////////////////////////////////////////////////////////////
8328 // Method returning the Medium type
8329 /////////////////////////////////////////////////////////////
8331 sprintf(ch, "ITS_%s",mediumName);
8332 TGeoMedium* medium = gGeoManager->GetMedium(ch);
8334 AliError(Form("medium %s not found !\n", mediumName));
8337 ////////////////////////////////////////////////////////////////////////////////
8338 void AliITSv11GeometrySSD::CreateMaterials(){
8339 ///////////////////////////////////
8340 // This part has to be modified
8341 ///////////////////////////////////
8342 ///////////////////////////////////
8343 // Silicon for Sensor
8344 ///////////////////////////////////
8345 fSSDSensorMedium = GetMedium("SI$");
8346 ///////////////////////////////////
8347 // Silicon Mixture for Sensor
8348 ///////////////////////////////////
8349 fSSDChipMedium = GetMedium("SPD SI CHIP$");
8350 fSSDChipGlueMedium = GetMedium("EPOXY$");
8351 ///////////////////////////////////
8352 // Stiffener Components Materials
8353 ///////////////////////////////////
8354 fSSDStiffenerMedium = GetMedium("SDD C AL (M55J)$");
8355 ///////////////////////////
8356 // Stiffener Connectors
8357 ///////////////////////////
8358 fSSDStiffenerConnectorMedium = GetMedium("COPPER$");
8359 ////////////////////////////////
8360 // Stiffener 0603-1812 Capacitor
8361 ////////////////////////////////
8362 fSSDStiffener0603CapacitorMedium = GetMedium("SDD ruby sph. Al2O3$");
8363 fSSDStiffener1812CapacitorMedium = GetMedium("SDD ruby sph. Al2O3$");
8364 ///////////////////////////
8365 // Stiffener Hybrid Wire
8366 ///////////////////////////
8367 fSSDStiffenerHybridWireMedium = GetMedium("COPPER$");
8368 ///////////////////////////
8369 // Al for Cooling Block
8370 ///////////////////////////
8371 fSSDAlCoolBlockMedium = GetMedium("AL$");
8372 //////////////////////////////////////////////////////
8373 // Kapton and Al for Chip Cable Flex and Ladder Cables
8374 //////////////////////////////////////////////////////
8375 fSSDKaptonChipCableMedium = GetMedium("KAPTONH(POLYCH2)$");
8376 fSSDAlTraceChipCableMedium = GetMedium("AL$");
8377 fSSDKaptonFlexMedium = GetMedium("KAPTONH(POLYCH2)$");
8378 fSSDAlTraceFlexMedium = GetMedium("AL$");
8379 fSSDKaptonLadderCableMedium = GetMedium("KAPTONH(POLYCH2)$");
8380 fSSDAlTraceLadderCableMedium = GetMedium("AL$");
8381 /////////////////////////////////////////////////////////////////
8382 // M55J for Carbon Fiber, CarbonFiber Lower Support and Junction
8383 //////////////////////////////////////////////////////////////////
8384 fSSDCarbonFiberMedium = GetMedium("GEN C (M55J)$");
8385 /////////////////////////////////////////////////////////////////
8386 // G10 for Detector Leg, TubeHolder
8387 //////////////////////////////////////////////////////////////////
8388 fSSDTubeHolderMedium = GetMedium("G10FR4$");
8389 fSSDSensorSupportMedium = GetMedium("G10FR4$");
8390 fSSDMountingBlockMedium = GetMedium("G10FR4$");
8391 fSSDMountingBlockMedium = GetMedium("G10FR4$");
8392 /////////////////////////////////////////////////////////////////
8393 // Water and Phynox for Cooling Tube
8394 //////////////////////////////////////////////////////////////////
8395 fSSDCoolingTubeWater = GetMedium("WATER$");
8396 fSSDCoolingTubePhynox = GetMedium("INOX$");
8397 /////////////////////////////////////////////////////////////////////
8398 // Material for Support Rings
8399 /////////////////////////////////////////////////////////////////////
8400 fSSDSupportRingAl = GetMedium("AL$");
8401 fSSDRohaCellCone = GetMedium("ROHACELL$");
8402 /////////////////////////////////////////////////////////////////////
8403 fSSDAir = GetMedium("SDD AIR$");
8404 fSSDCopper = GetMedium("COPPER$");
8405 fCreateMaterials = kTRUE;
8407 /////////////////////////////////////////////////////////////////////