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