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