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