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