New AliITSMisAligner class. It replaces MakeITS...MisAlignment.C macros and class...
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySSD.cxx
... / ...
CommitLineData
1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18//*************************************************************************
19// SSD geometry, based on ROOT geometrical modeler
20//
21// Enrico Cattaruzza ecattar@ts.infn.it
22//*************************************************************************
23#include "TMath.h"
24#include "TGeoVolume.h"
25#include "TGeoMatrix.h"
26#include <TGeoManager.h>
27#include "TVector3.h"
28#include "TGeoArb8.h"
29#include "TList.h"
30#include "TGeoMatrix.h"
31#include "TGeoCompositeShape.h"
32#include "TGeoBoolNode.h"
33#include "TGeoTube.h"
34#include "TGeoBBox.h"
35#include "TGeoXtru.h"
36#include "TGeoTorus.h"
37#include "TGeoPgon.h"
38#include "TGeoPcon.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/////////////////////////////////////////////////////////////////////////////////
45const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName5 = "ITSssdSensitivL5";
46const char* AliITSv11GeometrySSD::fgSSDsensitiveVolName6 = "ITSssdSensitivL6";
47/////////////////////////////////////////////////////////////////////////////////
48//Parameters for SSD Geometry
49/////////////////////////////////////////////////////////////////////////////////
50// Variable for Vertical Disalignement of Modules
51/////////////////////////////////////////////////////////////////////////////////
52const Double_t AliITSv11GeometrySSD::fgkSSDTolerance = 0.0001*fgkmm;
53const Double_t AliITSv11GeometrySSD::fgkSSDModuleVerticalDisalignment = 0.2*fgkmm;
54const Double_t AliITSv11GeometrySSD::fgkSSDModuleSideDisalignment = 0.2*fgkmm;
55// For ladders:
56const Double_t AliITSv11GeometrySSD::fgkSSDLadderVerticalDisalignment = 0.2*fgkmm;
57/////////////////////////////////////////////////////////////////////////////////
58// Layer5 (lengths are in mm and angles in degrees)
59/////////////////////////////////////////////////////////////////////////////////
60const Double_t AliITSv11GeometrySSD::fgkSSDLay5LadderLength = 950.7*fgkmm;
61const Int_t AliITSv11GeometrySSD::fgkSSDLay5SensorsNumber = 22;
62const Int_t AliITSv11GeometrySSD::fgkSSDLay5LadderNumber = 34;
63const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMin = 378.0*fgkmm;
64const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMax = 384.0*fgkmm;
65const Double_t AliITSv11GeometrySSD::fgkLay5CenterITSPosition = 467.85*fgkmm;
66/////////////////////////////////////////////////////////////////////////////////
67// Layer6 (lengths are in mm and angles in degrees)
68/////////////////////////////////////////////////////////////////////////////////
69const Double_t AliITSv11GeometrySSD::fgkSSDLay6LadderLength = 1068.0*fgkmm;
70const Int_t AliITSv11GeometrySSD::fgkSSDLay6SensorsNumber = 25;
71const Int_t AliITSv11GeometrySSD::fgkSSDLay6LadderNumber = 38;
72const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMin = 428.0*fgkmm;
73const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMax = 434.0*fgkmm;
74const Double_t AliITSv11GeometrySSD::fgkLay6CenterITSPosition = 526.50*fgkmm;
75/////////////////////////////////////////////////////////////////////////////////
76// SSD Chips and Hybrid (lengths are in mm and angles in degrees)
77/////////////////////////////////////////////////////////////////////////////////
78const Int_t AliITSv11GeometrySSD::fgkSSDChipNumber = 6;
79const Double_t AliITSv11GeometrySSD::fgkSSDChipLength = 11.100*fgkmm;
80const Double_t AliITSv11GeometrySSD::fgkSSDChipWidth = 3.850*fgkmm;
81const Double_t AliITSv11GeometrySSD::fgkSSDChipHeight = 0.180*fgkmm;
82const Double_t AliITSv11GeometrySSD::fgkSSDChipSeparationLength = 1.000*fgkmm;
83const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueLength = fgkSSDChipLength;
84const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueWidth = fgkSSDChipWidth;
85const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueHeight = 0.030*fgkmm;
86/////////////////////////////////////////////////////////////////////////////////
87// Stiffener (lengths are in mm and angles in degrees)
88/////////////////////////////////////////////////////////////////////////////////
89const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerLength = 73.000*fgkmm;
90const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerWidth = 6.500*fgkmm;
91//const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 3.315;
92const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 0.315*fgkmm;
93const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerToChipDist = 2.500*fgkmm;
94const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Length = 1.600*fgkmm;
95const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Width = 0.870*fgkmm;
96const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Height = 0.800*fgkmm;
97const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Length = 4.600*fgkmm;
98const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Width = 3.400*fgkmm;
99const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Height = 0.700*fgkmm; // multiplied by 0.5
100const Double_t AliITSv11GeometrySSD::fgkSSDWireLength = 30.000*fgkmm;
101const Double_t AliITSv11GeometrySSD::fgkSSDWireRadius = 0.185*fgkmm;
102const Double_t AliITSv11GeometrySSD::fgkSSDConnectorPosition[2] =
103 {44.32*fgkmm, 0.33*fgkmm};
104const Double_t AliITSv11GeometrySSD::fgkSSDConnectorSeparation = 0.44*fgkmm;
105const Double_t AliITSv11GeometrySSD::fgkSSDConnectorLength = 2.16*fgkmm;
106const Double_t AliITSv11GeometrySSD::fgkSSDConnectorWidth = 3.60*fgkmm;
107const Double_t AliITSv11GeometrySSD::fgkSSDConnectorHeight =
108 0.25*fgkSSDStiffenerHeight;
109const Double_t AliITSv11GeometrySSD::fgkSSDConnectorAlHeight = 0.030*fgkmm;
110const Double_t AliITSv11GeometrySSD::fgkSSDConnectorNiHeight = 0.002*fgkmm;
111/////////////////////////////////////////////////////////////////////////////////
112// Cooling Block (lengths are in mm and angles in degrees)
113/////////////////////////////////////////////////////////////////////////////////
114const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockLength = 3.000*fgkmm;
115const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockWidth = 4.000*fgkmm;
116const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHeight[3] =
117 {1.950*fgkmm, 0.240*fgkmm, 0.300*fgkmm};
118const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleRadius[2] =
119 {1.000*fgkmm, 0.120*fgkmm};
120const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleLength[2] =
121 {1.900*fgkmm, 0.400*fgkmm};
122const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleCenter =
123 1.500*fgkmm;
124const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleHeight =
125 0.300*fgkmm;
126/////////////////////////////////////////////////////////////////////////////////
127// SSD Sensor (lengths are in mm and angles in degrees)
128/////////////////////////////////////////////////////////////////////////////////
129const char* AliITSv11GeometrySSD::fgkSSDSensitiveVolName =
130 "SSDSensorSensitiveVol";
131const Double_t AliITSv11GeometrySSD::fgkSSDSensorLength = 42.000*fgkmm;
132const Double_t AliITSv11GeometrySSD::fgkSSDSensorHeight = 0.300*fgkmm;
133const Double_t AliITSv11GeometrySSD::fgkSSDSensorWidth = 75.000*fgkmm;
134const Double_t AliITSv11GeometrySSD::fgkSSDSensorOverlap =
135 fgkSSDSensorLength-39.1*fgkmm;
136const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveLength = 1.*fgkmm;
137const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveWidth = 1.*fgkmm;
138/////////////////////////////////////////////////////////////////////////////////
139// Flex (lengths are in mm and angles in degrees)
140/////////////////////////////////////////////////////////////////////////////////
141const Double_t AliITSv11GeometrySSD::fgkSSDFlexFullLength = 106.000*fgkmm;
142const 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};
148const Double_t AliITSv11GeometrySSD::fgkSSDFlexWidth[2] =
149 { 9.340*fgkmm, 5.380*fgkmm};
150const Double_t AliITSv11GeometrySSD::fgkSSDFlexHeight[2] =
151 { 0.030*fgkmm, 0.020*fgkmm};
152const Double_t AliITSv11GeometrySSD::fgkSSDFlexAngle = 30.000;
153const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleLength = 1.430*fgkmm;
154const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleWidth = 3.000*fgkmm;
155const Double_t AliITSv11GeometrySSD::fgkSSDEndFlexCompLength[6] =
156 {3.30*fgkmm,4.12*fgkmm,4.22*fgkmm,1.70*fgkmm,0.75*fgkmm,7.18*fgkmm};
157const 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/////////////////////////////////////////////////////////////////////////////////
162const Double_t AliITSv11GeometrySSD::fgkSSDLadderCableWidth = 23.5*fgkmm;
163/////////////////////////////////////////////////////////////////////////////////
164// SSD Module (lengths are in mm and angles in degrees)
165/////////////////////////////////////////////////////////////////////////////////
166const Double_t AliITSv11GeometrySSD::fgkSSDModuleStiffenerPosition[2] =
167 { 1.000*fgkmm, 3.900*fgkmm};
168const Double_t AliITSv11GeometrySSD::fgkSSDModuleSensorSupportDistance =
169 45.600*fgkmm;
170const Double_t AliITSv11GeometrySSD::fgkSSDModuleCoolingBlockToSensor =
171 5.075*fgkmm;
172/////////////////////////////////////////////////////////////////////////////////
173// Sensor Support (lengths are in mm and angles in degrees)
174/////////////////////////////////////////////////////////////////////////////////
175const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportLength =
176 5.800*fgkmm;
177const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth =
178 2.000*fgkmm;
179const 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};
184const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportThickness[2] =
185 { 0.450*fgkmm, 0.450*fgkmm};
186const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportPosition
187 = 0.5 * (fgkSSDModuleSensorSupportDistance
188 + fgkSSDSensorSideSupportThickness[0])
189 - fgkSSDSensorSideSupportLength;
190const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportLength =
191 5.250*fgkmm;
192const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportWidth =
193 1.680*fgkmm;
194const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportHeight[2]
195 = {fgkSSDSensorSideSupportHeight[0]
196 + fgkSSDSensorSideSupportThickness[0],
197 fgkSSDSensorSideSupportHeight[1]
198 + fgkSSDSensorSideSupportThickness[1]};
199const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportThickness[2]
200 = {fgkSSDSensorSideSupportThickness[0],
201 fgkSSDSensorSideSupportThickness[1]};
202const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportPosition =
203 19.000*fgkmm;
204/////////////////////////////////////////////////////////////////////////////////
205// Chip Cables (lengths are in mm and angles in degrees)
206/////////////////////////////////////////////////////////////////////////////////
207const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesLength[2] =
208 {73.12/fgkSSDChipNumber*fgkmm,fgkSSDChipLength+2.*0.19*fgkmm};
209const 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};
222const 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/////////////////////////////////////////////////////////////////////////////////
227const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
228 3.820*fgkmm;
229//const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
230// 3.780;
231const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionWidth =
232 fgkSSDSensorLength-fgkSSDSensorOverlap;
233const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionEdge[2] =
234 { 0.86*fgkmm, 0.30*fgkmm};
235const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionAngle[2] =
236 { 30.00, 90.00};
237const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionToSensorSupport =
238 1.78*fgkmm;
239/////////////////////////////////////////////////////////////////////////////////
240//Carbon Fiber Parameters (lengths are in mm and angles in degrees)
241/////////////////////////////////////////////////////////////////////////////////
242const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleLength
243 = fgkSSDModuleSensorSupportDistance
244 - 2. * fgkCarbonFiberJunctionToSensorSupport;
245const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleAngle = 60.00;
246const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportTopEdgeDist[2] =
247 { 0.751*fgkmm, 0.482*fgkmm};
248const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportEdgeLength =
249 1.630*fgkmm;
250const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportWidth = 0.950*fgkmm;
251const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportXAxisLength
252 = fgkCarbonFiberTriangleLength
253 - 0.5*fgkCarbonFiberSupportTopEdgeDist[1]
254 / TMath::Cos(fgkCarbonFiberTriangleAngle
255 * TMath::DegToRad());
256const 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/////////////////////////////////////////////////////////////////////////////////
264const Double_t AliITSv11GeometrySSD::fgkLowerSupportToSensorZ = 11.575*fgkmm;
265const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportWidth
266 = 0.950*fgkmm;
267const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportLowerLenght
268 = 1.600*fgkmm;
269const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportHeight
270 = 0.830*fgkmm;
271const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumeSeparation
272 = 0.5*fgkCarbonFiberSupportWidth;
273const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportTransverseWidth
274 = fgkCarbonFiberJunctionWidth
275 - 2. * (fgkCarbonFiberLowerSupportWidth
276 + fgkCarbonFiberLowerSupportVolumeSeparation);
277const 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/////////////////////////////////////////////////////////////////////////////////
286const 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)};
295const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberUpperJunctionLength[2] =
296 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-20.4*fgkmm,
297 fgkEndLadderCarbonFiberLowerJunctionLength[1]-20.6*fgkmm};
298const Double_t AliITSv11GeometrySSD::fgkEndLadderMountingBlockPosition[2] =
299 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-16.50*fgkmm,
300 fgkEndLadderCarbonFiberLowerJunctionLength[1]-31.50*fgkmm};
301const 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/////////////////////////////////////////////////////////////////////////////////
306const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmax = 1.45*fgkmm;
307const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmin
308 = fgkSSDCoolingBlockHoleRadius[0];
309const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportLength = 8.55*fgkmm;
310const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportHeight = 0.85*fgkmm;
311const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportWidth = 2.00*fgkmm;
312const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportSeparation =
313 fgkSSDSensorLength-2.*fgkSSDSensorOverlap;
314const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportToCarbonFiber =
315 11.70*fgkmm;
316/////////////////////////////////////////////////////////////////////////////////
317// Cooling Tube (lengths are in mm and angles in degrees)
318/////////////////////////////////////////////////////////////////////////////////
319const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmax = fgkCoolingTubeSupportRmin;
320const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmin = 0.96*fgkmm;
321const Double_t AliITSv11GeometrySSD::fgkCoolingTubeLength =
322 fgkCarbonFiberJunctionWidth;
323const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSeparation =
324 fgkSSDModuleSensorSupportDistance
325 + fgkSSDCoolingBlockLength;
326const Double_t AliITSv11GeometrySSD::fgkMountingBlockToSensorSupport = 30.7*fgkmm;
327/////////////////////////////////////////////////////////////////////////////////
328// SSD Mounting Block Parameters (lengths are in mm and angles in degrees)
329/////////////////////////////////////////////////////////////////////////////////
330const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockLength[3] =
331 { 60.0*fgkmm, 42.2*fgkmm, 34.0*fgkmm};
332const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHeight[4] =
333 { 4.0*fgkmm, 8.0*fgkmm, 5.0*fgkmm, 0.2*fgkmm};
334const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockWidth =
335 20.0*fgkmm;
336const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidAngle =
337 40.0;
338const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidHeight =
339 0.30*(fgkSSDMountingBlockHeight[1]-fgkSSDMountingBlockHeight[2]);
340const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidUpBasis =
341 2.5*fgkmm;
342const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeLength[2] =
343 { 56.0*fgkmm, 12.0*fgkmm};
344const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeWidth[2] =
345 { 5.0*fgkmm, 2.9*fgkmm};
346const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleRadius =
347 1.0*fgkmm;
348const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleEdge =
349 6.0*fgkmm;
350const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeigth =
351 4.0*fgkmm;
352const 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/////////////////////////////////////////////////////////////////////////////////
357const Double_t AliITSv11GeometrySSD::fgkMountingBlockClipLength = 15.1*fgkmm;
358const Double_t AliITSv11GeometrySSD::fgkMountingBlockClipThickness = 0.3*fgkmm;
359const Double_t AliITSv11GeometrySSD::fgkMountingBlockClibScrewRadius = 1.6*fgkmm;
360const Double_t AliITSv11GeometrySSD::fgkMountingBlockClibScrewPosition = 4.0*fgkmm;
361const Double_t AliITSv11GeometrySSD::fgkMountingBlockClibWidth = 9.0*fgkmm;
362/////////////////////////////////////////////////////////////////////////////////
363// SSD Mounting Block Support Parameters (lengths are in mm and angles in degrees)
364/////////////////////////////////////////////////////////////////////////////////
365const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportWidth[2] = {9.5*fgkmm,10.0*fgkmm};
366const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportDownHeight = 4.0*fgkmm;
367const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportRadius[2] = {fgkSSDLay5RadiusMin
368 - fgkSSDMountingBlockHeight[1]
369 + 0.5*fgkCoolingTubeSupportHeight
370 + fgkSSDModuleCoolingBlockToSensor
371 - fgkMountingBlockSupportDownHeight,
372 fgkSSDLay6RadiusMin
373 - fgkSSDMountingBlockHeight[1]
374 + 0.5*fgkCoolingTubeSupportHeight
375 + fgkSSDModuleCoolingBlockToSensor
376 - fgkMountingBlockSupportDownHeight};
377const Double_t AliITSv11GeometrySSD::fgkMountingBlockSupportUpHeight[2] = {fgkSSDLay5RadiusMax
378 - fgkSSDMountingBlockHeight[1]
379 + 0.5*fgkCoolingTubeSupportHeight
380 + fgkSSDModuleCoolingBlockToSensor
381 - fgkMountingBlockSupportRadius[0],
382 fgkSSDLay6RadiusMax
383 - fgkSSDMountingBlockHeight[1]
384 + 0.5*fgkCoolingTubeSupportHeight
385 + fgkSSDModuleCoolingBlockToSensor
386 - fgkMountingBlockSupportRadius[1]};
387const Double_t AliITSv11GeometrySSD::fgkLadderSupportHeigth = 10.0*fgkmm; // To be verified
388const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay5Position = 451.35*fgkmm;
389const Double_t AliITSv11GeometrySSD::fgkLadderSupportRingLay6Position = 510.00*fgkmm;
390/////////////////////////////////////////////////////////////////////////////////
391// SSD End Cap Cover Plate Parameters (lengths are in mm and angles in degrees)
392/////////////////////////////////////////////////////////////////////////////////
393const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateSmallHoleRadius = 1.25*fgkmm;
394const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateBigHoleRadius = 2.45*fgkmm;
395const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateThickness = 0.5*fgkmm;
396const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateSmallHoleSeparation[3] =
397 {16.5*fgkmm,22.0*fgkmm,7.*fgkmm};
398const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateLength[6] =
399 {7.*fgkmm,55.*fgkmm,8.0*fgkmm,53.*fgkmm,61.0*fgkmm,25.5*fgkmm};
400const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateWidth[3] =
401 {68.5*fgkmm,75.5*fgkmm,6.5*fgkmm};
402const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateScrewRadiusMin = 0.750*fgkmm;
403const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateScrewRadiusMax = 2.*fgkmm;
404const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateClipLength = 10.4*fgkmm;
405const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateClipWidth = 6.0*fgkmm;
406const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateDownClipLength = 5.7*fgkmm;
407const Double_t AliITSv11GeometrySSD::fgkEndCapCoverPlateDownClipWidth = 5.0*fgkmm;
408/////////////////////////////////////////////////////////////////////////////////
409// SSD End Cap Kapton Foil Parameters (lengths are in mm and angles in degrees)
410/////////////////////////////////////////////////////////////////////////////////
411const Double_t AliITSv11GeometrySSD::fgkEndCapKaptonFoilThickness = 0.4*fgkmm;
412const Double_t AliITSv11GeometrySSD::fgkEndCapKaptonFoilLength = 68.0*fgkmm;
413const Double_t AliITSv11GeometrySSD::fgkEndCapKaptonFoilWidth = 75.0*fgkmm;
414/////////////////////////////////////////////////////////////////////////////////
415// SSD End Cap Cooling Tube Parameters (lengths are in mm and angles in degrees)
416/////////////////////////////////////////////////////////////////////////////////
417const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeAxialRadius[2] =
418 {10.5*fgkmm,9.25*fgkmm};
419const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeRadiusMin = 1.3*fgkmm;
420const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeRadiusMax = 1.5*fgkmm;
421const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeAngle[5] =
422 {182.3,177.9,84.4,70.0,35.0};
423const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeLength[5] =
424 {49.5*fgkmm,41.7*fgkmm,47.6*fgkmm,5.0*fgkmm};
425const Double_t AliITSv11GeometrySSD::fgkEndCapCoolingTubeToCoverSide = 13.0*fgkmm;
426/////////////////////////////////////////////////////////////////////////////////
427// SSD End Cap Cover Side Parameters (lengths are in mm and angles in degrees)
428/////////////////////////////////////////////////////////////////////////////////
429const Double_t AliITSv11GeometrySSD::fgkEndCapSideCoverLength[5] = {3.5*fgkmm,
430 6.5*fgkmm,75.0*fgkmm,8.0*fgkmm,2.0*fgkmm};
431const 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};
434const Double_t AliITSv11GeometrySSD::fgkEndCapSideCoverThickness = 0.4*fgkmm;
435/////////////////////////////////////////////////////////////////////////////////
436// SSD End Cap Cards Parameters (lengths are in mm and angles in degrees)
437/////////////////////////////////////////////////////////////////////////////////
438const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackLength[3] =
439 {62.0*fgkmm,21.87*fgkmm};
440const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackWidth[2] =
441 {47.0*fgkmm,0.35*fgkmm};
442const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardBackThickness =
443 1.0*fgkmm;
444const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLength = 61.8*fgkmm;
445const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLayerWidth[2] =
446 {43.5*fgkmm, 0.70*fgkmm};
447const Double_t AliITSv11GeometrySSD::fgkEndCapCardElectBoardLayerThickness =
448 0.15*fgkmm;
449const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorThickness =
450 19.0*fgkmm;
451const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorLength[2] =
452 {4.80*fgkmm,1.1*fgkmm};
453const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorWidth[2] =
454 {3.3*fgkmm,1.10*fgkmm};
455const Double_t AliITSv11GeometrySSD::fgkEndCapCardJMDConnectorToLayer =
456 2.1*fgkmm;
457const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorLength[3] =
458 {5.2*fgkmm,3.5*fgkmm,1.2*fgkmm};
459const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorWidth[2] =
460 {1.9*fgkmm,0.15*fgkmm};
461const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorThickness =
462 19*fgkmm;
463const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorDistance =
464 1.0*fgkmm;
465const Double_t AliITSv11GeometrySSD::fgkEndCapCardCableConnectorToLayer =
466 3.6*fgkmm;
467const Double_t AliITSv11GeometrySSD::fgkEndCapStripConnectionLength =
468 61.0*fgkmm;
469const Double_t AliITSv11GeometrySSD::fgkEndCapStripConnectionThickness =
470 5.97*fgkmm;
471const Double_t AliITSv11GeometrySSD::fgkEndCapStripConnectionWidth = 3.0*fgkmm;
472const 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};
475const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBWidth[5] =
476 {17.0*fgkmm,10.0*fgkmm,5.9*fgkmm,6.4*fgkmm,3.9*fgkmm};
477const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBThickness =
478 1.0*fgkmm;
479const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceElectBoardCardBThickness
480 = 0.15*fgkmm;
481const Double_t AliITSv11GeometrySSD::fgkEndCapInterfaceCardBJMDConnectorSeparation =
482 20.0*fgkmm;
483const Double_t AliITSv11GeometrySSD::fgkEndCapStiffenerLength = 68.0*fgkmm;
484const Double_t AliITSv11GeometrySSD::fgkEndCapStiffenerWidth = 5.0*fgkmm;
485const Double_t AliITSv11GeometrySSD::fgkEndCapStiffenerThickness = 5.0*fgkmm;
486const Double_t AliITSv11GeometrySSD::fgkEndCapEffectiveCableRadiusMin = 1.25*fgkmm; // To Be Checked
487const 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/////////////////////////////////////////////////////////////////////////////////
491const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLength[2] = {70.424*fgkmm,72.919*fgkmm};
492const Double_t AliITSv11GeometrySSD::fgkEndCapSupportMiddleRadius[2] = {377.0*fgkmm,437.0*fgkmm};
493const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowRadius[2] = {375.0*fgkmm,435.0*fgkmm};
494const Double_t AliITSv11GeometrySSD::fgkEndCapSupportHighWidth = 20.0*fgkmm;
495const Double_t AliITSv11GeometrySSD::fgkEndCapSupportLowWidth[2] = {3.0*fgkmm,3.0*fgkmm};
496const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5ITSPosition = 625.0*fgkmm;
497const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay5Position = 2.5*fgkmm;
498const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6ITSPosition = 635.0*fgkmm;
499const Double_t AliITSv11GeometrySSD::fgkEndCapSupportCenterLay6Position = 2.5*fgkmm;
500/////////////////////////////////////////////////////////////////////////////////
501// SSD Cone Parameters (lengths are in mm and angles in degrees)
502/////////////////////////////////////////////////////////////////////////////////
503const Double_t AliITSv11GeometrySSD::fgkSSDLowerPConeRadius = 296.5*fgkmm;
504const Double_t AliITSv11GeometrySSD::fgkSSDPConeAngle = 39.0;
505const Double_t AliITSv11GeometrySSD::fgkSSDPConeZLength[2] = {168.0*fgkmm,153.0*fgkmm};
506const Double_t AliITSv11GeometrySSD::fgkSSDPConeLittleHoleRadius = 317.5*fgkmm;
507const Double_t AliITSv11GeometrySSD::fgkSSDPConeLittleHoleLength = 20.*fgkmm;
508const Double_t AliITSv11GeometrySSD::fgkSSDConeMiddleRadius = 350.*fgkmm;
509const Double_t AliITSv11GeometrySSD::fgkSSDPConeMiddleLength = 30.*fgkmm;
510const Double_t AliITSv11GeometrySSD::fgkSSDPConeMiddleWidth = 40.*fgkmm;
511const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpRadius = 400.*fgkmm;
512const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpMaxRadius = 459.*fgkmm;
513const Double_t AliITSv11GeometrySSD::fgkSSDPConeUpMiddleRadius = 472.5*fgkmm;
514const Double_t AliITSv11GeometrySSD::fgkSSDPConeDownRadius = 282.0*fgkmm;
515const Double_t AliITSv11GeometrySSD::fgkSSDPConeTrapezoidAngle = 42.0;
516const Double_t AliITSv11GeometrySSD::fgkSSDPConeTrapezoidBasis = 200.0*fgkmm;
517const Double_t AliITSv11GeometrySSD::fgkSSDPConeExternalRadius = 492.5*fgkmm;
518const Double_t AliITSv11GeometrySSD::fgkSSDPConeRadiusWidth = 16.75*fgkmm;
519const Double_t AliITSv11GeometrySSD::fgkSSDPConeLength = 168.0*fgkmm;
520const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportLength = 1020.*fgkmm;
521const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportRadius = 297.5*fgkmm;
522const Double_t AliITSv11GeometrySSD::fgkSSDCentralSupportWidth = 6.28*fgkmm;
523const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportLength = 60.0*fgkmm;
524const Double_t AliITSv11GeometrySSD::fgkSSDCentralAL3SupportWidth = 2.5*fgkSSDCentralSupportWidth;
525/////////////////////////////////////////////////////////////////////////////////
526// SSD Cables Parameters (lengths are in mm and angles in degrees)
527/////////////////////////////////////////////////////////////////////////////////
528const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5TubeRadiusMin = 11.9*fgkmm;
529const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6TubeRadiusMin = 11.9*fgkmm;
530const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideHeight = 7.*fgkmm; // to be fixed in order to reproduce material budget
531const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay6RightSideHeight = 7.*fgkmm; // to be fixed in order to reproduce material budget
532const Double_t AliITSv11GeometrySSD::fgkSSDCableAngle = 22.5;
533const Double_t AliITSv11GeometrySSD::fgkSSDCablesLay5RightSideWaterHeight = 2.5*fgkmm; // to be fixed in order to reproduce material budget
534const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB26Angle[2] = {25.0,53.2};
535const Double_t AliITSv11GeometrySSD::fgkSSDCablesPatchPanel2RB24Angle[2] = {23.0,53.6};
536const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26ITSDistance = 975.0*fgkmm;
537const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24ITSDistance = 1020.0*fgkmm;
538const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = 451.3*fgkmm;
539const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = 451.3*fgkmm;
540const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanelHeigth = 87.5*fgkmm;
541const Double_t AliITSv11GeometrySSD::fgkSSDCableMaterialBudgetHeight = 20.0*fgkmm;
542//const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB26Radius = fgkSSDPConeExternalRadius;
543//const Double_t AliITSv11GeometrySSD::fgkSSDPatchPanel2RB24Radius = fgkSSDPConeExternalRadius;
544/////////////////////////////////////////////////////////////////////////////////
545ClassImp(AliITSv11GeometrySSD)
546/////////////////////////////////////////////////////////////////////////////////
547AliITSv11GeometrySSD::AliITSv11GeometrySSD():
548 AliITSv11Geometry(),
549 fSSDChipMedium(),
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(),
563 fSSDSensorMedium(),
564 fSSDSensorSupportMedium(),
565 fSSDCarbonFiberMedium(),
566 fSSDTubeHolderMedium(),
567 fSSDCoolingTubeWater(),
568 fSSDCoolingTubePhynox(),
569 fSSDSupportRingAl(),
570 fSSDMountingBlockMedium(),
571 fSSDRohaCellCone(),
572 fSSDAir(),
573 fSSDCopper(),
574 fCreateMaterials(kFALSE),
575 fTransformationMatrices(kFALSE),
576 fBasicObjects(kFALSE),
577 fcarbonfiberjunction(),
578 fcoolingtubesupport(),
579 fhybridmatrix(),
580 fssdcoolingblocksystem(),
581 fcoolingblocksystematrix(),
582 fssdstiffenerflex(),
583 fssdendflex(),
584 fendladdercoolingtubesupportmatrix(),
585 fendladdermountingblock(),
586 fendladdermountingblockclip(),
587 fSSDSensor5(),
588 fSSDSensor6(),
589 fSSDLayer5(),
590 fSSDLayer6(),
591 fMotherVol(),
592 fLay5LadderSupportRing(),
593 fLay6LadderSupportRing(),
594 fgkEndCapSupportSystem(),
595 fSSDCone(),
596 fColorCarbonFiber(4),
597 fColorRyton(5),
598 fColorPhynox(14),
599 fColorSilicon(3),
600 fColorAl(38),
601 fColorKapton(6),
602 fColorPolyhamide(5),
603 fColorStiffener(9),
604 fColorEpoxy(30),
605 fColorWater(7),
606 fColorG10(41)
607{
608 ////////////////////////
609 // Standard constructor
610 ////////////////////////
611}
612/////////////////////////////////////////////////////////////////////////////////
613AliITSv11GeometrySSD::AliITSv11GeometrySSD(const AliITSv11GeometrySSD &s):
614 AliITSv11Geometry(s.GetDebug()),
615 fSSDChipMedium(s.fSSDChipMedium),
616 fSSDChipGlueMedium(s.fSSDChipGlueMedium),
617 fSSDStiffenerMedium(s.fSSDStiffenerMedium),
618 fSSDStiffenerConnectorMedium(s.fSSDStiffenerConnectorMedium),
619 fSSDStiffener0603CapacitorMedium(s.fSSDStiffener0603CapacitorMedium),
620 fSSDStiffener1812CapacitorMedium(s.fSSDStiffener1812CapacitorMedium),
621 fSSDStiffenerHybridWireMedium(s.fSSDStiffenerHybridWireMedium),
622 fSSDKaptonFlexMedium(s.fSSDKaptonFlexMedium),
623 fSSDAlTraceFlexMedium(s.fSSDAlTraceFlexMedium),
624 fSSDAlTraceLadderCableMedium(s.fSSDAlTraceLadderCableMedium),
625 fSSDKaptonLadderCableMedium(s.fSSDKaptonLadderCableMedium),
626 fSSDKaptonChipCableMedium(s.fSSDKaptonChipCableMedium),
627 fSSDAlTraceChipCableMedium(s.fSSDAlTraceChipCableMedium),
628 fSSDAlCoolBlockMedium(s.fSSDAlCoolBlockMedium),
629 fSSDSensorMedium(s.fSSDSensorMedium),
630 fSSDSensorSupportMedium(s.fSSDSensorSupportMedium),
631 fSSDCarbonFiberMedium(s.fSSDCarbonFiberMedium),
632 fSSDTubeHolderMedium(s.fSSDTubeHolderMedium),
633 fSSDCoolingTubeWater(s.fSSDCoolingTubeWater),
634 fSSDCoolingTubePhynox(s.fSSDCoolingTubePhynox),
635 fSSDSupportRingAl(s.fSSDSupportRingAl),
636 fSSDMountingBlockMedium(s.fSSDMountingBlockMedium),
637 fSSDRohaCellCone(s.fSSDRohaCellCone),
638 fSSDAir(s.fSSDAir),
639 fSSDCopper(s.fSSDCopper),
640 fCreateMaterials(s.fCreateMaterials),
641 fTransformationMatrices(s.fTransformationMatrices),
642 fBasicObjects(s.fBasicObjects),
643 fcarbonfiberjunction(s.fcarbonfiberjunction),
644 fcoolingtubesupport(s.fcoolingtubesupport),
645 fhybridmatrix(s.fhybridmatrix),
646 fssdcoolingblocksystem(s.fssdcoolingblocksystem),
647 fcoolingblocksystematrix(s.fcoolingblocksystematrix),
648 fssdstiffenerflex(s.fssdstiffenerflex),
649 fssdendflex(s.fssdendflex),
650 fendladdercoolingtubesupportmatrix(s.fendladdercoolingtubesupportmatrix),
651 fendladdermountingblock(s.fendladdermountingblock),
652 fendladdermountingblockclip(s.fendladdermountingblockclip),
653 fSSDSensor5(s.fSSDSensor5),
654 fSSDSensor6(s.fSSDSensor6),
655 fSSDLayer5(s.fSSDLayer5),
656 fSSDLayer6(s.fSSDLayer6),
657 fMotherVol(s.fMotherVol),
658 fLay5LadderSupportRing(s.fLay5LadderSupportRing),
659 fLay6LadderSupportRing(s.fLay6LadderSupportRing),
660 fgkEndCapSupportSystem(s.fgkEndCapSupportSystem),
661 fSSDCone(s.fSSDCone),
662 fColorCarbonFiber(s.fColorCarbonFiber),
663 fColorRyton(s.fColorRyton),
664 fColorPhynox(s.fColorPhynox),
665 fColorSilicon(s.fColorSilicon),
666 fColorAl(s.fColorAl),
667 fColorKapton(s.fColorKapton),
668 fColorPolyhamide(s.fColorPolyhamide),
669 fColorStiffener(s.fColorStiffener),
670 fColorEpoxy(s.fColorEpoxy),
671 fColorWater(s.fColorWater),
672 fColorG10(s.fColorG10)
673{
674 ////////////////////////
675 // Copy Constructor
676 ////////////////////////
677}
678/////////////////////////////////////////////////////////////////////////////////
679AliITSv11GeometrySSD& AliITSv11GeometrySSD::
680operator=(const AliITSv11GeometrySSD &s){
681 ////////////////////////
682 // Assignment operator
683 ////////////////////////
684 this->~AliITSv11GeometrySSD();
685 new(this) AliITSv11GeometrySSD(s);
686 return *this;
687/*
688 if(&s == this) return *this;
689 fMotherVol = s.fMotherVol;
690 return *this;
691 */
692}
693///////////////////////////////////////////////////////////////////////////////
694void AliITSv11GeometrySSD::CreateTransformationMatrices(){
695 ///////////////////////////////////////////////////////////////////////
696 // Method generating the trasformation matrix for the whole SSD Geometry
697 ///////////////////////////////////////////////////////////////////////
698 // Setting some variables for Carbon Fiber Supportmatrix creation
699 //////////////////////////////////////////////////////////////////////
700 Double_t carbonfibersupportxaxisEdgeproj = fgkCarbonFiberSupportEdgeLength
701 * CosD(fgkCarbonFiberJunctionAngle[0]);
702 Double_t symmetryplaneposition = (fgkCarbonFiberSupportYAxisLength
703 + fgkCarbonFiberSupportTopEdgeDist[0]
704 + fgkCarbonFiberSupportWidth);
705 Double_t carbonfibersupportheight = carbonfibersupportxaxisEdgeproj
706 * TanD(fgkCarbonFiberJunctionAngle[0]);
707 TGeoRotation* carbonfiberot[3];
708 for(Int_t i=0; i<3; i++) carbonfiberot[i] = new TGeoRotation();
709 carbonfiberot[0]->SetAngles(0.0,180.0,0.0);
710 carbonfiberot[1]->SetAngles(90.,-fgkCarbonFiberTriangleAngle,-90.);
711 carbonfiberot[2]->SetRotation((*carbonfiberot[1])*(*carbonfiberot[0]));
712 Double_t transvector[3] = {fgkCarbonFiberTriangleLength
713 * CosD(fgkCarbonFiberTriangleAngle),0.,
714 - fgkCarbonFiberTriangleLength
715 * SinD(fgkCarbonFiberTriangleAngle)};
716 ///////////////////////////////////////////
717 //Setting Local Translations and Rotations:
718 ///////////////////////////////////////////
719 TGeoCombiTrans* localcarbonfibersupportmatrix[3];
720 localcarbonfibersupportmatrix[0] = new TGeoCombiTrans(0.0,0.0,
721 0.5*carbonfibersupportheight,NULL);
722 localcarbonfibersupportmatrix[1] = new TGeoCombiTrans(transvector[0],
723 2.*symmetryplaneposition+transvector[1],
724 transvector[2], carbonfiberot[2]);
725 localcarbonfibersupportmatrix[2] = new TGeoCombiTrans(*carbonfiberot[1]);
726 /////////////////////////////////////////////////////////////
727 // Carbon Fiber Support Transformations
728 /////////////////////////////////////////////////////////////
729 const Int_t kcarbonfibersupportmatrixnumber[2] = {2,3};
730 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++){
731 fcarbonfibersupportmatrix[i] = new TGeoHMatrix();
732 for(Int_t j=0; j<kcarbonfibersupportmatrixnumber[i]; j++)
733 fcarbonfibersupportmatrix[i]->MultiplyLeft(localcarbonfibersupportmatrix[i==0?2*j:j]);
734 }
735 /////////////////////////////////////////////////////////////
736 // Carbon Fiber Junction Transformation
737 /////////////////////////////////////////////////////////////
738 const Int_t kcarbonfiberjunctionmatrixnumber = 2;
739 TGeoCombiTrans** localcarbonfiberjunctionmatrix[fgkcarbonfiberjunctionumber];
740 TGeoRotation** localcarbonfiberjunctionrot[fgkcarbonfiberjunctionumber];
741 TGeoTranslation** localcarbonfiberjunctiontrans[fgkcarbonfiberjunctionumber];
742 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++){
743 localcarbonfiberjunctionmatrix[i] =
744 new TGeoCombiTrans*[kcarbonfiberjunctionmatrixnumber];
745 localcarbonfiberjunctionrot[i] =
746 new TGeoRotation*[kcarbonfiberjunctionmatrixnumber];
747 localcarbonfiberjunctiontrans[i] =
748 new TGeoTranslation*[kcarbonfiberjunctionmatrixnumber];
749 }
750 ///////////////////////
751 // Setting Translations
752 ///////////////////////
753 localcarbonfiberjunctiontrans[0][0] = new TGeoTranslation(0.,0.,0.);
754 localcarbonfiberjunctiontrans[1][0] =
755 new TGeoTranslation(fgkCarbonFiberTriangleLength,0.0,0.0);
756 localcarbonfiberjunctiontrans[2][0] =
757 new TGeoTranslation(fgkCarbonFiberTriangleLength
758 * TMath::Cos(fgkCarbonFiberTriangleAngle*TMath::DegToRad()),
759 fgkCarbonFiberTriangleLength
760 * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad()),0.0);
761 localcarbonfiberjunctiontrans[0][1] =
762 new TGeoTranslation(0.0,0.5*fgkCarbonFiberJunctionWidth,0.0);
763 localcarbonfiberjunctiontrans[1][1] =
764 new TGeoTranslation(*localcarbonfiberjunctiontrans[0][1]);
765 localcarbonfiberjunctiontrans[2][1] =
766 new TGeoTranslation(*localcarbonfiberjunctiontrans[0][1]);
767 ////////////////////
768 // Setting Rotations
769 ////////////////////
770 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++)
771 for(Int_t j=0; j<kcarbonfiberjunctionmatrixnumber; j++)
772 localcarbonfiberjunctionrot[i][j] = new TGeoRotation();
773 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++)
774 localcarbonfiberjunctionrot[i][0]->SetAngles(120.*i,0.0,0.0);
775 localcarbonfiberjunctionrot[0][1]->SetAngles(0.0,90.0,0.0);
776 localcarbonfiberjunctionrot[1][1]->SetRotation(*localcarbonfiberjunctionrot[0][1]);
777 localcarbonfiberjunctionrot[2][1]->SetRotation(*localcarbonfiberjunctionrot[0][1]);
778 ////////////////////////////////////////
779 // Setting Carbon Fiber Junction matrix
780 ////////////////////////////////////////
781 for(Int_t i=0; i<fgkcarbonfiberjunctionumber; i++){
782 fcarbonfiberjunctionmatrix[i] = new TGeoHMatrix();
783 for(Int_t j=0; j<kcarbonfiberjunctionmatrixnumber; j++){
784 localcarbonfiberjunctionmatrix[i][j] =
785 new TGeoCombiTrans(*localcarbonfiberjunctiontrans[i][j],
786 *localcarbonfiberjunctionrot[i][j]);
787 fcarbonfiberjunctionmatrix[i]->MultiplyLeft(localcarbonfiberjunctionmatrix[i][j]);
788 }
789 }
790 /////////////////////////////////////////////////////////////
791 // Carbon Fiber Lower Support Transformations
792 /////////////////////////////////////////////////////////////
793 TGeoTranslation* localcarbonfiberlowersupportrans[2];
794 localcarbonfiberlowersupportrans[0] = new TGeoTranslation(0.0,
795 fgkCarbonFiberLowerSupportVolumePosition[1]
796 + fgkCarbonFiberLowerSupportVolumePosition[0],
797 0.0);
798 localcarbonfiberlowersupportrans[1] = new TGeoTranslation(0.0,
799 fgkCarbonFiberJunctionWidth
800 - fgkCarbonFiberLowerSupportWidth
801 - fgkCarbonFiberLowerSupportVolumePosition[0]
802 - fgkCarbonFiberLowerSupportVolumePosition[1],
803 - 0.5*fgkCarbonFiberLowerSupportHeight);
804 localcarbonfiberlowersupportrans[0]->Add(localcarbonfiberlowersupportrans[1]);
805 fcarbonfiberlowersupportrans[0] =
806 new TGeoTranslation(*localcarbonfiberlowersupportrans[0]);
807 fcarbonfiberlowersupportrans[1] =
808 new TGeoTranslation(*localcarbonfiberlowersupportrans[1]);
809 /////////////////////////////////////////////////////////////
810 // SSD Sensor Support Transformations
811 /////////////////////////////////////////////////////////////
812 const Int_t kssdsensorsupportmatrixnumber = 3;
813 TGeoCombiTrans** localssdsensorsupportmatrix[fgkssdsensorsupportnumber];
814 TGeoRotation** localssdsensorsupportrot[fgkssdsensorsupportnumber];
815 TGeoTranslation** localssdsensorsupportrans[fgkssdsensorsupportnumber];
816 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
817 localssdsensorsupportmatrix[i] =
818 new TGeoCombiTrans*[kssdsensorsupportmatrixnumber];
819 localssdsensorsupportrot[i] =
820 new TGeoRotation*[kssdsensorsupportmatrixnumber];
821 localssdsensorsupportrans[i] =
822 new TGeoTranslation*[kssdsensorsupportmatrixnumber];
823 }
824 ///////////////////////
825 // Setting Translations
826 ///////////////////////
827 localssdsensorsupportrans[0][0] = new TGeoTranslation(0.0,
828 0.5*fgkSSDSensorSideSupportWidth,
829 0.0);
830 localssdsensorsupportrans[1][0] =
831 new TGeoTranslation(*localssdsensorsupportrans[0][0]);
832 localssdsensorsupportrans[2][0] =
833 new TGeoTranslation(*localssdsensorsupportrans[0][0]);
834 localssdsensorsupportrans[0][1] =
835 new TGeoTranslation(-0.5*fgkSSDSensorSideSupportWidth,
836 0.5*fgkSSDSensorSideSupportThickness[0],
837 0.0);
838 localssdsensorsupportrans[1][1] =
839 new TGeoTranslation(0.5*fgkSSDSensorSideSupportWidth,
840 - 0.5*fgkSSDSensorSideSupportThickness[0]
841 - fgkSSDModuleSensorSupportDistance,
842 0.0);
843 localssdsensorsupportrans[2][1] =
844 new TGeoTranslation(0.5*fgkSSDSensorCenterSupportThickness[0]
845 - fgkSSDSensorCenterSupportPosition,
846 0.5*fgkSSDSensorCenterSupportWidth
847 - 0.5*fgkSSDModuleSensorSupportDistance,
848 fgkSSDSensorCenterSupportThickness[0]);
849 localssdsensorsupportrans[0][2] =
850 new TGeoTranslation(fgkCarbonFiberTriangleLength
851 + fgkCarbonFiberJunctionToSensorSupport,
852 fgkCarbonFiberJunctionWidth
853 - 0.5*(fgkCarbonFiberLowerSupportWidth
854 + fgkSSDSensorCenterSupportLength
855 - fgkSSDSensorCenterSupportThickness[0])
856 - fgkSSDSensorCenterSupportPosition,
857 0.0);
858 localssdsensorsupportrans[1][2] =
859 new TGeoTranslation(*localssdsensorsupportrans[0][2]);
860 localssdsensorsupportrans[2][2] =
861 new TGeoTranslation(*localssdsensorsupportrans[0][2]);
862 ////////////////////
863 // Setting Rotations
864 ////////////////////
865 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++)
866 for(Int_t j=0; j<kssdsensorsupportmatrixnumber; j++)
867 localssdsensorsupportrot[i][j] = new TGeoRotation();
868 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
869 localssdsensorsupportrot[i][0]->SetAngles(0.0,90.0,0.0);
870 localssdsensorsupportrot[i][2]->SetAngles(-90.0,0.0,0.0);
871 }
872 localssdsensorsupportrot[0][1]->SetAngles(0.0,90.0,-90.0);
873 localssdsensorsupportrot[1][1]->SetAngles(180.0,90.0,-90.0);
874 localssdsensorsupportrot[2][1]->SetAngles(270.0,90.0,-90.0);
875 ////////////////////////////////////////
876 // SSD Sensor Support matrix
877 ////////////////////////////////////////
878 for(Int_t i=0; i<fgkssdsensorsupportnumber; i++){
879 fssdsensorsupportmatrix[i] = new TGeoHMatrix();
880 for(Int_t j=0; j<kssdsensorsupportmatrixnumber; j++){
881 localssdsensorsupportmatrix[i][j] =
882 new TGeoCombiTrans(*localssdsensorsupportrans[i][j],
883 *localssdsensorsupportrot[i][j]);
884 fssdsensorsupportmatrix[i]->MultiplyLeft(localssdsensorsupportmatrix[i][j]);
885 }
886 }
887 /////////////////////////////////////////////////////////////
888 // SSD Cooling Tube Support Transformations
889 /////////////////////////////////////////////////////////////
890 const Int_t kcoolingtubesupportmatrixnumber = 2;
891 TGeoCombiTrans* localcoolingtubesupportmatrix[kcoolingtubesupportmatrixnumber];
892 TGeoTranslation* localcoolingtubesupportrans[kcoolingtubesupportmatrixnumber];
893 TGeoRotation* localcoolingtubesupportrot[kcoolingtubesupportmatrixnumber];
894 Double_t phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
895 /fgkCoolingTubeSupportRmax);
896 localcoolingtubesupportrans[0] =
897 new TGeoTranslation(2.*fgkCoolingTubeSupportRmax*TMath::Cos(phi)
898 + 2.*(fgkCoolingTubeSupportLength
899 - fgkCoolingTubeSupportRmax*(1.+TMath::Cos(phi)))
900 + fgkCarbonFiberTriangleLength
901 - 2.0*fgkCarbonFiberJunctionLength,0.0,0.0);
902 localcoolingtubesupportrans[1] =
903 new TGeoTranslation(fgkCarbonFiberJunctionLength
904 - (fgkCoolingTubeSupportLength-fgkCoolingTubeSupportRmax),
905 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
906 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
907 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
908 - 0.5*(fgkCarbonFiberLowerSupportWidth
909 + fgkSSDSensorCenterSupportLength
910 - fgkSSDSensorCenterSupportThickness[0])
911 + 0.5*fgkSSDSensorLength,
912 - 0.5*fgkCoolingTubeSupportHeight);
913 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++)
914 localcoolingtubesupportrot[i] = new TGeoRotation();
915 localcoolingtubesupportrot[0]->SetAngles(180.0,0.0,0.0);
916 localcoolingtubesupportrot[1]->SetAngles(0.0,90.0,0.0);
917 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++)
918 localcoolingtubesupportmatrix[i] =
919 new TGeoCombiTrans(*localcoolingtubesupportrans[i],
920 *localcoolingtubesupportrot[i]);
921 fcoolingtubesupportmatrix[0] = new TGeoHMatrix(*localcoolingtubesupportmatrix[1]);
922 fcoolingtubesupportmatrix[1] = new TGeoHMatrix((*localcoolingtubesupportmatrix[1])*
923 (*localcoolingtubesupportmatrix[0]));
924 /////////////////////////////////////////////////////////////
925 // End Ladder SSD Cooling Tube Support Transformations
926 /////////////////////////////////////////////////////////////
927 TGeoTranslation** localendladdercooltubetrans[2];
928 localendladdercooltubetrans[0] = new TGeoTranslation*[4];
929 localendladdercooltubetrans[1] = new TGeoTranslation*[2];
930 for(Int_t i=0; i<4; i++) localendladdercooltubetrans[0][i] = new TGeoTranslation();
931 localendladdercooltubetrans[0][0]->SetTranslation(fgkCarbonFiberJunctionLength
932 - (fgkCoolingTubeSupportLength
933 - fgkCoolingTubeSupportRmax),
934 fgkEndLadderMountingBlockPosition[0]
935 - fgkendladdercoolingsupportdistance[0]
936 + 0.5*fgkCoolingTubeSupportWidth,
937 - 0.5*fgkCoolingTubeSupportHeight);
938 localendladdercooltubetrans[0][1]->SetTranslation(fgkCarbonFiberJunctionLength
939 - (fgkCoolingTubeSupportLength
940 - fgkCoolingTubeSupportRmax),
941 fgkEndLadderMountingBlockPosition[0]
942 + fgkendladdercoolingsupportdistance[1]
943 + 0.5*fgkCoolingTubeSupportWidth,
944 - 0.5*fgkCoolingTubeSupportHeight);
945 localendladdercooltubetrans[0][2]->SetTranslation(2*(fgkCoolingTubeSupportLength
946 - fgkCoolingTubeSupportRmax)
947 + fgkCarbonFiberTriangleLength
948 - 2.0*fgkCarbonFiberJunctionLength,
949 0.0,
950 0.0);
951 localendladdercooltubetrans[0][3]->SetTranslation(0.0,
952 fgkendladdercoolingsupportdistance[0]
953 + fgkendladdercoolingsupportdistance[1],
954 0.0);
955 for(Int_t i=0; i<2; i++) localendladdercooltubetrans[1][i] = new TGeoTranslation();
956 localendladdercooltubetrans[1][0]->SetTranslation(fgkCoolingTubeSupportRmax
957 + fgkCarbonFiberJunctionLength
958 - fgkCoolingTubeSupportLength,
959 fgkEndLadderCarbonFiberLowerJunctionLength[1]
960 - 0.5*fgkCoolingTubeSupportWidth
961 -fgkendladdercoolingsupportdistance[2],
962 - 0.5*fgkCoolingTubeSupportHeight);
963 localendladdercooltubetrans[1][1]->SetTranslation(fgkCarbonFiberTriangleLength
964 + fgkCoolingTubeSupportLength
965 - fgkCoolingTubeSupportRmax
966 - fgkCarbonFiberJunctionLength,
967 fgkEndLadderCarbonFiberLowerJunctionLength[1]
968 - 0.5*fgkCoolingTubeSupportWidth
969 - fgkendladdercoolingsupportdistance[2],
970 - 0.5*fgkCoolingTubeSupportHeight);
971 fendladdercoolingtubesupportmatrix = new TGeoHMatrix**[kcoolingtubesupportmatrixnumber];
972 fendladdercoolingtubesupportmatrix[0] = new TGeoHMatrix*[4];
973 fendladdercoolingtubesupportmatrix[1] = new TGeoHMatrix*[2];
974 fendladdercoolingtubesupportmatrix[0][0] = new TGeoHMatrix((*localendladdercooltubetrans[0][0])*
975 (*localcoolingtubesupportrot[1]));
976 fendladdercoolingtubesupportmatrix[0][1] = new TGeoHMatrix((*localendladdercooltubetrans[0][1])*
977 (*localcoolingtubesupportrot[1]));
978 fendladdercoolingtubesupportmatrix[0][2] = new TGeoHMatrix(*fendladdercoolingtubesupportmatrix[0][0]);
979 fendladdercoolingtubesupportmatrix[0][2]->Multiply(localcoolingtubesupportrot[0]);
980 fendladdercoolingtubesupportmatrix[0][2]->MultiplyLeft(localendladdercooltubetrans[0][2]);
981 fendladdercoolingtubesupportmatrix[0][3] = new TGeoHMatrix(*fendladdercoolingtubesupportmatrix[0][2]);
982 fendladdercoolingtubesupportmatrix[0][3]->MultiplyLeft(localendladdercooltubetrans[0][3]);
983
984 fendladdercoolingtubesupportmatrix[1][0] =
985 new TGeoHMatrix((*localendladdercooltubetrans[1][0])
986 *(*localcoolingtubesupportrot[1]));
987 fendladdercoolingtubesupportmatrix[1][1] = new TGeoHMatrix(*localcoolingtubesupportrot[1]);
988 fendladdercoolingtubesupportmatrix[1][1]->Multiply(localcoolingtubesupportrot[0]);
989 fendladdercoolingtubesupportmatrix[1][1]->MultiplyLeft(localendladdercooltubetrans[1][1]);
990 /////////////////////////////////////////////////////////////
991 // SSD Cooling Tube Transformations
992 /////////////////////////////////////////////////////////////
993 TGeoRotation* localcoolingtuberot = new TGeoRotation();
994 localcoolingtuberot->SetAngles(0.,90.,0.);
995 TGeoTranslation** localcoolingtubetrans[4];
996 TVector3** localcoolingtubevect[4];
997 for(Int_t i=0; i<4; i++){
998 localcoolingtubevect[i] = new TVector3*[2];
999 localcoolingtubetrans[i] = new TGeoTranslation*[2];
1000 fcoolingtubematrix[i] = new TGeoHMatrix*[2];
1001 }
1002 localcoolingtubevect[0][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
1003 -fgkCarbonFiberTriangleLength),
1004 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1005 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1006 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1007 - 0.5*(fgkCarbonFiberLowerSupportWidth
1008 + fgkSSDSensorCenterSupportLength
1009 - fgkSSDSensorCenterSupportThickness[0])+
1010 0.5*fgkSSDSensorLength-0.25*(fgkSSDSensorLength
1011 - 2.0*fgkSSDModuleStiffenerPosition[1]
1012 - 2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
1013 - 0.5*fgkCoolingTubeSupportWidth,
1014 - 0.5*fgkCoolingTubeSupportHeight);
1015 localcoolingtubevect[0][1] = new TVector3(localcoolingtubevect[0][0]->X(),
1016 localcoolingtubevect[0][0]->Y()+0.5*(fgkSSDSensorLength
1017 - 2.0*fgkSSDModuleStiffenerPosition[1]
1018 - 2.0*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
1019 + fgkCoolingTubeSupportWidth,
1020 localcoolingtubevect[0][0]->Z());
1021 localcoolingtubevect[1][0] = new TVector3(-localcoolingtubevect[0][0]->X()
1022 + fgkCarbonFiberTriangleLength,
1023 localcoolingtubevect[0][0]->Y(),
1024 localcoolingtubevect[0][0]->Z());
1025 localcoolingtubevect[1][1] = new TVector3(-localcoolingtubevect[0][1]->X()
1026 + fgkCarbonFiberTriangleLength,
1027 localcoolingtubevect[0][1]->Y(),
1028 localcoolingtubevect[0][1]->Z());
1029 localcoolingtubevect[2][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
1030 - fgkCarbonFiberTriangleLength),
1031 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1032 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1033 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1034 - 0.5*(fgkCarbonFiberLowerSupportWidth
1035 + fgkSSDSensorCenterSupportLength
1036 - fgkSSDSensorCenterSupportThickness[0])
1037 + fgkSSDModuleStiffenerPosition[1]
1038 - 0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDSensorOverlap),
1039 - 0.5*fgkCoolingTubeSupportHeight);
1040 localcoolingtubevect[2][1] = new TVector3(-localcoolingtubevect[2][0]->X()
1041 + fgkCarbonFiberTriangleLength,
1042 localcoolingtubevect[2][0]->Y(),
1043 localcoolingtubevect[2][0]->Z());
1044 localcoolingtubevect[3][0] = new TVector3(-0.5*(fgkCoolingTubeSeparation
1045 - fgkCarbonFiberTriangleLength),
1046 - (2.0*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1047 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1048 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1049 - 0.5*(fgkCarbonFiberLowerSupportWidth
1050 + fgkSSDSensorCenterSupportLength
1051 - fgkSSDSensorCenterSupportThickness[0])
1052 + fgkSSDSensorLength
1053 - 0.5*fgkSSDModuleStiffenerPosition[1],
1054 - 0.5*fgkCoolingTubeSupportHeight);
1055 localcoolingtubevect[3][1] = new TVector3(-localcoolingtubevect[3][0]->X()
1056 + fgkCarbonFiberTriangleLength,
1057 localcoolingtubevect[3][0]->Y(),
1058 - 0.5*fgkCoolingTubeSupportHeight);
1059 for(Int_t i=0; i<4; i++)
1060 for(Int_t j=0; j<2; j++){
1061 localcoolingtubetrans[i][j] =
1062 new TGeoTranslation(localcoolingtubevect[i][j]->X(),
1063 localcoolingtubevect[i][j]->Y(),
1064 localcoolingtubevect[i][j]->Z());
1065 fcoolingtubematrix[i][j] = new TGeoHMatrix((*localcoolingtubetrans[i][j])
1066 * (*localcoolingtuberot));
1067 }
1068 /////////////////////////////////////////////////////////////
1069 // SSD End Ladder Cooling Tube Transformations
1070 /////////////////////////////////////////////////////////////
1071 TGeoRotation* localendlladdercoolingtuberot = new TGeoRotation();
1072 localendlladdercoolingtuberot->SetAngles(0.,90.,0.);
1073 TGeoTranslation** localendlladdercoolingtubetrans[2];
1074 localendlladdercoolingtubetrans[0] = new TGeoTranslation*[6];
1075 localendlladdercoolingtubetrans[1] = new TGeoTranslation*[4];
1076 for(Int_t i=0; i<2; i++)
1077 for(Int_t j=0; j<(i==0?6:4); j++)
1078 localendlladdercoolingtubetrans[i][j] = new TGeoTranslation();
1079 localendlladdercoolingtubetrans[0][0]->SetTranslation(-(fgkCoolingTubeSupportLength
1080 - fgkCoolingTubeSupportRmax)
1081 + fgkCarbonFiberJunctionLength,
1082 0.5*(fgkEndLadderMountingBlockPosition[0]
1083 - fgkendladdercoolingsupportdistance[0]),
1084 - 0.5*fgkCoolingTubeSupportHeight);
1085 localendlladdercoolingtubetrans[0][1]->SetTranslation((fgkCoolingTubeSupportLength
1086 - fgkCoolingTubeSupportRmax)
1087 - fgkCarbonFiberJunctionLength
1088 + fgkCarbonFiberTriangleLength,
1089 0.5*(fgkEndLadderMountingBlockPosition[0]
1090 - fgkendladdercoolingsupportdistance[0]),
1091 - 0.5*fgkCoolingTubeSupportHeight);
1092 localendlladdercoolingtubetrans[0][2]->SetTranslation(-(fgkCoolingTubeSupportLength
1093 - fgkCoolingTubeSupportRmax)
1094 + fgkCarbonFiberJunctionLength,
1095 fgkEndLadderMountingBlockPosition[0]
1096 - fgkendladdercoolingsupportdistance[0]
1097 + 0.5*(fgkendladdercoolingsupportdistance[0]
1098 + fgkendladdercoolingsupportdistance[1]
1099 + fgkCoolingTubeSupportWidth),
1100 - 0.5*fgkCoolingTubeSupportHeight);
1101 localendlladdercoolingtubetrans[0][3]->SetTranslation((fgkCoolingTubeSupportLength
1102 - fgkCoolingTubeSupportRmax)
1103 - fgkCarbonFiberJunctionLength
1104 + fgkCarbonFiberTriangleLength,
1105 fgkEndLadderMountingBlockPosition[0]
1106 - fgkendladdercoolingsupportdistance[0]
1107 + 0.5*(fgkendladdercoolingsupportdistance[0]
1108 + fgkendladdercoolingsupportdistance[1]
1109 + fgkCoolingTubeSupportWidth),
1110 - 0.5*fgkCoolingTubeSupportHeight);
1111 localendlladdercoolingtubetrans[0][4]->SetTranslation(-(fgkCoolingTubeSupportLength
1112 - fgkCoolingTubeSupportRmax)
1113 + fgkCarbonFiberJunctionLength,
1114 fgkEndLadderCarbonFiberLowerJunctionLength[0]
1115 - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
1116 - fgkEndLadderMountingBlockPosition[0]
1117 - fgkendladdercoolingsupportdistance[1]
1118 - fgkCoolingTubeSupportWidth),
1119 - 0.5*fgkCoolingTubeSupportHeight);
1120 localendlladdercoolingtubetrans[0][5]->SetTranslation((fgkCoolingTubeSupportLength
1121 - fgkCoolingTubeSupportRmax)
1122 - fgkCarbonFiberJunctionLength
1123 + fgkCarbonFiberTriangleLength,
1124 fgkEndLadderCarbonFiberLowerJunctionLength[0]
1125 - 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
1126 - fgkEndLadderMountingBlockPosition[0]
1127 - fgkendladdercoolingsupportdistance[1]
1128 - fgkCoolingTubeSupportWidth),
1129 - 0.5*fgkCoolingTubeSupportHeight);
1130 localendlladdercoolingtubetrans[1][0]->SetTranslation(-(fgkCoolingTubeSupportLength
1131 - fgkCoolingTubeSupportRmax)
1132 + fgkCarbonFiberJunctionLength,
1133 - 0.50 * (fgkMountingBlockToSensorSupport
1134 - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
1135 - fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1]
1136 + fgkSSDSensorOverlap
1137 + fgkEndLadderCarbonFiberLowerJunctionLength[1]
1138 - fgkendladdercoolingsupportdistance[2]
1139 - fgkEndLadderMountingBlockPosition[1]
1140 - fgkCoolingTubeSupportWidth)
1141 + fgkEndLadderCarbonFiberLowerJunctionLength[1]
1142 - fgkendladdercoolingsupportdistance[2]
1143 - fgkCoolingTubeSupportWidth,
1144 - 0.5*fgkCoolingTubeSupportHeight);
1145 localendlladdercoolingtubetrans[1][1]->SetTranslation((fgkCoolingTubeSupportLength
1146 - fgkCoolingTubeSupportRmax)
1147 - fgkCarbonFiberJunctionLength
1148 + fgkCarbonFiberTriangleLength,
1149 - 0.50 * (fgkMountingBlockToSensorSupport
1150 - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
1151 - fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1]
1152 + fgkSSDSensorOverlap
1153 + fgkEndLadderCarbonFiberLowerJunctionLength[1]
1154 - fgkendladdercoolingsupportdistance[2]
1155 - fgkEndLadderMountingBlockPosition[1]
1156 - fgkCoolingTubeSupportWidth)
1157 + fgkEndLadderCarbonFiberLowerJunctionLength[1]
1158 - fgkendladdercoolingsupportdistance[2]
1159 - fgkCoolingTubeSupportWidth,
1160 - 0.5*fgkCoolingTubeSupportHeight);
1161 localendlladdercoolingtubetrans[1][2]->SetTranslation(-(fgkCoolingTubeSupportLength
1162 - fgkCoolingTubeSupportRmax)
1163 + fgkCarbonFiberJunctionLength,
1164 fgkEndLadderCarbonFiberLowerJunctionLength[1]
1165 - 0.5*fgkendladdercoolingsupportdistance[2],
1166 - 0.5*fgkCoolingTubeSupportHeight);
1167 localendlladdercoolingtubetrans[1][3]->SetTranslation((fgkCoolingTubeSupportLength
1168 - fgkCoolingTubeSupportRmax)
1169 - fgkCarbonFiberJunctionLength
1170 + fgkCarbonFiberTriangleLength,
1171 fgkEndLadderCarbonFiberLowerJunctionLength[1]
1172 - 0.5*fgkendladdercoolingsupportdistance[2],
1173 - 0.5*fgkCoolingTubeSupportHeight);
1174 fendladdercoolingtubematrix[0] = new TGeoHMatrix*[6];
1175 fendladdercoolingtubematrix[1] = new TGeoHMatrix*[4];
1176 for(Int_t i=0; i<2; i++)
1177 for(Int_t j=0; j<(i==0?6:4); j++){
1178 fendladdercoolingtubematrix[i][j] = new TGeoHMatrix(*localendlladdercoolingtuberot);
1179 fendladdercoolingtubematrix[i][j]->MultiplyLeft(localendlladdercoolingtubetrans[i][j]);
1180 }
1181 /////////////////////////////////////////////////////////////
1182 // SSD Hybrid Components Transformations
1183 /////////////////////////////////////////////////////////////
1184 const Int_t khybridmatrixnumber = 3;
1185 TGeoTranslation* localhybridtrans[khybridmatrixnumber];
1186 localhybridtrans[0] = new TGeoTranslation(0.5*fgkSSDStiffenerLength,
1187 0.5*fgkSSDStiffenerWidth,
1188 0.5*fgkSSDStiffenerHeight);
1189 localhybridtrans[1] = new TGeoTranslation(fgkSSDModuleStiffenerPosition[0],
1190 fgkSSDModuleStiffenerPosition[1],0.0);
1191
1192 localhybridtrans[2] = new TGeoTranslation(
1193 - 0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
1194 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1195 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1196 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1197 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
1198 - fgkSSDSensorCenterSupportThickness[0]),
1199 - (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight
1200 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight
1201 - fgkSSDModuleVerticalDisalignment));
1202 fhybridmatrix = new TGeoHMatrix();
1203 for(Int_t i=0; i<khybridmatrixnumber; i++) fhybridmatrix->MultiplyLeft(localhybridtrans[i]);
1204 /////////////////////////////////////////////////////////////
1205 // SSD Cooling Block Transformations
1206 /////////////////////////////////////////////////////////////
1207 const Int_t kcoolingblockmatrixnumber = 4;
1208 TGeoTranslation* localcoolingblocktrans[kcoolingblockmatrixnumber];
1209 localcoolingblocktrans[0] = new TGeoTranslation(-2.*(fgkCoolingTubeSupportRmax
1210 - fgkCoolingTubeSupportRmin),0.0,
1211 0.5*(fgkSSDCoolingBlockHoleCenter+fgkCoolingTubeRmax));
1212 localcoolingblocktrans[1] = new TGeoTranslation(0.5*fgkSSDStiffenerLength
1213 - 0.5*fgkSSDModuleSensorSupportDistance-fgkSSDCoolingBlockLength,
1214 0.0,fgkSSDStiffenerHeight);
1215 localcoolingblocktrans[2] = new TGeoTranslation(*localhybridtrans[1]);
1216 localcoolingblocktrans[3] = new TGeoTranslation(*localhybridtrans[2]);
1217 fcoolingblocksystematrix = new TGeoHMatrix();
1218 for(Int_t i=0; i<kcoolingblockmatrixnumber; i++)
1219 fcoolingblocksystematrix->MultiplyLeft(localcoolingblocktrans[i]);
1220 /////////////////////////////////////////////////////////////
1221 // SSD Stiffener Flex Transformations
1222 /////////////////////////////////////////////////////////////
1223 const Int_t klocalflexmatrixnumber = 4;
1224 TGeoCombiTrans** localflexmatrix[fgkflexnumber];
1225 for(Int_t i=0; i<fgkflexnumber; i++)
1226 localflexmatrix[i] = new TGeoCombiTrans*[klocalflexmatrixnumber];
1227 for(Int_t i=0; i<fgkflexnumber; i++)
1228 for(Int_t j =0; j<klocalflexmatrixnumber; j++)
1229 localflexmatrix[i][j] = new TGeoCombiTrans();
1230 Double_t ssdstiffenerseparation = fgkSSDSensorLength
1231 - 2.*fgkSSDModuleStiffenerPosition[1]
1232 - fgkSSDStiffenerWidth;
1233 localflexmatrix[0][0]->SetTranslation(-fgkSSDFlexLength[0]
1234 +0.5*fgkSSDStiffenerLength,
1235 0.5*fgkSSDStiffenerWidth,
1236 -0.5*fgkSSDStiffenerHeight
1237 -0.5*fgkSSDFlexHeight[0]);
1238 localflexmatrix[1][0]->SetTranslation(-(fgkSSDStiffenerLength-fgkSSDFlexLength[0])
1239 +0.5*fgkSSDStiffenerLength,ssdstiffenerseparation
1240 -0.5*fgkSSDStiffenerWidth,
1241 -0.5*fgkSSDStiffenerHeight
1242 -0.5*fgkSSDFlexHeight[0]);
1243 TGeoRotation* localflexrot = new TGeoRotation();
1244 localflexrot->SetAngles(180.,0.,0.);
1245 localflexmatrix[1][0]->SetRotation(localflexrot);
1246 for(Int_t i=0; i<fgkflexnumber; i++)
1247 for(Int_t j =1; j<klocalflexmatrixnumber; j++)
1248 localflexmatrix[i][j]->SetTranslation(*localhybridtrans[j-1]);
1249 for(Int_t i=0; i<fgkflexnumber; i++){
1250 fstiffenerflexmatrix[i] = new TGeoHMatrix();
1251 for(Int_t j =0; j<klocalflexmatrixnumber; j++)
1252 fstiffenerflexmatrix[i]->MultiplyLeft(localflexmatrix[i][j]);
1253 }
1254 /////////////////////////////////////////////////////////////
1255 // SSD End Flex Transformations
1256 /////////////////////////////////////////////////////////////
1257 TGeoRotation* localendflexrot = new TGeoRotation();
1258 localendflexrot->SetAngles(0.0,90.0,0.0);
1259 TGeoCombiTrans* localendflexmatrix = new TGeoCombiTrans();
1260 Double_t ssdflexradiusmax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
1261 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
1262 Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
1263 * TMath::DegToRad()*ssdflexradiusmax
1264 - fgkSSDFlexLength[2]-TMath::Pi()
1265 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
1266 - 0.1*fgkSSDFlexFullLength;
1267 Double_t trans = ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
1268 + (ssdflexradiusmax-fgkSSDStiffenerHeight)*SinD(2.*fgkSSDFlexAngle)
1269 + fgkSSDFlexLength[2];
1270 localendflexmatrix->SetTranslation(fgkSSDFlexLength[0]-trans,
1271 0.5*fgkSSDFlexWidth[0],
1272 2.*fgkSSDStiffenerHeight
1273 + 0.5*fgkSSDFlexHeight[0]);
1274 localendflexmatrix->SetRotation(localendflexrot);
1275 for(Int_t i=0; i<fgkflexnumber; i++)
1276 fendflexmatrix[i] = new TGeoHMatrix((*fstiffenerflexmatrix[i])*(*localendflexmatrix));
1277 /////////////////////////////////////////////////////////////
1278 // End Ladder Carbon Fiber Junction
1279 /////////////////////////////////////////////////////////////
1280 TGeoCombiTrans** localendladdercarbonfiberjunctionmatrix[fgkendlabbercarbonfiberjunctionumber];
1281 TGeoRotation** localendladdercarbonfiberjunctionrot[fgkendlabbercarbonfiberjunctionumber];
1282 TGeoTranslation** localendladdercarbonfiberjunctiontrans[fgkendlabbercarbonfiberjunctionumber];
1283 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1284 localendladdercarbonfiberjunctionmatrix[i]
1285 = new TGeoCombiTrans*[fgkendladdercabonfiberjunctionmatrixnumber];
1286 localendladdercarbonfiberjunctionrot[i]
1287 = new TGeoRotation*[fgkendladdercabonfiberjunctionmatrixnumber];
1288 localendladdercarbonfiberjunctiontrans[i]
1289 = new TGeoTranslation*[fgkendladdercabonfiberjunctionmatrixnumber];
1290 fendladdercarbonfiberjunctionmatrix[i]
1291 = new TGeoHMatrix*[fgkendladdercabonfiberjunctionmatrixnumber];
1292 }
1293 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1294 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1295 localendladdercarbonfiberjunctionrot[i][j] = new TGeoRotation();
1296 localendladdercarbonfiberjunctiontrans[i][j] = new TGeoTranslation();
1297 }
1298 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1299 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
1300 localendladdercarbonfiberjunctionrot[i][j]->SetAngles(120.*j,0.,0.);
1301 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1302 localendladdercarbonfiberjunctiontrans[i][1]->SetTranslation(fgkCarbonFiberTriangleLength,
1303 0.0,0.0);
1304 localendladdercarbonfiberjunctiontrans[i][2]->SetTranslation(fgkCarbonFiberTriangleLength
1305 * CosD(fgkCarbonFiberTriangleAngle),fgkCarbonFiberTriangleLength
1306 * SinD(fgkCarbonFiberTriangleAngle),
1307 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[i]
1308 - fgkEndLadderCarbonFiberUpperJunctionLength[i]));
1309 }
1310 TGeoCombiTrans* localendladdercarbonfiberjunctionglobalmatrix[fgkendlabbercarbonfiberjunctionumber];
1311 TGeoRotation* localendladdercarbonfiberjunctionglobalrot[fgkendlabbercarbonfiberjunctionumber];
1312 TGeoTranslation* localendladdercarbonfiberjunctionglobaltrans[fgkendlabbercarbonfiberjunctionumber];
1313 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1314 localendladdercarbonfiberjunctionglobalrot[i] = new TGeoRotation();
1315 localendladdercarbonfiberjunctionglobaltrans[i] = new TGeoTranslation();
1316 localendladdercarbonfiberjunctionglobalrot[i]->SetAngles(0.0,90.0,0.0);
1317 localendladdercarbonfiberjunctionglobaltrans[i]->SetTranslation(0.0,
1318 0.5*fgkEndLadderCarbonFiberLowerJunctionLength[i],0.0);
1319 localendladdercarbonfiberjunctionglobalmatrix[i] =
1320 new TGeoCombiTrans(*localendladdercarbonfiberjunctionglobaltrans[i],
1321 *localendladdercarbonfiberjunctionglobalrot[i]);
1322 }
1323 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1324 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1325 localendladdercarbonfiberjunctionmatrix[i][j] =
1326 new TGeoCombiTrans(*localendladdercarbonfiberjunctiontrans[i][j],
1327 *localendladdercarbonfiberjunctionrot[i][j]);
1328 fendladdercarbonfiberjunctionmatrix[i][j] =
1329 new TGeoHMatrix((*localendladdercarbonfiberjunctionglobalmatrix[i])
1330 * (*localendladdercarbonfiberjunctionmatrix[i][j]));
1331 }
1332 /////////////////////////////////////////////////////////////
1333 // End Ladder Carbon Fiber Support
1334 /////////////////////////////////////////////////////////////
1335 TGeoTranslation* localendladdercarbonfibertrans[fgkendladdercarbonfibermatrixnumber];
1336 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++){
1337 localendladdercarbonfibertrans[i] = new TGeoTranslation();
1338 localendladdercarbonfibertrans[i]->SetTranslation(0.0,
1339 i==0 ? 0.0 :fgkCarbonFiberLowerSupportWidth,0.0);
1340 fendladdercarbonfibermatrix[i] = new TGeoHMatrix*[fgkcarbonfibersupportnumber];
1341 }
1342 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++)
1343 for(Int_t j=0; j<fgkcarbonfibersupportnumber; j++)
1344 fendladdercarbonfibermatrix[i][j] =
1345 new TGeoHMatrix((*localendladdercarbonfibertrans[i])
1346 *(*fcarbonfibersupportmatrix[j]));
1347 /////////////////////////////////////////////////////////////
1348 // End Ladder SSD Mounting Block
1349 /////////////////////////////////////////////////////////////
1350 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1351 fendladdermountingblockcombitrans[i] = new TGeoCombiTrans();
1352 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1353 fendladdermountingblockcombitrans[i]->SetTranslation(- 0.25*(fgkSSDMountingBlockLength[0]
1354 + fgkSSDMountingBlockLength[1])
1355 + 0.5*fgkCarbonFiberTriangleLength,
1356 fgkEndLadderMountingBlockPosition[i],
1357 - fgkSSDMountingBlockHeight[1]
1358 + 0.5*fgkSSDMountingBlockHeight[0]);
1359 TGeoRotation* endladdermountingblockrot = new TGeoRotation();
1360 endladdermountingblockrot->SetAngles(0.,90.,0.);
1361 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1362 fendladdermountingblockcombitrans[i]->SetRotation(*endladdermountingblockrot);
1363 /////////////////////////////////////////////////////////////
1364 // End Ladder SSD Mounting Block Clip Matrix
1365 /////////////////////////////////////////////////////////////
1366 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1367 fendladdermountingblockclipmatrix[i] = new TGeoHMatrix*[2];
1368
1369 TGeoRotation* localendladdercliprot = new TGeoRotation();
1370 TGeoTranslation* localendladdercliptrans = new TGeoTranslation();
1371 localendladdercliptrans->SetTranslation(-0.5*(fgkSSDMountingBlockLength[0]
1372 - fgkSSDMountingBlockLength[1])
1373 + fgkSSDMountingBlockLength[0],0.,0.);
1374 localendladdercliprot->SetAngles(90.,180.,-90.);
1375 TGeoCombiTrans* localendladderclipcombitrans =
1376 new TGeoCombiTrans(*localendladdercliptrans,*localendladdercliprot);
1377 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
1378 for(Int_t j=0; j<2; j++){
1379 fendladdermountingblockclipmatrix[i][j] =
1380 new TGeoHMatrix(*fendladdermountingblockcombitrans[i]);
1381 if(j!=0) fendladdermountingblockclipmatrix[i][j]->Multiply(localendladderclipcombitrans);
1382 }
1383 /////////////////////////////////////////////////////////////
1384 // End Ladder Carbon Fiber Lower Support
1385 /////////////////////////////////////////////////////////////
1386 for(Int_t i=0; i<fgkendladderlowersuppnumber; i++)
1387 fendladderlowersupptrans[i] =
1388 new TGeoTranslation(0.0,(1-i)*(fgkEndLadderMountingBlockPosition[i]
1389 + 0.5*fgkSSDMountingBlockWidth),
1390 - 0.5*fgkCarbonFiberLowerSupportHeight);
1391 fendladderlowersupptrans[2] = new TGeoTranslation(0.0,
1392 fgkCarbonFiberLowerSupportVolumePosition[1]
1393 + fgkCarbonFiberLowerSupportVolumePosition[0],
1394 0.0);
1395 fendladderlowersupptrans[2]->Add(fendladderlowersupptrans[1]);
1396 /////////////////////////////////////////////////////////////
1397 // Matrix for positioning Ladder into mother volume
1398 /////////////////////////////////////////////////////////////
1399 TGeoHMatrix** ladderglobalmatrix[fgkladdernumber];
1400 for(Int_t i=0; i<fgkladdernumber; i++)
1401 ladderglobalmatrix[i] = new TGeoHMatrix*[fgkladdernumber];
1402 TGeoRotation* localladdermotherrot = new TGeoRotation();
1403 localladdermotherrot->SetAngles(0.,90.,0.);
1404 TGeoTranslation* localladdermothertrans[fgkladdernumber];
1405 TGeoCombiTrans* localladdermothercombitrans[fgkladdernumber];
1406 for(Int_t i=0; i<fgkladdernumber; i++){
1407 localladdermothertrans[i] = new TGeoTranslation(0.,
1408 - fgkEndLadderCarbonFiberLowerJunctionLength[1]
1409 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
1410 + (i==0?fgkSSDLay5SensorsNumber:fgkSSDLay6SensorsNumber)
1411 * fgkCarbonFiberJunctionWidth,0.);
1412 localladdermothercombitrans[i] = new TGeoCombiTrans(*localladdermothertrans[i],
1413 *localladdermotherrot);
1414 ladderglobalmatrix[0][i] = new TGeoHMatrix(*localladdermothercombitrans[i]);
1415 ladderglobalmatrix[1][i] = new TGeoHMatrix(ladderglobalmatrix[0][i]->Inverse());
1416 }
1417 /////////////////////////////////////////////////////////////
1418 // Ladder Cables Matrices
1419 /////////////////////////////////////////////////////////////
1420 Double_t ssdflexradius = fgkSSDStiffenerHeight+2*fgkSSDFlexHeight[0]
1421 + fgkSSDFlexHeight[1];
1422 Double_t ssdladdercabletransx[3];
1423 ssdladdercabletransx[0] = (ssdflexradiusmax-fgkSSDFlexHeight[1]-ssdflexradius)
1424 * SinD(2.*fgkSSDFlexAngle)
1425 * CosD(2.*fgkSSDFlexAngle);
1426 ssdladdercabletransx[1] = ((ssdflexradiusmax-fgkSSDFlexHeight[1]-ssdflexradius)
1427 - ssdladdercabletransx[0]
1428 / SinD(2.*fgkSSDFlexAngle))
1429 * CosD(fgkSSDFlexAngle);
1430 ssdladdercabletransx[2] = (fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
1431 * TMath::DegToRad()*ssdflexradiusmax
1432 - fgkSSDFlexLength[2]-TMath::Pi()
1433 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
1434 - fgkSSDLadderCableWidth)
1435 * CosD(2.*fgkSSDFlexAngle);
1436 Double_t ssdladdercabletransz[3] = {ssdladdercabletransx[0]
1437 * TanD(2.*fgkSSDFlexAngle),
1438 ssdladdercabletransx[1]
1439 * TanD(fgkSSDFlexAngle),
1440 ssdladdercabletransx[2]
1441 * TanD(2.*fgkSSDFlexAngle)};
1442 TGeoRotation* localladdercablerot[3];
1443 for(Int_t i=0; i<3; i++) localladdercablerot[i] = new TGeoRotation();
1444 localladdercablerot[0]->SetAngles(90.,0.,0.);
1445 localladdercablerot[1]->SetAngles(90.,60.,-90.);
1446 localladdercablerot[2]->SetRotation((*localladdercablerot[1])
1447 * (*localladdercablerot[0]));
1448 ////////////////////////////////////////////
1449 // LocalLadderCableCombiTransMatrix
1450 ////////////////////////////////////////////
1451 const Int_t klocalladdersidecablesnumber = 2;
1452 const Int_t klocalladdercombitransnumber = 5;
1453 TGeoCombiTrans** localladdercablecombitransmatrix[klocalladdersidecablesnumber];
1454 for(Int_t i=0; i<klocalladdersidecablesnumber; i++)
1455 localladdercablecombitransmatrix[i] =
1456 new TGeoCombiTrans*[klocalladdercombitransnumber];
1457 ///////////////////////////////////////////
1458 // Left Side Ladder Cables Transformations
1459 ///////////////////////////////////////////
1460 localladdercablecombitransmatrix[0][0] =
1461 new TGeoCombiTrans(-0.5*fgkCarbonFiberTriangleLength,
1462 0.,0.,NULL);
1463 localladdercablecombitransmatrix[0][1] =
1464 new TGeoCombiTrans(-0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
1465 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
1466 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
1467 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
1468 - 0.5*(fgkCarbonFiberLowerSupportWidth
1469 + fgkSSDSensorCenterSupportLength
1470 - fgkSSDSensorCenterSupportThickness[0]),
1471 - (fgkSSDModuleCoolingBlockToSensor
1472 + 0.5*fgkCoolingTubeSupportHeight
1473 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]
1474 - fgkSSDChipHeight),NULL);
1475 localladdercablecombitransmatrix[0][2] =
1476 new TGeoCombiTrans(fgkSSDModuleStiffenerPosition[0],
1477 fgkSSDModuleStiffenerPosition[1],0.,0);
1478 localladdercablecombitransmatrix[0][3] = new TGeoCombiTrans(
1479 0.5*(fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
1480 +(fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
1481 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
1482 - fgkSSDStiffenerWidth,- 0.5*fgkSSDChipHeight,
1483 new TGeoRotation("",180.,0.,0.));
1484 localladdercablecombitransmatrix[0][4] =
1485 new TGeoCombiTrans(-ssdladdercabletransx[0]
1486 - ssdladdercabletransx[1]-ssdladdercabletransx[2]
1487 + fgkSSDFlexLength[0]-fgkSSDFlexLength[2],
1488 0.,
1489 0.5*fgkSSDFlexHeight[0]+2.*(fgkSSDFlexHeight[0]
1490 + fgkSSDFlexHeight[1])+2.*fgkSSDStiffenerHeight
1491 + ssdladdercabletransz[0]-ssdladdercabletransz[1]
1492 + ssdladdercabletransz[2],localladdercablerot[2]);
1493 ///////////////////////////////////////////
1494 // Rigth Side Ladder Cables Transformations
1495 ///////////////////////////////////////////
1496 TGeoCombiTrans* localladdercablessdmodulematrix =
1497 new TGeoCombiTrans(0.5*(fgkSSDStiffenerLength-fgkSSDChipNumber*fgkSSDChipLength
1498 - (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
1499 fgkSSDStiffenerWidth,
1500 - 0.5*fgkSSDFlexHeight[0],NULL);
1501 for(Int_t i=0; i<klocalladdercombitransnumber; i++)
1502 localladdercablecombitransmatrix[1][i] =
1503 (i!=3 ? new TGeoCombiTrans(*localladdercablecombitransmatrix[0][i]):
1504 new TGeoCombiTrans(*localladdercablessdmodulematrix));
1505 ///////////////////////////////////////////
1506 // Setting LadderCableHMatrix
1507 ///////////////////////////////////////////
1508 Int_t beamaxistrans[2][3];
1509 beamaxistrans[0][0] = fgkSSDLay5SensorsNumber/2;
1510 beamaxistrans[0][1] = beamaxistrans[0][0]+1;
1511 beamaxistrans[0][2] = beamaxistrans[0][0]-1;
1512 beamaxistrans[1][0] = (fgkSSDLay6SensorsNumber-1)/2;
1513 beamaxistrans[1][1] = beamaxistrans[1][0]+1;
1514 beamaxistrans[1][2] = beamaxistrans[1][0];
1515 TGeoHMatrix** localladdercablehmatrix[fgkladdercablesnumber];
1516 TGeoRotation* laddercablerot = new TGeoRotation();
1517 TGeoTranslation* laddercabletrans = new TGeoTranslation();
1518 TGeoCombiTrans* laddercablecombitrans = new TGeoCombiTrans();
1519 Double_t* laddercabletransvector;
1520 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1521 localladdercablehmatrix[i] = new TGeoHMatrix*[klocalladdersidecablesnumber];
1522 fladdercablematrix[i] = new TGeoHMatrix*[fgkladdercablematrixnumber];
1523 }
1524 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1525 for(Int_t j=0; j<klocalladdersidecablesnumber; j++){
1526 localladdercablehmatrix[i][j] = new TGeoHMatrix();
1527 for(Int_t k=0; k<klocalladdercombitransnumber; k++){
1528 localladdercablehmatrix[i][j]->MultiplyLeft(
1529 localladdercablecombitransmatrix[j][klocalladdercombitransnumber-k-1]);
1530 }
1531 laddercablerot->SetMatrix(localladdercablehmatrix[i][j]->GetRotationMatrix());
1532 laddercabletransvector = localladdercablehmatrix[i][j]->GetTranslation();
1533 laddercabletrans->SetTranslation(laddercabletransvector[0],
1534 laddercabletransvector[1]
1535 + (j==0 ? beamaxistrans[i][0] : 0.)
1536 * fgkCarbonFiberJunctionWidth,
1537 laddercabletransvector[2]);
1538 laddercablecombitrans->SetRotation(*laddercablerot);
1539 laddercablecombitrans->SetTranslation(*laddercabletrans);
1540 fladdercablematrix[i][j] = new TGeoHMatrix(*laddercablecombitrans);
1541 }
1542 fladdercablematrix[i][2] =
1543 AddTranslationToHMatrix(fladdercablematrix[i][1],0.,
1544 beamaxistrans[i][1]*fgkCarbonFiberJunctionWidth,0.);
1545 fladdercablematrix[i][3] =
1546 AddTranslationToHMatrix(fladdercablematrix[i][0],0.,
1547 beamaxistrans[i][2]*fgkCarbonFiberJunctionWidth,0.);
1548 }
1549 for(Int_t i=0; i<fgkladdercablesnumber; i++)
1550 for(Int_t j=0; j<klocalladdercombitransnumber-1; j++)
1551 fladdercablematrix[i][j]->MultiplyLeft(ladderglobalmatrix[1][i]);
1552 ///////////////////////////////////////////
1553 // Setting Ladder HMatrix
1554 ///////////////////////////////////////////
1555 Int_t ssdlaysensorsnumber[fgkladdernumber] = {fgkSSDLay5SensorsNumber,
1556 fgkSSDLay6SensorsNumber};
1557 for(Int_t i=0; i<fgkladdernumber; i++){
1558 fladdermatrix[i] = new TGeoHMatrix*[ssdlaysensorsnumber[i]];
1559 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
1560 fladdermatrix[i][j] = new TGeoHMatrix();
1561 fladdermatrix[i][j]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1562 fladdermatrix[i][j]->SetDy(fgkCarbonFiberJunctionWidth*j);
1563 fladdermatrix[i][j]->MultiplyLeft(ladderglobalmatrix[1][i]);
1564 }
1565 }
1566 ///////////////////////////////////////////
1567 // Setting SSD Sensor Matrix
1568 ///////////////////////////////////////////
1569 TGeoCombiTrans* localssdsensorcombitrans[2];
1570 TGeoRotation* localssdsensorrot = new TGeoRotation();
1571 localssdsensorrot->SetAngles(0.,90.,0.);
1572 TGeoTranslation* localssdsensortrans[2];
1573 for(Int_t i=0; i<2; i++) localssdsensortrans[i] = new TGeoTranslation();
1574 localssdsensortrans[0]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
1575 fgkCarbonFiberJunctionWidth
1576 - fgkCarbonFiberLowerSupportWidth
1577 - fgkLowerSupportToSensorZ,
1578 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
1579 - fgkSSDModuleCoolingBlockToSensor
1580 + (fgkSSDSensorSideSupportHeight[1]
1581 - fgkSSDSensorSideSupportHeight[0]));
1582 localssdsensortrans[1]->SetTranslation(0.5*fgkCarbonFiberTriangleLength,
1583 fgkCarbonFiberJunctionWidth
1584 - fgkCarbonFiberLowerSupportWidth
1585 - fgkLowerSupportToSensorZ,
1586 0.5*fgkSSDSensorHeight-0.5*fgkCoolingTubeSupportHeight
1587 -fgkSSDModuleCoolingBlockToSensor);
1588 for(Int_t i=0; i<2; i++)
1589 localssdsensorcombitrans[i] = new TGeoCombiTrans(*localssdsensortrans[i],
1590 *localssdsensorrot);
1591 for(Int_t i=0; i<fgkladdernumber; i++){
1592 fssdsensormatrix[i] = new TGeoHMatrix*[ssdlaysensorsnumber[i]];
1593 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
1594 switch(i){
1595 case 0: //Ladder of Layer5
1596 fssdsensormatrix[i][j] = new TGeoHMatrix((*fladdermatrix[i][j])
1597 * ((j%2==0 ? *localssdsensorcombitrans[0] :
1598 *localssdsensorcombitrans[1])));
1599 break;
1600 case 1: //Ladder of Layer6
1601 fssdsensormatrix[i][j] = new TGeoHMatrix((*fladdermatrix[i][j])
1602 * ((j%2==0 ? *localssdsensorcombitrans[1] :
1603 *localssdsensorcombitrans[0])));
1604 break;
1605 }
1606 }
1607 }
1608 //////////////////////////
1609 // Setting SSD End Ladder
1610 //////////////////////////
1611 for(Int_t i=0; i<2; i++) fendladdersegmentmatrix[i] = new TGeoHMatrix*[2];
1612 for(Int_t i=0; i<2; i++){
1613 fendladdersegmentmatrix[0][i] = new TGeoHMatrix();
1614 fendladdersegmentmatrix[0][i]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1615 fendladdersegmentmatrix[0][i]->SetDy(fgkCarbonFiberJunctionWidth*ssdlaysensorsnumber[i]);
1616 fendladdersegmentmatrix[0][i]->MultiplyLeft(ladderglobalmatrix[1][i]);
1617 fendladdersegmentmatrix[1][i] = new TGeoHMatrix();
1618 fendladdersegmentmatrix[1][i]->SetDx(-0.5*fgkCarbonFiberTriangleLength);
1619 fendladdersegmentmatrix[1][i]->RotateZ(180.0);
1620 fendladdersegmentmatrix[1][i]->MultiplyLeft(ladderglobalmatrix[1][i]);
1621 }
1622 /////////////////////////////////////////////////////
1623 // Setting the CombiTransformation to pass ITS center
1624 /////////////////////////////////////////////////////
1625 Double_t itscentertransz[fgklayernumber];
1626 itscentertransz[0] = fgkSSDLay5LadderLength
1627 - fgkLay5CenterITSPosition;
1628 itscentertransz[1] = fgkSSDLay6LadderLength
1629 - fgkLay6CenterITSPosition;
1630 Double_t itssensortransy = fgkSSDModuleCoolingBlockToSensor
1631 + 0.5*fgkCoolingTubeSupportHeight;
1632 TGeoRotation* itscenterrot[3];
1633 for(Int_t i=0; i<fgklayernumber; i++) itscenterrot[i] = new TGeoRotation();
1634 itscenterrot[0]->SetAngles(90.,180.,-90.);
1635 itscenterrot[1]->SetAngles(0.,90.,0.);
1636 itscenterrot[2] = new TGeoRotation((*itscenterrot[1])*(*itscenterrot[0]));
1637 TGeoCombiTrans* itscentercombitrans[fgklayernumber];
1638 for(Int_t i=0; i<fgklayernumber; i++)
1639 itscentercombitrans[i] = new TGeoCombiTrans(0.,
1640 itssensortransy,
1641 fgkEndLadderCarbonFiberLowerJunctionLength[1]
1642 - itscentertransz[i],itscenterrot[2]);
1643 TGeoRotation** locallayerrot[fgklayernumber];
1644 TGeoTranslation** locallayertrans[fgklayernumber];
1645 TGeoCombiTrans** locallayercombitrans[fgklayernumber];
1646 TGeoTranslation* localbeamaxistrans[fgklayernumber];
1647 localbeamaxistrans[0] = new TGeoTranslation(0.,0.,0.5*fgkSSDLay5LadderLength
1648 - fgkLay5CenterITSPosition);
1649 localbeamaxistrans[1] = new TGeoTranslation(0.,0.,0.5*fgkSSDLay6LadderLength
1650 - fgkLay6CenterITSPosition);
1651 const Int_t kssdlayladdernumber[fgklayernumber] =
1652 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
1653 for(Int_t i=0; i<fgklayernumber; i++){
1654 locallayerrot[i] = new TGeoRotation*[kssdlayladdernumber[i]];
1655 locallayertrans[i] = new TGeoTranslation*[kssdlayladdernumber[i]];
1656 locallayercombitrans[i] = new TGeoCombiTrans*[kssdlayladdernumber[i]];
1657 flayermatrix[i] = new TGeoHMatrix*[kssdlayladdernumber[i]];
1658 }
1659 Double_t layerladderangleposition[fgklayernumber] =
1660 {360./fgkSSDLay5LadderNumber,360./fgkSSDLay6LadderNumber};
1661 Double_t layerradius = 0.;
1662 for(Int_t i=0; i<fgklayernumber; i++){
1663 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
1664 switch(i){
1665 case 0: //Ladder of Layer5
1666 layerradius = (j%2==0 ? fgkSSDLay5RadiusMin: fgkSSDLay5RadiusMax);
1667 break;
1668 case 1: //Ladder of Layer6
1669 layerradius = (j%2==0 ? fgkSSDLay6RadiusMin: fgkSSDLay6RadiusMax);
1670 break;
1671 }
1672 locallayerrot[i][j] = new TGeoRotation();
1673 locallayertrans[i][j] = new TGeoTranslation();
1674 locallayerrot[i][j]->SetAngles(j*layerladderangleposition[i],0.,0.);
1675 locallayertrans[i][j]->SetTranslation(layerradius
1676 * CosD(90.0+j*layerladderangleposition[i]),
1677 layerradius
1678 * SinD(90.0+j*layerladderangleposition[i]),0.);
1679 locallayercombitrans[i][j] = new TGeoCombiTrans(*locallayertrans[i][j],
1680 *locallayerrot[i][j]);
1681 flayermatrix[i][j] = new TGeoHMatrix((*locallayercombitrans[i][j])*(*itscentercombitrans[i]));
1682 flayermatrix[i][j]->Multiply(ladderglobalmatrix[0][i]);
1683 flayermatrix[i][j]->MultiplyLeft(localbeamaxistrans[i]);
1684 }
1685 }
1686 /////////////////////////////////////////////////////////////
1687 // Deallocating memory
1688 /////////////////////////////////////////////////////////////
1689 for(Int_t i=0; i< kcarbonfibersupportmatrixnumber[1]; i++){
1690 delete carbonfiberot[i];
1691 delete localcarbonfibersupportmatrix[i];
1692 }
1693 for(Int_t i=0; i< fgkcarbonfiberjunctionumber; i++){
1694 for(Int_t j=0; j< kcarbonfiberjunctionmatrixnumber; j++){
1695 delete localcarbonfiberjunctionmatrix[i][j];
1696 delete localcarbonfiberjunctionrot[i][j];
1697 delete localcarbonfiberjunctiontrans[i][j];
1698 }
1699 delete [] localcarbonfiberjunctionmatrix[i];
1700 delete [] localcarbonfiberjunctionrot[i];
1701 delete [] localcarbonfiberjunctiontrans[i];
1702 }
1703 for(Int_t i=0; i<fgkcarbonfiberlowersupportnumber; i++)
1704 delete localcarbonfiberlowersupportrans[i];
1705 for(Int_t i=0; i< fgkssdsensorsupportnumber; i++){
1706 for(Int_t j=0; j< kssdsensorsupportmatrixnumber; j++){
1707 delete localssdsensorsupportmatrix[i][j];
1708 delete localssdsensorsupportrot[i][j];
1709 delete localssdsensorsupportrans[i][j];
1710 }
1711 delete [] localssdsensorsupportmatrix[i];
1712 delete [] localssdsensorsupportrot[i];
1713 delete [] localssdsensorsupportrans[i];
1714 }
1715 for(Int_t i=0; i<kcoolingtubesupportmatrixnumber; i++){
1716 delete localcoolingtubesupportmatrix[i];
1717 delete localcoolingtubesupportrot[i];
1718 delete localcoolingtubesupportrans[i];
1719 }
1720 for(Int_t i=0; i<4; i++){
1721 for(Int_t j=0; j<2; j++){
1722 delete localcoolingtubevect[i][j];
1723 delete localcoolingtubetrans[i][j];
1724 }
1725 delete [] localcoolingtubevect[i];
1726 delete [] localcoolingtubetrans[i];
1727 }
1728 delete endladdermountingblockrot;
1729 for(Int_t i=0; i<khybridmatrixnumber; i++) delete localhybridtrans[i];
1730 for(Int_t i=0; i<kcoolingblockmatrixnumber; i++) delete localcoolingblocktrans[i];
1731 for(Int_t i=0; i<fgkflexnumber; i++){
1732 for(Int_t j=1; j<klocalflexmatrixnumber; j++)
1733 delete localflexmatrix[i][j];
1734 delete [] localflexmatrix[i];
1735 }
1736 delete localendlladdercoolingtuberot;
1737 for(Int_t i=0; i<2; i++){
1738 for(Int_t j=0; j<(i==0?6:4); j++)
1739 delete localendlladdercoolingtubetrans[i][j];
1740 delete [] localendlladdercoolingtubetrans[i];
1741 }
1742
1743 delete localflexrot;
1744 delete localendflexrot;
1745 delete localendflexmatrix;
1746 for(Int_t i=0; i<fgkladdernumber; i++){
1747 delete localladdermothertrans[i];
1748 delete localladdermothercombitrans[i];
1749 }
1750 delete localladdermotherrot;
1751 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1752 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++){
1753 delete localendladdercarbonfiberjunctionmatrix[i][j];
1754 delete localendladdercarbonfiberjunctionrot[i][j];
1755 delete localendladdercarbonfiberjunctiontrans[i][j];
1756 }
1757 delete [] localendladdercarbonfiberjunctionmatrix[i];
1758 delete [] localendladdercarbonfiberjunctionrot[i];
1759 delete [] localendladdercarbonfiberjunctiontrans[i];
1760 delete localendladdercarbonfiberjunctionglobalrot[i];
1761 delete localendladdercarbonfiberjunctionglobaltrans[i];
1762 delete localendladdercarbonfiberjunctionglobalmatrix[i];
1763 }
1764 for(Int_t i=0; i<2; i++){
1765 for(Int_t j=0; j<(i==0?4:2); j++) delete localendladdercooltubetrans[i][j];
1766 delete [] localendladdercooltubetrans[i];
1767 }
1768 for(Int_t i=0; i<fgkendladdercarbonfibermatrixnumber; i++)
1769 delete localendladdercarbonfibertrans[i];
1770 for(Int_t i=0; i<3; i++) delete localladdercablerot[i];
1771 for(Int_t i=0; i<klocalladdersidecablesnumber; i++){
1772 for(Int_t j=0; j<klocalladdercombitransnumber; j++)
1773 delete localladdercablecombitransmatrix[i][j];
1774 delete []localladdercablecombitransmatrix[i];
1775 }
1776 delete localendladdercliprot;
1777 delete localendladdercliptrans;
1778 for(Int_t i=0; i<fgkladdercablesnumber; i++){
1779 for(Int_t j=0; j<klocalladdersidecablesnumber; j++)
1780 delete localladdercablehmatrix[i][j];
1781 delete []localladdercablehmatrix[i];
1782 }
1783 delete laddercablerot;
1784 delete laddercabletrans;
1785 delete laddercablecombitrans;
1786 delete localladdercablessdmodulematrix;
1787 delete localssdsensorrot;
1788 for(Int_t i=0; i<2; i++){
1789 delete localssdsensortrans[i];
1790 delete localssdsensorcombitrans[i];
1791 }
1792 for(Int_t i=0; i<fgklayernumber; i++){
1793 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
1794 delete locallayerrot[i][j];
1795 delete locallayertrans[i][j];
1796 delete locallayercombitrans[i][j];
1797 }
1798 delete [] locallayerrot[i];
1799 delete [] locallayertrans[i];
1800 delete [] locallayercombitrans[i];
1801 delete localbeamaxistrans[i];
1802 }
1803 for(Int_t i=0; i<3; i++) delete itscenterrot[i];
1804 for(Int_t i=0; i<fgkladdernumber; i++){
1805 for(Int_t j=0; j<fgkladdernumber; j++)
1806 delete ladderglobalmatrix[i][j];
1807 delete [] ladderglobalmatrix[i];
1808 }
1809 /////////////////////////////////////////////////////////////
1810 fTransformationMatrices = kTRUE;
1811}
1812///////////////////////////////////////////////////////////////////////////////
1813void AliITSv11GeometrySSD::CreateBasicObjects(){
1814 /////////////////////////////////////////////////////////////
1815 // Method generating the Objects of SSD Geometry
1816 /////////////////////////////////////////////////////////////
1817 // SSD Sensor
1818 ///////////////////////////////////
1819 SetSSDSensor();
1820 /////////////////////////////////////////////////////////////
1821 // Carbon Fiber Support
1822 /////////////////////////////////////////////////////////////
1823 TList* carbonfibersupportlist = GetCarbonFiberSupportList();
1824 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++)
1825 fcarbonfibersupport[i] = (TGeoVolume*)carbonfibersupportlist->At(i);
1826 /////////////////////////////////////////////////////////////
1827 // Carbon Fiber Junction
1828 /////////////////////////////////////////////////////////////
1829 fcarbonfiberjunction = GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth-fgkSSDTolerance);
1830 /////////////////////////////////////////////////////////////
1831 // Carbon Fiber Lower Support
1832 /////////////////////////////////////////////////////////////
1833 TList* carbonfiberlowersupportlist = GetCarbonFiberLowerSupportList();
1834 for(Int_t i=0; i<fgkcarbonfiberlowersupportnumber; i++)
1835 fcarbonfiberlowersupport[i] = (TGeoVolume*)carbonfiberlowersupportlist->At(i);
1836 /////////////////////////////
1837 // SSD Sensor Support
1838 /////////////////////////////
1839 for(Int_t i=0; i<fgkvolumekind; i++) fssdsensorsupport[i] =
1840 new TGeoVolume*[fgkssdsensorsupportnumber];
1841 Double_t sidesupporthickness[2] = {fgkSSDSensorSideSupportThickness[0],
1842 fgkSSDSensorSideSupportThickness[1]};
1843 for(Int_t i=0; i<fgkssdsensorsupportnumber-1; i++){
1844 fssdsensorsupport[0][i] = GetSSDSensorSupport(fgkSSDSensorSideSupportLength,
1845 fgkSSDSensorSideSupportHeight[i],
1846 fgkSSDSensorSideSupportWidth,
1847 sidesupporthickness);
1848 fssdsensorsupport[1][i] = GetSSDSensorSupport(fgkSSDSensorCenterSupportLength,
1849 fgkSSDSensorCenterSupportHeight[i],
1850 fgkSSDSensorCenterSupportWidth,
1851 sidesupporthickness);
1852 }
1853 /////////////////////////////////////////////////////////////
1854 // SSD Cooling Tube Support
1855 /////////////////////////////////////////////////////////////
1856 Int_t edgesnumber = 16;
1857 fcoolingtubesupport = GetCoolingTubeSupport(edgesnumber);
1858 /////////////////////////////////////////////////////////////
1859 // SSD Hybrid
1860 /////////////////////////////////////////////////////////////
1861 TList* ssdhybridcomponentslist = GetSSDHybridParts();
1862 for(Int_t i=0; i<fgkhybridcompnumber; i++)
1863 fssdhybridcomponent[i] = (TGeoVolume*)ssdhybridcomponentslist->At(i);
1864 /////////////////////////////////////////////////////////////
1865 // SSD Cooling Block System
1866 /////////////////////////////////////////////////////////////
1867 fssdcoolingblocksystem = GetCoolingBlockSystem();
1868 /////////////////////////////////////////////////////////////
1869 // SSD Cooling Tube
1870 /////////////////////////////////////////////////////////////
1871 TList* coolingtubelist = GetCoolingTubeList();
1872 for(Int_t i=0; i<fgkcoolingtubenumber; i++)
1873 fcoolingtube[i] = (TGeoVolume*)coolingtubelist->At(i);
1874 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
1875 fendladdercoolingtube[i] =
1876 (TGeoVolume*)coolingtubelist->At(fgkcoolingtubenumber+i);
1877 /////////////////////////////////////////////////////////////
1878 // SSD Flex
1879 /////////////////////////////////////////////////////////////
1880 fssdstiffenerflex = GetSSDStiffenerFlex();
1881 fssdendflex = GetSSDEndFlex();
1882 ///////////////////////////////////
1883 // End Ladder Carbon Fiber Junction
1884 ///////////////////////////////////
1885 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++)
1886 fendladdercarbonfiberjunction[i] =
1887 new TGeoVolume*[fgkendlabbercarbonfiberjunctionumber];
1888 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
1889 fendladdercarbonfiberjunction[i][0] =
1890 GetCarbonFiberJunction(fgkEndLadderCarbonFiberLowerJunctionLength[i]-fgkSSDTolerance);
1891 fendladdercarbonfiberjunction[i][1] =
1892 GetCarbonFiberJunction(fgkEndLadderCarbonFiberUpperJunctionLength[i]-fgkSSDTolerance);
1893 }
1894 ///////////////////////////////////
1895 // End Ladder Mounting Block
1896 ///////////////////////////////////
1897 fendladdermountingblock = GetSSDMountingBlock();
1898 ///////////////////////////////////
1899 // End Ladder Mounting Block
1900 ///////////////////////////////////
1901 fendladdermountingblockclip = GetMountingBlockClip();
1902 ///////////////////////////////////
1903 // Ladder Support
1904 ///////////////////////////////////
1905 TList* laddersupportlist = GetMountingBlockSupport(20);
1906 fLay5LadderSupport[0] = (TGeoVolume*)laddersupportlist->At(0);
1907 fLay5LadderSupport[1] = (TGeoVolume*)laddersupportlist->At(1);
1908 fLay6LadderSupport[0] = (TGeoVolume*)laddersupportlist->At(2);
1909 fLay6LadderSupport[1] = (TGeoVolume*)laddersupportlist->At(3);
1910 /////////////////////////////////////////////////////////////
1911 // Deallocating memory
1912 /////////////////////////////////////////////////////////////
1913 delete carbonfibersupportlist;
1914 delete carbonfiberlowersupportlist;
1915 delete ssdhybridcomponentslist;
1916 delete laddersupportlist;
1917 /////////////////////////////////////////////////////////////
1918 fBasicObjects = kTRUE;
1919}
1920/////////////////////////////////////////////////////////////////////////////////
1921void AliITSv11GeometrySSD::SetSSDSensor(){
1922 ////////////////////////////////////////////////////////////////
1923 // Method generating SSD Sensors: it sets the private variables
1924 // fSSDSensor5, fSSDSensor6
1925 ////////////////////////////////////////////////////////////////
1926 Double_t ssdsensitivelength = fgkSSDSensorLength-2.*fgkSSDSensorInsensitiveLength;
1927 Double_t ssdsensitivewidth = fgkSSDSensorWidth-2.*fgkSSDSensorInsensitiveWidth;
1928 TGeoBBox* ssdsensorsensitiveshape = new TGeoBBox("SSDSensorSensitiveShape",
1929 0.5*ssdsensitivewidth,
1930 0.5*fgkSSDSensorHeight,
1931 0.5*ssdsensitivelength);
1932 TGeoVolume* ssdsensorsensitiveLay5 =
1933 new TGeoVolume(fgSSDsensitiveVolName5,ssdsensorsensitiveshape,fSSDSensorMedium);
1934 TGeoVolume* ssdsensorsensitiveLay6 =
1935 new TGeoVolume(fgSSDsensitiveVolName6,ssdsensorsensitiveshape,fSSDSensorMedium);
1936 ssdsensorsensitiveLay5->SetLineColor(fColorSilicon);
1937 ssdsensorsensitiveLay6->SetLineColor(fColorSilicon);
1938 TGeoBBox* ssdsensorinsensitiveshape[2];
1939 ssdsensorinsensitiveshape[0] = new TGeoBBox("SSDSensorInsensitiveShape1",
1940 0.5*fgkSSDSensorInsensitiveWidth,
1941 0.5*fgkSSDSensorHeight,
1942 0.5*fgkSSDSensorLength);
1943 ssdsensorinsensitiveshape[1] = new TGeoBBox("SSDSensorInsensitiveShape2",
1944 0.5*ssdsensitivewidth,
1945 0.5*fgkSSDSensorHeight,
1946 0.5*fgkSSDSensorInsensitiveWidth);
1947 const char* ssdsensorinsensitivename[2] = {"SSDSensorInsensitive1",
1948 "SSDSensorInsensitive2"};
1949 TGeoVolume* ssdsensorinsensitive[2];
1950 for(Int_t i=0; i<2; i++){ ssdsensorinsensitive[i] =
1951 new TGeoVolume(ssdsensorinsensitivename[i],ssdsensorinsensitiveshape[i],
1952 fSSDSensorMedium);
1953 ssdsensorinsensitive[i]->SetLineColor(fColorCarbonFiber);
1954 }
1955 /////////////////////////////////////////////////////////////
1956 // Virtual Volume containing SSD Sensor
1957 /////////////////////////////////////////////////////////////
1958 TGeoBBox* virtualSSDSensorShape = new TGeoBBox("SSDSensorShape",
1959 0.5*fgkSSDSensorWidth,
1960 0.5*fgkSSDSensorHeight,
1961 0.5*fgkSSDSensorLength);
1962 fSSDSensor5 = new TGeoVolume("ITSssdSensor5",virtualSSDSensorShape,
1963 fSSDAir);
1964 fSSDSensor6 = new TGeoVolume("ITSssdSensor6",virtualSSDSensorShape,
1965 fSSDAir);
1966 /////////////////////////////////////////////////////////////
1967 for(Int_t i=0; i<4; i++){
1968 fSSDSensor5->AddNode(i%2==0 ? ssdsensorinsensitive[0]:
1969 ssdsensorinsensitive[1],i<2?1:2,
1970 new TGeoTranslation(
1971 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1972 * (ssdsensorsensitiveshape->GetDX()+ssdsensorinsensitiveshape[0]->GetDX()),0.,
1973 0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1974 * (ssdsensorsensitiveshape->GetDZ()+ssdsensorinsensitiveshape[1]->GetDZ())));
1975 fSSDSensor6->AddNode(i%2==0 ? ssdsensorinsensitive[0]:
1976 ssdsensorinsensitive[1],i<2?1:2,
1977 new TGeoTranslation(
1978 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1979 * (ssdsensorsensitiveshape->GetDX()+ssdsensorinsensitiveshape[0]->GetDX()),0.,
1980 0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1981 * (ssdsensorsensitiveshape->GetDZ()+ssdsensorinsensitiveshape[1]->GetDZ())));
1982 }
1983 fSSDSensor5->AddNode(ssdsensorsensitiveLay5,1);
1984 fSSDSensor6->AddNode(ssdsensorsensitiveLay6,1);
1985}
1986///////////////////////////////////////////////////////////////////////////////
1987TList* AliITSv11GeometrySSD::GetCarbonFiberSupportList(){
1988 /////////////////////////////////////////////////////////////
1989 // Method generating the Carbon Fiber Support
1990 /////////////////////////////////////////////////////////////
1991 const Int_t kvertexnumber = 4;
1992 const Int_t kshapesnumber = 2;
1993 TVector3** vertexposition[kshapesnumber];
1994 for(Int_t i=0; i<kshapesnumber; i++) vertexposition[i] = new TVector3*[kvertexnumber];
1995 Double_t carbonfibersupportxaxisEdgeproj =
1996 fgkCarbonFiberSupportEdgeLength*TMath::Cos(fgkCarbonFiberJunctionAngle[0]
1997 * TMath::DegToRad());
1998 Double_t theta = TMath::ATan(fgkCarbonFiberSupportYAxisLength
1999 / fgkCarbonFiberSupportXAxisLength);
2000 /////////////////////
2001 //Vertex Positioning
2002 ////////////////////
2003 vertexposition[0][0] = new TVector3();
2004 vertexposition[0][1] = new TVector3(fgkCarbonFiberSupportXAxisLength,
2005 fgkCarbonFiberSupportYAxisLength);
2006 vertexposition[0][2] = new TVector3(carbonfibersupportxaxisEdgeproj,
2007 carbonfibersupportxaxisEdgeproj
2008 * TMath::Tan(theta));
2009 vertexposition[0][3] = new TVector3(fgkCarbonFiberSupportXAxisLength
2010 - carbonfibersupportxaxisEdgeproj,
2011 fgkCarbonFiberSupportYAxisLength
2012 - vertexposition[0][2]->Y());
2013 ////////////////////////////////////////////////////
2014 //Setting the parameters for Isometry Transformation
2015 ////////////////////////////////////////////////////
2016 Double_t symmetryplaneposition = (fgkCarbonFiberSupportYAxisLength
2017 + fgkCarbonFiberSupportTopEdgeDist[0]
2018 + fgkCarbonFiberSupportWidth);
2019 Double_t* param = new Double_t[4];
2020 param[0] = 0., param[1] = 1., param[2] = 0., param[3] = -symmetryplaneposition;
2021 for(Int_t j=0; j<kvertexnumber; j++) vertexposition[1][j] =
2022 new TVector3((GetReflection(vertexposition[0][j],param))->X(),
2023 (GetReflection(vertexposition[0][j],param))->Y());
2024 const char* carbonfibersupportshapename[kshapesnumber] =
2025 {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
2026 const char* carbonfibersupportname[kshapesnumber] =
2027 {"CarbonFiberSupport1","CarbonFiberSupport2"};
2028 TGeoArb8* carbonfibersupportshape[kshapesnumber];
2029 TGeoVolume* carbonfibersupport[kshapesnumber];
2030 TList* carbonfibersupportlist = new TList();
2031 Double_t width[2] = {fgkCarbonFiberSupportWidth,fgkCarbonFiberSupportWidth};
2032 Double_t carbonfibersupportheight =
2033 carbonfibersupportxaxisEdgeproj*TMath::Tan(fgkCarbonFiberJunctionAngle[0]
2034 *TMath::DegToRad());
2035 for(Int_t i = 0; i< kshapesnumber; i++){
2036 carbonfibersupportshape[i] =
2037 GetArbShape(vertexposition[i],width,carbonfibersupportheight,
2038 carbonfibersupportshapename[i],i==0 ? 1: -1);
2039 carbonfibersupport[i] = new TGeoVolume(carbonfibersupportname[i],
2040 carbonfibersupportshape[i],fSSDCarbonFiberMedium);
2041 carbonfibersupport[i]->SetLineColor(fColorCarbonFiber);
2042 carbonfibersupportlist->Add(carbonfibersupport[i]);
2043 }
2044 /////////////////////////////////////////////////////////////
2045 // Deallocating memory
2046 /////////////////////////////////////////////////////////////
2047 for(Int_t i=0; i< kshapesnumber; i++){
2048 for(Int_t j=0; j< kvertexnumber; j++)
2049 delete vertexposition[i][j];
2050 delete [] vertexposition[i];
2051 }
2052 delete [] param;
2053 /////////////////////////////////////////////////////////////
2054 return carbonfibersupportlist;
2055}
2056/////////////////////////////////////////////////////////////////////////////////
2057TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){
2058 /////////////////////////////////////////////////////////////
2059 // Method generating SSD Carbon Fiber Junction
2060 /////////////////////////////////////////////////////////////
2061 const Int_t kvertexnumber = 6;
2062 TGeoXtru* carbonfiberjunctionshape = new TGeoXtru(2);
2063 Double_t reflectionparam[4] = {TMath::Tan(fgkCarbonFiberJunctionAngle[0]
2064 * TMath::DegToRad()),-1.,0.,0.};
2065 TVector3* vertex[kvertexnumber];
2066 vertex[0] = new TVector3();
2067 vertex[3] = new TVector3(fgkCarbonFiberJunctionEdge[0]
2068 * TMath::Cos(fgkCarbonFiberJunctionAngle[0]
2069 * TMath::DegToRad()),
2070 fgkCarbonFiberJunctionEdge[0]
2071 * TMath::Sin(fgkCarbonFiberJunctionAngle[0]
2072 * TMath::DegToRad()));
2073 vertex[4] = new TVector3(fgkCarbonFiberJunctionLength,
2074 fgkCarbonFiberJunctionEdge[1]);
2075 vertex[5] = new TVector3(fgkCarbonFiberJunctionLength);
2076 vertex[1] = GetReflection(vertex[5],reflectionparam);
2077 vertex[2] = GetReflection(vertex[4],reflectionparam);
2078 Double_t xvertexpoints[6], yvertexpoints[6];
2079 for(Int_t i=0; i<kvertexnumber; i++)
2080 xvertexpoints[i] = vertex[i]->X(), yvertexpoints[i] = vertex[i]->Y();
2081 carbonfiberjunctionshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
2082 carbonfiberjunctionshape->DefineSection(0,-0.5*width);
2083 carbonfiberjunctionshape->DefineSection(1,0.5*width);
2084 TGeoVolume* carbonfiberjunction = new TGeoVolume("CarbonFiberJunction",
2085 carbonfiberjunctionshape,fSSDCarbonFiberMedium);
2086 carbonfiberjunction->SetLineColor(fColorCarbonFiber);
2087 /////////////////////////////////////////////////////////////
2088 // Deallocating memory
2089 /////////////////////////////////////////////////////////////
2090 for (Int_t i=0; i<kvertexnumber; i++) delete vertex[i];
2091 /////////////////////////////////////////////////////////////
2092 return carbonfiberjunction;
2093}
2094////////////////////////////////////////////////////////////////////////////////
2095TList* AliITSv11GeometrySSD::GetCarbonFiberLowerSupportList(){
2096 /////////////////////////////////////////////////////////////
2097 // Method generating the Carbon Fiber Lower Support
2098 /////////////////////////////////////////////////////////////
2099 const Int_t kvertexnumber = 4;
2100 const Int_t kshapesnumber = 2;
2101 Double_t width[2] = {fgkCarbonFiberLowerSupportWidth,
2102 fgkCarbonFiberLowerSupportWidth};
2103 TVector3** vertexposition[kshapesnumber];
2104 for(Int_t i = 0; i<kshapesnumber; i++) vertexposition[i] =
2105 new TVector3*[kvertexnumber];
2106 //First Shape Vertex Positioning
2107 vertexposition[0][0] = new TVector3(fgkCarbonFiberLowerSupportLowerLenght);
2108 vertexposition[0][1] = new TVector3(fgkCarbonFiberTriangleLength
2109 - fgkCarbonFiberLowerSupportLowerLenght);
2110 vertexposition[0][2] = new TVector3();
2111 vertexposition[0][3] = new TVector3(fgkCarbonFiberTriangleLength);
2112 //Second Shape Vertex Positioning
2113 Double_t theta = TMath::ATan((fgkCarbonFiberLowerSupportVolumePosition[1]
2114 - fgkCarbonFiberLowerSupportVolumePosition[0])
2115 / fgkCarbonFiberTriangleLength);
2116 vertexposition[1][0] = new TVector3(vertexposition[0][0]->X(),
2117 vertexposition[0][0]->X()*TMath::Tan(theta)
2118 + fgkCarbonFiberLowerSupportVolumePosition[0]);
2119 vertexposition[1][1] = new TVector3(vertexposition[0][1]->X(),
2120 vertexposition[0][1]->X()*TMath::Tan(theta)
2121 + fgkCarbonFiberLowerSupportVolumePosition[0]);
2122 vertexposition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
2123 vertexposition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
2124 fgkCarbonFiberLowerSupportVolumePosition[1]);
2125 const char* carbonfiberlowersupportshapename[kshapesnumber] =
2126 {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
2127 const char* carbonfiberlowersupportname[kshapesnumber] =
2128 {"CarbonFiberLowerSupport1","CarbonFiberLowerSupport2"};
2129 TGeoArb8* carbonfiberlowersupportshape[kshapesnumber];
2130 TGeoVolume* carbonfiberlowersupport[kshapesnumber];
2131 TList* carbonfiberlowersupportlist = new TList();
2132 for(Int_t i = 0; i< kshapesnumber; i++){
2133 carbonfiberlowersupportshape[i] =
2134 GetArbShape(vertexposition[i],width,
2135 fgkCarbonFiberLowerSupportHeight,
2136 carbonfiberlowersupportshapename[i]);
2137 carbonfiberlowersupport[i] = new TGeoVolume(carbonfiberlowersupportname[i],
2138 carbonfiberlowersupportshape[i],fSSDCarbonFiberMedium);
2139 carbonfiberlowersupport[i]->SetLineColor(fColorCarbonFiber);
2140 carbonfiberlowersupportlist->Add(carbonfiberlowersupport[i]);
2141 }
2142 /////////////////////////////////////////////////////////////
2143 // Deallocating memory
2144 /////////////////////////////////////////////////////////////
2145 for(Int_t i=0; i< kshapesnumber; i++){
2146 for(Int_t j=0; j< kvertexnumber; j++)
2147 delete vertexposition[i][j];
2148 delete [] vertexposition[i];
2149 }
2150 /////////////////////////////////////////////////////////////
2151 return carbonfiberlowersupportlist;
2152}
2153///////////////////////////////////////////////////////////////////////////////
2154TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Double_t length, Double_t height,
2155 Double_t width, Double_t* thickness)const{
2156 /////////////////////////////////////////////////////////////
2157 // Method generating the Sensor Support
2158 /////////////////////////////////////////////////////////////
2159 const Int_t kvertexnumber = 6;
2160 TGeoXtru* ssdsensorsupportshape = new TGeoXtru(2);
2161 TVector3* vertexposition[kvertexnumber];
2162 vertexposition[0] = new TVector3();
2163 vertexposition[1] = new TVector3(0.0,length);
2164 vertexposition[2] = new TVector3(thickness[1],vertexposition[1]->Y());
2165 vertexposition[3] = new TVector3(vertexposition[2]->X(),thickness[0]);
2166 vertexposition[4] = new TVector3(height,vertexposition[3]->Y());
2167 vertexposition[5] = new TVector3(vertexposition[4]->X());
2168 Double_t xvertexpoints[6], yvertexpoints[6];
2169 for(Int_t i=0; i<kvertexnumber; i++)
2170 xvertexpoints[i] = vertexposition[i]->X(),
2171 yvertexpoints[i] = vertexposition[i]->Y();
2172 ssdsensorsupportshape->DefinePolygon(kvertexnumber,xvertexpoints,yvertexpoints);
2173 ssdsensorsupportshape->DefineSection(0,-0.5*width);
2174 ssdsensorsupportshape->DefineSection(1,0.5*width);
2175 TGeoVolume* ssdsensorsupport = new TGeoVolume("SSDSensorSupport",
2176 ssdsensorsupportshape,fSSDSensorSupportMedium);
2177 /////////////////////////////////////////////////////////////
2178 // Deallocating memory
2179 /////////////////////////////////////////////////////////////
2180 for (Int_t i=0; i<kvertexnumber; i++)
2181 delete vertexposition[i];
2182 /////////////////////////////////////////////////////////////
2183 return ssdsensorsupport;
2184}
2185////////////////////////////////////////////////////////////////////////////////
2186TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(Int_t nedges){
2187 /////////////////////////////////////////////////////////////
2188 // Method generating the Cooling Tube Support
2189 /////////////////////////////////////////////////////////////
2190 if(nedges%2!=0) nedges--;
2191 const Int_t kvertexnumber = nedges+5;
2192 Double_t phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
2193 / fgkCoolingTubeSupportRmax)*TMath::RadToDeg();
2194 Double_t angle = 90.+phi;
2195 Double_t psi = 90.-phi;
2196 ///////////////////////////////////////
2197 // Vertex Positioning for TGeoXTru
2198 ///////////////////////////////////////
2199 TVector3** vertexposition = new TVector3*[kvertexnumber];
2200 vertexposition[0] = new TVector3(fgkCoolingTubeSupportRmin*CosD(angle),
2201 fgkCoolingTubeSupportRmin*SinD(angle));
2202 vertexposition[1] = new TVector3(fgkCoolingTubeSupportRmax*CosD(angle),
2203 fgkCoolingTubeSupportRmax*SinD(angle));
2204 vertexposition[2] = new TVector3(vertexposition[1]->X(),
2205 fgkCoolingTubeSupportRmax);
2206 vertexposition[3] = new TVector3(-vertexposition[1]->X(),
2207 fgkCoolingTubeSupportRmax);
2208 vertexposition[4] = new TVector3(-vertexposition[1]->X(),
2209 vertexposition[1]->Y());
2210 for(Int_t i=0; i<nedges; i++)
2211 vertexposition[i+5] =
2212 new TVector3(fgkCoolingTubeSupportRmin*CosD(psi+i*(2.*phi/nedges)),
2213 fgkCoolingTubeSupportRmin*SinD(psi+i*(2.*phi/nedges)));
2214 ///////////////////////////////////////////////////////////////////////
2215 // TGeoXTru Volume definition for Cooling Tube Support Arc Part
2216 ///////////////////////////////////////////////////////////////////////
2217 TGeoXtru* coolingtubesupportarcshape = new TGeoXtru(2);
2218 Double_t* xvertexpoints = new Double_t[kvertexnumber];
2219 Double_t* yvertexpoints = new Double_t[kvertexnumber];
2220 for(Int_t i=0; i<kvertexnumber; i++){
2221 xvertexpoints[i] = vertexposition[i]->X();
2222 yvertexpoints[i] = vertexposition[i]->Y();
2223 }
2224 coolingtubesupportarcshape->DefinePolygon(kvertexnumber,xvertexpoints,
2225 yvertexpoints);
2226 coolingtubesupportarcshape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
2227 coolingtubesupportarcshape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
2228 TGeoVolume* coolingtubesupportarc = new TGeoVolume("CoolingTubeSupportArc",
2229 coolingtubesupportarcshape,
2230 fSSDTubeHolderMedium);
2231 coolingtubesupportarc->SetLineColor(fColorG10);
2232 //////////////////////////////////////////////////////////////////////////
2233 // TGeoTubeSeg Volume definition for Cooling Tube Support TGeoTubeSeg Part
2234 //////////////////////////////////////////////////////////////////////////
2235 TGeoTubeSeg* coolingtubesupportsegshape =
2236 new TGeoTubeSeg(fgkCoolingTubeSupportRmin,
2237 fgkCoolingTubeSupportRmax,
2238 0.5*fgkCoolingTubeSupportWidth,
2239 phi,360-phi);
2240 TGeoVolume* coolingtubesupportseg = new TGeoVolume("CoolingTubeSupportSeg",
2241 coolingtubesupportsegshape,
2242 fSSDTubeHolderMedium);
2243 coolingtubesupportseg->SetLineColor(fColorG10);
2244 //////////////////////////////////////////////////////////////////////////
2245 // TGeoBBox Volume definition for Cooling Tube Support Box Part
2246 //////////////////////////////////////////////////////////////////////////
2247 Double_t* boxorigin = new Double_t[3];
2248 Double_t boxlength = fgkCoolingTubeSupportLength-2.*fgkCoolingTubeSupportRmax;
2249 boxorigin[0] = fgkCoolingTubeSupportRmax+0.5*boxlength, boxorigin[1] = boxorigin[2] = 0.;
2250 TGeoBBox* coolingtubesupportboxshape = new TGeoBBox(0.5*boxlength,
2251 0.5*fgkCoolingTubeSupportHeight,
2252 0.5*fgkCoolingTubeSupportWidth,boxorigin);
2253 TGeoVolume* coolingtubesupportbox = new TGeoVolume("CoolingTubeSupportBox",
2254 coolingtubesupportboxshape,fSSDTubeHolderMedium);
2255 coolingtubesupportbox->SetLineColor(fColorG10);
2256 //////////////////////////////////////////////////////////////////////////
2257 // Cooling Tube for Cooling Tube Support
2258 //////////////////////////////////////////////////////////////////////////
2259 TGeoXtru* coolingtubearcshape[2];
2260 coolingtubearcshape[0] = new TGeoXtru(2);
2261 Double_t* xvert = new Double_t[nedges+2];
2262 Double_t* yvert = new Double_t[nedges+2];
2263 Double_t ratio = fgkCoolingTubeRmin/fgkCoolingTubeSupportRmin;
2264 ////////////////////////////////////////
2265 // Positioning the vertices for TGeoXTru
2266 ////////////////////////////////////////
2267 xvert[0] = 0., yvert[0] = 0.;
2268 xvert[1] = vertexposition[0]->X()*ratio, yvert[1] = vertexposition[0]->Y()*ratio;
2269 for(Int_t i=0; i< nedges; i++)
2270 xvert[i+2] = vertexposition[kvertexnumber-i-1]->X()*ratio,
2271 yvert[i+2] = vertexposition[kvertexnumber-i-1]->Y()*ratio;
2272 ////////////////////////////////////////
2273 // Defining TGeoXTru PolyGone
2274 ////////////////////////////////////////
2275 coolingtubearcshape[0]->DefinePolygon(nedges+2,xvert,yvert);
2276 coolingtubearcshape[0]->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
2277 coolingtubearcshape[0]->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
2278 coolingtubearcshape[1] = GetArcShape(2.*phi,fgkCoolingTubeRmin,
2279 fgkCoolingTubeRmax,nedges,fgkCoolingTubeSupportWidth);
2280 TGeoVolume* coolingtubearc[2];
2281 coolingtubearc[0] = new TGeoVolume("CoolingTubeWaterArcPart",
2282 coolingtubearcshape[0],fSSDCoolingTubeWater);
2283 coolingtubearc[1] = new TGeoVolume("CoolingTubePhynoxArcPart",
2284 coolingtubearcshape[1],fSSDCoolingTubePhynox);
2285 coolingtubearc[0]->SetLineColor(fColorWater);
2286 coolingtubearc[1]->SetLineColor(fColorPhynox);
2287 ////////////////////////////////////////////
2288 // Defining TGeoTubeSeg Part of Cooling Tube
2289 ////////////////////////////////////////////
2290 TGeoTubeSeg* coolingtubesegshape[2];
2291 coolingtubesegshape[0] = new TGeoTubeSeg(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2292 0.5*fgkCoolingTubeSupportWidth,phi,360-phi);
2293 coolingtubesegshape[1] = new TGeoTubeSeg(0.,fgkCoolingTubeRmin,
2294 0.5*fgkCoolingTubeSupportWidth,phi,360-phi);
2295 TGeoVolume* coolingtubeseg[2];
2296 coolingtubeseg[0] = new TGeoVolume("CoolingTubePhynoxPart",
2297 coolingtubesegshape[0],fSSDCoolingTubePhynox);
2298 coolingtubeseg[1] = new TGeoVolume("CoolingTubeWaterPart",
2299 coolingtubesegshape[1],fSSDCoolingTubeWater);
2300 coolingtubeseg[0]->SetLineColor(fColorPhynox);
2301 coolingtubeseg[1]->SetLineColor(fColorWater);
2302 /////////////////////////////////////////////////////////////
2303 // Virtual Volume containing Cooling Tube Support
2304 /////////////////////////////////////////////////////////////
2305 TGeoXtru* virtualCoolingTubeSupportShape = new TGeoXtru(2);
2306 const Int_t kvirtualvertexnumber = 8;
2307 TVector3* virtualvertex[kvirtualvertexnumber];
2308 ////////////////////////////////////////
2309 // Positioning the vertices for TGeoXTru
2310 ////////////////////////////////////////
2311 virtualvertex[0] = new TVector3(-fgkCoolingTubeSupportRmax,-fgkCoolingTubeSupportRmax);
2312 virtualvertex[1] = new TVector3(virtualvertex[0]->X(),-virtualvertex[0]->Y());
2313 virtualvertex[2] = new TVector3(-virtualvertex[0]->X(),virtualvertex[1]->Y());
2314 virtualvertex[3] = new TVector3(virtualvertex[2]->X(),0.5*fgkCoolingTubeSupportHeight);
2315 virtualvertex[4] = new TVector3(virtualvertex[3]->X()+boxlength,virtualvertex[3]->Y());
2316 virtualvertex[5] = new TVector3(virtualvertex[4]->X(),-virtualvertex[4]->Y());
2317 virtualvertex[6] = new TVector3(virtualvertex[3]->X(),-virtualvertex[3]->Y());
2318 virtualvertex[7] = new TVector3(virtualvertex[2]->X(),-virtualvertex[2]->Y());
2319 Double_t xmothervertex[kvirtualvertexnumber], ymothervertex[kvirtualvertexnumber];
2320 for(Int_t i=0; i< kvirtualvertexnumber; i++)
2321 xmothervertex[i] = virtualvertex[i]->X(),
2322 ymothervertex[i] = virtualvertex[i]->Y();
2323 ////////////////////////////////////////
2324 // Defining TGeoXTru PolyGone
2325 ////////////////////////////////////////
2326 virtualCoolingTubeSupportShape->DefinePolygon(kvirtualvertexnumber,xmothervertex,
2327 ymothervertex);
2328 virtualCoolingTubeSupportShape->DefineSection(0,-0.5*fgkCoolingTubeSupportWidth);
2329 virtualCoolingTubeSupportShape->DefineSection(1,0.5*fgkCoolingTubeSupportWidth);
2330 TGeoVolume* virtualcoolingtubesupport = new TGeoVolume("CoolingTubeSupport",
2331 virtualCoolingTubeSupportShape,fSSDAir);
2332 ////////////////////////////////////////
2333 // Positioning Volumes in Virtual Volume
2334 ////////////////////////////////////////
2335 TGeoRotation* coolingtubesupportrot = new TGeoRotation();
2336 coolingtubesupportrot->SetAngles(-90.0,0.0,0.0);
2337 virtualcoolingtubesupport->AddNode(coolingtubesupportarc,1,coolingtubesupportrot);
2338 virtualcoolingtubesupport->AddNode(coolingtubesupportbox,1);
2339 virtualcoolingtubesupport->AddNode(coolingtubesupportseg,1);
2340 virtualcoolingtubesupport->AddNode(coolingtubearc[0],1,coolingtubesupportrot);
2341 virtualcoolingtubesupport->AddNode(coolingtubearc[1],1,coolingtubesupportrot);
2342 virtualcoolingtubesupport->AddNode(coolingtubeseg[0],1);
2343 virtualcoolingtubesupport->AddNode(coolingtubeseg[1],1);
2344 /////////////////////////////////////////////////////////////
2345 // Deallocating memory
2346 /////////////////////////////////////////////////////////////
2347 delete [] vertexposition;
2348 delete [] xvertexpoints;
2349 delete [] yvertexpoints;
2350 delete [] xvert;
2351 delete [] yvert;
2352 for(Int_t i=0; i< kvirtualvertexnumber; i++)
2353 delete virtualvertex[i];
2354 /////////////////////////////////////////////////////////////
2355 return virtualcoolingtubesupport;
2356}
2357/////////////////////////////////////////////////////////////////////////////////
2358TList* AliITSv11GeometrySSD::GetSSDHybridParts(){
2359 /////////////////////////////////////////////////////////////
2360 // Method generating List containing SSD Hybrid Components
2361 /////////////////////////////////////////////////////////////
2362 TList* ssdhybridlist = new TList();
2363 const Int_t kssdstiffenernumber = 2;
2364 Double_t ssdstiffenerseparation = fgkSSDSensorLength
2365 - 2.*fgkSSDModuleStiffenerPosition[1]
2366 - fgkSSDStiffenerWidth;
2367 Double_t ssdchipcablesradius[kssdstiffenernumber];
2368 for(Int_t i=0; i<kssdstiffenernumber; i++)
2369 ssdchipcablesradius[i] = 0.25*(fgkSSDChipCablesHeight[i+2]
2370 - fgkSSDChipCablesHeight[0]
2371 - fgkSSDChipCablesHeight[1]);
2372 /////////////////////////////////////////////////////////////
2373 // Mother Volumes Containers
2374 /////////////////////////////////////////////////////////////
2375 const Int_t kmothernumber = 2;
2376 const Int_t kmothervertexnumber = 12;
2377 Double_t xmothervertex[kmothernumber][kmothervertexnumber];
2378 Double_t ymothervertex[kmothernumber][kmothervertexnumber];
2379 ///////////////////////
2380 // Setting the vertices
2381 ///////////////////////
2382 xmothervertex[0][0] = -0.5*fgkSSDStiffenerLength;
2383 xmothervertex[0][1] = xmothervertex[0][0];
2384 xmothervertex[0][2] = fgkSSDFlexLength[0]-0.5*fgkSSDStiffenerLength;
2385 xmothervertex[0][3] = xmothervertex[0][2];
2386 xmothervertex[0][4] = xmothervertex[0][0];
2387 xmothervertex[0][5] = xmothervertex[0][4];
2388 xmothervertex[0][6] = -xmothervertex[0][0];
2389 xmothervertex[0][7] = xmothervertex[0][6];
2390 xmothervertex[0][8] = -xmothervertex[0][2];
2391 xmothervertex[0][9] = xmothervertex[0][8];
2392 xmothervertex[0][10] = xmothervertex[0][7];
2393 xmothervertex[0][11] = xmothervertex[0][10];
2394 for(Int_t i=0; i<kmothervertexnumber; i++) xmothervertex[1][i] = xmothervertex[0][i];
2395 for(Int_t i = 0; i<kmothernumber; i++){
2396 ymothervertex[i][0] = -(fgkSSDChipWidth-(0.5*fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist)
2397 + ssdchipcablesradius[i]+fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2]);
2398 ymothervertex[i][1] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexWidth[0];
2399 ymothervertex[i][2] = ymothervertex[i][1];
2400 ymothervertex[i][3] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth;
2401 ymothervertex[i][4] = ymothervertex[i][3];
2402 ymothervertex[i][5] = ymothervertex[i][4]+0.5*fgkSSDStiffenerWidth-ymothervertex[i][0];
2403 ymothervertex[i][6] = ymothervertex[i][5];
2404 ymothervertex[i][7] = 0.5*fgkSSDStiffenerWidth+fgkSSDFlexWidth[0];
2405 ymothervertex[i][8] = ymothervertex[i][7];
2406 ymothervertex[i][9] = 0.5*fgkSSDStiffenerWidth;
2407 ymothervertex[i][10] = ymothervertex[i][9];
2408 ymothervertex[i][11] = ymothervertex[i][0];
2409 }
2410 TGeoXtru* ssdhybridmothershape[kmothernumber];
2411// TGeoVolume* ssdhybridmother[kmothernumber];
2412 TGeoVolumeAssembly* ssdhybridmother[kmothernumber];
2413 const char* ssdhybridmothername[kmothernumber] = {"SSDHybridMother1","SSDHybridMother2"};
2414 for(Int_t i=0; i<kmothernumber; i++){
2415 ssdhybridmothershape[i] = new TGeoXtru(2);
2416 ssdhybridmothershape[i]->DefinePolygon(kmothervertexnumber,xmothervertex[i],
2417 ymothervertex[i]);
2418 ssdhybridmothershape[i]->DefineSection(0,-0.5*fgkSSDStiffenerHeight-fgkSSDChipHeight
2419 -fgkSSDChipCablesHeight[i+2]);
2420 ssdhybridmothershape[i]->DefineSection(1, 0.5*fgkSSDStiffenerHeight);
2421// ssdhybridmother[i] = new TGeoVolume(ssdhybridmothername[i],ssdhybridmothershape[i],
2422// fSSDAir);
2423 ssdhybridmother[i] = new TGeoVolumeAssembly(ssdhybridmothername[i]);
2424 }
2425 /////////////////////////////////////////////////////////////
2426 // SSD Stiffener
2427 /////////////////////////////////////////////////////////////
2428 TGeoBBox* ssdstiffenershape = new TGeoBBox("SSDStiffenerShape",
2429 0.5*fgkSSDStiffenerLength,
2430 0.5*(fgkSSDStiffenerWidth-fgkSSDTolerance),
2431 0.5*fgkSSDStiffenerHeight);
2432 TGeoVolume* ssdstiffener = new TGeoVolume("SSDStiffener",ssdstiffenershape,
2433 fSSDStiffenerMedium);
2434 ssdstiffener->SetLineColor(fColorStiffener);
2435 TGeoTranslation* ssdstiffenertrans[kssdstiffenernumber];
2436 for(Int_t i=0; i<kssdstiffenernumber; i++)
2437 ssdstiffenertrans[i] = new TGeoTranslation(0.,i*ssdstiffenerseparation,0.);
2438 /////////////////////////////////////////////////////////////
2439 // SSD Chip System
2440 /////////////////////////////////////////////////////////////
2441 TList* ssdchipsystemlist = GetSSDChipSystem();
2442 Double_t ssdchipseparation = fgkSSDSensorLength
2443 - 2.*fgkSSDModuleStiffenerPosition[1]
2444 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
2445 - 0.5*fgkSSDChipWidth);
2446 Double_t ssdchipsystemlength = (fgkSSDChipNumber-1)*(fgkSSDChipLength
2447 + fgkSSDChipSeparationLength)+fgkSSDChipCablesLength[1];
2448 TGeoTranslation* ssdchipsystemtrans = new TGeoTranslation(0.5*fgkSSDChipCablesLength[1]
2449 - 0.5*ssdchipsystemlength,
2450 0.5*(ssdstiffenerseparation-ssdchipseparation),
2451 - 0.5*(fgkSSDChipHeight+fgkSSDStiffenerHeight));
2452////////////////////////////
2453// Capacitor 0603-2200 nF
2454///////////////////////////
2455 const Int_t knapacitor0603number = 5;
2456 TGeoBBox* capacitor0603shape = new TGeoBBox("Capacitor0603Shape",
2457 0.5*fgkSSDCapacitor0603Length,
2458 0.5*(fgkSSDCapacitor0603Width),
2459 0.5*fgkSSDCapacitor0603Height);
2460 TGeoVolume* capacitor0603 = new TGeoVolume("Capacitor0603",capacitor0603shape,
2461 fSSDStiffener0603CapacitorMedium);
2462 capacitor0603->SetLineColor(fColorAl);
2463 for(Int_t i=0; i<kmothernumber; i++){
2464 for(Int_t j=0; j<kssdstiffenernumber; j++){
2465 ssdhybridmother[i]->AddNode(ssdstiffener,j+1,ssdstiffenertrans[j]);
2466 for(Int_t k=1; k<knapacitor0603number+1; k++){
2467 ssdhybridmother[i]->AddNode(capacitor0603,knapacitor0603number*j+k,
2468 new TGeoTranslation((k-3.)/6*fgkSSDStiffenerLength,
2469 j*ssdstiffenerseparation
2470 + 0.5*((j==0? 1:-1)*fgkSSDStiffenerWidth
2471 + (j==0? -1:+1)*fgkSSDCapacitor0603Width),
2472 - 0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height)));
2473 }
2474 }
2475 ssdhybridmother[i]->AddNode((TGeoVolume*)ssdchipsystemlist->At(i),i+1,ssdchipsystemtrans);
2476 ssdhybridlist->Add(ssdhybridmother[i]);
2477 }
2478/////////////////////////////////////////////////////////////
2479// Mother Volume Containing Capacitor Part
2480/////////////////////////////////////////////////////////////
2481 const Int_t kcapacitormothernumber = 8;
2482 Double_t xcapacitorvertex[kcapacitormothernumber];
2483 Double_t ycapacitorvertex[kcapacitormothernumber];
2484 ///////////////////////
2485 // Setting the vertices
2486 ///////////////////////
2487 xcapacitorvertex[0] = -fgkSSDConnectorPosition[0]+ssdstiffenershape->GetDX();
2488 xcapacitorvertex[1] = xcapacitorvertex[0];
2489 xcapacitorvertex[2] = 0.5*fgkSSDFlexHoleWidth;
2490 xcapacitorvertex[3] = xcapacitorvertex[2];
2491 xcapacitorvertex[4] = xcapacitorvertex[0];
2492 xcapacitorvertex[5] = xcapacitorvertex[0];
2493 xcapacitorvertex[6] = -xcapacitorvertex[0];
2494 xcapacitorvertex[7] = xcapacitorvertex[6];
2495 ycapacitorvertex[0] = -0.5*fgkSSDStiffenerWidth;
2496 ycapacitorvertex[1] = ssdstiffenerseparation-0.5*fgkSSDStiffenerWidth-fgkSSDFlexHoleLength;
2497 ycapacitorvertex[2] = ycapacitorvertex[1];
2498 ycapacitorvertex[3] = ycapacitorvertex[2]+fgkSSDFlexHoleLength;
2499 ycapacitorvertex[4] = ycapacitorvertex[3];
2500 ycapacitorvertex[5] = ycapacitorvertex[4]+fgkSSDStiffenerWidth;
2501 ycapacitorvertex[6] = ycapacitorvertex[5];
2502 ycapacitorvertex[7] = ycapacitorvertex[0];
2503 TGeoXtru* ssdhybridcapacitormothershape = new TGeoXtru(2);
2504 ssdhybridcapacitormothershape->DefinePolygon(kcapacitormothernumber,xcapacitorvertex,
2505 ycapacitorvertex);
2506 ssdhybridcapacitormothershape->DefineSection(0,0.5*fgkSSDStiffenerHeight);
2507 ssdhybridcapacitormothershape->DefineSection(1, 0.5*fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height);
2508// TGeoVolume* ssdhybridcapacitormother = new TGeoVolume("SSDHybridCapacitorMother",ssdhybridcapacitormothershape,
2509// fSSDAir);
2510 TGeoVolumeAssembly* ssdhybridcapacitormother = new TGeoVolumeAssembly("SSDHybridCapacitorMother");
2511////////////////////////////
2512// Connector
2513///////////////////////////
2514 const Int_t kssdconnectornumber = 2;
2515 TGeoBBox* ssdconnectorshape[kssdconnectornumber];
2516 Double_t ssdAlconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorAlHeight)};
2517 Double_t ssdNiconnectororigin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDConnectorNiHeight)
2518 + fgkSSDConnectorAlHeight};
2519 const char* ssdconnectorname[kssdconnectornumber] = {"SSDConnectorAl","SSDConnectorNi"};
2520 TGeoVolume* ssdconnector[kssdconnectornumber];
2521 for(Int_t i=0; i<kssdconnectornumber; i++){
2522 ssdconnectorshape[i] = new TGeoBBox(0.5*fgkSSDConnectorLength,
2523 0.5*fgkSSDConnectorWidth,
2524 0.5*((1-i)*fgkSSDConnectorAlHeight
2525 + i*fgkSSDConnectorNiHeight),
2526 i==0? ssdAlconnectororigin : ssdNiconnectororigin);
2527 ssdconnector[i] = new TGeoVolume(ssdconnectorname[i],ssdconnectorshape[i],
2528 i==0 ? fSSDAlTraceFlexMedium
2529 : fSSDStiffenerConnectorMedium);
2530 ssdconnector[i]->SetLineColor(i==0 ? fColorAl : fColorPhynox);
2531 }
2532 TGeoTranslation* ssdconnectortrans[2*kssdconnectornumber];
2533 ssdconnectortrans[0] = new TGeoTranslation(-ssdstiffenershape->GetDX()
2534 + fgkSSDConnectorPosition[0]
2535 - fgkSSDConnectorSeparation
2536 - 1.5*fgkSSDConnectorLength,
2537 ssdstiffenerseparation+ssdstiffenershape->GetDY()
2538 - fgkSSDConnectorPosition[1]
2539 - ssdconnectorshape[0]->GetDY(),0.0);
2540 ssdconnectortrans[1] = new TGeoTranslation(
2541 - ssdstiffenershape->GetDX()
2542 + fgkSSDConnectorPosition[0]
2543 - 0.5*fgkSSDConnectorLength,
2544 ssdstiffenerseparation+ssdstiffenershape->GetDY()
2545 - fgkSSDConnectorPosition[1]
2546 - ssdconnectorshape[0]->GetDY(),0.0);
2547 ssdconnectortrans[2] = new TGeoTranslation(+ssdstiffenershape->GetDX()
2548 - fgkSSDConnectorPosition[0]
2549 + fgkSSDConnectorSeparation
2550 + 1.5*fgkSSDConnectorLength,
2551 -(ssdstiffenershape->GetDY()
2552 - fgkSSDConnectorPosition[1]
2553 - ssdconnectorshape[0]->GetDY()),0.0);
2554 ssdconnectortrans[3] = new TGeoTranslation(+ssdstiffenershape->GetDX()
2555 - fgkSSDConnectorPosition[0]
2556 + 0.5*fgkSSDConnectorLength,
2557 -(ssdstiffenershape->GetDY()
2558 - fgkSSDConnectorPosition[1]
2559 - ssdconnectorshape[0]->GetDY()),0.0);
2560 for(Int_t i=0; i<2*kssdconnectornumber; i++)
2561 for(Int_t j=0; j<kssdconnectornumber; j++)
2562 ssdhybridcapacitormother->AddNode(ssdconnector[j],i+1,ssdconnectortrans[i]);
2563////////////////////////////
2564// Capacitor 1812-330 nF
2565///////////////////////////
2566 Double_t ssdcapacitor1812origin[3] = {0.0,0.0,0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor1812Height)};
2567 TGeoBBox* capacitor1812shape = new TGeoBBox("Capacitor1812Shape",
2568 0.5*fgkSSDCapacitor1812Length,
2569 0.5*fgkSSDCapacitor1812Width,
2570 0.5*fgkSSDCapacitor1812Height,
2571 ssdcapacitor1812origin);
2572 TGeoVolume* capacitor1812 = new TGeoVolume("Capacitor1812",capacitor1812shape,
2573 fSSDStiffener1812CapacitorMedium);
2574 capacitor1812->SetLineColor(fColorAl);
2575 TGeoTranslation* capacitor1812trans = new TGeoTranslation(0.0,
2576 0.5*fgkSSDStiffenerWidth+ssdstiffenerseparation
2577 - capacitor1812shape->GetDY()-fgkSSDConnectorPosition[1],0.0);
2578 ssdhybridcapacitormother->AddNode(capacitor1812,1,capacitor1812trans);
2579////////////////////////////
2580//Hybrid Wire
2581////////////////////////////
2582 Double_t wirex = 2.*(fgkSSDConnectorPosition[0]-0.5*fgkSSDStiffenerLength
2583 - 0.5*fgkSSDConnectorLength)-fgkSSDConnectorLength
2584 - fgkSSDConnectorSeparation;
2585 Double_t wirey = ssdstiffenerseparation+fgkSSDStiffenerWidth
2586 - 2.*fgkSSDConnectorPosition[1]-fgkSSDConnectorWidth;
2587 Double_t ssdwireradius = TMath::Sqrt(wirex*wirex+wirey*wirey);
2588
2589 Double_t wireangle = TMath::ATan(wirex/wirey);
2590 TGeoTube *hybridwireshape = new TGeoTube("HybridWireShape", 0.,
2591 fgkSSDWireRadius, 0.5*ssdwireradius);
2592 TGeoVolume* hybridwire = new TGeoVolume("HybridWire",hybridwireshape,
2593 fSSDStiffenerHybridWireMedium);
2594 hybridwire->SetLineColor(fColorPhynox);
2595 TGeoCombiTrans* hybridwirecombitrans[2];
2596 hybridwirecombitrans[0] = new TGeoCombiTrans("HybridWireCombiTrans1",
2597 0.5*fgkSSDStiffenerLength-fgkSSDConnectorPosition[0]
2598 + 1.5*fgkSSDConnectorLength+fgkSSDConnectorSeparation,
2599 0.5*ssdwireradius-0.5*fgkSSDStiffenerWidth
2600 + fgkSSDConnectorPosition[1]+0.5*fgkSSDConnectorWidth,
2601 ssdstiffenershape->GetDZ()
2602 + fgkSSDWireRadius+fgkSSDConnectorAlHeight+fgkSSDConnectorNiHeight,
2603 new TGeoRotation("HybridWireRot1",0.,90.,0.));
2604 hybridwirecombitrans[1] = new TGeoCombiTrans("HybridWireCombiTrans2",
2605 0.0,
2606 - 0.5*fgkSSDConnectorWidth+fgkSSDWireRadius,
2607 0.0,
2608 new TGeoRotation("HybridWireRot2",
2609 - wireangle*TMath::RadToDeg(),0.,0.));
2610 TGeoHMatrix* hybridwirematrix = new TGeoHMatrix();
2611 hybridwirematrix->MultiplyLeft(hybridwirecombitrans[0]);
2612 hybridwirematrix->MultiplyLeft(hybridwirecombitrans[1]);
2613 ssdhybridcapacitormother->AddNode(hybridwire,1,hybridwirematrix);
2614 ssdhybridlist->Add(ssdhybridcapacitormother);
2615 /////////////////////////////////////////////////////////////
2616 // Deallocating memory
2617 /////////////////////////////////////////////////////////////
2618 delete hybridwirecombitrans[0];
2619 delete hybridwirecombitrans[1];
2620 delete ssdchipsystemlist;
2621 return ssdhybridlist;
2622 /////////////////////////////////////////////////////////////
2623}
2624///////////////////////////////////////////////////////////////////////////////
2625TGeoVolume* AliITSv11GeometrySSD::GetCoolingBlockSystem(){
2626 /////////////////////////////////////////////////////////////
2627 // SSD Cooling Block System
2628 /////////////////////////////////////////////////////////////
2629 // SSD Cooling Block and Cooling Tube Transformations
2630 /////////////////////////////////////////////////////////////
2631 TGeoRotation* localcoolingblockrot = new TGeoRotation();
2632 localcoolingblockrot->SetAngles(0.,90.,0.);
2633 TGeoCombiTrans localcoolingblockmatrix(0.,0.5*fgkSSDCoolingBlockWidth,0.,localcoolingblockrot);
2634 TVector3* coolingblocktransvector;
2635 coolingblocktransvector = new TVector3(fgkSSDModuleSensorSupportDistance
2636 + fgkSSDCoolingBlockLength,
2637 fgkSSDSensorLength
2638 - 2.*fgkSSDModuleStiffenerPosition[1]
2639 - fgkSSDCoolingBlockWidth);
2640 const Int_t kcoolingblocktransnumber = 2;
2641 const Int_t kcoolingblocknumber = 4;
2642 TGeoHMatrix* coolingblockmatrix[kcoolingblocknumber];
2643 TGeoHMatrix* coolingtubematrix[kcoolingblocknumber];
2644 TGeoRotation* localcoolingtuberot = new TGeoRotation();
2645 localcoolingtuberot->SetAngles(0.0,90.0,0.0);
2646 TGeoTranslation* localcoolingtubetrans = new TGeoTranslation();
2647 localcoolingtubetrans->SetTranslation(0.5*fgkSSDCoolingBlockLength,
2648 0.5*fgkSSDCoolingBlockWidth,
2649 fgkSSDCoolingBlockHoleCenter);
2650 TGeoCombiTrans localcoolingtubematrix (*localcoolingtubetrans,*localcoolingtuberot);
2651 Double_t coolingtubedistance = fgkCoolingTubeSupportRmax-fgkCoolingTubeSupportRmin;
2652 for(Int_t i=0; i<kcoolingblocktransnumber; i++){
2653 for(Int_t j=0; j<kcoolingblocktransnumber; j++){
2654 TGeoTranslation localcoolingblocktrans(i*coolingblocktransvector->X()+2*coolingtubedistance,
2655 j*coolingblocktransvector->Y(),
2656 - 0.5*(fgkSSDCoolingBlockHoleCenter
2657 + fgkCoolingTubeRmax));
2658 coolingblockmatrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingblockmatrix);
2659 coolingtubematrix[2*i+j] = new TGeoHMatrix(localcoolingblocktrans*localcoolingtubematrix);
2660 }
2661 }
2662 /////////////////////////////////////////////////////////////
2663 // Virtual Volume containing CoolingBlock System
2664 /////////////////////////////////////////////////////////////
2665 TGeoXtru* coolingsystemothershape = new TGeoXtru(2);
2666 const Int_t kmothervertexnumber = 16;
2667 Double_t xmothervertex[kmothervertexnumber];
2668 Double_t ymothervertex[kmothervertexnumber];
2669 ///////////////////////
2670 // Setting the vertices
2671 ///////////////////////fgkCoolingTubeSupportRmax
2672 xmothervertex[0] = 0.0,ymothervertex[0] = 0.0;
2673 xmothervertex[1] = xmothervertex[0], ymothervertex[1] = coolingblocktransvector->Y()
2674 + fgkSSDCoolingBlockWidth;
2675 xmothervertex[2] = coolingblocktransvector->X()
2676 + fgkSSDCoolingBlockLength
2677 + 4*coolingtubedistance;
2678 ymothervertex[2] = ymothervertex[1];
2679 xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0];
2680 xmothervertex[4] = xmothervertex[3]-2.*coolingtubedistance-fgkSSDCoolingBlockLength;
2681 ymothervertex[4] = ymothervertex[0];
2682 xmothervertex[5] = xmothervertex[4], ymothervertex[5] = fgkSSDCoolingBlockWidth;
2683 xmothervertex[6] = xmothervertex[3]-coolingtubedistance;
2684 ymothervertex[6] = ymothervertex[5];
2685 xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2]
2686 - fgkSSDCoolingBlockWidth;
2687 xmothervertex[8] = xmothervertex[5], ymothervertex[8] = ymothervertex[7];
2688 xmothervertex[9] = xmothervertex[8], ymothervertex[9] = ymothervertex[2]
2689 - coolingtubedistance;
2690 xmothervertex[10] = fgkSSDCoolingBlockLength+2.*coolingtubedistance;
2691 ymothervertex[10] = ymothervertex[9];
2692 xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[8];
2693 xmothervertex[12] = coolingtubedistance, ymothervertex[12] = ymothervertex[11];
2694 xmothervertex[13] = xmothervertex[12], ymothervertex[13] = fgkSSDCoolingBlockWidth;
2695 xmothervertex[14] = 2.*coolingtubedistance+fgkSSDCoolingBlockLength;
2696 ymothervertex[14] = ymothervertex[13];
2697 xmothervertex[15] = xmothervertex[14], ymothervertex[15] = ymothervertex[0];
2698 //////////////////////////////////////////////////////////
2699 coolingsystemothershape->DefinePolygon(kmothervertexnumber,
2700 xmothervertex,ymothervertex);
2701 coolingsystemothershape->DefineSection(0,-0.5*(fgkSSDCoolingBlockHoleCenter
2702 + fgkCoolingTubeRmax));
2703 coolingsystemothershape->DefineSection(1, 0.5*(fgkSSDCoolingBlockHoleCenter
2704 + fgkCoolingTubeRmax));
2705 TGeoVolume* coolingsystemother = new TGeoVolumeAssembly("CoolingBlockSystem");
2706// TGeoVolume* coolingsystemother = new TGeoVolume("CoolingBlockSystem",
2707// coolingsystemothershape,fSSDAir);
2708 /////////////////////////////////////////////////////////////
2709 // SSD Cooling Tube Part
2710 /////////////////////////////////////////////////////////////
2711 TGeoTube* coolingtubeshape[fgkcoolingtubenumber];
2712 coolingtubeshape[0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
2713 0.5*(fgkSSDCoolingBlockWidth-fgkSSDTolerance));
2714 coolingtubeshape[1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
2715 0.5*(fgkSSDCoolingBlockWidth-fgkSSDTolerance));
2716 TGeoVolume* coolingtube[fgkcoolingtubenumber];
2717 coolingtube[0] = new TGeoVolume("OuterCoolingTube",coolingtubeshape[0],
2718 fSSDCoolingTubePhynox);
2719 coolingtube[1] = new TGeoVolume("InnerCoolingTube",coolingtubeshape[1],
2720 fSSDCoolingTubeWater);
2721 coolingtube[0]->SetLineColor(fColorPhynox);
2722 coolingtube[1]->SetLineColor(fColorWater);
2723 TGeoVolume* ssdcoolingblock = GetSSDCoolingBlock(30);
2724 /////////////////////////////////////////////////////////////
2725 // Adding Cooling block to mother volume
2726 /////////////////////////////////////////////////////////////
2727 for(Int_t i=0; i<kcoolingblocknumber; i++){
2728 coolingsystemother->AddNode(ssdcoolingblock,i+1,coolingblockmatrix[i]);
2729 coolingsystemother->AddNode(coolingtube[0],i+1,coolingtubematrix[i]);
2730 coolingsystemother->AddNode(coolingtube[1],i+1,coolingtubematrix[i]);
2731 }
2732 /////////////////////////////////////////////////////////////
2733 // Deallocating memory
2734 /////////////////////////////////////////////////////////////
2735 delete coolingblocktransvector;
2736 delete localcoolingblockrot;
2737 delete localcoolingtubetrans;
2738 delete localcoolingtuberot;
2739 /////////////////////////////////////////////////////////////
2740 // Checking overlaps
2741 /////////////////////////////////////////////////////////////
2742 //coolingsystemother->CheckOverlaps(0.01);
2743 /////////////////////////////////////////////////////////////
2744 return coolingsystemother;
2745}
2746/////////////////////////////////////////////////////////////////////////////////
2747TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerFlex()const{
2748 /////////////////////////////////////////////////////////////
2749 // SSD Flex
2750 /////////////////////////////////////////////////////////////
2751 const Int_t kssdflexlayernumber = 2;
2752 TGeoXtru* ssdflexshape[kssdflexlayernumber];
2753 for(Int_t i=0; i<kssdflexlayernumber; i++) ssdflexshape[i] = new TGeoXtru(2);
2754 const Int_t kmothervertexnumber = 17;
2755 Double_t xmothervertex[kmothervertexnumber];
2756 Double_t ymothervertex[kmothervertexnumber];
2757 /////////////////////////////////////////////
2758 // Auxiliary variables for vertex positioning
2759 /////////////////////////////////////////////
2760 const Int_t kssdflexboxnumber = 5;
2761 Double_t ssdflexboxlength[kssdflexboxnumber];
2762 ssdflexboxlength[0] = 0.5*(fgkSSDChipNumber
2763 * fgkSSDChipLength+(fgkSSDChipNumber-1)
2764 * fgkSSDChipSeparationLength
2765 - fgkSSDModuleSensorSupportDistance-fgkSSDFlexHoleLength)
2766 - (fgkSSDFlexLength[0]-fgkSSDFlexLength[1]);
2767 ssdflexboxlength[1] = fgkSSDModuleSensorSupportDistance+fgkSSDFlexHoleLength;
2768 ssdflexboxlength[2] = 0.5*(fgkSSDModuleSensorSupportDistance
2769 - fgkSSDFlexHoleLength-fgkSSDFlexHoleWidth);
2770 ssdflexboxlength[3] = fgkSSDFlexHoleWidth;
2771 ssdflexboxlength[4] = fgkSSDFlexLength[1]-ssdflexboxlength[0]
2772 - ssdflexboxlength[1];
2773 Double_t ssdflexboxwidth[kssdflexboxnumber];
2774 ssdflexboxwidth[0] = fgkSSDFlexWidth[0];
2775 ssdflexboxwidth[1] = fgkSSDFlexWidth[0]-fgkSSDFlexHoleWidth;
2776 ssdflexboxwidth[2] = fgkSSDFlexHoleWidth;
2777 ssdflexboxwidth[3] = ssdflexboxwidth[2]-fgkSSDFlexHoleLength;
2778 ssdflexboxwidth[4] = fgkSSDFlexWidth[0];
2779 ///////////////////////
2780 // Setting the vertices
2781 ///////////////////////
2782 xmothervertex[0] = 0.0;
2783 xmothervertex[1] = xmothervertex[0];
2784 xmothervertex[2] = fgkSSDFlexLength[0]-fgkSSDFlexLength[1];
2785 xmothervertex[3] = xmothervertex[2]+ssdflexboxlength[0]+ssdflexboxlength[1]
2786 + ssdflexboxlength[4];
2787 xmothervertex[4] = xmothervertex[3];
2788 xmothervertex[5] = xmothervertex[4]-ssdflexboxlength[4];
2789 xmothervertex[6] = xmothervertex[5];
2790 xmothervertex[7] = xmothervertex[6]-fgkSSDFlexHoleLength;
2791 xmothervertex[8] = xmothervertex[7];
2792 xmothervertex[9] = xmothervertex[8]-ssdflexboxlength[2];
2793 xmothervertex[10] = xmothervertex[9];
2794 xmothervertex[11] = xmothervertex[10]-ssdflexboxlength[3];
2795 xmothervertex[12] = xmothervertex[11];
2796 xmothervertex[13] = xmothervertex[12]-ssdflexboxlength[2];
2797 xmothervertex[14] = xmothervertex[13];
2798 xmothervertex[15] = xmothervertex[14]-fgkSSDFlexHoleLength;
2799 xmothervertex[16] = xmothervertex[15];
2800 ymothervertex[0] = 0.0;
2801 ymothervertex[1] = fgkSSDFlexWidth[1];
2802 ymothervertex[2] = fgkSSDFlexWidth[0];
2803 ymothervertex[3] = ymothervertex[2];
2804 ymothervertex[4] = ymothervertex[0];
2805 ymothervertex[5] = ymothervertex[4];
2806 ymothervertex[6] = ssdflexboxwidth[2];
2807 ymothervertex[7] = ymothervertex[6];
2808 ymothervertex[8] = ymothervertex[0];
2809 ymothervertex[9] = ymothervertex[8];
2810 ymothervertex[10] = ssdflexboxwidth[2]-ssdflexboxwidth[3];
2811 ymothervertex[11] = ymothervertex[10];
2812 ymothervertex[12] = ymothervertex[0];
2813 ymothervertex[13] = ymothervertex[12];
2814 ymothervertex[14] = ymothervertex[7];
2815 ymothervertex[15] = ymothervertex[14];
2816 ymothervertex[16] = ymothervertex[0];
2817 /////////////////////////////////////////////////////////////
2818 // First Mother Volume containing SSDFlex
2819 /////////////////////////////////////////////////////////////
2820 TGeoXtru* ssdflexmothershape = new TGeoXtru(2);
2821 ssdflexmothershape->DefinePolygon(kmothervertexnumber,xmothervertex,
2822 ymothervertex);
2823 ssdflexmothershape->DefineSection(0,-1.5*fgkSSDFlexHeight[0]-2.*fgkSSDFlexHeight[1]);
2824 ssdflexmothershape->DefineSection(1, 0.5*fgkSSDFlexHeight[0]);
2825 TGeoVolumeAssembly* ssdflexmother = new TGeoVolumeAssembly("SSDFlexMother");
2826// TGeoVolume* ssdflexmother = new TGeoVolume("SSDFlexMother",ssdflexmothershape,
2827// fSSDAir);
2828 /////////////////////////////////////////////////////////////
2829 // SSDFlex Layer Shapes
2830 /////////////////////////////////////////////////////////////
2831 for(Int_t i=0; i<kssdflexlayernumber; i++){
2832 ssdflexshape[i]->DefinePolygon(kmothervertexnumber,xmothervertex,
2833 ymothervertex);
2834 ssdflexshape[i]->DefineSection(0,-0.5*fgkSSDFlexHeight[i]);
2835 ssdflexshape[i]->DefineSection(1, 0.5*fgkSSDFlexHeight[i]);
2836 }
2837 /////////////////////////////////////
2838 // Setting Layers into Mother Volume
2839 /////////////////////////////////////
2840 Int_t ssdflexcolor[kssdflexlayernumber] = {fColorAl,fColorPolyhamide};
2841 TGeoMedium* ssdflexmed[kssdflexlayernumber] = {fSSDAlTraceFlexMedium,
2842 fSSDKaptonFlexMedium};
2843 const char* ssdflexname[2*kssdflexlayernumber] = {"AlFlexLay1","KaptonFlexLay1",
2844 "AlFlexLay2","KaptonFlexLay2"};
2845 TGeoVolume* ssdflex[2*kssdflexlayernumber];
2846 TGeoTranslation* ssdflextrans[2*kssdflexlayernumber];
2847 for(Int_t i=0; i<2*kssdflexlayernumber; i++){
2848 ssdflex[i] = new TGeoVolume(ssdflexname[i],
2849 i%2==0 ? ssdflexshape[0] : ssdflexshape[1],
2850 i%2==0 ? ssdflexmed[0] : ssdflexmed[1]);
2851 ssdflex[i]->SetLineColor(i%2==0 ? ssdflexcolor[0] : ssdflexcolor[1]);
2852 ssdflextrans[i] = new TGeoTranslation(0.,0.,-0.5*i*(fgkSSDFlexHeight[0]
2853 + fgkSSDFlexHeight[1]));
2854 ssdflexmother->AddNode(ssdflex[i],1,ssdflextrans[i]);
2855 }
2856 return ssdflexmother;
2857}
2858/////////////////////////////////////////////////////////////////////////////////
2859TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(){
2860 /////////////////////////////////////////////////////////////
2861 // Method generating SSD End Flex
2862 /////////////////////////////////////////
2863 Double_t ssdflexradiusmax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
2864 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
2865 Double_t ssdflexboxlength = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
2866 * TMath::DegToRad()*ssdflexradiusmax
2867 - fgkSSDFlexLength[2]-TMath::Pi()
2868 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
2869 - 0.1*fgkSSDFlexFullLength;
2870 const Int_t knedges = 20;
2871 const Int_t karcnumber = 2;
2872 TVector3* vertexposition[karcnumber*(knedges+1)];
2873 Double_t deltangle[karcnumber] = {2.*fgkSSDFlexAngle/knedges,180.0/knedges};
2874 Double_t angle[karcnumber] = {90.-2.*fgkSSDFlexAngle,180.0};
2875 Double_t radius[karcnumber] = {ssdflexradiusmax-fgkSSDStiffenerHeight,fgkSSDStiffenerHeight};
2876 Double_t referenceangle[karcnumber] = {-180.0*TMath::DegToRad(),
2877 - 90.0*TMath::DegToRad()};
2878 TVector3* referencetrans[karcnumber];
2879 referencetrans[0] = new TVector3(ssdflexboxlength*CosD(2.*fgkSSDFlexAngle)
2880 + radius[0]*SinD(2.*fgkSSDFlexAngle),
2881 radius[0]);
2882 referencetrans[1] = new TVector3(referencetrans[0]->X()
2883 + fgkSSDFlexLength[2],
2884 - fgkSSDStiffenerHeight);
2885for(Int_t i=0; i<karcnumber; i++){
2886 for(Int_t j=0; j<knedges+1; j++){
2887 vertexposition[j+i*(knedges+1)] = new TVector3(radius[i]*CosD(angle[i]),
2888 radius[i]*SinD(angle[i]));
2889 angle[i] += deltangle[i]*(1.0-2.0*i);
2890 }
2891 }
2892 ///////////////////////
2893 // Setting the vertices
2894 ///////////////////////
2895 const Int_t kendflexlayernumber = 4;
2896 const Int_t kendflexvertexnumber = 4*(knedges+1)+2;
2897 TVector3** vertex[kendflexlayernumber];
2898 for(Int_t i=0; i<kendflexlayernumber; i++)
2899 vertex[i] = new TVector3*[kendflexvertexnumber];
2900 TVector3* transvector[kendflexlayernumber+1];
2901 TVector3* deltatransvector = new TVector3();
2902 for(Int_t i=0; i<kendflexlayernumber+1; i++) transvector[i] = new TVector3();
2903 transvector[0]->SetXYZ(0.0,ssdflexboxlength*SinD(2.*fgkSSDFlexAngle)
2904 + radius[0]*(1.0-CosD(2.*fgkSSDFlexAngle)),0.0);
2905 for(Int_t i=1; i<kendflexlayernumber+1; i++){
2906 deltatransvector->SetXYZ((i%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2907 * CosD(fgkSSDFlexAngle),
2908 (i%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2909 * SinD(fgkSSDFlexAngle),0.0);
2910 *transvector[i] = *transvector[i-1]+*deltatransvector;
2911 }
2912 Double_t ratioradius[karcnumber][kendflexlayernumber+1];
2913 ratioradius[0][0] = 1., ratioradius[1][0] = 1.;
2914 for(Int_t i=0; i<karcnumber; i++){
2915 for(Int_t j=1; j<kendflexlayernumber+1; j++){
2916 ratioradius[i][j] = ratioradius[i][j-1]-TMath::Power(-1.0,i)
2917 * (j%2!=0?fgkSSDFlexHeight[0]:fgkSSDFlexHeight[1])
2918 /radius[i];
2919 }
2920 }
2921 for(Int_t i=0; i<kendflexlayernumber; i++){
2922 vertex[i][0] = new TVector3(transvector[i]->X(),transvector[i]->Y());
2923 vertex[i][1] = new TVector3(transvector[i+1]->X(),transvector[i+1]->Y());
2924 for(Int_t j=0; j<karcnumber*(knedges+1); j++){
2925 if(j<(knedges+1)){
2926 vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[0][i+1],
2927 vertexposition[j]->Y()*ratioradius[0][i+1]);
2928 vertex[i][j+2]->RotateZ(referenceangle[0]);
2929 *vertex[i][j+2] += *referencetrans[0];
2930 vertex[i][4*(knedges+1)-j+1] =
2931 new TVector3(vertexposition[j]->X()*ratioradius[0][i],
2932 vertexposition[j]->Y()*ratioradius[0][i]);
2933 vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[0]);
2934 *vertex[i][4*(knedges+1)-j+1] += *referencetrans[0];
2935 }
2936 else{
2937
2938 vertex[i][j+2] = new TVector3(vertexposition[j]->X()*ratioradius[1][i+1],
2939 vertexposition[j]->Y()*ratioradius[1][i+1]);
2940 vertex[i][j+2]->RotateZ(referenceangle[1]);
2941 *vertex[i][j+2] += *referencetrans[1];
2942 vertex[i][4*(knedges+1)-j+1] =
2943 new TVector3(vertexposition[j]->X()*ratioradius[1][i],
2944 vertexposition[j]->Y()*ratioradius[1][i]);
2945 vertex[i][4*(knedges+1)-j+1]->RotateZ(referenceangle[1]);
2946 *vertex[i][4*(knedges+1)-j+1] += *referencetrans[1];
2947 }
2948 }
2949 }
2950 /////////////////////////////////////////////////////////////
2951 // First Mother Volume containing SSDEndFlex
2952 /////////////////////////////////////////////////////////////
2953 TGeoXtru* ssdendflexmothershape = new TGeoXtru(2);
2954 Double_t xmothervertex[kendflexvertexnumber];
2955 Double_t ymothervertex[kendflexvertexnumber];
2956 xmothervertex[0] = vertex[0][0]->X();
2957 ymothervertex[0] = vertex[0][0]->Y();
2958 for(Int_t i=1; i<kendflexvertexnumber; i++){
2959 if(i<2*(knedges+1)+2){
2960 xmothervertex[i] = vertex[3][i]->X();
2961 ymothervertex[i] = vertex[3][i]->Y();
2962 }
2963 else{
2964 xmothervertex[i] = vertex[0][i]->X();
2965 ymothervertex[i] = vertex[0][i]->Y();
2966 }
2967 }
2968 ssdendflexmothershape->DefinePolygon(kendflexvertexnumber,
2969 xmothervertex,ymothervertex);
2970 ssdendflexmothershape->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
2971 ssdendflexmothershape->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
2972// TGeoVolume* ssdendflexmother = new TGeoVolume("SSDEndFlexMother",
2973// ssdendflexmothershape,fSSDAir);
2974 TGeoVolumeAssembly* ssdendflexmother = new TGeoVolumeAssembly("SSDEndFlexMother");
2975 //////////////////////////////////////
2976 // End Flex TGeoXtru Layer Definition
2977 //////////////////////////////////////
2978 TGeoXtru* ssdendflexshape[kendflexlayernumber];
2979 TGeoVolume* ssdendflex[kendflexlayernumber];
2980 for(Int_t i=0; i<kendflexlayernumber; i++) ssdendflexshape[i] = new TGeoXtru(2);
2981 Double_t xvertex[kendflexlayernumber][kendflexvertexnumber];
2982 Double_t yvertex[kendflexlayernumber][kendflexvertexnumber];
2983 Int_t ssdendflexcolor[kendflexlayernumber] = {fColorAl,fColorPolyhamide};
2984 TGeoMedium* ssdendflexmed[kendflexlayernumber] = {fSSDAlTraceFlexMedium,
2985 fSSDKaptonFlexMedium};
2986 const char* ssdendflexname[kendflexlayernumber] = {"AlEndFlexLay1","KaptonEndFlexLay1",
2987 "AlEndFlexLay2","KaptonEndFlexLay2"};
2988 for(Int_t i=0; i<kendflexlayernumber; i++){
2989 for(Int_t j=0; j<4*(knedges+1)+2; j++){
2990 xvertex[i][j] = vertex[i][j]->X();
2991 yvertex[i][j] = vertex[i][j]->Y();
2992 }
2993 ssdendflexshape[i]->DefinePolygon(kendflexvertexnumber,xvertex[i],yvertex[i]);
2994 ssdendflexshape[i]->DefineSection(0,-0.5*fgkSSDFlexWidth[0]);
2995 ssdendflexshape[i]->DefineSection(1, 0.5*fgkSSDFlexWidth[0]);
2996 ssdendflex[i] = new TGeoVolume(ssdendflexname[i],ssdendflexshape[i],
2997 i%2==0 ? ssdendflexmed[0] : ssdendflexmed[1]);
2998 ssdendflex[i]->SetLineColor(i%2==0 ? ssdendflexcolor[0] : ssdendflexcolor[1]);
2999 ssdendflexmother->AddNode(ssdendflex[i],1);
3000 }
3001 /////////////////////////////////////////////////////////////
3002 // Deallocating memory
3003 /////////////////////////////////////////////////////////////
3004 for(Int_t i=0; i<karcnumber*(knedges+1); i++) delete vertexposition[i];
3005 for(Int_t i=0; i<karcnumber; i++) delete referencetrans[i];
3006 for(Int_t i=0; i<kendflexlayernumber; i++){
3007 for(Int_t j=0; j<kendflexvertexnumber; j++) delete vertex[i][j];
3008 delete [] vertex[i];
3009 }
3010 for(Int_t i=0; i<kendflexlayernumber+1; i++) delete transvector[i];
3011 delete deltatransvector;
3012 /////////////////////////////////////////////////////////////
3013 //ssdendflexmother->CheckOverlaps(0.01);
3014 return ssdendflexmother;
3015}
3016///////////////////////////////////////////////////////////////////////////////
3017TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
3018 /////////////////////////////////////////////////////////////
3019 // Method generating the Mounting Block
3020 /////////////////////////////////////////////////////////////
3021 const Int_t kvertexnumber = 8;
3022 Double_t xvertex[kvertexnumber];
3023 Double_t yvertex[kvertexnumber];
3024 xvertex[0] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1]);
3025 xvertex[1] = xvertex[0];
3026 xvertex[2] = -xvertex[0];
3027 xvertex[3] = xvertex[2];
3028 xvertex[4] = xvertex[3]+0.5*(fgkSSDMountingBlockLength[1]
3029 - fgkSSDMountingBlockLength[2]);
3030 xvertex[5] = xvertex[4];
3031 xvertex[6] = 0.5*fgkSSDMountingBlockLength[0]-xvertex[2]
3032 - 0.5*fgkSSDMountingBlockScrewHoleEdge
3033 - fgkSSDMountingBlockScrewHoleRadius[0];
3034 xvertex[7] = xvertex[6];
3035 yvertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor
3036 + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0];
3037 yvertex[1] = 0.5*fgkSSDMountingBlockHeight[0];
3038 yvertex[2] = yvertex[1];
3039 yvertex[3] = fgkSSDMountingBlockHeight[1]-yvertex[1];
3040 yvertex[4] = yvertex[3];
3041 yvertex[5] = yvertex[2]+fgkSSDMountingBlockHeight[2]
3042 - fgkSSDMountingBlockHeight[0];
3043 yvertex[6] = yvertex[5];
3044 yvertex[7] = yvertex[0];
3045
3046 ///////////////////////////////////////////////////////////////////////
3047 // TGeoXTru Volume definition for Mounting Block Part
3048 ///////////////////////////////////////////////////////////////////////
3049 TGeoXtru* ssdmountingblockshape = new TGeoXtru(2);
3050 ssdmountingblockshape->DefinePolygon(kvertexnumber,xvertex,yvertex);
3051 ssdmountingblockshape->DefineSection(0,-0.5*fgkSSDMountingBlockWidth);
3052 ssdmountingblockshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3053 TGeoVolume* ssdmountingblock = new TGeoVolume("SSDMountingBlock",
3054 ssdmountingblockshape,
3055 fSSDMountingBlockMedium);
3056 ssdmountingblock->SetLineColor(fColorG10);
3057 TGeoCombiTrans* mountingblockcombitrans = new TGeoCombiTrans();
3058 mountingblockcombitrans->SetTranslation(2.*xvertex[2]+fgkSSDMountingBlockLength[1],0.,0.);
3059 TGeoRotation* mountingblockrot = new TGeoRotation();
3060 mountingblockrot->SetAngles(90.,180.,-90.);
3061 mountingblockcombitrans->SetRotation(*mountingblockrot);
3062 /////////////////////////////////////////////////////////////
3063 // Generating the Mounting Block Screw Vertices
3064 /////////////////////////////////////////////////////////////
3065 const Int_t kscrewvertexnumber = 15;
3066 Double_t alpha = TMath::ACos(0.5*(fgkSSDMountingBlockHeight[1]
3067 - fgkSSDMountingBlockScrewHoleEdge)
3068 / fgkSSDMountingBlockScrewHoleRadius[0])
3069 * TMath::RadToDeg();
3070 Double_t phi0 = 90.+alpha;
3071 Double_t phi = 270.-2*alpha;
3072 Double_t deltaphi = phi/kscrewvertexnumber;
3073 TVector3* screwvertex[kscrewvertexnumber+1];
3074 for(Int_t i=0; i<kscrewvertexnumber+1; i++)
3075 screwvertex[i] = new TVector3(fgkSSDMountingBlockScrewHoleRadius[0]
3076 *CosD(phi0+i*deltaphi),
3077 fgkSSDMountingBlockScrewHoleRadius[0]
3078 *SinD(phi0+i*deltaphi));
3079 Double_t xscrewvertex[kscrewvertexnumber+6];
3080 Double_t yscrewvertex[kscrewvertexnumber+6];
3081 xscrewvertex[0] = - fgkSSDMountingBlockScrewHoleRadius[0];
3082 yscrewvertex[0] = -0.5*(fgkSSDMountingBlockWidth
3083 - fgkSSDMountingBlockScrewHoleEdge);
3084 xscrewvertex[1] = xscrewvertex[0];
3085 yscrewvertex[1] = 0.5*fgkSSDMountingBlockScrewHoleEdge;
3086 xscrewvertex[2] = screwvertex[0]->X();
3087 yscrewvertex[2] = yscrewvertex[1];
3088 for(Int_t i=0; i<kscrewvertexnumber+1; i++){
3089 xscrewvertex[i+3] = screwvertex[i]->X();
3090 yscrewvertex[i+3] = screwvertex[i]->Y();
3091 }
3092 xscrewvertex[kscrewvertexnumber+4] = 0.5*fgkSSDMountingBlockScrewHoleEdge;
3093 yscrewvertex[kscrewvertexnumber+4] = yscrewvertex[kscrewvertexnumber+3];
3094 xscrewvertex[kscrewvertexnumber+5] = xscrewvertex[kscrewvertexnumber+4];
3095 yscrewvertex[kscrewvertexnumber+5] = yscrewvertex[0];
3096 TGeoXtru* ssdmountingblockscrewshape = new TGeoXtru(2);
3097 ssdmountingblockscrewshape->DefinePolygon(kscrewvertexnumber+6,xscrewvertex,yscrewvertex);
3098 ssdmountingblockscrewshape->DefineSection(0,yvertex[0]);
3099 ssdmountingblockscrewshape->DefineSection(1,-0.5*fgkSSDMountingBlockHeight[0]
3100 + fgkSSDMountingBlockHeight[2]);
3101 TGeoVolume* ssdmountingblockscrew = new TGeoVolume("SSDMountingBlockScrew",
3102 ssdmountingblockscrewshape,
3103 fSSDMountingBlockMedium);
3104 ssdmountingblockscrew->SetLineColor(fColorG10);
3105 TGeoCombiTrans* ssdmountingblockscrewcombitrans[4];
3106 for(Int_t i=0; i<4; i++) ssdmountingblockscrewcombitrans[i] = new TGeoCombiTrans();
3107 ssdmountingblockscrewcombitrans[0]->SetTranslation(-0.5*fgkSSDMountingBlockScrewHoleEdge,
3108 - yscrewvertex[1],
3109 0.5*fgkSSDMountingBlockHeight[0]
3110 - fgkSSDMountingBlockHeight[2]
3111 + 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3112 + fgkSSDMountingBlockHeight[2]
3113 - yvertex[0]));
3114 ssdmountingblockscrewcombitrans[1]->SetTranslation(0.5*fgkSSDMountingBlockScrewHoleEdge,
3115 -0.5*fgkSSDMountingBlockScrewHoleEdge,
3116 yscrewvertex[1]
3117 -0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3118 +fgkSSDMountingBlockHeight[2]
3119 -yvertex[0]));
3120 ssdmountingblockscrewcombitrans[2]->SetTranslation(-0.5*fgkSSDMountingBlockScrewHoleEdge,
3121 yscrewvertex[1],
3122 - 0.5*fgkSSDMountingBlockHeight[0]
3123 + fgkSSDMountingBlockHeight[2]
3124 - 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3125 + fgkSSDMountingBlockHeight[2]
3126 - yvertex[0]));
3127 ssdmountingblockscrewcombitrans[3]->SetTranslation(0.5*fgkSSDMountingBlockScrewHoleEdge,
3128 yscrewvertex[1],
3129 - yscrewvertex[1]
3130 + 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3131 + fgkSSDMountingBlockHeight[2]
3132 - yvertex[0]));
3133 TGeoRotation* ssdmountingblockscrewrot[4];
3134 for(Int_t i=0; i<4; i++) ssdmountingblockscrewrot[i] = new TGeoRotation();
3135 ssdmountingblockscrewrot[1]->SetAngles(90.,-180.,-90.);
3136 ssdmountingblockscrewrot[2]->SetAngles(0.,180.,0.);
3137 ssdmountingblockscrewrot[3]->SetAngles(180.,0.,0.);
3138 for(Int_t i=1; i<4; i++)
3139 ssdmountingblockscrewcombitrans[i]->SetRotation(*ssdmountingblockscrewrot[i]);
3140 TGeoRotation* ssdmountingblockglobalrot = new TGeoRotation();
3141 ssdmountingblockglobalrot->SetAngles(0.,90.,0.);
3142 TGeoTranslation* ssdmountingblockglobaltrans = new TGeoTranslation();
3143 ssdmountingblockglobaltrans->SetTranslation(0.5*fgkSSDMountingBlockLength[0]
3144 + xvertex[0],yscrewvertex[1]
3145 - 0.5*(-0.5*fgkSSDMountingBlockHeight[0]
3146 + fgkSSDMountingBlockHeight[2]
3147 - yvertex[0]),0.);
3148 TGeoHMatrix* ssdmountingblockscrewmatrix[4];
3149 for(Int_t i=0; i<4; i++){
3150 ssdmountingblockscrewmatrix[i] =
3151 new TGeoHMatrix((*ssdmountingblockglobalrot)*(*ssdmountingblockscrewcombitrans[i]));
3152 ssdmountingblockscrewmatrix[i]->MultiplyLeft(ssdmountingblockglobaltrans);
3153 }
3154 ///////////////////////////////////////////////////////////////////////
3155 // TGeoXtru for Mother Volume
3156 ///////////////////////////////////////////////////////////////////////
3157 const Int_t kvertexmothernumber = 12;
3158 Double_t xmothervertex[kvertexmothernumber];
3159 Double_t ymothervertex[kvertexmothernumber];
3160 for(Int_t i=0; i<6; i++){
3161 xmothervertex[i] = xvertex[i];
3162 ymothervertex[i] = yvertex[i];
3163 }
3164 xmothervertex[6] = xvertex[5]+fgkSSDMountingBlockLength[2];
3165 ymothervertex[6] = ymothervertex[5];
3166 xmothervertex[7] = xmothervertex[6];
3167 ymothervertex[7] = ymothervertex[4];
3168 xmothervertex[8] = xmothervertex[7]
3169 + 0.5*(fgkSSDMountingBlockLength[1]
3170 - fgkSSDMountingBlockLength[2]);
3171 ymothervertex[8] = ymothervertex[4];
3172 xmothervertex[9] = xmothervertex[8];
3173 ymothervertex[9] = ymothervertex[2];
3174 xmothervertex[10] = xvertex[0]+fgkSSDMountingBlockLength[0];
3175 ymothervertex[10] = ymothervertex[1];
3176 xmothervertex[11] = xmothervertex[10];
3177 ymothervertex[11] = ymothervertex[0];
3178 TGeoXtru* ssdmountingblockmothershape = new TGeoXtru(2);
3179 ssdmountingblockmothershape->DefinePolygon(kvertexmothernumber,xmothervertex,ymothervertex);
3180 ssdmountingblockmothershape->DefineSection(0,-0.5*fgkSSDMountingBlockWidth);
3181 ssdmountingblockmothershape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3182 TGeoVolume* ssdmountingblockmother = new TGeoVolume("SSDMountingBlockMother",
3183 ssdmountingblockmothershape,
3184 fSSDAir);
3185 /////////////////////////////////////////////////////////////
3186 // Placing the Volumes into Mother Volume
3187 /////////////////////////////////////////////////////////////
3188 ssdmountingblockmother->AddNode(ssdmountingblock,1);
3189 ssdmountingblockmother->AddNode(ssdmountingblock,2,mountingblockcombitrans);
3190 for(Int_t i=0; i<4; i++)
3191 ssdmountingblockmother->AddNode(ssdmountingblockscrew,i+1,
3192 ssdmountingblockscrewmatrix[i]);
3193 /////////////////////////////////////////////////////////////
3194 // Deallocating memory
3195 /////////////////////////////////////////////////////////////
3196 delete mountingblockrot;
3197 for(Int_t i=0; i<4; i++) delete ssdmountingblockscrewrot[i];
3198 delete ssdmountingblockglobalrot;
3199 delete ssdmountingblockglobaltrans;
3200 /////////////////////////////////////////////////////////////
3201 return ssdmountingblockmother;
3202}
3203///////////////////////////////////////////////////////////////////////////////
3204 TGeoVolume* AliITSv11GeometrySSD::GetMountingBlockClip() const {
3205 /////////////////////////////////////////////////////////////
3206 // Method generating the Mounting Block Clip
3207 /////////////////////////////////////////////////////////////
3208 const Int_t kmothervertexnumber = 10;
3209 Double_t xmothervertex[kmothervertexnumber];
3210 Double_t ymothervertex[kmothervertexnumber];
3211 xmothervertex[0] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1])
3212 - 0.5*(fgkSSDSensorWidth-fgkSSDMountingBlockLength[0]);
3213 xmothervertex[1] = xmothervertex[0];
3214 xmothervertex[2] = xmothervertex[0]+0.5*(fgkMountingBlockClibScrewPosition
3215 - fgkMountingBlockClibScrewRadius);
3216 xmothervertex[3] = xmothervertex[2];
3217 xmothervertex[4] = xmothervertex[3]+2.*fgkMountingBlockClibScrewRadius;
3218 xmothervertex[5] = xmothervertex[4];
3219 xmothervertex[6] = xmothervertex[0]+fgkMountingBlockClipLength;
3220 xmothervertex[7] = xmothervertex[6];
3221 xmothervertex[8] = -0.25*(fgkSSDMountingBlockLength[0]-fgkSSDMountingBlockLength[1]);
3222 xmothervertex[9] = xmothervertex[8];
3223 ymothervertex[0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor
3224 + fgkSSDMountingBlockHeight[1]-0.5*fgkSSDMountingBlockHeight[0];
3225 ymothervertex[1] = 0.5*fgkSSDMountingBlockHeight[0]+fgkMountingBlockClipThickness;
3226 ymothervertex[2] = ymothervertex[1];
3227 ymothervertex[3] = ymothervertex[2]+(fgkSSDMountingBlockHeight[1]
3228 - fgkSSDMountingBlockHeight[0]-fgkMountingBlockClipThickness
3229 - 0.5*fgkCoolingTubeSupportHeight-fgkCoolingTubeSupportRmax);
3230 ymothervertex[4] = ymothervertex[3];
3231 ymothervertex[5] = ymothervertex[2];
3232 ymothervertex[6] = ymothervertex[5];
3233 ymothervertex[7] = ymothervertex[6]-fgkMountingBlockClipThickness;
3234 ymothervertex[8] = ymothervertex[7];
3235 ymothervertex[9] = ymothervertex[0];
3236
3237 ///////////////////////////////////////////////////////////////////////
3238 // TGeoXTru Volume definition for Mounting Block Clip Part
3239 ///////////////////////////////////////////////////////////////////////
3240 TGeoXtru* ssdmountingblockclipshape = new TGeoXtru(2);
3241 ssdmountingblockclipshape->DefinePolygon(kmothervertexnumber,xmothervertex,ymothervertex);
3242 ssdmountingblockclipshape->DefineSection(0,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockSupportWidth[0]);
3243 ssdmountingblockclipshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3244 TGeoVolume* ssdmountingblockclip = new TGeoVolume("SSDMountingBlockClip",
3245 ssdmountingblockclipshape,fSSDAir);
3246 ssdmountingblockclip->SetLineColor(4);
3247 ///////////////////////////////////////////////////////////////////////
3248 // TGeoXTru Volume definition for Clip
3249 ///////////////////////////////////////////////////////////////////////
3250 const Int_t kclipvertexnumber = 6;
3251 Double_t xclipvertex[kclipvertexnumber];
3252 Double_t yclipvertex[kclipvertexnumber];
3253 xclipvertex[0] = xmothervertex[0];
3254 xclipvertex[1] = xclipvertex[0];
3255 xclipvertex[2] = xmothervertex[6];
3256 xclipvertex[3] = xclipvertex[2];
3257 xclipvertex[4] = xclipvertex[0]+fgkMountingBlockClipThickness;
3258 xclipvertex[5] = xclipvertex[4];
3259 yclipvertex[0] = ymothervertex[0];
3260 yclipvertex[1] = ymothervertex[1];
3261 yclipvertex[2] = yclipvertex[1];
3262 yclipvertex[3] = yclipvertex[1]-fgkMountingBlockClipThickness;
3263 yclipvertex[4] = yclipvertex[3];
3264 yclipvertex[5] = yclipvertex[0];
3265 TGeoXtru* clipshape = new TGeoXtru(2);
3266 clipshape->DefinePolygon(kclipvertexnumber,xclipvertex,yclipvertex);
3267 clipshape->DefineSection(0,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockClibWidth);
3268 clipshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockSupportWidth[0]
3269 + fgkMountingBlockClibWidth);
3270 TGeoVolume* clip = new TGeoVolume("SSDClip",clipshape,fSSDMountingBlockMedium);
3271 clip->SetLineColor(18);
3272 ///////////////////////////////////////////////////////////////////////
3273 // Ladder Support Piece
3274 ///////////////////////////////////////////////////////////////////////
3275 const Int_t ksupportvertexnumber = 4;
3276 Double_t xsupportvertex[ksupportvertexnumber];
3277 Double_t ysupportvertex[ksupportvertexnumber];
3278 xsupportvertex[0] = xclipvertex[5];
3279 xsupportvertex[1] = xsupportvertex[0];
3280 xsupportvertex[2] = xmothervertex[9];
3281 xsupportvertex[3] = xsupportvertex[2];
3282 ysupportvertex[0] = yclipvertex[0];
3283 ysupportvertex[1] = yclipvertex[3];
3284 ysupportvertex[2] = ysupportvertex[1];
3285 ysupportvertex[3] = ysupportvertex[0];
3286 TGeoXtru* supportshape = new TGeoXtru(2);
3287 supportshape->DefinePolygon(ksupportvertexnumber,xsupportvertex,ysupportvertex);
3288 supportshape->DefineSection(0,0.5*fgkSSDMountingBlockWidth-fgkMountingBlockSupportWidth[0]);
3289 supportshape->DefineSection(1,0.5*fgkSSDMountingBlockWidth);
3290 TGeoVolume* support = new TGeoVolume("RingSupport",supportshape,fSSDMountingBlockMedium);
3291 support->SetLineColor(9);
3292 ///////////////////////////////////////////////////////////////////////
3293 // TGeoXTru Volume definition for Screw
3294 ///////////////////////////////////////////////////////////////////////
3295 Double_t radius[2] = {fgkMountingBlockClibScrewRadius,
3296 0.5*fgkMountingBlockClibScrewRadius};
3297 Int_t edgesnumber[2] = {50,6};
3298 Double_t section[2] = {-0.5*(ymothervertex[3]-ymothervertex[2]),
3299 +0.5*(ymothervertex[3]-ymothervertex[2])};
3300 TGeoShape* clipscrewshape = GetScrewShape(radius,edgesnumber,section);
3301 TGeoVolume* clipscrew = new TGeoVolume("ClipScrewShape",clipscrewshape,fSSDSupportRingAl);
3302 clipscrew->SetLineColor(12);
3303 TGeoRotation* screwrot = new TGeoRotation();
3304 screwrot->SetAngles(0.,90.,0.);
3305 TGeoTranslation* screwtrans = new TGeoTranslation();
3306 screwtrans->SetTranslation(xmothervertex[3]+fgkMountingBlockClibScrewRadius,
3307 0.5*(ymothervertex[3]+ymothervertex[2]),
3308 0.5*fgkSSDMountingBlockWidth+
3309 -0.5*fgkMountingBlockSupportWidth[0]);
3310 TGeoCombiTrans* screwcombitrans = new TGeoCombiTrans(*screwtrans,*screwrot);
3311 ///////////////////////////////////////////////////////////////////////
3312 // Placing the Volumes
3313 ///////////////////////////////////////////////////////////////////////
3314 ssdmountingblockclip->AddNode(clip,1);
3315 ssdmountingblockclip->AddNode(support,1);
3316 ssdmountingblockclip->AddNode(clipscrew,1,screwcombitrans);
3317 /////////////////////////////////////////////////////////////
3318 // Deallocating memory
3319 /////////////////////////////////////////////////////////////
3320 delete screwtrans;
3321 delete screwrot;
3322 /////////////////////////////////////////////////////////////
3323 return ssdmountingblockclip;
3324}
3325///////////////////////////////////////////////////////////////////////////////
3326TList* AliITSv11GeometrySSD::GetCoolingTubeList()const{
3327 /////////////////////////////////////////////////////////////
3328 // Method generating the Cooling Tube
3329 /////////////////////////////////////////////////////////////
3330 TGeoTube** coolingtubeshape[fgkcoolingtubenumber];
3331 for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtubeshape[i] =
3332 new TGeoTube*[2];
3333 // Ladder Cooling Tubes
3334 coolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3335 0.25 * (fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
3336 - 2.*fgkSSDCoolingBlockWidth-fgkCoolingTubeSupportWidth)
3337 -0.5*fgkSSDTolerance);
3338 coolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3339 coolingtubeshape[0][0]->GetDz());
3340 coolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3341 0.5*(fgkSSDModuleStiffenerPosition[1]
3342 - fgkSSDSensorOverlap-fgkSSDTolerance));
3343 coolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3344 coolingtubeshape[1][0]->GetDz());
3345 coolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3346 0.5*(fgkSSDModuleStiffenerPosition[1]-fgkSSDTolerance));
3347 coolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3348 coolingtubeshape[2][0]->GetDz()-0.5*fgkSSDTolerance);
3349 // End Ladder Cooling Tubes
3350 TGeoTube** endladdercoolingtubeshape[fgkendladdercoolingtubenumber];
3351 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
3352 endladdercoolingtubeshape[i] = new TGeoTube*[2];
3353 endladdercoolingtubeshape[0][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3354 0.50 * (fgkEndLadderMountingBlockPosition[0]
3355 - fgkendladdercoolingsupportdistance[0]-fgkSSDTolerance));
3356 endladdercoolingtubeshape[0][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3357 endladdercoolingtubeshape[0][0]->GetDz());
3358 endladdercoolingtubeshape[1][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3359 0.50 * (fgkendladdercoolingsupportdistance[0]
3360 + fgkendladdercoolingsupportdistance[1]
3361 - fgkCoolingTubeSupportWidth-fgkSSDTolerance));
3362 endladdercoolingtubeshape[1][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3363 endladdercoolingtubeshape[1][0]->GetDz()-0.5*fgkSSDTolerance);
3364 endladdercoolingtubeshape[2][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3365 0.50 * (fgkEndLadderCarbonFiberLowerJunctionLength[0]
3366 - fgkEndLadderMountingBlockPosition[0]
3367 - fgkendladdercoolingsupportdistance[1]
3368 - fgkCoolingTubeSupportWidth-fgkSSDTolerance));
3369 endladdercoolingtubeshape[2][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3370 endladdercoolingtubeshape[2][0]->GetDz()-0.5*fgkSSDTolerance);
3371 endladdercoolingtubeshape[3][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3372 0.50 * (fgkMountingBlockToSensorSupport
3373 - 0.50 * (fgkSSDFlexHoleWidth-fgkSSDSensorSideSupportWidth)
3374 - fgkSSDStiffenerWidth-fgkSSDModuleStiffenerPosition[1]
3375 + fgkSSDSensorOverlap
3376 + fgkEndLadderCarbonFiberLowerJunctionLength[1]
3377 - fgkendladdercoolingsupportdistance[2]
3378 - fgkEndLadderMountingBlockPosition[1]
3379 - fgkCoolingTubeSupportWidth-fgkSSDTolerance));
3380 endladdercoolingtubeshape[3][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3381 endladdercoolingtubeshape[3][0]->GetDz()-0.5*fgkSSDTolerance);
3382 endladdercoolingtubeshape[4][0] = new TGeoTube(fgkCoolingTubeRmin,fgkCoolingTubeRmax,
3383 0.50 * (fgkendladdercoolingsupportdistance[2]-fgkSSDTolerance));
3384 endladdercoolingtubeshape[4][1] = new TGeoTube(0.0,fgkCoolingTubeRmin,
3385 endladdercoolingtubeshape[4][0]->GetDz()-0.5*fgkSSDTolerance);
3386 // Ladder Cooling Tubes
3387 TGeoVolume** coolingtube[fgkcoolingtubenumber];
3388 for(Int_t i=0; i<fgkcoolingtubenumber; i++) coolingtube[i] =
3389 new TGeoVolume*[2];
3390 coolingtube[0][0] = new TGeoVolume("OuterCoolingTube1",coolingtubeshape[0][0],
3391 fSSDCoolingTubePhynox);
3392 coolingtube[0][1] = new TGeoVolume("InnerCoolingTube1",coolingtubeshape[0][1],
3393 fSSDCoolingTubeWater);
3394 coolingtube[1][0] = new TGeoVolume("OuterCoolingTube2",coolingtubeshape[1][0],
3395 fSSDCoolingTubePhynox);
3396 coolingtube[1][1] = new TGeoVolume("InnerCoolingTube2",coolingtubeshape[1][1],
3397 fSSDCoolingTubeWater);
3398 coolingtube[2][0] = new TGeoVolume("OuterCoolingTube3",coolingtubeshape[2][0],
3399 fSSDCoolingTubePhynox);
3400 coolingtube[2][1] = new TGeoVolume("InnerCoolingTube3",coolingtubeshape[2][1],
3401 fSSDCoolingTubeWater);
3402 for(Int_t i=0; i<fgkcoolingtubenumber; i++){
3403 coolingtube[i][0]->SetLineColor(fColorPhynox);
3404 coolingtube[i][1]->SetLineColor(fColorWater);
3405 }
3406 // End Ladder Cooling Tubes
3407 TGeoVolume** endladdercoolingtube[fgkendladdercoolingtubenumber];
3408 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
3409 endladdercoolingtube[i] = new TGeoVolume*[2];
3410 endladdercoolingtube[0][0] = new TGeoVolume("OuterEndLadderCoolingTube1",
3411 endladdercoolingtubeshape[0][0],
3412 fSSDCoolingTubePhynox);
3413 endladdercoolingtube[0][1] = new TGeoVolume("InnerEndlLadderCoolingTube1",
3414 endladdercoolingtubeshape[0][1],
3415 fSSDCoolingTubeWater);
3416 endladdercoolingtube[1][0] = new TGeoVolume("OuterEndLadderCoolingTube2",
3417 endladdercoolingtubeshape[1][0],
3418 fSSDCoolingTubePhynox);
3419 endladdercoolingtube[1][1] = new TGeoVolume("InnerEndlLadderCoolingTube2",
3420 endladdercoolingtubeshape[1][1],
3421 fSSDCoolingTubeWater);
3422 endladdercoolingtube[2][0] = new TGeoVolume("OuterEndLadderCoolingTube3",
3423 endladdercoolingtubeshape[2][0],
3424 fSSDCoolingTubePhynox);
3425 endladdercoolingtube[2][1] = new TGeoVolume("InnerEndlLadderCoolingTube3",
3426 endladdercoolingtubeshape[2][1],
3427 fSSDCoolingTubeWater);
3428 endladdercoolingtube[3][0] = new TGeoVolume("OuterEndLadderCoolingTube4",
3429 endladdercoolingtubeshape[3][0],
3430 fSSDCoolingTubePhynox);
3431 endladdercoolingtube[3][1] = new TGeoVolume("InnerEndlLadderCoolingTube4",
3432 endladdercoolingtubeshape[3][1],
3433 fSSDCoolingTubeWater);
3434 endladdercoolingtube[4][0] = new TGeoVolume("OuterEndLadderCoolingTube5",
3435 endladdercoolingtubeshape[4][0],
3436 fSSDCoolingTubePhynox);
3437 endladdercoolingtube[4][1] = new TGeoVolume("InnerEndlLadderCoolingTube5",
3438 endladdercoolingtubeshape[4][1],
3439 fSSDCoolingTubeWater);
3440 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++){
3441 endladdercoolingtube[i][0]->SetLineColor(fColorPhynox);
3442 endladdercoolingtube[i][1]->SetLineColor(fColorWater);
3443 }
3444
3445 /////////////////////////////////////////////////////////////
3446 // Virtual Volume containing Cooling Tubes
3447 /////////////////////////////////////////////////////////////
3448 // Ladder Cooling Tubes
3449 TGeoTube* virtualcoolingtubeshape[fgkcoolingtubenumber];
3450 for(Int_t i=0; i<fgkcoolingtubenumber; i++)
3451 virtualcoolingtubeshape[i] = new TGeoTube(coolingtubeshape[i][1]->GetRmin(),
3452 coolingtubeshape[i][0]->GetRmax(),
3453 coolingtubeshape[i][0]->GetDz());
3454 TGeoVolume* virtualcoolingtube[fgkcoolingtubenumber];
3455 virtualcoolingtube[0] = new TGeoVolume("CoolingTube1",virtualcoolingtubeshape[0],
3456 fSSDAir);
3457 virtualcoolingtube[1] = new TGeoVolume("CoolingTube2",virtualcoolingtubeshape[1],
3458 fSSDAir);
3459 virtualcoolingtube[2] = new TGeoVolume("CoolingTube3",virtualcoolingtubeshape[2],
3460 fSSDAir);
3461 // End Ladder Cooling Tubes
3462 TGeoTube* endladdervirtualcoolingtubeshape[fgkendladdercoolingtubenumber];
3463 for(Int_t i=0; i<fgkendladdercoolingtubenumber; i++)
3464 endladdervirtualcoolingtubeshape[i] = new TGeoTube(endladdercoolingtubeshape[i][1]->GetRmin(),
3465 endladdercoolingtubeshape[i][0]->GetRmax(),
3466 endladdercoolingtubeshape[i][0]->GetDz());
3467 TGeoVolume* endladdervirtualcoolingtube[fgkendladdercoolingtubenumber];
3468 endladdervirtualcoolingtube[0] = new TGeoVolume("EndLadderCoolingTube1",
3469 endladdervirtualcoolingtubeshape[0],
3470 fSSDAir);
3471 endladdervirtualcoolingtube[1] = new TGeoVolume("EndLadderCoolingTube2",
3472 endladdervirtualcoolingtubeshape[1],
3473 fSSDAir);
3474 endladdervirtualcoolingtube[2] = new TGeoVolume("EndLadderCoolingTube3",
3475 endladdervirtualcoolingtubeshape[2],
3476 fSSDAir);
3477 endladdervirtualcoolingtube[3] = new TGeoVolume("EndLadderCoolingTube4",
3478 endladdervirtualcoolingtubeshape[3],
3479 fSSDAir);
3480 endladdervirtualcoolingtube[4] = new TGeoVolume("EndLadderCoolingTube5",
3481 endladdervirtualcoolingtubeshape[4],
3482 fSSDAir);
3483 TList* coolingtubelist = new TList();
3484 for(Int_t i=0; i<fgkcoolingtubenumber; i++){
3485 virtualcoolingtube[i]->AddNode(coolingtube[i][0],1);
3486 virtualcoolingtube[i]->AddNode(coolingtube[i][1],1);
3487 coolingtubelist->Add(virtualcoolingtube[i]);
3488 }
3489 endladdervirtualcoolingtube[0]->AddNode(endladdercoolingtube[0][0],1);
3490 endladdervirtualcoolingtube[0]->AddNode(endladdercoolingtube[0][1],1);
3491 coolingtubelist->Add(endladdervirtualcoolingtube[0]);
3492 endladdervirtualcoolingtube[1]->AddNode(endladdercoolingtube[1][0],1);
3493 endladdervirtualcoolingtube[1]->AddNode(endladdercoolingtube[1][1],1);
3494 coolingtubelist->Add(endladdervirtualcoolingtube[1]);
3495 endladdervirtualcoolingtube[2]->AddNode(endladdercoolingtube[2][0],1);
3496 endladdervirtualcoolingtube[2]->AddNode(endladdercoolingtube[2][1],1);
3497 coolingtubelist->Add(endladdervirtualcoolingtube[2]);
3498 endladdervirtualcoolingtube[3]->AddNode(endladdercoolingtube[3][0],1);
3499 endladdervirtualcoolingtube[3]->AddNode(endladdercoolingtube[3][1],1);
3500 coolingtubelist->Add(endladdervirtualcoolingtube[3]);
3501 endladdervirtualcoolingtube[4]->AddNode(endladdercoolingtube[4][0],1);
3502 endladdervirtualcoolingtube[4]->AddNode(endladdercoolingtube[4][1],1);
3503 coolingtubelist->Add(endladdervirtualcoolingtube[4]);
3504 return coolingtubelist;
3505}
3506///////////////////////////////////////////////////////////////////////////////
3507TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(Int_t nedges){
3508 /////////////////////////////////////////////////////////////
3509 // Method generating SSD Cooling Block
3510 /////////////////////////////////////////////////////////////
3511 const Int_t kvertexnumber = 8;
3512 ///////////////////////////////////////
3513 // Vertex Positioning for TGeoXTru
3514 ///////////////////////////////////////
3515 TVector3** vertexposition = new TVector3*[2*kvertexnumber+nedges+1];
3516 vertexposition[0] = new TVector3(0.0,0.0);
3517 vertexposition[1] = new TVector3(0.0,fgkSSDCoolingBlockHeight[1]);
3518 vertexposition[2] = new TVector3(fgkSSDCoolingBlockHoleLength[1],
3519 vertexposition[1]->Y());
3520 vertexposition[3] = new TVector3(vertexposition[2]->X(),
3521 vertexposition[2]->Y()+fgkSSDCoolingBlockHeight[2]);
3522 vertexposition[4] = new TVector3(vertexposition[1]->X(),vertexposition[3]->Y());
3523 vertexposition[5] = new TVector3(vertexposition[4]->X(),
3524 + vertexposition[3]->Y()+fgkSSDCoolingBlockHoleRadius[1]);
3525 vertexposition[6] = new TVector3(Xfrom2Points(vertexposition[5]->X(),
3526 vertexposition[5]->Y(),0.5*(fgkSSDCoolingBlockLength
3527 - fgkSSDCoolingBlockHoleLength[0]
3528 - 4.*fgkSSDCoolingBlockHoleRadius[1]),
3529 fgkSSDCoolingBlockHeight[0]
3530 - fgkSSDCoolingBlockHoleRadius[1],
3531 fgkSSDCoolingBlockHeight[0]),fgkSSDCoolingBlockHeight[0]);
3532 vertexposition[7] = new TVector3(0.5*(fgkSSDCoolingBlockLength
3533 - fgkSSDCoolingBlockHoleLength[0]),
3534 vertexposition[6]->Y());
3535 Double_t alpha = TMath::ACos(0.5*fgkSSDCoolingBlockHoleLength[0]
3536 / fgkSSDCoolingBlockHoleRadius[0])*TMath::RadToDeg();
3537 Double_t phi = 180.-alpha;
3538 Double_t psi = 180.+2.*alpha;
3539 Double_t deltapsi = psi/nedges;
3540 Double_t radius = fgkSSDCoolingBlockHoleRadius[0]/CosD(0.5*deltapsi);
3541 TVector3* transvector = new TVector3(0.5*fgkSSDCoolingBlockLength,
3542 fgkSSDCoolingBlockHoleCenter);
3543 for(Int_t i=0; i<nedges+1; i++){
3544 vertexposition[kvertexnumber+i] = new TVector3(radius*CosD(phi+i*deltapsi),
3545 radius*SinD(phi+i*deltapsi));
3546 *vertexposition[kvertexnumber+i] += (*transvector);
3547 }
3548 Double_t param[4] = {1.0,0.0,0.0,-0.5*fgkSSDCoolingBlockLength};
3549 for(Int_t i=0; i<kvertexnumber; i++)
3550 vertexposition[kvertexnumber+nedges+1+i] =
3551 GetReflection(vertexposition[kvertexnumber-1-i],param);
3552 ///////////////////////////////////////////////////////////////////////
3553 // TGeoXTru Volume definition for Cooling Tube Support Arc Part
3554 ///////////////////////////////////////////////////////////////////////
3555 TGeoXtru* ssdcoolingblockshape = new TGeoXtru(2);
3556 Double_t* xvertexpoints = new Double_t[2*kvertexnumber+nedges+1];
3557 Double_t* yvertexpoints = new Double_t[2*kvertexnumber+nedges+1];
3558 for(Int_t i=0; i<2*kvertexnumber+nedges+1; i++){
3559 xvertexpoints[i] = vertexposition[i]->X();
3560 yvertexpoints[i] = vertexposition[i]->Y();
3561 }
3562 ssdcoolingblockshape->DefinePolygon(2*kvertexnumber+nedges+1,xvertexpoints,
3563 yvertexpoints);
3564 ssdcoolingblockshape->DefineSection(0,-0.5*fgkSSDCoolingBlockWidth);
3565 ssdcoolingblockshape->DefineSection(1,0.5*fgkSSDCoolingBlockWidth);
3566 TGeoVolume* ssdcoolingblock = new TGeoVolume("SSDCoolingBlock",
3567 ssdcoolingblockshape,
3568 fSSDAlCoolBlockMedium);
3569 ssdcoolingblock->SetLineColor(fColorAl);
3570 /////////////////////////////////////////////////////////////
3571 // Deallocating memory
3572 /////////////////////////////////////////////////////////////
3573 delete [] vertexposition;
3574 delete [] xvertexpoints;
3575 delete [] yvertexpoints;
3576 /////////////////////////////////////////////////////////////
3577 return ssdcoolingblock;
3578}
3579/////////////////////////////////////////////////////////////////////////////////
3580TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth, Int_t nedges){
3581 ///////////////////////////////////////////////////////
3582 const Int_t kssdchipcablesnumber = 2;
3583 const Int_t kssdchipcableslaynumber = 2;
3584 const Int_t kvertexnumber = 4*(nedges+1)+4;
3585 Int_t ssdchipcablescolor[kssdchipcableslaynumber] = {fColorAl,fColorPolyhamide};
3586 Double_t ssdchipcablesradius[kssdchipcableslaynumber];
3587 ssdchipcablesradius[0] = 0.25*(SSDChipCablesHeigth
3588 - fgkSSDChipCablesHeight[0]
3589 - fgkSSDChipCablesHeight[1]);
3590 ssdchipcablesradius[1] = ssdchipcablesradius[0]-fgkSSDChipCablesHeight[0];
3591 Double_t ssdchipcablespiecelength[kssdchipcablesnumber];
3592 ssdchipcablespiecelength[0] = 0.5*(fgkSSDChipCablesWidth[0]
3593 - 2.*TMath::Pi()*ssdchipcablesradius[0]
3594 - ssdchipcablesradius[0]
3595 - fgkSSDChipCablesWidth[1]
3596 - fgkSSDChipCablesWidth[2]);
3597 ssdchipcablespiecelength[1] = ssdchipcablespiecelength[0]
3598 - 0.5*(fgkSSDModuleStiffenerPosition[1]
3599 + fgkSSDChipCablesHeight[1]
3600 + fgkSSDSensorHeight);
3601 ///////////////////////////////////////////////////////
3602 // Vertex Positioning for TGeoXTrue Layer 1 and Layer 2
3603 ///////////////////////////////////////////////////////
3604 TVector3** vertexposition[kssdchipcableslaynumber];
3605 for(Int_t i=0; i<kssdchipcableslaynumber; i++) vertexposition[i] =
3606 new TVector3*[4*(nedges+1)+4];
3607 Double_t ratio[4];
3608 ratio[0] = ssdchipcablesradius[1]/ssdchipcablesradius[0];
3609 ratio[1] = (ssdchipcablesradius[1]-fgkSSDChipCablesHeight[1])
3610 / ssdchipcablesradius[0];
3611 ratio[2] = (ssdchipcablesradius[0]+fgkSSDChipCablesHeight[0])
3612 / ssdchipcablesradius[0];
3613 ratio[3] = (ssdchipcablesradius[0]+fgkSSDChipCablesHeight[0]
3614 + fgkSSDChipCablesHeight[1])
3615 / ssdchipcablesradius[0];
3616 Double_t phi = 180.;
3617 Double_t deltaphi = 180./nedges;
3618 Double_t angle = 0.0;
3619 Double_t **xvertexpoints = new Double_t*[kssdchipcableslaynumber];
3620 Double_t **yvertexpoints = new Double_t*[kssdchipcableslaynumber];
3621 for(Int_t i=0; i<kssdchipcableslaynumber;i++){
3622 xvertexpoints[i] = new Double_t[kvertexnumber];
3623 yvertexpoints[i] = new Double_t[kvertexnumber];
3624 }
3625 TVector3* vertex = new TVector3();
3626 TVector3* transvector[kssdchipcableslaynumber];
3627 transvector[0] = new TVector3(fgkSSDChipWidth,
3628 SSDChipCablesHeigth-ssdchipcablesradius[0]);
3629 transvector[1] = new TVector3();
3630 TGeoXtru* ssdchipcableshape[kssdchipcableslaynumber*kssdchipcableslaynumber];
3631 TGeoVolume* ssdchipcable[kssdchipcableslaynumber*kssdchipcableslaynumber];
3632 const char* ssdchipcablename[kssdchipcableslaynumber*kssdchipcableslaynumber] =
3633 {"SSDChipcableAllay1Left","SSDChipcableKaptonlay2Left",
3634 "SSDChipcableAllay1Right","SSDChipcableKaptonlay2Right"};
3635 for(Int_t k=0; k<kssdchipcablesnumber; k++){
3636 transvector[1]->SetX(fgkSSDChipWidth-ssdchipcablespiecelength[k]);
3637 transvector[1]->SetY(ssdchipcablesradius[0]
3638 + fgkSSDChipCablesHeight[0]
3639 + fgkSSDChipCablesHeight[1]);
3640 for(Int_t i=0; i<kssdchipcableslaynumber; i++){
3641 vertexposition[i][0] = new TVector3(0.,SSDChipCablesHeigth
3642 - fgkSSDChipCablesHeight[0]-i*fgkSSDChipCablesHeight[1]);
3643 vertexposition[i][1] = new TVector3(0.,SSDChipCablesHeigth
3644 - i*fgkSSDChipCablesHeight[0]);
3645 vertexposition[i][2*(nedges+1)+2] =
3646 new TVector3(fgkSSDChipWidth+ssdchipcablesradius[0]
3647 + fgkSSDChipCablesWidth[1]
3648 + fgkSSDChipCablesWidth[2],
3649 ((1.-i)*fgkSSDChipCablesHeight[i]
3650 + fgkSSDChipCablesHeight[1]));
3651 vertexposition[i][2*(nedges+1)+3] =
3652 new TVector3(vertexposition[i][2*(nedges+1)+2]->X(),
3653 vertexposition[i][2*(nedges+1)+2]->Y()
3654 - fgkSSDChipCablesHeight[i]);
3655 for(Int_t j=0; j<nedges+1; j++){
3656 angle = 0.5*phi+TMath::Power(-1,i+1)*j*deltaphi;
3657 vertex->SetX(ssdchipcablesradius[0]*CosD(angle));
3658 vertex->SetY(ssdchipcablesradius[0]*SinD(angle));
3659 vertexposition[0][(nedges+1)*i+j+2] =
3660 new TVector3(*vertex+*transvector[i]);
3661 vertexposition[1][(nedges+1)*i+j+2] =
3662 new TVector3(vertex->X()*ratio[2*i]+transvector[i]->X(),
3663 vertex->Y()*ratio[2*i]+transvector[i]->Y());
3664 vertexposition[0][(4-i)*(nedges+1)+4-j-1] =
3665 new TVector3(*vertexposition[1][(nedges+1)*i+j+2]);
3666 vertexposition[1][(4-i)*(nedges+1)+4-j-1] =
3667 new TVector3(vertex->X()*ratio[2*i+1]
3668 + transvector[i]->X(),
3669 vertex->Y()*ratio[2*i+1]
3670 + transvector[i]->Y());
3671 }
3672 }
3673 for(Int_t i=0; i<kssdchipcableslaynumber; i++){
3674 for(Int_t j=0; j<kvertexnumber; j++){
3675 xvertexpoints[i][j] = vertexposition[i][j]->X();
3676 yvertexpoints[i][j] = vertexposition[i][j]->Y();
3677 }
3678 ssdchipcableshape[kssdchipcablesnumber*k+i] = new TGeoXtru(2);
3679 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefinePolygon(kvertexnumber,
3680 xvertexpoints[i],yvertexpoints[i]);
3681 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefineSection(0,-0.5*fgkSSDChipCablesLength[1]);
3682 ssdchipcableshape[kssdchipcablesnumber*k+i]->DefineSection(1,+0.5*fgkSSDChipCablesLength[1]);
3683 ssdchipcable[kssdchipcablesnumber*k+i] =
3684 new TGeoVolume(ssdchipcablename[kssdchipcablesnumber*k+i],
3685 ssdchipcableshape[kssdchipcablesnumber*k+i],
3686 (kssdchipcablesnumber*k+i)%2==0?
3687 fSSDAlTraceChipCableMedium:fSSDKaptonChipCableMedium);
3688 ssdchipcable[kssdchipcablesnumber*k+i]->SetLineColor(ssdchipcablescolor[i]);
3689 }
3690 for(Int_t i=0; i<kssdchipcableslaynumber; i++)
3691 for(Int_t j=0; j<kvertexnumber; j++) delete vertexposition[i][j];
3692 }
3693 /////////////////////////////////////////////////////////////
3694 // Mother Volume definition
3695 /////////////////////////////////////////////////////////////
3696 Double_t ssdchipseparation = fgkSSDSensorLength
3697 - 2.*fgkSSDModuleStiffenerPosition[1]
3698 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
3699 - 0.5*fgkSSDChipWidth)-fgkSSDChipWidth;
3700 Double_t boxorigin[3] = {-0.5*ssdchipseparation,0.,0.5*SSDChipCablesHeigth};
3701 Double_t dx = ssdchipseparation+2.*(fgkSSDChipWidth+ssdchipcablesradius[0]
3702 +fgkSSDChipCablesWidth[1]
3703 +fgkSSDChipCablesWidth[2]);
3704 Double_t dy = fgkSSDChipCablesLength[1];
3705 Double_t dz = SSDChipCablesHeigth;
3706 new TGeoBBox(0.5*dx,0.5*dy,0.5*dz,boxorigin);
3707 TGeoVolumeAssembly* ssdchipcablesmother = new TGeoVolumeAssembly("SSDChipCablesMother");
3708// TGeoVolume* ssdchipcablesmother = new TGeoVolume("SSDChipCablesMother",
3709// ssdchipcablesmotherbox,fSSDAir);
3710 /////////////////////////////////////////////////////////////
3711 // Rotation and Translation Definition for positioning
3712 /////////////////////////////////////////////////////////////
3713 TGeoRotation* ssdchipcablesrot[5];
3714 ssdchipcablesrot[0] = new TGeoRotation("",90.,180.,-90);
3715 ssdchipcablesrot[1] = new TGeoRotation("",0.0,90.0,0.0);
3716 ssdchipcablesrot[2] = new TGeoRotation((*ssdchipcablesrot[1])*(*ssdchipcablesrot[0]));
3717 ssdchipcablesrot[3] = new TGeoRotation("",180.,0.0,0.0);
3718 ssdchipcablesrot[4] = new TGeoRotation((*ssdchipcablesrot[3])*(*ssdchipcablesrot[2]));
3719 TGeoCombiTrans* ssdchipcablescombitrans = new TGeoCombiTrans(-ssdchipseparation,
3720 0.,0.,ssdchipcablesrot[2]);
3721 ssdchipcablesmother->AddNode(ssdchipcable[0],1,ssdchipcablesrot[4]);
3722 ssdchipcablesmother->AddNode(ssdchipcable[1],1,ssdchipcablesrot[4]);
3723 ssdchipcablesmother->AddNode(ssdchipcable[2],1,ssdchipcablescombitrans);
3724 ssdchipcablesmother->AddNode(ssdchipcable[3],1,ssdchipcablescombitrans);
3725 /////////////////////////////////////////////////////////////
3726 // Deallocating memory
3727 /////////////////////////////////////////////////////////////
3728 for(Int_t i=0; i<kssdchipcableslaynumber;i++){
3729 delete [] xvertexpoints[i];
3730 delete [] yvertexpoints[i];
3731 }
3732 for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete [] vertexposition[i];
3733 for(Int_t i=0; i<kssdchipcableslaynumber; i++) delete transvector[i];
3734 delete vertex;
3735 delete ssdchipcablesrot[0];
3736 delete ssdchipcablesrot[1];
3737 delete ssdchipcablesrot[3];
3738 /////////////////////////////////////////////////////////////
3739 return ssdchipcablesmother;
3740}
3741///////////////////////////////////////////////////////////////////////////////
3742TList* AliITSv11GeometrySSD::GetSSDChipSystem(){
3743 /////////////////////////////////////////////////////////////
3744 // SSD Chip Assembly
3745 /////////////////////////////////////////////////////////////
3746 TGeoVolume* ssdchipassembly = GetSSDChips();
3747 TList* ssdchipsystemlist = new TList();
3748// const Int_t knedges = 20;
3749 const Int_t knedges = 5;
3750 const Int_t kchipsystemnumber = 2;
3751
3752 TGeoVolumeAssembly* chipsystemother[kchipsystemnumber];
3753 const char* chipsytemothername[kchipsystemnumber] =
3754 {"SSDChipSytemother1","SSDChipSytemother2"};
3755 for(Int_t i=0; i<kchipsystemnumber; i++){
3756 chipsystemother[i] = new TGeoVolumeAssembly(chipsytemothername[i]);
3757 }
3758 /////////////////////////////////////////////////////////////
3759 // SSD Chip Cables
3760 /////////////////////////////////////////////////////////////
3761 TGeoVolume* ssdchipcables[kchipsystemnumber];
3762 TGeoRotation** ssdchipcablesrot[kchipsystemnumber];
3763 TGeoTranslation** ssdchipcablestrans[kchipsystemnumber];
3764 TGeoCombiTrans** ssdchipcablescombitrans[kchipsystemnumber];
3765 //////////////////
3766 for(Int_t i=0; i<kchipsystemnumber; i++){
3767 ssdchipcables[i] =
3768 GetSSDChipCables(fgkSSDChipCablesHeight[i+2],knedges);
3769 ssdchipcablestrans[i] = new TGeoTranslation*[fgkSSDChipNumber];
3770 ssdchipcablesrot[i] = new TGeoRotation*[fgkSSDChipNumber];
3771 ssdchipcablescombitrans[i] = new TGeoCombiTrans*[fgkSSDChipNumber];
3772 }
3773 for(Int_t i=0; i<kchipsystemnumber; i++){
3774 for(Int_t j=0; j<fgkSSDChipNumber; j++){
3775 ssdchipcablestrans[i][j] = new TGeoTranslation();
3776 ssdchipcablesrot[i][j] = new TGeoRotation();
3777 ssdchipcablescombitrans[i][j] = new TGeoCombiTrans();
3778 ssdchipcablesrot[i][j]->SetAngles(-90.0,0.0,0.0);
3779 ssdchipcablestrans[i][j]->SetTranslation(j*(fgkSSDChipLength
3780 + fgkSSDChipSeparationLength),
3781 0.5*fgkSSDChipWidth,
3782 - 0.5*fgkSSDChipHeight
3783 - fgkSSDChipCablesHeight[i+2]);
3784 ssdchipcablescombitrans[i][j]->SetRotation(*ssdchipcablesrot[i][j]);
3785 ssdchipcablescombitrans[i][j]->SetTranslation(*ssdchipcablestrans[i][j]);
3786 chipsystemother[i]->AddNode(ssdchipcables[i],j+1,ssdchipcablescombitrans[i][j]);
3787 }
3788 chipsystemother[i]->AddNode(ssdchipassembly,i+1);
3789 ssdchipsystemlist->Add(chipsystemother[i]);
3790 }
3791 /////////////////////////////////////////////////////////////
3792 // Deallocating memory
3793 /////////////////////////////////////////////////////////////
3794 for(Int_t i=0; i<kchipsystemnumber; i++){
3795 for(Int_t j=0; j<fgkSSDChipNumber; j++){
3796 delete ssdchipcablesrot[i][j];
3797 delete ssdchipcablestrans[i][j];
3798 }
3799 delete [] ssdchipcablesrot[i];
3800 delete [] ssdchipcablestrans[i];
3801 }
3802 /////////////////////////////////////////////////////////////
3803 return ssdchipsystemlist;
3804}
3805
3806//_____________________________________________________________________________
3807TGeoVolume* AliITSv11GeometrySSD::GetSSDChips() const{
3808 /////////////////////////////////////////////////////////////
3809 // SSD Chip Assembly Generation
3810 /////////////////////////////////////////////////////////////
3811 const Int_t kssdchiprownumber = 2;
3812 TGeoBBox* ssdchipcompshape[2];
3813 ssdchipcompshape[0] = new TGeoBBox("SSDChipCompShape",
3814 0.5*fgkSSDChipLength,
3815 0.5*fgkSSDChipWidth,
3816 0.5*(fgkSSDChipHeight-fgkSSDChipGlueHeight));
3817 ssdchipcompshape[1] = new TGeoBBox("SSDChipGlueCompShape",
3818 0.5*fgkSSDChipLength,
3819 0.5*fgkSSDChipWidth,
3820 0.5*fgkSSDChipGlueHeight);
3821 TGeoVolume* ssdchipcomp[2];
3822 ssdchipcomp[0] = new TGeoVolume("SSDChipComp",ssdchipcompshape[0],fSSDChipMedium);
3823 ssdchipcomp[1] = new TGeoVolume("SSDChipGlueComp",ssdchipcompshape[1],
3824 fSSDChipGlueMedium);
3825 ssdchipcomp[0]->SetLineColor(fColorSilicon);
3826 ssdchipcomp[1]->SetLineColor(fColorEpoxy);
3827 TGeoTranslation* ssdchipcomptrans[2];
3828 ssdchipcomptrans[0] = new TGeoTranslation(0.,0.,-ssdchipcompshape[1]->GetDZ());
3829 ssdchipcomptrans[1] = new TGeoTranslation(0.,0.,ssdchipcompshape[0]->GetDZ());
3830 /////////////////////////////////////////////////////////////
3831 // Virtual Volume containing SSDChip
3832 /////////////////////////////////////////////////////////////
3833 TGeoBBox* ssdvirtualchipshape = new TGeoBBox("SSDChipShape",0.5*fgkSSDChipLength,
3834 0.5*fgkSSDChipWidth,
3835 0.5*fgkSSDChipHeight);
3836 TGeoVolume* ssdchip = new TGeoVolume("SSDChip",ssdvirtualchipshape,fSSDAir);
3837 /////////////////////////////////////////////////////////////
3838 for(Int_t i=0; i<2; i++) ssdchip->AddNode(ssdchipcomp[i],1,ssdchipcomptrans[i]);
3839 Double_t ssdchipseparation[2] = {fgkSSDChipLength+fgkSSDChipSeparationLength,
3840 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
3841 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
3842 - 0.5*fgkSSDChipWidth)};
3843 /////////////////////////////////////////////////////////////
3844 // Virtual Volume containing SSDChipAssembly
3845 /////////////////////////////////////////////////////////////
3846 TGeoXtru* ssdchipmothershape = new TGeoXtru(2);
3847 const Int_t kssdmothervertexnumber = 2*fgkSSDChipNumber;
3848 Double_t xmothervertex[kssdmothervertexnumber];
3849 Double_t ymothervertex[kssdmothervertexnumber];
3850 ///////////////////////
3851 // Setting the vertices
3852 ///////////////////////
3853 xmothervertex[0] = -0.5*fgkSSDChipLength,ymothervertex[0] = -0.5*fgkSSDChipWidth;
3854 xmothervertex[1] = xmothervertex[0], ymothervertex[1] = ssdchipseparation[1]
3855 - ymothervertex[0];
3856 xmothervertex[2] = (fgkSSDChipNumber-1)*ssdchipseparation[0]-xmothervertex[0];
3857 ymothervertex[2] = ymothervertex[1];
3858 xmothervertex[3] = xmothervertex[2], ymothervertex[3] = ymothervertex[0];
3859 xmothervertex[4] = ssdchipseparation[0]+xmothervertex[0];
3860 ymothervertex[4] = ymothervertex[0];
3861 xmothervertex[5] = xmothervertex[4], ymothervertex[5] = -ymothervertex[4];
3862 xmothervertex[6] = (fgkSSDChipNumber-1)*ssdchipseparation[0]
3863 + (0.5*fgkSSDChipLength-fgkSSDChipWidth);
3864 ymothervertex[6] = ymothervertex[5];
3865 xmothervertex[7] = xmothervertex[6], ymothervertex[7] = ymothervertex[2]
3866 - fgkSSDChipWidth;
3867 xmothervertex[8] = -0.5*fgkSSDChipLength+fgkSSDChipWidth;
3868 ymothervertex[8] = ymothervertex[7];
3869 xmothervertex[9] = -0.5*fgkSSDChipLength+fgkSSDChipWidth;
3870 ymothervertex[9] = ymothervertex[6];
3871 xmothervertex[10] = -xmothervertex[0], ymothervertex[10] = ymothervertex[9];
3872 xmothervertex[11] = xmothervertex[10], ymothervertex[11] = ymothervertex[0];
3873 //////////////////////////////////////////////////////////
3874 ssdchipmothershape->DefinePolygon(kssdmothervertexnumber,
3875 xmothervertex,ymothervertex);
3876 ssdchipmothershape->DefineSection(0,-0.5*fgkSSDChipHeight);
3877 ssdchipmothershape->DefineSection(1, 0.5*fgkSSDChipHeight);
3878// TGeoVolume* ssdchipmother = new TGeoVolume("SSDChipContainer",
3879// ssdchipmothershape,fSSDAir);
3880 TGeoVolumeAssembly* ssdchipmother = new TGeoVolumeAssembly("SSDChipContainer");
3881 /////////////////////////////////////////////////////////////
3882 for(Int_t i=0; i<kssdchiprownumber; i++)
3883 for(Int_t j=0; j<fgkSSDChipNumber; j++)
3884 ssdchipmother->AddNode(ssdchip,fgkSSDChipNumber*i+j+1,
3885 new TGeoTranslation(j*ssdchipseparation[0],i*ssdchipseparation[1],0.));
3886 return ssdchipmother;
3887}
3888/////////////////////////////////////////////////////////////////////////////////
3889TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t ssdendladdercablelength){
3890 /////////////////////////////////////////////////////////////
3891 // Method returning a List containing pointers to Ladder Cable Volumes
3892 /////////////////////////////////////////////////////////////
3893 const Int_t kladdercablesegmentnumber = 2;
3894 /////////////////////////////////////////
3895 // LadderSegmentBBox Volume
3896 /////////////////////////////////////////
3897 static TGeoBBox* laddercablesegmentbboxshape[kladdercablesegmentnumber] = {0,0};
3898 const char* laddercablesegmentbboxshapename[kladdercablesegmentnumber] =
3899 {"LadderCableSegmentBBoxShape1","LadderCableSegmentBBoxShape2"};
3900
3901
3902 const char* laddercablesegmentbboxname[kladdercablesegmentnumber] =
3903 {"LadderCableSegmentBBox1","LadderCableSegmentBBox2"};
3904 static TGeoVolume* laddercablesegmentbbox[kladdercablesegmentnumber];
3905
3906 static TGeoTranslation* laddercablesegmentbboxtrans[kladdercablesegmentnumber] = {
3907 new TGeoTranslation("LadderCableSegmentBBoxTrans1",
3908 0.5*fgkSSDFlexWidth[0],
3909 0.5*fgkSSDLadderCableWidth,
3910 0.5*fgkSSDFlexHeight[0]),
3911 new TGeoTranslation("LadderCableSegmentBBoxTrans2",
3912 0.5*fgkSSDFlexWidth[0],
3913 0.5*fgkSSDLadderCableWidth,
3914 fgkSSDFlexHeight[0]
3915 +0.5*fgkSSDFlexHeight[1])
3916 };
3917 static TGeoVolume* laddercablesegmentbboxassembly = new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly") ;
3918 static TGeoVolume* laddercablesegmentarbassembly =
3919 new TGeoVolumeAssembly("LadderCableSegmentArbAssembly");
3920
3921 static TGeoArb8* laddercablesegmentarbshape[kladdercablesegmentnumber];
3922 static TGeoVolume* laddercablesegmentarb[kladdercablesegmentnumber];
3923
3924 if (laddercablesegmentbboxshape[0] == 0) {
3925 // Initialise static shapes and volumes
3926 for(Int_t i=0; i<kladdercablesegmentnumber; i++) laddercablesegmentbboxshape[i] =
3927 new TGeoBBox(laddercablesegmentbboxshapename[i],
3928 0.5*fgkSSDFlexWidth[0],
3929 0.5*fgkSSDLadderCableWidth,
3930 0.5*fgkSSDFlexHeight[i]);
3931
3932 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3933 laddercablesegmentbbox[i] =
3934 new TGeoVolume(laddercablesegmentbboxname[i],
3935 laddercablesegmentbboxshape[i],
3936 (i==0?fSSDAlTraceLadderCableMedium:
3937 fSSDKaptonLadderCableMedium));
3938 laddercablesegmentbbox[i]->SetLineColor(i==0 ? fColorAl :
3939 fColorPolyhamide);
3940 }
3941
3942 for(Int_t i=0; i<kladdercablesegmentnumber; i++)
3943 laddercablesegmentbboxassembly->AddNode(laddercablesegmentbbox[i],1,
3944 laddercablesegmentbboxtrans[i]);
3945/////////////////////////////////////////
3946// LadderSegmentArb8 Volume
3947/////////////////////////////////////////
3948 const Int_t kvertexnumber = 4;
3949 TVector3** laddercablesegmentvertexposition[kladdercablesegmentnumber];
3950 for(Int_t i = 0; i<kladdercablesegmentnumber; i++) laddercablesegmentvertexposition[i] =
3951 new TVector3*[kvertexnumber];
3952//Shape Vertex Positioning
3953 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3954 laddercablesegmentvertexposition[i][0] = new TVector3(0.,i*fgkSSDFlexHeight[0]);
3955 laddercablesegmentvertexposition[i][1] = new TVector3(fgkSSDLadderCableWidth,
3956 i*fgkSSDFlexHeight[0]);
3957 laddercablesegmentvertexposition[i][2] = new TVector3(0.,fgkSSDFlexHeight[0]
3958 + fgkSSDFlexHeight[1]
3959 + i*fgkSSDFlexHeight[0]);
3960 laddercablesegmentvertexposition[i][3] =
3961 new TVector3(laddercablesegmentvertexposition[i][1]->X(),
3962 laddercablesegmentvertexposition[i][2]->Y());
3963 }
3964 Double_t laddercablesegmentwidth[2][2] = {{fgkSSDFlexHeight[0],fgkSSDFlexHeight[0]},
3965 {fgkSSDFlexHeight[1],fgkSSDFlexHeight[1]}};
3966 const char* laddercablesegmentarbshapename[kladdercablesegmentnumber] =
3967 {"LadderCableSegmentArbShape1","LadderCableSegmentArbShape2"};
3968
3969 for(Int_t i = 0; i< kladdercablesegmentnumber; i++) laddercablesegmentarbshape[i] =
3970 GetArbShape(laddercablesegmentvertexposition[i],
3971 laddercablesegmentwidth[i],
3972 fgkCarbonFiberJunctionWidth-fgkSSDFlexWidth[0],
3973 laddercablesegmentarbshapename[i]);
3974 const char* laddercablesegmentarbname[kladdercablesegmentnumber] =
3975 {"LadderCableSegmentArb1","LadderCableSegmentArb2"};
3976
3977 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
3978 laddercablesegmentarb[i] =
3979 new TGeoVolume(laddercablesegmentarbname[i],
3980 laddercablesegmentarbshape[i],
3981 (i==0?fSSDAlTraceLadderCableMedium:
3982 fSSDKaptonLadderCableMedium));
3983 laddercablesegmentarb[i]->SetLineColor(i==0 ? fColorAl :
3984 fColorPolyhamide);
3985}
3986 TGeoRotation* laddercablesegmentarbrot[kladdercablesegmentnumber];
3987 laddercablesegmentarbrot[0] = new TGeoRotation("LadderCableSegmentArbRot1",
3988 90.,90,-90.);
3989 laddercablesegmentarbrot[1] = new TGeoRotation("LadderCableSegmentArbRot2",
3990 0.,90.,0.);
3991 TGeoCombiTrans* laddercablesegmentarbcombitrans =
3992 new TGeoCombiTrans("LadderCableSegmentArbCombiTrans",
3993 0.5*(fgkCarbonFiberJunctionWidth-fgkSSDFlexWidth[0])
3994 + fgkSSDFlexWidth[0],0.,0.,
3995 new TGeoRotation((*laddercablesegmentarbrot[1])
3996 *(*laddercablesegmentarbrot[0])));
3997 for(Int_t i=0; i<kladdercablesegmentnumber; i++)
3998 laddercablesegmentarbassembly->AddNode(laddercablesegmentarb[i],1,
3999 laddercablesegmentarbcombitrans);
4000 } // End of static initialisations
4001/////////////////////////////////////////
4002// End Ladder Cable Volume
4003// Note: this part depends explicitly on the length passed as an argument to the function
4004/////////////////////////////////////////
4005 TGeoBBox* ladderendcablesegmentbboxshape[kladdercablesegmentnumber];
4006 const char* ladderendcablesegmentbboxshapename[kladdercablesegmentnumber] =
4007 {"LadderEndCableSegmentBBoxShape1","LadderEndCableSegmentBBoxShape2"};
4008 for(Int_t i=0; i<kladdercablesegmentnumber; i++) ladderendcablesegmentbboxshape[i] =
4009 new TGeoBBox(ladderendcablesegmentbboxshapename[i],
4010 0.5*ssdendladdercablelength,
4011 0.5*fgkSSDLadderCableWidth,
4012 0.5*fgkSSDFlexHeight[i]);
4013 const char* ladderendcablesegmentbboxname[kladdercablesegmentnumber] =
4014 {"LadderEndCableSegmentBBox1","LadderEndCableSegmentBBox2"};
4015 TGeoVolume* ladderendcablesegmentbbox[kladdercablesegmentnumber];
4016 for(Int_t i=0; i<kladdercablesegmentnumber; i++){
4017 ladderendcablesegmentbbox[i] =
4018 new TGeoVolume(ladderendcablesegmentbboxname[i],
4019 ladderendcablesegmentbboxshape[i],
4020 (i==0?fSSDAlTraceLadderCableMedium:
4021 fSSDKaptonLadderCableMedium));
4022 ladderendcablesegmentbbox[i]->SetLineColor(i==0 ? fColorAl :
4023 fColorPolyhamide);
4024 }
4025 TGeoTranslation* ladderendcablesegmentbboxtrans[kladdercablesegmentnumber];
4026 ladderendcablesegmentbboxtrans[0] =
4027 new TGeoTranslation("LadderEndCableSegmentBBoxTrans0",
4028 0.5*ssdendladdercablelength,
4029 0.5*fgkSSDLadderCableWidth,
4030 0.5*fgkSSDFlexHeight[0]);
4031 ladderendcablesegmentbboxtrans[1] =
4032 new TGeoTranslation("LadderEndCableSegmentBBoxTrans1",
4033 0.5*ssdendladdercablelength,
4034 0.5*fgkSSDLadderCableWidth,
4035 fgkSSDFlexHeight[0]
4036 +0.5*fgkSSDFlexHeight[1]);
4037 TGeoVolume* ladderendcablesegmentbboxassembly =
4038 new TGeoVolumeAssembly("LadderEndCableSegmentBBoxAssembly");
4039 for(Int_t i=0; i<kladdercablesegmentnumber; i++)
4040 ladderendcablesegmentbboxassembly->AddNode(ladderendcablesegmentbbox[i],1,
4041 ladderendcablesegmentbboxtrans[i]);
4042/////////////////////////////////////////
4043 TList* laddercablesegmentlist = new TList();
4044 laddercablesegmentlist->Add(laddercablesegmentbboxassembly);
4045 laddercablesegmentlist->Add(laddercablesegmentarbassembly);
4046 laddercablesegmentlist->Add(ladderendcablesegmentbboxassembly);
4047 return laddercablesegmentlist;
4048}
4049
4050/////////////////////////////////////////////////////////////////////////////////
4051TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t ssdendladdercablelength){
4052 /////////////////////////////////////////////////////////////
4053 // Method generating Ladder Cable Volumes Assemblies
4054 /////////////////////////////////////////////////////////////
4055 TList* laddercablesegmentlist = GetLadderCableSegment(ssdendladdercablelength);
4056 TGeoVolume* laddercable = new TGeoVolumeAssembly("LadderCable");
4057 for(Int_t i=0; i<n; i++){
4058 TGeoTranslation* laddercabletrans = new TGeoTranslation(
4059 i*(fgkCarbonFiberJunctionWidth),
4060 fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
4061 i*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
4062 laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(0),i+1,laddercabletrans);
4063 if(i!=n-1) laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(1),i+1,laddercabletrans);
4064 }
4065 TGeoTranslation* endladdercabletrans = new TGeoTranslation("EndLadderCableTrans",
4066 (n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
4067 fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
4068 (n-1)*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
4069 laddercable->AddNode((TGeoVolume*)laddercablesegmentlist->At(2),1,endladdercabletrans);
4070 return laddercable;
4071}
4072/////////////////////////////////////////////////////////////////////////////////
4073TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t ssdendladdercablelength){
4074 /////////////////////////////////////////////////////////////
4075 // Method generating Ladder Cable Volumes Assembly
4076 /////////////////////////////////////////////////////////////
4077 TGeoVolume* laddercableassembly = new TGeoVolumeAssembly("LadderCableAssembly");
4078 char laddercabletransname[100];
4079 for(Int_t i=0; i<n; i++){
4080 sprintf(laddercabletransname,"LadderCableTrans%i",i+1);
4081 laddercableassembly->AddNode(GetLadderCable(n-i,ssdendladdercablelength),i+1,
4082 new TGeoTranslation(laddercabletransname,i*fgkCarbonFiberJunctionWidth,0.,0.));
4083 }
4084 return laddercableassembly;
4085}
4086/////////////////////////////////////////////////////////////////////////////////
4087TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t ssdendladdercablelength){
4088 /////////////////////////////////////////////////////////////
4089 // Method generating Ladder Cable List Assemblies
4090 /////////////////////////////////////////////////////////////
4091 const Int_t kladdercableassemblynumber = 2;
4092 TGeoVolume* laddercableassembly = GetLadderCableAssembly(n,ssdendladdercablelength);
4093 TGeoVolume* ladderCable[kladdercableassemblynumber];
4094 char laddercableassemblyname[100];
4095 TList* laddercableassemblylist = new TList();
4096 for(Int_t i=0; i<kladdercableassemblynumber; i++){
4097 sprintf(laddercableassemblyname,"LadderCableAssembly%i",i+1);
4098 ladderCable[i] = new TGeoVolumeAssembly(laddercableassemblyname);
4099 ladderCable[i]->AddNode(laddercableassembly,i+1,i==0 ? NULL :
4100 new TGeoCombiTrans((n-1)
4101 * fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
4102 2.*fgkSSDLadderCableWidth+0.5*fgkSSDFlexWidth[0],
4103 0.,new TGeoRotation("",180,0.,0.)));
4104 laddercableassemblylist->Add(ladderCable[i]);
4105}
4106 return laddercableassemblylist;
4107}
4108///////////////////////////////////////////////////////////////////////////////
4109void AliITSv11GeometrySSD::SetLadderSegment(){
4110 /////////////////////////////////////////////////////////////
4111 // Method Generating Ladder Segment Array
4112 /////////////////////////////////////////////////////////////
4113 fladdersegment[0] = new TGeoVolumeAssembly("LadderSegment1");
4114 fladdersegment[1] = new TGeoVolumeAssembly("LadderSegment2");
4115 if(!fCreateMaterials) CreateMaterials();
4116 if(!fTransformationMatrices) CreateTransformationMatrices();
4117 if(!fBasicObjects) CreateBasicObjects();
4118 for(Int_t i=0; i<fgkladdersegmentnumber; i++){
4119 // Placing Carbon Fiber Support
4120 for(Int_t j=0; j<fgkcarbonfibersupportnumber; j++){
4121 fladdersegment[i]->AddNode(fcarbonfibersupport[0],j+1,
4122 fcarbonfibersupportmatrix[j]);
4123 fladdersegment[i]->AddNode(fcarbonfibersupport[1],j+1,
4124 fcarbonfibersupportmatrix[j]);
4125 }
4126 // Placing Carbon Fiber Junction
4127 for(Int_t j=0; j<fgkcarbonfiberjunctionumber; j++)
4128 fladdersegment[i]->AddNode(fcarbonfiberjunction,j+1,
4129 fcarbonfiberjunctionmatrix[j]);
4130 // Placing Carbon Fiber Lower Support
4131 for(Int_t j=0; j<fgkcarbonfiberlowersupportnumber; j++)
4132 fladdersegment[i]->AddNode(fcarbonfiberlowersupport[j],j+1,
4133 fcarbonfiberlowersupportrans[j]);
4134 // Placing SSD Sensor Support
4135 for(Int_t j=0; j<fgkssdsensorsupportnumber; j++)
4136 fladdersegment[i]->AddNode(j<2 ? fssdsensorsupport[0][i] :
4137 fssdsensorsupport[1][i],
4138 j+1,fssdsensorsupportmatrix[j]);
4139 // Placing SSD Cooling Tube Support
4140 for(Int_t j=0; j<fgkcoolingtubesupportnumber; j++)
4141 fladdersegment[i]->AddNode(fcoolingtubesupport,j+1,
4142 fcoolingtubesupportmatrix[j]);
4143 // Placing SSD Cooling Tube
4144 for(Int_t j=0; j<2; j++)
4145 for(Int_t k=0; k<2; k++){
4146 fladdersegment[i]->AddNode(fcoolingtube[0],2*j+k+1,fcoolingtubematrix[j][k]);
4147 fladdersegment[i]->AddNode(fcoolingtube[j+1],k+1,fcoolingtubematrix[2+j][k]);
4148 }
4149 // Placing SSD Hybrid
4150 switch(i){
4151 case 0:
4152 fladdersegment[i]->AddNode(fssdhybridcomponent[0],1,fhybridmatrix);
4153 fladdersegment[i]->AddNode(fssdhybridcomponent[2],1,fhybridmatrix);
4154 break;
4155 case 1:
4156 fladdersegment[i]->AddNode(fssdhybridcomponent[1],1,fhybridmatrix);
4157 fladdersegment[i]->AddNode(fssdhybridcomponent[2],1,fhybridmatrix);
4158 break;
4159 }
4160 // Placing Cooling Block System
4161 fladdersegment[i]->AddNode(fssdcoolingblocksystem,1,fcoolingblocksystematrix);
4162 // Placing SSD Flex
4163 for(Int_t j=0; j<fgkflexnumber; j++){
4164 fladdersegment[i]->AddNode(fssdstiffenerflex,j+1,fstiffenerflexmatrix[j]);
4165 fladdersegment[i]->AddNode(fssdendflex,j+1,fendflexmatrix[j]);
4166 }
4167 }
4168}
4169///////////////////////////////////////////////////////////////////////////////
4170void AliITSv11GeometrySSD::SetEndLadderSegment(){
4171 /////////////////////////////////////////////////////////////
4172 // Method Generating End Ladder
4173 /////////////////////////////////////////////////////////////
4174 // End Ladder Carbon Fiber Junction
4175 /////////////////////////////////////////////////////////////
4176 fendladdersegment[0] = new TGeoVolumeAssembly("EndLadder1");
4177 fendladdersegment[1] = new TGeoVolumeAssembly("EndLadder2");
4178 if(!fCreateMaterials) CreateMaterials();
4179 if(!fTransformationMatrices) CreateTransformationMatrices();
4180 if(!fBasicObjects) CreateBasicObjects();
4181 for(Int_t i=0; i<fgkendlabbercarbonfiberjunctionumber; i++){
4182 for(Int_t j=0; j<fgkendladdercabonfiberjunctionmatrixnumber; j++)
4183 fendladdersegment[i]->AddNode(j==2 ?
4184 fendladdercarbonfiberjunction[i][1] :
4185 fendladdercarbonfiberjunction[i][0],
4186 j+1,fendladdercarbonfiberjunctionmatrix[i][j]);
4187 }
4188 /////////////////////////////////////////////////////////////
4189 // End Ladder Carbon Fiber Support
4190 /////////////////////////////////////////////////////////////
4191 for(Int_t i=0; i<fgkcarbonfibersupportnumber; i++)
4192 for(Int_t j=0; j<fgkendladdercarbonfibermatrixnumber; j++){
4193 fendladdersegment[i]->AddNode(fcarbonfibersupport[0],j+1,
4194 fendladdercarbonfibermatrix[i][j]);
4195 fendladdersegment[i]->AddNode(fcarbonfibersupport[1],j+1,
4196 fendladdercarbonfibermatrix[i][j]);
4197 }
4198 /////////////////////////////////////////////////////////////
4199 // End Ladder Mounting Block
4200 /////////////////////////////////////////////////////////////
4201 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
4202 fendladdersegment[i]->AddNode(fendladdermountingblock,i+1,
4203 fendladdermountingblockcombitrans[i]);
4204 /////////////////////////////////////////////////////////////
4205 // End Ladder Mounting Block Clip
4206 /////////////////////////////////////////////////////////////
4207 for(Int_t i=0; i<fgkendladdermountingblocknumber; i++)
4208 for(Int_t j=0; j<2; j++)
4209 fendladdersegment[i]->AddNode(fendladdermountingblockclip,j+1,
4210 fendladdermountingblockclipmatrix[i][j]);
4211 /////////////////////////////////////////////////////////////
4212 // End Ladder Lower Supports
4213 /////////////////////////////////////////////////////////////
4214 fendladdersegment[0]->AddNode(fcarbonfiberlowersupport[0],1,
4215 fendladderlowersupptrans[0]);
4216 fendladdersegment[1]->AddNode(fcarbonfiberlowersupport[0],2,
4217 fendladderlowersupptrans[1]);
4218 fendladdersegment[1]->AddNode(fcarbonfiberlowersupport[0],3,
4219 fendladderlowersupptrans[2]);
4220 /////////////////////////////////////////////////////////////
4221 // End Ladder Cooling Tube Support
4222 /////////////////////////////////////////////////////////////
4223 for(Int_t i=0; i<2; i++)
4224 for(Int_t j=0; j<(i==0?4:2); j++)
4225 fendladdersegment[i]->AddNode(fcoolingtubesupport,j+1,
4226 fendladdercoolingtubesupportmatrix[i][j]);
4227 /////////////////////////////////////////////////////////////
4228 // End Ladder Cooling Tube Support
4229 /////////////////////////////////////////////////////////////
4230// fendladdersegment[0]->AddNode(fendladdercoolingtube[0],1,fendladdercoolingtubematrix[0][0]);
4231// fendladdersegment[0]->AddNode(fendladdercoolingtube[0],2,fendladdercoolingtubematrix[0][1]);
4232 fendladdersegment[0]->AddNode(fendladdercoolingtube[1],1,fendladdercoolingtubematrix[0][2]);
4233 fendladdersegment[0]->AddNode(fendladdercoolingtube[1],2,fendladdercoolingtubematrix[0][3]);
4234 fendladdersegment[0]->AddNode(fendladdercoolingtube[2],1,fendladdercoolingtubematrix[0][4]);
4235 fendladdersegment[0]->AddNode(fendladdercoolingtube[2],2,fendladdercoolingtubematrix[0][5]);
4236 fendladdersegment[1]->AddNode(fendladdercoolingtube[3],1,fendladdercoolingtubematrix[1][0]);
4237 fendladdersegment[1]->AddNode(fendladdercoolingtube[3],2,fendladdercoolingtubematrix[1][1]);
4238 fendladdersegment[1]->AddNode(fendladdercoolingtube[4],1,fendladdercoolingtubematrix[1][2]);
4239 fendladdersegment[1]->AddNode(fendladdercoolingtube[4],2,fendladdercoolingtubematrix[1][3]);
4240}
4241///////////////////////////////////////////////////////////////////////////////
4242void AliITSv11GeometrySSD::SetLadder(){
4243 /////////////////////////////////////////////////////////////
4244 // Method Generating Ladder of Layer 5 and 6
4245 /////////////////////////////////////////////////////////////
4246 Int_t ssdlaysensorsnumber[fgkladdernumber] = {fgkSSDLay5SensorsNumber,
4247 fgkSSDLay6SensorsNumber};
4248 /////////////////////////////////////////////////////////////////////////////
4249 /// Generating Ladder Mother Volume Containing Ladder
4250 /////////////////////////////////////////////////////////////////////////////
4251 TGeoXtru* laddershape[fgkladdernumber];
4252 for(Int_t i=0; i<fgkladdernumber; i++) laddershape[i] = new TGeoXtru(2);
4253 const Int_t kmothervertexnumber = 8;
4254 Double_t xmothervertex[fgkladdernumber][kmothervertexnumber];
4255 Double_t ymothervertex[fgkladdernumber][kmothervertexnumber];
4256 ///////////////////////
4257 // Setting the vertices
4258 ///////////////////////
4259 Double_t laddercablethickness = (fgkSSDLay6SensorsNumber+2)
4260 * (fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]);
4261 xmothervertex[0][0] = -0.5*fgkSSDSensorWidth;
4262 ymothervertex[0][0] = -0.5*fgkCoolingTubeSupportHeight-fgkSSDModuleCoolingBlockToSensor;
4263 xmothervertex[0][1] = xmothervertex[0][0];
4264 ymothervertex[0][1] = 0.0;
4265 xmothervertex[0][2] = - 0.5*fgkSSDModuleSensorSupportDistance-2.*fgkCoolingTubeSupportRmax
4266 - laddercablethickness/SinD(2.*fgkSSDFlexAngle);
4267 ymothervertex[0][2] = ymothervertex[0][1];
4268 ymothervertex[0][3] = 0.5*fgkCarbonFiberTriangleLength*TanD(2.*fgkSSDFlexAngle);
4269 xmothervertex[0][3] = xmothervertex[0][2]+ymothervertex[0][3]/TanD(2.*fgkSSDFlexAngle);
4270 xmothervertex[0][4] = -xmothervertex[0][3];
4271 ymothervertex[0][4] = ymothervertex[0][3];
4272 xmothervertex[0][5] = -xmothervertex[0][2];
4273 ymothervertex[0][5] = ymothervertex[0][2];
4274 xmothervertex[0][6] = -xmothervertex[0][1];
4275 ymothervertex[0][6] = ymothervertex[0][1];
4276 xmothervertex[0][7] = -xmothervertex[0][0];
4277 ymothervertex[0][7] = ymothervertex[0][0];
4278 for(Int_t i=0; i<kmothervertexnumber; i++){
4279 xmothervertex[1][i] = xmothervertex[0][i];
4280 ymothervertex[1][i] = ymothervertex[0][i];
4281 }
4282///////////////////////////////////////////////////////////////////////////
4283// Disalignement Mother Volume corrections 25/08/08
4284///////////////////////////////////////////////////////////////////////////
4285 TGeoXtru* leftladdershape1[fgkladdernumber];
4286 TGeoXtru* leftladdershape2[fgkladdernumber];
4287 TGeoXtru* centersensorladdershape[fgkladdernumber];
4288 TGeoXtru* rightladdershape1[fgkladdernumber];
4289 TGeoXtru* rightladdershape2[fgkladdernumber];
4290 for(Int_t i=0; i<fgkladdernumber; i++){
4291 leftladdershape1[i] = new TGeoXtru(2);
4292 leftladdershape2[i] = new TGeoXtru(2);
4293 centersensorladdershape[i] = new TGeoXtru(2);
4294 rightladdershape1[i] = new TGeoXtru(2);
4295 rightladdershape2[i] = new TGeoXtru(2);
4296 }
4297 //////////////////////////////////////
4298 // Setting the names for shapes
4299 //////////////////////////////////////
4300 leftladdershape1[0]->SetName("Lay5Left1LadderSegmentContainer");
4301 leftladdershape2[0]->SetName("Lay5Left2LadderSegmentContainer");
4302 leftladdershape1[1]->SetName("Lay6Left1LadderSegmentContainer");
4303 leftladdershape2[1]->SetName("Lay6Left2LadderSegmentContainer");
4304 centersensorladdershape[0]->SetName("Lay5CenterSensorContainer");
4305 centersensorladdershape[1]->SetName("Lay6CenterSensorContainer");
4306 rightladdershape1[0]->SetName("Lay5Right1LadderSegmentContainer");
4307 rightladdershape2[0]->SetName("Lay5Right2LadderSegmentContainer");
4308 rightladdershape1[1]->SetName("Lay6Right1LadderSegmentContainer");
4309 rightladdershape2[1]->SetName("Lay6Right2LadderSegmentContainer");
4310 //////////////////////////////////////
4311 Double_t xend1laddervertex[fgkladdernumber][kmothervertexnumber];
4312 Double_t yend1laddervertex[fgkladdernumber][kmothervertexnumber];
4313 Double_t xcentersensorvertex[fgkladdernumber][kmothervertexnumber];
4314 Double_t ycentersensorvertex[fgkladdernumber][kmothervertexnumber];
4315 Double_t xend2laddervertex[fgkladdernumber][kmothervertexnumber];
4316 Double_t yend2laddervertex[fgkladdernumber][kmothervertexnumber];
4317 for(Int_t i=0; i<fgkladdernumber; i++) {
4318 for(Int_t j=0; j<kmothervertexnumber; j++){
4319 xcentersensorvertex[i][j] = xmothervertex[i][j];
4320 ycentersensorvertex[i][j] = ymothervertex[i][j];
4321 xend1laddervertex[i][j] = xmothervertex[i][j];
4322 yend1laddervertex[i][j] = ymothervertex[i][j];
4323 xend2laddervertex[i][j] = xmothervertex[i][j];
4324 yend2laddervertex[i][j] = ymothervertex[i][j];
4325 }
4326 // Add some space around sensors to accommodate misalignments
4327 xcentersensorvertex[i][0] -= fgkSSDModuleSideDisalignment;
4328 xcentersensorvertex[i][1] = xcentersensorvertex[0][0];
4329 xcentersensorvertex[i][6] = -xcentersensorvertex[0][1];
4330 xcentersensorvertex[i][7] = -xcentersensorvertex[0][0];
4331
4332 ycentersensorvertex[i][0] -= fgkSSDModuleVerticalDisalignment;
4333 ycentersensorvertex[i][7] = ycentersensorvertex[0][0];
4334
4335 // Center Ladder Piece
4336 centersensorladdershape[i]->DefinePolygon(kmothervertexnumber,xcentersensorvertex[i],
4337 ycentersensorvertex[i]);
4338 centersensorladdershape[i]->DefineSection(0, - fgkEndLadderCarbonFiberLowerJunctionLength[1]
4339 + 1.45*fgkSSDMountingBlockWidth);
4340 centersensorladdershape[i]->DefineSection(1, ssdlaysensorsnumber[i] * fgkCarbonFiberJunctionWidth
4341 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
4342 - 2.4*fgkSSDMountingBlockWidth);
4343
4344 // Left and Right Ladder Pieces: Mother volumes around ladder mounting areas
4345
4346 // Cuts off first corner (neg x)
4347 xend1laddervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
4348 xend1laddervertex[i][1] = -0.5*fgkSSDMountingBlockLength[0];
4349 // Cuts off last part (pos x)
4350 xend2laddervertex[i][6] = 0.5*fgkSSDMountingBlockLength[0];
4351 xend2laddervertex[i][7] = 0.5*fgkSSDMountingBlockLength[0];
4352
4353 leftladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i],
4354 yend1laddervertex[i]);
4355 leftladdershape1[i]->DefineSection(0,-fgkEndLadderCarbonFiberLowerJunctionLength[1]);
4356 leftladdershape1[i]->DefineSection(1, fendladdersegmentmatrix[0][i]->GetTranslation()[2]
4357 - fgkEndLadderMountingBlockPosition[0]);
4358
4359 leftladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i],
4360 yend2laddervertex[i]);
4361 leftladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[0][i]->GetTranslation()[2]
4362 - fgkEndLadderMountingBlockPosition[0]);
4363 leftladdershape2[i]->DefineSection(1,- fgkEndLadderCarbonFiberLowerJunctionLength[1]
4364 + 1.45*fgkSSDMountingBlockWidth); // connect to main volume at -1.6725 cm
4365
4366 rightladdershape1[i]->DefinePolygon(kmothervertexnumber,xend1laddervertex[i],
4367 yend1laddervertex[i]);
4368 rightladdershape1[i]->DefineSection(0,ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
4369 +fgkEndLadderCarbonFiberLowerJunctionLength[0]
4370 -2.4*fgkSSDMountingBlockWidth);
4371 rightladdershape1[i]->DefineSection(1,fendladdersegmentmatrix[1][i]->GetTranslation()[2]
4372 + fgkEndLadderMountingBlockPosition[1]);
4373
4374 rightladdershape2[i]->DefinePolygon(kmothervertexnumber,xend2laddervertex[i],
4375 yend2laddervertex[i]);
4376 rightladdershape2[i]->DefineSection(0, fendladdersegmentmatrix[1][i]->GetTranslation()[2]
4377 + fgkEndLadderMountingBlockPosition[1]);
4378 rightladdershape2[i]->DefineSection(1, ssdlaysensorsnumber[i]*fgkCarbonFiberJunctionWidth
4379 + fgkEndLadderCarbonFiberLowerJunctionLength[0]);
4380 }
4381 TGeoCompositeShape* laddershapecontainer[2];
4382 laddershapecontainer[0] = new TGeoCompositeShape("Lay5LadderCompositeShape",
4383 "Lay5Left1LadderSegmentContainer+Lay5Left2LadderSegmentContainer"
4384 "+Lay5CenterSensorContainer"
4385 "+Lay5Right1LadderSegmentContainer+Lay5Right2LadderSegmentContainer");
4386 laddershapecontainer[1] = new TGeoCompositeShape("Lay6LadderCompositeShape",
4387 "Lay6Left1LadderSegmentContainer+Lay6Left2LadderSegmentContainer"
4388 "+Lay6CenterSensorContainer"
4389 "+Lay6Right1LadderSegmentContainer+Lay6Right2LadderSegmentContainer");
4390 const char* laddername[fgkladdernumber] = {"ITSssdLay5Ladd","ITSssdLay6Ladd"};
4391 for(Int_t i=0; i<fgkladdernumber; i++){
4392 fladder[i] = new TGeoVolume(laddername[i],laddershapecontainer[i],fSSDAir);
4393 fladder[i]->SetLineColor(4);
4394 }
4395///////////////////////////////////////////////////////////////////////////
4396 if(!fCreateMaterials) CreateMaterials();
4397 if(!fTransformationMatrices) CreateTransformationMatrices();
4398 if(!fBasicObjects) CreateBasicObjects();
4399 SetLadderSegment();
4400 SetEndLadderSegment();
4401 for(Int_t i=0; i<fgkladdernumber; i++){
4402 for(Int_t j=0; j<ssdlaysensorsnumber[i]; j++){
4403 //////////////////////////
4404 /// Placing Ladder Segment
4405 //////////////////////////
4406 fladder[i]->AddNode(j%2==0 ? fladdersegment[i==0 ? 0 : 1] :
4407 fladdersegment[i==0 ? 1 : 0],
4408 ssdlaysensorsnumber[i]-j-1,fladdermatrix[i][j]);
4409 //////////////////////////
4410 /// Placing SSD Sensor
4411 //////////////////////////
4412 if(i==0&&ssdlaysensorsnumber[i]-j-1==13) fSSDSensor5->SetLineColor(kRed);
4413 fladder[i]->AddNode(i==0?fSSDSensor5:fSSDSensor6,ssdlaysensorsnumber[i]-j-1,
4414 fssdsensormatrix[i][j]);
4415 }
4416 ///////////////////////////////
4417 /// Placing End Ladder Segment
4418 ///////////////////////////////
4419 fladder[i]->AddNode(fendladdersegment[0],1,fendladdersegmentmatrix[0][i]);
4420 fladder[i]->AddNode(fendladdersegment[1],1,fendladdersegmentmatrix[1][i]);
4421 }
4422/////////////////////////////////////////////////////////////////////////////
4423/// Placing Ladder Cables
4424/////////////////////////////////////////////////////////////////////////////
4425 Int_t sidecablenumber[2][2];
4426 sidecablenumber[0][0] = fgkSSDLay5SensorsNumber/2+1;
4427 sidecablenumber[0][1] = sidecablenumber[0][0]-2;
4428 sidecablenumber[1][0] = (fgkSSDLay6SensorsNumber-1)/2+1;
4429 sidecablenumber[1][1] = sidecablenumber[1][0]-1;
4430 Double_t carbonfibertomoduleposition[3];
4431 carbonfibertomoduleposition[0] = -0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength);
4432 carbonfibertomoduleposition[1] = - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
4433 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
4434 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
4435 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
4436 - fgkSSDSensorCenterSupportThickness[0]);
4437 carbonfibertomoduleposition[2] = - (fgkSSDModuleCoolingBlockToSensor
4438 + 0.5*fgkCoolingTubeSupportHeight
4439 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight);
4440 const Double_t kendladdercablecorrection = 1.72*fgkmm; //this has to be tuned
4441 Double_t ssdendladdercablelength[4];
4442 ssdendladdercablelength[0] = carbonfibertomoduleposition[1]
4443 + fgkSSDSensorLength
4444 - fgkSSDModuleStiffenerPosition[1]
4445 - fgkSSDStiffenerWidth
4446 - fgkSSDFlexWidth[0]
4447 + fgkEndLadderCarbonFiberLowerJunctionLength[1]-0.000001*kendladdercablecorrection;
4448 ssdendladdercablelength[1] = carbonfibertomoduleposition[1]
4449 + fgkSSDModuleStiffenerPosition[1]
4450 + fgkSSDStiffenerWidth
4451 + fgkEndLadderCarbonFiberLowerJunctionLength[1]-0.000001*kendladdercablecorrection;
4452 ssdendladdercablelength[2] = ssdendladdercablelength[1]
4453 - fgkEndLadderCarbonFiberLowerJunctionLength[1]
4454 + fgkEndLadderCarbonFiberLowerJunctionLength[0]
4455 - kendladdercablecorrection;
4456 ssdendladdercablelength[3] = fgkCarbonFiberJunctionWidth-(fgkSSDSensorLength
4457 + carbonfibertomoduleposition[1]
4458 - fgkSSDModuleStiffenerPosition[1]
4459 - fgkSSDStiffenerWidth)
4460 + fgkEndLadderCarbonFiberLowerJunctionLength[0]-0.000001*kendladdercablecorrection;
4461 TList* laddercableassemblylist[4];
4462 const Int_t kendladdercablesnumber = 4;
4463 for(Int_t i=0; i<fgkladdercablesnumber; i++)
4464 for(Int_t j=0; j<kendladdercablesnumber; j++){
4465 laddercableassemblylist[j] =
4466 GetLadderCableAssemblyList(sidecablenumber[i][j<2?0:1],
4467 ssdendladdercablelength[j]);
4468 fladder[i]->AddNode((TGeoVolume*)laddercableassemblylist[j]->At(j%2==0?0:1),
4469 j<2?1:2,fladdercablematrix[i][j]);
4470 }
4471}
4472////////////////////////////////////////////////////////////////////////////////
4473void AliITSv11GeometrySSD::SetLayer(){
4474////////////////////////////////////////////////////////////////////////////////
4475 // Creating Ladder of Layer 5 and Layer 6
4476 /////////////////////////////////////////////////////////////
4477 if(!fCreateMaterials) CreateMaterials();
4478 if(!fTransformationMatrices) CreateTransformationMatrices();
4479 if(!fBasicObjects) CreateBasicObjects();
4480 SetLadder(); // Generating the ladder of Layer5 and Layer6
4481 const Int_t kssdlayladdernumber[fgklayernumber] =
4482 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
4483 /////////////////////////////////////////////////////////////
4484 // Generating mother volumes for Layer5 and Layer6
4485 /////////////////////////////////////////////////////////////
4486 fSSDLayer5 = new TGeoVolumeAssembly("ITSssdLayer5");
4487 fSSDLayer6 = new TGeoVolumeAssembly("ITSssdLayer6");
4488 Int_t *ladderindex[fgklayernumber];
4489 Int_t index[fgklayernumber] = {8,9};
4490 for(Int_t i=0; i<fgklayernumber; i++) ladderindex[i] = new Int_t[kssdlayladdernumber[i]];
4491 for(Int_t i=0; i<fgklayernumber; i++)
4492 for(Int_t j=0; j<kssdlayladdernumber[i]; j++){
4493 ladderindex[i][j] = ((j>=0)&&(j<=kssdlayladdernumber[i]-index[i]-1)) ?
4494 j+index[i] : j+index[i]-kssdlayladdernumber[i];
4495 i ==0 ? fSSDLayer5->AddNode(fladder[0],ladderindex[i][j],flayermatrix[i][j]) :
4496 fSSDLayer6->AddNode(fladder[1],ladderindex[i][j],flayermatrix[i][j]);
4497 }
4498 /////////////////////////////////////////////////////////////
4499 // Deallocating memory
4500 /////////////////////////////////////////////////////////////
4501 for(Int_t i=0; i<fgklayernumber; i++) delete [] ladderindex[i];
4502}
4503////////////////////////////////////////////////////////////////////////////////
4504void AliITSv11GeometrySSD::Layer5(TGeoVolume* moth){
4505 /////////////////////////////////////////////////////////////
4506 // Insert the layer 5 in the mother volume.
4507 /////////////////////////////////////////////////////////////
4508 if (! moth) {
4509 AliError("Can't insert layer5, mother is null!\n");
4510 return;
4511 };
4512 if(!fSSDLayer5) SetLayer();
4513 fMotherVol = moth;
4514 TGeoTranslation* centerITSlayer5trans = new TGeoTranslation(0.,0.,-0.5*fgkSSDLay5LadderLength
4515 + fgkLay5CenterITSPosition);
4516 moth->AddNode(fSSDLayer5,1,centerITSlayer5trans);
4517 }
4518////////////////////////////////////////////////////////////////////////////////
4519void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
4520 /////////////////////////////////////////////////////////////
4521 // Insert the layer 6 in the mother volume.
4522 /////////////////////////////////////////////////////////////
4523 if (! moth) {
4524 AliError("AliITSv11GeometrySSD: Can't insert layer6, mother is null!\n");
4525 return;
4526 };
4527 if(!fSSDLayer6) SetLayer();
4528 fMotherVol = moth;
4529 TGeoTranslation* centerITSlayer6trans = new TGeoTranslation(0.,0.,-0.5*fgkSSDLay6LadderLength
4530 + fgkLay6CenterITSPosition);
4531 moth->AddNode(fSSDLayer6,1,centerITSlayer6trans);
4532 }
4533 ////////////////////////////////////////////////////////////////////////////////
4534 TList* AliITSv11GeometrySSD::GetMountingBlockSupport(Int_t nedges){
4535 /////////////////////////////////////////////////////////////
4536 // Method generating the Arc structure of Ladder Support
4537 /////////////////////////////////////////////////////////////
4538 const Int_t kssdlayladdernumber[fgklayernumber] =
4539 {fgkSSDLay5LadderNumber,fgkSSDLay6LadderNumber};
4540 Double_t mountingsupportedge[fgklayernumber];
4541 Double_t mountingblockratio[fgklayernumber];
4542 Double_t theta[fgklayernumber];
4543 Double_t phi[fgklayernumber];
4544 Double_t psi0[fgklayernumber];
4545 Double_t deltapsi[fgklayernumber];
4546 TVector3* mountingsupportedgevector[fgklayernumber];
4547 for(Int_t i=0; i<fgklayernumber; i++){
4548 mountingblockratio[i] = fgkSSDMountingBlockLength[0]/fgkMountingBlockSupportRadius[i];
4549 mountingsupportedge[i] = 0.5*fgkMountingBlockSupportRadius[i]
4550 * (TMath::Sqrt((2.-mountingblockratio[i])*(2.+mountingblockratio[i]))
4551 * TMath::Sin(2.0*TMath::Pi()/kssdlayladdernumber[i])
4552 - mountingblockratio[i]*(1.0+TMath::Cos(2.0*TMath::Pi()
4553 / kssdlayladdernumber[i])));
4554 theta[i] = TMath::ASin(0.5*mountingblockratio[i]+mountingsupportedge[i]/fgkMountingBlockSupportRadius[i]);
4555 phi[i] = TMath::ASin(0.5*mountingblockratio[i]);
4556 mountingsupportedgevector[i] = new TVector3();
4557 mountingsupportedgevector[i]->SetX(-0.5*fgkSSDMountingBlockLength[0]);
4558 mountingsupportedgevector[i]->SetY(fgkMountingBlockSupportRadius[i]*TMath::Sqrt(
4559 (1.-mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])*
4560 (1.+mountingsupportedgevector[i]->X()/fgkMountingBlockSupportRadius[i])));
4561 psi0[i] = 0.5*TMath::Pi()-phi[i];
4562 deltapsi[i] = (theta[i]+phi[i])/nedges;
4563 }
4564 TVector3** vertex[fgklayernumber];
4565 TList* vertexlist[fgklayernumber];
4566 Int_t indexedge[fgklayernumber] = {0,0};
4567 for(Int_t i=0; i<fgklayernumber; i++){
4568 vertex[i] = new TVector3*[nedges+1];
4569 vertexlist[i] = new TList();
4570 }
4571 for(Int_t i=0; i<fgklayernumber; i++){
4572 for(Int_t j=0; j<nedges+1; j++){
4573 vertex[i][j] = new TVector3(fgkMountingBlockSupportRadius[i]*TMath::Cos(psi0[i]+j*deltapsi[i]),
4574 fgkMountingBlockSupportRadius[i]*TMath::Sin(psi0[i]+j*deltapsi[i]));
4575 if(vertex[i][j]->X()>mountingsupportedgevector[i]->X()) indexedge[i]++;
4576 vertexlist[i]->Add(vertex[i][j]);
4577 }
4578 vertexlist[i]->AddAt(mountingsupportedgevector[i],indexedge[i]);
4579 }
4580 Double_t** xsidevertex = new Double_t*[fgklayernumber];
4581 Double_t** ysidevertex = new Double_t*[fgklayernumber];
4582 Double_t** xcentervertex = new Double_t*[fgklayernumber];
4583 Double_t** ycentervertex = new Double_t*[fgklayernumber];
4584 Double_t** xsidelowervertex = new Double_t*[fgklayernumber];
4585 Double_t** ysidelowervertex = new Double_t*[fgklayernumber];
4586 Double_t** xcenterlowervertex = new Double_t*[fgklayernumber];
4587 Double_t** ycenterlowervertex = new Double_t*[fgklayernumber];
4588 for(Int_t i=0; i<fgklayernumber; i++){
4589 xsidevertex[i] = new Double_t[vertexlist[i]->GetSize()+2];
4590 ysidevertex[i] = new Double_t[vertexlist[i]->GetSize()+2];
4591 xcentervertex[i] = new Double_t[indexedge[i]+3];
4592 ycentervertex[i] = new Double_t[indexedge[i]+3];
4593 xsidelowervertex[i] = new Double_t[vertexlist[i]->GetSize()+1];
4594 ysidelowervertex[i] = new Double_t[vertexlist[i]->GetSize()+1];
4595 xcenterlowervertex[i] = new Double_t[indexedge[i]+3];
4596 ycenterlowervertex[i] = new Double_t[indexedge[i]+3];
4597 for(Int_t j=0; j<vertexlist[i]->GetSize(); j++){
4598 xsidevertex[i][j!=vertexlist[i]->GetSize()-1?j+3:0] =
4599 ((TVector3*)vertexlist[i]->At(j))->X();
4600 ysidevertex[i][j!=vertexlist[i]->GetSize()-1?j+3:0] =
4601 ((TVector3*)vertexlist[i]->At(j))->Y();
4602 xsidelowervertex[i][j] = ((TVector3*)vertexlist[i]->At(vertexlist[i]->GetSize()-1-j))->X();
4603 ysidelowervertex[i][j] = ((TVector3*)vertexlist[i]->At(vertexlist[i]->GetSize()-1-j))->Y();
4604 if(j<indexedge[i]+1){
4605 xcentervertex[i][j!=indexedge[i]?j+3:0] =
4606 ((TVector3*)vertexlist[i]->At(j))->X();
4607 ycentervertex[i][j!=indexedge[i]?j+3:0] =
4608 ((TVector3*)vertexlist[i]->At(j))->Y();
4609 xcenterlowervertex[i][j+1] = ((TVector3*)vertexlist[i]->At(indexedge[i]-j))->X();
4610 ycenterlowervertex[i][j+1] = ((TVector3*)vertexlist[i]->At(indexedge[i]-j))->Y();
4611 }
4612 }
4613 xsidevertex[i][1] = xsidevertex[i][0];
4614 ysidevertex[i][1] = fgkMountingBlockSupportRadius[i];
4615 xsidevertex[i][2] = xsidevertex[i][3];
4616 ysidevertex[i][2] = fgkMountingBlockSupportRadius[i];
4617 xcentervertex[i][1] = xcentervertex[i][0];
4618 ycentervertex[i][1] = fgkMountingBlockSupportRadius[i];
4619 xcentervertex[i][2] = xcentervertex[i][3];
4620 ycentervertex[i][2] = fgkMountingBlockSupportRadius[i];
4621 xsidelowervertex[i][vertexlist[i]->GetSize()] = xsidelowervertex[i][vertexlist[i]->GetSize()-1];
4622 ysidelowervertex[i][vertexlist[i]->GetSize()] = ysidelowervertex[i][0];
4623 xcenterlowervertex[i][0] = xcenterlowervertex[i][1];
4624 ycenterlowervertex[i][0] = ysidevertex[i][0];
4625 xcenterlowervertex[i][indexedge[i]+2] = xsidelowervertex[i][vertexlist[i]->GetSize()];
4626 ycenterlowervertex[i][indexedge[i]+2] = ycenterlowervertex[i][0];
4627 }
4628 /////////////////////////////////////////////////////////////
4629 // Building the Arc Structure of Ladder Supports
4630 /////////////////////////////////////////////////////////////
4631 TGeoXtru* sidemountingblocksupportshape[fgklayernumber];
4632 TGeoXtru* centermountingsupportshape[fgklayernumber];
4633 TGeoXtru* sideladdersupportpieceshape[fgklayernumber];
4634 TGeoXtru* centerladdersupportpieceshape[fgklayernumber];
4635 TGeoVolume* sidemountingblocksupport[fgklayernumber];
4636 TGeoVolume* centermountingblocksupport[fgklayernumber];
4637 TGeoVolume* sideladdersupportpiece[fgklayernumber];
4638 TGeoVolume* centerladdersupportpiece[fgklayernumber];
4639 char sidemountingblockname[100];
4640 char centermountingblockname[100];
4641 char sideladdersupportpiecename[100];
4642 char centerladdersupportpiecename[100];
4643 for(Int_t i=0; i<fgklayernumber; i++){
4644 sprintf(sidemountingblockname,"MountingBlockSupportSideLay%dArc",i+5);
4645 sprintf(centermountingblockname,"MountingBlockSupportCenterLay%dArc",i+5);
4646 sprintf(sideladdersupportpiecename,"SideLadderSupportPieceLay%d",i+5);
4647 sprintf(centerladdersupportpiecename,"CenterLadderSupportPieceLay%d",i+5);
4648 sidemountingblocksupportshape[i] = new TGeoXtru(2);
4649 sidemountingblocksupportshape[i]->DefinePolygon(vertexlist[i]->GetSize()+2,
4650 xsidevertex[i],ysidevertex[i]);
4651 sidemountingblocksupportshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4652 -fgkMountingBlockSupportWidth[0]);
4653 sidemountingblocksupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4654 sidemountingblocksupport[i] = new TGeoVolume(sidemountingblockname,
4655 sidemountingblocksupportshape[i],
4656 fSSDAlCoolBlockMedium);
4657 sidemountingblocksupport[i]->SetLineColor(9);
4658 centermountingsupportshape[i] = new TGeoXtru(2);
4659 centermountingsupportshape[i]->DefinePolygon(indexedge[i]+3,
4660 xcentervertex[i],ycentervertex[i]);
4661 centermountingsupportshape[i]->DefineSection(0,0.);
4662 centermountingsupportshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]
4663 -fgkMountingBlockSupportWidth[0]);
4664
4665 centermountingblocksupport[i] = new TGeoVolume(centermountingblockname,
4666 centermountingsupportshape[i],
4667 fSSDAlCoolBlockMedium);
4668 centermountingblocksupport[i]->SetLineColor(9);
4669 sideladdersupportpieceshape[i] = new TGeoXtru(2);
4670 sideladdersupportpieceshape[i]->DefinePolygon(vertexlist[i]->GetSize()+1,
4671 xsidelowervertex[i],ysidelowervertex[i]);
4672 sideladdersupportpieceshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4673 -fgkMountingBlockSupportWidth[0]);
4674 sideladdersupportpieceshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4675 sideladdersupportpiece[i] = new TGeoVolume(sideladdersupportpiecename,
4676 sideladdersupportpieceshape[i],
4677 fSSDCarbonFiberMedium);
4678 sideladdersupportpiece[i]->SetLineColor(fColorAl);
4679 centerladdersupportpieceshape[i] = new TGeoXtru(2);
4680 centerladdersupportpieceshape[i]->DefinePolygon(indexedge[i]+3,
4681 xcenterlowervertex[i],ycenterlowervertex[i]);
4682 centerladdersupportpieceshape[i]->DefineSection(0,0.0);
4683 centerladdersupportpieceshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]
4684 -fgkMountingBlockSupportWidth[0]);
4685 centerladdersupportpiece[i] = new TGeoVolume(centerladdersupportpiecename,
4686 centerladdersupportpieceshape[i],
4687 fSSDCarbonFiberMedium);
4688 centerladdersupportpiece[i]->SetLineColor(fColorAl);
4689 }
4690 /////////////////////////////////////////////////////////////
4691 // Building the Up Structure of Ladder Supports
4692 /////////////////////////////////////////////////////////////
4693 TGeoBBox** mountingblocksupportboxupshape[fgklayernumber];
4694 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxupshape[i] = new TGeoBBox*[2];
4695 TGeoBBox** mountingblocksupportboxdownshape[fgklayernumber];
4696 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxdownshape[i] = new TGeoBBox*[2];
4697 TGeoVolume** mountingblocksupportboxdown[fgklayernumber];
4698 //////////////////////////////////////////////////////////
4699 // Setting the volume for TGeoXtru Mounting Block Piece
4700 //////////////////////////////////////////////////////////
4701 TGeoVolume** mountingblocksupportboxup[fgklayernumber];
4702 TGeoXtru* mountingblockpiecedownshape[fgklayernumber];
4703 TGeoVolume* mountingblockpiecedown[fgklayernumber];
4704 TGeoXtru* mountingblockpieceupshape[fgklayernumber];
4705 TGeoVolume* mountingblockpieceup[fgklayernumber];
4706 Double_t mountingblockpieceupxvertex[fgklayernumber][8];
4707 Double_t mountingblockpieceupyvertex[fgklayernumber][8];
4708 Double_t mountingblockpiecedownxvertex[fgklayernumber][8];
4709 Double_t mountingblockpiecedownyvertex[fgklayernumber][8];
4710 char mountingblockpiecedownname[100];
4711 char mountingblockpieceupname[100];
4712 for(Int_t i=0; i<fgklayernumber; i++){
4713 ///////////////////////////
4714 // Mounting Block Down Vertex
4715 ///////////////////////////
4716 mountingblockpiecedownshape[i] = new TGeoXtru(2);
4717 sprintf(mountingblockpiecedownname,"MountingBlockPieceDownLay%d",i+5);
4718 mountingblockpiecedownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
4719 mountingblockpiecedownyvertex[i][0] = fgkMountingBlockSupportRadius[i]
4720 + fgkMountingBlockSupportDownHeight
4721 - fgkSSDLadderVerticalDisalignment;
4722 mountingblockpiecedownxvertex[i][1] = mountingblockpiecedownxvertex[i][0];
4723 mountingblockpiecedownyvertex[i][1] = mountingblockpiecedownyvertex[i][0]
4724 + fgkSSDMountingBlockHeight[1]
4725 - 0.5*fgkCoolingTubeSupportHeight
4726 - fgkSSDModuleCoolingBlockToSensor;
4727 mountingblockpiecedownxvertex[i][2] = 0.5*fgkSSDMountingBlockLength[0];
4728 mountingblockpiecedownyvertex[i][2] = mountingblockpiecedownyvertex[i][1];
4729 mountingblockpiecedownxvertex[i][3] = mountingblockpiecedownxvertex[i][2];
4730 mountingblockpiecedownyvertex[i][3] = mountingblockpiecedownyvertex[i][0];
4731 mountingblockpiecedownxvertex[i][4] = 0.5*fgkSSDMountingBlockLength[1];
4732 mountingblockpiecedownyvertex[i][4] = mountingblockpiecedownyvertex[i][0];
4733 mountingblockpiecedownxvertex[i][5] = mountingblockpiecedownxvertex[i][4];
4734 mountingblockpiecedownyvertex[i][5] = mountingblockpiecedownyvertex[i][4]
4735 + fgkSSDMountingBlockHeight[2]
4736 - fgkSSDMountingBlockHeight[0];
4737 mountingblockpiecedownxvertex[i][6] = -mountingblockpiecedownxvertex[i][4];
4738 mountingblockpiecedownyvertex[i][6] = mountingblockpiecedownyvertex[i][5];
4739 mountingblockpiecedownxvertex[i][7] = mountingblockpiecedownxvertex[i][6];
4740 mountingblockpiecedownyvertex[i][7] = mountingblockpiecedownyvertex[i][0];
4741 mountingblockpiecedownshape[i]->DefinePolygon(8,mountingblockpiecedownxvertex[i],
4742 mountingblockpiecedownyvertex[i]);
4743 mountingblockpiecedownshape[i]->DefineSection(0,0.0);
4744 mountingblockpiecedownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4745 mountingblockpiecedown[i] = new TGeoVolume(mountingblockpiecedownname,
4746 mountingblockpiecedownshape[i],fSSDMountingBlockMedium);
4747 mountingblockpiecedown[i]->SetLineColor(fColorG10);
4748
4749 ///////////////////////////
4750 // Mounting Block Up Vertex
4751 ///////////////////////////
4752 mountingblockpieceupshape[i] = new TGeoXtru(2);
4753 sprintf(mountingblockpieceupname,"MountingBlockPieceUpLay%d",i+5);
4754 mountingblockpieceupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0];
4755 mountingblockpieceupyvertex[i][0] = fgkMountingBlockSupportRadius[i]
4756 + fgkMountingBlockSupportUpHeight[i]
4757 - fgkSSDLadderVerticalDisalignment;
4758 mountingblockpieceupxvertex[i][1] = mountingblockpieceupxvertex[i][0];
4759 mountingblockpieceupyvertex[i][1] = mountingblockpieceupyvertex[i][0]
4760 + fgkSSDMountingBlockHeight[1]
4761 - 0.5*fgkCoolingTubeSupportHeight
4762 - fgkSSDModuleCoolingBlockToSensor;
4763 mountingblockpieceupxvertex[i][2] = 0.5*fgkSSDMountingBlockLength[0];
4764 mountingblockpieceupyvertex[i][2] = mountingblockpieceupyvertex[i][1];
4765 mountingblockpieceupxvertex[i][3] = mountingblockpieceupxvertex[i][2];
4766 mountingblockpieceupyvertex[i][3] = mountingblockpieceupyvertex[i][0];
4767 mountingblockpieceupxvertex[i][4] = 0.5*fgkSSDMountingBlockLength[1];
4768 mountingblockpieceupyvertex[i][4] = mountingblockpieceupyvertex[i][0];
4769 mountingblockpieceupxvertex[i][5] = mountingblockpieceupxvertex[i][4];
4770 mountingblockpieceupyvertex[i][5] = mountingblockpieceupyvertex[i][4]
4771 + fgkSSDMountingBlockHeight[2]
4772 - fgkSSDMountingBlockHeight[0];
4773 mountingblockpieceupxvertex[i][6] = -mountingblockpieceupxvertex[i][4];
4774 mountingblockpieceupyvertex[i][6] = mountingblockpieceupyvertex[i][5];
4775 mountingblockpieceupxvertex[i][7] = mountingblockpieceupxvertex[i][6];
4776 mountingblockpieceupyvertex[i][7] = mountingblockpieceupyvertex[i][0];
4777
4778 mountingblockpieceupshape[i]->DefinePolygon(8,mountingblockpieceupxvertex[i],
4779 mountingblockpieceupyvertex[i]);
4780 mountingblockpieceupshape[i]->DefineSection(0,0.0);
4781 mountingblockpieceupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4782 mountingblockpieceup[i] = new TGeoVolume(mountingblockpieceupname,
4783 mountingblockpieceupshape[i],fSSDMountingBlockMedium);
4784 mountingblockpieceup[i]->SetLineColor(fColorG10);
4785 }
4786 ///////////////////////////////////////////////////////////////////
4787 // Setting the volume for TGeoXtru Mounting Block Support Trapezoid
4788 ///////////////////////////////////////////////////////////////////
4789 TGeoXtru* mountingblocksupportrapezoidownshape[fgklayernumber];
4790 TGeoXtru* mountingblocksupportrapezoidupshape[fgklayernumber];
4791 TGeoVolume* mountingblocksupportrapezoidown[fgklayernumber];
4792 TGeoVolume* mountingblocksupportrapezoidup[fgklayernumber];
4793 Double_t mountingblocksupportrapezoidownxvertex[fgklayernumber][5];
4794 Double_t mountingblocksupportrapezoidownyvertex[fgklayernumber][5];
4795 Double_t mountingblocksupportrapezoidupxvertex[fgklayernumber][5];
4796 Double_t mountingblocksupportrapezoidupyvertex[fgklayernumber][5];
4797 char mountingblocksupportrapezoidowname[100];
4798 char mountingblocksupportrapezoidupname[100];
4799 Double_t scalefactor = 3./4.;
4800 for(Int_t i=0; i<fgklayernumber; i++){
4801 ////////////////////////////////////////////
4802 // Mounting Block Support Down Trapezoid Vertex
4803 ////////////////////////////////////////////
4804 mountingblocksupportrapezoidownshape[i] = new TGeoXtru(2);
4805 mountingblocksupportrapezoidownxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
4806 - mountingsupportedge[i];
4807 mountingblocksupportrapezoidownyvertex[i][0] = mountingblockpiecedownyvertex[i][0];
4808 mountingblocksupportrapezoidownxvertex[i][1] =
4809 mountingblocksupportrapezoidownxvertex[i][0];
4810 mountingblocksupportrapezoidownyvertex[i][1] = mountingblockpiecedownyvertex[i][0]
4811 + scalefactor*(mountingblockpiecedownyvertex[i][1]
4812 - mountingblockpiecedownyvertex[i][0]);
4813 mountingblocksupportrapezoidownxvertex[i][2] = -0.5*fgkSSDSensorWidth;
4814 mountingblocksupportrapezoidownyvertex[i][2] = mountingblockpiecedownyvertex[i][1];
4815 mountingblocksupportrapezoidownxvertex[i][3] = mountingblockpiecedownxvertex[i][0];
4816 mountingblocksupportrapezoidownyvertex[i][3] = mountingblocksupportrapezoidownyvertex[i][2];
4817 mountingblocksupportrapezoidownxvertex[i][4] = mountingblocksupportrapezoidownxvertex[i][3];
4818 mountingblocksupportrapezoidownyvertex[i][4] = mountingblocksupportrapezoidownyvertex[i][0];
4819
4820 mountingblocksupportrapezoidownshape[i]->DefinePolygon(5,mountingblocksupportrapezoidownxvertex[i],
4821 mountingblocksupportrapezoidownyvertex[i]);
4822 mountingblocksupportrapezoidownshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4823 -fgkMountingBlockSupportWidth[0]);
4824 mountingblocksupportrapezoidownshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4825 sprintf(mountingblocksupportrapezoidowname,"MountingBlockSuppTrapezoidDownLay%d",i+5);
4826 mountingblocksupportrapezoidown[i] = new TGeoVolume(mountingblocksupportrapezoidowname,
4827 mountingblocksupportrapezoidownshape[i],fSSDCarbonFiberMedium);
4828 mountingblocksupportrapezoidown[i]->SetLineColor(9);
4829 ////////////////////////////////////////////
4830 // Mounting Block Support Up Trapezoid Vertex
4831 ////////////////////////////////////////////
4832 mountingblocksupportrapezoidupshape[i] = new TGeoXtru(2);
4833 mountingblocksupportrapezoidupxvertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
4834 - mountingsupportedge[i];
4835 mountingblocksupportrapezoidupyvertex[i][0] = mountingblockpieceupyvertex[i][0];
4836 mountingblocksupportrapezoidupxvertex[i][1] =
4837 mountingblocksupportrapezoidupxvertex[i][0];
4838 mountingblocksupportrapezoidupyvertex[i][1] =
4839 mountingblockpieceupyvertex[i][0]
4840 + scalefactor*(mountingblockpieceupyvertex[i][1]
4841 - mountingblockpieceupyvertex[i][0]);
4842 mountingblocksupportrapezoidupxvertex[i][2] = -0.5*fgkSSDSensorWidth;
4843 mountingblocksupportrapezoidupyvertex[i][2] = mountingblockpieceupyvertex[i][1];
4844 mountingblocksupportrapezoidupxvertex[i][3] = mountingblockpieceupxvertex[i][0];
4845 mountingblocksupportrapezoidupyvertex[i][3] = mountingblocksupportrapezoidupyvertex[i][2];
4846 mountingblocksupportrapezoidupxvertex[i][4] = mountingblocksupportrapezoidupxvertex[i][3];
4847 mountingblocksupportrapezoidupyvertex[i][4] = mountingblocksupportrapezoidupyvertex[i][0];
4848
4849 mountingblocksupportrapezoidupshape[i]->DefinePolygon(5,mountingblocksupportrapezoidupxvertex[i],
4850 mountingblocksupportrapezoidupyvertex[i]);
4851 mountingblocksupportrapezoidupshape[i]->DefineSection(0,fgkMountingBlockSupportWidth[1]
4852 -fgkMountingBlockSupportWidth[0]);
4853 mountingblocksupportrapezoidupshape[i]->DefineSection(1,fgkMountingBlockSupportWidth[1]);
4854 sprintf(mountingblocksupportrapezoidupname,"MountingBlockSuppTrapezoidUpLay%d",i+5);
4855 mountingblocksupportrapezoidup[i] = new TGeoVolume(mountingblocksupportrapezoidupname,
4856 mountingblocksupportrapezoidupshape[i],fSSDCarbonFiberMedium);
4857 mountingblocksupportrapezoidup[i]->SetLineColor(9);
4858 }
4859 ///////////////////////////////////////////////////////////////////
4860 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxdown[i] = new TGeoVolume*[3];
4861 for(Int_t i=0; i<fgklayernumber; i++) mountingblocksupportboxup[i] = new TGeoVolume*[3];
4862 Double_t boxoriginup[fgklayernumber][2][3];
4863 Double_t boxorigindown[fgklayernumber][2][3];
4864 char mountingblocksupportboxdownname[100];
4865 char mountingblocksupportboxupname[100];
4866 TGeoRotation* mountingblocksupportrot = new TGeoRotation();
4867 mountingblocksupportrot->SetAngles(90.,180.,-90);
4868 TGeoRotation* globalrefladdersupportrot = new TGeoRotation();
4869 globalrefladdersupportrot->SetAngles(0.,90.,0.);
4870 TGeoHMatrix* laddersupportmatrix[2];
4871 laddersupportmatrix[0] = new TGeoHMatrix(*globalrefladdersupportrot);
4872 laddersupportmatrix[1] = new TGeoHMatrix((*globalrefladdersupportrot)*(*mountingblocksupportrot));
4873 /////////////////////////////////////////////////////////////
4874 // Creating Mother Volume for Containment
4875 /////////////////////////////////////////////////////////////
4876 Double_t *xmothervertex[fgklayernumber];
4877 Double_t *ymothervertex[fgklayernumber];
4878 for(Int_t i=0; i<fgklayernumber; i++){
4879 xmothervertex[i] = new Double_t[8];
4880 ymothervertex[i] = new Double_t[8];
4881 }
4882 TGeoXtru* downmotherladdersupportshape[fgklayernumber];
4883 TGeoVolume* downmotherladdersupport[fgklayernumber];
4884 TGeoXtru* upmotherladdersupportshape[fgklayernumber];
4885 TGeoVolume* upmotherladdersupport[fgklayernumber];
4886 char upmotheladdersupportname[100];
4887 char downmotheladdersupportname[100];
4888 for(Int_t i=0; i<fgklayernumber; i++){
4889 xmothervertex[i][0] = -0.5*fgkSSDMountingBlockLength[0]
4890 - mountingsupportedge[i];
4891 ymothervertex[i][0] = -fgkMountingBlockSupportWidth[1];
4892 xmothervertex[i][1] = xmothervertex[i][0];
4893 ymothervertex[i][1] = -fgkMountingBlockSupportWidth[1]
4894 + fgkMountingBlockSupportWidth[0];
4895 xmothervertex[i][2] = -0.5*fgkSSDMountingBlockLength[0];
4896 ymothervertex[i][2] = ymothervertex[i][1];
4897 xmothervertex[i][3] = xmothervertex[i][2];
4898 ymothervertex[i][3] = -ymothervertex[i][0];
4899 xmothervertex[i][4] = -xmothervertex[i][0];
4900 ymothervertex[i][4] = ymothervertex[i][3];
4901 xmothervertex[i][5] = xmothervertex[i][4];
4902 ymothervertex[i][5] = -ymothervertex[i][1];
4903 xmothervertex[i][6] = -xmothervertex[i][2];
4904 ymothervertex[i][6] = ymothervertex[i][5];
4905 xmothervertex[i][7] = xmothervertex[i][6];
4906 ymothervertex[i][7] = ymothervertex[i][0];
4907
4908 sprintf(downmotheladdersupportname,"LadderSupportDownLay%d",i+5);
4909 sprintf(upmotheladdersupportname,"LadderSupportUpLay%d",i+5);
4910
4911 downmotherladdersupportshape[i] = new TGeoXtru(2);
4912 downmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
4913 downmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]);
4914 downmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1]
4915 + fgkMountingBlockSupportDownHeight
4916 + fgkSSDMountingBlockHeight[1]
4917 - 0.5*fgkCoolingTubeSupportHeight
4918 - fgkSSDModuleCoolingBlockToSensor
4919 - fgkSSDLadderVerticalDisalignment);
4920
4921// - fgkSSDModuleVerticalDisalignment);
4922 //downmotherladdersupport[i] = new TGeoVolumeAssembly(downmotheladdersupportname);
4923
4924 downmotherladdersupport[i] = new TGeoVolume(downmotheladdersupportname,
4925 downmotherladdersupportshape[i],fSSDAir);
4926 upmotherladdersupportshape[i] = new TGeoXtru(2);
4927 upmotherladdersupportshape[i]->DefinePolygon(8,xmothervertex[i],ymothervertex[i]);
4928 upmotherladdersupportshape[i]->DefineSection(0,ysidevertex[i][0]);
4929 upmotherladdersupportshape[i]->DefineSection(1,ysidevertex[i][1]
4930 + fgkMountingBlockSupportUpHeight[i]
4931 + fgkSSDMountingBlockHeight[1]
4932 - 0.5*fgkCoolingTubeSupportHeight
4933 - fgkSSDModuleCoolingBlockToSensor
4934 - fgkSSDLadderVerticalDisalignment);
4935
4936 upmotherladdersupport[i] = new TGeoVolume(upmotheladdersupportname,
4937 upmotherladdersupportshape[i],fSSDAir);
4938 }
4939 for(Int_t i=0; i<fgklayernumber; i++){
4940 /////////////////////////
4941 // Setting the box origin
4942 /////////////////////////
4943 boxorigindown[i][0][0] = -0.5*mountingsupportedge[i];
4944 boxorigindown[i][0][1] = fgkMountingBlockSupportRadius[i]
4945 + 0.5*fgkMountingBlockSupportDownHeight
4946 - 0.5*fgkSSDLadderVerticalDisalignment;
4947 boxorigindown[i][0][2] = fgkMountingBlockSupportWidth[1]
4948 - 0.5*fgkMountingBlockSupportWidth[0];
4949
4950 boxorigindown[i][1][0] = 0.0;
4951 boxorigindown[i][1][1] = boxorigindown[i][0][1];
4952 boxorigindown[i][1][2] = 0.5*(fgkMountingBlockSupportWidth[1]
4953 - fgkMountingBlockSupportWidth[0]);
4954
4955 boxoriginup[i][0][0] = -0.5*mountingsupportedge[i];
4956 boxoriginup[i][0][1] = fgkMountingBlockSupportRadius[i]
4957 + 0.5*fgkMountingBlockSupportUpHeight[i]
4958 - 0.5*fgkSSDLadderVerticalDisalignment;
4959 boxoriginup[i][0][2] = fgkMountingBlockSupportWidth[1]
4960 - 0.5*fgkMountingBlockSupportWidth[0];
4961
4962 boxoriginup[i][1][0] = 0.0;
4963 boxoriginup[i][1][1] = boxoriginup[i][0][1];
4964 boxoriginup[i][1][2] = 0.5*(fgkMountingBlockSupportWidth[1]
4965 - fgkMountingBlockSupportWidth[0]);
4966
4967 /////////////////////////
4968 // Setting the boxes
4969 /////////////////////////
4970 mountingblocksupportboxdownshape[i][0] = new TGeoBBox(0.5*(mountingsupportedge[i]
4971 + fgkSSDMountingBlockLength[0]),
4972 0.5*fgkMountingBlockSupportDownHeight - 0.5*fgkSSDLadderVerticalDisalignment,
4973 0.5*fgkMountingBlockSupportWidth[0],
4974 boxorigindown[i][0]);
4975 mountingblocksupportboxdownshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
4976 0.5*fgkMountingBlockSupportDownHeight - 0.5*fgkSSDLadderVerticalDisalignment,
4977 0.5*(fgkMountingBlockSupportWidth[1]
4978 - fgkMountingBlockSupportWidth[0]),
4979 boxorigindown[i][1]);
4980
4981 mountingblocksupportboxupshape[i][0] = new TGeoBBox(0.5*(mountingsupportedge[i]
4982 + fgkSSDMountingBlockLength[0]),
4983 0.5*fgkMountingBlockSupportUpHeight[i] - 0.5*fgkSSDLadderVerticalDisalignment,
4984 0.5*fgkMountingBlockSupportWidth[0],
4985 boxoriginup[i][0]);
4986
4987 mountingblocksupportboxupshape[i][1] = new TGeoBBox(0.5*fgkSSDMountingBlockLength[0],
4988 0.5*fgkMountingBlockSupportUpHeight[i] - 0.5*fgkSSDLadderVerticalDisalignment,
4989 0.5*(fgkMountingBlockSupportWidth[1]
4990 - fgkMountingBlockSupportWidth[0]),
4991 boxoriginup[i][1]);
4992 ///////////////////////////////////////
4993 // Adding the Volumes to Mother Volume
4994 ///////////////////////////////////////
4995 for(Int_t j=0; j<2; j++){
4996 sprintf(mountingblocksupportboxdownname,"MountingBlockSuppDownLay%dBox%d",i+5,j+1);
4997 sprintf(mountingblocksupportboxupname,"MountingBlockSuppUpLay%dBox%d",i+5,j+1);
4998 mountingblocksupportboxdown[i][j] = new TGeoVolume(mountingblocksupportboxdownname,
4999 mountingblocksupportboxdownshape[i][j],
5000 fSSDCarbonFiberMedium);
5001 mountingblocksupportboxup[i][j] = new TGeoVolume(mountingblocksupportboxupname,
5002 mountingblocksupportboxupshape[i][j],
5003 fSSDCarbonFiberMedium);
5004 mountingblocksupportboxdown[i][j]->SetLineColor(9);
5005 mountingblocksupportboxup[i][j]->SetLineColor(9);
5006 for(Int_t k=0; k<2; k++){
5007 downmotherladdersupport[i]->AddNode(mountingblocksupportboxdown[i][j],k+1,laddersupportmatrix[k]);
5008 upmotherladdersupport[i]->AddNode(mountingblocksupportboxup[i][j],k+1,laddersupportmatrix[k]);
5009 }
5010 }
5011 for(Int_t k=0; k<2; k++){
5012 downmotherladdersupport[i]->AddNode(centermountingblocksupport[i],k+1,laddersupportmatrix[k]);
5013 downmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
5014 downmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
5015 downmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
5016 downmotherladdersupport[i]->AddNode(mountingblockpiecedown[i],k+1,laddersupportmatrix[k]);
5017 downmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidown[i],k+1,laddersupportmatrix[k]);
5018 upmotherladdersupport[i]->AddNode(centermountingblocksupport[i],k+1,laddersupportmatrix[k]);
5019 upmotherladdersupport[i]->AddNode(sidemountingblocksupport[i],k+1,laddersupportmatrix[k]);
5020 upmotherladdersupport[i]->AddNode(sideladdersupportpiece[i],k+1,laddersupportmatrix[k]);
5021 upmotherladdersupport[i]->AddNode(centerladdersupportpiece[i],k+1,laddersupportmatrix[k]);
5022 upmotherladdersupport[i]->AddNode(mountingblockpieceup[i],k+1,laddersupportmatrix[k]);
5023 upmotherladdersupport[i]->AddNode(mountingblocksupportrapezoidup[i],k+1,laddersupportmatrix[k]);
5024 }
5025 }
5026 TList* laddersupportlist = new TList();
5027 laddersupportlist->Add(downmotherladdersupport[0]);
5028 laddersupportlist->Add(upmotherladdersupport[0]);
5029 laddersupportlist->Add(downmotherladdersupport[1]);
5030 laddersupportlist->Add(upmotherladdersupport[1]);
5031 /////////////////////////////////////////////////////////////
5032 // Deallocating memory
5033 /////////////////////////////////////////////////////////////
5034 for(Int_t i=0; i<fgklayernumber; i++){
5035 for(Int_t j=0; j<nedges+1; j++)
5036 delete vertex[i][j];
5037 delete mountingsupportedgevector[i];
5038 delete [] vertex[i];
5039 delete vertexlist[i];
5040 delete [] xsidevertex[i];
5041 delete [] ysidevertex[i];
5042 delete [] xcentervertex[i];
5043 delete [] ycentervertex[i];
5044 delete [] xsidelowervertex[i];
5045 delete [] ysidelowervertex[i];
5046 delete [] xcenterlowervertex[i];
5047 delete [] ycenterlowervertex[i];
5048 delete [] xmothervertex[i];
5049 delete [] ymothervertex[i];
5050 }
5051 delete [] xsidevertex;
5052 delete [] ysidevertex;
5053 delete [] xcentervertex;
5054 delete [] ycentervertex;
5055 delete [] xsidelowervertex;
5056 delete [] ysidelowervertex;
5057 delete [] xcenterlowervertex;
5058 delete [] ycenterlowervertex;
5059 delete globalrefladdersupportrot;
5060 delete mountingblocksupportrot;
5061 /////////////////////
5062 return laddersupportlist;
5063}
5064 ////////////////////////////////////////////////////////////////////////////////
5065void AliITSv11GeometrySSD::SetLadderSupport(Int_t nedges){
5066//////////////////////////////////////////
5067// Method Ge