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