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