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