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