V11 SSD geometry (E. Cattaruzza)
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySSD.cxx
CommitLineData
d7599219 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16
17//*************************************************************************
18// SSD geometry, based on ROOT geometrical modeler
19//
20// Enrico Cattaruzza ecattar@ts.infn.it
21//*************************************************************************
22#include "TMath.h"
23#include "TGeoVolume.h"
24#include "TGeoMedium.h"
25#include "TGeoMatrix.h"
26#include <TGeoManager.h>
27#include "AliITSv11GeometrySSD.h"
28#include "TVector3.h"
29#include "TGeoArb8.h"
30#include "TList.h"
31#include "TGeoMatrix.h"
32#include "TGeoCompositeShape.h"
33#include "TGeoTube.h"
34#include "TGeoBBox.h"
35#include "TGeoTrd1.h"
36#include <iostream>
37using namespace std;
38/////////////////////////////////////////////////////////////////////////////////
39//Parameters for SSD Geometry
40/////////////////////////////////////////////////////////////////////////////////
41// Layer5 (lengths are in mm and angles in degrees)
42/////////////////////////////////////////////////////////////////////////////////
43const Double_t AliITSv11GeometrySSD::fgkSSDLay5LadderLength = 950.7;
44const Int_t AliITSv11GeometrySSD::fgkSSDLay5SensorsNumber = 22;
45const Int_t AliITSv11GeometrySSD::fgkSSDLay5LadderNumber = 34;
46const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMin = 378.0;
47const Double_t AliITSv11GeometrySSD::fgkSSDLay5RadiusMax = 384.0;
48const Double_t AliITSv11GeometrySSD::fgkLay5CenterITSPosition = 467.85;
49/////////////////////////////////////////////////////////////////////////////////
50// Layer6 (lengths are in mm and angles in degrees)
51/////////////////////////////////////////////////////////////////////////////////
52const Double_t AliITSv11GeometrySSD::fgkSSDLay6LadderLength = 1068.0;
53const Int_t AliITSv11GeometrySSD::fgkSSDLay6SensorsNumber = 25;
54const Int_t AliITSv11GeometrySSD::fgkSSDLay6LadderNumber = 38;
55const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMin = 428.0;
56const Double_t AliITSv11GeometrySSD::fgkSSDLay6RadiusMax = 434.0;
57const Double_t AliITSv11GeometrySSD::fgkLay6CenterITSPosition = 526.50;
58/////////////////////////////////////////////////////////////////////////////////
59// SSD Chips and Hybrid (lengths are in mm and angles in degrees)
60/////////////////////////////////////////////////////////////////////////////////
61const Int_t AliITSv11GeometrySSD::fgkSSDChipNumber = 6;
62const Double_t AliITSv11GeometrySSD::fgkSSDChipLength = 11.100;
63const Double_t AliITSv11GeometrySSD::fgkSSDChipWidth = 3.850;
64const Double_t AliITSv11GeometrySSD::fgkSSDChipHeight = 0.180;
65const Double_t AliITSv11GeometrySSD::fgkSSDChipSeparationLength = 1.000;
66const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueLength = fgkSSDChipLength;
67const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueWidth = fgkSSDChipWidth;
68const Double_t AliITSv11GeometrySSD::fgkSSDChipGlueHeight = 0.030;
69/////////////////////////////////////////////////////////////////////////////////
70// Stiffener (lengths are in mm and angles in degrees)
71/////////////////////////////////////////////////////////////////////////////////
72const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerLength = 73.000;
73const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerWidth = 6.500;
74//const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 3.315;
75const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerHeight = 0.315;
76const Double_t AliITSv11GeometrySSD::fgkSSDStiffenerToChipDist = 2.500;
77const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Length = 1.600;
78const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Width = 0.870;
79const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor0603Height = 0.800;
80const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Length = 4.600;
81const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Width = 3.400;
82const Double_t AliITSv11GeometrySSD::fgkSSDCapacitor1812Height = 1.400;
83const Double_t AliITSv11GeometrySSD::fgkSSDWireLength = 30.000;
84const Double_t AliITSv11GeometrySSD::fgkSSDWireRadius = 0.185;
85const Double_t AliITSv11GeometrySSD::fgkSSDConnectorPosition[2] = {44.32, 0.33};
86const Double_t AliITSv11GeometrySSD::fgkSSDConnectorSeparation = 0.44;
87const Double_t AliITSv11GeometrySSD::fgkSSDConnectorLength = 2.16;
88const Double_t AliITSv11GeometrySSD::fgkSSDConnectorWidth = 3.60;
89const Double_t AliITSv11GeometrySSD::fgkSSDConnectorHeight =
90 0.25*fgkSSDStiffenerHeight;
91/////////////////////////////////////////////////////////////////////////////////
92// Cooling Block (lengths are in mm and angles in degrees)
93/////////////////////////////////////////////////////////////////////////////////
94const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockLength = 3.000;
95const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockWidth = 4.000;
96const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHeight[3] =
97 {1.950, 0.240, 0.300};
98const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleRadius[2] =
99 {1.000, 0.120};
100const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleLength[2] =
101 {1.900, 0.400};
102const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleCenter =
103 1.500;
104const Double_t AliITSv11GeometrySSD::fgkSSDCoolingBlockHoleHeight =
105 0.300;
106/////////////////////////////////////////////////////////////////////////////////
107// SSD Sensor (lengths are in mm and angles in degrees)
108/////////////////////////////////////////////////////////////////////////////////
109const char* AliITSv11GeometrySSD::fgkSSDSensitiveVolName =
110 "SSDSensorSensitiveVol";
111const Double_t AliITSv11GeometrySSD::fgkSSDSensorLength = 42.000;
112const Double_t AliITSv11GeometrySSD::fgkSSDSensorHeight = 0.300;
113const Double_t AliITSv11GeometrySSD::fgkSSDSensorWidth = 75.000;
114const Double_t AliITSv11GeometrySSD::fgkSSDSensorOverlap =
115 fgkSSDSensorLength-39.1;
116const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveLength = 1.;
117const Double_t AliITSv11GeometrySSD::fgkSSDSensorInsensitiveWidth = 1.;
118/////////////////////////////////////////////////////////////////////////////////
119// Flex (lengths are in mm and angles in degrees)
120/////////////////////////////////////////////////////////////////////////////////
121const Double_t AliITSv11GeometrySSD::fgkSSDFlexFullLength = 106.000;
122const Double_t AliITSv11GeometrySSD::fgkSSDFlexLength[4] =
123 {0.5*(fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
124 +(fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
125 0.5*(fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
126 +(fgkSSDChipNumber-1)*fgkSSDChipSeparationLength)-4.000,
127 9.500, 10.000};
128const Double_t AliITSv11GeometrySSD::fgkSSDFlexWidth[2] =
129 { 9.340, 5.380};
130const Double_t AliITSv11GeometrySSD::fgkSSDFlexHeight[2] =
131 { 0.030, 0.020};
132const Double_t AliITSv11GeometrySSD::fgkSSDFlexAngle = 30.000;
133const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleLength = 1.430;
134const Double_t AliITSv11GeometrySSD::fgkSSDFlexHoleWidth = 3.000;
135const Double_t AliITSv11GeometrySSD::fgkSSDEndFlexCompLength[6] =
136 {3.30,4.12,4.22,1.70,0.75,7.18};
137const Double_t AliITSv11GeometrySSD:: fgkSSDEndFlexCompWidth[3] =
138 {15.03,23.48,12.28};
139/////////////////////////////////////////////////////////////////////////////////
140// SSD Ladder Cable (lengths are in mm and angles in degrees)
141/////////////////////////////////////////////////////////////////////////////////
142const Double_t AliITSv11GeometrySSD::fgkSSDLadderCableWidth = 23.5;
143const Double_t AliITSv11GeometrySSD::fgkSSDEndLadderCableLength = 50.000; /////to be modified
144/////////////////////////////////////////////////////////////////////////////////
145// SSD Module (lengths are in mm and angles in degrees)
146/////////////////////////////////////////////////////////////////////////////////
147const Double_t AliITSv11GeometrySSD::fgkSSDModuleStiffenerPosition[2] =
148 { 1.000, 3.900};
149const Double_t AliITSv11GeometrySSD::fgkSSDModuleSensorSupportDistance =
150 45.600;
151const Double_t AliITSv11GeometrySSD::fgkSSDModuleCoolingBlockToSensor =
152 5.075;
153/////////////////////////////////////////////////////////////////////////////////
154// Sensor Support (lengths are in mm and angles in degrees)
155/////////////////////////////////////////////////////////////////////////////////
156const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportLength =
157 5.800;
158const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportWidth =
159 2.000;
160const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportHeight[2] =
161 { 4.620, 5.180};
162const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportThickness[2] =
163 { 0.450, 0.450};
164const Double_t AliITSv11GeometrySSD::fgkSSDSensorSideSupportPosition =
165 0.5*(fgkSSDModuleSensorSupportDistance
166 + fgkSSDSensorSideSupportThickness[0])
167 - fgkSSDSensorSideSupportLength;
168const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportLength =
169 5.250;
170const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportWidth =
171 1.680;
172const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportHeight[2] =
173 {fgkSSDSensorSideSupportHeight[0]+fgkSSDSensorSideSupportThickness[0],
174 fgkSSDSensorSideSupportHeight[1]+fgkSSDSensorSideSupportThickness[1]};
175const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportThickness[2] =
176 {fgkSSDSensorSideSupportThickness[0],fgkSSDSensorSideSupportThickness[1]};
177const Double_t AliITSv11GeometrySSD::fgkSSDSensorCenterSupportPosition =
178 19.000;
179/////////////////////////////////////////////////////////////////////////////////
180// Chip Cables (lengths are in mm and angles in degrees)
181/////////////////////////////////////////////////////////////////////////////////
182const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesLength[2] =
183 {73.12/fgkSSDChipNumber,fgkSSDChipLength+2.*0.19};
184const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesHeight[4] =
185 { 0.014, 0.010, fgkSSDModuleCoolingBlockToSensor
186 - (fgkSSDSensorSideSupportHeight[1]-fgkSSDSensorSideSupportHeight[0])
187 - fgkSSDCoolingBlockHoleCenter-fgkSSDStiffenerHeight
188 - fgkSSDChipHeight-fgkSSDSensorHeight,
189 fgkSSDModuleCoolingBlockToSensor
190 - fgkSSDCoolingBlockHoleCenter-fgkSSDStiffenerHeight
191 - fgkSSDChipHeight-fgkSSDSensorHeight};
192const Double_t AliITSv11GeometrySSD::fgkSSDChipCablesWidth[3] =
193 { 11.000, 0.800, 0.600};
194/////////////////////////////////////////////////////////////////////////////////
195// Carbon Fiber Junction Parameters (lengths are in mm and angles in degrees)
196/////////////////////////////////////////////////////////////////////////////////
197const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
198 3.820;
199//const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionLength =
200// 3.780;
201const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionWidth =
202 fgkSSDSensorLength-fgkSSDSensorOverlap;
203const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionEdge[2] =
204 { 0.86, 0.30};
205const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionAngle[2] =
206 { 30.00, 90.00};
207const Double_t AliITSv11GeometrySSD::fgkCarbonFiberJunctionToSensorSupport =
208 1.78;
209/////////////////////////////////////////////////////////////////////////////////
210//Carbon Fiber Parameters (lengths are in mm and angles in degrees)
211/////////////////////////////////////////////////////////////////////////////////
212const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleLength =
213 fgkSSDModuleSensorSupportDistance-2.*fgkCarbonFiberJunctionToSensorSupport;
214const Double_t AliITSv11GeometrySSD::fgkCarbonFiberTriangleAngle =
215 60.00;
216const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportTopEdgeDist[2] =
217 { 0.751, 0.482};
218const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportEdgeLength =
219 1.630;
220const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportWidth =
221 0.950;
222const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportXAxisLength =
223 fgkCarbonFiberTriangleLength-0.5*fgkCarbonFiberSupportTopEdgeDist[1]
224 / TMath::Cos(fgkCarbonFiberTriangleAngle*TMath::DegToRad());
225const Double_t AliITSv11GeometrySSD::fgkCarbonFiberSupportYAxisLength =
226 0.5*(fgkCarbonFiberJunctionWidth-fgkCarbonFiberSupportWidth)
227 - fgkCarbonFiberSupportTopEdgeDist[0]-fgkCarbonFiberSupportWidth;
228/////////////////////////////////////////////////////////////////////////////////
229// Carbon Fiber Lower Support Parameters (lengths are in mm)
230/////////////////////////////////////////////////////////////////////////////////
231const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportWidth
232 = 0.950;
233const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportLowerLenght
234 = 1.600;
235const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportHeight
236 = 0.830;
237const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumeSeparation
238 = 0.5*fgkCarbonFiberSupportWidth;
239const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportTransverseWidth
240 = fgkCarbonFiberJunctionWidth
241 - 2.*(fgkCarbonFiberLowerSupportWidth
242 + fgkCarbonFiberLowerSupportVolumeSeparation);
243const Double_t AliITSv11GeometrySSD::fgkCarbonFiberLowerSupportVolumePosition[2]
244 = {fgkCarbonFiberLowerSupportWidth
245 + fgkCarbonFiberLowerSupportVolumeSeparation,
246 fgkCarbonFiberLowerSupportWidth
247 + fgkCarbonFiberLowerSupportVolumeSeparation
248 + fgkCarbonFiberLowerSupportTransverseWidth};
249/////////////////////////////////////////////////////////////////////////////////
250// End Ladder Carbon Fiber Junction Parameters (lengths are in mm and angles in degrees)
251/////////////////////////////////////////////////////////////////////////////////
252const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberLowerJunctionLength[2] =
253 {0.5*(fgkSSDLay5LadderLength
254 -fgkSSDLay5SensorsNumber*fgkCarbonFiberJunctionWidth
255 -fgkCarbonFiberLowerSupportWidth),
256 0.5*(fgkSSDLay5LadderLength
257 -fgkSSDLay5SensorsNumber*fgkCarbonFiberJunctionWidth
258 +fgkCarbonFiberLowerSupportWidth)};
259const Double_t AliITSv11GeometrySSD::fgkEndLadderCarbonFiberUpperJunctionLength[2] =
260 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-20.4,
261 fgkEndLadderCarbonFiberLowerJunctionLength[1]-20.6};
262const Double_t AliITSv11GeometrySSD::fgkEndLadderMountingBlockPosition[2] =
263 {fgkEndLadderCarbonFiberLowerJunctionLength[0]-16.50,
264 fgkEndLadderCarbonFiberLowerJunctionLength[1]-31.50};
265/////////////////////////////////////////////////////////////////////////////////
266// Cooling Tube Support (lengths are in mm and angles in degrees)
267/////////////////////////////////////////////////////////////////////////////////
268const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmax = 1.45;
269const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportRmin
270 = fgkSSDCoolingBlockHoleRadius[0];
271const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportLength = 8.55;
272const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportHeight = 0.85;
273const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportWidth = 2.00;
274const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportSeparation =
275 fgkSSDSensorLength-2.*fgkSSDSensorOverlap;
276const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSupportToCarbonFiber = 11.70;
277/////////////////////////////////////////////////////////////////////////////////
278// Cooling Tube (lengths are in mm and angles in degrees)
279/////////////////////////////////////////////////////////////////////////////////
280const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmax =
281 fgkCoolingTubeSupportRmin;
282const Double_t AliITSv11GeometrySSD::fgkCoolingTubeRmin = 0.96;
283const Double_t AliITSv11GeometrySSD::fgkCoolingTubeLength =
284 fgkCarbonFiberJunctionWidth;
285const Double_t AliITSv11GeometrySSD::fgkCoolingTubeSeparation =
286 fgkSSDModuleSensorSupportDistance+fgkSSDCoolingBlockLength;
287//const Double_t AliITSv11GeometrySSD_ct::fgkCoolingTubeLength = 39.1;
288/////////////////////////////////////////////////////////////////////////////////
289// SSD Mounting Block Parameters (lengths are in mm and angles in degrees)
290/////////////////////////////////////////////////////////////////////////////////
291const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockLength[3] =
292 { 60.0, 42.2, 34.0};
293const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHeight[4] =
294 { 4.0, 8.0, 5.0, 0.2};
295const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockWidth =
296 20.0;
297const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidAngle =
298 40.0;
299const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidHeight =
300 0.30*(fgkSSDMountingBlockHeight[1]-fgkSSDMountingBlockHeight[2]);
301const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTrapezoidUpBasis =
302 2.5;
303const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeLength[2] =
304 { 56.0, 12.0};
305const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleTubeWidth[2] =
306 { 5.0, 2.9};
307const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockHoleRadius =
308 1.0;
309const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleEdge =
310 6.0;
311const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleHeigth =
312 4.0;
313const Double_t AliITSv11GeometrySSD::fgkSSDMountingBlockScrewHoleRadius[2] =
314 { 1.5,fgkSSDMountingBlockScrewHoleEdge/6.};
315/////////////////////////////////////////////////////////////////////////////////
316AliITSv11GeometrySSD::AliITSv11GeometrySSD(){
317 /////////////////////////////////
318 // Standard Default Constructor
319 /////////////////////////////////
320 // Initializing display colors
321 //////////////////////////////
322 fColorCarbonFiber = 4;
323 fColorRyton = 5;
324 fColorPhynox = 5;
325 fColorSilicon = 3;
326 fColorAl = 7;
327 fColorKapton = 6;
328 fColorPolyhamide = 5;
329 fColorStiffener = 9;
330 fColorEpoxy = 30;
331 CreateMaterials();
332}
333/////////////////////////////////////////////////////////////////////////////////
334// Setting the transformation Matrices
335/////////////////////////////////////////////////////////////////////////////////
336void AliITSv11GeometrySSD::SetSSDSensorSupportCombiTransMatrix(){
337 ////////////////////////////////////////////////////////
338 //Translation Parameters SSDSensorSupportAssembly:
339 ////////////////////////////////////////////////////////
340 const Double_t SSDSensorSupportTransX[3] = {-0.5*fgkSSDSensorSideSupportWidth,
341 0.5*fgkSSDSensorSideSupportWidth,
342 0.5*fgkSSDSensorCenterSupportThickness[0]
343 - fgkSSDSensorCenterSupportPosition};
344 const Double_t SSDSensorSupportTransY[3] =
345 {0.5*fgkSSDSensorSideSupportThickness[0],
346 -0.5*fgkSSDSensorSideSupportThickness[0]
347 -fgkSSDModuleSensorSupportDistance,
348 0.5*fgkSSDSensorCenterSupportWidth
349 -0.5*fgkSSDModuleSensorSupportDistance};
350 const Double_t SSDSensorSupportTransZ[3] = {0.,0.,
351 fgkSSDSensorCenterSupportThickness[0]};
352 ////////////////////////////////////////////////////////
353 //Rotational Parameters SSDSensorSupportAssembly:
354 ////////////////////////////////////////////////////////
355 const Double_t SSDSensorSupportRotPhi[3] = { 0., 180., 270.};
356 const Double_t SSDSensorSupportRotTheta[3] = { 90., 90., 90.};
357 const Double_t SSDSensorSupportRotPsi[3] = {- 90.,- 90.,- 90.};
358 ////////////////////////////////////////////////////////////////
359 //Name of CombiTrans Transformation of SSDSensorSupportAssembly:
360 ////////////////////////////////////////////////////////////////
361 char SSDSensorSupportCombiTransName[40];
362 char SSDSensorSupportRotName[40];
363 TGeoCombiTrans *SSDSensorSupportLocalMatrix[fgkSSDSensorSupportCombiTransNumber];
364 for(Int_t i=0; i<fgkSSDSensorSupportCombiTransNumber; i++){
365 sprintf(SSDSensorSupportCombiTransName,"SSDSensorSupportCombiTrans%i",i);
366 sprintf(SSDSensorSupportRotName,"SSDSensorSupportRot%i",i);
367 SSDSensorSupportLocalMatrix[i] =
368 new TGeoCombiTrans(SSDSensorSupportCombiTransName,
369 SSDSensorSupportTransX[i],
370 SSDSensorSupportTransY[i],
371 SSDSensorSupportTransZ[i],
372 new TGeoRotation(SSDSensorSupportRotName,
373 SSDSensorSupportRotPhi[i],
374 SSDSensorSupportRotTheta[i],
375 SSDSensorSupportRotPsi[i]));
376 SSDSensorSupportCombiTransMatrix[i] = SSDSensorSupportLocalMatrix[i];
377 }
378}
379/////////////////////////////////////////////////////////////////////////////////
380void AliITSv11GeometrySSD::SetSSDModuleCombiTransMatrix(Double_t SSDChipCablesHeigth){
381/////////////////////////////////////////////////////////////////////////////////
382//Translation Parameters SSDModuleAssembly:
383////////////////////////////////////////////////////////
384 const Double_t SSDModuleTransX[7] = {0.5*fgkSSDStiffenerLength,
385 0.5*fgkSSDChipLength+0.5*(fgkSSDStiffenerLength
386 - (fgkSSDChipNumber*fgkSSDChipLength+(fgkSSDChipNumber-1)
387 * fgkSSDChipSeparationLength)),
388 - fgkSSDModuleStiffenerPosition[0]+0.5*fgkSSDSensorWidth,
389 0.5*(fgkSSDStiffenerLength-fgkSSDChipNumber*fgkSSDChipLength
390 - (fgkSSDChipNumber-1)*fgkSSDChipSeparationLength),
391 0.5*fgkSSDStiffenerLength-0.5*fgkSSDModuleSensorSupportDistance
392 - fgkSSDCoolingBlockLength,
393 0.5*(fgkSSDStiffenerLength+fgkSSDChipCablesLength[1]
394 + (fgkSSDChipNumber-1)*fgkSSDChipCablesLength[0]),
395 0.5*(fgkSSDStiffenerLength+fgkSSDChipNumber*fgkSSDChipLength
396 +(fgkSSDChipNumber-1)*fgkSSDChipSeparationLength)};
397 const Double_t SSDModuleTransY[7] = {0.5*fgkSSDStiffenerWidth,
398 0.5*fgkSSDChipWidth+(fgkSSDStiffenerWidth
399 - fgkSSDStiffenerToChipDist-fgkSSDChipWidth),
400 - fgkSSDModuleStiffenerPosition[1]+0.5*fgkSSDSensorLength,
401 fgkSSDStiffenerWidth,
402 0.,
403 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
404 - fgkSSDStiffenerWidth
405 + fgkSSDStiffenerToChipDist+fgkSSDChipWidth,
406 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
407 - fgkSSDStiffenerWidth};
408 const Double_t SSDModuleTransZ[7] = {0.5*fgkSSDStiffenerHeight,
409 - 0.5*fgkSSDChipHeight,
410 0.5*fgkSSDSensorHeight-fgkSSDStiffenerHeight-fgkSSDChipHeight
411 - SSDChipCablesHeigth,
412 - 0.5*fgkSSDFlexHeight[0],
413 fgkSSDStiffenerHeight,
414 - fgkSSDChipHeight,
415 - 0.5*fgkSSDChipHeight};
416 ////////////////////////////////////////////////////////
417 //Rotational Parameters SSDModuleAssembly:
418 ////////////////////////////////////////////////////////
419 const Double_t SSDModuleRotPhi[7] = { 0., 0., 90., 0., 0., 90., 180.};
420 const Double_t SSDModuleRotTheta[7] = { 0., 0., 0., 0., 0., 0., 0.};
421 const Double_t SSDModuleRotPsi[7] = { 0., 0., 0., 0., 0., 0., 0.};
422 ////////////////////////////////////////////////////////
423 //Name of CombiTrans Transformation of SSDModuleAssembly:
424 ////////////////////////////////////////////////////////
425 const char* SSDModuleCombiTransName[7] = {"SSDStiffenerCombiTrans",
426 "SSDChipCombiTrans",
427 "SSDSensorCombiTrans",
428 "SSDFlex0CombiTrans",
429 "SSDCoolingBlockCombiTrans",
430 "SSDChipCablesCombiTrans",
431 "SSDFlex1CombiTrans"};
432 const char* SSDModuleRotName[7] = {"SSDStiffenerRotName",
433 "SSDChipRotName",
434 "SSDSensorRotName",
435 "SSDFlex0RotName",
436 "SSDCoolingBlockRotName",
437 "SSDChipCablesRotName",
438 "SSDFlex1RotName"};
439 TGeoCombiTrans *SSDModuleLocalMatrix[fgkSSDModuleCombiTransNumber];
440 for(Int_t i=0; i<fgkSSDModuleCombiTransNumber; i++){
441 SSDModuleLocalMatrix[i] =
442 new TGeoCombiTrans(SSDModuleCombiTransName[i],
443 SSDModuleTransX[i],
444 SSDModuleTransY[i],
445 SSDModuleTransZ[i],
446 new TGeoRotation(SSDModuleRotName[i],
447 SSDModuleRotPhi[i],
448 SSDModuleRotTheta[i],
449 SSDModuleRotPsi[i]));
450 SSDModuleCombiTransMatrix[i] = SSDModuleLocalMatrix[i];
451 }
452}
453/////////////////////////////////////////////////////////////////////////////////
454void AliITSv11GeometrySSD::SetCarbonFiberJunctionCombiTransMatrix(){
455/////////////////////////////////////////////////////////////////////////////////
456 //Translation Parameters CarbonFiberJunction:
457 ////////////////////////////////////////////////////////
458 const Double_t CarbonFiberJunctionTransX[3] =
459 { 0.0,fgkCarbonFiberTriangleLength,fgkCarbonFiberTriangleLength
460 * TMath::Cos(fgkCarbonFiberTriangleAngle*TMath::DegToRad())};
461 const Double_t CarbonFiberJunctionTransY[3] =
462 { 0.0, 0.0,fgkCarbonFiberTriangleLength
463 * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad())};
464 const Double_t CarbonFiberJunctionTransZ[3] = { 0.0, 0.0, 0.0};
465 ////////////////////////////////////////////////////////
466 //Rotational Parameters CarbonFiberJunction:
467 ////////////////////////////////////////////////////////
468 const Double_t CarbonFiberJunctionRotPhi[3] = { 0., 120., 240.};
469 const Double_t CarbonFiberJunctionRotTheta[3] = { 0., 0., 0.};
470 const Double_t CarbonFiberJunctionRotPsi[3] = { 0., 0., 0.};
471 ///////////////////////////////////////////////////////////
472 //Name of CombiTrans Transformation of CarbonFiberJunction:
473 ///////////////////////////////////////////////////////////
474 char CarbonFiberJunctionCombiTransName[40];
475 char CarbonFiberJunctionRotName[40];
476 TGeoCombiTrans *CarbonFiberJunctionLocalMatrix[fgkCarbonFiberJunctionCombiTransNumber];
477 for(Int_t i=0; i<fgkCarbonFiberJunctionCombiTransNumber; i++) {
478 sprintf(CarbonFiberJunctionCombiTransName,"CarbonFiberJunctionCombiTrans%i",i);
479 sprintf(CarbonFiberJunctionRotName,"CarbonFiberJunctionRot%i",i);
480 CarbonFiberJunctionLocalMatrix[i] =
481 new TGeoCombiTrans(CarbonFiberJunctionCombiTransName,
482 CarbonFiberJunctionTransX[i],
483 CarbonFiberJunctionTransY[i],
484 CarbonFiberJunctionTransZ[i],
485 new TGeoRotation(CarbonFiberJunctionRotName,
486 CarbonFiberJunctionRotPhi[i],
487 CarbonFiberJunctionRotTheta[i],
488 CarbonFiberJunctionRotPsi[i]));
489 CarbonFiberJunctionCombiTransMatrix[i] = CarbonFiberJunctionLocalMatrix[i];
490 }
491}
492/////////////////////////////////////////////////////////////////////////////////
493void AliITSv11GeometrySSD::SetEndLadderCarbonFiberJunctionCombiTransMatrix(Int_t i){
494/////////////////////////////////////////////////////////////////////////////////
495 //Translation Parameters EndLadderCarbonFiberJunction:
496 ////////////////////////////////////////////////////////
497 const Double_t EndLadderCarbonFiberJunctionTransX[3] =
498 { 0.0,fgkCarbonFiberTriangleLength,fgkCarbonFiberTriangleLength
499 * TMath::Cos(fgkCarbonFiberTriangleAngle*TMath::DegToRad())};
500 const Double_t EndLadderCarbonFiberJunctionTransY[3] =
501 { 0.0, 0.0,fgkCarbonFiberTriangleLength
502 * TMath::Sin(fgkCarbonFiberTriangleAngle*TMath::DegToRad())};
503 const Double_t EndLadderCarbonFiberJunctionTransZ[3] = { 0.0, 0.0,
504 0.5*(fgkEndLadderCarbonFiberLowerJunctionLength[i]
505 -fgkEndLadderCarbonFiberUpperJunctionLength[i])};
506 ////////////////////////////////////////////////////////
507 //Rotational Parameters EndLadderCarbonFiberJunction:
508 ////////////////////////////////////////////////////////
509 const Double_t EndLadderCarbonFiberJunctionRotPhi[3] = { 0., 120., 240.};
510 const Double_t EndLadderCarbonFiberJunctionRotTheta[3] = { 0., 0., 0.};
511 const Double_t EndLadderCarbonFiberJunctionRotPsi[3] = { 0., 0., 0.};
512 ///////////////////////////////////////////////////////////
513 //Name of CombiTrans Transformation of CarbonFiberJunction:
514 ///////////////////////////////////////////////////////////
515 char EndLadderCarbonFiberJunctionCombiTransName[40];
516 char EndLadderCarbonFiberJunctionRotName[40];
517 TGeoCombiTrans *EndLadderCarbonFiberJunctionLocalMatrix[fgkEndLadderCarbonFiberJunctionCombiTransNumber];
518 for(Int_t i=0; i<fgkEndLadderCarbonFiberJunctionCombiTransNumber; i++) {
519 sprintf(EndLadderCarbonFiberJunctionCombiTransName,"EndLadderCarbonFiberJunctionCombiTrans%i",i);
520 sprintf(EndLadderCarbonFiberJunctionRotName,"EndLadderCarbonFiberJunctionRot%i",i);
521 EndLadderCarbonFiberJunctionLocalMatrix[i] =
522 new TGeoCombiTrans(EndLadderCarbonFiberJunctionCombiTransName,
523 EndLadderCarbonFiberJunctionTransX[i],
524 EndLadderCarbonFiberJunctionTransY[i],
525 EndLadderCarbonFiberJunctionTransZ[i],
526 new TGeoRotation(EndLadderCarbonFiberJunctionRotName,
527 EndLadderCarbonFiberJunctionRotPhi[i],
528 EndLadderCarbonFiberJunctionRotTheta[i],
529 EndLadderCarbonFiberJunctionRotPsi[i]));
530 EndLadderCarbonFiberJunctionCombiTransMatrix[i] =
531 EndLadderCarbonFiberJunctionLocalMatrix[i];
532 }
533}
534////////////////////////////////////////////////////////////////////////////////
535void AliITSv11GeometrySSD::SetCarbonFiberAssemblyCombiTransMatrix(){
536/////////////////////////////////////////////////////////////////////////////////
537 //Translation Parameters CarbonFiberAssembly:
538 ////////////////////////////////////////////////////////
539 const Double_t CarbonFiberAssemblyTransX[3] = { 0.0, 0.0, 0.0};
540 const Double_t CarbonFiberAssemblyTransY[3] =
541 { 0.5*fgkCarbonFiberJunctionWidth, 0.0,
542 fgkCarbonFiberJunctionWidth-fgkCarbonFiberLowerSupportWidth
543 - fgkCarbonFiberLowerSupportVolumePosition[0]
544 - fgkCarbonFiberLowerSupportVolumePosition[1]};
545 const Double_t CarbonFiberAssemblyTransZ[3] =
546 { 0.0, 0.0,- 0.5*fgkCarbonFiberLowerSupportHeight};
547 ////////////////////////////////////////////////////////
548 //Rotational Parameters CarbonFiberAssembly:
549 ////////////////////////////////////////////////////////
550 const Double_t CarbonFiberAssemblyRotPhi[3] = { 0., 90., 0.};
551 const Double_t CarbonFiberAssemblyRotTheta[3] = { 90.,
552 -fgkCarbonFiberTriangleAngle, 0.};
553 const Double_t CarbonFiberAssemblyRotPsi[3] = { 0.,- 90., 0.};
554 ///////////////////////////////////////////////////////////
555 //Name of CombiTrans Transformation of CarbonFiberAssembly:
556 ///////////////////////////////////////////////////////////
557 char CarbonFiberAssemblyCombiTransName[30];
558 char CarbonFiberAssemblyRotName[30];
559 TGeoCombiTrans *CarbonFiberAssemblyLocalMatrix[fgkCarbonFiberAssemblyCombiTransNumber];
560 for(Int_t i=0; i<fgkCarbonFiberAssemblyCombiTransNumber; i++) {
561 sprintf(CarbonFiberAssemblyCombiTransName,"CarbonFiberAssemblyCombiTrans%i",i);
562 sprintf(CarbonFiberAssemblyRotName,"CarbonFiberAssemblyRot%i",i);
563 CarbonFiberAssemblyLocalMatrix[i] =
564 new TGeoCombiTrans(CarbonFiberAssemblyCombiTransName,
565 CarbonFiberAssemblyTransX[i],
566 CarbonFiberAssemblyTransY[i],
567 CarbonFiberAssemblyTransZ[i],
568 new TGeoRotation(CarbonFiberAssemblyRotName,
569 CarbonFiberAssemblyRotPhi[i],
570 CarbonFiberAssemblyRotTheta[i],
571 CarbonFiberAssemblyRotPsi[i]));
572 CarbonFiberAssemblyCombiTransMatrix[i] = CarbonFiberAssemblyLocalMatrix[i];
573 }
574}
575/////////////////////////////////////////////////////////////////////////////////
576void AliITSv11GeometrySSD::SetCoolingTubeSupportCombiTransMatrix(){
577 ////////////////////////////////////////////////////////
578 //Translation Parameters CoolingTubeSupport:
579 ////////////////////////////////////////////////////////
580 Double_t Phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
581 /fgkCoolingTubeSupportRmax);
582 const Double_t CoolingTubeSupportTransX[2] =
583 {0.,2.*fgkCoolingTubeSupportRmax*TMath::Cos(Phi)
584 + 2.*(fgkCoolingTubeSupportLength
585 - fgkCoolingTubeSupportRmax*(1.+TMath::Cos(Phi)))
586 + fgkCarbonFiberTriangleLength
587 - 2.0*fgkCarbonFiberJunctionLength};
588 const Double_t CoolingTubeSupportTransY[2] = { 0.0, 0.0};
589 const Double_t CoolingTubeSupportTransZ[2] = { 0.0, 0.0};
590 ////////////////////////////////////////////////////////
591 //Rotational Parameters CoolingTubeSupport:
592 ////////////////////////////////////////////////////////
593 const Double_t CoolingTubeSupportRotPhi[2] = { 0., 180.};
594 const Double_t CoolingTubeSupportRotTheta[2] = { 0., 0.};
595 const Double_t CoolingTubeSupportRotPsi[2] = { 0., 0.};
596 ///////////////////////////////////////////////////////////
597 //Name of CombiTrans Transformation of CarbonFiberJunction:
598 ///////////////////////////////////////////////////////////
599 char CoolingTubeSupportCombiTransName[40];
600 char CoolingTubeSupportRotName[40];
601 TGeoCombiTrans *CoolingTubeSupportLocalMatrix[fgkCoolingTubeSupportCombiTransNumber];
602 for(Int_t i=0; i<fgkCoolingTubeSupportCombiTransNumber; i++) {
603 sprintf(CoolingTubeSupportCombiTransName,"CoolingTubeSupportCombiTrans%i",i);
604 sprintf(CoolingTubeSupportRotName,"CoolingTubeSupportRot%i",i);
605 CoolingTubeSupportLocalMatrix[i] =
606 new TGeoCombiTrans(CoolingTubeSupportCombiTransName,
607 CoolingTubeSupportTransX[i],
608 CoolingTubeSupportTransY[i],
609 CoolingTubeSupportTransZ[i],
610 new TGeoRotation(CoolingTubeSupportRotName,
611 CoolingTubeSupportRotPhi[i],
612 CoolingTubeSupportRotTheta[i],
613 CoolingTubeSupportRotPsi[i]));
614 CoolingTubeSupportCombiTransMatrix[i] = CoolingTubeSupportLocalMatrix[i];
615 }
616}
617/////////////////////////////////////////////////////////////////////////////////
618void AliITSv11GeometrySSD::SetCoolingTubeCombiTransMatrix(){
619 ////////////////////////////////////////////////////////
620 //Translation Parameters CoolingTube:
621 ////////////////////////////////////////////////////////
622 const Double_t CoolingTubeTransX[2] = { 0., fgkCoolingTubeSeparation};
623 const Double_t CoolingTubeTransY[2] = { fgkCoolingTubeLength/2.0, fgkCoolingTubeLength/2.0};
624 const Double_t CoolingTubeTransZ[2] = { 0.0, 0.};
625 ////////////////////////////////////////////////////////
626 //Rotational Parameters CoolingTube:
627 ////////////////////////////////////////////////////////
628 const Double_t CoolingTubeRotPhi[2] = { 0., 0.};
629 const Double_t CoolingTubeRotTheta[2] = { 90., 90.};
630 const Double_t CoolingTubeRotPsi[2] = { 0., 0.};
631 ///////////////////////////////////////////////////////////
632 //Name of CombiTrans Transformation of CarbonFiberJunction:
633 ///////////////////////////////////////////////////////////
634 const char* CoolingTubeCombiTransName[fgkCoolingTubeCombiTransNumber] =
635 {"CoolingTubeCombiTrans0","CoolingTubeCombiTrans1"};
636 const char* CoolingTubeRorationName[fgkCoolingTubeCombiTransNumber] =
637 {"CoolingTubeRotation0","CoolingTubeRotation1"};
638 TGeoCombiTrans *CoolingTubeLocalMatrix[fgkCoolingTubeCombiTransNumber];
639 for(Int_t i=0; i<fgkCoolingTubeCombiTransNumber; i++) {
640 CoolingTubeLocalMatrix[i] =
641 new TGeoCombiTrans(CoolingTubeCombiTransName[i],
642 CoolingTubeTransX[i],
643 CoolingTubeTransY[i],
644 CoolingTubeTransZ[i],
645 new TGeoRotation(CoolingTubeRorationName[i],
646 CoolingTubeRotPhi[i],
647 CoolingTubeRotTheta[i],
648 CoolingTubeRotPsi[i] ) );
649 CoolingTubeTransMatrix[i] = CoolingTubeLocalMatrix[i];
650 }
651}
652/////////////////////////////////////////////////////////////////////////////////
653void AliITSv11GeometrySSD::SetLadderSegmentCombiTransMatrix(){
654/////////////////////////////////////////////////////////////////////////////////
655 //Translation Parameters LadderSegment:
656 ////////////////////////////////////////////////////////
657 const Double_t LadderSegmentTransX[fgkLadderSegmentCombiTransNumber] = { 0.,
658 - 0.5*(fgkSSDSensorWidth-fgkCarbonFiberTriangleLength),
659 fgkCarbonFiberTriangleLength+fgkCarbonFiberJunctionToSensorSupport,
660 fgkCarbonFiberJunctionLength-(fgkCoolingTubeSupportLength
661 - fgkCoolingTubeSupportRmax),
662 0.5*(fgkCarbonFiberTriangleLength-fgkCoolingTubeSeparation)};
663 const Double_t LadderSegmentTransY[fgkLadderSegmentCombiTransNumber] = { 0.,
664 - (2.*fgkSSDSensorLength-fgkSSDSensorOverlap)+
665 fgkSSDModuleStiffenerPosition[1]+fgkSSDStiffenerWidth
666 + 0.5*fgkSSDFlexHoleLength+2.*fgkCarbonFiberJunctionWidth
667 - 0.5*(fgkCarbonFiberLowerSupportWidth+fgkSSDSensorCenterSupportLength
668 - fgkSSDSensorCenterSupportThickness[0]),
669 fgkCarbonFiberJunctionWidth-0.5*(fgkCarbonFiberLowerSupportWidth
670 + fgkSSDSensorCenterSupportLength
671 - fgkSSDSensorCenterSupportThickness[0])
672 - fgkSSDSensorCenterSupportPosition,
673 fgkCarbonFiberJunctionWidth-fgkCarbonFiberLowerSupportWidth
674 - fgkCoolingTubeSupportToCarbonFiber,
675 0.0};
676 const Double_t LadderSegmentTransZ[fgkLadderSegmentCombiTransNumber] = { 0.,
677 - (fgkSSDModuleCoolingBlockToSensor+0.5*fgkCoolingTubeSupportHeight
678 - fgkSSDSensorHeight-fgkSSDChipCablesHeight[3]-fgkSSDChipHeight),
679 0.,
680 - 0.5*fgkCoolingTubeSupportHeight,
681 - 0.5*fgkCoolingTubeSupportHeight};
682//////////////////////////////////////////////////
683 //Rotational Parameters LadderSegment:
684 ////////////////////////////////////////////////////////
685 const Double_t LadderSegmentRotPhi[fgkLadderSegmentCombiTransNumber] =
686 { 0., 0.,- 90., 0., 0.};
687 const Double_t LadderSegmentRotTheta[fgkLadderSegmentCombiTransNumber] =
688 { 0., 0., 0., 90., 0.};
689 const Double_t LadderSegmentRotPsi[fgkLadderSegmentCombiTransNumber] =
690 { 0., 0., 0., 0., 0.};
691 //////////////////////////////////////////////////////
692 //Name of CombiTrans Transformation of LadderSegment:
693 //////////////////////////////////////////////////////
694 char LadderSegmentCombiTransName[40];
695 char LadderSegmentRotName[40];
696 TGeoCombiTrans *LadderSegmentLocalMatrix[fgkLadderSegmentCombiTransNumber];
697 for(Int_t i=0; i<fgkLadderSegmentCombiTransNumber; i++) {
698 sprintf(LadderSegmentCombiTransName,"LadderSegmentCombiTrans%i",i);
699 sprintf(LadderSegmentRotName,"LadderSegmentRot%i",i);
700 LadderSegmentLocalMatrix[i] =
701 new TGeoCombiTrans(LadderSegmentCombiTransName,
702 LadderSegmentTransX[i],
703 LadderSegmentTransY[i],
704 LadderSegmentTransZ[i],
705 new TGeoRotation(LadderSegmentRotName,
706 LadderSegmentRotPhi[i],
707 LadderSegmentRotTheta[i],
708 LadderSegmentRotPsi[i]));
709 LadderSegmentCombiTransMatrix[i] = LadderSegmentLocalMatrix[i];
710 }
711}
712/////////////////////////////////////////////////////////////////////////////////
713void AliITSv11GeometrySSD::SetEndLadderSegmentCombiTransMatrix(Int_t i){
714/////////////////////////////////////////////////////////////////////////////////
715 //Translation Parameters EndLadderSegment:
716 ////////////////////////////////////////////////////////
717 const Double_t EndLadderSegmentTransX[4] = {0.0,
718 0.0,
719 - 0.25*(fgkSSDMountingBlockLength[0]
720 + fgkSSDMountingBlockLength[1])
721 + 0.5*fgkCarbonFiberTriangleLength,
722 0.0};
723 const Double_t EndLadderSegmentTransY[4] =
724 {0.5*fgkEndLadderCarbonFiberLowerJunctionLength[i],
725 i==0 ? 0. : fgkCarbonFiberLowerSupportWidth,
726 fgkEndLadderMountingBlockPosition[i],
727 (1-i)*(fgkEndLadderMountingBlockPosition[i]
728 + 0.5*fgkSSDMountingBlockWidth)};
729 const Double_t EndLadderSegmentTransZ[4] = {0.0,
730 0.0,
731 - fgkSSDMountingBlockHeight[1]
732 + 0.5*fgkSSDMountingBlockHeight[0],
733 - 0.5*fgkCarbonFiberLowerSupportHeight};
734 ////////////////////////////////////////////////////////
735 //Rotational Parameters EndLadderSegment:
736 ////////////////////////////////////////////////////////
737 const Double_t EndLadderSegmentRotPhi[4] = { 0., 90., 0., 0.};
738 const Double_t EndLadderSegmentRotTheta[4] = { 90.,-fgkCarbonFiberTriangleAngle,
739 0., 0.};
740 const Double_t EndLadderSegmentRotPsi[4] = { 0.,- 90., 0., 0.};
741 ////////////////////////////////////////////////////////
742 //Name of CombiTrans Transformation of EndLadderSegment:
743 ////////////////////////////////////////////////////////
744 char EndLadderSegmentCombiTransName[30];
745 char EndLadderSegmentRotName[30];
746 TGeoCombiTrans *EndLadderSegmentLocalMatrix[fgkEndLadderSegmentCombiTransNumber];
747 for(Int_t i=0; i<fgkEndLadderSegmentCombiTransNumber; i++){
748 sprintf(EndLadderSegmentCombiTransName,"EndLadderSegmentCombiTrans%i",i);
749 sprintf(EndLadderSegmentRotName,"EndLadderSegmentRot%i",i);
750 EndLadderSegmentLocalMatrix[i] =
751 new TGeoCombiTrans(EndLadderSegmentCombiTransName,
752 EndLadderSegmentTransX[i],
753 EndLadderSegmentTransY[i],
754 EndLadderSegmentTransZ[i],
755 new TGeoRotation(EndLadderSegmentRotName,
756 EndLadderSegmentRotPhi[i],
757 EndLadderSegmentRotTheta[i],
758 EndLadderSegmentRotPsi[i]));
759 EndLadderSegmentCombiTransMatrix[i] = EndLadderSegmentLocalMatrix[i];
760 }
761}
762/////////////////////////////////////////////////////////////////////////////////
763void AliITSv11GeometrySSD::SetLadderCableCombiTransMatrix(Int_t iLayer){
764////////////////////////////////////////////////////////////////////////////////
765// Translation Parameters for LadderCable
766/////////////////////////////////////////
767 Double_t SSDFlexRadius = fgkSSDStiffenerHeight+2*fgkSSDFlexHeight[0]
768 + fgkSSDFlexHeight[1];
769 Double_t SSDFlexRadiusMax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
770 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
771 Double_t SSDLadderCableTransX[3];
772 SSDLadderCableTransX[0] = (SSDFlexRadiusMax-fgkSSDFlexHeight[1]-SSDFlexRadius)
773 * TMath::Sin(2.*fgkSSDFlexAngle*TMath::DegToRad())
774 * TMath::Cos(2.*fgkSSDFlexAngle*TMath::DegToRad());
775 SSDLadderCableTransX[1] = ((SSDFlexRadiusMax-fgkSSDFlexHeight[1]-SSDFlexRadius)
776 - SSDLadderCableTransX[0]
777 / TMath::Sin(2.*fgkSSDFlexAngle*TMath::DegToRad()))
778 * TMath::Cos(fgkSSDFlexAngle*TMath::DegToRad());
779 SSDLadderCableTransX[2] = (fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
780 * TMath::DegToRad()*SSDFlexRadiusMax
781 - fgkSSDFlexLength[2]-TMath::Pi()
782 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0]
783 - fgkSSDLadderCableWidth)
784 * TMath::Cos(2.*fgkSSDFlexAngle*TMath::DegToRad());
785 Double_t SSDLadderCableTransZ[3] = {SSDLadderCableTransX[0]
786 * TMath::Tan(2.*fgkSSDFlexAngle*TMath::DegToRad()),
787 SSDLadderCableTransX[1]
788 * TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad()),
789 SSDLadderCableTransX[2]
790 * TMath::Tan(2.*fgkSSDFlexAngle*TMath::DegToRad())};
791 TGeoRotation* LocalLadderCableRot[3];
792 LocalLadderCableRot[0] = new TGeoRotation("LocalLadderCableRot0",90.,0.,0.);
793 LocalLadderCableRot[1] = new TGeoRotation("LocalLadderCableRot1",90.,60.,-90.);
794 LocalLadderCableRot[2] = new TGeoRotation("LocalLadderCableRot2");
795 LocalLadderCableRot[2]->SetRotation((*LocalLadderCableRot[1])
796 * (*LocalLadderCableRot[0]));
797////////////////////////////////////////////
798// LocalLadderCableCombiTransMatrix
799////////////////////////////////////////////
800 const Int_t LocalLadderSideCablesNumber = 2;
801 const Int_t LocalLadderCombiTransNumber = 5;
802 TGeoCombiTrans** LocalLadderCableCombiTransMatrix[LocalLadderSideCablesNumber];
803 for(Int_t i=0; i<LocalLadderSideCablesNumber; i++)
804 LocalLadderCableCombiTransMatrix[i] =
805 new TGeoCombiTrans*[LocalLadderCombiTransNumber];
806///////////////////////////////////////////
807// Left Side Ladder Cables Transformations
808///////////////////////////////////////////
809 LocalLadderCableCombiTransMatrix[0][0] =
810 new TGeoCombiTrans(-0.5*fgkCarbonFiberTriangleLength,
811 0.,0.,NULL);
812 LocalLadderCableCombiTransMatrix[0][1] = LadderSegmentCombiTransMatrix[1];
813 LocalLadderCableCombiTransMatrix[0][2] =
814 new TGeoCombiTrans(fgkSSDModuleStiffenerPosition[0],
815 fgkSSDModuleStiffenerPosition[1],0.,0);
816 LocalLadderCableCombiTransMatrix[0][3] = SSDModuleCombiTransMatrix[6];
817 LocalLadderCableCombiTransMatrix[0][4] =
818 new TGeoCombiTrans(-SSDLadderCableTransX[0]
819 - SSDLadderCableTransX[1]-SSDLadderCableTransX[2]
820 + fgkSSDFlexLength[0]-fgkSSDFlexLength[2],
821 0.,
822 0.5*fgkSSDFlexHeight[0]+2.*(fgkSSDFlexHeight[0]
823 + fgkSSDFlexHeight[1])+2.*fgkSSDStiffenerHeight
824 + SSDLadderCableTransZ[0]-SSDLadderCableTransZ[1]
825 + SSDLadderCableTransZ[2],LocalLadderCableRot[2]);
826///////////////////////////////////////////
827// Rigth Side Ladder Cables Transformations
828///////////////////////////////////////////
829 for(Int_t i=0; i<LocalLadderCombiTransNumber; i++)
830 LocalLadderCableCombiTransMatrix[1][i] =
831 (i!=3 ? LocalLadderCableCombiTransMatrix[0][i]:
832 SSDModuleCombiTransMatrix[3]);
833///////////////////////////////////////////
834// Setting LadderCableCombiTransMatrix
835///////////////////////////////////////////
836Int_t BeamAxisTrans[3] = {0,0,0};
837switch(iLayer){
838case 5:
839 BeamAxisTrans[0] = fgkSSDLay5SensorsNumber/2;
840 BeamAxisTrans[1] = BeamAxisTrans[0]+1;
841 BeamAxisTrans[2] = BeamAxisTrans[0]-1;
842 break;
843case 6:
844 BeamAxisTrans[0] = (fgkSSDLay6SensorsNumber-1)/2;
845 BeamAxisTrans[1] = BeamAxisTrans[0]+1;
846 BeamAxisTrans[2] = BeamAxisTrans[0];
847 break;
848}
849 TGeoHMatrix* LocalLadderCableHMatrix[LocalLadderSideCablesNumber];
850 TGeoRotation* LadderCableRot;
851 TGeoTranslation* LadderCableTrans;
852 for(Int_t i=0; i<LocalLadderSideCablesNumber; i++){
853 LocalLadderCableHMatrix[i] = new TGeoHMatrix();
854 for(Int_t j=0; j<LocalLadderCombiTransNumber; j++){
855 LocalLadderCableHMatrix[i]->MultiplyLeft(
856 LocalLadderCableCombiTransMatrix[i][LocalLadderCombiTransNumber-j-1]);
857 }
858 LadderCableRot = new TGeoRotation();
859 LadderCableRot->SetMatrix(LocalLadderCableHMatrix[i]->GetRotationMatrix());
860 LadderCableTrans = new TGeoTranslation();
861 Double_t* LadderCableTransVector = LocalLadderCableHMatrix[i]->GetTranslation();
862 LadderCableTrans->SetTranslation(LadderCableTransVector[0],
863 LadderCableTransVector[1]
864 + (i==0 ? BeamAxisTrans[0] : 0.)
865 * fgkCarbonFiberJunctionWidth,
866 LadderCableTransVector[2]);
867 LadderCableCombiTransMatrix[i] = new TGeoCombiTrans(*LadderCableTrans,
868 *LadderCableRot);
869 }
870 LadderCableCombiTransMatrix[2] =
871 AddTranslationToCombiTrans(LadderCableCombiTransMatrix[1],0.,
872 BeamAxisTrans[1]*fgkCarbonFiberJunctionWidth,0.);
873 LadderCableCombiTransMatrix[3] =
874 AddTranslationToCombiTrans(LadderCableCombiTransMatrix[0],0.,
875 BeamAxisTrans[2]*fgkCarbonFiberJunctionWidth,0.);
876 }
877/////////////////////////////////////////////////////////////////////////////////
878TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupportShape(Double_t length,
879 Double_t height,Double_t width,Double_t* thickness){
880////////////////////////////////////////////////////////////////////////////////
881 const Int_t VertexNumber = 4;
882 const Int_t ShapesNumber = 2;
883 Double_t Width[2] = {width,width};
884 TVector3** VertexPosition[ShapesNumber];
885 for(Int_t i = 0; i<ShapesNumber; i++) VertexPosition[i] =
886 new TVector3*[VertexNumber];
887 //First Shape Vertex Positioning
888 VertexPosition[0][0] = new TVector3();
889 VertexPosition[0][1] = new TVector3(height);
890 VertexPosition[0][2] = new TVector3(thickness[0]);
891 VertexPosition[0][3] = new TVector3(*VertexPosition[0][1]);
892 //Second Shape Vertex Positioning
893 VertexPosition[1][0] = new TVector3(*VertexPosition[0][0]);
894 VertexPosition[1][1] = new TVector3(length);
895 VertexPosition[1][2] = new TVector3(thickness[1]);
896 VertexPosition[1][3] = new TVector3(VertexPosition[1][1]->X());
897 char* SSDSensorSupportShapeName[ShapesNumber] =
898 {"SSDSensorSupportShape1","SSDSensorSupportShape2"};
899 TGeoArb8* SSDSensorSupportShape[ShapesNumber];
900 for(Int_t i = 0; i< ShapesNumber; i++) SSDSensorSupportShape[i] =
901 GetArbShape(VertexPosition[i],Width,i==0 ?
902 thickness[1]: thickness[0],
903 SSDSensorSupportShapeName[i]);
904 /////////////////////////////////////
905 //Setting Translations and Rotations:
906 /////////////////////////////////////
907 TGeoRotation* SSDSensorSupportShapeRot[2];
908 SSDSensorSupportShapeRot[0] =
909 new TGeoRotation("SSDSensorSupportShapeRot1",180.,0.,0.);
910 SSDSensorSupportShapeRot[1] =
911 new TGeoRotation("SSDSensorSupportShapeRot2",90.,90.,-90.);
912 TGeoTranslation* SSDSensorSupportShapeTrans =
913 new TGeoTranslation("SSDSensorSupportShapeTrans",0.,0.,
914 0.5*thickness[0]);
915 TGeoCombiTrans* SSDSensorSupportCombiTrans =
916 new TGeoCombiTrans("SSDSensorSupportCombiTrans",0.5*thickness[0],width,0.,
917 new TGeoRotation((*SSDSensorSupportShapeRot[1])
918 * (*SSDSensorSupportShapeRot[0])));
919 TGeoVolume* SSDSensorSupportCompVolume =
920 new TGeoVolumeAssembly("SSDSensorSupportCompVolume");
921 SSDSensorSupportCompVolume->AddNode(new TGeoVolume("SSDSensorSupportVolume1",
922 SSDSensorSupportShape[0],fgkSSDSensorSupportMedium),1,
923 SSDSensorSupportShapeTrans);
924 SSDSensorSupportCompVolume->AddNode(new TGeoVolume("SSDSensorSupportVolume2",
925 SSDSensorSupportShape[1],fgkSSDSensorSupportMedium),1,
926 SSDSensorSupportCombiTrans);
927 return SSDSensorSupportCompVolume;
928}
929/////////////////////////////////////////////////////////////////////////////////
930TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupport(Int_t VolumeKind, Int_t n){
931////////////////////////////////////////////////////////////////////////////////
932 TGeoVolume* SSDSensorSupport;
933 Double_t SideSupportThickness[2] = {fgkSSDSensorSideSupportThickness[0],
934 fgkSSDSensorSideSupportThickness[1]};
935 VolumeKind == 0 ? SSDSensorSupport = GetSSDSensorSupportShape(
936 fgkSSDSensorSideSupportLength,
937 fgkSSDSensorSideSupportHeight[(n==0 ? 0 : 1)],
938 fgkSSDSensorSideSupportWidth,
939 SideSupportThickness) :
940 SSDSensorSupport = GetSSDSensorSupportShape(fgkSSDSensorCenterSupportLength,
941 fgkSSDSensorCenterSupportHeight[(n==0 ? 0 : 1)],
942 fgkSSDSensorCenterSupportWidth,
943 SideSupportThickness);
944 return SSDSensorSupport;
945}
946/////////////////////////////////////////////////////////////////////////////////
947TGeoVolume* AliITSv11GeometrySSD::GetSSDSensorSupportAssembly(Int_t n){
948////////////////////////////////////////////////////////////////////////////////
949 TGeoVolume* SSDSensorSupportAssembly =
950 new TGeoVolumeAssembly("SSDSensorSupportAssembly");
951 const Int_t VolumeNumber = 2;
952 TGeoVolume* SSDSensorSupport[VolumeNumber];
953 for(Int_t i=0; i<VolumeNumber; i++) SSDSensorSupport[i] =
954 GetSSDSensorSupport(i,n);
955 SetSSDSensorSupportCombiTransMatrix();
956 for(Int_t i=0; i<fgkSSDSensorSupportCombiTransNumber; i++)
957 SSDSensorSupportAssembly->AddNode((i<2 ? SSDSensorSupport[0]:
958 SSDSensorSupport[1]),
959 i+1,SSDSensorSupportCombiTransMatrix[i]);
960 return SSDSensorSupportAssembly;
961}
962/////////////////////////////////////////////////////////////////////////////////
963TGeoVolume* AliITSv11GeometrySSD::GetSSDModule(Int_t iChipCablesHeight){
964////////////////////////////////////////////////////////////////////////////////
965 TGeoVolume* SSDModuleVolume[fgkSSDModuleCombiTransNumber-1];
966 SSDModuleVolume[0] = GetSSDStiffenerAssembly();
967 SSDModuleVolume[1] = GetSSDChipAssembly();
968 SSDModuleVolume[2] = GetSSDSensor();
969 SSDModuleVolume[3] = GetSSDFlexAssembly();
970 SSDModuleVolume[4] = GetSSDCoolingBlockAssembly();
971 SSDModuleVolume[5] = GetSSDChipCablesAssembly(fgkSSDChipCablesHeight[iChipCablesHeight+2]);
972 SetSSDModuleCombiTransMatrix(fgkSSDChipCablesHeight[iChipCablesHeight+2]);
973 TGeoCombiTrans* SSDModuleGlobalCombiTrans =
974 new TGeoCombiTrans("SSDModuleGlobalCombiTrans",
975 fgkSSDModuleStiffenerPosition[0],
976 fgkSSDModuleStiffenerPosition[1],0.,NULL);
977 TGeoHMatrix* SSDModuleHMatrix[fgkSSDModuleCombiTransNumber];
978 TGeoVolume* SSDModule = new TGeoVolumeAssembly("SSDModule");
979 for(Int_t i=0; i<fgkSSDModuleCombiTransNumber; i++){
980 SSDModuleHMatrix[i] = new TGeoHMatrix((*SSDModuleGlobalCombiTrans)
981 * (*SSDModuleCombiTransMatrix[i]));
982 SSDModule->AddNode(i==fgkSSDModuleCombiTransNumber-1 ? SSDModuleVolume[3] :
983 SSDModuleVolume[i],i!=fgkSSDModuleCombiTransNumber-1?1:2,
984 SSDModuleHMatrix[i]);
985 }
986 return SSDModule;
987}
988/////////////////////////////////////////////////////////////////////////////////
989TGeoVolume* AliITSv11GeometrySSD::GetSSDSensor(){
990////////////////////////////////////////////////////////////////////////////////
991 Double_t fgkSSDSensorSensitiveLength = fgkSSDSensorLength-2.*fgkSSDSensorInsensitiveLength;
992 Double_t fgkSSDSensorSensitiveWidth = fgkSSDSensorWidth-2.*fgkSSDSensorInsensitiveWidth;
993 TGeoBBox* SSDSensorSensitiveShape = new TGeoBBox("SSDSensorSensitiveShape",
994 0.5*fgkSSDSensorSensitiveLength,
995 0.5*fgkSSDSensorSensitiveWidth,
996 0.5*fgkSSDSensorHeight);
997 TGeoVolume* SSDSensorSensitive =
998 new TGeoVolume(fgkSSDSensitiveVolName,SSDSensorSensitiveShape,fgkSSDSensorMedium);
999 SSDSensorSensitive->SetLineColor(fColorSilicon);
1000 TGeoBBox* SSDSensorInsensitiveShape[2];
1001 SSDSensorInsensitiveShape[0] = new TGeoBBox("SSDSensorInSensitiveShape1",
1002 0.5*fgkSSDSensorLength,
1003 0.5*fgkSSDSensorInsensitiveWidth,
1004 0.5*fgkSSDSensorHeight);
1005 SSDSensorInsensitiveShape[1] = new TGeoBBox("SSDSensorInSensitiveShape2",
1006 0.5*fgkSSDSensorInsensitiveWidth,
1007 0.5*fgkSSDSensorSensitiveWidth,
1008 0.5*fgkSSDSensorHeight);
1009 const char* SSDSensorInsensitiveName[2] = {"SSDSensorInsensitive1",
1010 "SSDSensorInsensitive2"};
1011 TGeoVolume* SSDSensorInsensitive[2];
1012 for(Int_t i=0; i<2; i++){ SSDSensorInsensitive[i] =
1013 new TGeoVolume(SSDSensorInsensitiveName[i],SSDSensorInsensitiveShape[i],
1014 fgkSSDSensorMedium);
1015 SSDSensorInsensitive[i]->SetLineColor(fColorCarbonFiber);
1016 }
1017 TGeoVolume* SSDSensorInsensitiveVol =
1018 new TGeoVolumeAssembly("SSDSensorInsensitiveVol");
1019 for(Int_t i=0; i<4; i++)
1020 SSDSensorInsensitiveVol->AddNode(i%2==0 ? SSDSensorInsensitive[0]:
1021 SSDSensorInsensitive[1],i<2?1:2,
1022 new TGeoTranslation(0.5*(1.-TMath::Power(-1.,i))*(i==1? 1.:-1.)
1023 * (SSDSensorSensitiveShape->GetDX()+SSDSensorInsensitiveShape[1]->GetDX()),
1024 0.5*(1.+TMath::Power(-1.,i))*(i==0?-1.: 1.)
1025 * (SSDSensorSensitiveShape->GetDY()+SSDSensorInsensitiveShape[0]->GetDY()),0.));
1026 TGeoVolume* SSDSensor = new TGeoVolumeAssembly("SSDSensor");
1027 SSDSensor->AddNode(SSDSensorSensitive,1),SSDSensor->AddNode(SSDSensorInsensitiveVol,1);
1028 return SSDSensor;
1029}
1030/////////////////////////////////////////////////////////////////////////////////
1031TGeoVolume* AliITSv11GeometrySSD::GetSSDChipAssembly(){
1032////////////////////////////////////////////////////////////////////////////////
1033 const Int_t SSDChipRowNumber = 2;
1034 TGeoBBox* SSDChipCompShape[2];
1035 SSDChipCompShape[0] = new TGeoBBox("SSDChipCompShape",
1036 0.5*fgkSSDChipLength,
1037 0.5*fgkSSDChipWidth,
1038 0.5*(fgkSSDChipHeight-fgkSSDChipGlueHeight));
1039 SSDChipCompShape[1] = new TGeoBBox("SSDChipGlueCompShape",
1040 0.5*fgkSSDChipLength,
1041 0.5*fgkSSDChipWidth,
1042 0.5*fgkSSDChipGlueHeight);
1043 TGeoVolume* SSDChipComp[2];
1044 SSDChipComp[0] = new TGeoVolume("SSDChipComp",SSDChipCompShape[0],fgkSSDChipMedium);
1045 SSDChipComp[1] = new TGeoVolume("SSDChipGlueComp",SSDChipCompShape[1],
1046 fgkSSDChipGlueMedium);
1047 SSDChipComp[0]->SetLineColor(fColorSilicon);
1048 SSDChipComp[1]->SetLineColor(fColorEpoxy);
1049 TGeoTranslation* SSDChipCompTrans[2];
1050 SSDChipCompTrans[0] = new TGeoTranslation(0.,0.,-SSDChipCompShape[1]->GetDZ());
1051 SSDChipCompTrans[1] = new TGeoTranslation(0.,0.,SSDChipCompShape[0]->GetDZ());
1052 TGeoVolume* SSDChip = new TGeoVolumeAssembly("SSDChip");
1053 for(Int_t i=0; i<2; i++) SSDChip->AddNode(SSDChipComp[i],1,SSDChipCompTrans[i]);
1054 Double_t SSDChipSeparation[2] = {fgkSSDChipLength+fgkSSDChipSeparationLength,
1055 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
1056 - 2.*(fgkSSDStiffenerWidth-fgkSSDStiffenerToChipDist
1057 - 0.5*fgkSSDChipWidth)};
1058 TGeoVolume* SSDChipAssembly = new TGeoVolumeAssembly("SSDChipAssembly");
1059 for(Int_t i=0; i<SSDChipRowNumber; i++)
1060 for(Int_t j=0; j<fgkSSDChipNumber; j++)
1061 SSDChipAssembly->AddNode(SSDChip,fgkSSDChipNumber*i+j+1,
1062 new TGeoTranslation(j*SSDChipSeparation[0],i*SSDChipSeparation[1],0.));
1063 return SSDChipAssembly;
1064}
1065/////////////////////////////////////////////////////////////////////////////////
1066TGeoVolume* AliITSv11GeometrySSD::GetSSDStiffenerAssembly(){
1067////////////////////////////////////////////////////////////////////////////////
1068 const Int_t SSDStiffenerNumber = 2;
1069 Double_t SSDStiffenerSeparation = fgkSSDSensorLength
1070 - 2.*fgkSSDModuleStiffenerPosition[1]
1071 - fgkSSDStiffenerWidth;
1072 TGeoVolume* SSDStiffener = new TGeoVolumeAssembly("SSDStiffener");
1073////////////////////////////
1074// Stiffener Volumes
1075///////////////////////////
1076 const Int_t StiffenerBoxNumber = 6;
1077 TGeoBBox* SSDStiffenerBoxShapes[StiffenerBoxNumber];
1078 SSDStiffenerBoxShapes[0] = new TGeoBBox("SSDStiffenerBoxShape1",
1079 0.5* fgkSSDStiffenerLength,
1080 0.5* fgkSSDStiffenerWidth,
1081 0.5*(fgkSSDStiffenerHeight
1082 - fgkSSDConnectorHeight));
1083 SSDStiffenerBoxShapes[1] = new TGeoBBox("SSDStiffenerBoxShape2",
1084 0.5*(fgkSSDConnectorPosition[0]
1085 - 2.0* fgkSSDConnectorLength
1086 - fgkSSDConnectorSeparation),
1087 0.5* fgkSSDStiffenerWidth,
1088 0.5* fgkSSDConnectorHeight);
1089 SSDStiffenerBoxShapes[2] = new TGeoBBox("SSDStiffenerBoxShape3",
1090 0.5*(fgkSSDConnectorSeparation
1091 + 2.* fgkSSDConnectorLength),
1092 0.5* fgkSSDConnectorPosition[1],
1093 0.5* fgkSSDConnectorHeight);
1094 SSDStiffenerBoxShapes[3] = new TGeoBBox("SSDStiffenerBoxShape4",
1095 SSDStiffenerBoxShapes[2]->GetDX(),
1096 0.5*(fgkSSDStiffenerWidth
1097 - fgkSSDConnectorPosition[1]
1098 - fgkSSDConnectorWidth),
1099 0.5* fgkSSDConnectorHeight);
1100 SSDStiffenerBoxShapes[4] = new TGeoBBox("SSDStiffenerBoxShape5",
1101 0.5* fgkSSDConnectorSeparation,
1102 0.5* fgkSSDConnectorWidth,
1103 0.5* fgkSSDConnectorHeight);
1104 SSDStiffenerBoxShapes[5] = new TGeoBBox("SSDStiffenerBoxShape6",
1105 0.5*(fgkSSDStiffenerLength
1106 - fgkSSDConnectorPosition[0]),
1107 0.5* fgkSSDStiffenerWidth,
1108 0.5* fgkSSDConnectorHeight);
1109 TGeoVolume* SSDStiffenerBox[StiffenerBoxNumber];
1110 char SSDStiffenerBoxName[30];
1111 for(Int_t i=0; i<StiffenerBoxNumber; i++){
1112 sprintf(SSDStiffenerBoxName,"SSDStiffenerBox%i",i+1);
1113 SSDStiffenerBox[i] = new TGeoVolume(SSDStiffenerBoxName,SSDStiffenerBoxShapes[i],
1114 fgkSSDStiffenerMedium);
1115 SSDStiffenerBox[i]->SetLineColor(fColorStiffener);
1116 }
1117////////////////////////////
1118// Connector
1119///////////////////////////
1120 TGeoBBox* SSDConnectorShape = new TGeoBBox("SSDConnectorShape",
1121 0.5*fgkSSDConnectorLength,
1122 0.5*fgkSSDConnectorWidth,
1123 0.5*fgkSSDConnectorHeight);
1124 TGeoVolume* SSDConnector = new TGeoVolume("SSDConnector",SSDConnectorShape,
1125 fgkSSDStiffenerConnectorMedium);
1126 SSDConnector->SetLineColor(fColorAl);
1127 const Int_t SSDConnectorNumber = 2;
1128 TGeoTranslation* SSDConnectorTrans[SSDConnectorNumber];
1129 SSDConnectorTrans[0] = new TGeoTranslation("SSDConnectorTrans1",
1130 - SSDStiffenerBoxShapes[0]->GetDX()+fgkSSDConnectorPosition[0]
1131 - fgkSSDConnectorSeparation-1.5*fgkSSDConnectorLength,
1132 SSDStiffenerBoxShapes[0]->GetDY()-fgkSSDConnectorPosition[1]
1133 - SSDConnectorShape->GetDY(),
1134 SSDStiffenerBoxShapes[0]->GetDZ()+SSDConnectorShape->GetDZ());
1135 SSDConnectorTrans[1] = new TGeoTranslation("SSDConnectorTrans2",
1136 - SSDStiffenerBoxShapes[0]->GetDX()+fgkSSDConnectorPosition[0]
1137 - 0.5*fgkSSDConnectorLength,
1138 SSDStiffenerBoxShapes[0]->GetDY()-fgkSSDConnectorPosition[1]
1139 - SSDConnectorShape->GetDY(),
1140 SSDStiffenerBoxShapes[0]->GetDZ()+SSDConnectorShape->GetDZ());
1141 for(Int_t i=0; i<SSDConnectorNumber; i++)
1142 SSDStiffener->AddNode(SSDConnector,i+1,SSDConnectorTrans[i]);
1143//////////////////////////////////////
1144// TGeoTranslation for Stiffener Boxes
1145//////////////////////////////////////
1146 TGeoTranslation* SSDStiffenerBoxTrans[StiffenerBoxNumber];
1147 SSDStiffenerBoxTrans[0] = new TGeoTranslation("SSDStiffenerBoxTrans1",0.,0.,0.);
1148 SSDStiffenerBoxTrans[1] = new TGeoTranslation("SSDStiffenerBoxTrans2",
1149 - (SSDStiffenerBoxShapes[0]->GetDX()-SSDStiffenerBoxShapes[1]->GetDX()),
1150 0.,
1151 SSDStiffenerBoxShapes[0]->GetDZ()+SSDStiffenerBoxShapes[1]->GetDZ());
1152 SSDStiffenerBoxTrans[2] = new TGeoTranslation("SSDStiffenerBoxTrans3",
1153 - SSDStiffenerBoxShapes[0]->GetDX()-SSDStiffenerBoxShapes[2]->GetDX()
1154 + fgkSSDConnectorPosition[0],
1155 SSDStiffenerBoxShapes[0]->GetDY()-SSDStiffenerBoxShapes[2]->GetDY(),
1156 SSDStiffenerBoxShapes[0]->GetDZ()+SSDStiffenerBoxShapes[2]->GetDZ());
1157 SSDStiffenerBoxTrans[3] = new TGeoTranslation("SSDStiffenerBoxTrans4",
1158 - SSDStiffenerBoxShapes[0]->GetDX()-SSDStiffenerBoxShapes[3]->GetDX()
1159 + fgkSSDConnectorPosition[0],
1160 - SSDStiffenerBoxShapes[0]->GetDY()+SSDStiffenerBoxShapes[3]->GetDY(),
1161 SSDStiffenerBoxShapes[0]->GetDZ()+SSDStiffenerBoxShapes[3]->GetDZ());
1162 SSDStiffenerBoxTrans[4] = new TGeoTranslation("SSDStiffenerBoxTrans5",
1163 - SSDStiffenerBoxShapes[0]->GetDX()+fgkSSDConnectorPosition[0]
1164 - 0.5*fgkSSDConnectorSeparation-2.*SSDConnectorShape->GetDX(),
1165 SSDStiffenerBoxShapes[0]->GetDY()-fgkSSDConnectorPosition[1]
1166 - SSDConnectorShape->GetDY(),
1167 SSDStiffenerBoxShapes[0]->GetDZ()+SSDConnectorShape->GetDZ());
1168 SSDStiffenerBoxTrans[5] = new TGeoTranslation("SSDStiffenerBoxTrans6",
1169 - SSDStiffenerBoxShapes[0]->GetDX()+fgkSSDConnectorPosition[0]
1170 + SSDStiffenerBoxShapes[5]->GetDX(),
1171 0.,
1172 SSDStiffenerBoxShapes[0]->GetDZ()+SSDStiffenerBoxShapes[5]->GetDZ());
1173 for(Int_t i=0; i<StiffenerBoxNumber; i++)
1174 SSDStiffener->AddNode(SSDStiffenerBox[i],1,SSDStiffenerBoxTrans[i]);
1175 TGeoCombiTrans* SSDStiffenerCombiTrans[SSDStiffenerNumber];
1176 char SSDStiffenerCombiTransName[30];
1177 for(Int_t i=0; i<SSDStiffenerNumber; i++){
1178 sprintf(SSDStiffenerCombiTransName,"SSDStiffenerCombiTrans%i",i+1);
1179 SSDStiffenerCombiTrans[i] = new TGeoCombiTrans(SSDStiffenerCombiTransName,
1180 0.,i*SSDStiffenerSeparation,0.,new TGeoRotation("",180*(1-i),0.,0.));
1181 }
1182////////////////////////////
1183// Capacitor 0603-2200 nF
1184///////////////////////////
1185 const Int_t Capacitor0603Number = 5;
1186 TGeoBBox* Capacitor0603Shape = new TGeoBBox("Capacitor0603Shape",
1187 0.5*fgkSSDCapacitor0603Length,
1188 0.5*fgkSSDCapacitor0603Width,
1189 0.5*fgkSSDCapacitor0603Height);
1190 TGeoVolume* Capacitor0603 = new TGeoVolume("Capacitor0603",Capacitor0603Shape,
1191 fgkSSDStiffener0603CapacitorMedium);
1192 Capacitor0603->SetLineColor(fColorAl);
1193////////////////////////////
1194// Capacitor 1812-330 nF
1195///////////////////////////
1196 TGeoBBox* Capacitor1812Shape = new TGeoBBox("Capacitor1812Shape",
1197 0.5*fgkSSDCapacitor1812Length,
1198 0.5*fgkSSDCapacitor1812Width,
1199 0.5*fgkSSDCapacitor1812Height);
1200 TGeoVolume* Capacitor1812 = new TGeoVolume("Capacitor1812",Capacitor1812Shape,
1201 fgkSSDStiffener1812CapacitorMedium);
1202 Capacitor1812->SetLineColor(fColorAl);
1203 TGeoTranslation* Capacitor1812Trans = new TGeoTranslation("Capacitor1812Trans",
1204 0.,
1205 0.5*fgkSSDStiffenerWidth+SSDStiffenerSeparation
1206 - Capacitor1812Shape->GetDY()-fgkSSDConnectorPosition[1],
1207 SSDStiffenerBoxShapes[0]->GetDZ()+fgkSSDConnectorHeight
1208 + 0.5*fgkSSDCapacitor1812Height);
1209////////////////////////////
1210//Hybrid Wire
1211////////////////////////////
1212 Double_t WireX = 2.*(fgkSSDConnectorPosition[0]-0.5*fgkSSDStiffenerLength
1213 - 0.5*fgkSSDConnectorLength)-fgkSSDConnectorLength
1214 - fgkSSDConnectorSeparation;
1215 Double_t WireY = SSDStiffenerSeparation+fgkSSDStiffenerWidth
1216 - 2.*fgkSSDConnectorPosition[1]-fgkSSDConnectorWidth;
1217 Double_t SSDWireRadius = TMath::Sqrt(TMath::Power(WireX,2.)
1218 + TMath::Power(WireY,2));
1219 Double_t WireAngle = TMath::ATan(WireX/WireY);
1220 TGeoTube *HybridWireShape = new TGeoTube("HybridWireShape", 0.,
1221 fgkSSDWireRadius, 0.5*SSDWireRadius);
1222 TGeoVolume* HybridWire = new TGeoVolume("HybridWire",HybridWireShape,
1223 fgkSSDStiffenerHybridWireMedium);
1224 HybridWire->SetLineColor(fColorPhynox);
1225 TGeoCombiTrans* HybridWireCombiTrans[2];
1226 HybridWireCombiTrans[0] = new TGeoCombiTrans("HybridWireCombiTrans1",
1227 0.5*fgkSSDStiffenerLength-fgkSSDConnectorPosition[0]
1228 + 1.5*fgkSSDConnectorLength+fgkSSDConnectorSeparation,
1229 0.5*SSDWireRadius-0.5*fgkSSDStiffenerWidth
1230 + fgkSSDConnectorPosition[1]+0.5*fgkSSDConnectorWidth,
1231 SSDStiffenerBoxShapes[0]->GetDZ()+fgkSSDConnectorHeight
1232 + fgkSSDWireRadius,
1233 new TGeoRotation("HybridWireRot1",0.,90.,0.));
1234 HybridWireCombiTrans[1] = new TGeoCombiTrans("HybridWireCombiTrans2",
1235 0.,
1236 - 0.5*fgkSSDConnectorWidth+fgkSSDWireRadius,
1237 0.,
1238 new TGeoRotation("HybridWireRot2",
1239 - WireAngle*TMath::RadToDeg(),0.,0.));
1240 TGeoHMatrix* HybridWireMatrix = new TGeoHMatrix();
1241 HybridWireMatrix->MultiplyLeft(HybridWireCombiTrans[0]);
1242 HybridWireMatrix->MultiplyLeft(HybridWireCombiTrans[1]);
1243////////////////////////////
1244// Stiffener Assembly
1245///////////////////////////
1246 TGeoVolume* SSDStiffenerAssembly =
1247 new TGeoVolumeAssembly("SSDStiffenerAssembly");
1248 SSDStiffenerAssembly->AddNode(HybridWire,1,HybridWireMatrix);
1249 for(Int_t i=0; i<SSDStiffenerNumber; i++) {
1250 SSDStiffenerAssembly->AddNode(SSDStiffener,i+1,SSDStiffenerCombiTrans[i]);
1251 for(Int_t j=1; j<Capacitor0603Number+1; j++){
1252 SSDStiffenerAssembly->AddNode(Capacitor0603,Capacitor0603Number*i+j,new TGeoTranslation("",(j-3.
1253 )/6*fgkSSDStiffenerLength,
1254 i*SSDStiffenerSeparation+
1255 0.5*((i==0? 1:-1)*fgkSSDStiffenerWidth
1256 +(i==0? -1:+1)*fgkSSDCapacitor0603Width),
1257 -0.5*(fgkSSDStiffenerHeight+fgkSSDCapacitor0603Height)));
1258 }
1259 if(i==1) SSDStiffenerAssembly->AddNode(Capacitor1812,1,Capacitor1812Trans);
1260}
1261 return SSDStiffenerAssembly;
1262}
1263/////////////////////////////////////////////////////////////////////////////////
1264TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCables(Double_t SSDChipCablesHeigth,
1265 char* side){
1266////////////////////////////////////////////////////////////////////////////////
1267 const Int_t SSDChipCablesLayNumber = 2;
1268 Int_t SSDChipCablesColor[2] = {fColorAl,fColorPolyhamide};
1269 Double_t SSDChipCablesRadius[2];
1270 SSDChipCablesRadius[0] = 0.25*(SSDChipCablesHeigth
1271 - fgkSSDChipCablesHeight[0]
1272 - fgkSSDChipCablesHeight[1]);
1273 SSDChipCablesRadius[1] = SSDChipCablesRadius[0]-fgkSSDChipCablesHeight[0];
1274 Double_t SSDChipCablesPieceLength = 0.5*(fgkSSDChipCablesWidth[0]
1275 - 2.*TMath::Pi()*SSDChipCablesRadius[0]
1276 - SSDChipCablesRadius[0]
1277 - fgkSSDChipCablesWidth[1]
1278 - fgkSSDChipCablesWidth[2]
1279 - (side=="Right" ? 0 :
1280 fgkSSDModuleStiffenerPosition[1]
1281 + TMath::Pi()*(0.5*fgkSSDSensorHeight
1282 + fgkSSDChipCablesHeight[0]
1283 + fgkSSDChipCablesHeight[1])));
1284 //////////////////////////
1285 //Box and Tube Seg Shapes
1286 //////////////////////////
1287 char* SSDChipCablesBoxShapeName[2*SSDChipCablesLayNumber] =
1288 {"SSDChipCablesBoxLay0Shape0","SSDChipCablesBoxLay0Shape1",
1289 "SSDChipCablesBoxLay1Shape0","SSDChipCablesBoxLay1Shape1"};
1290 char* SSDChipCablesTubeSegShapeName[2*SSDChipCablesLayNumber] =
1291 {"SSDChipCablesTubeSegLay0Shape0","SSDChipCablesTubeSegLay0Shape1",
1292 "SSDChipCablesTubeSegLay1Shape0","SSDChipCablesTubeSegLay1Shape1"};
1293 TGeoBBox** SSDChipCablesBoxShape[SSDChipCablesLayNumber];
1294 TGeoTubeSeg** SSDChipCablesTubeSegShape[SSDChipCablesLayNumber];
1295 for(Int_t i=0; i<SSDChipCablesLayNumber; i++){
1296 SSDChipCablesBoxShape[i] = new TGeoBBox*[2];
1297 SSDChipCablesTubeSegShape[i] = new TGeoTubeSeg*[2+(side=="Right" ? 0 : 1)];
1298 SSDChipCablesBoxShape[i][0] = new TGeoBBox(SSDChipCablesBoxShapeName[2*i],
1299 0.5*SSDChipCablesPieceLength,
1300 0.5*fgkSSDChipCablesLength[1],
1301 0.5*fgkSSDChipCablesHeight[i]);
1302 SSDChipCablesBoxShape[i][1] = new TGeoBBox(SSDChipCablesBoxShapeName[2*i+1],
1303 0.5*(SSDChipCablesPieceLength+SSDChipCablesRadius[0]
1304 + (side=="Right" ? 0. : fgkSSDModuleStiffenerPosition[1])),
1305 0.5*fgkSSDChipCablesLength[1],0.5*fgkSSDChipCablesHeight[i]);
1306 SSDChipCablesTubeSegShape[i][0] =
1307 new TGeoTubeSeg(SSDChipCablesTubeSegShapeName[2*i],
1308 SSDChipCablesRadius[1]-i*fgkSSDChipCablesHeight[1],
1309 SSDChipCablesRadius[i],0.5*fgkSSDChipCablesLength[1],
1310 0.,180.);
1311 SSDChipCablesTubeSegShape[i][1] =
1312 new TGeoTubeSeg(SSDChipCablesTubeSegShapeName[2*i+1],
1313 SSDChipCablesRadius[0]+i*fgkSSDChipCablesHeight[0],
1314 SSDChipCablesRadius[0]+fgkSSDChipCablesHeight[0]
1315 + i*fgkSSDChipCablesHeight[1],
1316 0.5*fgkSSDChipCablesLength[1],0.,180.);
1317 if(side!="Right") SSDChipCablesTubeSegShape[i][2] =
1318 new TGeoTubeSeg(SSDChipCablesTubeSegShapeName[2*i],
1319 0.5*fgkSSDSensorHeight+(1-i)*fgkSSDChipCablesHeight[1],
1320 0.5*fgkSSDSensorHeight+(1-i)*fgkSSDChipCablesHeight[0]
1321 + fgkSSDChipCablesHeight[1],
1322 0.5*fgkSSDChipCablesLength[1],0.,180.);
1323 }
1324 //////////////////////////
1325 //Box under Chip
1326 //////////////////////////
1327 char SSDUnderChipCablesBoxShapeName[30];
1328 char SSDUnderChipCablesBoxName[30];
1329 char SSDUnderChipCablesBoxTransName[30];
1330 TGeoBBox* SSDUnderChipCablesBoxShape[SSDChipCablesLayNumber];
1331 TGeoVolume* SSDUnderChipCablesBox[SSDChipCablesLayNumber];
1332 TGeoTranslation* SSDUnderChipCablesBoxTrans[SSDChipCablesLayNumber];
1333 for(Int_t i=0; i<SSDChipCablesLayNumber; i++){
1334 sprintf(SSDUnderChipCablesBoxShapeName,"SSDUnderChipCablesBoxShape%i",i+1);
1335 sprintf(SSDUnderChipCablesBoxName,"SSDUnderChipCablesBox%i",i+1);
1336 sprintf(SSDUnderChipCablesBoxTransName,"SSDUnderChipCablesBoxTrans%i",i+1);
1337 SSDUnderChipCablesBoxShape[i] =
1338 new TGeoBBox(SSDUnderChipCablesBoxShapeName,
1339 0.5*fgkSSDChipWidth,
1340 0.5*fgkSSDChipCablesLength[1],
1341 0.5*fgkSSDChipCablesHeight[i]);
1342 SSDUnderChipCablesBox[i] = new TGeoVolume(SSDUnderChipCablesBoxName,
1343 SSDUnderChipCablesBoxShape[i],
1344 (i==0?fgkSSDAlTraceChipCableMedium:fgkSSDKaptonChipCableMedium));
1345 SSDUnderChipCablesBox[i]->SetLineColor(SSDChipCablesColor[i]);
1346 SSDUnderChipCablesBoxTrans[i] =
1347 new TGeoTranslation(SSDUnderChipCablesBoxTransName,
1348 (side=="Right"?-1.:1.)*0.5*fgkSSDChipWidth,
1349 0.5*(fgkSSDChipCablesLength[0]-fgkSSDChipCablesLength[1])
1350 +0.5*fgkSSDChipCablesLength[1],
1351 (i==0?1.:-1.)*0.5*fgkSSDChipCablesHeight[1-i]);
1352 }
1353 //////////////////
1354 //Trapezoid Shapes
1355 //////////////////
1356 const Int_t SSDChipCablesVertexNumber = 2;
1357 const Int_t SSDChipCablesTrapezoidNumber = 2;
1358 TVector3** SSDChipCablesTrapezoidVertex[SSDChipCablesVertexNumber];
1359 for(Int_t i = 0; i< SSDChipCablesTrapezoidNumber; i++)
1360 SSDChipCablesTrapezoidVertex[i] = new TVector3*[SSDChipCablesVertexNumber];
1361 //First Shape Vertex Positioning
1362 SSDChipCablesTrapezoidVertex[0][0] = new TVector3();
1363 SSDChipCablesTrapezoidVertex[0][1] =
1364 new TVector3(0.5*(fgkSSDChipCablesLength[0]-fgkSSDChipCablesLength[1]));
1365 //Second Shape Vertex Positioning
1366 SSDChipCablesTrapezoidVertex[1][0] =
1367 new TVector3(*SSDChipCablesTrapezoidVertex[0][0]);
1368 SSDChipCablesTrapezoidVertex[1][1] =
1369 new TVector3(*SSDChipCablesTrapezoidVertex[0][1]);
1370 //Setting the names of shapes and volumes
1371 char* SSDChipCablesTrapezoidBoxShapeName[SSDChipCablesTrapezoidNumber] =
1372 {"SSDChipCablesTrapezoidBoxShape1","SSDChipCablesTrapezoidBoxShape2"};
1373 char* SSDChipCablesTrapezoidShapeName[SSDChipCablesTrapezoidNumber] =
1374 {"SSDChipCablesTrapezoidShape1","SSDChipCablesTrapezoidShape2"};
1375 char* SSDChipCablesTrapezoidBoxName[SSDChipCablesTrapezoidNumber] =
1376 {"SSDChipCablesTrapezoidBox1","SSDChipCablesTrapezoidBox2"};
1377 char* SSDChipCablesTrapezoidName[SSDChipCablesTrapezoidNumber] =
1378 {"SSDChipCablesTrapezoid1","SSDChipCablesTrapezoid2"};
1379 char* SSDChipCablesTrapezoidAssemblyName[SSDChipCablesTrapezoidNumber] =
1380 {"SSDChipCablesTrapezoidAssembly1","SSDChipCablesTrapezoidAssembly2"};
1381 //Setting the Shapes
1382 TGeoBBox* SSDChipCablesTrapezoidBoxShape[SSDChipCablesTrapezoidNumber];
1383 TGeoArb8* SSDChipCablesTrapezoidShape[SSDChipCablesTrapezoidNumber];
1384 //Setting the Volumes
1385 TGeoVolume* SSDChipCablesTrapezoidBox[SSDChipCablesTrapezoidNumber];
1386 TGeoVolume* SSDChipCablesTrapezoid[SSDChipCablesTrapezoidNumber];
1387 TGeoVolume* SSDChipCablesTrapezoidAssembly[SSDChipCablesTrapezoidNumber];
1388 Double_t SSDChipCablesTrapezoidWidth[SSDChipCablesVertexNumber] =
1389 {fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2],fgkSSDChipCablesWidth[1]};
1390 for(Int_t i=0; i<SSDChipCablesTrapezoidNumber; i++){
1391 SSDChipCablesTrapezoidBoxShape[i] =
1392 new TGeoBBox(SSDChipCablesTrapezoidBoxShapeName[i],
1393 0.5*fgkSSDChipCablesLength[1],
1394 0.5*(fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2]),
1395 0.5*fgkSSDChipCablesHeight[i]);
1396 SSDChipCablesTrapezoidShape[i] =
1397 GetTrapezoidShape(SSDChipCablesTrapezoidVertex[i],
1398 SSDChipCablesTrapezoidWidth,
1399 fgkSSDChipCablesHeight[i],
1400 SSDChipCablesTrapezoidShapeName[i]);
1401 SSDChipCablesTrapezoidBox[i] =
1402 new TGeoVolume(SSDChipCablesTrapezoidBoxName[i],
1403 SSDChipCablesTrapezoidBoxShape[i],
1404 (i==0?fgkSSDAlTraceChipCableMedium:fgkSSDKaptonChipCableMedium));
1405 SSDChipCablesTrapezoid[i] = new TGeoVolume(SSDChipCablesTrapezoidName[i],
1406 SSDChipCablesTrapezoidShape[i],
1407 (i==0?fgkSSDAlTraceChipCableMedium:fgkSSDKaptonChipCableMedium));
1408 SSDChipCablesTrapezoidBox[i]->SetLineColor(SSDChipCablesColor[i]);
1409 SSDChipCablesTrapezoid[i]->SetLineColor(SSDChipCablesColor[i]);
1410 SSDChipCablesTrapezoidAssembly[i] =
1411 new TGeoVolumeAssembly(SSDChipCablesTrapezoidAssemblyName[i]);
1412 SSDChipCablesTrapezoidAssembly[i]->AddNode(SSDChipCablesTrapezoidBox[i],1,
1413 new TGeoTranslation(0.5*fgkSSDChipCablesLength[1],
1414 0.5*(fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2]),0.));
1415 SSDChipCablesTrapezoidAssembly[i]->AddNode(SSDChipCablesTrapezoid[i],0,
1416 new TGeoCombiTrans(0.,0.,0.,new TGeoRotation("",90.,180.,-90.)));
1417 SSDChipCablesTrapezoidAssembly[i]->AddNode(SSDChipCablesTrapezoid[i],1,
1418 new TGeoTranslation(fgkSSDChipCablesLength[1],0.,0.));
1419 }
1420 /////////////////////////////
1421 //Box and Tube Seg CombiTrans
1422 /////////////////////////////
1423 TGeoTranslation* SSDChipCablesBoxTrans[2*SSDChipCablesLayNumber];
1424 SSDChipCablesBoxTrans[0] =
1425 new TGeoTranslation("SSDChipCablesLay1Box1Trans",0.,0.,0.);
1426 SSDChipCablesBoxTrans[1] =
1427 new TGeoTranslation("SSDChipCablesLay1Box2Trans",
1428 SSDChipCablesBoxShape[0][1]->GetDX()
1429 - 0.5*SSDChipCablesPieceLength,
1430 0.0,
1431 - 2.*SSDChipCablesRadius[0]
1432 - fgkSSDChipCablesHeight[0]);
1433 SSDChipCablesBoxTrans[2] = new TGeoTranslation("SSDChipCablesLay2Box1Trans",
1434 0.0,
1435 0.0,
1436 0.5*(fgkSSDChipCablesHeight[0]
1437 + fgkSSDChipCablesHeight[1]));
1438 SSDChipCablesBoxTrans[3] =
1439 new TGeoTranslation("SSDChipCablesLay2Box2Trans",
1440 SSDChipCablesBoxShape[1][1]->GetDX()
1441 - 0.5*SSDChipCablesPieceLength,
1442 0.0,
1443 - 2.*SSDChipCablesRadius[0]
1444 - 0.5*fgkSSDChipCablesHeight[1]
1445 - 1.5*fgkSSDChipCablesHeight[0]);
1446 TGeoRotation* SSDChipCablesRot[3];
1447 SSDChipCablesRot[0] = new TGeoRotation("SSDChipCablesRot1",0.,90.,0.);
1448 SSDChipCablesRot[1] = new TGeoRotation("SSDChipCablesRot2",90.,90.,-90.);
1449 SSDChipCablesRot[2] = new TGeoRotation("SSDChipCablesRot3",90.,-90.,-90.);
1450 TGeoCombiTrans* SSDChipCablesTubeSegCombiTrans[2*(SSDChipCablesLayNumber+
1451 (side=="Right" ? 0 : 1))];
1452 SSDChipCablesTubeSegCombiTrans[0] =
1453 new TGeoCombiTrans("SSDChipCablesLay1TubeSeg1CombiTrans",
1454 0.5*SSDChipCablesPieceLength,
1455 0.0,
1456 SSDChipCablesRadius[0]
1457 - 0.5*fgkSSDChipCablesHeight[0],
1458 new TGeoRotation((*SSDChipCablesRot[1])*(*SSDChipCablesRot[0])));
1459 SSDChipCablesTubeSegCombiTrans[1] =
1460 new TGeoCombiTrans("SSDChipCablesLay1TubeSeg2CombiTrans",
1461 - 0.5*SSDChipCablesPieceLength,
1462 0.0,
1463 - SSDChipCablesRadius[0]-0.5*fgkSSDChipCablesHeight[0],
1464 new TGeoRotation((*SSDChipCablesRot[2])*(*SSDChipCablesRot[0])));
1465 SSDChipCablesTubeSegCombiTrans[2] =
1466 new TGeoCombiTrans("SSDChipCablesLay2TubeSeg1CombiTrans",
1467 0.5*SSDChipCablesPieceLength,
1468 0.0,
1469 SSDChipCablesRadius[0]-0.5*fgkSSDChipCablesHeight[0],
1470 new TGeoRotation((*SSDChipCablesRot[1])*(*SSDChipCablesRot[0])));
1471 SSDChipCablesTubeSegCombiTrans[3] =
1472 new TGeoCombiTrans("SSDChipCablesLay2TubeSeg2CombiTrans",
1473 - 0.5*SSDChipCablesPieceLength,
1474 0.0,
1475 - SSDChipCablesRadius[0]+0.5*fgkSSDChipCablesHeight[0]
1476 - fgkSSDChipCablesHeight[0],
1477 new TGeoRotation((*SSDChipCablesRot[2])*(*SSDChipCablesRot[0])));
1478 SSDChipCablesTubeSegCombiTrans[4] =
1479 new TGeoCombiTrans("SSDChipCablesLay1TubeSeg4CombiTrans",
1480 0.5*SSDChipCablesPieceLength+SSDChipCablesRadius[0]
1481 + fgkSSDModuleStiffenerPosition[1],
1482 0.0,
1483 - 2.*SSDChipCablesRadius[0]-0.5*fgkSSDChipCablesHeight[0]
1484 - (0.5*fgkSSDSensorHeight+fgkSSDChipCablesHeight[0]
1485 + fgkSSDChipCablesHeight[1]),
1486 new TGeoRotation((*SSDChipCablesRot[1])*(*SSDChipCablesRot[0])));
1487 SSDChipCablesTubeSegCombiTrans[5] =
1488 new TGeoCombiTrans("SSDChipCablesLay2TubeSeg5CombiTrans",
1489 0.5*SSDChipCablesPieceLength+SSDChipCablesRadius[0]
1490 + fgkSSDModuleStiffenerPosition[1],
1491 0.0,
1492 - 2.*SSDChipCablesRadius[0]-0.5*fgkSSDChipCablesHeight[0]
1493 - (0.5*fgkSSDSensorHeight+fgkSSDChipCablesHeight[0]
1494 + fgkSSDChipCablesHeight[1]),
1495 new TGeoRotation((*SSDChipCablesRot[1])*(*SSDChipCablesRot[0])));
1496 TGeoCombiTrans* SSDChipCablesTrapezoidCombiTrans[SSDChipCablesLayNumber];
1497 SSDChipCablesTrapezoidCombiTrans[0] = (side=="Right" ?
1498 new TGeoCombiTrans("SSDChipCableLay1TrapezoidRightCombiTrans",
1499 0.5*SSDChipCablesPieceLength+SSDChipCablesTrapezoidWidth[0]
1500 + SSDChipCablesRadius[0],
1501 - 0.5*fgkSSDChipCablesLength[1],
1502 - fgkSSDChipCablesHeight[0]-2.*SSDChipCablesRadius[0],
1503 new TGeoRotation("",90.,0.,0.)) :
1504 new TGeoCombiTrans("SSDChipCableLay1TrapezoidLeftCombiTrans",
1505 - 2.*(fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2])
1506 + 0.5*SSDChipCablesPieceLength+SSDChipCablesTrapezoidWidth[0]
1507 + SSDChipCablesRadius[0]+fgkSSDModuleStiffenerPosition[1],
1508 0.5*fgkSSDChipCablesLength[1],
1509 - 2.*(fgkSSDChipCablesHeight[0]+fgkSSDChipCablesHeight[1])
1510 - 2.*SSDChipCablesRadius[0]-fgkSSDSensorHeight,
1511 new TGeoRotation("",-90.,0.,0.)));
1512 SSDChipCablesTrapezoidCombiTrans[1] = (side=="Right" ?
1513 new TGeoCombiTrans("SSDChipCableLay2TrapezoidRightCombiTrans",
1514 0.5*SSDChipCablesPieceLength+SSDChipCablesTrapezoidWidth[0]
1515 + SSDChipCablesRadius[0],
1516 - 0.5*fgkSSDChipCablesLength[1],
1517 - 0.5*(fgkSSDChipCablesHeight[0]+fgkSSDChipCablesHeight[1])
1518 - fgkSSDChipCablesHeight[0]-2.*SSDChipCablesRadius[0],
1519 new TGeoRotation("",90.,0.,0.)) :
1520 new TGeoCombiTrans("SSDChipCableLay2TrapezoidLeftCombiTrans",
1521 - 2.*(fgkSSDChipCablesWidth[1]+fgkSSDChipCablesWidth[2])
1522 + 0.5*SSDChipCablesPieceLength+SSDChipCablesTrapezoidWidth[0]
1523 + SSDChipCablesRadius[0]+fgkSSDModuleStiffenerPosition[1],
1524 0.5*fgkSSDChipCablesLength[1],-0.5*(fgkSSDChipCablesHeight[0]
1525 + fgkSSDChipCablesHeight[1])-fgkSSDChipCablesHeight[1]
1526 - fgkSSDChipCablesHeight[0]-2.*SSDChipCablesRadius[0]
1527 - fgkSSDSensorHeight,new TGeoRotation("",-90.,0.,0.)));
1528 //////////////////////////
1529 //Box and Tube Seg Volumes
1530 //////////////////////////
1531 char* SSDChipCablesBoxName[2*SSDChipCablesLayNumber] =
1532 {"SSDChipCablesLay1Box1","SSDChipCablesLay1Box2",
1533 "SSDChipCablesLay2Box1","SSDChipCablesLay2Box2"};
1534 char* SSDChipRightCablesTubeSegName[2*SSDChipCablesLayNumber] =
1535 {"SSDChipRightCablesLay1TubeSeg1","SSDChipRightCablesLay1TubeSeg2",
1536 "SSDChipRightCablesLay2TubeSeg1","SSDChipRightCablesLay2TubeSeg2"};
1537 char* SSDChipLeftCablesTubeSegName[2*SSDChipCablesLayNumber] =
1538 {"SSDChipLeftCablesLay1TubeSeg1","SSDChipLeftCablesLay1TubeSeg2",
1539 "SSDChipLeftCablesLay2TubeSeg1","SSDChipLeftCablesLay2TubeSeg2"};
1540 char* SSDChipCablesLayAssemblyName[SSDChipCablesLayNumber] =
1541 {"SSDChipCablesLay1","SSDChipCablesLay2"};
1542 TGeoVolume** SSDChipCablesBox[SSDChipCablesLayNumber];
1543 TGeoVolume** SSDChipCablesTubeSeg[SSDChipCablesLayNumber];
1544 TGeoVolume* SSDChipCablesLayAssembly[SSDChipCablesLayNumber];
1545 for(Int_t i=0; i<SSDChipCablesLayNumber; i++){
1546 TGeoMedium* SSDChipCablesLayMed =
1547 (i==0?fgkSSDAlTraceChipCableMedium:fgkSSDKaptonChipCableMedium);
1548 SSDChipCablesBox[i] = new TGeoVolume*[2];
1549 SSDChipCablesTubeSeg[i] = new TGeoVolume*[2+(side=="Right" ? 0 : 1)];
1550 SSDChipCablesBox[i][0] = new TGeoVolume(SSDChipCablesBoxName[2*i],
1551 SSDChipCablesBoxShape[i][0],SSDChipCablesLayMed);
1552 SSDChipCablesBox[i][1] = new TGeoVolume(SSDChipCablesBoxName[2*i+1],
1553 SSDChipCablesBoxShape[i][1],SSDChipCablesLayMed);
1554 SSDChipCablesTubeSeg[i][0] = new TGeoVolume(SSDChipRightCablesTubeSegName[2*i],
1555 SSDChipCablesTubeSegShape[i][0],SSDChipCablesLayMed);
1556 SSDChipCablesTubeSeg[i][1] = new TGeoVolume(SSDChipRightCablesTubeSegName[2*i+1],
1557 SSDChipCablesTubeSegShape[i][1],SSDChipCablesLayMed);
1558 SSDChipCablesBox[i][0]->SetLineColor(SSDChipCablesColor[i]);
1559 SSDChipCablesBox[i][1]->SetLineColor(SSDChipCablesColor[i]);
1560 SSDChipCablesTubeSeg[i][0]->SetLineColor(SSDChipCablesColor[i]);
1561 SSDChipCablesTubeSeg[i][1]->SetLineColor(SSDChipCablesColor[i]);
1562 SSDChipCablesLayAssembly[i] = new TGeoVolumeAssembly(SSDChipCablesLayAssemblyName[i]);
1563 SSDChipCablesLayAssembly[i]->AddNode(SSDChipCablesBox[i][0],1,
1564 SSDChipCablesBoxTrans[2*i]);
1565 SSDChipCablesLayAssembly[i]->AddNode(SSDChipCablesBox[i][1],1,
1566 SSDChipCablesBoxTrans[2*i+1]);
1567 SSDChipCablesLayAssembly[i]->AddNode(SSDChipCablesTubeSeg[i][0],1,
1568 SSDChipCablesTubeSegCombiTrans[2*i]);
1569 SSDChipCablesLayAssembly[i]->AddNode(SSDChipCablesTubeSeg[i][1],1,
1570 SSDChipCablesTubeSegCombiTrans[2*i+1]);
1571 if(side!="Right"){
1572 SSDChipCablesTubeSeg[i][2] = new TGeoVolume(SSDChipLeftCablesTubeSegName[2*i],
1573 SSDChipCablesTubeSegShape[i][2],
1574 SSDChipCablesLayMed);
1575 SSDChipCablesTubeSeg[i][2]->SetLineColor(SSDChipCablesColor[i]);
1576 SSDChipCablesLayAssembly[i]->AddNode(SSDChipCablesTubeSeg[i][2],1,
1577 SSDChipCablesTubeSegCombiTrans[4+i]);
1578 }
1579 SSDChipCablesLayAssembly[i]->AddNode(SSDChipCablesTrapezoidAssembly[i],1,
1580 SSDChipCablesTrapezoidCombiTrans[i]);
1581 }
1582 TGeoCombiTrans* SSDChipCablesCombiTrans[SSDChipCablesLayNumber];
1583 SSDChipCablesCombiTrans[0] = new TGeoCombiTrans("SSDChipCablesCombiTrans1",
1584 (side=="Right" ? -1 : 1)*0.5*SSDChipCablesPieceLength,
1585 0.5*fgkSSDChipCablesLength[0],
1586 - (2.*SSDChipCablesRadius[0]-fgkSSDChipCablesHeight[0]
1587 - 0.5*fgkSSDChipCablesHeight[1]),
1588 new TGeoRotation("",(side=="Right" ? 0 : 1)*180.,0.,0.));
1589 SSDChipCablesCombiTrans[1] = new TGeoCombiTrans("SSDChipCablesCombiTrans2",
1590 (side=="Right" ? -1 : 1)*0.5*SSDChipCablesPieceLength,
1591 0.5*fgkSSDChipCablesLength[0],
1592 - (2.*SSDChipCablesRadius[0]-fgkSSDChipCablesHeight[0]
1593 - 0.5*fgkSSDChipCablesHeight[1]),
1594 new TGeoRotation("",(side=="Right" ? 0 : 1)*180.,0.,0.));
1595 TGeoVolume* SSDChipCablesAssembly =
1596 new TGeoVolumeAssembly("SSDChipCables");
1597 for(Int_t i=0; i<SSDChipCablesLayNumber; i++){
1598 SSDChipCablesAssembly->AddNode(SSDChipCablesLayAssembly[i],1,
1599 SSDChipCablesCombiTrans[i]);
1600 SSDChipCablesAssembly->AddNode(SSDUnderChipCablesBox[i],1,SSDUnderChipCablesBoxTrans[i]);
1601 }
1602 return SSDChipCablesAssembly;
1603}
1604/////////////////////////////////////////////////////////////////////////////////
1605TGeoVolume* AliITSv11GeometrySSD::GetSSDChipCablesAssembly(Double_t SSDChipCablesHeigth){
1606////////////////////////////////////////////////////////////////////////////////
1607 const Int_t ChipCablesNumber = 2;
1608 Double_t ChipCablesTransVector = fgkSSDSensorLength
1609 - 2.*fgkSSDModuleStiffenerPosition[1]
1610 - 2.*(fgkSSDStiffenerWidth
1611 - fgkSSDStiffenerToChipDist-fgkSSDChipWidth);
1612 char* SSDChipCablesName[ChipCablesNumber] = {"Right","Left"};
1613 TGeoVolume* SSDChipCables[ChipCablesNumber];
1614 TGeoVolume* SSDChipCablesAssembly =
1615 new TGeoVolumeAssembly("SSDChipCablesAssembly");
1616 for(Int_t i=0; i<ChipCablesNumber; i++) SSDChipCables[i] =
1617 GetSSDChipCables(SSDChipCablesHeigth,SSDChipCablesName[i]);
1618 for(Int_t i=0; i<ChipCablesNumber; i++)
1619 for(Int_t j=0; j<fgkSSDChipNumber; j++)
1620 SSDChipCablesAssembly->AddNode(SSDChipCables[i],fgkSSDChipNumber*i+j+1,
1621 new TGeoTranslation(-(SSDChipCablesName[i]=="Left" ? 1. : 0.)
1622 * ChipCablesTransVector,(j-0.5)*fgkSSDChipCablesLength[0]
1623 + 0.5*fgkSSDChipCablesLength[1],0.));
1624 return SSDChipCablesAssembly;
1625}
1626/////////////////////////////////////////////////////////////////////////////////
1627TGeoVolume* AliITSv11GeometrySSD::GetSSDFlex(Double_t SSDFlexRadius, Double_t SSDFlexHeigth){
1628////////////////////////////////////////////////////////////////////////////////
1629 const Int_t SSDFlexVolumeNumber = 3;
1630 TGeoVolume* SSDFlexVolume[SSDFlexVolumeNumber];
1631 ////////////////////////
1632 // Setting Display Color
1633 ////////////////////////
1634 Int_t SSDFlexColor;
1635 SSDFlexColor = (SSDFlexHeigth == fgkSSDFlexHeight[0] ? fColorAl: fColorPolyhamide);
1636 TGeoMedium* SSDFlexMed = (SSDFlexHeigth == fgkSSDFlexHeight[0] ? fgkSSDAlTraceFlexMedium :
1637 fgkSSDKaptonFlexMedium);
1638 ////////////////////////
1639 // SSDFlexTrapezoidShape
1640 ////////////////////////
1641 const Int_t SSDFlexVertexNumber = 2;
1642 Double_t SSDFlexWidth[SSDFlexVertexNumber] = {fgkSSDFlexWidth[1],
1643 fgkSSDFlexWidth[0]};
1644 TVector3* SSDFlexVertex[SSDFlexVertexNumber];
1645 SSDFlexVertex[0] = new TVector3();
1646 SSDFlexVertex[1] = new TVector3(fgkSSDFlexLength[0]-fgkSSDFlexLength[1]);
1647 TGeoArb8* SSDFlexTrapezoidShape = GetTrapezoidShape(SSDFlexVertex,
1648 SSDFlexWidth,SSDFlexHeigth,
1649 "SSDFlexTrapezoidShape");
1650 SSDFlexVolume[0] = new TGeoVolume("SSDFlexTrapezoid",SSDFlexTrapezoidShape,SSDFlexMed);
1651 SSDFlexVolume[0]->SetLineColor(SSDFlexColor);
1652 /////////////////////////
1653 //SSDFlexTubeSeg Assembly
1654 /////////////////////////
1655 const Int_t SSDFlexTubeSegNumber = 2;
1656 TGeoTubeSeg* SSDFlexTubeSegShape[SSDFlexTubeSegNumber];
1657 Double_t SSDFlexRadiusMax = (fgkSSDFlexLength[3]-fgkSSDFlexLength[2])
1658 / TMath::Tan(fgkSSDFlexAngle*TMath::DegToRad());
1659 SSDFlexTubeSegShape[0] = new TGeoTubeSeg("SSDFlexTubeSegShape1",
1660 SSDFlexRadius,SSDFlexRadius+SSDFlexHeigth,
1661 0.5*fgkSSDFlexWidth[0],0.,180.);
1662 SSDFlexTubeSegShape[1] = new TGeoTubeSeg("SSDFlexTubeSegShape2",
1663 SSDFlexRadiusMax-SSDFlexRadius-SSDFlexHeigth,
1664 SSDFlexRadiusMax-SSDFlexRadius,0.5*fgkSSDFlexWidth[0],
1665 0.,2.*fgkSSDFlexAngle);
1666 TGeoRotation** SSDFlexTubSegRot[SSDFlexTubeSegNumber];
1667 for(Int_t i = 0; i<SSDFlexTubeSegNumber; i++)
1668 SSDFlexTubSegRot[i] = new TGeoRotation*[2];
1669 SSDFlexTubSegRot[0][0] = new TGeoRotation("SSDFlexTubeSeg1Rot1", 0., 90., 0.);
1670 SSDFlexTubSegRot[0][1] = new TGeoRotation("SSDFlexTubeSeg1Rot2",90., 90.,-90.);
1671 SSDFlexTubSegRot[1][0] = new TGeoRotation("SSDFlexTubeSeg2Rot1", 0.,-90., 0.);
1672 SSDFlexTubSegRot[1][1] = new TGeoRotation("SSDFlexTubeSeg2Rot2",90., 90.,-90.);
1673 TGeoCombiTrans* SSDFlexTubeSegCombiTrans[SSDFlexTubeSegNumber];
1674 SSDFlexTubeSegCombiTrans[0] = new TGeoCombiTrans("SSDFlexTubeSegCombiTrans1",
1675 fgkSSDFlexLength[0],0.5*fgkSSDFlexWidth[0],
1676 SSDFlexRadius+0.5*SSDFlexHeigth,
1677 new TGeoRotation((*SSDFlexTubSegRot[0][1])
1678 * (*SSDFlexTubSegRot[0][0])));
1679 SSDFlexTubeSegCombiTrans[1] = new TGeoCombiTrans("SSDFlexTubeSegCombiTrans2",
1680 fgkSSDFlexLength[0]-fgkSSDFlexLength[2],
1681 0.5*fgkSSDFlexWidth[0],
1682 SSDFlexRadiusMax+0.5*SSDFlexHeigth+SSDFlexRadius,
1683 new TGeoRotation((*SSDFlexTubSegRot[1][1])
1684 * (*SSDFlexTubSegRot[1][0])));
1685 SSDFlexVolume[1] = new TGeoVolumeAssembly("SSDFlexTubeSegAssembly");
1686 TGeoVolume* SSDFlexTubeSeg[SSDFlexTubeSegNumber];
1687 char SSDFlexTubeSegName[30];
1688 for(Int_t i=0; i<SSDFlexTubeSegNumber; i++){
1689 sprintf(SSDFlexTubeSegName,"SSDFlexTubeSeg%i",i+1);
1690 SSDFlexTubeSeg[i] = new TGeoVolume(SSDFlexTubeSegName,SSDFlexTubeSegShape[i],
1691 SSDFlexMed);
1692 SSDFlexTubeSeg[i]->SetLineColor(SSDFlexColor);
1693 SSDFlexVolume[1]->AddNode(SSDFlexTubeSeg[i],1,SSDFlexTubeSegCombiTrans[i]);
1694 }
1695 ///////////
1696 //Box Shape
1697 ///////////
1698 const Int_t SSDFlexBoxNumber = 7;
1699 Double_t SSDFlexBoxLength[SSDFlexBoxNumber];
1700 SSDFlexBoxLength[0] = 0.5*(fgkSSDChipNumber
1701 * fgkSSDChipLength+(fgkSSDChipNumber-1)
1702 * fgkSSDChipSeparationLength
1703 - fgkSSDModuleSensorSupportDistance-fgkSSDFlexHoleLength)
1704 - (fgkSSDFlexLength[0]-fgkSSDFlexLength[1]);
1705 SSDFlexBoxLength[1] = fgkSSDModuleSensorSupportDistance+fgkSSDFlexHoleLength;
1706 SSDFlexBoxLength[2] = 0.5*(fgkSSDModuleSensorSupportDistance
1707 - fgkSSDFlexHoleLength-fgkSSDFlexHoleWidth);
1708 SSDFlexBoxLength[3] = fgkSSDFlexHoleWidth;
1709 SSDFlexBoxLength[4] = fgkSSDFlexLength[1]-SSDFlexBoxLength[0]
1710 - SSDFlexBoxLength[1];
1711 SSDFlexBoxLength[5] = fgkSSDFlexLength[2];
1712 SSDFlexBoxLength[6] = fgkSSDFlexFullLength-2.*fgkSSDFlexAngle
1713 * TMath::DegToRad()*SSDFlexRadiusMax
1714 - fgkSSDFlexLength[2]-TMath::Pi()
1715 * fgkSSDStiffenerHeight-fgkSSDFlexLength[0];
1716 Double_t SSDFlexBoxWidth[SSDFlexBoxNumber];
1717 SSDFlexBoxWidth[0] = fgkSSDFlexWidth[0];
1718 SSDFlexBoxWidth[1] = fgkSSDFlexWidth[0]-fgkSSDFlexHoleWidth;
1719 SSDFlexBoxWidth[2] = fgkSSDFlexHoleWidth;
1720 SSDFlexBoxWidth[3] = SSDFlexBoxWidth[2]-fgkSSDFlexHoleLength;
1721 SSDFlexBoxWidth[4] = fgkSSDFlexWidth[0];
1722 SSDFlexBoxWidth[5] = fgkSSDFlexWidth[0];
1723 SSDFlexBoxWidth[6] = fgkSSDFlexWidth[0];
1724 TGeoBBox* SSDFlexBoxShape[SSDFlexBoxNumber+1];
1725 for(Int_t i=0; i<SSDFlexBoxNumber+1; i++) SSDFlexBoxShape[i] =
1726 (i!= SSDFlexBoxNumber ? new TGeoBBox("SSDFlexBoxShape",
1727 0.5*SSDFlexBoxLength[i],
1728 0.5*SSDFlexBoxWidth[i],0.5*SSDFlexHeigth) :
1729 SSDFlexBoxShape[2]);
1730 //////////////////////////////
1731 //SSDFlex Box Shape CombiTrans
1732 //////////////////////////////
1733 TGeoCombiTrans* SSDFlexBoxCombiTrans[SSDFlexBoxNumber+1];
1734 SSDFlexBoxCombiTrans[0] = new TGeoCombiTrans("SSDFlexBoxCombiTrans0",
1735 SSDFlexVertex[1]->X()+0.5*SSDFlexBoxLength[0],
1736 0.5*fgkSSDFlexWidth[0],0.,0);
1737 SSDFlexBoxCombiTrans[1] = new TGeoCombiTrans("SSDFlexBoxCombiTrans1",
1738 SSDFlexVertex[1]->X()+SSDFlexBoxLength[0]
1739 + 0.5*SSDFlexBoxLength[1],
1740 fgkSSDFlexHoleWidth+0.5*SSDFlexBoxWidth[1],0.,0);
1741 SSDFlexBoxCombiTrans[2] = new TGeoCombiTrans("SSDFlexBoxCombiTrans2",
1742 SSDFlexVertex[1]->X()+SSDFlexBoxLength[0]
1743 + fgkSSDFlexHoleLength+0.5*SSDFlexBoxLength[2],
1744 0.5*SSDFlexBoxWidth[2],0.,0);
1745 SSDFlexBoxCombiTrans[3] = new TGeoCombiTrans("SSDFlexBoxCombiTrans3",
1746 SSDFlexVertex[1]->X()+SSDFlexBoxLength[0]
1747 + fgkSSDFlexHoleLength+SSDFlexBoxLength[2]
1748 + 0.5*fgkSSDFlexHoleWidth,
1749 fgkSSDFlexHoleLength+0.5*SSDFlexBoxWidth[3],0.,0);
1750 SSDFlexBoxCombiTrans[4] = new TGeoCombiTrans("SSDFlexBoxCombiTrans4",
1751 SSDFlexVertex[1]->X()+SSDFlexBoxLength[0]
1752 + SSDFlexBoxLength[1]+0.5*SSDFlexBoxLength[4],
1753 0.5*fgkSSDFlexWidth[0],0.,0);
1754 SSDFlexBoxCombiTrans[5] = new TGeoCombiTrans("SSDFlexBoxCombiTrans5",
1755 - 0.5*fgkSSDFlexLength[2]+fgkSSDFlexLength[0],
1756 0.5*fgkSSDFlexWidth[0],
1757 2.*SSDFlexRadius+SSDFlexHeigth,0);
1758 SSDFlexBoxCombiTrans[6] = new TGeoCombiTrans("SSDFlexBoxCombiTrans6",
1759 - SSDFlexBoxShape[6]->GetDX()
1760 + SSDFlexBoxShape[6]->GetDX()
1761 * TMath::Cos(2.*fgkSSDFlexAngle*TMath::DegToRad())
1762 + fgkSSDFlexLength[0]-fgkSSDFlexLength[2]
1763 - (SSDFlexRadiusMax-SSDFlexRadius-0.5*SSDFlexHeigth)
1764 * TMath::Cos(fgkSSDFlexAngle*TMath::DegToRad()),
1765 0.5*fgkSSDFlexWidth[0],SSDFlexBoxShape[6]->GetDX()
1766 *TMath::Sin(2.*fgkSSDFlexAngle*TMath::DegToRad())
1767 + SSDFlexHeigth+2.*SSDFlexRadius+(SSDFlexRadiusMax
1768 - SSDFlexRadius-0.5*SSDFlexHeigth)
1769 * TMath::Sin(fgkSSDFlexAngle*TMath::DegToRad()),
1770 new TGeoRotation("",90.,2.*fgkSSDFlexAngle,-90.));
1771 SSDFlexBoxCombiTrans[7] = new TGeoCombiTrans("SSDFlexBoxCombiTrans7",
1772 SSDFlexVertex[1]->X()+SSDFlexBoxLength[0]
1773 + fgkSSDFlexHoleLength+1.5*SSDFlexBoxLength[2]
1774 + SSDFlexBoxLength[3],
1775 0.5*SSDFlexBoxWidth[2],0.,0);
1776 ////////////////////////////
1777 //SSDFlex Box Shape Assembly
1778 ////////////////////////////
1779 SSDFlexVolume[2] = new TGeoVolumeAssembly("SSDFlexBoxAssembly");
1780 TGeoVolume* SSDFlexBox[SSDFlexBoxNumber+1];
1781 TGeoVolume* SSDEndFlex = GetSSDEndFlex(SSDFlexBoxLength[6],SSDFlexHeigth);
1782 TGeoHMatrix* SSDEndFlexHMatrix = new TGeoHMatrix();
1783 TGeoRotation* SSDEndFlexRot= new TGeoRotation("SSDEndFlexRot",180.,0.,0);
1784 SSDEndFlexHMatrix->MultiplyLeft(SSDEndFlexRot);
1785 SSDEndFlexHMatrix->MultiplyLeft(SSDFlexBoxCombiTrans[6]);
1786 char SSDFlexBoxName[30];
1787 for(Int_t i=0; i<SSDFlexBoxNumber+1; i++){
1788 sprintf(SSDFlexBoxName,"SSDFlexBox%i",i!=SSDFlexBoxNumber?i+1:7);
1789 if(i==6){SSDFlexVolume[2]->AddNode(SSDEndFlex,1,SSDEndFlexHMatrix);}
1790 else{
1791 SSDFlexBox[i] = new TGeoVolume(SSDFlexBoxName,SSDFlexBoxShape[i],
1792 SSDFlexMed);
1793 SSDFlexBox[i]->SetLineColor(SSDFlexColor);
1794 SSDFlexVolume[2]->AddNode(SSDFlexBox[i],1,SSDFlexBoxCombiTrans[i]);}
1795 }
1796 //////////////////////
1797 //SSDFlex Construction
1798 //////////////////////
1799 TGeoVolume* SSDFlex = new TGeoVolumeAssembly("SSDFlex");
1800 for(Int_t i =0; i<SSDFlexVolumeNumber; i++) SSDFlex->AddNode(SSDFlexVolume[i],1);
1801 return SSDFlex;
1802}
1803/////////////////////////////////////////////////////////////////////////////////
1804TGeoVolume* AliITSv11GeometrySSD::GetSSDEndFlex(Double_t SSDEndFlexLength,
1805 Double_t SSDFlexHeigth){
1806 /////////////////////////////////////////
1807 // Setting Display Color, Media and Index
1808 /////////////////////////////////////////
1809 Int_t SSDFlexColor;
1810 SSDFlexColor = (SSDFlexHeigth == fgkSSDFlexHeight[0] ? fColorAl: fColorPolyhamide);
1811 TGeoMedium* SSDFlexMed = (SSDFlexHeigth == fgkSSDFlexHeight[0] ? fgkSSDAlTraceFlexMedium :
1812 fgkSSDKaptonFlexMedium);
1813 ////////////////////////
1814 const Int_t SSDEndFlexBoxNumber = 5;
1815 TGeoBBox* SSDEndFlexBBoxShape[SSDEndFlexBoxNumber];
1816 SSDEndFlexBBoxShape[0] = new TGeoBBox("SSDFlexBoxShape1",
1817 0.5*SSDEndFlexLength,0.5*fgkSSDFlexWidth[0],
1818 0.5*SSDFlexHeigth);
1819 SSDEndFlexBBoxShape[1] = new TGeoBBox("SSDFlexBoxShape2",
1820 0.5*fgkSSDEndFlexCompLength[1],
1821 0.5*(fgkSSDEndFlexCompWidth[0]-fgkSSDFlexWidth[0])/2,
1822 0.5*SSDFlexHeigth);
1823 SSDEndFlexBBoxShape[2] = new TGeoBBox("SSDFlexBoxShape3",
1824 0.5*fgkSSDEndFlexCompLength[2],
1825 0.5*(fgkSSDEndFlexCompWidth[1]-fgkSSDFlexWidth[0])/2,
1826 0.5*SSDFlexHeigth);
1827 SSDEndFlexBBoxShape[3] = new TGeoBBox("SSDFlexBoxShape4",
1828 0.5*fgkSSDEndFlexCompLength[3],
1829 0.5*(fgkSSDEndFlexCompWidth[0]-fgkSSDFlexWidth[0])/2,
1830 0.5*SSDFlexHeigth);
1831 SSDEndFlexBBoxShape[4] = new TGeoBBox("SSDFlexBoxShape5",
1832 0.5*(fgkSSDEndFlexCompLength[4]+fgkSSDEndFlexCompLength[5]),
1833 0.25*(fgkSSDEndFlexCompWidth[2]-fgkSSDFlexWidth[0])/2,
1834 0.5*SSDFlexHeigth);
1835 TGeoVolume* SSDEndFlexBBox[SSDEndFlexBoxNumber];
1836 char SSDEndFlexBBoxName[30];
1837 for(Int_t i=0; i<SSDEndFlexBoxNumber; i++){
1838 sprintf(SSDEndFlexBBoxName,"SSDEndFlexBBox%i",i+1);
1839 SSDEndFlexBBox[i] = new TGeoVolume(SSDEndFlexBBoxName,
1840 SSDEndFlexBBoxShape[i],
1841 SSDFlexMed);
1842 SSDEndFlexBBox[i]->SetLineColor(SSDFlexColor);
1843 }
1844 TGeoVolume* SSDEndFlex = new TGeoVolumeAssembly("SSDEndFlex");
1845 Double_t PartialSumLength = 0.;
1846 for(Int_t i=0; i<SSDEndFlexBoxNumber+1; i++) PartialSumLength += fgkSSDEndFlexCompLength[i];
1847 Double_t ReferenceLength = SSDEndFlexLength-PartialSumLength;
1848 SSDEndFlex->AddNode(SSDEndFlexBBox[0],1);
1849 SSDEndFlex->AddNode(SSDEndFlexBBox[1],1,new TGeoTranslation(
1850 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1851 + 0.5*fgkSSDEndFlexCompLength[1],
1852 0.5*fgkSSDFlexWidth[0]+SSDEndFlexBBoxShape[1]->GetDY(),
1853 0.));
1854 SSDEndFlex->AddNode(SSDEndFlexBBox[1],2,new TGeoTranslation(
1855 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1856 + 0.5*fgkSSDEndFlexCompLength[1],
1857 - 0.5*fgkSSDFlexWidth[0]-SSDEndFlexBBoxShape[1]->GetDY(),
1858 0.));
1859 SSDEndFlex->AddNode(SSDEndFlexBBox[2],1,new TGeoTranslation(
1860 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1861 + fgkSSDEndFlexCompLength[1]+0.5*fgkSSDEndFlexCompLength[2],
1862 + 0.5*fgkSSDFlexWidth[0]+SSDEndFlexBBoxShape[2]->GetDY(),
1863 0.));
1864 SSDEndFlex->AddNode(SSDEndFlexBBox[2],2,new TGeoTranslation(
1865 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1866 + fgkSSDEndFlexCompLength[1]+0.5*fgkSSDEndFlexCompLength[2],
1867 - 0.5*fgkSSDFlexWidth[0]-SSDEndFlexBBoxShape[2]->GetDY(),
1868 0.));
1869 SSDEndFlex->AddNode(SSDEndFlexBBox[3],1,new TGeoTranslation(
1870 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1871 + fgkSSDEndFlexCompLength[1]+fgkSSDEndFlexCompLength[2]
1872 + 0.5*fgkSSDEndFlexCompLength[3],
1873 + 0.5*fgkSSDFlexWidth[0]+SSDEndFlexBBoxShape[3]->GetDY(),
1874 0.));
1875 SSDEndFlex->AddNode(SSDEndFlexBBox[3],2,new TGeoTranslation(
1876 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1877 + fgkSSDEndFlexCompLength[1]+fgkSSDEndFlexCompLength[2]
1878 + 0.5*fgkSSDEndFlexCompLength[3],
1879 - 0.5*fgkSSDFlexWidth[0]-SSDEndFlexBBoxShape[3]->GetDY(),
1880 0.));
1881 SSDEndFlex->AddNode(SSDEndFlexBBox[4],1,new TGeoTranslation(
1882 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1883 + fgkSSDEndFlexCompLength[1]+fgkSSDEndFlexCompLength[2]
1884 + fgkSSDEndFlexCompLength[3]+0.5*(fgkSSDEndFlexCompLength[4]+fgkSSDEndFlexCompLength[5]),
1885 + 0.5*fgkSSDFlexWidth[0]+SSDEndFlexBBoxShape[4]->GetDY(),
1886 0.));
1887 SSDEndFlex->AddNode(SSDEndFlexBBox[4],2,new TGeoTranslation(
1888 - 0.5*SSDEndFlexLength+ReferenceLength+fgkSSDEndFlexCompLength[0]
1889 + fgkSSDEndFlexCompLength[1]+fgkSSDEndFlexCompLength[2]
1890 + fgkSSDEndFlexCompLength[3]+0.5*(fgkSSDEndFlexCompLength[4]
1891 + fgkSSDEndFlexCompLength[5]),
1892 - 0.5*fgkSSDFlexWidth[0]-SSDEndFlexBBoxShape[4]->GetDY(),
1893 0.));
1894 return SSDEndFlex;
1895}
1896/////////////////////////////////////////////////////////////////////////////////
1897TGeoVolume* AliITSv11GeometrySSD::GetSSDFlexAssembly(){
1898////////////////////////////////////////////////////////////////////////////////
1899 TGeoVolume* SSDFlexAssembly = new TGeoVolumeAssembly("SSDFlexAssembly");
1900 const Int_t SSDFlexLayerNumber = 4;
1901 Double_t SSDFlexHeight[SSDFlexLayerNumber];
1902 Double_t SSDFlexRadius[SSDFlexLayerNumber];
1903 TGeoTranslation* SSDFlexTrans[SSDFlexLayerNumber];
1904 for(Int_t i=0; i<SSDFlexLayerNumber; i++){
1905 SSDFlexHeight[i] = (i%2==0 ? fgkSSDFlexHeight[0] : fgkSSDFlexHeight[1]);
1906 SSDFlexRadius[i] = (i==0 ? fgkSSDStiffenerHeight : SSDFlexRadius[i-1]
1907 + SSDFlexHeight[i-1]);
1908 SSDFlexTrans[i] = new TGeoTranslation(0.,0.,-0.5*i*(SSDFlexHeight[0]
1909 + SSDFlexHeight[1]));
1910 SSDFlexAssembly->AddNode(GetSSDFlex(SSDFlexRadius[i],SSDFlexHeight[i]),i+1,
1911 SSDFlexTrans[i]);
1912 }
1913 return SSDFlexAssembly;
1914}
1915/////////////////////////////////////////////////////////////////////////////////
1916TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlockAssembly(){
1917////////////////////////////////////////////////////////////////////////////////
1918 const Int_t SSDCoolingBlockTransNumber = 2;
1919 Double_t SSDCoolingBlockTransVector[SSDCoolingBlockTransNumber] =
1920 {fgkSSDModuleSensorSupportDistance+fgkSSDCoolingBlockLength,
1921 fgkSSDSensorLength-2.*fgkSSDModuleStiffenerPosition[1]
1922 - fgkSSDCoolingBlockWidth};
1923 TGeoVolume* SSDCoolingBlock = GetSSDCoolingBlock();
1924 TGeoVolume* SSDCoolingBlockAssembly =
1925 new TGeoVolumeAssembly("SSDCoolingBlockAssembly");
1926 for(Int_t i=0; i<SSDCoolingBlockTransNumber; i++)
1927 for(Int_t j=0; j<SSDCoolingBlockTransNumber; j++)
1928 SSDCoolingBlockAssembly->AddNode(SSDCoolingBlock,
1929 SSDCoolingBlockTransNumber*i+j+1,
1930 new TGeoTranslation(i*SSDCoolingBlockTransVector[0],
1931 j*SSDCoolingBlockTransVector[1],0.));
1932 return SSDCoolingBlockAssembly;
1933}
1934/////////////////////////////////////////////////////////////////////////////////
1935TGeoVolume* AliITSv11GeometrySSD::GetSSDCoolingBlock(){
1936/////////////////////////////////////////////////////////////////////////////////
1937 // Center Cooling Block Hole
1938 ////////////////////////////
1939 Double_t CoolingBlockHoleAngle = TMath::ACos(0.5*fgkSSDCoolingBlockHoleLength[0]
1940 /fgkSSDCoolingBlockHoleRadius[0])*TMath::RadToDeg();
1941 Double_t CoolingBlockHoleWidth = fgkSSDCoolingBlockWidth;
1942 /*TGeoTubeSeg* CoolingBlockHoleShape = */ new TGeoTubeSeg("CoolingBlockHoleShape",
1943 0.,
1944 fgkSSDCoolingBlockHoleRadius[0],
1945 0.5*CoolingBlockHoleWidth,
1946 180.-CoolingBlockHoleAngle,360.+CoolingBlockHoleAngle);
1947 TVector3* CoolingBlockHoleVertex[3];
1948 CoolingBlockHoleVertex[0] = new TVector3();
1949 CoolingBlockHoleVertex[1] = new TVector3(fgkSSDCoolingBlockHoleRadius[0]
1950 * TMath::Cos((90.-CoolingBlockHoleAngle)*TMath::DegToRad()),
1951 fgkSSDCoolingBlockHoleRadius[0]
1952 * TMath::Sin((90.-CoolingBlockHoleAngle)*TMath::DegToRad()));
1953 CoolingBlockHoleVertex[2] = new TVector3(CoolingBlockHoleVertex[1]->X(),
1954 - CoolingBlockHoleVertex[1]->Y());
1955 /* TGeoArb8* CoolingBlockTriangleHoleShape = */
1956 GetTriangleShape(CoolingBlockHoleVertex,
1957 CoolingBlockHoleWidth,"CoolingBlockTriangleHoleShape");
1958 TGeoRotation* CoolingBlockHoleRot =
1959 new TGeoRotation("CoolingBlockHoleRot",90,0.,0.);
1960 CoolingBlockHoleRot->RegisterYourself();
1961 /* TGeoCompositeShape* CoolingTubeHoleShape = */
1962 new TGeoCompositeShape("CoolingTubeHoleShape",
1963 "CoolingBlockTriangleHoleShape:CoolingBlockHoleRot+"
1964 "CoolingBlockHoleShape");
1965 ///////////////////////////
1966 // Cooling Block Trapezoids
1967 ///////////////////////////
1968 const Int_t VertexNumber = 4;
1969 const Int_t TrapezoidNumber = 2;
1970 TVector3** CoolingBlockTrapezoidVertex[TrapezoidNumber];
1971 for(Int_t i = 0; i<TrapezoidNumber; i++) CoolingBlockTrapezoidVertex[i] =
1972 new TVector3*[VertexNumber];
1973 Double_t CoolingBlockComponentHeight = fgkSSDCoolingBlockHeight[0]
1974 - fgkSSDCoolingBlockHoleCenter
1975 - fgkSSDCoolingBlockHoleRadius[0]
1976 * TMath::Sin(CoolingBlockHoleAngle*TMath::DegToRad());
1977 Double_t CoolingBlockTrapezoidLength[TrapezoidNumber] =
1978 { fgkSSDCoolingBlockLength,
1979 0.5*(fgkSSDCoolingBlockLength-2.
1980 * (fgkSSDCoolingBlockHoleLength[1]
1981 - fgkSSDCoolingBlockHoleRadius[1])
1982 - fgkSSDCoolingBlockHoleLength[0])};
1983 Double_t CoolingBlockTrapezoidHeigth[TrapezoidNumber] =
1984 { fgkSSDCoolingBlockHeight[0]-CoolingBlockComponentHeight
1985 - fgkSSDCoolingBlockHeight[1]-fgkSSDCoolingBlockHeight[2]
1986 - fgkSSDCoolingBlockHoleRadius[1],
1987 CoolingBlockComponentHeight};
1988 Double_t CoolingBlockTrapezoidWidth[TrapezoidNumber] =
1989 {fgkSSDCoolingBlockWidth,fgkSSDCoolingBlockWidth};
1990 //////////////////////////
1991 //Vertex Positioning Shape
1992 //////////////////////////
1993 CoolingBlockTrapezoidVertex[0][0] = new TVector3();
1994 CoolingBlockTrapezoidVertex[0][1] = new TVector3(CoolingBlockTrapezoidLength[0]);
1995 CoolingBlockTrapezoidVertex[0][2] = new TVector3(
1996 0.5*(CoolingBlockTrapezoidVertex[0][1]->X()
1997 - 2.*CoolingBlockTrapezoidLength[1]
1998 - fgkSSDCoolingBlockHoleLength[0]));
1999 CoolingBlockTrapezoidVertex[0][3] =
2000 new TVector3(CoolingBlockTrapezoidVertex[0][1]->X()
2001 - CoolingBlockTrapezoidVertex[0][2]->X());
2002 CoolingBlockTrapezoidVertex[1][0] = new TVector3();
2003 CoolingBlockTrapezoidVertex[1][1] = new TVector3(CoolingBlockTrapezoidLength[1]);
2004 CoolingBlockTrapezoidVertex[1][2] =
2005 new TVector3(CoolingBlockTrapezoidHeigth[1]
2006 / CoolingBlockTrapezoidHeigth[0]
2007 * CoolingBlockTrapezoidVertex[0][2]->X());
2008 CoolingBlockTrapezoidVertex[1][3] =
2009 new TVector3(CoolingBlockTrapezoidVertex[1][1]->X());
2010 char* CoolingBlockTrapezoidShapeName[TrapezoidNumber] =
2011 {"CoolingBlockTrapezoidShape0","CoolingBlockTrapezoidShape1"};
2012 TGeoArb8* CoolingBlockTrapezoidShape[TrapezoidNumber];
2013 for(Int_t i = 0; i< TrapezoidNumber; i++) CoolingBlockTrapezoidShape[i] =
2014 GetArbShape(CoolingBlockTrapezoidVertex[i],
2015 CoolingBlockTrapezoidWidth,
2016 CoolingBlockTrapezoidHeigth[i],
2017 CoolingBlockTrapezoidShapeName[i]);
2018 TGeoTranslation* CoolingBlockTrapezoidTrans =
2019 new TGeoTranslation("CoolingBlockTrapezoidTrans",
2020 CoolingBlockTrapezoidVertex[0][2]->X(),
2021 0.0,
2022 0.5*(CoolingBlockTrapezoidHeigth[0]
2023 + CoolingBlockTrapezoidHeigth[1]));
2024 CoolingBlockTrapezoidTrans->RegisterYourself();
2025 TGeoCombiTrans* CoolingBlockTrapezoidCombiTrans =
2026 new TGeoCombiTrans("CoolingBlockTrapezoidCombiTrans",
2027 CoolingBlockTrapezoidVertex[0][3]->X(),
2028 fgkSSDCoolingBlockWidth,
2029 0.5*(CoolingBlockTrapezoidHeigth[0]
2030 + CoolingBlockTrapezoidHeigth[1]),
2031 new TGeoRotation("",180.,0.,0.));
2032 CoolingBlockTrapezoidCombiTrans->RegisterYourself();
2033 /* TGeoCompositeShape* CoolingBlockTrapezoidCompositeShape = */
2034 new TGeoCompositeShape("CoolingBlockTrapezoidCompositeShape",
2035 "CoolingBlockTrapezoidShape0+CoolingBlockTrapezoidShape1:CoolingBlockTrapezoidTrans+"
2036 "CoolingBlockTrapezoidShape1:CoolingBlockTrapezoidCombiTrans");
2037 /////////////////////////////
2038 // Cooling Block Boxes Shapes
2039 /////////////////////////////
2040 const Int_t BoxNumber = 3;
2041 TGeoBBox* CoolingBlockBoxShape[BoxNumber];
2042 CoolingBlockBoxShape[0] = new TGeoBBox("CoolingBlockBoxShape0",
2043 0.5*fgkSSDCoolingBlockLength,
2044 0.5*fgkSSDCoolingBlockWidth,
2045 0.5*fgkSSDCoolingBlockHoleRadius[1]);
2046 CoolingBlockBoxShape[1] = new TGeoBBox("CoolingBlockBoxShape1",
2047 0.5*(fgkSSDCoolingBlockLength
2048 - 2.*fgkSSDCoolingBlockHoleLength[1]),
2049 0.5*fgkSSDCoolingBlockWidth,
2050 0.5*fgkSSDCoolingBlockHeight[2]);
2051 CoolingBlockBoxShape[2] = new TGeoBBox("CoolingBlockBoxShape2",
2052 0.5*fgkSSDCoolingBlockLength,
2053 0.5*fgkSSDCoolingBlockWidth,
2054 0.5*fgkSSDCoolingBlockHeight[1]);
2055 TGeoTranslation* CoolingBlockBoxTrans[BoxNumber-1];
2056 CoolingBlockBoxTrans[0] = new TGeoTranslation("CoolingBlockBoxTrans0",0.,0.,
2057 0.5*(fgkSSDCoolingBlockHeight[1]
2058 + fgkSSDCoolingBlockHoleRadius[1])
2059 + fgkSSDCoolingBlockHeight[2]);
2060 CoolingBlockBoxTrans[1] = new TGeoTranslation("CoolingBlockBoxTrans1",
2061 0.0,
2062 0.0,
2063 0.5*(fgkSSDCoolingBlockHeight[1]
2064 + fgkSSDCoolingBlockHeight[2]));
2065 for(Int_t i=0; i<BoxNumber-1; i++) CoolingBlockBoxTrans[i]->RegisterYourself();
2066 /* TGeoCompositeShape* CoolingBlockBoxCompositeShape = */
2067 new TGeoCompositeShape("CoolingBlockBoxCompositeShape",
2068 "CoolingBlockBoxShape0:CoolingBlockBoxTrans0+"
2069 "CoolingBlockBoxShape1:CoolingBlockBoxTrans1+CoolingBlockBoxShape2");
2070 ///////////////////////
2071 // Cooling Block Shape
2072 //////////////////////
2073 TGeoCombiTrans* CoolingTubeHoleShapeCombiTrans =
2074 new TGeoCombiTrans("CoolingTubeHoleShapeCombiTrans",
2075 0.5*fgkSSDCoolingBlockLength,
2076 0.5*fgkSSDCoolingBlockWidth,
2077 fgkSSDCoolingBlockHoleCenter,
2078 new TGeoRotation("",0.,90.,0.));
2079 CoolingTubeHoleShapeCombiTrans->RegisterYourself();
2080 TGeoTranslation* CoolingBlockTrapezoidCompositeShapeTrans =
2081 new TGeoTranslation("CoolingBlockTrapezoidCompositeShapeTrans",
2082 0.0,
2083 0.0,
2084 0.5*CoolingBlockTrapezoidHeigth[0]+fgkSSDCoolingBlockHeight[1]+
2085 fgkSSDCoolingBlockHeight[2]+fgkSSDCoolingBlockHoleRadius[1]);
2086 CoolingBlockTrapezoidCompositeShapeTrans->RegisterYourself();
2087 TGeoTranslation* CoolingBlockBoxCompositeShapeTrans =
2088 new TGeoTranslation("CoolingBlockBoxCompositeShapeTrans",
2089 0.5*fgkSSDCoolingBlockLength,
2090 0.5*fgkSSDCoolingBlockWidth,
2091 0.5*fgkSSDCoolingBlockHeight[1]);
2092 CoolingBlockBoxCompositeShapeTrans->RegisterYourself();
2093 TGeoCompositeShape* SSDCoolingBlockShape =
2094 new TGeoCompositeShape("SSDCoolingBlockShape",
2095 "CoolingBlockBoxCompositeShape:CoolingBlockBoxCompositeShapeTrans+"
2096 "CoolingBlockTrapezoidCompositeShape:CoolingBlockTrapezoidCompositeShapeTrans-"
2097 "CoolingTubeHoleShape:CoolingTubeHoleShapeCombiTrans");
2098 TGeoVolume* SSDCoolingBlock = new TGeoVolume("SSDCoolingBlock",
2099 SSDCoolingBlockShape,fgkSSDAlCoolBlockMedium);
2100 return SSDCoolingBlock;
2101}
2102/////////////////////////////////////////////////////////////////////////////////
2103TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunction(Double_t width){
2104////////////////////////////////////////////////////////////////////////////////
2105 const Int_t VertexNumber = 4;
2106 TVector3* Vertex[VertexNumber];
2107 Vertex[0] = new TVector3();
2108 Vertex[1] = new TVector3(fgkCarbonFiberJunctionLength,0.);
2109 Vertex[2] = new TVector3(fgkCarbonFiberJunctionLength
2110 - fgkCarbonFiberJunctionEdge[1]
2111 * TMath::Cos(fgkCarbonFiberJunctionAngle[1]*TMath::DegToRad()),
2112 fgkCarbonFiberJunctionEdge[1]*TMath::Sin(fgkCarbonFiberJunctionAngle[1]
2113 * TMath::DegToRad()));
2114 Vertex[3] = new TVector3(fgkCarbonFiberJunctionEdge[0]
2115 * TMath::Cos(fgkCarbonFiberJunctionAngle[0]*TMath::DegToRad()),
2116 fgkCarbonFiberJunctionEdge[0]
2117 * TMath::Sin(fgkCarbonFiberJunctionAngle[0]*TMath::DegToRad()));
2118 TGeoArb8* CarbonFiberJunctionShapePiece =
2119 new TGeoArb8("CarbonFiberJunctionShapePiece",0.5*width);
2120 //////////////////////////////////
2121 //Setting the vertices in TGeoArb8
2122 //////////////////////////////////
2123 for(Int_t i = 0; i<2*VertexNumber; i++)
2124 CarbonFiberJunctionShapePiece->SetVertex(i,
2125 Vertex[(i < VertexNumber ? i: i-VertexNumber)]->X(),
2126 Vertex[(i < VertexNumber ? i : i-VertexNumber)]->Y());
2127 TGeoRotation* CarbonFiberJunctionRot =
2128 new TGeoRotation("CarbonFiberJunctionRot",
2129 180.,
2130 180.,
2131 180-2.*fgkCarbonFiberJunctionAngle[0]);
2132 TGeoVolume* CarbonFiberJunctionPiece =
2133 new TGeoVolume("CarbonFiberJunctionPiece",
2134 CarbonFiberJunctionShapePiece,fgkSSDCarbonFiberMedium);
2135 TGeoVolume* CarbonFiberJunction =
2136 new TGeoVolumeAssembly("CarbonFiberJunction");
2137 CarbonFiberJunctionPiece->SetLineColor(fColorCarbonFiber);
2138 CarbonFiberJunction->AddNode(CarbonFiberJunctionPiece,1);
2139 CarbonFiberJunction->AddNode(CarbonFiberJunctionPiece,2,CarbonFiberJunctionRot);
2140 return CarbonFiberJunction;
2141}
2142/////////////////////////////////////////////////////////////////////////////////
2143TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberJunctionAssembly(){
2144////////////////////////////////////////////////////////////////////////////////
2145 SetCarbonFiberJunctionCombiTransMatrix();
2146 TGeoVolume* CarbonFiberJunctionAssembly =
2147 new TGeoVolumeAssembly("CarbonFiberJunctionAssembly");
2148 TGeoVolume* CarbonFiberJunction =
2149 GetCarbonFiberJunction(fgkCarbonFiberJunctionWidth);
2150 for(Int_t i=0; i<fgkCarbonFiberJunctionCombiTransNumber;i++)
2151 CarbonFiberJunctionAssembly->AddNode(CarbonFiberJunction,i+1,
2152 CarbonFiberJunctionCombiTransMatrix[i]);
2153 return CarbonFiberJunctionAssembly;
2154}
2155/////////////////////////////////////////////////////////////////////////////////
2156TList* AliITSv11GeometrySSD::GetLadderCableSegment(Double_t SSDEndLadderCableLength){
2157/////////////////////////////////////////////////////////////////////////////////
2158const Int_t LadderCableSegmentNumber = 2;
2159/////////////////////////////////////////
2160// LadderSegmentBBox Volume
2161/////////////////////////////////////////
2162 TGeoBBox* LadderCableSegmentBBoxShape[LadderCableSegmentNumber];
2163 const char* LadderCableSegmentBBoxShapeName[LadderCableSegmentNumber] =
2164 {"LadderCableSegmentBBoxShape1","LadderCableSegmentBBoxShape2"};
2165 for(Int_t i=0; i<LadderCableSegmentNumber; i++) LadderCableSegmentBBoxShape[i] =
2166 new TGeoBBox(LadderCableSegmentBBoxShapeName[i],
2167 0.5*fgkSSDFlexWidth[0],
2168 0.5*fgkSSDLadderCableWidth,
2169 0.5*fgkSSDFlexHeight[i]);
2170 const char* LadderCableSegmentBBoxName[LadderCableSegmentNumber] =
2171 {"LadderCableSegmentBBox1","LadderCableSegmentBBox2"};
2172 TGeoVolume* LadderCableSegmentBBox[LadderCableSegmentNumber];
2173 for(Int_t i=0; i<LadderCableSegmentNumber; i++){
2174 LadderCableSegmentBBox[i] =
2175 new TGeoVolume(LadderCableSegmentBBoxName[i],
2176 LadderCableSegmentBBoxShape[i],
2177 (i==0?fgkSSDAlTraceLadderCableMedium:
2178 fgkSSDKaptonLadderCableMedium));
2179 LadderCableSegmentBBox[i]->SetLineColor(i==0 ? fColorAl :
2180 fColorPolyhamide);
2181 }
2182 TGeoTranslation* LadderCableSegmentBBoxTrans[LadderCableSegmentNumber];
2183 LadderCableSegmentBBoxTrans[0] =
2184 new TGeoTranslation("LadderCableSegmentBBoxTrans1",
2185 0.5*fgkSSDFlexWidth[0],
2186 0.5*fgkSSDLadderCableWidth,
2187 0.5*fgkSSDFlexHeight[0]);
2188 LadderCableSegmentBBoxTrans[1] =
2189 new TGeoTranslation("LadderCableSegmentBBoxTrans2",
2190 0.5*fgkSSDFlexWidth[0],
2191 0.5*fgkSSDLadderCableWidth,
2192 fgkSSDFlexHeight[0]
2193 +0.5*fgkSSDFlexHeight[1]);
2194 TGeoVolume* LadderCableSegmentBBoxAssembly =
2195 new TGeoVolumeAssembly("LadderCableSegmentBBoxAssembly");
2196 for(Int_t i=0; i<LadderCableSegmentNumber; i++)
2197 LadderCableSegmentBBoxAssembly->AddNode(LadderCableSegmentBBox[i],1,
2198 LadderCableSegmentBBoxTrans[i]);
2199/////////////////////////////////////////
2200// LadderSegmentArb8 Volume
2201/////////////////////////////////////////
2202 const Int_t VertexNumber = 4;
2203 TVector3** LadderCableSegmentVertexPosition[LadderCableSegmentNumber];
2204 for(Int_t i = 0; i<LadderCableSegmentNumber; i++) LadderCableSegmentVertexPosition[i] =
2205 new TVector3*[VertexNumber];
2206//Shape Vertex Positioning
2207 for(Int_t i=0; i<LadderCableSegmentNumber; i++){
2208 LadderCableSegmentVertexPosition[i][0] = new TVector3(0.,i*fgkSSDFlexHeight[0]);
2209 LadderCableSegmentVertexPosition[i][1] = new TVector3(fgkSSDLadderCableWidth,
2210 i*fgkSSDFlexHeight[0]);
2211 LadderCableSegmentVertexPosition[i][2] = new TVector3(0.,fgkSSDFlexHeight[0]
2212 + fgkSSDFlexHeight[1]
2213 + i*fgkSSDFlexHeight[0]);
2214 LadderCableSegmentVertexPosition[i][3] =
2215 new TVector3(LadderCableSegmentVertexPosition[i][1]->X(),
2216 LadderCableSegmentVertexPosition[i][2]->Y());
2217 }
2218 Double_t LadderCableSegmentWidth[2][2] = {{fgkSSDFlexHeight[0],fgkSSDFlexHeight[0]},
2219 {fgkSSDFlexHeight[1],fgkSSDFlexHeight[1]}};
2220 char* LadderCableSegmentArbShapeName[LadderCableSegmentNumber] =
2221 {"LadderCableSegmentArbShape1","LadderCableSegmentArbShape2"};
2222 TGeoArb8* LadderCableSegmentArbShape[LadderCableSegmentNumber];
2223 for(Int_t i = 0; i< LadderCableSegmentNumber; i++) LadderCableSegmentArbShape[i] =
2224 GetArbShape(LadderCableSegmentVertexPosition[i],
2225 LadderCableSegmentWidth[i],
2226 fgkCarbonFiberJunctionWidth-fgkSSDFlexWidth[0],
2227 LadderCableSegmentArbShapeName[i]);
2228 const char* LadderCableSegmentArbName[LadderCableSegmentNumber] =
2229 {"LadderCableSegmentArb1","LadderCableSegmentArb2"};
2230 TGeoVolume* LadderCableSegmentArb[LadderCableSegmentNumber];
2231 for(Int_t i=0; i<LadderCableSegmentNumber; i++){
2232 LadderCableSegmentArb[i] =
2233 new TGeoVolume(LadderCableSegmentArbName[i],
2234 LadderCableSegmentArbShape[i],
2235 (i==0?fgkSSDAlTraceLadderCableMedium:
2236 fgkSSDKaptonLadderCableMedium));
2237 LadderCableSegmentArb[i]->SetLineColor(i==0 ? fColorAl :
2238 fColorPolyhamide);
2239}
2240 TGeoRotation* LadderCableSegmentArbRot[LadderCableSegmentNumber];
2241 LadderCableSegmentArbRot[0] = new TGeoRotation("LadderCableSegmentArbRot1",
2242 90.,90,-90.);
2243 LadderCableSegmentArbRot[1] = new TGeoRotation("LadderCableSegmentArbRot2",
2244 0.,90.,0.);
2245 TGeoCombiTrans* LadderCableSegmentArbCombiTrans =
2246 new TGeoCombiTrans("LadderCableSegmentArbCombiTrans",
2247 0.5*(fgkCarbonFiberJunctionWidth-fgkSSDFlexWidth[0])
2248 + fgkSSDFlexWidth[0],0.,0.,
2249 new TGeoRotation((*LadderCableSegmentArbRot[1])
2250 *(*LadderCableSegmentArbRot[0])));
2251 TGeoVolume* LadderCableSegmentArbAssembly =
2252 new TGeoVolumeAssembly("LadderCableSegmentArbAssembly");
2253 for(Int_t i=0; i<LadderCableSegmentNumber; i++)
2254 LadderCableSegmentArbAssembly->AddNode(LadderCableSegmentArb[i],1,
2255 LadderCableSegmentArbCombiTrans);
2256/////////////////////////////////////////
2257// End Ladder Cable Volume
2258/////////////////////////////////////////
2259 TGeoBBox* LadderEndCableSegmentBBoxShape[LadderCableSegmentNumber];
2260 const char* LadderEndCableSegmentBBoxShapeName[LadderCableSegmentNumber] =
2261 {"LadderEndCableSegmentBBoxShape1","LadderEndCableSegmentBBoxShape2"};
2262 for(Int_t i=0; i<LadderCableSegmentNumber; i++) LadderEndCableSegmentBBoxShape[i] =
2263 new TGeoBBox(LadderEndCableSegmentBBoxShapeName[i],
2264 0.5*SSDEndLadderCableLength,
2265 0.5*fgkSSDLadderCableWidth,
2266 0.5*fgkSSDFlexHeight[i]);
2267 const char* LadderEndCableSegmentBBoxName[LadderCableSegmentNumber] =
2268 {"LadderEndCableSegmentBBox1","LadderEndCableSegmentBBox2"};
2269 TGeoVolume* LadderEndCableSegmentBBox[LadderCableSegmentNumber];
2270 for(Int_t i=0; i<LadderCableSegmentNumber; i++){
2271 LadderEndCableSegmentBBox[i] =
2272 new TGeoVolume(LadderEndCableSegmentBBoxName[i],
2273 LadderEndCableSegmentBBoxShape[i],
2274 (i==0?fgkSSDAlTraceLadderCableMedium:
2275 fgkSSDKaptonLadderCableMedium));
2276 LadderEndCableSegmentBBox[i]->SetLineColor(i==0 ? fColorAl :
2277 fColorPolyhamide);
2278 }
2279 TGeoTranslation* LadderEndCableSegmentBBoxTrans[LadderCableSegmentNumber];
2280 LadderEndCableSegmentBBoxTrans[0] =
2281 new TGeoTranslation("LadderEndCableSegmentBBoxTrans0",
2282 0.5*SSDEndLadderCableLength,
2283 0.5*fgkSSDLadderCableWidth,
2284 0.5*fgkSSDFlexHeight[0]);
2285 LadderEndCableSegmentBBoxTrans[1] =
2286 new TGeoTranslation("LadderEndCableSegmentBBoxTrans1",
2287 0.5*SSDEndLadderCableLength,
2288 0.5*fgkSSDLadderCableWidth,
2289 fgkSSDFlexHeight[0]
2290 +0.5*fgkSSDFlexHeight[1]);
2291 TGeoVolume* LadderEndCableSegmentBBoxAssembly =
2292 new TGeoVolumeAssembly("LadderEndCableSegmentBBoxAssembly");
2293 for(Int_t i=0; i<LadderCableSegmentNumber; i++)
2294 LadderEndCableSegmentBBoxAssembly->AddNode(LadderEndCableSegmentBBox[i],1,
2295 LadderEndCableSegmentBBoxTrans[i]);
2296/////////////////////////////////////////
2297 TList* LadderCableSegmentList = new TList();
2298 LadderCableSegmentList->Add(LadderCableSegmentBBoxAssembly);
2299 LadderCableSegmentList->Add(LadderCableSegmentArbAssembly);
2300 LadderCableSegmentList->Add(LadderEndCableSegmentBBoxAssembly);
2301 return LadderCableSegmentList;
2302 }
2303/////////////////////////////////////////////////////////////////////////////////
2304TGeoVolume* AliITSv11GeometrySSD::GetLadderCable(Int_t n, Double_t SSDEndLadderCableLength){
2305/////////////////////////////////////////////////////////////////////////////////
2306 TList* LadderCableSegmentList = GetLadderCableSegment(SSDEndLadderCableLength);
2307 TGeoVolume* LadderCable = new TGeoVolumeAssembly("LadderCable");
2308 for(Int_t i=0; i<n; i++){
2309 TGeoTranslation* LadderCableTrans = new TGeoTranslation(
2310 i*(fgkCarbonFiberJunctionWidth),
2311 fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
2312 i*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
2313 LadderCable->AddNode((TGeoVolume*)LadderCableSegmentList->At(0),i+1,LadderCableTrans);
2314 if(i!=n-1) LadderCable->AddNode((TGeoVolume*)LadderCableSegmentList->At(1),i+1,LadderCableTrans);
2315 }
2316 TGeoTranslation* EndLadderCableTrans = new TGeoTranslation("EndLadderCableTrans",
2317 (n-1)*fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
2318 fgkSSDLadderCableWidth-fgkSSDFlexWidth[0],
2319 (n-1)*(fgkSSDFlexHeight[0]+fgkSSDFlexHeight[1]));
2320 LadderCable->AddNode((TGeoVolume*)LadderCableSegmentList->At(2),1,EndLadderCableTrans);
2321 return LadderCable;
2322}
2323/////////////////////////////////////////////////////////////////////////////////
2324TGeoVolume* AliITSv11GeometrySSD::GetLadderCableAssembly(Int_t n, Double_t SSDEndLadderCableLength){
2325/////////////////////////////////////////////////////////////////////////////////
2326 TGeoVolume* LadderCableAssembly = new TGeoVolumeAssembly("LadderCableAssembly");
2327 char LadderCableTransName[30];
2328 for(Int_t i=0; i<n; i++){
2329 sprintf(LadderCableTransName,"LadderCableTrans%i",i+1);
2330 LadderCableAssembly->AddNode(GetLadderCable(n-i,SSDEndLadderCableLength),i+1,
2331 new TGeoTranslation(LadderCableTransName,i*fgkCarbonFiberJunctionWidth,0.,0.));
2332 }
2333 return LadderCableAssembly;
2334}
2335/////////////////////////////////////////////////////////////////////////////////
2336TList* AliITSv11GeometrySSD::GetLadderCableAssemblyList(Int_t n, Double_t SSDEndLadderCableLength){
2337/////////////////////////////////////////////////////////////////////////////////
2338 const Int_t LadderCableAssemblyNumber = 2;
2339 TGeoVolume* LadderCableAssembly = GetLadderCableAssembly(n,SSDEndLadderCableLength);
2340 TGeoVolume* LadderCable[LadderCableAssemblyNumber];
2341 char LadderCableAssemblyName[30];
2342 TList* LadderCableAssemblyList = new TList();
2343 for(Int_t i=0; i<LadderCableAssemblyNumber; i++){
2344 sprintf(LadderCableAssemblyName,"LadderCableAssembly%i",i+1);
2345 LadderCable[i] = new TGeoVolumeAssembly(LadderCableAssemblyName);
2346 LadderCable[i]->AddNode(LadderCableAssembly,i+1,i==0 ? NULL :
2347 new TGeoCombiTrans((n-1)
2348 * fgkCarbonFiberJunctionWidth+fgkSSDFlexWidth[0],
2349 2.*fgkSSDLadderCableWidth+0.5*fgkSSDFlexWidth[0],
2350 0.,new TGeoRotation("",180,0.,0.)));
2351 LadderCableAssemblyList->Add(LadderCable[i]);
2352}
2353 return LadderCableAssemblyList;
2354}
2355/////////////////////////////////////////////////////////////////////////////////
2356TList* AliITSv11GeometrySSD::GetEndLadderCarbonFiberJunctionAssembly(){
2357////////////////////////////////////////////////////////////////////////////////
2358 const Int_t EndLabberCarbonFiberJunctionNumber = 2;
2359 TGeoVolume* EndLadderCarbonFiberJunctionAssembly[EndLabberCarbonFiberJunctionNumber];
2360 EndLadderCarbonFiberJunctionAssembly[0] =
2361 new TGeoVolumeAssembly("EndLadderCarbonFiberJunctionAssembly1");
2362 EndLadderCarbonFiberJunctionAssembly[1] =
2363 new TGeoVolumeAssembly("EndLadderCarbonFiberJunctionAssembly2");
2364 TGeoVolume** EndLadderCarbonFiberJunction[EndLabberCarbonFiberJunctionNumber];
2365 for(Int_t i=0; i<EndLabberCarbonFiberJunctionNumber; i++)
2366 EndLadderCarbonFiberJunction[i] = new TGeoVolume*[2];
2367 for(Int_t i=0; i<EndLabberCarbonFiberJunctionNumber; i++){
2368 EndLadderCarbonFiberJunction[i][0] =
2369 GetCarbonFiberJunction(fgkEndLadderCarbonFiberLowerJunctionLength[i]);
2370 EndLadderCarbonFiberJunction[i][1] =
2371 GetCarbonFiberJunction(fgkEndLadderCarbonFiberUpperJunctionLength[i]);
2372 }
2373 TList* EndLadderCarbonFiberJunctionList = new TList();
2374 for(Int_t i=0; i<EndLabberCarbonFiberJunctionNumber; i++){
2375 SetEndLadderCarbonFiberJunctionCombiTransMatrix(i);
2376 for(Int_t j=0; j<fgkCarbonFiberJunctionCombiTransNumber; j++)
2377 EndLadderCarbonFiberJunctionAssembly[i]->AddNode(j==2 ?
2378 EndLadderCarbonFiberJunction[i][1] :
2379 EndLadderCarbonFiberJunction[i][0],
2380 j+1,EndLadderCarbonFiberJunctionCombiTransMatrix[j]);
2381 EndLadderCarbonFiberJunctionList->Add(EndLadderCarbonFiberJunctionAssembly[i]);
2382 }
2383 return EndLadderCarbonFiberJunctionList;
2384}
2385////////////////////////////////////////////////////////////////////////////////
2386TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberSupport(){
2387////////////////////////////////////////////////////////////////////////////////
2388 const Int_t VertexNumber = 4;
2389 const Int_t ShapesNumber = 2;
2390 TVector3** VertexPosition[ShapesNumber];
2391 for(Int_t i=0; i<ShapesNumber; i++) VertexPosition[i] = new TVector3*[VertexNumber];
2392 Double_t CarbonFiberSupportXAxisEdgeProj =
2393 fgkCarbonFiberSupportEdgeLength*TMath::Cos(fgkCarbonFiberJunctionAngle[0]
2394 * TMath::DegToRad());
2395 Double_t Theta = TMath::ATan(fgkCarbonFiberSupportYAxisLength
2396 / fgkCarbonFiberSupportXAxisLength);
2397 /////////////////////
2398 //Vertex Positioning
2399 ////////////////////
2400 VertexPosition[0][0] = new TVector3();
2401 VertexPosition[0][1] = new TVector3(fgkCarbonFiberSupportXAxisLength,
2402 fgkCarbonFiberSupportYAxisLength);
2403 VertexPosition[0][2] = new TVector3(CarbonFiberSupportXAxisEdgeProj,
2404 CarbonFiberSupportXAxisEdgeProj
2405 * TMath::Tan(Theta));
2406 VertexPosition[0][3] = new TVector3(fgkCarbonFiberSupportXAxisLength
2407 - CarbonFiberSupportXAxisEdgeProj,
2408 fgkCarbonFiberSupportYAxisLength
2409 - VertexPosition[0][2]->Y());
2410 ////////////////////////////////////////////////////
2411 //Setting the parameters for Isometry Transformation
2412 ////////////////////////////////////////////////////
2413 Double_t SymmetryPlanePosition = (fgkCarbonFiberSupportYAxisLength
2414 + fgkCarbonFiberSupportTopEdgeDist[0]
2415 + fgkCarbonFiberSupportWidth);
2416 Double_t* param = new Double_t[4];
2417 param[0] = 0., param[1] = 1., param[2] = 0., param[3] = -SymmetryPlanePosition;
2418 for(Int_t j=0; j<VertexNumber; j++) VertexPosition[1][j] =
2419 new TVector3((GetReflection(VertexPosition[0][j],param))->X(),
2420 (GetReflection(VertexPosition[0][j],param))->Y());
2421 char* CarbonFiberSupportShapeName[ShapesNumber] =
2422 {"CarbonFiberSupportShape1","CarbonFiberSupportShape2"};
2423 TGeoArb8* CarbonFiberSupportShape[ShapesNumber];
2424 Double_t Width[2] = {fgkCarbonFiberSupportWidth,fgkCarbonFiberSupportWidth};
2425 Double_t CarbonFiberSupportHeight =
2426 CarbonFiberSupportXAxisEdgeProj*TMath::Tan(fgkCarbonFiberJunctionAngle[0]
2427 *TMath::DegToRad());
2428 for(Int_t i = 0; i< ShapesNumber; i++) CarbonFiberSupportShape[i] =
2429 GetArbShape(VertexPosition[i],Width,CarbonFiberSupportHeight,
2430 CarbonFiberSupportShapeName[i],i==0 ? 1: -1);
2431 /////////////////////////////////////
2432 //Setting Translations and Rotations:
2433 /////////////////////////////////////
2434 TGeoTranslation* CarbonFiberSupportTrans =
2435 new TGeoTranslation("CarbonFiberSupportTrans",
2436 0.0,0.0,0.5*CarbonFiberSupportHeight);
2437 CarbonFiberSupportTrans->RegisterYourself();
2438 TGeoRotation* CarbonFiberCompShapeRot[2];
2439 CarbonFiberCompShapeRot[0] = new TGeoRotation("CarbonFiberCompShapeRot1",
2440 0.0,180.0,0.0);
2441 CarbonFiberCompShapeRot[1] = new TGeoRotation("CarbonFiberCompShapeRot2",
2442 90.,-fgkCarbonFiberTriangleAngle,-90.);
2443 Double_t TransVector[3] = {fgkCarbonFiberTriangleLength
2444 * TMath::Cos(fgkCarbonFiberTriangleAngle
2445 * TMath::DegToRad()),0.,-fgkCarbonFiberTriangleLength
2446 * TMath::Sin(fgkCarbonFiberTriangleAngle
2447 * TMath::DegToRad())};
2448 TGeoCombiTrans* CarbonFiberSupportCombiTrans =
2449 new TGeoCombiTrans("CarbonFiberSupportCombiTrans",
2450 TransVector[0],2.*SymmetryPlanePosition
2451 + TransVector[1],TransVector[2],
2452 new TGeoRotation((*CarbonFiberCompShapeRot[1])
2453 * (*CarbonFiberCompShapeRot[0])));
2454 CarbonFiberSupportCombiTrans->RegisterYourself();
2455////////////////////////////////////////////////////////////////////////////////
2456 TGeoCompositeShape* CarbonFiberSupportCompShape =
2457 new TGeoCompositeShape("CarbonFiberSupportCompShape",
2458 "CarbonFiberSupportShape1:CarbonFiberSupportTrans+"
2459 "CarbonFiberSupportShape2:CarbonFiberSupportTrans");
2460 TGeoVolume* CarbonFiberSupport = new TGeoVolume("CarbonFiberSupport",
2461 CarbonFiberSupportCompShape,fgkSSDCarbonFiberMedium);
2462 CarbonFiberSupport->SetLineColor(fColorCarbonFiber);
2463 TGeoVolume* CarbonFiberSupportAssembly =
2464 new TGeoVolumeAssembly("CarbonFiberSupportAssembly");
2465 CarbonFiberSupportAssembly->AddNode(CarbonFiberSupport,1);
2466 CarbonFiberSupportAssembly->AddNode(CarbonFiberSupport,2,
2467 CarbonFiberSupportCombiTrans);
2468 return CarbonFiberSupportAssembly;
2469}
2470////////////////////////////////////////////////////////////////////////////////
2471TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberLowerSupport(Int_t ikind, Bool_t EndLadder){
2472////////////////////////////////////////////////////////////////////////////////
2473 const Int_t VertexNumber = 4;
2474 const Int_t ShapesNumber = 2;
2475 Double_t Width[2] = {fgkCarbonFiberLowerSupportWidth,
2476 fgkCarbonFiberLowerSupportWidth};
2477 TVector3** VertexPosition[ShapesNumber];
2478 for(Int_t i = 0; i<ShapesNumber; i++) VertexPosition[i] =
2479 new TVector3*[VertexNumber];
2480 //First Shape Vertex Positioning
2481 VertexPosition[0][0] = new TVector3(fgkCarbonFiberLowerSupportLowerLenght);
2482 VertexPosition[0][1] = new TVector3(fgkCarbonFiberTriangleLength
2483 - fgkCarbonFiberLowerSupportLowerLenght);
2484 VertexPosition[0][2] = new TVector3();
2485 VertexPosition[0][3] = new TVector3(fgkCarbonFiberTriangleLength);
2486 //Second Shape Vertex Positioning
2487 Double_t Theta = TMath::ATan((fgkCarbonFiberLowerSupportVolumePosition[1]
2488 - fgkCarbonFiberLowerSupportVolumePosition[0])
2489 / fgkCarbonFiberTriangleLength);
2490 VertexPosition[1][0] = new TVector3(VertexPosition[0][0]->X(),
2491 VertexPosition[0][0]->X()*TMath::Tan(Theta)
2492 + fgkCarbonFiberLowerSupportVolumePosition[0]);
2493 VertexPosition[1][1] = new TVector3(VertexPosition[0][1]->X(),
2494 VertexPosition[0][1]->X()*TMath::Tan(Theta)
2495 + fgkCarbonFiberLowerSupportVolumePosition[0]);
2496 VertexPosition[1][2] = new TVector3(0.,fgkCarbonFiberLowerSupportVolumePosition[0]);
2497 VertexPosition[1][3] = new TVector3(fgkCarbonFiberTriangleLength,
2498 fgkCarbonFiberLowerSupportVolumePosition[1]);
2499 char* CarbonFiberLowerSupportName[ShapesNumber] =
2500 {"CarbonFiberLowerSupportShape1","CarbonFiberLowerSupportShape2"};
2501 TGeoArb8* CarbonFiberLowerSupportShape[ShapesNumber];
2502 for(Int_t i = 0; i< ShapesNumber; i++) CarbonFiberLowerSupportShape[i] =
2503 GetArbShape(VertexPosition[i],Width,
2504 fgkCarbonFiberLowerSupportHeight,
2505 CarbonFiberLowerSupportName[i]);
2506 ///////////////////////////////////////////////////////
2507 TGeoTranslation* CarbonFiberLowerSupportTrans[ShapesNumber];
2508 CarbonFiberLowerSupportTrans[0] =
2509 new TGeoTranslation("CarbonFiberLowerSupportTrans1",
2510 0.0,
2511 VertexPosition[1][3]->Y()+VertexPosition[1][2]->Y(),
2512 0.0);
2513 CarbonFiberLowerSupportTrans[1] =
2514 new TGeoTranslation("CarbonFiberLowerSupportTrans2",
2515 0.0,
2516 - VertexPosition[1][3]->Y()-VertexPosition[1][2]->Y(),
2517 0.0);
2518 for(Int_t i = 0; i< ShapesNumber; i++)
2519 CarbonFiberLowerSupportTrans[i]->RegisterYourself();
2520 ///////////////////////////////////////////////////////
2521 TGeoCompositeShape* CarbonFiberLowerSupportCompShape;
2522 if(EndLadder==false)
2523 CarbonFiberLowerSupportCompShape =
2524 new TGeoCompositeShape("CarbonFiberLowerSupportCompShape",
2525 "CarbonFiberLowerSupportShape2+"
2526 "CarbonFiberLowerSupportShape1:CarbonFiberLowerSupportTrans1");
2527 else
2528 if(ikind==0)
2529 CarbonFiberLowerSupportCompShape =
2530 (TGeoCompositeShape*)CarbonFiberLowerSupportShape[0];
2531 else
2532 CarbonFiberLowerSupportCompShape =
2533 new TGeoCompositeShape("CarbonFiberLowerSupportCompShape",
2534 "CarbonFiberLowerSupportShape1+"
2535 "CarbonFiberLowerSupportShape1:CarbonFiberLowerSupportTrans1");
2536 TGeoVolume* CarbonFiberLowerSupport = new TGeoVolume("CarbonFiberLowerSupport",
2537 CarbonFiberLowerSupportCompShape,fgkSSDCarbonFiberMedium);
2538 CarbonFiberLowerSupport->SetLineColor(fColorCarbonFiber);
2539 return CarbonFiberLowerSupport;
2540}
2541////////////////////////////////////////////////////////////////////////////////
2542TGeoVolume* AliITSv11GeometrySSD::GetCarbonFiberAssemblySupport(){
2543////////////////////////////////////////////////////////////////////////////////
2544 SetCarbonFiberAssemblyCombiTransMatrix();
2545 TGeoVolume* CarbonFiberAssemblySupport =
2546 new TGeoVolumeAssembly("CarbonFiberAssembly");
2547 TGeoVolume* CarbonFiberAssemblyVolumes[fgkCarbonFiberAssemblyCombiTransNumber];
2548 CarbonFiberAssemblyVolumes[0] = GetCarbonFiberJunctionAssembly();
2549 CarbonFiberAssemblyVolumes[1] = GetCarbonFiberSupport();
2550 CarbonFiberAssemblyVolumes[2] = GetCarbonFiberLowerSupport();
2551 for(Int_t i=0; i<fgkCarbonFiberAssemblyCombiTransNumber;i++)
2552 CarbonFiberAssemblySupport->AddNode(CarbonFiberAssemblyVolumes[i],1,
2553 CarbonFiberAssemblyCombiTransMatrix[i]);
2554 return CarbonFiberAssemblySupport;
2555}
2556////////////////////////////////////////////////////////////////////////////////
2557TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupport(){
2558////////////////////////////////////////////////////////////////////////////////
2559 const Int_t VertexNumber = 3;
2560 Double_t Phi = TMath::ASin(0.5*fgkCoolingTubeSupportHeight
2561 / fgkCoolingTubeSupportRmax)*TMath::RadToDeg();
2562 /* TGeoTubeSeg* CoolingTubeSegShape = */
2563 new TGeoTubeSeg("CoolingTubeSegShape",0.0,
2564 fgkCoolingTubeSupportRmax,
2565 0.5*fgkCoolingTubeSupportWidth,Phi,
2566 360-Phi);
2567 /* TGeoTube* CoolingTubeHoleShape = */
2568 new TGeoTube("CoolingTubeHoleShape",0.0,
2569 fgkCoolingTubeSupportRmin,
2570 0.5*fgkCoolingTubeSupportWidth);
2571 TVector3* VertexPosition[VertexNumber];
2572 ///////////////////////////
2573 //Shape Vertex Positioning
2574 ///////////////////////////
2575 VertexPosition[0] = new TVector3();
2576 VertexPosition[1] = new TVector3(fgkCoolingTubeSupportRmax
2577 * TMath::Cos(Phi*TMath::DegToRad()),
2578 fgkCoolingTubeSupportRmax
2579 * TMath::Sin(Phi*TMath::DegToRad()));
2580 VertexPosition[2] = new TVector3(VertexPosition[1]->X(),
2581 - VertexPosition[1]->Y());
2582 /* TGeoArb8* CoolingTubeTriangleShape = */ GetTriangleShape(VertexPosition,
2583 fgkCoolingTubeSupportWidth,
2584 "CoolingTubeTriangleShape");
2585 Double_t* BoxOrigin = new Double_t[3];
2586 Double_t BoxLength = fgkCoolingTubeSupportLength-fgkCoolingTubeSupportRmax
2587 - VertexPosition[1]->X();
2588 BoxOrigin[0] = VertexPosition[1]->X()+0.5*BoxLength, BoxOrigin[1] = BoxOrigin[2] = 0.;
2589 /* TGeoBBox* CoolingTubeBoxShape = */
2590 new TGeoBBox("CoolingTubeBoxShape",0.5*BoxLength,
2591 0.5*fgkCoolingTubeSupportHeight,
2592 0.5*fgkCoolingTubeSupportWidth,BoxOrigin);
2593 TGeoCompositeShape* CoolingTubeSupportShape =
2594 new TGeoCompositeShape("CoolingTubeSupportShape",
2595 "(CoolingTubeSegShape+CoolingTubeTriangleShape"
2596 "+CoolingTubeBoxShape)-CoolingTubeHoleShape");
2597 TGeoVolume* CoolingTubeSupport = new TGeoVolume("CoolingTubeSupport",
2598 CoolingTubeSupportShape,fgkSSDTubeHolderMedium);
2599 return CoolingTubeSupport;
2600}
2601////////////////////////////////////////////////////////////////////////////////
2602TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeSupportAssembly(){
2603////////////////////////////////////////////////////////////////////////////////
2604 TGeoVolume* CoolingTubeSupportAssembly =
2605 new TGeoVolumeAssembly("CoolingTubeSupportAssembly");
2606 TGeoVolume* CoolingTubeSupport = GetCoolingTubeSupport();
2607 SetCoolingTubeSupportCombiTransMatrix();
2608 for(Int_t i=0; i<fgkCoolingTubeSupportCombiTransNumber;i++)
2609 CoolingTubeSupportAssembly->AddNode(CoolingTubeSupport,i+1,
2610 CoolingTubeSupportCombiTransMatrix[i]);
2611 return CoolingTubeSupportAssembly;
2612}
2613////////////////////////////////////////////////////////////////////////////////
2614TGeoVolume* AliITSv11GeometrySSD::GetCoolingTube(){
2615////////////////////////////////////////////////////////////////////////////////
2616 TGeoVolume* CoolingTubeAssembly = new TGeoVolumeAssembly("CoolingTubeAssembly");
2617 TGeoTube *CoolingTubeShape = new TGeoTube("CoolingTubeShape", fgkCoolingTubeRmin,
2618 fgkCoolingTubeRmax, fgkCoolingTubeLength/2.0);
2619 TGeoVolume* CoolingTube = new TGeoVolume("CoolingTube",
2620 CoolingTubeShape,fgkSSDCoolingTubePhynox);
2621 TGeoTube *CoolingTubeInteriorShape = new TGeoTube("CoolingTubeInteriorShape",
2622 0, fgkCoolingTubeRmin,
2623 fgkCoolingTubeLength/2.0);
2624 TGeoVolume *CoolingTubeInterior = new TGeoVolume("CoolingTubeInterior",
2625 CoolingTubeInteriorShape,fgkSSDCoolingTubeWater);
2626 CoolingTubeAssembly->AddNode(CoolingTube,1);
2627 CoolingTubeAssembly->AddNode(CoolingTubeInterior,2);
2628 return CoolingTubeAssembly;
2629}
2630////////////////////////////////////////////////////////////////////////////////
2631TGeoVolume* AliITSv11GeometrySSD::GetCoolingTubeAssembly(){
2632////////////////////////////////////////////////////////////////////////////////
2633 TGeoVolume* CoolingTubeAssembly = new TGeoVolumeAssembly("CoolingTubeAssembly");
2634 TGeoVolume* CoolingTube = GetCoolingTube();
2635 SetCoolingTubeCombiTransMatrix();
2636 for(Int_t i=0; i<fgkCoolingTubeCombiTransNumber;i++)
2637 CoolingTubeAssembly->AddNode(CoolingTube,i+1,CoolingTubeTransMatrix[i]);
2638 return CoolingTubeAssembly;
2639}
2640////////////////////////////////////////////////////////////////////////////////
2641TGeoVolume* AliITSv11GeometrySSD::GetLadderSegment(Int_t iChipCablesHeight){
2642////////////////////////////////////////////////////////////////////////////////
2643 TGeoVolume* LadderSegment = new TGeoVolumeAssembly("LadderSegment");
2644 TGeoVolume* LadderSegmentVolumes[fgkLadderSegmentCombiTransNumber];
2645 LadderSegmentVolumes[0] = GetCarbonFiberAssemblySupport();
2646 LadderSegmentVolumes[1] = GetSSDModule(iChipCablesHeight);
2647 LadderSegmentVolumes[2] = GetSSDSensorSupportAssembly(iChipCablesHeight);
2648 LadderSegmentVolumes[3] = GetCoolingTubeSupportAssembly();
2649 LadderSegmentVolumes[4] = GetCoolingTubeAssembly();
2650 SetLadderSegmentCombiTransMatrix();
2651 for(Int_t i=0; i<fgkLadderSegmentCombiTransNumber; i++)
2652 LadderSegment->AddNode(LadderSegmentVolumes[i],1,
2653 LadderSegmentCombiTransMatrix[i]);
2654 return LadderSegment;
2655}
2656////////////////////////////////////////////////////////////////////////////////
2657TList* AliITSv11GeometrySSD::GetEndLadderSegment(){
2658////////////////////////////////////////////////////////////////////////////////
2659 const Int_t EndLadderSegmentNumber = 2;
2660 TList* EndLadderCarbonFiberJunctionList = GetEndLadderCarbonFiberJunctionAssembly();
2661 TGeoVolume* EndLadderSegment[EndLadderSegmentNumber];
2662 EndLadderSegment[0] = new TGeoVolumeAssembly("EndLadderSegment1");
2663 EndLadderSegment[1] = new TGeoVolumeAssembly("EndLadderSegment2");
2664 TGeoVolume** LadderSegmentVolumes[EndLadderSegmentNumber];
2665 const Int_t LadderSegmentVolumeNumber = 4;
2666 for(Int_t i=0; i<EndLadderSegmentNumber; i++) LadderSegmentVolumes[i] =
2667 new TGeoVolume*[LadderSegmentVolumeNumber];
2668 LadderSegmentVolumes[0][0] = (TGeoVolume*)EndLadderCarbonFiberJunctionList->At(0);
2669 LadderSegmentVolumes[0][1] = GetCarbonFiberSupport();
2670 LadderSegmentVolumes[0][2] = GetSSDMountingBlock();
2671 LadderSegmentVolumes[0][3] = GetCarbonFiberLowerSupport(0,true);
2672 LadderSegmentVolumes[1][0] = (TGeoVolume*)EndLadderCarbonFiberJunctionList->At(1);
2673 LadderSegmentVolumes[1][1] = LadderSegmentVolumes[0][1];
2674 LadderSegmentVolumes[1][2] = LadderSegmentVolumes[0][2];
2675 LadderSegmentVolumes[1][3] = GetCarbonFiberLowerSupport(1,true);
2676 TList* EndLadderSegmentList = new TList();
2677 for(Int_t i=0; i<EndLadderSegmentNumber; i++){
2678 SetEndLadderSegmentCombiTransMatrix(i);
2679 for(Int_t j=0; j<LadderSegmentVolumeNumber; j++)
2680 EndLadderSegment[i]->AddNode(LadderSegmentVolumes[i][j],1,
2681 EndLadderSegmentCombiTransMatrix[j]);
2682 EndLadderSegmentList->Add(EndLadderSegment[i]);
2683 }
2684 return EndLadderSegmentList;
2685}
2686////////////////////////////////////////////////////////////////////////////////
2687TGeoVolume* AliITSv11GeometrySSD::GetSSDMountingBlock(){
2688////////////////////////////////////////////////////////////////////////////////
2689 // Mounting Block Boxes Shapes
2690 ///////////////////////////////////////
2691 const Int_t MountingBlockBoxNumber = 3;
2692 TGeoBBox* MountingBlockBoxShape[MountingBlockBoxNumber];
2693 MountingBlockBoxShape[0] = new TGeoBBox("MountingBlockBoxShape0",
2694 0.25*(fgkSSDMountingBlockLength[0]
2695 - fgkSSDMountingBlockLength[1]),
2696 0.5*fgkSSDMountingBlockWidth,
2697 0.5*fgkSSDMountingBlockHeight[0]);
2698 MountingBlockBoxShape[1] = new TGeoBBox("MountingBlockBoxShape1",
2699 0.25*(fgkSSDMountingBlockLength[1]
2700 - fgkSSDMountingBlockLength[2]),
2701 0.5*fgkSSDMountingBlockWidth,
2702 0.5*(fgkSSDMountingBlockHeight[1]
2703 - fgkSSDMountingBlockHeight[3]));
2704 MountingBlockBoxShape[2] = new TGeoBBox("MountingBlockBoxShape2",
2705 0.5*fgkSSDMountingBlockLength[2],
2706 0.5*fgkSSDMountingBlockWidth,
2707 0.5*(fgkSSDMountingBlockHeight[2]
2708 - fgkSSDMountingBlockHeight[3]));
2709 TGeoTranslation* MountingBlockBoxTrans[MountingBlockBoxNumber+2];
2710 MountingBlockBoxTrans[0] = new TGeoTranslation("MountingBlockBoxTrans0",0.,0.,0.);
2711 MountingBlockBoxTrans[1] = new TGeoTranslation("MountingBlockBoxTrans1",
2712 MountingBlockBoxShape[0]->GetDX()
2713 + MountingBlockBoxShape[1]->GetDX(),
2714 0.0,
2715 MountingBlockBoxShape[1]->GetDZ()
2716 - MountingBlockBoxShape[0]->GetDZ()
2717 + fgkSSDMountingBlockHeight[3]);
2718 MountingBlockBoxTrans[2] = new TGeoTranslation("MountingBlockBoxTrans2",
2719 MountingBlockBoxShape[0]->GetDX()
2720 + 2.*MountingBlockBoxShape[1]->GetDX()
2721 + MountingBlockBoxShape[2]->GetDX(),
2722 0.0,
2723 MountingBlockBoxShape[2]->GetDZ()
2724 - MountingBlockBoxShape[0]->GetDZ()
2725 + fgkSSDMountingBlockHeight[3]);
2726 MountingBlockBoxTrans[3] = new TGeoTranslation("MountingBlockBoxTrans3",
2727 MountingBlockBoxShape[0]->GetDX()
2728 + MountingBlockBoxShape[1]->GetDX()
2729 + 2.*(MountingBlockBoxShape[1]->GetDX()
2730 + MountingBlockBoxShape[2]->GetDX()),
2731 0.0,
2732 MountingBlockBoxShape[1]->GetDZ()
2733 - MountingBlockBoxShape[0]->GetDZ()
2734 + fgkSSDMountingBlockHeight[3]);
2735 MountingBlockBoxTrans[4] = new TGeoTranslation("MountingBlockBoxTrans4",
2736 2.*(MountingBlockBoxShape[0]->GetDX()
2737 + 2.*MountingBlockBoxShape[1]->GetDX()
2738 + MountingBlockBoxShape[2]->GetDX()),
2739 0.0,
2740 0.0);
2741 for(Int_t i=0; i<MountingBlockBoxNumber+2; i++)
2742 MountingBlockBoxTrans[i]->RegisterYourself();
2743 ///////////////////////////////////////
2744 // Mounting Block Trapezoid Hole Shapes
2745 ///////////////////////////////////////
2746 const Int_t HoleTrapezoidVertexNumber = 4;
2747 TVector3* HoleTrapezoidVertex[HoleTrapezoidVertexNumber];
2748 HoleTrapezoidVertex[0] = new TVector3();
2749 HoleTrapezoidVertex[1] = new TVector3(fgkSSDMountingBlockHoleTrapezoidHeight);
2750 HoleTrapezoidVertex[2] = new TVector3(*HoleTrapezoidVertex[0]);
2751 HoleTrapezoidVertex[3] = new TVector3(*HoleTrapezoidVertex[1]);
2752 Double_t HoleTrapezoidWidth[2] = {fgkSSDMountingBlockHoleTrapezoidUpBasis
2753 + 2.*MountingBlockBoxShape[1]->GetDX()
2754 * TMath::Tan(fgkSSDMountingBlockHoleTrapezoidAngle
2755 * TMath::DegToRad()),
2756 fgkSSDMountingBlockHoleTrapezoidUpBasis};
2757 /* TGeoArb8* HoleTrapezoidShape =*/ GetArbShape(HoleTrapezoidVertex,
2758 HoleTrapezoidWidth,
2759 2.*MountingBlockBoxShape[1]->GetDX(),
2760 "HoleTrapezoidShape");
2761 TGeoRotation* HoleTrapezoidShapeRot[2];
2762 HoleTrapezoidShapeRot[0] = new TGeoRotation("HoleTrapezoidShapeRot0",
2763 90.,-90.,-90.);
2764 HoleTrapezoidShapeRot[1] = new TGeoRotation("HoleTrapezoidShapeRot1",
2765 -180.,0.,0.);
2766 TGeoCombiTrans* HoleTrapezoidShapeCombiTrans =
2767 new TGeoCombiTrans("HoleTrapezoidShapeCombiTrans",
2768 MountingBlockBoxShape[0]->GetDX()
2769 + 3.*MountingBlockBoxShape[1]->GetDX()
2770 + 2.*MountingBlockBoxShape[2]->GetDX(),
2771 0.5*fgkSSDMountingBlockWidth,
2772 - fgkSSDMountingBlockHoleTrapezoidHeight
2773 + 2.*MountingBlockBoxShape[1]->GetDZ()
2774 - MountingBlockBoxShape[0]->GetDZ()
2775 + fgkSSDMountingBlockHeight[3],
2776 new TGeoRotation((*HoleTrapezoidShapeRot[1])
2777 * (*HoleTrapezoidShapeRot[0])));
2778 HoleTrapezoidShapeCombiTrans->RegisterYourself();
2779 ///////////////////////////////////
2780 // Mounting Block Screw Hole Shapes
2781 ///////////////////////////////////
2782 const Int_t MountingBlockTubeNumber = 2;
2783 TGeoTube* MountingBlockTubeShape[MountingBlockTubeNumber];
2784 MountingBlockTubeShape[0] = new TGeoTube("MountingBlockTubeShape0",0.0,
2785 fgkSSDMountingBlockHoleRadius,
2786 MountingBlockBoxShape[0]->GetDZ());
2787 MountingBlockTubeShape[1] = new TGeoTube("MountingBlockTubeShape1",0.0,
2788 fgkSSDMountingBlockHoleRadius,
2789 MountingBlockBoxShape[2]->GetDZ());
2790 TGeoTranslation* MountingBlockTubeTrans[2*MountingBlockTubeNumber];
2791 MountingBlockTubeTrans[0] = new TGeoTranslation("MountingBlockTubeTrans0",
2792 - 0.5*(fgkSSDMountingBlockLength[0]
2793 - fgkSSDMountingBlockHoleTubeLength[0]),
2794 0.5*fgkSSDMountingBlockWidth
2795 - fgkSSDMountingBlockHoleTubeWidth[0],0.);
2796 MountingBlockTubeTrans[1] = new TGeoTranslation("MountingBlockTubeTrans1",
2797 - 0.5*(fgkSSDMountingBlockLength[0]
2798 - fgkSSDMountingBlockHoleTubeLength[0])
2799 + fgkSSDMountingBlockHoleTubeLength[0],
2800 - 0.5*fgkSSDMountingBlockWidth
2801 + fgkSSDMountingBlockHoleTubeWidth[0],
2802 0.);
2803 MountingBlockTubeTrans[2] = new TGeoTranslation("MountingBlockTubeTrans2",
2804 - MountingBlockBoxShape[0]->GetDX()
2805 + 0.5*fgkSSDMountingBlockLength[0]
2806 - fgkSSDMountingBlockHoleTubeLength[1],
2807 0.5*fgkSSDMountingBlockWidth
2808 - fgkSSDMountingBlockHoleTubeWidth[0],
2809 MountingBlockBoxShape[2]->GetDZ()
2810 - MountingBlockBoxShape[0]->GetDZ()
2811 + fgkSSDMountingBlockHeight[3]);
2812 MountingBlockTubeTrans[3] = new TGeoTranslation("MountingBlockTubeTrans3",
2813 - MountingBlockBoxShape[0]->GetDX()
2814 + 0.5*fgkSSDMountingBlockLength[0],
2815 - 0.5*fgkSSDMountingBlockWidth
2816 + fgkSSDMountingBlockHoleTubeWidth[1],
2817 MountingBlockBoxShape[2]->GetDZ()
2818 - MountingBlockBoxShape[0]->GetDZ()
2819 + fgkSSDMountingBlockHeight[3]);
2820 for(Int_t i=0; i<2*MountingBlockTubeNumber; i++)
2821 MountingBlockTubeTrans[i]->RegisterYourself();
2822 /* TGeoCompositeShape* MountingBlockMainShape = */
2823 new TGeoCompositeShape("MountingBlockMainShape",
2824 "MountingBlockBoxShape0:MountingBlockBoxTrans0+"
2825 "MountingBlockBoxShape1:MountingBlockBoxTrans1+"
2826 "MountingBlockBoxShape2:MountingBlockBoxTrans2+"
2827 "MountingBlockBoxShape1:MountingBlockBoxTrans3+"
2828 "MountingBlockBoxShape0:MountingBlockBoxTrans4");
2829 ////////////////////////////////////////////
2830 // Mounting Block Screw Composite Hole Shapes
2831 ////////////////////////////////////////////
2832 const Int_t MountingBlockHoleTubeSegNumber = 4;
2833 /* TGeoTubeSeg* MountingBlockHoleTubeSegShape = */
2834 new TGeoTubeSeg("MountingBlockHoleTubeSegShape",
2835 0.0,
2836 fgkSSDMountingBlockScrewHoleRadius[0],
2837 0.5*fgkSSDMountingBlockScrewHoleHeigth,-90.,180.);
2838 TGeoCombiTrans* MountingBlockHoleTubeSegCombiTrans[MountingBlockHoleTubeSegNumber];
2839 char* MountingBlockHoleTubeSegCombiTransName[MountingBlockHoleTubeSegNumber] =
2840 { "MountingBlockHoleTubeSegCombiTrans0",
2841 "MountingBlockHoleTubeSegCombiTrans1",
2842 "MountingBlockHoleTubeSegCombiTrans2",
2843 "MountingBlockHoleTubeSegCombiTrans3"};
2844 for(Int_t i=0; i<MountingBlockHoleTubeSegNumber; i++){
2845 MountingBlockHoleTubeSegCombiTrans[i] =
2846 new TGeoCombiTrans(MountingBlockHoleTubeSegCombiTransName[i],
2847 0.5*fgkSSDMountingBlockScrewHoleEdge*TMath::Sqrt(2)
2848 * TMath::Cos(45*(2*i+1)*TMath::DegToRad()),
2849 0.5*fgkSSDMountingBlockScrewHoleEdge*TMath::Sqrt(2)
2850 * TMath::Sin(45*(2*i+1)*TMath::DegToRad()),
2851 0.0,
2852 new TGeoRotation("",90.*i,0.,0.));
2853 MountingBlockHoleTubeSegCombiTrans[i]->RegisterYourself();
2854 }
2855 TGeoBBox* MountingBlockHoleBoxShape =
2856 new TGeoBBox("MountingBlockHoleBoxShape",
2857 0.5*fgkSSDMountingBlockScrewHoleEdge,
2858 0.5*fgkSSDMountingBlockScrewHoleEdge,
2859 0.5*fgkSSDMountingBlockScrewHoleHeigth);
2860 TGeoCompositeShape* MountingBlockScrewHole[2];
2861 MountingBlockScrewHole[0] =
2862 new TGeoCompositeShape("MountingBlockScrewHole0",
2863 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans0+"
2864 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans1+"
2865 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans2+"
2866 "MountingBlockHoleTubeSegShape:MountingBlockHoleTubeSegCombiTrans3+"
2867 "MountingBlockHoleBoxShape");
2868 /* TGeoTubeSeg* MountingBlockLowerHoleTubeSegShape = */
2869 new TGeoTubeSeg("MountingBlockLowerHoleTubeSegShape",
2870 0.0,
2871 fgkSSDMountingBlockScrewHoleRadius[1],
2872 0.5*(fgkSSDMountingBlockHoleTubeWidth[0]
2873 - fgkSSDMountingBlockScrewHoleHeigth
2874 - fgkSSDMountingBlockHeight[3]),0.,90.);
2875 TGeoCombiTrans* MountingBlockLowerHoleTubeSegCombiTrans[MountingBlockHoleTubeSegNumber];
2876 char* MountingBlockLowerHoleTubeSegCombiTransName[MountingBlockHoleTubeSegNumber] =
2877 { "MountingBlockLowerHoleTubeSegCombiTrans0",
2878 "MountingBlockLowerHoleTubeSegCombiTrans1",
2879 "MountingBlockLowerHoleTubeSegCombiTrans2",
2880 "MountingBlockLowerHoleTubeSegCombiTrans3"};
2881 for(Int_t i=0; i<MountingBlockHoleTubeSegNumber; i++){
2882 MountingBlockLowerHoleTubeSegCombiTrans[i] =
2883 new TGeoCombiTrans(MountingBlockLowerHoleTubeSegCombiTransName[i],
2884 0.5*(fgkSSDMountingBlockScrewHoleEdge
2885 - 2.*fgkSSDMountingBlockScrewHoleRadius[1])
2886 * TMath::Sqrt(2)*TMath::Cos(45*(2*i+1)*TMath::DegToRad()),
2887 0.5*(fgkSSDMountingBlockScrewHoleEdge
2888 - 2.0*fgkSSDMountingBlockScrewHoleRadius[1])
2889 * TMath::Sqrt(2)*TMath::Sin(45*(2*i+1)*TMath::DegToRad()),0.,
2890 new TGeoRotation("",90.*i,0.,0.));
2891 MountingBlockLowerHoleTubeSegCombiTrans[i]->RegisterYourself();
2892 }
2893 Double_t fgkSSDMountingBlockLowerScrewHoleEdge = fgkSSDMountingBlockScrewHoleEdge
2894 - 2.*fgkSSDMountingBlockScrewHoleRadius[1];
2895 TGeoBBox* MountingBlockLowerHoleBoxShape[2];
2896 MountingBlockLowerHoleBoxShape[0] =
2897 new TGeoBBox("MountingBlockLowerHoleBoxShape0",
2898 0.5*fgkSSDMountingBlockLowerScrewHoleEdge,
2899 0.5*fgkSSDMountingBlockLowerScrewHoleEdge,
2900 0.5*(fgkSSDMountingBlockHoleTubeWidth[0]
2901 - fgkSSDMountingBlockScrewHoleHeigth
2902 - fgkSSDMountingBlockHeight[3]));
2903 MountingBlockLowerHoleBoxShape[1] =
2904 new TGeoBBox("MountingBlockLowerHoleBoxShape1",
2905 0.5*fgkSSDMountingBlockLowerScrewHoleEdge,
2906 0.5*fgkSSDMountingBlockScrewHoleRadius[1],
2907 0.5*(fgkSSDMountingBlockHoleTubeWidth[0]
2908 - fgkSSDMountingBlockScrewHoleHeigth
2909 - fgkSSDMountingBlockHeight[3]));
2910 TGeoCombiTrans* MountingBlockLowerHoleBoxCombiTrans[MountingBlockHoleTubeSegNumber];
2911 char* MountingBlockLowerHoleBoxCombiTransName[MountingBlockHoleTubeSegNumber] =
2912 { "MountingBlockLowerHoleBoxCombiTrans0",
2913 "MountingBlockLowerHoleBoxCombiTrans1",
2914 "MountingBlockLowerHoleBoxCombiTrans2",
2915 "MountingBlockLowerHoleBoxCombiTrans3"};
2916 for(Int_t i=0; i<MountingBlockHoleTubeSegNumber; i++){
2917 MountingBlockLowerHoleBoxCombiTrans[i] =
2918 new TGeoCombiTrans(MountingBlockLowerHoleBoxCombiTransName[i],
2919 0.5*(fgkSSDMountingBlockLowerScrewHoleEdge
2920 + fgkSSDMountingBlockScrewHoleRadius[1])
2921 * TMath::Cos(90*(i+1)*TMath::DegToRad()),
2922 0.5*(fgkSSDMountingBlockLowerScrewHoleEdge
2923 + fgkSSDMountingBlockScrewHoleRadius[1])
2924 * TMath::Sin(90*(i+1)*TMath::DegToRad()),0.,
2925 new TGeoRotation("",90.*i,0.,0.));
2926 MountingBlockLowerHoleBoxCombiTrans[i]->RegisterYourself();
2927 }
2928 MountingBlockScrewHole[1] = new TGeoCompositeShape("MountingBlockScrewHole1",
2929 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans0+"
2930 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans1+"
2931 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans2+"
2932 "MountingBlockLowerHoleTubeSegShape:MountingBlockLowerHoleTubeSegCombiTrans3+"
2933 "MountingBlockLowerHoleBoxShape0+"
2934 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans0+"
2935 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans1+"
2936 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans2+"
2937 "MountingBlockLowerHoleBoxShape1:MountingBlockLowerHoleBoxCombiTrans3");
2938 TGeoTranslation* MountingBlockScrewHole1Trans =
2939 new TGeoTranslation("MountingBlockScrewHole1Trans",0.,0.,
2940 - MountingBlockLowerHoleBoxShape[0]->GetDZ()
2941 - MountingBlockHoleBoxShape->GetDZ());
2942 MountingBlockScrewHole1Trans->RegisterYourself();
2943 /* TGeoCompositeShape* MountingBlockHole = */
2944 new TGeoCompositeShape("MountingBlockHole",
2945 "MountingBlockScrewHole0+MountingBlockScrewHole1:MountingBlockScrewHole1Trans");
2946 TGeoTranslation* MountingBlockHoleTrans = new TGeoTranslation("MountingBlockHoleTrans",
2947 0.5*fgkSSDMountingBlockLength[0]
2948 - MountingBlockBoxShape[0]->GetDZ(),
2949 0.0,
2950 2.*MountingBlockBoxShape[2]->GetDZ()
2951 - MountingBlockBoxShape[0]->GetDZ()
2952 + fgkSSDMountingBlockHeight[3]
2953 - MountingBlockHoleBoxShape->GetDZ());
2954 MountingBlockHoleTrans->RegisterYourself();
2955 TGeoCompositeShape* MountingBlockShape = new TGeoCompositeShape("MountingBlockShape",
2956 "MountingBlockMainShape-(MountingBlockTubeShape0:MountingBlockTubeTrans0+"
2957 "MountingBlockTubeShape0:MountingBlockTubeTrans1+"
2958 "MountingBlockTubeShape1:MountingBlockTubeTrans2+"
2959 "MountingBlockTubeShape1:MountingBlockTubeTrans3+"
2960 "HoleTrapezoidShape:HoleTrapezoidShapeCombiTrans+"
2961 "MountingBlockHole:MountingBlockHoleTrans)");
2962 TGeoVolume* SSDMountingBlock = new TGeoVolume("SSDMountingBlock",
2963 MountingBlockShape,fgkSSDMountingBlockMedium);
2964 return SSDMountingBlock;
2965}
2966////////////////////////////////////////////////////////////////////////////////
2967TGeoVolume* AliITSv11GeometrySSD::GetLadder(Int_t iLayer){
2968 TGeoVolume* Ladder = new TGeoVolumeAssembly(iLayer==5 ? "ITSssdLay5Ladd"
2969 : "ITSssdLay6Ladd");
2970 TGeoVolume* LadderSegment[2];
2971 LadderSegment[0] = GetLadderSegment(0);
2972 LadderSegment[1] = GetLadderSegment(1);
2973 TList* EndLadderSegmentList = GetEndLadderSegment();
2974 Double_t BeamAxisTransVector = fgkCarbonFiberJunctionWidth;
2975 Int_t SSDLaySensorsNumber = (iLayer==5 ?
2976 fgkSSDLay5SensorsNumber :
2977 fgkSSDLay6SensorsNumber);
2978 for(Int_t i=0; i<SSDLaySensorsNumber; i++) Ladder->AddNode(i%2==0 ?
2979 LadderSegment[iLayer==5 ? 0 : 1] :
2980 LadderSegment[iLayer==5 ? 1 : 0],
2981 SSDLaySensorsNumber-i,new TGeoTranslation("",-0.5*fgkCarbonFiberTriangleLength,
2982 BeamAxisTransVector*i,0.));
2983 Ladder->AddNode((TGeoVolume*)EndLadderSegmentList->At(0),1,
2984 new TGeoTranslation("",-0.5*fgkCarbonFiberTriangleLength,
2985 fgkCarbonFiberJunctionWidth*SSDLaySensorsNumber,0.));
2986 Ladder->AddNode((TGeoVolume*)EndLadderSegmentList->At(1),1,
2987 new TGeoCombiTrans("",0.5*fgkCarbonFiberTriangleLength,
2988 0.,0.,new TGeoRotation("",180.,0.,0.)));
2989/////////////////////////////////////////////////////////////////////////////
2990/// Placing Ladder Cables
2991/////////////////////////////////////////////////////////////////////////////
2992 SetLadderCableCombiTransMatrix(iLayer);
2993 Int_t SideCableNumber[2] = {0,0};
2994 switch(iLayer){
2995 case 5:
2996 SideCableNumber[0] = fgkSSDLay5SensorsNumber/2+1;
2997 SideCableNumber[1] = SideCableNumber[0]-2;
2998 break;
2999 case 6:
3000 SideCableNumber[0] = (fgkSSDLay6SensorsNumber-1)/2+1;
3001 SideCableNumber[1] = SideCableNumber[0]-1;
3002 break;
3003 }
3004 const Double_t* CarbonFiberToModulePosition =
3005 LadderSegmentCombiTransMatrix[1]->GetTranslation();
3006 Double_t SSDEndLadderCableLength[4];
3007 SSDEndLadderCableLength[0] = CarbonFiberToModulePosition[1]
3008 + fgkSSDSensorLength
3009 - fgkSSDModuleStiffenerPosition[1]
3010 - fgkSSDStiffenerWidth
3011 - fgkSSDFlexWidth[0]
3012 + fgkEndLadderCarbonFiberLowerJunctionLength[1];
3013 SSDEndLadderCableLength[1] = CarbonFiberToModulePosition[1]
3014 + fgkSSDModuleStiffenerPosition[1]
3015 + fgkSSDStiffenerWidth
3016 + fgkEndLadderCarbonFiberLowerJunctionLength[1];
3017 SSDEndLadderCableLength[2] = SSDEndLadderCableLength[1]
3018 - fgkEndLadderCarbonFiberLowerJunctionLength[1]
3019 + fgkEndLadderCarbonFiberLowerJunctionLength[0];
3020 SSDEndLadderCableLength[3] = fgkCarbonFiberJunctionWidth-(fgkSSDSensorLength
3021 + CarbonFiberToModulePosition[1]
3022 - fgkSSDModuleStiffenerPosition[1]
3023 - fgkSSDStiffenerWidth)
3024 + fgkEndLadderCarbonFiberLowerJunctionLength[1];
3025 TList* LadderCableAssemblyList[4];
3026 const Int_t EndLadderCablesNumber = 4;
3027 for(Int_t i=0; i<EndLadderCablesNumber; i++){
3028 LadderCableAssemblyList[i] =
3029 GetLadderCableAssemblyList(SideCableNumber[i<2?0:1],
3030 SSDEndLadderCableLength[i]);
3031 Ladder->AddNode((TGeoVolume*)LadderCableAssemblyList[i]->At(i%2==0?0:1),
3032 i<2?1:2,LadderCableCombiTransMatrix[i]);
3033 }
3034 return Ladder;
3035}
3036////////////////////////////////////////////////////////////////////////////////
3037TGeoVolume* AliITSv11GeometrySSD::GetLayer(Int_t iLayer){
3038 TGeoVolume* Layer = new TGeoVolumeAssembly(iLayer==5 ? "ITSssdLayer5"
3039 : "ITSssdLayer6");
3040 TGeoVolume* Ladder = GetLadder(iLayer);
3041 /////////////////////////////////////////////////////
3042 // Setting the CombiTransformation to pass ITS center
3043 /////////////////////////////////////////////////////
3044 Double_t ITSCenterTransZ = iLayer==5 ? fgkSSDLay5LadderLength
3045 - fgkLay5CenterITSPosition:
3046 fgkSSDLay6LadderLength
3047 - fgkLay6CenterITSPosition;
3048 Double_t ITSSensorYTrans = fgkSSDModuleCoolingBlockToSensor
3049 + 0.5* fgkCoolingTubeSupportHeight
3050 -(iLayer==5 ? fgkSSDSensorSideSupportHeight[1]
3051 - fgkSSDSensorSideSupportHeight[0]: 0.);
3052 TGeoRotation* ITSCenterRot[3];
3053 ITSCenterRot[0] = new TGeoRotation("ITSCenterRot0",90.,180.,-90.);
3054 ITSCenterRot[1] = new TGeoRotation("ITSCenterRot1",0.,90.,0.);
3055 ITSCenterRot[2] = new TGeoRotation((*ITSCenterRot[1])*(*ITSCenterRot[0]));
3056 TGeoCombiTrans* ITSCenterCombiTrans = new TGeoCombiTrans("ITSCenterCombiTrans",0.,
3057 fgkSSDMountingBlockHeight[1]+ITSSensorYTrans,
3058 fgkEndLadderCarbonFiberLowerJunctionLength[1]
3059 - ITSCenterTransZ,ITSCenterRot[2]);
3060 /////////////////////////////////////////////////////
3061 // Setting the Ladder into the Layer
3062 /////////////////////////////////////////////////////
3063 Double_t LayLadderAnglePosition = 360./(iLayer==5 ? fgkSSDLay5LadderNumber :
3064 fgkSSDLay6LadderNumber);
3065 Int_t LayLadderNumber = iLayer==5 ? fgkSSDLay5LadderNumber :
3066 fgkSSDLay6LadderNumber;
3067 Double_t LayRadiusMin = iLayer==5 ? fgkSSDLay5RadiusMin :
3068 fgkSSDLay6RadiusMin;
3069 Double_t LayRadiusMax = iLayer==5 ? fgkSSDLay5RadiusMax :
3070 fgkSSDLay6RadiusMax;
3071 TGeoCombiTrans* LadderCombiTrans[LayLadderNumber];
3072 TGeoHMatrix* LadderHMatrix[LayLadderNumber];
3073 Double_t LayerRadius = 0.;
3074 char LadderCombiTransName[30], LadderRotName[30];
3075 for(Int_t i=0; i<LayLadderNumber;i++){
3076 sprintf(LadderCombiTransName,"LadderCombiTrans%i",i);
3077 sprintf(LadderRotName,"LaddeRot%i",i);
3078 switch(iLayer){
3079 case 5:
3080 LayerRadius = (i%2==0 ? LayRadiusMin: LayRadiusMax);
3081 break;
3082 case 6:
3083 LayerRadius = (i%2==0 ? LayRadiusMax : LayRadiusMin);
3084 break;
3085 }
3086 LadderCombiTrans[i] = new TGeoCombiTrans(LadderCombiTransName,
3087 LayerRadius * TMath::Cos((i+1)
3088 * LayLadderAnglePosition*TMath::DegToRad()),
3089 LayerRadius * TMath::Sin((i+1)
3090 * LayLadderAnglePosition*TMath::DegToRad()),0.,
3091 new TGeoRotation(LadderRotName,(i+1)
3092 * LayLadderAnglePosition-90,0.,0.));
3093 LadderHMatrix[i] = new TGeoHMatrix((*LadderCombiTrans[i])
3094 * (*ITSCenterCombiTrans));
3095 Layer->AddNode(Ladder,i+1,LadderHMatrix[i]);
3096 }
3097 return Layer;
3098}
3099////////////////////////////////////////////////////////////////////////////////
3100void AliITSv11GeometrySSD::Layer5(TGeoVolume* moth){
3101////////////////////////////////////////////////////////////////////////////////
3102// Insert the layer 5 in the mother volume.
3103////////////////////////////////////////////////////////////////////////////////
3104 if(! moth){
3105 cout << "Error::AliITSv11GeometrySSD: Can't insert layer5, mother is null!"<< endl;
3106 return;
3107 }
3108 fMotherVol = moth;
3109 moth->AddNode(GetLayer(5),1,0);
3110}
3111////////////////////////////////////////////////////////////////////////////////
3112void AliITSv11GeometrySSD::Layer6(TGeoVolume* moth){
3113////////////////////////////////////////////////////////////////////////////////
3114// Insert the layer 6 in the mother volume.
3115////////////////////////////////////////////////////////////////////////////////
3116 if(! moth){
3117 cout << "Error::AliITSv11GeometrySSD: Can't insert layer6, mother is null!"<< endl;
3118 return;
3119 }
3120 fMotherVol = moth;
3121 moth->AddNode(GetLayer(6),1,0);
3122}
3123////////////////////////////////////////////////////////////////////////////////
3124TGeoArb8* AliITSv11GeometrySSD::GetTrapezoidShape(TVector3* vertexpos[],
3125 Double_t* width, Double_t height, char* shapename){
3126////////////////////////////////////////////////////////////////////////////////
3127 const Int_t VertexNumber = 4;
3128 const Int_t TransVectNumber = 2;
3129 TVector3* Vertex[VertexNumber];
3130 TVector3* TransVector[2];
3131 for(Int_t i=0; i<TransVectNumber; i++)
3132 TransVector[i] = new TVector3(0.,width[i]);
3133////////////////////////////////////////////////////////////////////////////////
3134 //Setting the vertices
3135////////////////////////////////////////////////////////////////////////////////
3136 Vertex[0] = new TVector3(*vertexpos[0]);
3137 Vertex[1] = new TVector3(*vertexpos[1]);
3138 Vertex[2] = new TVector3(*Vertex[1]+*TransVector[1]);
3139 Vertex[3] = new TVector3(*Vertex[0]+*TransVector[0]);
3140 TGeoArb8* TrapezoidShape = new TGeoArb8(shapename,0.5*height);
3141 for(Int_t i=0; i<2*VertexNumber; i++)
3142 TrapezoidShape->SetVertex(i,Vertex[(i<VertexNumber ? i : i-VertexNumber)]->X(),
3143 Vertex[(i<VertexNumber ? i : i-VertexNumber)]->Y());
3144 return TrapezoidShape;
3145}
3146////////////////////////////////////////////////////////////////////////////////
3147TGeoArb8* AliITSv11GeometrySSD::GetArbShape(TVector3* vertexpos[], Double_t* width,
3148 Double_t height, char* shapename, Int_t isign){
3149 const Int_t VertexNumber = 8;
3150 const Int_t TransVectNumber = 2;
3151 TVector3* Vertex[VertexNumber];
3152 TVector3* TransVector[2];
3153 for(Int_t i=0; i<TransVectNumber; i++) TransVector[i] = new TVector3(0.,width[i]);
3154////////////////////////////////////////////////////////////////////////////////
3155 //Setting the vertices for TGeoArb8
3156////////////////////////////////////////////////////////////////////////////////
3157 Vertex[0] = new TVector3(*vertexpos[0]);
3158 Vertex[1] = new TVector3(*vertexpos[1]);
3159 Vertex[2] = new TVector3(*Vertex[1]+isign*(*TransVector[0]));
3160 Vertex[3] = new TVector3(*Vertex[0]+isign*(*TransVector[0]));
3161 Vertex[4] = new TVector3(*vertexpos[2]);
3162 Vertex[5] = new TVector3(*vertexpos[3]);
3163 Vertex[6] = new TVector3(*Vertex[5]+isign*(*TransVector[1]));
3164 Vertex[7] = new TVector3(*Vertex[4]+isign*(*TransVector[1]));
3165////////////////////////////////////////////////////////////////////////////////
3166 TGeoArb8* ArbShape = new TGeoArb8(shapename,0.5*height);
3167 for(Int_t i = 0; i<VertexNumber;i++)
3168 ArbShape->SetVertex(i,Vertex[i]->X(),Vertex[i]->Y());
3169 return ArbShape;
3170}
3171////////////////////////////////////////////////////////////////////////////////
3172TGeoArb8* AliITSv11GeometrySSD::GetTriangleShape(TVector3* vertexpos[],
3173 Double_t height, char* shapename){
3174////////////////////////////////////////////////////////////////////////////////
3175 const Int_t VertexNumber = 4;
3176 TVector3* Vertex[VertexNumber];
3177//////////////////////////////////////
3178 //Setting the vertices for TGeoArb8
3179 ////////////////////////////////////
3180 for(Int_t i = 0; i<VertexNumber; i++)
3181 Vertex[i] = new TVector3(i!=VertexNumber-1?*vertexpos[i]:*Vertex[VertexNumber-1-i]);
3182 TGeoArb8* TriangleShape = new TGeoArb8(shapename,0.5*height);
3183 for(Int_t i = 0; i<2*VertexNumber; i++)
3184 TriangleShape->SetVertex(i,Vertex[(i < VertexNumber ? i: i-VertexNumber)]->X(),
3185 Vertex[(i < VertexNumber ? i : i-VertexNumber)]->Y());
3186 return TriangleShape;
3187}
3188////////////////////////////////////////////////////////////////////////////////
3189TVector3* AliITSv11GeometrySSD::GetReflection(TVector3* Vector,Double_t* Param){
3190////////////////////////////////////////////////////////////////////////////////
3191 TVector3* n = new TVector3(Param[0],Param[1],Param[2]);
3192 Double_t D = ((*Vector)*(*n)+Param[3])/n->Mag2();
3193 TVector3* ReflectedVector = new TVector3(*Vector-2*D*(*n));
3194 return ReflectedVector;
3195}
3196////////////////////////////////////////////////////////////////////////////////
3197TGeoCombiTrans* AliITSv11GeometrySSD::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
3198 Double_t dx,
3199 Double_t dy,
3200 Double_t dz) const{
3201 TGeoCombiTrans* CombiTrans = new TGeoCombiTrans(*ct);
3202 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
3203 const Double_t *vect = CombiTrans->GetTranslation();
3204 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
3205 CombiTrans->SetTranslation(newVect);
3206 return CombiTrans;
3207}
3208////////////////////////////////////////////////////////////////////////////////
3209//To be interfaced with AliRoot Materials file
3210////////////////////////////////////////////////////////////////////////////////
3211TGeoMedium* AliITSv11GeometrySSD::GetMedium(const char* mediumName) {
3212 char ch[30];
3213 sprintf(ch, "ITS_%s",mediumName);
3214 TGeoMedium* medium = gGeoManager->GetMedium(ch);
3215 if (! medium)
3216 printf("Error(AliITSv11GeometrySSD)::medium %s not found !\n", mediumName);
3217 return medium;
3218}
3219////////////////////////////////////////////////////////////////////////////////
3220//To be interfaced with AliRoot Materials file
3221////////////////////////////////////////////////////////////////////////////////
3222/*void AliITSv11GeometrySSD::CreateMaterials(){
3223///////////////////////////////////
3224// This part has to be modified
3225///////////////////////////////////
3226// Float_t ifield = 2.000;
3227// Float_t fieldm = 10.000;
3228// Int_t ifield = gAlice->Field()->Integ();
3229// Float_t fieldm = gAlice->Field()->Max();
3230 ///////////////////////////////////
3231 // Silicon for Sensor
3232 ///////////////////////////////////
3233 Int_t SINumber = 0;
3234 TGeoMaterial* SiMaterial = new TGeoMaterial("SiMaterial");
3235 TGeoMedium* Silicon = new TGeoMedium("Silicon",SINumber,SiMaterial);
3236 fgkSSDSensorMedium = Silicon;
3237 ///////////////////////////////////
3238 // Silicon Mixture for Sensor
3239 ///////////////////////////////////
3240 Int_t SiMixtureNumber = 1;
3241 TGeoMaterial* SiMixtureMaterial = new TGeoMaterial("SiMixtureMaterial");
3242 TGeoMedium* SiliconMixture = new TGeoMedium("SiliconMixture",SiMixtureNumber,SiMixtureMaterial);
3243 fgkSSDChipMedium = SiliconMixture;
3244 ///////////////////////////////////
3245 // Stiffener Components Materials
3246 ///////////////////////////////////
3247 Int_t K1100Number = 2;
3248 TGeoMaterial* K1100Material = new TGeoMaterial("K1100Material");
3249 TGeoMedium* K1100 = new TGeoMedium("K1100",K1100Number,K1100Material);
3250 fgkSSDStiffenerMedium = K1100;
3251 ///////////////////////////
3252 // Stiffener Connectors
3253 ///////////////////////////
3254 Int_t SnMaterialNumber = 3;
3255 TGeoMaterial* SnMaterial = new TGeoMaterial("SnMaterial");
3256 TGeoMedium* SnMedium = new TGeoMedium("SnMedium",SnMaterialNumber,
3257 SnMaterial);
3258 fgkSSDStiffenerConnectorMedium = SnMedium;
3259 ////////////////////////////////
3260 // Stiffener 0603-1812 Capacitor
3261 ////////////////////////////////
3262 Int_t Al2O3Number = 4;
3263 TGeoMaterial* Al2O3Material = new TGeoMaterial("Al2O3Material");
3264 TGeoMedium* Al2O3Medium = new TGeoMedium("Al2O3Medium",
3265 Al2O3Number,
3266 Al2O3Material);
3267 fgkSSDStiffener0603CapacitorMedium = Al2O3Medium;
3268 fgkSSDStiffener1812CapacitorMedium = Al2O3Medium;
3269 ///////////////////////////
3270 // Stiffener Hybrid Wire
3271 ///////////////////////////
3272 Int_t CuHybridWireNumber = 5;
3273 TGeoMaterial* CuHybridWireMaterial = new TGeoMaterial("CuHybridWireMaterial");
3274 TGeoMedium* CuHybridWireMedium = new TGeoMedium("CuHybridWireMedium",
3275 CuHybridWireNumber,
3276 CuHybridWireMaterial);
3277 fgkSSDStiffenerHybridWireMedium = CuHybridWireMedium;
3278 ///////////////////////////
3279 // Al for Cooling Block
3280 ///////////////////////////
3281 Int_t AlCoolBlockNumber = 6;
3282 TGeoMaterial* AlCoolBlockMaterial = new TGeoMaterial("AlCoolBlockMaterial");
3283 TGeoMedium* AlCoolBlockMedium = new TGeoMedium("AlCoolBlockMedium",
3284 AlCoolBlockNumber,
3285 AlCoolBlockMaterial);
3286 fgkSSDAlCoolBlockMedium = AlCoolBlockMedium;
3287 //////////////////////////////////////////////////////
3288 // Kapton and Al for Chip Cable Flex and Ladder Cables
3289 //////////////////////////////////////////////////////
3290 Int_t KaptonBlockNumber = 7;
3291 TGeoMaterial* KaptonMaterial = new TGeoMaterial("KaptonMaterial");
3292 TGeoMedium* KaptonMedium = new TGeoMedium("KaptonMedium",
3293 KaptonBlockNumber,
3294 KaptonMaterial);
3295 Int_t AlTraceBlockNumber = 8;
3296 TGeoMaterial* AlTraceMaterial = new TGeoMaterial("AlTraceMaterial");
3297 TGeoMedium* AlTraceMedium = new TGeoMedium("AlTraceMedium",
3298 AlTraceBlockNumber,
3299 AlTraceMaterial);
3300 fgkSSDKaptonChipCableMedium = KaptonMedium;
3301 fgkSSDAlTraceChipCableMedium = AlTraceMedium;
3302 fgkSSDKaptonFlexMedium = KaptonMedium;
3303 fgkSSDAlTraceFlexMedium = AlTraceMedium;
3304 fgkSSDKaptonLadderCableMedium = KaptonMedium;
3305 fgkSSDAlTraceLadderCableMedium = AlTraceMedium;
3306 /////////////////////////////////////////////////////////////////
3307 // M55J for Carbon Fiber, CarbonFiber Lower Support and Junction
3308 //////////////////////////////////////////////////////////////////
3309 Int_t M55JNumber = 9;
3310 TGeoMaterial* M55JMaterial = new TGeoMaterial("M55JMaterial");
3311 TGeoMedium* M55JMedium = new TGeoMedium("M55JMedium",M55JNumber,
3312 M55JMaterial);
3313 fgkSSDCarbonFiberMedium = M55JMedium;
3314 fgkSSDMountingBlockMedium = M55JMedium;
3315 /////////////////////////////////////////////////////////////////
3316 // G10 for Detector Leg, TubeHolder
3317 //////////////////////////////////////////////////////////////////
3318 Int_t G10Number = 10;
3319 TGeoMaterial* G10Material = new TGeoMaterial("G10Material");
3320 TGeoMedium* G10Medium = new TGeoMedium("G10Medium",G10Number,
3321 G10Material);
3322 fgkSSDTubeHolderMedium = G10Medium;
3323 fgkSSDSensorSupportMedium = G10Medium;
3324 /////////////////////////////////////////////////////////////////
3325 // Water and Phynox for Cooling Tube
3326 //////////////////////////////////////////////////////////////////
3327 Int_t WaterNumber = 11;
3328 TGeoMaterial* WaterMaterial = new TGeoMaterial("WaterMaterial");
3329 TGeoMedium* WaterMedium = new TGeoMedium("WaterMedium",WaterNumber,
3330 WaterMaterial);
3331 fgkSSDCoolingTubeWater = WaterMedium;
3332 Int_t PhynoxNumber = 12;
3333 TGeoMaterial* PhynoxMaterial = new TGeoMaterial("PhynoxMaterial");
3334 TGeoMedium* PhynoxMedium = new TGeoMedium("PhynoxMedium",PhynoxNumber,
3335 PhynoxMaterial);
3336 fgkSSDCoolingTubePhynox = PhynoxMedium;
3337}
3338*/
3339void AliITSv11GeometrySSD::CreateMaterials(){
3340///////////////////////////////////
3341// This part has to be modified
3342///////////////////////////////////
3343 ///////////////////////////////////
3344 // Silicon for Sensor
3345 ///////////////////////////////////
3346 fgkSSDSensorMedium = GetMedium("Si");
3347 ///////////////////////////////////
3348 // Silicon Mixture for Sensor
3349 ///////////////////////////////////
3350 fgkSSDChipMedium = GetMedium("SPD SI CHIP$");
3351 fgkSSDChipGlueMedium = GetMedium("EPOXY$");
3352 ///////////////////////////////////
3353 // Stiffener Components Materials
3354 ///////////////////////////////////
3355 fgkSSDStiffenerMedium = GetMedium("ITSsddCarbonM55J");
3356 ///////////////////////////
3357 // Stiffener Connectors
3358 ///////////////////////////
3359 fgkSSDStiffenerConnectorMedium = GetMedium("COPPER");
3360 ////////////////////////////////
3361 // Stiffener 0603-1812 Capacitor
3362 ////////////////////////////////
3363 fgkSSDStiffener0603CapacitorMedium = GetMedium("SDD ruby sph. Al2O3");
3364 fgkSSDStiffener1812CapacitorMedium = GetMedium("SDD ruby sph. Al2O3");
3365 ///////////////////////////
3366 // Stiffener Hybrid Wire
3367 ///////////////////////////
3368 fgkSSDStiffenerHybridWireMedium = GetMedium("COPPER");
3369 ///////////////////////////
3370 // Al for Cooling Block
3371 ///////////////////////////
3372 fgkSSDAlCoolBlockMedium = GetMedium("ITSal");
3373 //////////////////////////////////////////////////////
3374 // Kapton and Al for Chip Cable Flex and Ladder Cables
3375 //////////////////////////////////////////////////////
3376 fgkSSDKaptonChipCableMedium = GetMedium("KAPTONH(POLYCH2)");
3377 fgkSSDAlTraceChipCableMedium = GetMedium("ITSal");
3378 fgkSSDKaptonFlexMedium = GetMedium("KAPTONH(POLYCH2)");
3379 fgkSSDAlTraceFlexMedium = GetMedium("ITSal");
3380 fgkSSDKaptonLadderCableMedium = GetMedium("KAPTONH(POLYCH2)");
3381 fgkSSDAlTraceLadderCableMedium = GetMedium("ITSal");
3382 /////////////////////////////////////////////////////////////////
3383 // M55J for Carbon Fiber, CarbonFiber Lower Support and Junction
3384 //////////////////////////////////////////////////////////////////
3385 fgkSSDCarbonFiberMedium = GetMedium("GEN C (M55J)$");
3386 /////////////////////////////////////////////////////////////////
3387 // G10 for Detector Leg, TubeHolder
3388 //////////////////////////////////////////////////////////////////
3389 fgkSSDTubeHolderMedium = GetMedium("G10FR4$");
3390 fgkSSDSensorSupportMedium = GetMedium("G10FR4$");
3391 fgkSSDMountingBlockMedium = GetMedium("G10FR4$");
3392 fgkSSDMountingBlockMedium = GetMedium("G10FR4$");
3393 /////////////////////////////////////////////////////////////////
3394 // Water and Phynox for Cooling Tube
3395 //////////////////////////////////////////////////////////////////
3396 fgkSSDCoolingTubeWater = GetMedium("WATER");
3397 fgkSSDCoolingTubePhynox = GetMedium("INOX$");
3398}
3399/////////////////////////////////////////////////////////////////////