AddTaskFemto for train update
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySDD.cxx
... / ...
CommitLineData
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
16
17//*************************************************************************
18//
19// SDD geometry, based on ROOT geometrical modeler
20//
21//
22// This geometry has no dependence with aliroot, you can run it with root
23// only, provided that the AliITSv11GeomCable classes are also compiled
24//
25// Ludovic Gaudichet gaudichet@to.infn.it
26//*************************************************************************
27
28
29// $Id$
30
31
32// General Root includes
33#include <Riostream.h>
34#include <TMath.h>
35
36// Root Geometry includes
37#include <TGeoManager.h>
38#include <TGeoVolume.h>
39#include <TGeoCone.h>
40#include <TGeoTube.h>
41#include <TGeoTrd1.h>
42#include <TGeoArb8.h>
43#include <TGeoXtru.h>
44#include <TGeoCompositeShape.h>
45#include <TGeoMatrix.h>
46#include <TGeoNode.h>
47#include <TGeoPcon.h>
48#include <TGeoTorus.h>
49
50#include "AliITSv11GeometrySDD.h"
51#include "AliITSv11GeomCableFlat.h"
52#include "AliITSv11GeomCableRound.h"
53
54const char* AliITSv11GeometrySDD::fgSDDsensitiveVolName3 = "ITSsddSensitivL3";
55const char* AliITSv11GeometrySDD::fgSDDsensitiveVolName4 = "ITSsddSensitivL4";
56const Double_t AliITSv11GeometrySDD::fgkSegmentLength = 37.21*2*fgkmm;
57const Double_t AliITSv11GeometrySDD::fgkLadderWidth = 50.0*fgkmm;
58const Double_t AliITSv11GeometrySDD::fgkLadderHeight = 30.0*fgkmm;
59const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDW = 7.5*fgkmm;
60const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDH = 7.1*fgkmm;
61
62const Double_t AliITSv11GeometrySDD::fgkLadderBeamRadius = 0.6*fgkmm;
63const Double_t AliITSv11GeometrySDD::fgkLadderLa = 3.*fgkmm;
64const Double_t AliITSv11GeometrySDD::fgkLadderHa = 0.721979*fgkmm;
65const Double_t AliITSv11GeometrySDD::fgkLadderLb = 3.7*fgkmm;
66const Double_t AliITSv11GeometrySDD::fgkLadderHb = 0.890428*fgkmm;
67const Double_t AliITSv11GeometrySDD::fgkLadderl = 0.25*fgkmm;
68
69const Double_t AliITSv11GeometrySDD::fgkBottomBeamAngle = 56.5;
70const Double_t AliITSv11GeometrySDD::fgkBeamSidePhi = 65;
71
72const Double_t AliITSv11GeometrySDD::fgkLadWaferSep = 2*fgkmm;
73const Double_t AliITSv11GeometrySDD::fgkPinSuppWidth = 2.5*fgkmm;
74const Double_t AliITSv11GeometrySDD::fgkPinSuppHeight = 2.*fgkmm;
75const Double_t AliITSv11GeometrySDD::fgkPinSuppRmax = 2.5/2.*fgkmm;
76const Double_t AliITSv11GeometrySDD::fgkPinR = 1.5/2.*fgkmm;
77const Double_t AliITSv11GeometrySDD::fgkPinSuppLength = 5.*fgkmm;
78const Double_t AliITSv11GeometrySDD::fgkPinSuppThickness = 0.5*fgkmm;
79const Double_t AliITSv11GeometrySDD::fgkPinSuppConeAngle = 4;
80const Double_t AliITSv11GeometrySDD::fgkPinDXminOnSensor = (39./2.)*fgkmm;
81const Double_t AliITSv11GeometrySDD::fgkPinPinDDXOnSensor = 3*fgkmm;
82const Double_t AliITSv11GeometrySDD::fgkPinDYOnSensor = (52.5/2.)*fgkmm;
83
84// parameters from ALR-0752/3
85const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppHeight = 3.2*fgkmm;
86const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppMaxLength = 14*fgkmm;
87const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppWidthExt = 0.4*fgkmm;
88const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppWidthIn = 0.65*fgkmm;
89const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppHoleDiam = 2*fgkmm;
90const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppFulWidth = 5.15*fgkmm;
91const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppTongW = 0.8*fgkmm;
92const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppAngle = 22.5;
93const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppSlitL = 4.9*fgkmm;
94const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppAxeDist = 3.05*fgkmm;
95const Double_t AliITSv11GeometrySDD::fgkCoolPipeInnerDiam = 1.84*fgkmm;
96const Double_t AliITSv11GeometrySDD::fgkCoolPipeOuterDiam = 2.*fgkmm;
97
98const Double_t AliITSv11GeometrySDD::fgkBTBthick = 0.25 *fgkmm;
99const Double_t AliITSv11GeometrySDD::fgkBTBlength = 55. *fgkmm;
100const Double_t AliITSv11GeometrySDD::fgkBTBwidth = 18*fgkmm;
101const Double_t AliITSv11GeometrySDD::fgkBTBaxisAtoBottom = 4*fgkmm;
102const Double_t AliITSv11GeometrySDD::fgkBTBaxisAtoBase = 2.2*fgkmm;
103const Double_t AliITSv11GeometrySDD::fgkRadiusAminBTB = 1. *fgkmm;
104const Double_t AliITSv11GeometrySDD::fgkRadiusBminBTB = 0.53 *fgkmm;
105const Double_t AliITSv11GeometrySDD::fgkBTBHoleLength = 15 *fgkmm;
106const Double_t AliITSv11GeometrySDD::fgkBTBHolewidth = 6 *fgkmm;
107const Double_t AliITSv11GeometrySDD::fgkBTBHoleRefX = 10 *fgkmm;
108const Double_t AliITSv11GeometrySDD::fgkBTBHoleRefY = 6.5 *fgkmm;
109
110const Double_t AliITSv11GeometrySDD::fgkLay3Rmin = 129.*fgkmm;
111const Double_t AliITSv11GeometrySDD::fgkLay3Rmax = 205.*fgkmm;
112const Double_t AliITSv11GeometrySDD::fgkLay3Length = (524.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube)
113const Double_t AliITSv11GeometrySDD::fgkLay3LadderLength = 524.*fgkmm;
114const Double_t AliITSv11GeometrySDD::fgkLay3DetShortRadius = 146.0*fgkmm;
115const Double_t AliITSv11GeometrySDD::fgkLay3DetLongRadius = 152.0*fgkmm;
116const Double_t AliITSv11GeometrySDD::fgkLay3LaddTopCornerEnd = 15.6*fgkmm;
117const Int_t AliITSv11GeometrySDD::fgkLay3Ndet = 6;
118const Int_t AliITSv11GeometrySDD::fgkLay3Nladd = 14;
119const Double_t AliITSv11GeometrySDD::fgkLay3CoolPipeSuppH = 7.5*fgkmm;
120
121const Double_t AliITSv11GeometrySDD::fgkLay4Rmin = 220.*fgkmm;
122const Double_t AliITSv11GeometrySDD::fgkLay4Rmax = 291.*fgkmm;
123const Double_t AliITSv11GeometrySDD::fgkLay4Length = (671.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube)
124const Double_t AliITSv11GeometrySDD::fgkLay4LadderLength = 671.*fgkmm;
125const Double_t AliITSv11GeometrySDD::fgkLay4DetShortRadius = 235.0*fgkmm;
126const Double_t AliITSv11GeometrySDD::fgkLay4DetLongRadius = 240.5*fgkmm;
127const Double_t AliITSv11GeometrySDD::fgkLay4LaddTopCornerEnd = 15.6*fgkmm;
128const Int_t AliITSv11GeometrySDD::fgkLay4Ndet = 8;
129const Int_t AliITSv11GeometrySDD::fgkLay4Nladd = 22;
130const Double_t AliITSv11GeometrySDD::fgkLay4CoolPipeSuppH = 7.5*fgkmm;
131
132const Double_t AliITSv11GeometrySDD::fgkEndLaddCardsShortRadiusLay3 = fgkLay3DetShortRadius;
133const Double_t AliITSv11GeometrySDD::fgkEndLaddCardsShortRadiusLay4 = fgkLay4DetShortRadius;
134const Double_t AliITSv11GeometrySDD::fgkDistEndLaddCardsLadd = 0.*fgkmm;
135
136//hybrid
137const Double_t AliITSv11GeometrySDD::fgkHybridAngle = 48.5; // approx !!!
138// Origine taken at the hybrid corner :
139const Double_t AliITSv11GeometrySDD::fgkHybridLength = 65*fgkmm;
140const Double_t AliITSv11GeometrySDD::fgkHybridWidth = 41*fgkmm;
141const Double_t AliITSv11GeometrySDD::fgkHybRndHoleRad = 1.05*fgkmm;
142const Double_t AliITSv11GeometrySDD::fgkHybRndHoleZ = 2.5*fgkmm;
143const Double_t AliITSv11GeometrySDD::fgkHybRndHoleX = fgkHybridWidth-23.599*fgkmm;
144
145const Double_t AliITSv11GeometrySDD::fgkHybFLlowHoleDZ = 9.698*fgkmm;
146const Double_t AliITSv11GeometrySDD::fgkHybFLlowHolePasDX = 10.754*fgkmm;
147const Double_t AliITSv11GeometrySDD::fgkHybFLlowHoleAmbDX = 9.122*fgkmm;
148 // center of ships to the border
149const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ4 = fgkHybridLength-(4.654 )*fgkmm-fgkHybFLlowHoleDZ/2;
150const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ3 = fgkHybridLength-(4.654+15. )*fgkmm-fgkHybFLlowHoleDZ/2;
151const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ2 = fgkHybridLength-(4.654+15.*2)*fgkmm-fgkHybFLlowHoleDZ/2;
152const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ1 = fgkHybridLength-(4.654+15.*3)*fgkmm-fgkHybFLlowHoleDZ/2;
153const Double_t AliITSv11GeometrySDD::fgkHybFLlowPasX = fgkHybridWidth-32.775*fgkmm;
154const Double_t AliITSv11GeometrySDD::fgkHybFLlowAmbX = fgkHybridWidth-20.791*fgkmm;
155const Double_t AliITSv11GeometrySDD::fgkHybChipsDZ = 9.221*fgkmm;
156const Double_t AliITSv11GeometrySDD::fgkHybPascalDX = 10.245*fgkmm;
157const Double_t AliITSv11GeometrySDD::fgkHybAmbraDX = 8.51*fgkmm;
158const Double_t AliITSv11GeometrySDD::fgkHybFLUpperWidth = 15.012*fgkmm;
159const Double_t AliITSv11GeometrySDD::fgkHybFLUpperLength = 59.878*fgkmm;
160const Double_t AliITSv11GeometrySDD::fgkHybFLUpperAlDZ = 11.183*fgkmm;
161const Double_t AliITSv11GeometrySDD::fgkHybFLUpperAldx = 2.307*fgkmm;
162
163const Double_t AliITSv11GeometrySDD::fgkHybCC2SensorLen = 9.500*fgkmm;
164const Double_t AliITSv11GeometrySDD::fgkHybCC2SensorWid = 1.490*fgkcm; //???
165const Double_t AliITSv11GeometrySDD::fgkHybCC2SensorAng = 15.0;
166
167const Double_t AliITSv11GeometrySDD::fgkmu = 1*fgkmicron; // 1*fgkmicron; // can be increase for checking thin objects
168const Double_t AliITSv11GeometrySDD::fgkHybridThBridgeThick = 0.25*fgkmm; // ???
169const Double_t AliITSv11GeometrySDD::fgkHybAlThick = 30*fgkmu;
170const Double_t AliITSv11GeometrySDD::fgkHybUpThick = 20*fgkmu;
171const Double_t AliITSv11GeometrySDD::fgkHybGlueScrnThick = 50*fgkmu; // ??? ?????
172const Double_t AliITSv11GeometrySDD::fgkHybGlueLowThick = 90*fgkmu;
173const Double_t AliITSv11GeometrySDD::fgkHybGlueUpThick = 90*fgkmu; // sur ?????
174const Double_t AliITSv11GeometrySDD::fgkHybAlCCThick = 12*fgkmu;
175const Double_t AliITSv11GeometrySDD::fgkHybUpCCThick = 12*fgkmu;
176const Double_t AliITSv11GeometrySDD::fgkHybChipThick = 150*fgkmu;
177const Double_t AliITSv11GeometrySDD::fgkHybGlueAgThick = 50*fgkmu; // ??? ????
178const Double_t AliITSv11GeometrySDD::fgkHybUnderNiThick = 20*fgkmu; // ??? ????
179const Int_t AliITSv11GeometrySDD::fgkNHybSMD = 25;
180const Double_t AliITSv11GeometrySDD::fgkHybSMDposX[fgkNHybSMD] =
181 {2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,21.40*fgkmm,
182 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,19.91*fgkmm,
183 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,17.09*fgkmm,21.40*fgkmm,
184 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,19.91*fgkmm,
185 1.63*fgkmm,5.22*fgkmm,13.59*fgkmm,21.40*fgkmm};
186const Double_t AliITSv11GeometrySDD::fgkHybSMDposZ[fgkNHybSMD] =
187 { 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm,
188 17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,
189 32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,
190 47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,
191 62.68*fgkmm,62.06*fgkmm,62.06*fgkmm,62.06*fgkmm};
192const Double_t AliITSv11GeometrySDD::fgkHybSMDmiddleW = 0.954*fgkmm;
193const Double_t AliITSv11GeometrySDD::fgkHybSMDmiddleL = 0.47 *fgkmm;
194const Double_t AliITSv11GeometrySDD::fgkHybSMDendW = 1.132*fgkmm;
195const Double_t AliITSv11GeometrySDD::fgkHybSMDendL = 0.925*fgkmm;
196const Double_t AliITSv11GeometrySDD::fgkHybSMDheight = 400.*fgkmu; // ??? ????!!!!!!!
197
198const Double_t AliITSv11GeometrySDD::fgkWaferThickness = 300.*fgkmu;
199const Double_t AliITSv11GeometrySDD::fgkWaferWidth = 72.5 *fgkmm;
200const Double_t AliITSv11GeometrySDD::fgkWaferLength = 87.6 *fgkmm;
201const Double_t AliITSv11GeometrySDD::fgkWaferThickSens = 299.8*fgkmu;
202const Double_t AliITSv11GeometrySDD::fgkWaferWidthSens = 70.17*fgkmm;
203// 256 anodes times 294 microns of pitch
204const Double_t AliITSv11GeometrySDD::fgkWaferLengthSens = 256*294*fgkmicron;
205
206const Double_t AliITSv11GeometrySDD::fgkDigitCablWidth = 18.4*fgkmm;
207const Double_t AliITSv11GeometrySDD::fgkDigitCablAlThick = (30+30*8./10.)*fgkmicron; // will probably change
208const Double_t AliITSv11GeometrySDD::fgkDigitCablPolyThick = (20+12)*fgkmicron; // will probably change
209
210const Double_t AliITSv11GeometrySDD::fgkWaHVcableAlThick = 30*2./10.*fgkmu; // will probably change // Al ratio is random !!!
211const Double_t AliITSv11GeometrySDD::fgkWaHVcablePolyThick = 175*fgkmu; // will probably change
212const Double_t AliITSv11GeometrySDD::fgkWaHVcableLength = 67.08*fgkmm;
213const Double_t AliITSv11GeometrySDD::fgkWaHVcableWitdh = 17.4*fgkmm; // check !!!
214const Double_t AliITSv11GeometrySDD::fgkWaHVcableDW = 5.24*fgkmm; //5.24*fgkmm;// check !!!
215
216const Double_t AliITSv11GeometrySDD::fgkSensorGlassLX = 5. *fgkmm;
217const Double_t AliITSv11GeometrySDD::fgkSensorGlassLZ = 5. *fgkmm;
218const Double_t AliITSv11GeometrySDD::fgkSensorGlassLY = 150. *fgkmu;
219const Double_t AliITSv11GeometrySDD::fgkGlassDXOnSensor = 26.28*fgkmm; // check !!!
220const Double_t AliITSv11GeometrySDD::fgkGlassDZOnSensor = 22.50*fgkmm; // check !!!
221
222const Double_t AliITSv11GeometrySDD::fgkTransitHVAlThick = 30*2./10.*fgkmu; // check // will probably change //Al ratio is random
223const Double_t AliITSv11GeometrySDD::fgkTransitHVPolyThick = 100*fgkmu; // check // will probably change
224const Double_t AliITSv11GeometrySDD::fgkTransitHVHeadLX = 71.46*fgkmm; // check !!!
225const Double_t AliITSv11GeometrySDD::fgkTransitHVHeadLZ = 21.3*fgkmm;
226const Double_t AliITSv11GeometrySDD::fgkTransitHVBondingLZ = 3.6*fgkmm;
227const Double_t AliITSv11GeometrySDD::fgkTransitHVtailLength = 27*fgkmm; // ???, not yet fixed ...
228const Double_t AliITSv11GeometrySDD::fgkTransitHVtailWidth = 26*fgkmm;
229const Double_t AliITSv11GeometrySDD::fgkTransitHVtailXpos = 8*fgkmm; //8*fgkmm // ???, a mesurer !!!
230const Double_t AliITSv11GeometrySDD::fgkTransitHVsideLZ = 10.34*fgkmm;
231const Double_t AliITSv11GeometrySDD::fgkTransitHVsideLeftZ = 4.11*fgkmm;
232const Double_t AliITSv11GeometrySDD::fgkTransitHVsideRightZ = 3.5*fgkmm; // ???, a mesurer !!!
233
234const Double_t AliITSv11GeometrySDD::fgkLongHVcablePolyThick= (20+30+125+30+20+30+125+30+20)*fgkmu; // check // will probably change
235const Double_t AliITSv11GeometrySDD::fgkLongHVcableAlThick = (30+30*2/10+30)*fgkmu; // check // will probably change
236const Double_t AliITSv11GeometrySDD::fgkLongHVcableSeparation = 600*fgkmicron;
237
238const Double_t AliITSv11GeometrySDD::fgkRubyDX = 14.*fgkmm;
239const Double_t AliITSv11GeometrySDD::fgkRubyZladd3 = 250*fgkmm;
240const Double_t AliITSv11GeometrySDD::fgkRubyZladd4 = 325*fgkmm;
241
242// the stesalite ladder foot at its end
243const Double_t AliITSv11GeometrySDD::fgkLadFootX = 60.*fgkmm;
244const Double_t AliITSv11GeometrySDD::fgkLadFootZ = 20.*fgkmm;
245const Double_t AliITSv11GeometrySDD::fgkLadFootY = 8.*fgkmm;
246const Double_t AliITSv11GeometrySDD::fgkLadFootMiddleY = 4.5*fgkmm;
247const Double_t AliITSv11GeometrySDD::fgkLadBox1X = 23.*fgkmm;
248const Double_t AliITSv11GeometrySDD::fgkLadFingerPrintX = 6.*fgkmm;
249const Double_t AliITSv11GeometrySDD::fgkLadFingerPrintY = 1.*fgkmm;
250const Double_t AliITSv11GeometrySDD::fgkLadFingerPrintBorder = 4.*fgkmm;
251const Double_t AliITSv11GeometrySDD::fgkRubyCageHoleZ = 8.*fgkmm;
252const Double_t AliITSv11GeometrySDD::fgkRubyCageHoleX = 9.*fgkmm;
253const Double_t AliITSv11GeometrySDD::fgkRubyCageHoleY = 6.5*fgkmm;
254const Double_t AliITSv11GeometrySDD::fgkRubyCageAxisShift = 0.5*fgkmm;
255const Double_t AliITSv11GeometrySDD::fgkScrewM4diam = 4.*fgkmm;
256
257const Double_t AliITSv11GeometrySDD::fgkRubyScrewShiftToCenterY = 0.1;
258const Double_t AliITSv11GeometrySDD::fgkRubyHoleDiam = 0.5;
259
260// the U cooling pipe and its heat exchanger in end-ladder cards system
261const Double_t AliITSv11GeometrySDD::fgkEndLadPipeUlengthLay3 = 138*fgkmm;
262const Double_t AliITSv11GeometrySDD::fgkEndLadPipeUlengthLay4 = 150*fgkmm;
263const Double_t AliITSv11GeometrySDD::fgkEndLadPipeUwidth = 59*fgkmm;
264const Double_t AliITSv11GeometrySDD::fgkEndLadPipeRadius = 5*fgkmm;
265const Double_t AliITSv11GeometrySDD::fgkEndLadPipeInnerDiam = 2.8*fgkmm;
266const Double_t AliITSv11GeometrySDD::fgkEndLadPipeOuterDiam = 3.*fgkmm;
267//--- The al body of the cooling syst.of the heat exchanger :
268const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmZLay3 = 112.*fgkmm; //
269const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmZLay4 = 125.*fgkmm; //
270const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmX = 4.75*fgkmm; // the arms of the U cooling tube
271const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmY = 6.8*fgkmm;
272const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmBoxDY = 1.03*fgkmm; // shift in Y of the arms from the axis
273const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmBoxDX = 0.125*fgkmm;// shift in X of the arms from the axis
274const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmZpos = 8.9*fgkmm; //
275
276// LV card :
277const Double_t AliITSv11GeometrySDD::fgkLVcardX = 26.525*fgkmm;
278const Double_t AliITSv11GeometrySDD::fgkLVcardY = 44.95*fgkmm;
279const Double_t AliITSv11GeometrySDD::fgkLVcardZ = 1.*fgkmm; // all except Cu layer //???
280const Double_t AliITSv11GeometrySDD::fgkLVcardCuZ = 0.1*fgkmm; //???
281
282const Double_t AliITSv11GeometrySDD::fgkLVChip0X = 16.525*fgkmm;
283const Double_t AliITSv11GeometrySDD::fgkLVChip0Y = 10.8*fgkmm;
284const Double_t AliITSv11GeometrySDD::fgkLVChip0Z = 3.5*fgkmm; // all except si layer //???
285const Double_t AliITSv11GeometrySDD::fgkLVChip0SiZ = 0.2*fgkmm; //???????????????????????????????????????????????????
286const Double_t AliITSv11GeometrySDD::fgkLVChip0PosX = 13.*fgkmm; //19.95*fgkmm; ???
287const Double_t AliITSv11GeometrySDD::fgkLVChip0PosY = 10.3*fgkmm;
288
289const Double_t AliITSv11GeometrySDD::fgkLVChip1X = 6.00*fgkmm;
290const Double_t AliITSv11GeometrySDD::fgkLVChip1Y = 6.00*fgkmm;
291const Double_t AliITSv11GeometrySDD::fgkLVChip1Z = 1*fgkmm; // ???
292const Double_t AliITSv11GeometrySDD::fgkLVChip1SiZ = 0.2*fgkmm; // ???
293const Double_t AliITSv11GeometrySDD::fgkLVChip1PosX = 18.*fgkmm;
294const Double_t AliITSv11GeometrySDD::fgkLVChip1PosY = 27.6*fgkmm;
295
296const Double_t AliITSv11GeometrySDD::fgkLVChip2X = 6.00*fgkmm;
297const Double_t AliITSv11GeometrySDD::fgkLVChip2Y = 6.00*fgkmm;
298const Double_t AliITSv11GeometrySDD::fgkLVChip2Z = 1*fgkmm; // ???
299const Double_t AliITSv11GeometrySDD::fgkLVChip2SiZ = 0.2*fgkmm; //???
300const Double_t AliITSv11GeometrySDD::fgkLVChip2PosX = 18.0*fgkmm;
301const Double_t AliITSv11GeometrySDD::fgkLVChip2PosY = 39.0*fgkmm;
302
303const Double_t AliITSv11GeometrySDD::fgkLVChip3X = 4.01*fgkmm;
304const Double_t AliITSv11GeometrySDD::fgkLVChip3Y = 4.01*fgkmm;
305const Double_t AliITSv11GeometrySDD::fgkLVChip3Z = 1*fgkmm; // ???
306const Double_t AliITSv11GeometrySDD::fgkLVChip3SiZ = 0.2*fgkmm;
307const Double_t AliITSv11GeometrySDD::fgkLVChip3PosX = 20.7*fgkmm;
308const Double_t AliITSv11GeometrySDD::fgkLVChip3PosY = 21.4*fgkmm;
309
310const Double_t AliITSv11GeometrySDD::fgkLVcoolX1 = 17.25*fgkmm;
311const Double_t AliITSv11GeometrySDD::fgkLVcoolY1 = 8.7*fgkmm;
312const Double_t AliITSv11GeometrySDD::fgkLVcoolZ1 = 1.*fgkmm;
313
314const Double_t AliITSv11GeometrySDD::fgkLVcoolX2 = 3.5*fgkmm;
315const Double_t AliITSv11GeometrySDD::fgkLVcoolY2 = 8.7*fgkmm;
316const Double_t AliITSv11GeometrySDD::fgkLVcoolZ2 = 2.3*fgkmm;
317
318const Double_t AliITSv11GeometrySDD::fgkLVcoolX3 = 4.75*fgkmm;
319const Double_t AliITSv11GeometrySDD::fgkLVcoolY3 = 3.1*fgkmm; //+0.1=glue
320const Double_t AliITSv11GeometrySDD::fgkLVcoolPosY = 6.5*fgkmm;
321
322// HV card :
323const Double_t AliITSv11GeometrySDD::fgkHVCardCeramX = 54.01*fgkmm;
324const Double_t AliITSv11GeometrySDD::fgkHVCardCeramY = 40.89*fgkmm;
325const Double_t AliITSv11GeometrySDD::fgkHVCardCeramZ = 0.7*fgkmm; // ???
326
327const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1X = 6.8*fgkmm;
328const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1Z = 1.*fgkmm; // ???
329const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1Ymid = 4.1*fgkmm;
330const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1Yend = 0.95*fgkmm; // doesn't take into account the soldering
331const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1PosX = 13.1*fgkmm;
332const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1PosY = 14.5*fgkmm;
333
334const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2X = 6.8*fgkmm;
335const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2Z = 1.*fgkmm; // ???
336const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2Ymid = 2.9*fgkmm;
337const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2Yend = 0.95*fgkmm;
338const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2PosX = -12.6*fgkmm;
339const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2PosY = 16.54*fgkmm;
340
341const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Xmid = 3.0*fgkmm;
342const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Xend = 0.91*fgkmm;
343const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Z = 2.*fgkmm; // ???
344const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Y = 3.43*fgkmm;
345
346const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX1 = 14.6*fgkmm;
347const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX2 = 7.2*fgkmm;
348const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX3 = 2.52*fgkmm;
349const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX4 = -4.96*fgkmm;
350const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX5 = -13.82*fgkmm;
351const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosY1 = 6.27*fgkmm;
352const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosY2 = 0.7*fgkmm;
353const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosY3 = 9.1*fgkmm;
354
355const Double_t AliITSv11GeometrySDD::fgkHVCardCool1X = 14.*fgkmm;
356const Double_t AliITSv11GeometrySDD::fgkHVCardCool1Y = 9.5*fgkmm;
357const Double_t AliITSv11GeometrySDD::fgkHVCardCool1Z = 2.*fgkmm;
358const Double_t AliITSv11GeometrySDD::fgkHVCardCool2X = 14.25*fgkmm;
359const Double_t AliITSv11GeometrySDD::fgkHVCardCool2Y = 3.5*fgkmm;
360const Double_t AliITSv11GeometrySDD::fgkHVCardCool2Z = 4.5*fgkmm;
361const Double_t AliITSv11GeometrySDD::fgkHVCardCool3X = 4.5*fgkmm;
362const Double_t AliITSv11GeometrySDD::fgkHVCardCool3Y = 3.5*fgkmm;
363const Double_t AliITSv11GeometrySDD::fgkHVCardCool3Z = 7.2*fgkmm;
364const Double_t AliITSv11GeometrySDD::fgkHVCardCoolDY = 6.*fgkmm;
365
366const Double_t AliITSv11GeometrySDD::fgkCarlosSuppX1 = 19.5*fgkmm;
367const Double_t AliITSv11GeometrySDD::fgkCarlosSuppY1 = 2*fgkmm;
368const Double_t AliITSv11GeometrySDD::fgkCarlosSuppX2 = 35.*fgkmm;
369const Double_t AliITSv11GeometrySDD::fgkCarlosSuppY2 = 3.9*fgkmm;
370const Double_t AliITSv11GeometrySDD::fgkCarlosSuppZ = 17.*fgkmm;
371const Double_t AliITSv11GeometrySDD::fgkCarlosSuppAngle = 45;
372const Double_t AliITSv11GeometrySDD::fgkCarlosSuppX3 = 4.5*fgkmm;
373const Double_t AliITSv11GeometrySDD::fgkCarlosSuppY3 = 3.*fgkmm;
374const Double_t AliITSv11GeometrySDD::fgkCarlosSuppZ3 = 12.*fgkmm;
375const Double_t AliITSv11GeometrySDD::fgkCarlosSuppTopLen = 8.65*fgkmm;
376
377// screws fixing boards to the end-ladder on the U tube
378const Double_t AliITSv11GeometrySDD::fgkLittleScrewHeadR = 1.85*fgkmm;
379const Double_t AliITSv11GeometrySDD::fgkLittleScrewHeadH = 1.5*fgkmm;
380const Double_t AliITSv11GeometrySDD::fgkLittleScrewR = 0.7*fgkmm;
381const Double_t AliITSv11GeometrySDD::fgkShiftLittleScrewLV = 3*fgkmm; // ???
382const Double_t AliITSv11GeometrySDD::fgkLittleLVScrewHeadR = 1.2*fgkmm; // ???
383
384// CARLOS board
385const Double_t AliITSv11GeometrySDD::fgkCarlosCardX1 = (25.50+28.50)*fgkmm; // length (first part of Carlos card)
386const Double_t AliITSv11GeometrySDD::fgkCarlosCardY1 = 1.6*fgkmm; // thickness
387const Double_t AliITSv11GeometrySDD::fgkCarlosCardZ1 = 40.8*fgkmm; // width
388const Double_t AliITSv11GeometrySDD::fgkCarlosCardCuY = 0.1*fgkmm; // thickness of Cu layer (strips)
389const Double_t AliITSv11GeometrySDD::fgkCarlosCardX2 = 25.50*fgkmm; // length (2nd part of Carlos card)
390const Double_t AliITSv11GeometrySDD::fgkCarlosCardZ2 = 8.20*fgkmm; // width
391
392const Double_t AliITSv11GeometrySDD::fgkCarlosCardChipSiThick = 0.1*fgkmm; // ??? idem for all chips ???
393const Double_t AliITSv11GeometrySDD::fgkCarlosCardShift = 9*fgkmm; // ??? shift in z w.r.t. heat bridge
394
395// size and position of various chips on carlos end-ladder board
396const Double_t AliITSv11GeometrySDD::fgkCarlosU1X = 13*fgkmm;
397const Double_t AliITSv11GeometrySDD::fgkCarlosU1Y = 1.68*fgkmm;
398const Double_t AliITSv11GeometrySDD::fgkCarlosU1Z = 13*fgkmm;
399const Double_t AliITSv11GeometrySDD::fgkCarlosU1posX = 18.4*fgkmm;
400const Double_t AliITSv11GeometrySDD::fgkCarlosU1posZ = -7.2*fgkmm;
401
402const Double_t AliITSv11GeometrySDD::fgkCarlosU2X = 13.75*fgkmm;
403const Double_t AliITSv11GeometrySDD::fgkCarlosU2Y = 1.60*fgkmm;
404const Double_t AliITSv11GeometrySDD::fgkCarlosU2Z = 13.85*fgkmm;
405const Double_t AliITSv11GeometrySDD::fgkCarlosU2posX = -0.375*fgkmm;
406const Double_t AliITSv11GeometrySDD::fgkCarlosU2posZ = -9.725*fgkmm;
407
408const Double_t AliITSv11GeometrySDD::fgkCarlosU3X = 5*fgkmm;
409const Double_t AliITSv11GeometrySDD::fgkCarlosU3Y = 1.*fgkmm;
410const Double_t AliITSv11GeometrySDD::fgkCarlosU3Z = 5*fgkmm;
411const Double_t AliITSv11GeometrySDD::fgkCarlosU3posX = 6.4*fgkmm;
412const Double_t AliITSv11GeometrySDD::fgkCarlosU3posZ = 9.9*fgkmm;
413
414// U4 like U3
415const Double_t AliITSv11GeometrySDD::fgkCarlosU4posX = -12*fgkmm;
416const Double_t AliITSv11GeometrySDD::fgkCarlosU4posZ = 3.6*fgkmm;
417
418const Double_t AliITSv11GeometrySDD::fgkCarlosU17X = 16*fgkmm;
419const Double_t AliITSv11GeometrySDD::fgkCarlosU17Y = 3.5*fgkmm;
420const Double_t AliITSv11GeometrySDD::fgkCarlosU17Z = 10.9*fgkmm;
421const Double_t AliITSv11GeometrySDD::fgkCarlosU17posX = -17.84*fgkmm;
422const Double_t AliITSv11GeometrySDD::fgkCarlosU17posZ = -10.95*fgkmm;
423
424const Double_t AliITSv11GeometrySDD::fgkCarlosU35X = 4*fgkmm;
425const Double_t AliITSv11GeometrySDD::fgkCarlosU35Y = 1.*fgkmm;
426const Double_t AliITSv11GeometrySDD::fgkCarlosU35Z = 4*fgkmm;
427const Double_t AliITSv11GeometrySDD::fgkCarlosU35posX = -21.6*fgkmm;
428const Double_t AliITSv11GeometrySDD::fgkCarlosU35posZ = 2.3*fgkmm;
429
430const Double_t AliITSv11GeometrySDD::fgkCarlosU36X = 6*fgkmm;
431const Double_t AliITSv11GeometrySDD::fgkCarlosU36Y = 1.*fgkmm;
432const Double_t AliITSv11GeometrySDD::fgkCarlosU36Z = 6*fgkmm;
433const Double_t AliITSv11GeometrySDD::fgkCarlosU36posX = -21.6*fgkmm;
434const Double_t AliITSv11GeometrySDD::fgkCarlosU36posZ = 9.6*fgkmm;
435
436const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1X = 8*fgkmm;
437const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1Y = 1.7*fgkmm; // look thicker than design number (0.7) ! ???
438const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1Z = 3.7*fgkmm;
439const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1posX = -12*fgkmm;
440const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1posZ = 10.6*fgkmm;
441
442// distance from the heat bridge center to the card center :
443const Double_t AliITSv11GeometrySDD::fgkCarlosCard2HeatBridge = fgkCarlosSuppY2/2+fgkCarlosCardY1/2+fgkCarlosU1Y+0.1*fgkmm;
444
445// some pieces at the end of the carbon fiber ladder
446 const Double_t AliITSv11GeometrySDD::fgkCoolPipeLay3Len = 467.*fgkmm; // ???
447 const Double_t AliITSv11GeometrySDD::fgkCoolPipeLay4Len = 616.*fgkmm; // ???
448 const Double_t AliITSv11GeometrySDD::fgkHVguideX1 = 42.5*fgkmm;
449 const Double_t AliITSv11GeometrySDD::fgkHVguideY1 = 7.*fgkmm;
450 const Double_t AliITSv11GeometrySDD::fgkHVguideZ1 = 10.*fgkmm;
451 const Double_t AliITSv11GeometrySDD::fgkHVguideZ2 = 6.*fgkmm;
452 const Double_t AliITSv11GeometrySDD::fgkHVguideDX = -8.5*fgkmm;
453 const Double_t AliITSv11GeometrySDD::fgkHVguideSuppFullZ = 37.5*fgkmm;
454
455// Cooling connector between phynox and plastic cooling water tubes
456const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeRmin = 1 *fgkmm;
457const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeR1 = 2.5*fgkmm; // ???
458const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeL1 = 3.*fgkmm; // ???
459const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeR2 = 3.5*fgkmm; // ???
460const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeL2 = 2.*fgkmm; // ???
461const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeR3 = 3.*fgkmm; // ???
462const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeL3 = 5 *fgkmm; // ???
463
464
465// parameters for coding SDD cables on SDD and SSD cones
466const Double_t AliITSv11GeometrySDD::fgkSectionCuPerMod = 3*2*0.006 + 3*2*0.0005 + 2*0.002;
467// copper : LV + signal + HV(HV ???)
468const Double_t AliITSv11GeometrySDD::fgkSectionPlastPerMod = (TMath::Pi()*(3*0.36*0.36/4 + 3*0.21*0.21/4 + 2*0.115*0.115/4)
469 - fgkSectionCuPerMod);
470
471const Double_t AliITSv11GeometrySDD::fgkSectionGlassPerMod = 3*0.006; // ???
472const Double_t AliITSv11GeometrySDD::fgkSectionCoolPolyuEL = 0.4672;
473const Double_t AliITSv11GeometrySDD::fgkSectionCoolWaterEL = 0.3496;
474const Double_t AliITSv11GeometrySDD::fgkEndLadderEarthCableR = 0.5*fgkmm;
475// (sections are given in cm square)
476const Double_t AliITSv11GeometrySDD::fgkCableBendRatio = 1.3; // ??? this factor account for the bending of cables
477const Double_t AliITSv11GeometrySDD::fgkHybridAlFoilThick = 0.1*fgkmm; // Thickness of Al foil on hybrid side - TO BE CHECKED
478const Double_t AliITSv11GeometrySDD::fgkHybridAlFoilWide = 4.2*fgkmm; // Width of Al foil on hybrid side - from digitCableA
479const Double_t AliITSv11GeometrySDD::fgkHybridAlFoilSide = 2.0*fgkmm; // Side length of Al foil on hybrid side
480
481const Double_t AliITSv11GeometrySDD::fgkConeSDDr1 = 11.87574*fgkcm;
482const Double_t AliITSv11GeometrySDD::fgkConeSDDr2 = 26.07574*fgkcm;
483const Double_t AliITSv11GeometrySDD::fgkConeSDDz1 = 3.36066*fgkcm + 186.0*fgkmm + 0.5*790.0*fgkmm - 19.18934*fgkcm - 1.6;
484const Double_t AliITSv11GeometrySDD::fgkConeSDDz2 = 17.56066*fgkcm + 186.0*fgkmm + 0.5*790.0*fgkmm - 19.18934*fgkcm - 1.6;
485// These last parameters come from cone's code and define the slope
486// and position of the SDD cone end. For some unknown reason, this doesn't
487// allow to stick on the SDD cone. This has to be checked when a correct
488// version of the cone is available ... For now 'm applying some approximative
489// corrections
490
491const Double_t AliITSv11GeometrySDD::fgkSDDCableR1 = 16*fgkcm; // ??? // part 1 of "cable cone"
492const Double_t AliITSv11GeometrySDD::fgkSDDCableR2 = 23*fgkcm; // ??? // part 1/2 of "cable cone"
493const Double_t AliITSv11GeometrySDD::fgkSDDCableR3 = 26*fgkcm; // ??? // part 2 of "cable cone"
494
495const Double_t AliITSv11GeometrySDD::fgkSDDCableDZint = 3.5*fgkcm;
496const Double_t AliITSv11GeometrySDD::fgkSDDCableR5 = 37*fgkcm; // third part of "cable cone"
497const Double_t AliITSv11GeometrySDD::fgkSDDCableZ5 = 65*fgkcm; // third part of "cable cone"
498
499
500
501
502
503
504
505ClassImp(AliITSv11GeometrySDD)
506
507//________________________________________________________________________
508AliITSv11GeometrySDD::AliITSv11GeometrySDD():
509 AliITSv11Geometry(),
510 fPinSupport(0),
511 fCoolPipeSupportL(0),
512 fCoolPipeSupportR(0),
513 fSDDsensor3(0),
514 fSDDsensor4(0),
515 fBaseThermalBridge(0),
516 fHybrid(0),
517 fLadderFoot(0),
518 fCardLVR(0),
519 fCardLVL(0),
520 fCardHV(0),
521 fCardCarlos(0),
522 fRaccordoL(0),
523 fDigitCableLay3A(0),
524 fDigitCableLay3B(0),
525 fDigitCableLay4A(0),
526 fDigitCableLay4B(0),
527 fMotherVol(0),
528 fAddHybrids(kTRUE),
529 fAddSensors(kTRUE),
530 fAddHVcables(kTRUE),
531 fAddCables(kTRUE),
532 fAddCoolingSyst(kTRUE),
533 fCoolingOn(kTRUE),
534 fAddOnlyLadder3min(-1),
535 fAddOnlyLadder3max(-1),
536 fAddOnlyLadder4min(-1),
537 fAddOnlyLadder4max(-1),
538 fColorCarbonFiber(4),
539 fColorRyton(5),
540 fColorPhynox(7),
541 fColorSilicon(3),
542 fColorAl(7),
543 fColorPolyhamide(5),
544 fColorGlass(2),
545 fColorSMD(12),
546 fColorSMDweld(17),
547 fColorStesalite(20),
548 fLay3LadderUnderSegDH(0),
549 fLay4LadderUnderSegDH(0),
550 fLay3LaddShortRadius(0),
551 fLay3LaddLongRadius(0),
552 fLay4LaddShortRadius(0),
553 fLay4LaddLongRadius(0)
554{
555 //
556 // Standard constructor
557 //
558 fCommonVol[0] = NULL;
559 fCommonVol[1] = NULL;
560 fCommonTr[0] = NULL;
561 fCommonTr[1] = NULL;
562 for (Int_t i=0; i<fgkNladdSegCommonVol; i++){
563 fLaddSegCommonVol[i] = NULL;
564 fLaddSegCommonTr[i] = NULL;
565 }
566 SetParameters();
567}
568
569
570//________________________________________________________________________
571AliITSv11GeometrySDD::AliITSv11GeometrySDD(Int_t debug) :
572 AliITSv11Geometry(debug),
573 fPinSupport(0),
574 fCoolPipeSupportL(0),
575 fCoolPipeSupportR(0),
576 fSDDsensor3(0),
577 fSDDsensor4(0),
578 fBaseThermalBridge(0),
579 fHybrid(0),
580 fLadderFoot(0),
581 fCardLVR(0),
582 fCardLVL(0),
583 fCardHV(0),
584 fCardCarlos(0),
585 fRaccordoL(0),
586 fDigitCableLay3A(0),
587 fDigitCableLay3B(0),
588 fDigitCableLay4A(0),
589 fDigitCableLay4B(0),
590 fMotherVol(0),
591 fAddHybrids(kTRUE),
592 fAddSensors(kTRUE),
593 fAddHVcables(kTRUE),
594 fAddCables(kTRUE),
595 fAddCoolingSyst(kTRUE),
596 fCoolingOn(kTRUE),
597 fAddOnlyLadder3min(-1),
598 fAddOnlyLadder3max(-1),
599 fAddOnlyLadder4min(-1),
600 fAddOnlyLadder4max(-1),
601 fColorCarbonFiber(4),
602 fColorRyton(5),
603 fColorPhynox(7),
604 fColorSilicon(3),
605 fColorAl(7),
606 fColorPolyhamide(5),
607 fColorGlass(2),
608 fColorSMD(12),
609 fColorSMDweld(17),
610 fColorStesalite(20),
611 fLay3LadderUnderSegDH(0),
612 fLay4LadderUnderSegDH(0),
613 fLay3LaddShortRadius(0),
614 fLay3LaddLongRadius(0),
615 fLay4LaddShortRadius(0),
616 fLay4LaddLongRadius(0)
617{
618 //
619 // Constructor setting debugging level
620 //
621 fCommonVol[0] = NULL;
622 fCommonVol[1] = NULL;
623 fCommonTr[0] = NULL;
624 fCommonTr[1] = NULL;
625 for (Int_t i=0; i<fgkNladdSegCommonVol; i++){
626 fLaddSegCommonVol[i] = NULL;
627 fLaddSegCommonTr[i] = NULL;
628 }
629 SetParameters();
630}
631
632//________________________________________________________________________
633AliITSv11GeometrySDD::AliITSv11GeometrySDD(const AliITSv11GeometrySDD &s) :
634 AliITSv11Geometry(s.GetDebug()),
635 fPinSupport(s.fPinSupport),
636 fCoolPipeSupportL(s.fCoolPipeSupportL),
637 fCoolPipeSupportR(s.fCoolPipeSupportR),
638 fSDDsensor3(s.fSDDsensor3),
639 fSDDsensor4(s.fSDDsensor4),
640 fBaseThermalBridge(s.fBaseThermalBridge),
641 fHybrid(s.fHybrid),
642 fLadderFoot(s.fLadderFoot),
643 fCardLVR(s.fCardLVR),
644 fCardLVL(s.fCardLVL),
645 fCardHV(s.fCardHV),
646 fCardCarlos(s.fCardCarlos),
647 fRaccordoL(s.fRaccordoL),
648 fDigitCableLay3A(s.fDigitCableLay3A),
649 fDigitCableLay3B(s.fDigitCableLay3B),
650 fDigitCableLay4A(s.fDigitCableLay4A),
651 fDigitCableLay4B(s.fDigitCableLay4B),
652 fMotherVol(s.fMotherVol),
653 fAddHybrids(s.fAddHybrids),
654 fAddSensors(s.fAddSensors),
655 fAddHVcables(s.fAddHVcables),
656 fAddCables(s.fAddCables),
657 fAddCoolingSyst(s.fAddCoolingSyst),
658 fCoolingOn(s.fCoolingOn),
659 fAddOnlyLadder3min(s.fAddOnlyLadder3min),
660 fAddOnlyLadder3max(s.fAddOnlyLadder3max),
661 fAddOnlyLadder4min(s.fAddOnlyLadder4min),
662 fAddOnlyLadder4max(s.fAddOnlyLadder4max),
663 fColorCarbonFiber(s.fColorCarbonFiber),
664 fColorRyton(s.fColorRyton),
665 fColorPhynox(s.fColorPhynox),
666 fColorSilicon(s.fColorSilicon),
667 fColorAl(s.fColorAl),
668 fColorPolyhamide(s.fColorPolyhamide),
669 fColorGlass(s.fColorGlass),
670 fColorSMD(s.fColorSMD),
671 fColorSMDweld(s.fColorSMDweld),
672 fColorStesalite(s.fColorStesalite),
673 fLay3LadderUnderSegDH(s.fLay3LadderUnderSegDH),
674 fLay4LadderUnderSegDH(s.fLay4LadderUnderSegDH),
675 fLay3LaddShortRadius(s.fLay3LaddShortRadius),
676 fLay3LaddLongRadius(s.fLay3LaddLongRadius),
677 fLay4LaddShortRadius(s.fLay4LaddShortRadius),
678 fLay4LaddLongRadius(s.fLay4LaddLongRadius)
679{
680 // Copy Constructor
681 // do only a "shallow copy" ...
682 fCommonVol[0] = s.fCommonVol[0];
683 fCommonVol[1] = s.fCommonVol[1];
684 fCommonTr[0] = s.fCommonTr[0];
685 fCommonTr[1] = s.fCommonTr[1];
686 for (Int_t i=0; i<fgkNladdSegCommonVol; i++){
687 fLaddSegCommonVol[i] = s.fLaddSegCommonVol[i];
688 fLaddSegCommonTr[i] = s.fLaddSegCommonTr[i];
689 }
690 SetParameters();
691}
692
693//________________________________________________________________________
694AliITSv11GeometrySDD& AliITSv11GeometrySDD::
695operator=(const AliITSv11GeometrySDD &s) {
696 // Assignment operator
697 if(&s == this) return *this;
698 fMotherVol = s.fMotherVol;
699 fAddHybrids = s.fAddHybrids;
700 fAddSensors = s.fAddSensors;
701 fAddHVcables = s.fAddHVcables;
702 fAddCables = s.fAddCables;
703 fAddCoolingSyst = s.fAddCoolingSyst;
704 fCoolingOn = s.fCoolingOn;
705 fAddOnlyLadder3min = s.fAddOnlyLadder3min;
706 fAddOnlyLadder3max = s.fAddOnlyLadder3max;
707 fAddOnlyLadder4min = s.fAddOnlyLadder4min;
708 fAddOnlyLadder4max = s.fAddOnlyLadder4max;
709 return *this;
710}
711
712//________________________________________________________________________
713AliITSv11GeometrySDD::~AliITSv11GeometrySDD() {
714 // Look like a destructor
715 // Smell like a destructor
716 // And actually is the destructor
717 if (fDigitCableLay3A) delete [] fDigitCableLay3A;
718 if (fDigitCableLay3B) delete [] fDigitCableLay3B;
719 if (fDigitCableLay4A) delete [] fDigitCableLay4A;
720 if (fDigitCableLay4B) delete [] fDigitCableLay4B;
721}
722
723//________________________________________________________________________
724void AliITSv11GeometrySDD::SetParameters() {
725 //
726 // Define display colors and the non constant geometry parameters
727 //
728
729 Double_t detLadderDist = 8.4*fgkmm;
730
731 fLay3LadderUnderSegDH = detLadderDist - (fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
732 fLay4LadderUnderSegDH = detLadderDist - (fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
733
734 // radius from the center to the CF ladder :
735 fLay3LaddShortRadius = (fgkLay3DetShortRadius
736 + fgkLadWaferSep+2*fgkWaferThickness
737 + detLadderDist);
738 fLay3LaddLongRadius = (fgkLay3DetLongRadius
739 + fgkLadWaferSep+2*fgkWaferThickness
740 + detLadderDist);
741 fLay4LaddShortRadius = (fgkLay4DetShortRadius
742 + fgkLadWaferSep+2*fgkWaferThickness
743 + detLadderDist);
744 fLay4LaddLongRadius = (fgkLay4DetLongRadius
745 + fgkLadWaferSep+2*fgkWaferThickness
746 + detLadderDist);
747
748 fLay3sensorZPos[0]= ( 35.8+72.4+75.8 )*fgkmm;
749 fLay3sensorZPos[1]= ( 35.8+72.4 )*fgkmm;
750 fLay3sensorZPos[2]= ( 35.8 )*fgkmm;
751 fLay3sensorZPos[3]= ( -37.9 )*fgkmm;
752 fLay3sensorZPos[4]= ( -37.9-74.9 )*fgkmm;
753 fLay3sensorZPos[5]= ( -37.9-74.9-71.1 )*fgkmm;
754
755 fLay4sensorZPos[0] = ( 38.5+73.2+75.4+71.6 )*fgkmm;
756 fLay4sensorZPos[1] = ( 38.5+73.2+75.4 )*fgkmm;
757 fLay4sensorZPos[2] = ( 38.5+73.2 )*fgkmm;
758 fLay4sensorZPos[3] = ( 38.5 )*fgkmm;
759 fLay4sensorZPos[4] = ( -35.6 )*fgkmm;
760 fLay4sensorZPos[5] = ( -35.6-74.8 )*fgkmm;
761 fLay4sensorZPos[6] = ( -35.6-74.8-72.4 )*fgkmm;
762 fLay4sensorZPos[7] = ( -35.6-74.8-72.4-76. )*fgkmm;
763}
764
765
766//________________________________________________________________________
767TGeoMedium* AliITSv11GeometrySDD::GetMedium(const char* mediumName) {
768 //
769 // Called to get a medium, checks that it exists.
770 // If not, prints an error and returns 0
771 //
772
773 char ch[30];
774 snprintf(ch, 30, "ITS_%s",mediumName);
775 TGeoMedium* medium = gGeoManager->GetMedium(ch);
776 if (! medium)
777 printf("Error(AliITSv11GeometrySDD)::medium %s not found !\n", mediumName);
778 return medium;
779}
780
781
782//________________________________________________________________________
783Int_t AliITSv11GeometrySDD::GetLay3NLadders() const{
784 // Get the actual number of ladder in layer 3
785 if ( (fAddOnlyLadder3min<0) ||
786 (fAddOnlyLadder3min >= fgkLay3Nladd) ||
787 (fAddOnlyLadder3max<0) ||
788 (fAddOnlyLadder3max >= fgkLay3Nladd) )
789 return fgkLay3Nladd;
790 else return (fAddOnlyLadder3max-fAddOnlyLadder3min+1);
791}
792
793
794//________________________________________________________________________
795Int_t AliITSv11GeometrySDD::GetLay4NLadders() const{
796 // Get the actual number of ladder in layer 4
797 if ( (fAddOnlyLadder4min<0) ||
798 (fAddOnlyLadder4min >= fgkLay4Nladd) ||
799 (fAddOnlyLadder4max<0) ||
800 (fAddOnlyLadder4max >= fgkLay4Nladd) )
801 return fgkLay4Nladd;
802 else return (fAddOnlyLadder4max-fAddOnlyLadder4min+1);
803}
804
805
806//________________________________________________________________________
807void AliITSv11GeometrySDD::CreateBasicObjects() {
808 //
809 // Create basics objets which will be assembled together
810 // in Layer3 and Layer4 functions
811 //
812
813
814 fDigitCableLay3A = new AliITSv11GeomCableFlat[fgkLay3Ndet];
815 fDigitCableLay3B = new AliITSv11GeomCableFlat[fgkLay3Ndet];
816 fDigitCableLay4A = new AliITSv11GeomCableFlat[fgkLay4Ndet];
817 fDigitCableLay4B = new AliITSv11GeomCableFlat[fgkLay4Ndet];
818
819 fPinSupport = CreatePinSupport();
820 fCoolPipeSupportL = CreateCoolPipeSupportL();
821 fCoolPipeSupportR = CreateCoolPipeSupportR();
822 CreateSDDsensor();
823 fBaseThermalBridge = CreateBaseThermalBridge();
824 fHybrid = CreateHybrid(0);
825
826 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDD C AL (M55J)$"); //ITSsddCarbonM55J
827 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$");//ITSsddKAPTON_POLYCH2
828 TGeoMedium *alSDD = GetMedium("AL$"); //ITSal
829 TGeoMedium *stainless = GetMedium("AISI304L$"); // for screws
830 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
831 TGeoMedium *raccordMedium = GetMedium("INOX$"); // same as AISI 316-L
832
833 //********************************************************************
834 // pieces of the carbon fiber structure
835 //********************************************************************
836 Double_t dy = fgkLadderSegBoxDH/2;
837 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
838 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
839 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
840 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
841 Double_t dYTranslation = (fgkLadderHeight/2.
842 -0.5*fgkLadderWidth*TMath::Tan(beta)
843 -fgkLadderBeamRadius);
844 Double_t distCenterSideDown = 0.5*fgkLadderWidth/TMath::Cos(beta);
845
846 //--- the top V of the Carbon Fiber Ladder (segment)
847 TGeoArb8 *cfLaddTop1 = CreateLadderSide( "CFladdTopCornerVol1shape",
848 fgkSegmentLength/2., halfTheta,
849 -1, fgkLadderLa, fgkLadderHa, fgkLadderl);
850 TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1",
851 cfLaddTop1,carbonFiberLadderStruct);
852 TGeoArb8 *cfLaddTop2 = CreateLadderSide( "CFladdTopCornerVol2shape",
853 fgkSegmentLength/2., halfTheta,
854 1, fgkLadderLa, fgkLadderHa, fgkLadderl);
855 TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerVol2",
856 cfLaddTop2, carbonFiberLadderStruct);
857 cfLaddTopVol1->SetLineColor(fColorCarbonFiber);
858 cfLaddTopVol2->SetLineColor(fColorCarbonFiber);
859 TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2-dy, 0);
860
861 //--- the 2 side V
862 TGeoArb8 *cfLaddSide1 = CreateLadderSide( "CFladdSideCornerVol1shape",
863 fgkSegmentLength/2., beta, -1,
864 fgkLadderLb, fgkLadderHb, fgkLadderl);
865 TGeoVolume *cfLaddSideVol1 = new TGeoVolume( "ITSsddCFladdSideCornerVol1",
866 cfLaddSide1,carbonFiberLadderStruct);
867 TGeoArb8 *cfLaddSide2 = CreateLadderSide( "CFladdSideCornerVol2shape",
868 fgkSegmentLength/2., beta, 1,
869 fgkLadderLb, fgkLadderHb, fgkLadderl);
870 TGeoVolume *cfLaddSideVol2 = new TGeoVolume( "ITSsddCFladdSideCornerVol2",
871 cfLaddSide2,carbonFiberLadderStruct);
872 cfLaddSideVol1->SetLineColor(fColorCarbonFiber);
873 cfLaddSideVol2->SetLineColor(fColorCarbonFiber);
874 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,
875 alpha*TMath::RadToDeg());
876 AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation-dy, 0);
877 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0,
878 -alpha*TMath::RadToDeg());
879 AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation-dy, 0);
880
881 //--- The beams
882 // Beams on the sides
883 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*
884 TMath::Sin(2*beta)/(TanD(fgkBeamSidePhi)*TanD(fgkBeamSidePhi))) ));
885 //cout<<"Phi prime = "<<beamPhiPrime*TMath::RadToDeg()<<endl;
886 Double_t beamLength = TMath::Sqrt( fgkLadderHeight*fgkLadderHeight/
887 ( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))
888 + fgkLadderWidth*fgkLadderWidth/4.)-fgkLadderLa/2-fgkLadderLb/2;
889 TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, fgkLadderBeamRadius,beamLength/2.,
890 0, 180);
891 TGeoVolume *sideBeam = new TGeoVolume("ITSsddCFSideBeamVol", sideBeamS,
892 carbonFiberLadderStruct);
893 sideBeam->SetLineColor(fColorCarbonFiber);
894
895 //Euler rotation : about Z, then new X, then new Z
896 TGeoRotation *beamRot1 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
897 -beamPhiPrime*TMath::RadToDeg(),-90);
898 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
899 beamPhiPrime*TMath::RadToDeg(), -90);
900 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
901 beamPhiPrime*TMath::RadToDeg(), -90);
902 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
903 -beamPhiPrime*TMath::RadToDeg(),-90);
904
905 TGeoCombiTrans *beamTransf[8];
906 beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*
907 TMath::Tan(halfTheta),
908 fgkLadderBeamRadius/2. - dy,
909 -3*fgkSegmentLength/8, beamRot1);
910
911 beamTransf[1] = new TGeoCombiTrans( 0.5*triangleHeight*
912 TMath::Tan(halfTheta),
913 fgkLadderBeamRadius/2. - dy,
914 -3*fgkSegmentLength/8, beamRot1);
915 AddTranslationToCombiTrans(beamTransf[1], 0, 0, fgkSegmentLength/2);
916
917 beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*
918 TMath::Tan(halfTheta),
919 fgkLadderBeamRadius/2. - dy,
920 -fgkSegmentLength/8, beamRot2);
921
922 beamTransf[3] = new TGeoCombiTrans(0.5*triangleHeight*
923 TMath::Tan(halfTheta),
924 fgkLadderBeamRadius/2. - dy,
925 -fgkSegmentLength/8, beamRot2);
926 AddTranslationToCombiTrans(beamTransf[3], 0, 0, fgkSegmentLength/2);
927
928 beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*
929 TMath::Tan(halfTheta),
930 fgkLadderBeamRadius/2. - dy,
931 -3*fgkSegmentLength/8, beamRot3);
932
933 beamTransf[5] = new TGeoCombiTrans(-0.5*triangleHeight*
934 TMath::Tan(halfTheta),
935 fgkLadderBeamRadius/2. - dy,
936 -3*fgkSegmentLength/8, beamRot3);
937 AddTranslationToCombiTrans(beamTransf[5], 0, 0, fgkSegmentLength/2);
938
939 beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight*
940 TMath::Tan(halfTheta),fgkLadderBeamRadius/2.-dy, -fgkSegmentLength/8,beamRot4);
941 beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight*
942 TMath::Tan(halfTheta),fgkLadderBeamRadius/2.-dy,3*fgkSegmentLength/8,beamRot4);
943
944 //--- Beams of the bottom
945 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
946 fgkLadderWidth/2.-fgkLadderLb/3, 0, 180);
947 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol",
948 bottomBeam1, carbonFiberLadderStruct);
949 bottomBeam1Vol->SetLineColor(fColorCarbonFiber);
950 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
951 fgkLadderWidth/2.-fgkLadderLb/3, 0, 90);
952 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",
953 bottomBeam2, carbonFiberLadderStruct);
954 bottomBeam2Vol->SetLineColor(fColorCarbonFiber);
955 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
956 0.5*fgkLadderWidth/SinD(fgkBottomBeamAngle)
957 - fgkLadderLb/3, 0, 180);
958 TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol",
959 bottomBeam3, carbonFiberLadderStruct);
960 bottomBeam3Vol->SetLineColor(fColorCarbonFiber);
961 //bottomBeam3Vol->SetLineColor(2);
962 TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90);
963 TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
964
965 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans
966 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,0, bottomBeamRot1);
967 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
968 -(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,
969 -fgkSegmentLength/2, bottomBeamRot1);
970 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,
971 -(fgkLadderHeight/2 - fgkLadderBeamRadius)
972 - dy, fgkSegmentLength/2, bottomBeamRot2);
973 // be careful for beams #3: when "reading" from -z to +z and
974 // from the bottom of the ladder, it should draw a Lambda, and not a V
975 TGeoRotation *bottomBeamRot4 = new TGeoRotation("", -90, fgkBottomBeamAngle, -90);
976 TGeoRotation *bottomBeamRot5 = new TGeoRotation("" ,-90,-fgkBottomBeamAngle, -90);
977 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans
978 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,-fgkSegmentLength/4,bottomBeamRot4);
979 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans
980 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,fgkSegmentLength/4, bottomBeamRot5);
981
982 fLaddSegCommonVol[0] = cfLaddTopVol1; fLaddSegCommonTr[0] = trTop1;
983 fLaddSegCommonVol[1] = cfLaddTopVol2; fLaddSegCommonTr[1] = trTop1;
984 fLaddSegCommonVol[2] = cfLaddSideVol1; fLaddSegCommonTr[2] = ctSideR;
985 fLaddSegCommonVol[3] = cfLaddSideVol1; fLaddSegCommonTr[3] = ctSideL;
986 fLaddSegCommonVol[4] = cfLaddSideVol2; fLaddSegCommonTr[4] = ctSideR;
987 fLaddSegCommonVol[5] = cfLaddSideVol2; fLaddSegCommonTr[5] = ctSideL;
988 fLaddSegCommonVol[6] = sideBeam; fLaddSegCommonTr[6] = beamTransf[0];
989 fLaddSegCommonVol[7] = sideBeam; fLaddSegCommonTr[7] = beamTransf[1];
990 fLaddSegCommonVol[8] = sideBeam; fLaddSegCommonTr[8] = beamTransf[2];
991 fLaddSegCommonVol[9] = sideBeam; fLaddSegCommonTr[9] = beamTransf[3];
992 fLaddSegCommonVol[10]= sideBeam; fLaddSegCommonTr[10]= beamTransf[4];
993 fLaddSegCommonVol[11]= sideBeam; fLaddSegCommonTr[11]= beamTransf[5];
994 fLaddSegCommonVol[12]= sideBeam; fLaddSegCommonTr[12]= beamTransf[6];
995 fLaddSegCommonVol[13]= sideBeam; fLaddSegCommonTr[13]= beamTransf[7];
996 fLaddSegCommonVol[14]= bottomBeam1Vol; fLaddSegCommonTr[14]= bottomBeamTransf1;
997 fLaddSegCommonVol[15]= bottomBeam2Vol; fLaddSegCommonTr[15]= bottomBeamTransf2;
998 fLaddSegCommonVol[16]= bottomBeam2Vol; fLaddSegCommonTr[16]= bottomBeamTransf3;
999 fLaddSegCommonVol[17]= bottomBeam3Vol; fLaddSegCommonTr[17]= bottomBeamTransf4;
1000 fLaddSegCommonVol[18]= bottomBeam3Vol; fLaddSegCommonTr[18]= bottomBeamTransf5;
1001
1002
1003 //********************************************************************
1004 // cables
1005 //********************************************************************
1006 char cableName[30];
1007 for (Int_t i=0; i<fgkLay3Ndet; i++) {
1008 snprintf(cableName, 30, "digitCableLay3A_%i",i);
1009 fDigitCableLay3A[i].SetName(cableName);
1010 fDigitCableLay3A[i].SetWidth(fgkDigitCablWidth);
1011 fDigitCableLay3A[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1012 fDigitCableLay3A[i].SetNLayers(2);
1013 fDigitCableLay3A[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1014 fColorPolyhamide);
1015 fDigitCableLay3A[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
1016 snprintf(cableName, 30, "digitCableLay3B_%i",i);
1017 fDigitCableLay3B[i].SetName(cableName);
1018 fDigitCableLay3B[i].SetWidth(fgkDigitCablWidth);
1019 fDigitCableLay3B[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1020 fDigitCableLay3B[i].SetNLayers(2);
1021 fDigitCableLay3B[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1022 fColorPolyhamide);
1023 fDigitCableLay3B[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
1024 };
1025 for (Int_t i=0; i<fgkLay4Ndet; i++) {
1026 snprintf(cableName, 30, "digitCableLay4A_%i",i);
1027 fDigitCableLay4A[i].SetName(cableName);
1028 fDigitCableLay4A[i].SetWidth(fgkDigitCablWidth);
1029 fDigitCableLay4A[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1030 fDigitCableLay4A[i].SetNLayers(2);
1031 fDigitCableLay4A[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1032 fColorPolyhamide);
1033 fDigitCableLay4A[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
1034 snprintf(cableName, 30, "digitCableLay4B_%i",i);
1035 fDigitCableLay4B[i].SetName(cableName);
1036 fDigitCableLay4B[i].SetWidth(fgkDigitCablWidth);
1037 fDigitCableLay4B[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1038 fDigitCableLay4B[i].SetNLayers(2);
1039 fDigitCableLay4B[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1040 fColorPolyhamide);
1041 fDigitCableLay4B[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
1042 };
1043 // Well, those digit cables could also include the analog cables
1044 // which have the same width and the same path, at least in the ladder.
1045 // It will gain some computing ressources (less volumes) and some
1046 // coding efforts ... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1047 // The only thing to do is to change the names and put the correct total
1048 // thicknesses
1049
1050 // some transformations and volumes used in several places
1051 fCommonTr[0] = new TGeoRotation("CarlosSuppRotN",
1052 0, -fgkCarlosSuppAngle, 0);
1053
1054 TGeoTube *littleScrewHead = new TGeoTube("littleScrewHead", 0, fgkLittleScrewHeadR,
1055 fgkLittleScrewHeadH/2);
1056 fCommonVol[0] = new TGeoVolume("vLittleScrewHead",
1057 littleScrewHead, stainless);
1058 fCommonVol[0]->SetLineColor(kGray);
1059
1060 fLadderFoot = CreateLadderFoot();
1061 CreateLVCard();
1062 fCardHV = CreateHVCard(0);
1063 fCardCarlos = CreateCarlosCard(0);
1064
1065 //==================
1066 // link beteen phynox and plastic cooling tubes
1067 //==================
1068
1069 fRaccordoL = new TGeoVolumeAssembly("RaccordoL");
1070 Double_t fullRacLen = fgkConnectorCoolTubeL1+fgkConnectorCoolTubeL2+fgkConnectorCoolTubeL3;
1071 TGeoTube *waterRac = new TGeoTube("waterRac", 0, fgkConnectorCoolTubeRmin, fullRacLen/2);
1072 TGeoVolume * vwaterRac = new TGeoVolume("vwaterRac", waterRac, coolerMediumSDD);
1073 vwaterRac->SetLineColor(kBlue);
1074
1075 TGeoTube *tube1Rac = new TGeoTube("tube1Rac", fgkConnectorCoolTubeRmin,
1076 fgkConnectorCoolTubeR1, fgkConnectorCoolTubeL1/2);
1077 TGeoTube *tube2Rac = new TGeoTube("tube2Rac", fgkConnectorCoolTubeRmin,
1078 fgkConnectorCoolTubeR2, fgkConnectorCoolTubeL2/2);
1079 TGeoTube *tube3Rac = new TGeoTube("tube3Rac", fgkConnectorCoolTubeRmin,
1080 fgkConnectorCoolTubeR3, fgkConnectorCoolTubeL3/2);
1081 TGeoVolume * vtube1Rac = new TGeoVolume("vtube1Rac", tube1Rac, raccordMedium);
1082 TGeoVolume * vtube2Rac = new TGeoVolume("vtube2Rac", tube2Rac, raccordMedium);
1083 TGeoVolume * vtube3Rac = new TGeoVolume("vtube3Rac", tube3Rac, raccordMedium);
1084 vtube1Rac->SetLineColor(kGray);
1085 vtube2Rac->SetLineColor(kGray);
1086 vtube3Rac->SetLineColor(kGray);
1087
1088 TGeoTranslation *trTube1Rac = new TGeoTranslation("trTube1Rac",0,0,
1089 -fullRacLen/2+fgkConnectorCoolTubeL1/2);
1090 TGeoTranslation *trTube2Rac = new TGeoTranslation("trTube2Rac",0,0,
1091 (-fullRacLen/2+fgkConnectorCoolTubeL1+fgkConnectorCoolTubeL2/2));
1092 TGeoTranslation *trTube3Rac = new TGeoTranslation("trTube3Rac",0,0,
1093 (-fullRacLen/2+fgkConnectorCoolTubeL1+
1094 fgkConnectorCoolTubeL2+fgkConnectorCoolTubeL3/2));
1095 fRaccordoL->AddNode(vwaterRac, 1,0);
1096 fRaccordoL->AddNode(vtube1Rac, 1,trTube1Rac);
1097 fRaccordoL->AddNode(vtube2Rac, 1,trTube2Rac);
1098 fRaccordoL->AddNode(vtube3Rac, 1,trTube3Rac);
1099}
1100
1101
1102//________________________________________________________________________
1103void AliITSv11GeometrySDD::CheckOverlaps(Double_t precision){
1104 //
1105 // a debugging function for checking some possible overlaps
1106 //
1107 if (fSDDsensor3) fSDDsensor3->CheckOverlaps(precision);
1108 if (fSDDsensor4) fSDDsensor4->CheckOverlaps(precision);
1109 if (fHybrid) fHybrid->CheckOverlaps(precision);
1110}
1111
1112
1113//________________________________________________________________________
1114TGeoCombiTrans *AliITSv11GeometrySDD::
1115CreateCombiTrans(const char *name, Double_t dy, Double_t dz, Double_t dphi,
1116 Bool_t planeSym) {
1117 //
1118 // return the TGeoCombiTrans which make a translation in y and z
1119 // and a rotation in phi in the global coord system
1120 // If planeSym = true, the rotation places the object symetrically
1121 // (with respect to the transverse plane) to its position in the
1122 // case planeSym = false
1123 //
1124
1125 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
1126 TGeoRotation r1("",0.,0.,dphi);
1127 TGeoRotation r2("",90, 180, -90-dphi);
1128
1129 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
1130 combiTrans1->SetTranslation(t1);
1131 if (planeSym) combiTrans1->SetRotation(r1);
1132 else combiTrans1->SetRotation(r2);
1133 return combiTrans1;
1134}
1135
1136
1137//________________________________________________________________________
1138void AliITSv11GeometrySDD::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
1139 Double_t dx,
1140 Double_t dy,
1141 Double_t dz) const{
1142 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
1143 const Double_t *vect = ct->GetTranslation();
1144 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
1145 ct->SetTranslation(newVect);
1146}
1147
1148
1149//________________________________________________________________________
1150void AliITSv11GeometrySDD::ShowOnePiece(TGeoVolume *moth) {
1151// for code developpment and debugging purposes
1152
1153 if (! fSDDsensor3) CreateBasicObjects();
1154
1155 // moth->AddNode(fPinSupport, 1, 0);
1156 // moth->AddNode(fCoolPipeSupportL, 1, 0);
1157 // moth->AddNode(fSDDsensor3, 1, 0);
1158 // moth->AddNode(fSDDsensor4, 1, 0);
1159 // moth->AddNode(fBaseThermalBridge, 1, 0);
1160 // moth->AddNode(fHybrid,100,0);
1161 // moth->AddNode(fLadderFoot,1,0);
1162 //moth->AddNode(fCardLVL,1,0);
1163 //moth->AddNode(fCardLVR,1,0);
1164
1165 TGeoVolume* seg = CreateLadderSegment( 3, 0);
1166 moth->AddNode(seg, 1, 0);
1167
1168// TGeoVolumeAssembly *lay3Ladder = CreateLadder(3);
1169// moth->AddNode(lay3Ladder, 1, 0);
1170
1171// TGeoVolumeAssembly *lay3Detectors = CreateDetectorsAssembly(3);
1172// moth->AddNode(lay3Detectors, 1, 0);
1173
1174// TGeoVolumeAssembly *lay3Detectors = CreateDetectorsAssembly(3);
1175// moth->AddNode(lay3Detectors, 1, 0);
1176
1177
1178// TGeoVolumeAssembly *endLadder = CreateEndLadder( 4 );
1179// moth->AddNode(endLadder, 1, 0);
1180
1181// TGeoVolumeAssembly *highVCard = CreateHVCard( 4 );
1182// moth->AddNode(highVCard, 1, 0);
1183
1184// TGeoVolumeAssembly *supportRing = CreateSupportRing( 4 );
1185// moth->AddNode(supportRing, 1, 0);
1186
1187// TGeoVolume *endLadderCards = CreateEndLadderCardsV( 4 );
1188// moth->AddNode(endLadderCards, 1, 0);
1189
1190// TGeoVolumeAssembly *carlosCard = CreateCarlosCard( 4 );
1191// moth->AddNode(carlosCard, 1, 0);
1192
1193
1194
1195 /*
1196 //==================================
1197 //--- test of flat cable curvature
1198 //==================================
1199
1200 double angle = 90;
1201 AliITSv11GeomCableFlat cable("test", 3, 0.3);
1202 cable.SetNLayers(1);
1203 cable.SetNLayers(2);
1204 cable.SetLayer(0, 0.2, coolerMediumSDD, 2);
1205 cable.SetLayer(1, 0.1, coolerMediumSDD, 3);
1206 cable.SetInitialNode(endLadderCards);
1207
1208 Double_t p1[3], p2[3], vX[3] = {1,0,0},vY[3] = {0,5,0};
1209
1210 p1[0] = -3;
1211 p1[1] = 1;
1212 p1[2] = 10;
1213
1214 p2[0] = 0;
1215 p2[1] = 1;
1216 p2[2] = 10;
1217 cable.AddCheckPoint(endLadderCards, 0, p1, vX);
1218 cable.AddCheckPoint(endLadderCards, 1, p2, vX);
1219 cable.CreateAndInsertBoxCableSegment(1,angle);
1220
1221 Double_t p3[3], p4[3];
1222
1223 p3[0] = 2;
1224 p3[1] = 3;
1225 p3[2] = 10;
1226 cable.AddCheckPoint(endLadderCards, 2, p3, vY);
1227 cable.CreateAndInsertCableCylSegment(2,angle);
1228
1229 p4[0] = 2;
1230 p4[1] = 6;
1231 p4[2] = 10;
1232 cable.AddCheckPoint(endLadderCards, 3, p4, vY);
1233 cable.CreateAndInsertCableSegment(3,angle);
1234 */
1235}
1236
1237
1238//________________________________________________________________________
1239void AliITSv11GeometrySDD::Layer3(TGeoVolume *moth) {
1240 //
1241 // Insert the layer 3 in the mother volume. This is a virtual volume
1242 // containing ladders of layer 3 and the supporting rings
1243 //
1244
1245 if (! moth) {
1246 printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
1247 return;
1248 };
1249
1250 TGeoMedium *airSDD = GetMedium("SDD AIR$");
1251
1252 fMotherVol = moth;
1253 if (! fSDDsensor3) CreateBasicObjects();
1254
1255 //====================================
1256 // First we create the central barrel
1257 //====================================
1258
1259 TGeoVolumeAssembly *lay3Ladder = CreateLadder(3);
1260 TGeoVolumeAssembly *lay3Detectors = CreateDetectorsAssembly(3);
1261 TGeoVolumeAssembly *lay3Ladd2Det = CreateDetectorsAssemblyLadd2();
1262 //TGeoVolume *lay3Detectors = CreateDetectors(3);
1263 TGeoTube *virtualLayer3Shape = new TGeoTube("ITSsddLayer3Shape",
1264 fgkLay3Rmin,fgkLay3Rmax,fgkLay3Length*0.5);
1265 TGeoVolume *virtualLayer3 = new TGeoVolume("ITSsddLayer3",
1266 virtualLayer3Shape, airSDD);
1267
1268 Double_t dPhi = 360./fgkLay3Nladd;
1269 Double_t detectorsThick = fgkLadWaferSep + 2*fgkWaferThickness;
1270 // Placing virtual ladder and detectors volumes following
1271 // ladder ordering convention
1272 char rotName[30];
1273 Int_t iLaddMin = 0;
1274 Int_t iLaddMax = fgkLay3Nladd;
1275 if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
1276 iLaddMin = fAddOnlyLadder3min;
1277 iLaddMax = fAddOnlyLadder3max+1;
1278 };
1279
1280 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1281
1282 Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1283 snprintf(rotName, 30, "ITSsddLay3Ladd%i",iLadd);
1284 Double_t minRadiusLadBox = fLay3LaddShortRadius-fLay3LadderUnderSegDH;
1285 if (iLadd%2 != 0)
1286 minRadiusLadBox = fLay3LaddLongRadius-fLay3LadderUnderSegDH;
1287 minRadiusLadBox += ((TGeoBBox*)lay3Ladder->GetShape())->GetDY();
1288 TGeoCombiTrans *ctLadd;
1289 //=============================================================
1290 //
1291 // Special modification for ladder 2 of layer 3:
1292 // It has been inverted (pi rotation around y axis)
1293 //
1294 //=============================================================
1295 if (iLadd != 2)
1296 ctLadd = CreateCombiTrans(rotName,minRadiusLadBox,
1297 0, ladderPhi, kTRUE);
1298 else
1299 ctLadd = CreateCombiTrans(rotName,minRadiusLadBox,
1300 0, ladderPhi, kFALSE);
1301 virtualLayer3->AddNode(lay3Ladder, iLadd, ctLadd);
1302 ///////////////////////////////////////////////////
1303 snprintf(rotName, 30, "ITSsddLay3DetBox%i",iLadd);
1304 Double_t minRadiusDetBox = fgkLay3DetShortRadius;
1305 if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
1306 minRadiusDetBox += detectorsThick/2;
1307 TGeoCombiTrans *ctDet;
1308 ctDet = CreateCombiTrans(rotName, minRadiusDetBox,
1309 0, ladderPhi, kTRUE);
1310
1311 if (iLadd != 2)
1312 virtualLayer3->AddNode(lay3Detectors, iLadd, ctDet);
1313 else
1314 virtualLayer3->AddNode(lay3Ladd2Det , iLadd, ctDet);
1315
1316 ///////////////////////////////////////////////////
1317 }
1318
1319 /*
1320 //====================================
1321 // Then the forward rapidity pieces
1322 // (cooling, Carlos, LV, HV ...)
1323 //====================================
1324
1325 Double_t fgkForwardLay3Length = fgkEndLadPipeUlengthLay3+10*fgkmm; // this has to be tune
1326 Double_t fgkForwardLay3Rmin = fgkLay3Rmin-7*fgkmm;
1327 Double_t fgkForwardLay3Rmax = fgkLay3Rmax-5*fgkmm;
1328
1329 TGeoVolumeAssembly* lay3EndLadder = CreateEndLadderCards(3);
1330 TGeoTube *virtualForward3Shape = new TGeoTube("virtualForward3Shape",
1331 fgkForwardLay3Rmin, fgkForwardLay3Rmax,
1332 fgkForwardLay3Length/2.);
1333
1334// TGeoPcon *virtualForward3Shape = new TGeoPcon("virtualForward3Shape",0,360,2);
1335// // virtualForward3Shape->DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax);
1336// virtualForward3Shape->DefineSection(0, Double_t z, Double_t rmin, Double_t rmax);
1337
1338
1339 TGeoVolume *virtualForward3Pos = new TGeoVolume("ITSsddForward3Pos",
1340 virtualForward3Shape, airSDD);
1341 TGeoVolume *virtualForward3Neg = new TGeoVolume("ITSsddForward3Neg",
1342 virtualForward3Shape, airSDD);
1343// TGeoVolume *virtualForward3Neg = new TGeoVolumeAssembly("ITSsddForward3Neg");
1344// TGeoVolume *virtualForward3Pos = new TGeoVolumeAssembly("ITSsddForward3Pos");
1345
1346 TGeoTranslation *virtualForward3TrPos = new TGeoTranslation("virtualForward3TrPos",0,0,
1347 fgkLay3Length/2+fgkForwardLay3Length/2);
1348 TGeoTranslation *virtualForward3TrNeg = new TGeoTranslation("virtualForward3TrNeg",0,0,
1349 -fgkLay3Length/2-fgkForwardLay3Length/2);
1350
1351 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1352
1353 Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1354 Double_t minRadiusDetBox = fgkLay3DetShortRadius;
1355 if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
1356 minRadiusDetBox += detectorsThick/2;
1357
1358 sprintf(rotName, "ITSsddLay3EndLadd%i",iLadd);
1359
1360 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1361 -fgkForwardLay3Length/2, ladderPhi, kTRUE);
1362 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1363 fgkForwardLay3Length/2, ladderPhi, kFALSE);
1364
1365 virtualForward3Pos->AddNode(lay3EndLadder, iLadd*2, ctEndLaddPos);
1366 virtualForward3Neg->AddNode(lay3EndLadder, iLadd*2, ctEndLaddNeg);
1367 }
1368
1369 */
1370
1371
1372 if(GetDebug(1)) {
1373 virtualLayer3->CheckOverlaps(0.01);
1374 //virtualForward3Pos->CheckOverlaps(0.01);
1375 //virtualForward3Neg->CheckOverlaps(0.01);
1376 }
1377
1378 virtualLayer3->SetVisibility(kFALSE);
1379 //virtualForward3Pos->SetVisibility(kFALSE);
1380 //virtualForward3Neg->SetVisibility(kFALSE);
1381
1382
1383 moth->AddNode(virtualLayer3, 1, 0);
1384 //moth->AddNode(virtualForward3Pos, 1, virtualForward3TrPos);
1385 //moth->AddNode(virtualForward3Neg, 1, virtualForward3TrNeg);
1386}
1387
1388
1389// //________________________________________________________________________
1390// void AliITSv11GeometrySDD::ForwardLayer3(TGeoVolume *moth) {
1391// //
1392// // Insert the forward pieces of layer 3 in the mother volume.
1393// // (cooling, Carlos, LV, HV ...)
1394// //
1395
1396// if (! moth) {
1397// printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
1398// return;
1399// };
1400
1401// TGeoMedium *airSDD = GetMedium("SDD AIR$");
1402
1403// if (! fSDDsensor3) CreateBasicObjects();
1404
1405// Double_t dPhi = 360./fgkLay3Nladd;
1406// Double_t detectorsThick = fgkLadWaferSep + 2*fgkWaferThickness;
1407// Int_t iLaddMin = 0;
1408// Int_t iLaddMax = fgkLay3Nladd;
1409// if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
1410// iLaddMin = fAddOnlyLadder3min;
1411// iLaddMax = fAddOnlyLadder3max+1;
1412// };
1413// char rotName[30];
1414
1415
1416// //=================
1417
1418// Double_t fgkForwardLay3Length = fgkEndLadPipeUlengthLay3+10*fgkmm; // this has to be tune
1419// Double_t fgkForwardLay3Rmin = fgkLay3Rmin-7*fgkmm;
1420// Double_t fgkForwardLay3Rmax = fgkLay3Rmax-5*fgkmm;
1421
1422// TGeoVolumeAssembly* lay3EndLadder = CreateEndLadderCards(3);
1423// TGeoTube *virtualForward3Shape = new TGeoTube("virtualForward3Shape",
1424// fgkForwardLay3Rmin, fgkForwardLay3Rmax,
1425// fgkForwardLay3Length/2.);
1426
1427// // TGeoPcon *virtualForward3Shape = new TGeoPcon("virtualForward3Shape",0,360,2);
1428// // // virtualForward3Shape->DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax);
1429// // virtualForward3Shape->DefineSection(0, Double_t z, Double_t rmin, Double_t rmax);
1430
1431
1432// TGeoVolume *virtualForward3Pos = new TGeoVolume("ITSsddForward3Pos",
1433// virtualForward3Shape, airSDD);
1434// TGeoVolume *virtualForward3Neg = new TGeoVolume("ITSsddForward3Neg",
1435// virtualForward3Shape, airSDD);
1436// // TGeoVolume *virtualForward3Neg = new TGeoVolumeAssembly("ITSsddForward3Neg");
1437// // TGeoVolume *virtualForward3Pos = new TGeoVolumeAssembly("ITSsddForward3Pos");
1438
1439// TGeoTranslation *virtualForward3TrPos = new TGeoTranslation("virtualForward3TrPos",0,0,
1440// fgkLay3Length/2+fgkForwardLay3Length/2);
1441// TGeoTranslation *virtualForward3TrNeg = new TGeoTranslation("virtualForward3TrNeg",0,0,
1442// -fgkLay3Length/2-fgkForwardLay3Length/2);
1443
1444// for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1445
1446// Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1447// Double_t minRadiusDetBox = fgkLay3DetShortRadius;
1448// if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
1449// minRadiusDetBox += detectorsThick/2;
1450
1451// sprintf(rotName, "ITSsddLay3EndLadd%i",iLadd);
1452
1453// TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1454// -fgkForwardLay3Length/2, ladderPhi, kTRUE);
1455// TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1456// fgkForwardLay3Length/2, ladderPhi, kFALSE);
1457
1458// virtualForward3Pos->AddNode(lay3EndLadder, iLadd*2, ctEndLaddPos);
1459// virtualForward3Neg->AddNode(lay3EndLadder, iLadd*2, ctEndLaddNeg);
1460// }
1461
1462// if(GetDebug(1)) {
1463// virtualForward3Pos->CheckOverlaps(0.01);
1464// virtualForward3Neg->CheckOverlaps(0.01);
1465// }
1466
1467// virtualForward3Pos->SetVisibility(kFALSE);
1468// virtualForward3Neg->SetVisibility(kFALSE);
1469
1470// moth->AddNode(virtualForward3Pos, 1, virtualForward3TrPos);
1471// moth->AddNode(virtualForward3Neg, 1, virtualForward3TrNeg);
1472// }
1473
1474
1475
1476//________________________________________________________________________
1477void AliITSv11GeometrySDD::ForwardLayer3(TGeoVolume *moth) {
1478 //
1479 // Insert the end-ladder of layer 3 in the mother volume.
1480 // (cooling, Carlos, LV, HV ...)
1481 //
1482
1483 if (! moth) {
1484 printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
1485 return;
1486 };
1487
1488 if (! fSDDsensor3) CreateBasicObjects();
1489
1490 Int_t iLaddMin = 0;
1491 Int_t iLaddMax = fgkLay3Nladd;
1492 if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
1493 iLaddMin = fAddOnlyLadder3min;
1494 iLaddMax = fAddOnlyLadder3max+1;
1495 };
1496
1497 TGeoVolume *virtualForward3Neg = new TGeoVolumeAssembly("ITSsddForward3Neg");
1498 TGeoVolume *virtualForward3Pos = new TGeoVolumeAssembly("ITSsddForward3Pos");
1499
1500 char rotName[30];
1501 Double_t dPhi = 360./fgkLay3Nladd;
1502 TGeoVolume* lay3EndLadder = CreateEndLadderCardsV(3);
1503
1504 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1505
1506 Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1507 Double_t dR = 0;
1508 if (iLadd%2 != 0) dR = fgkLay3DetLongRadius-fgkLay3DetShortRadius;
1509
1510 snprintf(rotName, 30, "ITSsddLay3EndLadd%i",iLadd);
1511
1512 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, dR,
1513 fgkLay3Length/2, ladderPhi, kTRUE);
1514 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, dR,
1515 -fgkLay3Length/2, ladderPhi, kFALSE);
1516
1517 virtualForward3Pos->AddNode(lay3EndLadder, iLadd*2, ctEndLaddPos);
1518 virtualForward3Neg->AddNode(lay3EndLadder, iLadd*2, ctEndLaddNeg);
1519 }
1520
1521 if(GetDebug(1)) {
1522 virtualForward3Pos->CheckOverlaps(0.01);
1523 virtualForward3Neg->CheckOverlaps(0.01);
1524 }
1525
1526 // 180deg Y rotation to compensate the cancellation of ITSD volume
1527 // (idortm[199] in AliITSv11Hybrid : z---> -z; x ---> -x; y ---> y)
1528 TGeoRotation *y180 = new TGeoRotation();
1529 y180->SetAngles( 90.,180., 90., 90.,180., 0.);
1530 moth->AddNode(virtualForward3Pos, 1, y180);
1531 moth->AddNode(virtualForward3Neg, 1, y180);
1532}
1533
1534//________________________________________________________________________
1535void AliITSv11GeometrySDD::Layer4(TGeoVolume *moth) {
1536 //
1537 // Insert the layer 4 in the mother volume. This is a virtual volume
1538 // containing ladders of layer 4 and the supporting rings
1539 //
1540
1541 if (! moth) {
1542 printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
1543 return;
1544 };
1545
1546 fMotherVol = moth;
1547
1548 if (! fSDDsensor3) CreateBasicObjects();
1549
1550 TGeoTube *virtualLayer4Shape =new TGeoTube("ITSsddLayer4Shape",
1551 fgkLay4Rmin,fgkLay4Rmax,fgkLay4Length*0.5);
1552 TGeoMedium *airSDD = GetMedium("SDD AIR$");
1553 TGeoVolume *virtualLayer4 = new TGeoVolume("ITSsddLayer4",
1554 virtualLayer4Shape, airSDD);
1555
1556 //====================================
1557 // First we create the central barrel
1558 //====================================
1559
1560 TGeoVolumeAssembly *lay4Ladder = CreateLadder(4);
1561 //TGeoVolume *lay4Detectors = CreateDetectors(4);
1562 TGeoVolumeAssembly *lay4Detectors = CreateDetectorsAssembly(4);
1563
1564 Double_t dPhi = 360./fgkLay4Nladd;
1565 Double_t detBoxThickness = fgkLadWaferSep + 2*fgkWaferThickness;
1566
1567 // placing virtual ladder and detectors volumes following ladder
1568 // ordering convention
1569 char rotName[30];
1570 Int_t iLaddMin = 0;
1571 Int_t iLaddMax = fgkLay4Nladd;
1572 if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
1573 iLaddMin = fAddOnlyLadder4min;
1574 iLaddMax = fAddOnlyLadder4max+1;
1575 }
1576 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1577
1578 Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1579 snprintf(rotName, 30, "ITSsddLay4Ladd%i",iLadd);
1580 Double_t minRadiusLadBox = fLay4LaddShortRadius-fLay4LadderUnderSegDH;
1581 if (iLadd%2 != 0)
1582 minRadiusLadBox = fLay4LaddLongRadius-fLay4LadderUnderSegDH;
1583 minRadiusLadBox += ((TGeoBBox*)lay4Ladder->GetShape())->GetDY();
1584 TGeoCombiTrans *ctLadd = CreateCombiTrans(rotName, minRadiusLadBox,
1585 0, ladderPhi, kTRUE);
1586 virtualLayer4->AddNode(lay4Ladder, iLadd, ctLadd);
1587 ///////////////////////////////////////////////////
1588 snprintf(rotName, 30, "ITSsddLay4DetBox%i",iLadd);
1589 Double_t minRadiusDetBox = fgkLay4DetShortRadius;
1590 if (iLadd%2 != 0)
1591 minRadiusDetBox = fgkLay4DetLongRadius;
1592 minRadiusDetBox += detBoxThickness/2;
1593 TGeoCombiTrans *ctDet = CreateCombiTrans(rotName, minRadiusDetBox,
1594 0, ladderPhi, kTRUE);
1595 virtualLayer4->AddNode(lay4Detectors, iLadd, ctDet);
1596 ///////////////////////////////////////////////////
1597 }
1598
1599 /*
1600 //====================================
1601 // Then the pieces at forward rapidity
1602 // (cooling, Carlos, LV, HV ...)
1603 //====================================
1604
1605 Double_t fgkForwardLay4Length = fgkEndLadPipeUlengthLay4+10*fgkmm; // this has to be tuned
1606 Double_t fgkForwardLay4Rmin = fgkLay4Rmin-9*fgkmm;
1607 Double_t fgkForwardLay4Rmax = fgkLay4Rmax-5*fgkmm;
1608
1609 TGeoVolumeAssembly* lay4EndLadder = CreateEndLadderCards(4);
1610 TGeoTube *virtualForward4Shape = new TGeoTube("virtualForward3Shape",
1611 fgkForwardLay4Rmin, fgkForwardLay4Rmax,
1612 fgkForwardLay4Length/2.);
1613 TGeoVolume *virtualForward4Pos = new TGeoVolume("ITSsddForward4Pos",
1614 virtualForward4Shape, airSDD);
1615 TGeoVolume *virtualForward4Neg = new TGeoVolume("ITSsddForward4Neg",
1616 virtualForward4Shape, airSDD);
1617// TGeoVolume *virtualForward4Pos = new TGeoVolumeAssembly("ITSsddForward4Pos");
1618// TGeoVolume *virtualForward4Neg = new TGeoVolumeAssembly("ITSsddForward4Neg");
1619
1620 TGeoTranslation *virtualForward4TrPos = new TGeoTranslation("virtualForward4TrPos",0,0,
1621 fgkLay4Length/2+fgkForwardLay4Length/2);
1622 TGeoTranslation *virtualForward4TrNeg = new TGeoTranslation("virtualForward4TrNeg",0,0,
1623 -fgkLay4Length/2-fgkForwardLay4Length/2);
1624
1625 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1626
1627 Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1628 Double_t minRadiusDetBox = fgkLay4DetShortRadius;
1629 if (iLadd%2 != 0)
1630 minRadiusDetBox = fgkLay4DetLongRadius;
1631 minRadiusDetBox += detBoxThickness/2;
1632
1633 sprintf(rotName, "ITSsddLay4EndLadd%i",iLadd);
1634
1635 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1636 -fgkForwardLay4Length/2, ladderPhi, kTRUE);
1637 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1638 fgkForwardLay4Length/2, ladderPhi, kFALSE);
1639 virtualForward4Pos->AddNode(lay4EndLadder, iLadd*2, ctEndLaddPos);
1640 virtualForward4Neg->AddNode(lay4EndLadder, iLadd*2+1, ctEndLaddNeg);
1641 }
1642 */
1643
1644 if(GetDebug(1)) virtualLayer4->CheckOverlaps(0.01);
1645
1646 virtualLayer4->SetVisibility(kFALSE);
1647 //virtualForward4Pos->SetVisibility(kFALSE);
1648 //virtualForward4Neg->SetVisibility(kFALSE);
1649
1650 moth->AddNode(virtualLayer4,1,0);
1651 //moth->AddNode(virtualForward4Pos, 1, virtualForward4TrPos);
1652 //moth->AddNode(virtualForward4Neg, 1, virtualForward4TrNeg);
1653}
1654
1655
1656// //________________________________________________________________________
1657// void AliITSv11GeometrySDD::ForwardLayer4(TGeoVolume *moth) {
1658// //
1659// // Insert the layer 4 in the mother volume. This is a virtual volume
1660// // containing ladders of layer 4 and the supporting rings
1661// // (cooling, Carlos, LV, HV ...)
1662// //
1663
1664// if (! moth) {
1665// printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
1666// return;
1667// };
1668
1669// TGeoMedium *airSDD = GetMedium("SDD AIR$");
1670
1671// if (! fSDDsensor3) CreateBasicObjects();
1672
1673// Double_t dPhi = 360./fgkLay4Nladd;
1674// Double_t detBoxThickness = fgkLadWaferSep + 2*fgkWaferThickness;
1675
1676// // placing virtual ladder and detectors volumes following ladder
1677// // ordering convention
1678// char rotName[20];
1679// Int_t iLaddMin = 0;
1680// Int_t iLaddMax = fgkLay4Nladd;
1681// if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
1682// iLaddMin = fAddOnlyLadder4min;
1683// iLaddMax = fAddOnlyLadder4max+1;
1684// }
1685
1686// //=================
1687// Double_t fgkForwardLay4Length = fgkEndLadPipeUlengthLay4+10*fgkmm; // this has to be tuned
1688// Double_t fgkForwardLay4Rmin = fgkLay4Rmin-9*fgkmm;
1689// Double_t fgkForwardLay4Rmax = fgkLay4Rmax-5*fgkmm;
1690
1691// TGeoVolumeAssembly* lay4EndLadder = CreateEndLadderCards(4);
1692// TGeoTube *virtualForward4Shape = new TGeoTube("virtualForward3Shape",
1693// fgkForwardLay4Rmin, fgkForwardLay4Rmax,
1694// fgkForwardLay4Length/2.);
1695// TGeoVolume *virtualForward4Pos = new TGeoVolume("ITSsddForward4Pos",
1696// virtualForward4Shape, airSDD);
1697// TGeoVolume *virtualForward4Neg = new TGeoVolume("ITSsddForward4Neg",
1698// virtualForward4Shape, airSDD);
1699// // TGeoVolume *virtualForward4Pos = new TGeoVolumeAssembly("ITSsddForward4Pos");
1700// // TGeoVolume *virtualForward4Neg = new TGeoVolumeAssembly("ITSsddForward4Neg");
1701
1702// TGeoTranslation *virtualForward4TrPos = new TGeoTranslation("virtualForward4TrPos",0,0,
1703// fgkLay4Length/2+fgkForwardLay4Length/2);
1704// TGeoTranslation *virtualForward4TrNeg = new TGeoTranslation("virtualForward4TrNeg",0,0,
1705// -fgkLay4Length/2-fgkForwardLay4Length/2);
1706
1707// for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1708
1709// Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1710// Double_t minRadiusDetBox = fgkLay4DetShortRadius;
1711// if (iLadd%2 != 0)
1712// minRadiusDetBox = fgkLay4DetLongRadius;
1713// minRadiusDetBox += detBoxThickness/2;
1714
1715// sprintf(rotName, "ITSsddLay4EndLadd%i",iLadd);
1716
1717// TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1718// -fgkForwardLay4Length/2, ladderPhi, kTRUE);
1719// TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1720// fgkForwardLay4Length/2, ladderPhi, kFALSE);
1721// virtualForward4Pos->AddNode(lay4EndLadder, iLadd*2, ctEndLaddPos);
1722// virtualForward4Neg->AddNode(lay4EndLadder, iLadd*2+1, ctEndLaddNeg);
1723// }
1724
1725// virtualForward4Pos->SetVisibility(kFALSE);
1726// virtualForward4Neg->SetVisibility(kFALSE);
1727
1728// moth->AddNode(virtualForward4Pos, 1, virtualForward4TrPos);
1729// moth->AddNode(virtualForward4Neg, 1, virtualForward4TrNeg);
1730// }
1731
1732
1733//________________________________________________________________________
1734void AliITSv11GeometrySDD::ForwardLayer4(TGeoVolume *moth) {
1735 //
1736 // Insert the end-ladder of layer 4 in the mother volume.
1737 // (cooling, Carlos, LV, HV ...)
1738 //
1739
1740 if (! moth) {
1741 printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
1742 return;
1743 };
1744
1745 if (! fSDDsensor3) CreateBasicObjects();
1746
1747 // placing virtual ladder and detectors volumes following ladder
1748 // ordering convention
1749 Int_t iLaddMin = 0;
1750 Int_t iLaddMax = fgkLay4Nladd;
1751 if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
1752 iLaddMin = fAddOnlyLadder4min;
1753 iLaddMax = fAddOnlyLadder4max+1;
1754 }
1755
1756 TGeoVolume *virtualForward4Pos = new TGeoVolumeAssembly("ITSsddForward4Pos");
1757 TGeoVolume *virtualForward4Neg = new TGeoVolumeAssembly("ITSsddForward4Neg");
1758
1759 char rotName[30];
1760 Double_t dPhi = 360./fgkLay4Nladd;
1761 TGeoVolume* lay4EndLadder = CreateEndLadderCardsV(4);
1762
1763 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1764
1765 Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1766 Double_t dR = 0;
1767 if (iLadd%2 != 0)
1768 dR = fgkLay4DetLongRadius-fgkLay4DetShortRadius;
1769
1770 snprintf(rotName, 30, "ITSsddLay4EndLadd%i",iLadd);
1771
1772 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, dR,
1773 fgkLay4Length/2, ladderPhi, kTRUE);
1774 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, dR,
1775 -fgkLay4Length/2, ladderPhi, kFALSE);
1776 virtualForward4Pos->AddNode(lay4EndLadder, iLadd*2, ctEndLaddPos);
1777 virtualForward4Neg->AddNode(lay4EndLadder, iLadd*2, ctEndLaddNeg);
1778 }
1779
1780 // 180deg Y rotation to compensate the cancellation of ITSD volume
1781 // (idortm[199] in AliITSv11Hybrid : z---> -z; x ---> -x; y ---> y)
1782 TGeoRotation *y180 = new TGeoRotation();
1783 y180->SetAngles( 90.,180., 90., 90.,180., 0.);
1784 moth->AddNode(virtualForward4Pos, 1, y180);
1785 moth->AddNode(virtualForward4Neg, 1, y180);
1786}
1787
1788
1789//________________________________________________________________________
1790TGeoVolumeAssembly *AliITSv11GeometrySDD::CreateLadder(Int_t iLay) {
1791 //
1792 // return an assembly volume containing the CF ladder
1793 //
1794
1795 Int_t nDetectors = fgkLay3Ndet;
1796 Double_t ladderLength = fgkLay3LadderLength;
1797 Double_t underSegDH = fLay3LadderUnderSegDH;
1798 Double_t *sensorZPos = fLay3sensorZPos;
1799 AliITSv11GeomCableFlat *digitCableA = fDigitCableLay3A;
1800 AliITSv11GeomCableFlat *digitCableB = fDigitCableLay3B;
1801
1802 if (iLay==3) {}
1803 else if (iLay==4) {
1804 nDetectors = fgkLay4Ndet;
1805 ladderLength = fgkLay4LadderLength;
1806 digitCableA = fDigitCableLay4A;
1807 digitCableB = fDigitCableLay4B;
1808 underSegDH = fLay4LadderUnderSegDH;
1809 sensorZPos = fLay4sensorZPos;
1810 }
1811 else {
1812 printf("AliITSv11GeometrySDD::CreateLadder : error=wrong layer\n");
1813 };
1814 Double_t ladderBoxDH = fgkLadderHeight+fgkLadderSegBoxDH+underSegDH;
1815 TGeoVolumeAssembly *virtualLadder = new TGeoVolumeAssembly("ITSsddLadder");
1816
1817 // placing virtual ladder segment following detector ordering convention
1818 //=======================================================================
1819 char transName[30];
1820
1821 // adding segment this way to create cable points in the correct order ...
1822 for (Int_t iSegment = nDetectors/2-1; iSegment >= 0; iSegment-- ) {
1823
1824 //TGeoVolumeAssembly *laddSegment = CreateLadderSegment(iLay, iSegment);
1825 TGeoVolume *laddSegment = CreateLadderSegment(iLay, iSegment);
1826 snprintf(transName, 30, "ITSsddLay%iLaddSeg%i", iLay, iSegment);
1827 Double_t segmentPos = fgkSegmentLength*(nDetectors/2-1-iSegment)
1828 + fgkSegmentLength/2;
1829 TGeoTranslation *segTr = new TGeoTranslation(transName, 0,
1830 underSegDH/2,segmentPos);
1831 ////
1832 virtualLadder->AddNode(laddSegment, iSegment, segTr);
1833 };
1834 for (Int_t iSegment = nDetectors/2; iSegment < nDetectors; iSegment++ ) {
1835
1836 TGeoVolume *laddSegment = CreateLadderSegment(iLay, iSegment);
1837 //TGeoVolumeAssembly *laddSegment = CreateLadderSegment(iLay, iSegment);
1838 snprintf(transName, 30, "ITSsddLay%iLaddSeg%i", iLay, iSegment);
1839 Double_t segmentPos = fgkSegmentLength*(nDetectors/2-1-iSegment)
1840 + fgkSegmentLength/2;
1841 TGeoTranslation *segTr = new TGeoTranslation(transName, 0,
1842 underSegDH/2,segmentPos);
1843 ////
1844 virtualLadder->AddNode(laddSegment, iSegment, segTr);
1845 };
1846
1847 // putting virtual volume corresponding to the end of ladder
1848 //=======================================================================
1849 TGeoVolumeAssembly *endLadder = CreateEndLadder( iLay );
1850 Double_t endLength = (ladderLength - nDetectors*fgkSegmentLength)/2.;
1851 TGeoTranslation *endTrZPos = new TGeoTranslation("ITSsddEndTrZPos",0,0,
1852 fgkSegmentLength*(nDetectors/2)+endLength/2.);
1853 // Euler rotation : about Z, then new X, then new Z
1854 TGeoRotation *endZNegRot = new TGeoRotation("",90, 180, -90);
1855 TGeoCombiTrans *endTrZNeg = new TGeoCombiTrans(0,0,
1856 -fgkSegmentLength*(nDetectors/2)-endLength/2.,endZNegRot);
1857 virtualLadder->AddNode(endLadder, 1, endTrZPos);
1858 virtualLadder->AddNode(endLadder, 2, endTrZNeg);
1859
1860 // creating and inserting cable segments
1861 // (check points are placed while creating segments)
1862 //=======================================================================
1863 if (fAddCables)
1864 for (Int_t iSegment = 0; iSegment < nDetectors; iSegment++ ) {
1865
1866 digitCableA[iSegment].SetInitialNode(virtualLadder);
1867 digitCableB[iSegment].SetInitialNode(virtualLadder);
1868
1869 for (Int_t iPt=1; iPt<digitCableA[iSegment].GetNCheckPoints(); iPt++ ) {
1870 Double_t rotation = 0;
1871 if (iPt>1) {
1872 rotation = 90-fgkHybridAngle;
1873 digitCableA[iSegment].CreateAndInsertCableSegment(iPt, rotation);
1874 } else
1875 digitCableA[iSegment].CreateAndInsertCableSegment(iPt);
1876
1877 };
1878
1879 for (Int_t iPt=1; iPt<digitCableB[iSegment].GetNCheckPoints(); iPt++ ) {
1880 Double_t rotation = 0;
1881 if (iPt>1) {
1882 rotation = fgkHybridAngle-90;
1883 digitCableB[iSegment].CreateAndInsertCableSegment(iPt, rotation);
1884 } else
1885 digitCableB[iSegment].CreateAndInsertCableSegment(iPt);
1886 };
1887 };
1888
1889 // HV cable
1890 //=======================================================================
1891 if (fAddHVcables) {
1892 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$"); //ITSsddKAPTON_POLYCH2
1893 TGeoMedium *alSDD = GetMedium("AL$"); //ITSal
1894
1895 AliITSv11GeomCableFlat cableHV[fgkLay4Ndet]; // temp !!!
1896 char cableHVname[30];
1897 for (Int_t iSegment = 0; iSegment<nDetectors; iSegment++) {
1898 snprintf(cableHVname,30,"ITSsddHVcable%i", iSegment);
1899 cableHV[iSegment].SetName(cableHVname);
1900 cableHV[iSegment].SetThickness(fgkLongHVcablePolyThick+fgkLongHVcableAlThick);
1901 cableHV[iSegment].SetWidth(fgkTransitHVtailWidth);
1902 cableHV[iSegment].SetNLayers(2);
1903 cableHV[iSegment].SetLayer(0, fgkLongHVcablePolyThick, polyhamideSDD,
1904 fColorPolyhamide);
1905 cableHV[iSegment].SetLayer(1, fgkLongHVcableAlThick, alSDD, fColorAl);
1906 cableHV[iSegment].SetInitialNode(virtualLadder);
1907 };
1908 Double_t x1[3], x2[3], x3[3],
1909 vY[3] = {0,1,0}, vZ[3] = {0,0,1}, vYZ[3]={0,1,1};
1910
1911 x1[0] = -fgkTransitHVtailXpos;
1912 x2[0] = -fgkTransitHVtailXpos;
1913 x3[0] = -fgkTransitHVtailXpos;
1914 for (Int_t iSegment = nDetectors/2-1; iSegment >= 0; iSegment-- ) {
1915 Double_t cableSeparation = TMath::Abs(iSegment - (nDetectors/2-1))
1916 *fgkLongHVcableSeparation;
1917 // adjust where HV long cable starts in Y
1918 // useful if you want to let some space for alignment
1919 x1[1] = - ladderBoxDH/2 + 2*fgkmm;
1920 x2[1] = - ladderBoxDH/2 + underSegDH - cableSeparation
1921 - (fgkLongHVcablePolyThick+fgkLongHVcableAlThick)/2;
1922 x3[1] = x2[1];
1923 x1[2] = sensorZPos[iSegment]+fgkTransitHVtailLength-5*fgkmm;
1924 x2[2] = x1[2]+5*fgkmm;
1925 x3[2] = ladderLength/2-endLength;
1926 cableHV[iSegment].AddCheckPoint( virtualLadder, 0, x1, vY );
1927 cableHV[iSegment].AddCheckPoint( virtualLadder, 1, x2, vZ ); // vYZ
1928 cableHV[iSegment].AddCheckPoint( virtualLadder, 2, x3, vZ );
1929
1930 //cableHV[iSegment].CreateAndInsertCableSegment(1,0);
1931 cableHV[iSegment].CreateAndInsertCableCylSegment(1, -45+180);
1932 //cableHV[iSegment].CreateAndInsertCableSegment(2,0);
1933 cableHV[iSegment].CreateAndInsertBoxCableSegment(2,0);
1934 };
1935
1936 vYZ[2] = -1;
1937 x1[0] = fgkTransitHVtailXpos;
1938 x2[0] = fgkTransitHVtailXpos;
1939 x3[0] = fgkTransitHVtailXpos;
1940
1941 for (Int_t iSegment = nDetectors/2; iSegment < nDetectors; iSegment++ ) {
1942 Double_t cableSeparation = TMath::Abs(iSegment - (nDetectors/2-1))
1943 *fgkLongHVcableSeparation;
1944 x1[1] = - ladderBoxDH/2 + 2*fgkmm; // adjust where HV long cable starts in Y
1945 x2[1] = - ladderBoxDH/2 + underSegDH - cableSeparation
1946 - (fgkLongHVcablePolyThick+fgkLongHVcableAlThick)/2;
1947 x3[1] = x2[1];
1948 x1[2] = sensorZPos[iSegment]-fgkTransitHVtailLength+5*fgkmm;
1949 x2[2] = x1[2]-5*fgkmm;
1950 x3[2] = -ladderLength/2+endLength;
1951 cableHV[iSegment].AddCheckPoint( virtualLadder, 0, x1, vY );
1952 cableHV[iSegment].AddCheckPoint( virtualLadder, 1, x2, vZ ); // vYZ
1953 cableHV[iSegment].AddCheckPoint( virtualLadder, 2, x3, vZ );
1954
1955 cableHV[iSegment].CreateAndInsertCableCylSegment(1, -45);
1956 cableHV[iSegment].CreateAndInsertBoxCableSegment(2,0);
1957 };
1958 };
1959
1960 //**********************************
1961 if(GetDebug(1)) virtualLadder->CheckOverlaps(0.01);
1962 return virtualLadder;
1963}
1964
1965
1966//________________________________________________________________________
1967TGeoArb8 *AliITSv11GeometrySDD::CreateLadderSide(const char *name,
1968 Double_t dz, Double_t angle, Double_t xSign,
1969 Double_t L, Double_t H, Double_t l) {
1970 // Create one half of the V shape corner of CF ladder
1971
1972 TGeoArb8 *cfLaddSide = new TGeoArb8(dz);
1973 cfLaddSide->SetName(name);
1974
1975 // Points must be in clockwise order
1976 cfLaddSide->SetVertex(0, 0, 0);
1977 cfLaddSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
1978 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
1979 cfLaddSide->SetVertex(4, 0, 0);
1980 cfLaddSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
1981 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
1982 if (xSign < 0) {
1983 cfLaddSide->SetVertex(1, 0, -H);
1984 cfLaddSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1985 cfLaddSide->SetVertex(5, 0, -H);
1986 cfLaddSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1987 } else {
1988 cfLaddSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1989 cfLaddSide->SetVertex(3, 0, -H);
1990 cfLaddSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1991 cfLaddSide->SetVertex(7, 0, -H);
1992 }
1993 return cfLaddSide;
1994}
1995
1996
1997//________________________________________________________________________
1998TGeoVolume* AliITSv11GeometrySDD::CreateHybrid(Int_t iLRSide) {
1999 //
2000 // return a box containing the front-end hybrid
2001 //
2002
2003 Double_t roundHoleX = -fgkHybridWidth/2+fgkHybRndHoleX;
2004
2005 Double_t screenTotalThick = fgkHybGlueScrnThick+fgkHybUpThick+fgkHybAlThick;
2006 Double_t lowFLTotalThick = fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick;
2007// Double_t upFLTotalThick = fgkHybGlueUpThick +fgkHybUpThick+fgkHybAlThick;
2008 Double_t chipsCCTotThick = fgkHybUnderNiThick+fgkHybGlueAgThick
2009 +fgkHybChipThick+2*(fgkHybUpCCThick+fgkHybAlCCThick);
2010 Double_t ccUpLayerTotThick = fgkHybUpCCThick+fgkHybAlCCThick+fgkHybUpCCThick;
2011// Double_t volumeThick = (fgkHybridThBridgeThick+screenTotalThick+lowFLTotalThick
2012// + upFLTotalThick + ccUpLayerTotThick);
2013 Double_t volumeThick = (fgkHybridThBridgeThick+screenTotalThick+lowFLTotalThick
2014 +fgkHybSMDheight);
2015 Double_t lowLayerYmin = -volumeThick/2+fgkHybridThBridgeThick
2016 +screenTotalThick;
2017 Double_t flUpThick = fgkHybGlueUpThick+fgkHybUpThick;
2018
2019 //**************************************************** media :
2020 TGeoMedium *airSDD = GetMedium("SDD AIR$");
2021 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDDKAPTON (POLYCH2)$"); //ITSsddCarbonM55J
2022 TGeoMedium *alSDD = GetMedium("AL$"); //ITSal
2023 TGeoMedium *alSDD80p100 = GetMedium("AL$"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2024 TGeoMedium *alSDD50p100 = GetMedium("AL$"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2025 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$"); //ITSsddKAPTON_POLYCH2
2026 TGeoMedium *niSDD = GetMedium("NICKEL$");
2027 TGeoMedium *glueAG = GetMedium("SDDKAPTON (POLYCH2)$"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2028 TGeoMedium *siliconSDD = GetMedium("SDD SI CHIP$"); //ITSsddSiChip
2029 TGeoMedium *medSMD = GetMedium("SDD X7R capacitors$"); // SDDX7Rcapacitors
2030 TGeoMedium *medSMDweld = GetMedium("SDD X7R weld$");
2031
2032 //**************************************************** main volume :
2033// TGeoBBox *hybridBox = new TGeoBBox("",fgkHybridWidth/2, volumeThick/2,
2034// (fgkHybridLength)/2);
2035 Double_t xhybr[6],yhybr[6];
2036 xhybr[0] = -fgkHybridWidth/2;
2037 yhybr[0] = -volumeThick/2;
2038 xhybr[1] = fgkHybridWidth/2;
2039 yhybr[1] = -volumeThick/2;
2040 xhybr[2] = fgkHybridWidth/2;
2041 yhybr[2] = volumeThick/2;
2042 xhybr[3] = -fgkHybridWidth/2;
2043 yhybr[3] = volumeThick/2;
2044 xhybr[4] = xhybr[3] - 1.05*fgkHybCC2SensorLen*SinD(fgkHybCC2SensorAng);
2045 yhybr[4] = yhybr[3] - 1.05*fgkHybCC2SensorLen*CosD(fgkHybCC2SensorAng);
2046 xhybr[5] = xhybr[4];
2047 yhybr[5] = yhybr[4] - volumeThick;
2048
2049 TGeoXtru *hybridBox = new TGeoXtru(2);
2050 hybridBox->DefinePolygon(6, xhybr, yhybr);
2051 hybridBox->DefineSection(0,-fgkHybridLength/2);
2052 hybridBox->DefineSection(1, fgkHybridLength/2);
2053
2054 TGeoVolume *hybrid = new TGeoVolume("ITSsddHybridVol", hybridBox,
2055 airSDD);
2056
2057 TGeoBBox *sThermalBridge = new TGeoBBox( "", fgkHybridWidth/2,
2058 fgkHybridThBridgeThick/2,
2059 fgkHybridLength/2);
2060
2061 //**************************************************** Thermal bridge :
2062 TGeoVolume *vThermalBridge = new TGeoVolume("ITSsddHybridThBridge",
2063 sThermalBridge,
2064 carbonFiberLadderStruct);
2065 vThermalBridge->SetLineColor(fColorCarbonFiber);
2066 TGeoTranslation *thBridgeTr = new TGeoTranslation(0, -volumeThick/2
2067 +fgkHybridThBridgeThick/2, 0);
2068 hybrid->AddNode(vThermalBridge, 1, thBridgeTr);
2069
2070 //**************************************************** Screen layer :
2071 TGeoBBox *sAlScreenLayer = new TGeoBBox("sAlScreenLayer", fgkHybridWidth/2,
2072 fgkHybAlThick/2, fgkHybridLength/2);
2073 //here the upedex and glue layers are both assumed to be polyimide
2074 TGeoBBox *sUpGlueScreenLayer = new TGeoBBox("sUpGlueScreenLayer",
2075 fgkHybridWidth/2,
2076 (fgkHybUpThick+fgkHybGlueScrnThick)/2,
2077 fgkHybridLength/2);
2078 TGeoTube *sRoundHole = new TGeoTube("sRoundHole", 0, fgkHybRndHoleRad,
2079 (screenTotalThick+lowFLTotalThick)/2);
2080
2081 TGeoTranslation *upGlueScreenTr = new TGeoTranslation("upGlueScreenTr",0,
2082 -volumeThick/2+fgkHybridThBridgeThick+(fgkHybUpThick+fgkHybGlueScrnThick)/2,0);
2083
2084 TGeoTranslation *alScreenTr = new TGeoTranslation("AlScreenTr", 0,
2085 -volumeThick/2+fgkHybridThBridgeThick+fgkHybUpThick+fgkHybGlueScrnThick
2086 +fgkHybAlThick/2, 0);
2087
2088 TGeoTranslation hybHolePos1Tr(roundHoleX,
2089 -volumeThick/2+fgkHybridThBridgeThick+(screenTotalThick+lowFLTotalThick)/2,
2090 -fgkHybridLength/2+fgkHybRndHoleZ);
2091 TGeoTranslation hybHolePos2Tr(roundHoleX,
2092 -volumeThick/2+fgkHybridThBridgeThick+(screenTotalThick+lowFLTotalThick)/2,
2093 fgkHybridLength/2-fgkHybRndHoleZ);
2094
2095 TGeoRotation *rotHole = new TGeoRotation("", 0, 90, 0);
2096 TGeoCombiTrans *hybHolePos1 = new TGeoCombiTrans(hybHolePos1Tr, *rotHole);
2097 hybHolePos1->SetName("hybHolePos1");
2098 TGeoCombiTrans *hybHolePos2 = new TGeoCombiTrans(hybHolePos2Tr, *rotHole);
2099 hybHolePos2->SetName("hybHolePos2");
2100
2101 upGlueScreenTr->RegisterYourself();
2102 alScreenTr->RegisterYourself();
2103 hybHolePos1->RegisterYourself();
2104 hybHolePos2->RegisterYourself();
2105 delete rotHole;
2106
2107 TGeoCompositeShape *sScreenAl = new TGeoCompositeShape(
2108 "sAlScreenLayer:AlScreenTr-(sRoundHole:hybHolePos1"
2109 "+sRoundHole:hybHolePos2)");
2110 TGeoVolume *vScreenAl = new TGeoVolume("vScreenAl",sScreenAl, alSDD);
2111 vScreenAl->SetLineColor(fColorAl);
2112 TGeoCompositeShape *sScreenUpGlue = new TGeoCompositeShape(
2113 "sUpGlueScreenLayer:upGlueScreenTr-(sRoundHole:hybHolePos1"
2114 "+sRoundHole:hybHolePos2)");
2115 TGeoVolume *vScreenUpGlue = new TGeoVolume("vScreenUpGlue",
2116 sScreenUpGlue,polyhamideSDD);
2117 vScreenUpGlue->SetLineColor(fColorPolyhamide);
2118
2119 hybrid->AddNode(vScreenUpGlue, 1, 0);
2120 hybrid->AddNode(vScreenAl, 1, 0);
2121
2122 //**************************************************** FL low layer :
2123 Double_t sideWidth1 = fgkHybFLlowChipZ1 - fgkHybFLlowHoleDZ/2;
2124 Double_t sideWidth2 = fgkHybridLength - fgkHybFLlowChipZ4 - fgkHybFLlowHoleDZ/2;
2125
2126 //here the upedex and glue layers are both assumed to be polyimide
2127 TGeoBBox *sUpGlueBar1 = new TGeoBBox("sUpGlueBar1", fgkHybridWidth/2,
2128 (fgkHybGlueLowThick+fgkHybUpThick)/2,
2129 sideWidth1/2);
2130 TGeoBBox *sAlBar1 = new TGeoBBox("sAlBar1", fgkHybridWidth/2,
2131 fgkHybAlThick/2, sideWidth1/2);
2132
2133 TGeoTranslation *upGlueBarTr1 = new TGeoTranslation("upGlueBarTr1", 0,
2134 lowLayerYmin+(fgkHybGlueLowThick+fgkHybUpThick)/2,
2135 -(fgkHybridLength-sideWidth1)/2);
2136 TGeoTranslation *alBarTr1 = new TGeoTranslation("alBarTr1", 0,
2137 lowLayerYmin+fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick/2,
2138 -(fgkHybridLength-sideWidth1)/2);
2139 upGlueBarTr1->RegisterYourself();
2140 alBarTr1->RegisterYourself();
2141
2142 TGeoCompositeShape *sLowUpGlueBar1 = new TGeoCompositeShape(
2143 "sUpGlueBar1:upGlueBarTr1-sRoundHole:hybHolePos1");
2144 TGeoCompositeShape *sLowAlBar1 = new TGeoCompositeShape(
2145 "sAlBar1:alBarTr1-sRoundHole:hybHolePos1");
2146 TGeoVolume *vLowUpGlueBar1 = new TGeoVolume("vLowUpGlueBar1",
2147 sLowUpGlueBar1, polyhamideSDD);
2148 TGeoVolume *vLowAlBar1 = new TGeoVolume("vLowAlBar1",
2149 sLowAlBar1, alSDD);
2150 vLowUpGlueBar1->SetLineColor(fColorPolyhamide);
2151 vLowAlBar1->SetLineColor(fColorAl);
2152 hybrid->AddNode(vLowUpGlueBar1,1,0);
2153 hybrid->AddNode(vLowAlBar1,1,0);
2154
2155 //---
2156 //here the upedex and glue layers are both assumed to be polyimide
2157 TGeoBBox *sUpGlueBar2 = new TGeoBBox("sUpGlueBar2", fgkHybridWidth/2,
2158 (fgkHybGlueLowThick+fgkHybUpThick)/2,
2159 sideWidth2/2);
2160 TGeoBBox *sAlBar2 = new TGeoBBox("sAlBar2", fgkHybridWidth/2,
2161 fgkHybAlThick/2, sideWidth2/2);
2162
2163 TGeoTranslation *upGlueBarTr2 = new TGeoTranslation("upGlueBarTr2", 0,
2164 lowLayerYmin+(fgkHybGlueLowThick+fgkHybUpThick)/2,
2165 (fgkHybridLength-sideWidth2)/2);
2166 TGeoTranslation *alBarTr2 = new TGeoTranslation("alBarTr2", 0,
2167 lowLayerYmin+fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick/2,
2168 (fgkHybridLength-sideWidth2)/2);
2169 upGlueBarTr2->RegisterYourself();
2170 alBarTr2->RegisterYourself();
2171
2172 TGeoCompositeShape *sLowUpGlueBar2 = new TGeoCompositeShape(
2173 "sUpGlueBar2:upGlueBarTr2-sRoundHole:hybHolePos2");
2174 TGeoCompositeShape *sLowAlBar2 = new TGeoCompositeShape(
2175 "sAlBar2:alBarTr2-sRoundHole:hybHolePos2");
2176 TGeoVolume *vLowUpGlueBar2 = new TGeoVolume("vLowUpGlueBar2",sLowUpGlueBar2,
2177 polyhamideSDD);
2178 TGeoVolume *vLowAlBar2 = new TGeoVolume("vLowAlBar2",sLowAlBar2,
2179 alSDD);
2180 vLowUpGlueBar2->SetLineColor(fColorPolyhamide);
2181 vLowAlBar2->SetLineColor(fColorAl);
2182 hybrid->AddNode(vLowUpGlueBar2, 1, 0);
2183 hybrid->AddNode(vLowAlBar2, 1, 0);
2184
2185 if(GetDebug(3)) { // Remove compiler warning.
2186 sAlScreenLayer->InspectShape();
2187 sUpGlueScreenLayer->InspectShape();
2188 sRoundHole->InspectShape();
2189 sUpGlueBar1->InspectShape();
2190 sUpGlueBar2->InspectShape();
2191 sAlBar1->InspectShape();
2192 sAlBar2->InspectShape();
2193 };
2194 //---
2195 //using class AliITSv11GeomCableFlat to add 2-layer segments ...
2196 Double_t piece1width = fgkHybFLlowPasX-fgkHybFLlowHolePasDX/2;
2197 AliITSv11GeomCableFlat lowFLpiece("lowFLpiece1",piece1width,
2198 lowFLTotalThick);
2199 lowFLpiece.SetNLayers(2);
2200 lowFLpiece.SetLayer(0, fgkHybGlueLowThick+fgkHybUpThick, polyhamideSDD,
2201 fColorPolyhamide);
2202 lowFLpiece.SetLayer(1, fgkHybAlThick, alSDD80p100, fColorAl);
2203 // alSDD at 80% : mostly to take into account strips of piece 3
2204
2205 Double_t x1[3] = { -fgkHybridWidth/2 + piece1width/2,
2206 lowLayerYmin + lowFLTotalThick/2,
2207 -fgkHybridLength/2 + sideWidth1 };
2208 Double_t x2[3] ={ x1[0], x1[1], fgkHybridLength/2 - sideWidth2 };
2209 Double_t vZ[3] = {0,0,1};
2210 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
2211 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
2212 lowFLpiece.SetInitialNode(hybrid);
2213 lowFLpiece.CreateAndInsertBoxCableSegment(1);
2214 lowFLpiece.ResetPoints();
2215
2216 Double_t piece2width = fgkHybFLlowAmbX-fgkHybFLlowPasX
2217 -fgkHybFLlowHolePasDX/2-fgkHybFLlowHoleAmbDX/2;
2218
2219 lowFLpiece.SetWidth(piece2width);
2220 lowFLpiece.SetName("lowFLpiece2");
2221 x1[0] = piece2width/2+fgkHybFLlowPasX+fgkHybFLlowHolePasDX/2-fgkHybridWidth/2;
2222 x2[0] = x1[0];
2223 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
2224 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
2225 lowFLpiece.CreateAndInsertBoxCableSegment(1);
2226 lowFLpiece.ResetPoints();
2227
2228 Double_t piece3width = fgkHybridWidth - fgkHybFLlowAmbX
2229 - fgkHybFLlowHoleAmbDX/2;
2230
2231 lowFLpiece.SetWidth(piece3width);
2232 lowFLpiece.SetName("lowFLpiece3");
2233 x1[0] = fgkHybridWidth/2-piece3width/2;
2234 x2[0] = x1[0];
2235 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
2236 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
2237 lowFLpiece.CreateAndInsertBoxCableSegment(1);
2238
2239 Double_t zChips[4] = {fgkHybFLlowChipZ1,fgkHybFLlowChipZ2,
2240 fgkHybFLlowChipZ3,fgkHybFLlowChipZ4};
2241 Double_t vX[3] = {1,0,0};
2242 for (Int_t i=0; i<3; i++) {
2243 char ch[20];
2244 snprintf(ch, 20, "lowFLpieceA%i", i+4);
2245 lowFLpiece.SetName(ch);
2246 lowFLpiece.SetWidth(zChips[i+1]-zChips[i]-fgkHybFLlowHoleDZ);
2247
2248 lowFLpiece.SetLayer(1, fgkHybAlThick, alSDD, fColorAl);
2249 x1[0] = -fgkHybridWidth/2 + piece1width;
2250 x2[0] = x1[0] + fgkHybFLlowHolePasDX;
2251 Double_t zPiece = (zChips[i+1]+zChips[i])/2 - fgkHybridLength/2;
2252 x1[2] = zPiece; x2[2] = zPiece;
2253 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vX );
2254 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vX );
2255 lowFLpiece.CreateAndInsertBoxCableSegment(1,90);
2256 lowFLpiece.ResetPoints();
2257
2258 snprintf(ch, 20, "lowFLpieceB%i", i+4);
2259 lowFLpiece.SetName(ch);
2260 x1[0] = fgkHybridWidth/2 - piece3width;
2261 x2[0] = x1[0] - fgkHybFLlowHoleAmbDX;
2262 lowFLpiece.AddCheckPoint( hybrid, 0, x1, vX );
2263 lowFLpiece.AddCheckPoint( hybrid, 1, x2, vX );
2264 lowFLpiece.CreateAndInsertBoxCableSegment(1,90);
2265 };
2266
2267 //**************************************************** chips+CC:
2268 AliITSv11GeomCableFlat chip("", fgkHybChipsDZ, chipsCCTotThick);
2269 chip.SetInitialNode(hybrid);
2270 chip.SetNLayers(5);
2271 chip.SetLayer(0, fgkHybUnderNiThick, niSDD, 2);
2272 chip.SetLayer(1, fgkHybGlueAgThick, glueAG, 4);
2273 chip.SetLayer(2, fgkHybChipThick, siliconSDD, fColorSilicon);
2274 chip.SetLayer(3, fgkHybUpCCThick+fgkHybUpCCThick, polyhamideSDD,
2275 fColorPolyhamide);
2276 chip.SetLayer(4, fgkHybAlCCThick+fgkHybAlCCThick, alSDD80p100, fColorAl);
2277 // Here the tho CC (low+up) are merged
2278 // In fact, the last layer has a smaller surface of Al -> I put 80%
2279
2280 x1[1] = lowLayerYmin + chipsCCTotThick/2;
2281 x2[1] = x1[1];
2282 char ch[20];
2283
2284 for (Int_t i=0; i<4; i++) {
2285 snprintf(ch, 20, "pascalCC%i", i);
2286 chip.SetName(ch);
2287 x1[0] = fgkHybFLlowPasX - fgkHybridWidth/2 - fgkHybPascalDX/2;
2288 x2[0] = x1[0] + fgkHybPascalDX;
2289 x1[2] = zChips[i] - fgkHybridLength/2;
2290 x2[2] = x1[2];
2291 chip.AddCheckPoint( hybrid, 0, x1, vX );
2292 chip.AddCheckPoint( hybrid, 1, x2, vX );
2293 chip.CreateAndInsertBoxCableSegment(1,-90);
2294 chip.ResetPoints();
2295
2296 snprintf(ch, 20, "ambraCC%i", i);
2297 chip.SetName(ch);
2298 x1[0] = fgkHybFLlowAmbX - fgkHybridWidth/2 - fgkHybAmbraDX/2;
2299 x2[0] = x1[0] + fgkHybAmbraDX;
2300 chip.AddCheckPoint( hybrid, 0, x1, vX );
2301 chip.AddCheckPoint( hybrid, 1, x2, vX );
2302 chip.CreateAndInsertBoxCableSegment(1,-90);
2303 chip.ResetPoints();
2304 };
2305
2306 //**************************************************** CC outside chips:
2307 // I don't think there is a second aluminium layer here ...
2308 for (Int_t i = 0; i<4; i++) {
2309 snprintf(ch, 20, "ccLayerA%i", i);
2310
2311 AliITSv11GeomCableFlat ccLayer1(ch, 6.6*fgkmm, ccUpLayerTotThick);
2312 ccLayer1.SetInitialNode(hybrid);
2313 ccLayer1.SetNLayers(2);
2314 ccLayer1.SetLayer(0, 2*fgkHybUpCCThick, polyhamideSDD, fColorPolyhamide);
2315 ccLayer1.SetLayer(1, fgkHybAlCCThick, alSDD50p100, fColorAl);
2316 // Al at ~50%
2317
2318 x1[0] = -fgkHybridWidth/2;
2319 x2[0] = fgkHybFLlowPasX - fgkHybridWidth/2 - fgkHybPascalDX/2;
2320 x1[1] = lowLayerYmin + fgkHybUnderNiThick + fgkHybGlueAgThick
2321 + fgkHybChipThick + ccUpLayerTotThick/2;
2322 x2[1] = x1[1];
2323 x1[2] = zChips[i] - fgkHybridLength/2;
2324 x2[2] = x1[2];
2325 ccLayer1.AddCheckPoint( hybrid, 0, x1, vX );
2326 ccLayer1.AddCheckPoint( hybrid, 1, x2, vX );
2327 ccLayer1.CreateAndInsertBoxCableSegment(1,-90);
2328
2329 snprintf(ch, 20, "ccLayerB%i", i);
2330 AliITSv11GeomCableFlat ccLayer2(ch, fgkHybChipsDZ, ccUpLayerTotThick);
2331 ccLayer2.SetInitialNode(hybrid);
2332 ccLayer2.SetNLayers(2);
2333 ccLayer2.SetLayer(0, 2*fgkHybUpCCThick, polyhamideSDD, fColorPolyhamide);
2334 ccLayer2.SetLayer(1, fgkHybAlCCThick, alSDD50p100, fColorAl);
2335 // Al at ~50%
2336
2337 x1[0] = -fgkHybridWidth/2 + fgkHybFLlowPasX + fgkHybPascalDX/2;
2338 x2[0] = -fgkHybridWidth/2 + fgkHybFLlowAmbX - fgkHybAmbraDX/2;
2339 ccLayer2.AddCheckPoint( hybrid, 0, x1, vX );
2340 ccLayer2.AddCheckPoint( hybrid, 1, x2, vX );
2341 ccLayer2.CreateAndInsertBoxCableSegment(1,-90);
2342 ccLayer2.ResetPoints();
2343 snprintf(ch, 20, "ccLayerC%i", i);
2344 ccLayer2.SetName(ch);
2345 x1[0] = -fgkHybridWidth/2 + fgkHybFLlowAmbX + fgkHybAmbraDX/2;
2346 x2[0] = fgkHybridWidth/2 - fgkHybFLUpperWidth + 3*fgkmm;
2347 x1[1] = lowLayerYmin + lowFLTotalThick + flUpThick + fgkHybAlThick
2348 + ccUpLayerTotThick/2;
2349 x2[1] = x1[1];
2350
2351 ccLayer2.AddCheckPoint( hybrid, 0, x1, vX );
2352 ccLayer2.AddCheckPoint( hybrid, 1, x2, vX );
2353 ccLayer2.CreateAndInsertBoxCableSegment(1,-90);
2354
2355 //**************************************************** CC to sensors:
2356 // (alas, we cannot use GeomCableFlat here because section is not constant)
2357 Double_t xcc[8],ycc[8];
2358 xcc[0] = -0.5*ccLayer1.GetWidth();
2359 ycc[0] = 0;
2360 xcc[1] = 0.5*ccLayer1.GetWidth();
2361 ycc[1] = 0;
2362 xcc[2] = xcc[1];
2363 ycc[2] = -fgkHybCC2SensorLen*0.8;
2364 xcc[3] = xcc[2] + 0.1*fgkHybCC2SensorWid;
2365 ycc[3] = ycc[2];
2366 xcc[4] = xcc[3];
2367 ycc[4] = -fgkHybCC2SensorLen;
2368 xcc[5] = xcc[4] - fgkHybCC2SensorWid;
2369 ycc[5] = ycc[4];
2370 xcc[6] = xcc[5];
2371 ycc[6] = 0.8*ycc[5];
2372 xcc[7] = xcc[0];
2373 ycc[7] = 0.2*ycc[5];
2374
2375 TGeoXtru* ccToSensPoliSh = new TGeoXtru(2);
2376 ccToSensPoliSh->DefinePolygon(8, xcc, ycc);
2377 ccToSensPoliSh->DefineSection(0, 0.);
2378 ccToSensPoliSh->DefineSection(1, ccLayer1.GetThickness());
2379
2380 snprintf(ch, 20, "ccToSens%i", i);
2381 TGeoVolume* ccToSensPoliVol = new TGeoVolume(ch, ccToSensPoliSh, polyhamideSDD);
2382 ccToSensPoliVol->SetLineColor(fColorPolyhamide);
2383
2384 TGeoXtru* ccToSensAlSh = new TGeoXtru(2);
2385 ccToSensAlSh->DefinePolygon(8, xcc, ycc);
2386 ccToSensAlSh->DefineSection(0, 0.);
2387 ccToSensAlSh->DefineSection(1, fgkHybAlCCThick);
2388
2389 snprintf(ch, 20, "ccToSensAl%i", i);
2390 TGeoVolume* ccToSensAlVol = new TGeoVolume(ch, ccToSensAlSh, alSDD50p100);
2391 ccToSensAlVol->SetLineColor(fColorAl);
2392
2393 ccToSensPoliVol->AddNode(ccToSensAlVol, 1, 0);
2394
2395 Double_t coord[3];
2396 ccLayer1.GetPoint(0,coord);
2397 hybrid->AddNode(ccToSensPoliVol, i+1,
2398 new TGeoCombiTrans(coord[0], coord[1], coord[2],
2399 new TGeoRotation("",-90-fgkHybCC2SensorAng, 90, 90)));
2400 };
2401
2402 //**************************************************** FL UP:
2403 // (last Al layer will be a special triangular shape)
2404 TGeoBBox *sFLupPolyhamide = new TGeoBBox("sFLupPolyhamide",
2405 fgkHybFLUpperWidth/2, flUpThick/2,
2406 fgkHybFLUpperLength/2);
2407 TGeoVolume *vFLupPolyhamide = new TGeoVolume("vFLupPolyhamide",
2408 sFLupPolyhamide, polyhamideSDD);
2409 vFLupPolyhamide->SetLineColor(fColorPolyhamide);
2410 TGeoTranslation *trFLupPolyhamide =
2411 new TGeoTranslation(fgkHybridWidth/2-fgkHybFLUpperWidth/2,
2412 lowLayerYmin+lowFLTotalThick+flUpThick/2,0);
2413
2414 hybrid->AddNode(vFLupPolyhamide, 1, trFLupPolyhamide);
2415
2416 TGeoArb8 *aluStrip = new TGeoArb8(fgkHybAlThick/2);
2417 aluStrip->SetVertex( 0,-fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2418 aluStrip->SetVertex( 1, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2419 aluStrip->SetVertex( 2, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth-fgkHybFLUpperAldx);
2420 aluStrip->SetVertex( 3,-fgkHybFLUpperAlDZ/2, 0);
2421 aluStrip->SetVertex( 4,-fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2422 aluStrip->SetVertex( 5, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2423 aluStrip->SetVertex( 6, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth-fgkHybFLUpperAldx);
2424 aluStrip->SetVertex( 7,-fgkHybFLUpperAlDZ/2, 0);
2425 TGeoVolume *vAluStrip = new TGeoVolume("vAluStrip",aluStrip, alSDD50p100);
2426 // Al at ~50%
2427
2428 vAluStrip->SetLineColor(fColorAl);
2429 //TGeoRotation rotAluStrip("rotAluStrip",0, -90, 90);
2430 TGeoRotation *rotAluStrip = new TGeoRotation("rotAluStrip",0, -90, 90);
2431
2432 Double_t yRotAluStrip = lowLayerYmin+lowFLTotalThick
2433 +flUpThick+fgkHybAlThick/2;
2434 TGeoCombiTrans *aluStripTr1 = new TGeoCombiTrans(
2435 fgkHybridWidth/2,yRotAluStrip,
2436 fgkHybridLength/2-fgkHybFLlowChipZ1+1*fgkmm, rotAluStrip);
2437 TGeoCombiTrans *aluStripTr2 = new TGeoCombiTrans(*aluStripTr1);
2438 AddTranslationToCombiTrans(aluStripTr2,0,0,
2439 fgkHybFLlowChipZ1-fgkHybFLlowChipZ2);
2440 TGeoCombiTrans *aluStripTr3 = new TGeoCombiTrans(*aluStripTr2);
2441 AddTranslationToCombiTrans(aluStripTr3,0,0,
2442 fgkHybFLlowChipZ2-fgkHybFLlowChipZ3);
2443 TGeoCombiTrans *aluStripTr4 = new TGeoCombiTrans(*aluStripTr3);
2444 AddTranslationToCombiTrans(aluStripTr4,0,0,
2445 fgkHybFLlowChipZ3-fgkHybFLlowChipZ4);
2446
2447 hybrid->AddNode(vAluStrip, 1, aluStripTr1);
2448 hybrid->AddNode(vAluStrip, 2, aluStripTr2);
2449 hybrid->AddNode(vAluStrip, 3, aluStripTr3);
2450 hybrid->AddNode(vAluStrip, 4, aluStripTr4);
2451 //**************************************************** SMD:
2452 TGeoBBox *hybSMD = new TGeoBBox("ITSsddSMDshape",
2453 fgkHybSMDmiddleL/2+fgkHybSMDendL,
2454 fgkHybSMDheight/2,fgkHybSMDendW/2);
2455 TGeoVolume *vHybSMD = new TGeoVolume("ITSsddSMD",hybSMD,airSDD);
2456
2457 TGeoBBox *hybSMDmiddle = new TGeoBBox("ITSsddSMDmiddleShape",
2458 fgkHybSMDmiddleL/2,fgkHybSMDheight/2,
2459 fgkHybSMDmiddleW/2);
2460 TGeoVolume *vHybSMDmiddle = new TGeoVolume("ITSsddSMDmiddle",
2461 hybSMDmiddle,medSMD);
2462 vHybSMDmiddle->SetLineColor(fColorSMD);
2463 TGeoBBox *hybSMDend = new TGeoBBox("ITSsddSMDendShape",
2464 fgkHybSMDendL/2,fgkHybSMDheight/2,fgkHybSMDendW/2);
2465 TGeoVolume *vHybSMDend = new TGeoVolume("ITSsddSMDend",
2466 hybSMDend,medSMDweld);
2467 vHybSMDend->SetLineColor(fColorSMDweld);
2468 TGeoTranslation *vHybSMDendTr1 = new TGeoTranslation("",
2469 (fgkHybSMDmiddleL+fgkHybSMDendL)/2,0,0);
2470 TGeoTranslation *vHybSMDendTr2 = new TGeoTranslation("",
2471 -(fgkHybSMDmiddleL+fgkHybSMDendL)/2,0,0);
2472 vHybSMD->AddNode(vHybSMDmiddle,1,0);
2473 vHybSMD->AddNode(vHybSMDend,1,vHybSMDendTr1);
2474 vHybSMD->AddNode(vHybSMDend,2,vHybSMDendTr2);
2475 for (Int_t i=0; i<fgkNHybSMD; i++) {
2476 TGeoTranslation *vHybSMDtr = new TGeoTranslation("",
2477 -fgkHybridWidth/2+fgkHybSMDposX[i],
2478 lowLayerYmin+lowFLTotalThick+fgkHybSMDheight/2,
2479 -fgkHybridLength/2+fgkHybSMDposZ[i]);
2480 hybrid->AddNode(vHybSMD, i+1, vHybSMDtr);
2481 };
2482
2483 if (iLRSide == 0) {
2484 };
2485
2486 if(GetDebug(1)) hybrid->CheckOverlaps(0.01);
2487 hybrid->SetVisibility(kFALSE);
2488 return hybrid;
2489}
2490
2491//________________________________________________________________________
2492TGeoVolume* AliITSv11GeometrySDD::CreateLadderSegment(Int_t iLay, Int_t iSeg) {
2493 //
2494 // Return a TGeoVolume* containing a segment of a ladder.
2495 //
2496
2497 TGeoMedium *phynoxSDD = GetMedium("INOX$");
2498 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
2499 TGeoMedium *airSDD = GetMedium("SDD AIR$");
2500 TGeoMedium *alSDD = GetMedium("AL$");
2501
2502 Double_t tDY = fgkLadderSegBoxDH/2; //space left on top of the ladder
2503 Double_t segmentLength = fgkSegmentLength;
2504 Double_t spaceBetweenCables = 500*fgkmicron;
2505
2506 //*****************************************
2507 // Set parameters according to (iLay,iSeg):
2508 //*****************************************
2509 Int_t nDetectors = fgkLay3Ndet;
2510 Double_t coolPipeSuppH = fgkLay3CoolPipeSuppH;
2511 Double_t sensorCenterZPos = fLay3sensorZPos[iSeg]-
2512 (fgkSegmentLength*fgkLay3Ndet/2. -
2513 fgkSegmentLength/2-(iSeg)*fgkSegmentLength);
2514 // sensorCenterZPos = z in segment local coord syst.
2515
2516 AliITSv11GeomCableFlat *digitCableA = fDigitCableLay3A;
2517 AliITSv11GeomCableFlat *digitCableB = fDigitCableLay3B;
2518
2519 if (iLay==3) {
2520 } else if (iLay==4) {
2521 nDetectors = fgkLay4Ndet;
2522 coolPipeSuppH = fgkLay4CoolPipeSuppH;
2523 sensorCenterZPos = fLay4sensorZPos[iSeg]-
2524 (fgkSegmentLength*fgkLay4Ndet/2. -
2525 fgkSegmentLength/2-(iSeg)*fgkSegmentLength);
2526 digitCableA = fDigitCableLay4A;
2527 digitCableB = fDigitCableLay4B;
2528 } else
2529 printf("AliITSv11GeometrySDD::CreateLadderSegment Wrong layer index !");
2530
2531
2532 Double_t cableSideSign = -1;
2533 if (iSeg<nDetectors/2) cableSideSign = 1;
2534 Double_t spaceForCables = spaceBetweenCables*
2535 (nDetectors-TMath::Abs(nDetectors-2*iSeg-1)-1)/2
2536 +0.1*fgkmicron;
2537 // gives [0-1-2-2-1-0]*spaceBetweenCables
2538 // or [0-1-2-3-3-2-1-0]*spaceBetweenCables
2539 Int_t iUpdateCableMin;
2540 Int_t iUpdateCableMax;
2541 if (cableSideSign==-1) {
2542 iUpdateCableMin = nDetectors/2;
2543 iUpdateCableMax = iSeg-1;
2544 } else {
2545 iUpdateCableMin = iSeg+1;
2546 iUpdateCableMax = nDetectors/2-1;
2547 };
2548
2549 if(GetDebug(1)){
2550 cout << "Segment ("<< iLay <<',' << iSeg
2551 << ") : sensor z shift in local segment coord.="
2552 << sensorCenterZPos << endl;
2553 };
2554
2555 //****************************
2556 // The segment volume
2557 //****************************
2558
2559 // Use of TGeoVolumeAssembly increases the calculation time of overlaps and very
2560 // likely slows down the transport of particles through the geometry
2561
2562 //TGeoVolumeAssembly *virtualSeg = new TGeoVolumeAssembly("ITSsddSegment");
2563
2564// TGeoBBox *segBox = new TGeoBBox("ITSsddSegBox",
2565// fgkLadderWidth/2+fgkPinSuppWidth+fgkLadderSegBoxDW,
2566// fgkLadderHeight/2+fgkLadderSegBoxDH/2,
2567// segmentLength/2);
2568 // A shaped Xtru instead of a simple BBox to avoid overlaps and extrusions
2569 TGeoXtru *segBox = new TGeoXtru(2);
2570 segBox->SetName("ITSsddSegBox");
2571
2572 Double_t xseg[12],yseg[12];
2573 xseg[ 0] = -(fgkLadderWidth/2+fgkPinSuppWidth+fgkLadderSegBoxDW);
2574 yseg[ 0] = fgkLadderHeight/2+fgkLadderSegBoxDH/2;
2575 xseg[ 1] = xseg[0];
2576 yseg[ 1] = -yseg[0];
2577 xseg[ 2] = 0.87*xseg[1];
2578 yseg[ 2] = yseg[1];
2579 xseg[ 3] = 0.77*xseg[1];
2580 yseg[ 3] = -yseg[0] - 0.62*fgkHybCC2SensorLen;
2581 xseg[ 4] = 0.72*xseg[1];
2582 yseg[ 4] = yseg[3];
2583 xseg[ 5] = 0.83*xseg[1];
2584 yseg[ 5] = yseg[1];
2585
2586 for (Int_t j=0; j<6; j++) {
2587 xseg[6+j] = -xseg[5-j];
2588 yseg[6+j] = yseg[5-j];
2589 }
2590
2591 segBox->DefinePolygon(12, xseg, yseg);
2592 segBox->DefineSection(0,-segmentLength/2);
2593 segBox->DefineSection(1, segmentLength/2);
2594
2595 TGeoVolume *virtualSeg = new TGeoVolume("ITSsddSegment",
2596 segBox, airSDD);
2597 virtualSeg->SetVisibility(kFALSE);
2598
2599 //******************************
2600 // Carbon fiber structure :
2601 //******************************
2602
2603 virtualSeg->AddNode(fLaddSegCommonVol[0], 1, fLaddSegCommonTr[0]);
2604 Int_t volumeIndex = 1;
2605 for (Int_t i = 1; i<fgkNladdSegCommonVol;i++ ) {
2606 if (fLaddSegCommonVol[i]==fLaddSegCommonVol[i-1])
2607 volumeIndex++;
2608 else
2609 volumeIndex = 1;
2610 virtualSeg->AddNode(fLaddSegCommonVol[i], volumeIndex,
2611 fLaddSegCommonTr[i]);
2612 };
2613
2614 //**********************************
2615 // Pine support of the sensors :
2616 //**********************************
2617 TGeoRotation *rotPS1 = new TGeoRotation("",0,-90,90);
2618 TGeoRotation *rotPS2 = new TGeoRotation("",0,-90,-90);
2619
2620 // The use of the following constructor type allow to use rotPS1 and rotPS2
2621 // (and not copy them) therefore we gain some memory
2622 TGeoCombiTrans *transPS1 = new TGeoCombiTrans( fgkPinDYOnSensor,
2623 - fgkLadderHeight/2.-tDY
2624 + fgkPinSuppHeight/2.,
2625 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2626
2627 TGeoCombiTrans *transPS2 = new TGeoCombiTrans( fgkPinDYOnSensor,
2628 - fgkLadderHeight/2.-tDY
2629 + fgkPinSuppHeight/2.,
2630 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2631 AddTranslationToCombiTrans(transPS2, 0, 0, fgkPinPinDDXOnSensor);
2632
2633 TGeoCombiTrans *transPS3 = new TGeoCombiTrans( fgkPinDYOnSensor,
2634 - fgkLadderHeight/2.-tDY
2635 + fgkPinSuppHeight/2.,
2636 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2637 AddTranslationToCombiTrans(transPS3, 0, 0, -2*fgkPinDXminOnSensor);
2638
2639 TGeoCombiTrans *transPS4 = new TGeoCombiTrans( fgkPinDYOnSensor,
2640 - fgkLadderHeight/2.-tDY
2641 + fgkPinSuppHeight/2.,
2642 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2643 AddTranslationToCombiTrans(transPS4, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
2644
2645 TGeoCombiTrans *transPS5 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2646 - fgkLadderHeight/2. - tDY
2647 + fgkPinSuppHeight/2.,
2648 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2649
2650 TGeoCombiTrans *transPS6 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2651 - fgkLadderHeight/2. - tDY
2652 + fgkPinSuppHeight/2.,
2653 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2654 AddTranslationToCombiTrans(transPS6, 0, 0, fgkPinPinDDXOnSensor);
2655
2656 TGeoCombiTrans *transPS7 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2657 - fgkLadderHeight/2. - tDY
2658 + fgkPinSuppHeight/2.,
2659 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2660 AddTranslationToCombiTrans(transPS7, 0, 0, -2*fgkPinDXminOnSensor);
2661
2662 TGeoCombiTrans *transPS8 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2663 - fgkLadderHeight/2. - tDY
2664 + fgkPinSuppHeight/2.,
2665 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2666 AddTranslationToCombiTrans(transPS8, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
2667
2668 virtualSeg->AddNode(fPinSupport, 1, transPS1);
2669 virtualSeg->AddNode(fPinSupport, 2, transPS2);
2670 virtualSeg->AddNode(fPinSupport, 3, transPS3);
2671 virtualSeg->AddNode(fPinSupport, 4, transPS4);
2672 virtualSeg->AddNode(fPinSupport, 5, transPS5);
2673 virtualSeg->AddNode(fPinSupport, 6, transPS6);
2674 virtualSeg->AddNode(fPinSupport, 7, transPS7);
2675 virtualSeg->AddNode(fPinSupport, 8, transPS8);
2676
2677 TGeoMedium *pinMed = GetMedium("RYTON$");
2678 Double_t fgkPinHeight = 4.5*fgkmm;
2679 TGeoTube *pineS = new TGeoTube("ITSsddPin",0,fgkPinR,
2680 fgkPinHeight/2.);
2681 TGeoVolume *pineV = new TGeoVolume("ITSsddPinVol", pineS, pinMed);
2682
2683 TGeoCombiTrans *transPS2b = new TGeoCombiTrans( fgkPinDYOnSensor,
2684 - fgkLadderHeight/2.-tDY
2685 + fgkPinHeight/2.,
2686 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2687 AddTranslationToCombiTrans(transPS2b, 0, 0, fgkPinPinDDXOnSensor);
2688 virtualSeg->AddNode(pineV, 1, transPS2b);
2689
2690 TGeoCombiTrans *transPS6b = new TGeoCombiTrans( -fgkPinDYOnSensor,
2691 - fgkLadderHeight/2. - tDY
2692 + fgkPinHeight/2.,
2693 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2694 AddTranslationToCombiTrans(transPS6b, 0, 0, fgkPinPinDDXOnSensor);
2695 virtualSeg->AddNode(pineV, 2, transPS6b);
2696
2697
2698 TGeoCombiTrans *transPS4b = new TGeoCombiTrans( fgkPinDYOnSensor,
2699 - fgkLadderHeight/2.-tDY
2700 + fgkPinHeight/2.,
2701 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2702 AddTranslationToCombiTrans(transPS4b, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
2703 virtualSeg->AddNode(pineV, 3, transPS4b);
2704
2705 TGeoCombiTrans *transPS8b = new TGeoCombiTrans( -fgkPinDYOnSensor,
2706 - fgkLadderHeight/2. - tDY
2707 + fgkPinHeight/2.,
2708 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2709 AddTranslationToCombiTrans(transPS8b, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
2710 virtualSeg->AddNode(pineV, 4, transPS8b);
2711
2712
2713 //******************************
2714 // Cooling pipe supports :
2715 //******************************
2716 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
2717 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
2718 Double_t triangleCPaxeDist = fgkCoolPipeSuppAxeDist-fgkCoolPipeSuppWidthExt-
2719 fgkCoolPipeSuppWidthIn+fgkLadderBeamRadius;
2720
2721 Double_t coolPipeSuppL = TMath::Tan(halfTheta)*
2722 (triangleHeight+triangleCPaxeDist/
2723 TMath::Sin(halfTheta)-coolPipeSuppH);
2724 if (fAddCoolingSyst) {
2725 TGeoRotation *rotCPS2 = new TGeoRotation("", -halfTheta*TMath::RadToDeg(), -90, 90);
2726 TGeoRotation *rotCPS1 = new TGeoRotation("", halfTheta*TMath::RadToDeg(), -90, -90);
2727 TGeoCombiTrans *transCPS1 = new TGeoCombiTrans(coolPipeSuppL,
2728 -fgkLadderHeight/2. - tDY
2729 +coolPipeSuppH+fgkLadderBeamRadius,
2730 -segmentLength/2., rotCPS1);
2731
2732 TGeoCombiTrans *transCPS3 = new TGeoCombiTrans(coolPipeSuppL,
2733 -fgkLadderHeight/2. - tDY
2734 +coolPipeSuppH+fgkLadderBeamRadius,
2735 -segmentLength/2., rotCPS1);
2736 AddTranslationToCombiTrans(transCPS3, 0, 0, segmentLength);
2737
2738 TGeoCombiTrans *transCPS2 = new TGeoCombiTrans(-coolPipeSuppL,
2739 -fgkLadderHeight/2.- tDY
2740 +coolPipeSuppH+fgkLadderBeamRadius,
2741 segmentLength/2., rotCPS2);
2742
2743 TGeoCombiTrans *transCPS4 = new TGeoCombiTrans(-coolPipeSuppL,
2744 -fgkLadderHeight/2.- tDY
2745 +coolPipeSuppH+fgkLadderBeamRadius,
2746 segmentLength/2., rotCPS2);
2747 AddTranslationToCombiTrans(transCPS4, 0, 0, -segmentLength);
2748
2749 virtualSeg->AddNode(fCoolPipeSupportL, 1, transCPS1);
2750 virtualSeg->AddNode(fCoolPipeSupportL, 2, transCPS2);
2751 virtualSeg->AddNode(fCoolPipeSupportR, 1, transCPS3);
2752 virtualSeg->AddNode(fCoolPipeSupportR, 2, transCPS4);
2753 };
2754
2755 //************************
2756 // Cooling pipes :
2757 //************************
2758 TGeoTranslation *pipeTr1 = new TGeoTranslation(coolPipeSuppL,
2759 -fgkLadderHeight/2. - tDY +
2760 fgkLadderBeamRadius+coolPipeSuppH, 0);
2761 TGeoTranslation *pipeTr2 = new TGeoTranslation(-coolPipeSuppL,
2762 -fgkLadderHeight/2.- tDY +
2763 fgkLadderBeamRadius+coolPipeSuppH, 0);
2764
2765 if (fAddCoolingSyst) {
2766 TGeoTube *coolingPipeShape = new TGeoTube( fgkCoolPipeInnerDiam/2,
2767 fgkCoolPipeOuterDiam/2,
2768 segmentLength/2);
2769 TGeoTube *coolerShape = new TGeoTube( 0, fgkCoolPipeInnerDiam/2,
2770 segmentLength/2);
2771
2772 TGeoVolume *coolingPipe = new TGeoVolume("ITSsddCoolingPipe",
2773 coolingPipeShape, phynoxSDD );
2774 coolingPipe->SetLineColor(fColorPhynox);
2775 TGeoVolume *cooler = new TGeoVolume("ITSsddCoolingLiquid",coolerShape,
2776 coolerMediumSDD );
2777
2778
2779 virtualSeg->AddNode(coolingPipe, 1, pipeTr1);
2780 virtualSeg->AddNode(coolingPipe, 2, pipeTr2);
2781 if (fCoolingOn) {
2782 virtualSeg->AddNode(cooler, 1, pipeTr1);
2783 virtualSeg->AddNode(cooler, 2, pipeTr2);
2784 };
2785 };
2786
2787 //**********************************
2788 // Bases of hybrid thermal bridges
2789 //**********************************
2790 Double_t shiftHyb = 1.05; // shift between thermal Bridge base and thermal bridge
2791 // approx !!! not clear on 0752/14-A
2792 if (fAddCoolingSyst) {
2793 TGeoRotation rotHybrid1("", 0, 0, -90 - fgkHybridAngle);
2794 TGeoRotation rotHybrid2("", 0 ,180, 90 - fgkHybridAngle);
2795 TGeoCombiTrans *baseTr1 = new TGeoCombiTrans(*pipeTr2, rotHybrid1);
2796 TGeoCombiTrans *baseTr2 = new TGeoCombiTrans(*pipeTr1, rotHybrid2);
2797
2798 virtualSeg->AddNode(fBaseThermalBridge, 1, baseTr1);
2799 virtualSeg->AddNode(fBaseThermalBridge, 2, baseTr2);
2800 };
2801
2802 //*************************
2803 // the 2 hybrids :
2804 //*************************
2805 Double_t hybDy = ((TGeoXtru*)fHybrid->GetShape())->GetY(2);
2806 Double_t distAxeToHybridCenter = fgkBTBaxisAtoBase+hybDy;
2807
2808 Double_t hybrVolX = ( distAxeToHybridCenter*CosD(fgkHybridAngle)
2809 - shiftHyb*SinD(fgkHybridAngle) );
2810 Double_t hybrVolY = ( distAxeToHybridCenter*SinD(fgkHybridAngle)
2811 + shiftHyb*CosD(fgkHybridAngle) );
2812 if (fAddHybrids) {
2813 TGeoRotation rotHybrid3("", 0, 0, 90. - fgkHybridAngle);
2814 TGeoRotation rotHybrid4("", 0 ,180, -90. - fgkHybridAngle);
2815 TGeoCombiTrans *hybTr1 = new TGeoCombiTrans(*pipeTr2, rotHybrid3);
2816 TGeoCombiTrans *hybTr2 = new TGeoCombiTrans(*pipeTr1, rotHybrid4);
2817 AddTranslationToCombiTrans( hybTr1, -hybrVolX, hybrVolY, 0);
2818 AddTranslationToCombiTrans( hybTr2, hybrVolX, hybrVolY, 0);
2819
2820 virtualSeg->AddNode(fHybrid, 1, hybTr1);
2821 virtualSeg->AddNode(fHybrid, 2, hybTr2);
2822 };
2823
2824 //***********
2825 // cables
2826 //***********
2827 if (fAddCables) {
2828 // Starting from this segment
2829 Double_t hybDz = ((TGeoXtru*)fHybrid->GetShape())->GetZ(1);
2830 Double_t hybDx = ((TGeoXtru*)fHybrid->GetShape())->GetX(1);
2831 Double_t posDigitCableAlongHyb = shiftHyb+ hybDx
2832 - digitCableA->GetWidth()/2;
2833 Double_t distAxeToDigitCableCenter = distAxeToHybridCenter+hybDy
2834 - digitCableA->GetThickness()/2;
2835
2836 Double_t digitCableX = ( coolPipeSuppL
2837 + distAxeToDigitCableCenter*CosD(fgkHybridAngle)
2838 - posDigitCableAlongHyb*SinD(fgkHybridAngle) );
2839 Double_t digitCableY = ( - fgkLadderHeight/2.-TMath::Abs(tDY)
2840 + fgkLadderBeamRadius+coolPipeSuppH
2841 + distAxeToDigitCableCenter*SinD(fgkHybridAngle)
2842 + posDigitCableAlongHyb*CosD(fgkHybridAngle) );
2843
2844
2845 Double_t digitCableCenterA0[3]={ -cableSideSign*digitCableX,
2846 digitCableY, cableSideSign*hybDz };
2847 Double_t digitCableCenterA1[3] = {
2848 -cableSideSign*(digitCableX+spaceForCables*CosD(fgkHybridAngle)),
2849 digitCableY+spaceForCables*SinD(fgkHybridAngle),
2850 cableSideSign*segmentLength/2 };
2851
2852 Double_t digitCableCenterB0[3]={ cableSideSign*digitCableX,
2853 digitCableY,cableSideSign*hybDz};
2854 Double_t digitCableCenterB1[3]={
2855 cableSideSign*(digitCableX+spaceForCables*CosD(fgkHybridAngle)),
2856 digitCableY+spaceForCables*SinD(fgkHybridAngle),
2857 cableSideSign*segmentLength/2 };
2858
2859 Double_t vZ[3] = {0,0,1};
2860 digitCableA[iSeg].AddCheckPoint( virtualSeg, 0, digitCableCenterA0, vZ);
2861 digitCableA[iSeg].AddCheckPoint( virtualSeg, 1, digitCableCenterA1, vZ);
2862 digitCableB[iSeg].AddCheckPoint( virtualSeg, 0, digitCableCenterB0, vZ);
2863 digitCableB[iSeg].AddCheckPoint( virtualSeg, 1, digitCableCenterB1, vZ);
2864
2865 // Updating the other cables
2866 for (Int_t iCable=iUpdateCableMin; iCable<=iUpdateCableMax; iCable++) {
2867
2868 Int_t iPoint = TMath::Abs(iCable-iSeg)+1;
2869 Double_t coord[3];
2870 digitCableA[iCable].GetPoint( 1, coord);
2871 digitCableA[iCable].AddCheckPoint( virtualSeg, iPoint, coord, vZ);
2872 digitCableB[iCable].GetPoint( 1, coord);
2873 digitCableB[iCable].AddCheckPoint( virtualSeg, iPoint, coord, vZ);
2874 };
2875
2876 // Now the small Al foil on the same hybrid side
2877 Double_t xfoil[5],yfoil[5];
2878 hybDx *= 0.95;
2879 xfoil[0] = -fgkHybridAlFoilWide/2;
2880 yfoil[0] = hybDx;
2881 xfoil[1] = fgkHybridAlFoilWide/2;
2882 yfoil[1] = yfoil[0];
2883 xfoil[2] = xfoil[1];
2884 yfoil[2] = -hybDx + (fgkHybridAlFoilWide - fgkHybridAlFoilSide);
2885 xfoil[3] = xfoil[0] + fgkHybridAlFoilSide;
2886 yfoil[3] = -hybDx;
2887 xfoil[4] = xfoil[0];
2888 yfoil[4] = yfoil[3];
2889
2890 TGeoXtru* alFoilSh = new TGeoXtru(2);
2891 alFoilSh->DefinePolygon(5, xfoil, yfoil);
2892 alFoilSh->DefineSection(0,-fgkHybridAlFoilThick/2);
2893 alFoilSh->DefineSection(1, fgkHybridAlFoilThick/2);
2894
2895 TGeoVolume* alFoilVol = new TGeoVolume("ITSsddAlFoilHybSide", alFoilSh, alSDD);
2896 alFoilVol->SetLineColor(fColorAl);
2897
2898 Double_t zFoilTrans = cableSideSign*(hybDz + alFoilSh->GetX(1));
2899 TGeoRotation rotFoil3;
2900 TGeoRotation rotFoil4;
2901 if (cableSideSign > 0) {
2902 rotFoil3 = TGeoRotation("", 90-fgkHybridAngle, -90, -90);
2903 rotFoil4 = TGeoRotation("",-90+fgkHybridAngle, 90, 90);
2904 } else {
2905 rotFoil3 = TGeoRotation("", 90-fgkHybridAngle, 90, -90);
2906 rotFoil4 = TGeoRotation("",-90+fgkHybridAngle, -90, 90);
2907 }
2908 TGeoCombiTrans *foiTr1 = new TGeoCombiTrans(*pipeTr2, rotFoil3);
2909 TGeoCombiTrans *foiTr2 = new TGeoCombiTrans(*pipeTr1, rotFoil4);
2910 AddTranslationToCombiTrans( foiTr1, -hybrVolX, hybrVolY, zFoilTrans);
2911 AddTranslationToCombiTrans( foiTr2, hybrVolX, hybrVolY, zFoilTrans);
2912
2913 virtualSeg->AddNode(alFoilVol, 1, foiTr1);
2914 virtualSeg->AddNode(alFoilVol, 2, foiTr2);
2915 };
2916
2917 //**********************************
2918 if(GetDebug(1)) virtualSeg->CheckOverlaps(0.01);
2919 return virtualSeg;
2920}
2921
2922
2923//________________________________________________________________________
2924TGeoVolume* AliITSv11GeometrySDD::CreatePinSupport() {
2925//
2926// Create a pine support and its pine
2927// axis of rotation is the cone axis, center in its middle
2928//
2929 TGeoMedium *rytonSDD = GetMedium("RYTON$");
2930
2931 TGeoCone *cone = new TGeoCone("ITSsddPinSuppCone",fgkPinSuppHeight/2.,
2932 0,fgkPinSuppRmax,0,fgkPinSuppRmax-
2933 fgkPinSuppHeight*TanD(fgkPinSuppConeAngle) );
2934 TGeoBBox *tong = new TGeoBBox("ITSsddPinSuppTong",fgkPinSuppRmax,
2935 fgkPinSuppLength/2.,fgkPinSuppThickness/2.);
2936 TGeoTube *hole = new TGeoTube("ITSsddPinSuppHole",0,fgkPinR,
2937 fgkPinSuppHeight/2.+0.00001);
2938 // 0.00001 is for seing the actual hole (avoid viewer artefact)
2939
2940 if(GetDebug(3)){// Remove compiler warning.
2941 cone->InspectShape();
2942 tong->InspectShape();
2943 hole->InspectShape();
2944 };
2945
2946 TGeoTranslation *tongTrans = new TGeoTranslation("ITSsddPinSuppTongTr",0,
2947 fgkPinSuppLength/2.,-fgkPinSuppHeight/2.+fgkPinSuppThickness/2.);
2948 tongTrans->RegisterYourself();
2949 TGeoCompositeShape *pinSupportShape = new TGeoCompositeShape(
2950 "ITSsddPinSupportShape","(ITSsddPinSuppCone+"
2951 "ITSsddPinSuppTong:ITSsddPinSuppTongTr)-ITSsddPinSuppHole");
2952
2953 TGeoVolume *pinSupport = new TGeoVolume("ITSsddPinSupport", pinSupportShape,
2954 rytonSDD);
2955 pinSupport->SetLineColor(fColorRyton);
2956
2957 return pinSupport;
2958}
2959
2960
2961//________________________________________________________________________
2962TGeoVolume* AliITSv11GeometrySDD::CreateCoolPipeSupportL() {
2963//
2964// Create half of the cooling pipe support (ALR-0752/3)
2965//
2966
2967 Double_t diffX = fgkCoolPipeSuppHeight*TanD(fgkCoolPipeSuppAngle);
2968
2969 TGeoArb8 *side1 = new TGeoArb8(fgkCoolPipeSuppHeight/2.);
2970 side1->SetName("ITSsddCPSside1");
2971 side1->SetVertex( 0, 0, -fgkCoolPipeSuppWidthExt/2.);
2972 side1->SetVertex( 1, 0, fgkCoolPipeSuppWidthExt/2.);
2973 side1->SetVertex( 2, fgkCoolPipeSuppMaxLength/2.-diffX,
2974 fgkCoolPipeSuppWidthExt/2.);
2975 side1->SetVertex( 3, fgkCoolPipeSuppMaxLength/2.-diffX,
2976 -fgkCoolPipeSuppWidthExt/2.);
2977 side1->SetVertex( 4, 0, -fgkCoolPipeSuppWidthExt/2.);
2978 side1->SetVertex( 5, 0, fgkCoolPipeSuppWidthExt/2.);
2979 side1->SetVertex( 6, fgkCoolPipeSuppMaxLength/2.,
2980 fgkCoolPipeSuppWidthExt/2.);
2981 side1->SetVertex( 7, fgkCoolPipeSuppMaxLength/2.,
2982 -fgkCoolPipeSuppWidthExt/2.);
2983
2984 TGeoTranslation *side1Tr = new TGeoTranslation("ITSsddCPStr1",0,
2985 - fgkCoolPipeSuppAxeDist
2986 + fgkCoolPipeSuppWidthExt/2., 0);
2987 side1Tr->RegisterYourself();
2988 TGeoTranslation *side2Tr = new TGeoTranslation("ITSsddCPStr2",0,
2989 - fgkCoolPipeSuppAxeDist
2990 + fgkCoolPipeSuppWidthExt*3/2.
2991 + fgkCoolPipeSuppWidthIn,0);
2992 side2Tr->RegisterYourself();
2993
2994 TGeoBBox *middle = new TGeoBBox("ITSsddCPSmiddle",
2995 (fgkCoolPipeSuppMaxLength/2.-fgkCoolPipeSuppSlitL)/2.,
2996 fgkCoolPipeSuppWidthIn/2., fgkCoolPipeSuppHeight/2.);
2997 TGeoTranslation *middleTr =
2998 new TGeoTranslation("ITSsddCPStr3",
2999 (fgkCoolPipeSuppMaxLength/2.-fgkCoolPipeSuppSlitL)/2.,
3000 -fgkCoolPipeSuppAxeDist+fgkCoolPipeSuppWidthExt
3001 +fgkCoolPipeSuppWidthIn/2., 0);
3002 middleTr->RegisterYourself();
3003
3004 TGeoBBox *axeBox = new TGeoBBox("ITSsddCPSaxeBox",
3005 fgkCoolPipeSuppTongW/4.,
3006 (fgkCoolPipeSuppFulWidth
3007 - 2*fgkCoolPipeSuppWidthExt
3008 - fgkCoolPipeSuppWidthIn)/2,
3009 fgkCoolPipeSuppHeight/2.);
3010
3011 TGeoTranslation *axeBoxTr = new TGeoTranslation("ITSsddCPSAxBoxTr",
3012 fgkCoolPipeSuppTongW/4.,
3013 - fgkCoolPipeSuppAxeDist
3014 + fgkCoolPipeSuppFulWidth
3015 - axeBox->GetDY(), 0);
3016 axeBoxTr->RegisterYourself();
3017
3018 TGeoTube *axe = new TGeoTube("ITSsddCPSaxe",0,fgkCoolPipeSuppHoleDiam/2.,
3019 fgkCoolPipeSuppTongW/4.);
3020
3021 TGeoRotation *axeRot = new TGeoRotation("ITSsddCPSaxeRot",90,90,0);
3022 TGeoCombiTrans *axeTrans = new TGeoCombiTrans("ITSsddCPSaxeTr",
3023 fgkCoolPipeSuppTongW/4.,0,0,axeRot);
3024 axeTrans->RegisterYourself();
3025 //delete axeRot; // make the code crash, no idea of why !!!
3026
3027 if(GetDebug(3)){
3028 middle->InspectShape();
3029 axe->InspectShape();
3030 };
3031
3032 TGeoMedium *rytonSDD = GetMedium("RYTON$");
3033
3034 TGeoCompositeShape *coolPipeSuppShape = new TGeoCompositeShape(
3035 "ITSsddCoolPipeSuppShapeL",
3036 "ITSsddCPSmiddle:ITSsddCPStr3"
3037 "+ITSsddCPSside1:ITSsddCPStr1"
3038 "+ITSsddCPSside1:ITSsddCPStr2"
3039 "+ITSsddCPSaxeBox:ITSsddCPSAxBoxTr"
3040 "-ITSsddCPSaxe:ITSsddCPSaxeTr");
3041 TGeoVolume *coolPipeSupp = new TGeoVolume("ITSsddCoolPipeSupportL",
3042 coolPipeSuppShape, rytonSDD);
3043
3044 coolPipeSupp->SetLineColor(fColorRyton);
3045
3046 return coolPipeSupp;
3047}
3048
3049
3050//________________________________________________________________________
3051TGeoVolume* AliITSv11GeometrySDD::CreateCoolPipeSupportR() {
3052//
3053//Create half of the cooling pipe support (ALR-0752/3)
3054//
3055
3056 Double_t diffX = fgkCoolPipeSuppHeight*TanD(fgkCoolPipeSuppAngle);
3057
3058 TGeoArb8 *side1 = new TGeoArb8(fgkCoolPipeSuppHeight/2.);
3059 side1->SetName("ITSsddCPSside1R");
3060 side1->SetVertex( 0, 0, -fgkCoolPipeSuppWidthExt/2.);
3061 side1->SetVertex( 1, -(fgkCoolPipeSuppMaxLength/2.-diffX),
3062 -fgkCoolPipeSuppWidthExt/2.);
3063 side1->SetVertex( 2, -(fgkCoolPipeSuppMaxLength/2.-diffX),
3064 fgkCoolPipeSuppWidthExt/2.);
3065 side1->SetVertex( 3, 0, fgkCoolPipeSuppWidthExt/2.);
3066 side1->SetVertex( 4, 0, -fgkCoolPipeSuppWidthExt/2.);
3067 side1->SetVertex( 5, -fgkCoolPipeSuppMaxLength/2.,
3068 -fgkCoolPipeSuppWidthExt/2.);
3069 side1->SetVertex( 6, -fgkCoolPipeSuppMaxLength/2.,
3070 fgkCoolPipeSuppWidthExt/2.);
3071 side1->SetVertex( 7, 0, fgkCoolPipeSuppWidthExt/2.);
3072
3073 TGeoTranslation *side1Tr = new TGeoTranslation("ITSsddCPStr1R",0,
3074 - fgkCoolPipeSuppAxeDist
3075 + fgkCoolPipeSuppWidthExt/2., 0);
3076 side1Tr->RegisterYourself();
3077 TGeoTranslation *side2Tr = new TGeoTranslation("ITSsddCPStr2R",0,
3078 - fgkCoolPipeSuppAxeDist
3079 + fgkCoolPipeSuppWidthExt*3/2.
3080 + fgkCoolPipeSuppWidthIn, 0);
3081 side2Tr->RegisterYourself();
3082
3083 TGeoBBox *middle = new TGeoBBox("ITSsddCPSmiddleR",
3084 (fgkCoolPipeSuppMaxLength/2.
3085 - fgkCoolPipeSuppSlitL)/2.,
3086 fgkCoolPipeSuppWidthIn/2.,
3087 fgkCoolPipeSuppHeight/2.);
3088 TGeoTranslation *middleTr =
3089 new TGeoTranslation("ITSsddCPStr3R",
3090 -( fgkCoolPipeSuppMaxLength/2.
3091 -fgkCoolPipeSuppSlitL)/2.,
3092 -fgkCoolPipeSuppAxeDist + fgkCoolPipeSuppWidthExt
3093 + fgkCoolPipeSuppWidthIn/2.,0);
3094 middleTr->RegisterYourself();
3095
3096 TGeoBBox *axeBox = new TGeoBBox("ITSsddCPSaxeBoxR",
3097 fgkCoolPipeSuppTongW/4.,
3098 (fgkCoolPipeSuppFulWidth
3099 - 2*fgkCoolPipeSuppWidthExt
3100 - fgkCoolPipeSuppWidthIn)/2,
3101 fgkCoolPipeSuppHeight/2.);
3102
3103 TGeoTranslation *axeBoxTr = new TGeoTranslation("ITSsddCPSAxBoxTrR",
3104 - fgkCoolPipeSuppTongW/4.,
3105 - fgkCoolPipeSuppAxeDist
3106 + fgkCoolPipeSuppFulWidth
3107 - axeBox->GetDY(),0);
3108 axeBoxTr->RegisterYourself();
3109
3110 TGeoTube *axe = new TGeoTube("ITSsddCPSaxeR",0,fgkCoolPipeSuppHoleDiam/2.,
3111 fgkCoolPipeSuppTongW/4.);
3112
3113 TGeoRotation *axeRot = new TGeoRotation("ITSsddCPSaxeRotR",90,90,0);
3114 TGeoCombiTrans *axeTrans = new TGeoCombiTrans("ITSsddCPSaxeTrR",
3115 -fgkCoolPipeSuppTongW/4.,0,0,axeRot);
3116 axeTrans->RegisterYourself();
3117 //delete axeRot;
3118
3119 if(GetDebug(3)){
3120 middle->InspectShape();
3121 axe->InspectShape();
3122 };
3123
3124 TGeoCompositeShape *coolPipeSuppShape = new TGeoCompositeShape(
3125 "ITSsddCoolPipeSuppShapeR",
3126 "ITSsddCPSmiddleR:ITSsddCPStr3R"
3127 "+ITSsddCPSside1R:ITSsddCPStr1R"
3128 "+ITSsddCPSside1R:ITSsddCPStr2R"
3129 "+ITSsddCPSaxeBoxR:ITSsddCPSAxBoxTrR"
3130 "-ITSsddCPSaxeR:ITSsddCPSaxeTrR");
3131
3132 TGeoMedium *rytonSDD = GetMedium("RYTON$");
3133 TGeoVolume *coolPipeSupp = new TGeoVolume( "ITSsddCoolPipeSupportR",
3134 coolPipeSuppShape, rytonSDD);
3135 coolPipeSupp->SetLineColor(fColorRyton);
3136
3137 return coolPipeSupp;
3138}
3139
3140//________________________________________________________________________
3141TGeoVolume* AliITSv11GeometrySDD::CreateBaseThermalBridge() {
3142 //
3143 // based on ALR 0752/8
3144 //
3145
3146 Double_t dy = fgkBTBaxisAtoBase - fgkRadiusBminBTB - fgkBTBthick;
3147
3148 Double_t base1width = fgkBTBwidth - fgkBTBaxisAtoBottom - fgkRadiusBminBTB
3149 - (fgkRadiusAminBTB+fgkBTBthick);
3150 TGeoBBox *base1 = new TGeoBBox( "ITSsddBTBbase1", base1width/2.,
3151 fgkBTBthick/2., fgkBTBlength/2.);
3152 TGeoTranslation *base1Tr = new TGeoTranslation("ITSsddBTBtr1",
3153 fgkBTBaxisAtoBottom-fgkBTBwidth+base1width/2.,
3154 -(fgkBTBaxisAtoBase-fgkBTBthick/2.), 0);
3155 base1Tr->RegisterYourself();
3156
3157 Double_t base2width = fgkBTBaxisAtoBottom - fgkRadiusAminBTB - fgkBTBthick
3158 - fgkRadiusBminBTB;
3159 TGeoBBox *base2 = new TGeoBBox( "ITSsddBTBbase2", base2width/2.,
3160 fgkBTBthick/2., fgkBTBlength/2.);
3161 TGeoTranslation *base2Tr = new TGeoTranslation("ITSsddBTBtr2",
3162 fgkBTBaxisAtoBottom - base2width/2.,
3163 -(fgkBTBaxisAtoBase-fgkBTBthick/2.), 0);
3164 base2Tr->RegisterYourself();
3165
3166 TGeoBBox *side = new TGeoBBox( "ITSsddBTBside",
3167 fgkBTBthick/2., dy/2., fgkBTBlength/2.);
3168 TGeoTranslation *sideTr1 = new TGeoTranslation("ITSsddBTBsideTr1",
3169 -fgkRadiusAminBTB-fgkBTBthick/2., -dy/2., 0);
3170 TGeoTranslation *sideTr2 = new TGeoTranslation("ITSsddBTBsideTr2",
3171 fgkRadiusAminBTB+fgkBTBthick/2., -dy/2., 0);
3172 sideTr1->RegisterYourself();
3173 sideTr2->RegisterYourself();
3174
3175 TGeoBBox *hole = new TGeoBBox( "ITSsddBTBhole", fgkBTBHolewidth/2.,
3176 fgkBTBthick/2., fgkBTBHoleLength/2.);
3177 TGeoTranslation *holeTr1 = new TGeoTranslation("ITSsddBTBholeTr1",
3178 - fgkBTBHoleRefX + fgkBTBHolewidth/2.,
3179 - (fgkBTBaxisAtoBase-fgkBTBthick/2.),
3180 fgkBTBHoleRefY+(fgkBTBHoleLength-fgkBTBlength)/2.);
3181 TGeoTranslation *holeTr2 = new TGeoTranslation("ITSsddBTBholeTr2",
3182 - fgkBTBHoleRefX + fgkBTBHolewidth/2.,
3183 - (fgkBTBaxisAtoBase-fgkBTBthick/2.),
3184 - fgkBTBHoleRefY-(fgkBTBHoleLength-fgkBTBlength)/2.);
3185 holeTr1->RegisterYourself();
3186 holeTr2->RegisterYourself();
3187
3188 Double_t radiusAmaxBTB = fgkRadiusAminBTB + fgkBTBthick;
3189 TGeoTubeSeg *mainAxis = new TGeoTubeSeg( "ITSsddBTBmainAxis",
3190 fgkRadiusAminBTB, radiusAmaxBTB,
3191 fgkBTBlength/2., 0., 180.);
3192 TGeoTubeSeg *round1 = new TGeoTubeSeg( "ITSsddBTBround1",
3193 fgkRadiusBminBTB, fgkRadiusBminBTB+fgkBTBthick,
3194 fgkBTBlength/2., 270., 360.);
3195 TGeoTranslation *roundTr1 = new TGeoTranslation("ITSsddBTBround1Tr",
3196 -(fgkRadiusAminBTB+fgkBTBthick+fgkRadiusBminBTB),
3197 -dy, 0);
3198 roundTr1->RegisterYourself();
3199
3200 TGeoTubeSeg *round2 = new TGeoTubeSeg( "ITSsddBTBround2",
3201 fgkRadiusBminBTB, fgkRadiusBminBTB+fgkBTBthick,
3202 fgkBTBlength/2., 180., 270.);
3203 TGeoTranslation *roundTr2 = new TGeoTranslation("ITSsddBTBround2Tr",
3204 (fgkRadiusAminBTB+fgkBTBthick+fgkRadiusBminBTB),
3205 -dy, 0);
3206 roundTr2->RegisterYourself();
3207
3208 TGeoCompositeShape *sBaseThermalBridge = new TGeoCompositeShape(
3209 "ITSsddBaseThermalBridgeShape",
3210 "ITSsddBTBbase1:ITSsddBTBtr1"
3211 "+ ITSsddBTBbase2:ITSsddBTBtr2"
3212 "+ ITSsddBTBround1:ITSsddBTBround1Tr"
3213 "+ ITSsddBTBround2:ITSsddBTBround2Tr"
3214 "+ ITSsddBTBside:ITSsddBTBsideTr1"
3215 "+ ITSsddBTBside:ITSsddBTBsideTr2"
3216 "- ITSsddBTBhole:ITSsddBTBholeTr1"
3217 "- ITSsddBTBhole:ITSsddBTBholeTr2"
3218 "+ ITSsddBTBmainAxis");
3219
3220 if(GetDebug(3)){// Remove compiler warning.
3221 base1->InspectShape();
3222 base2->InspectShape();
3223 side->InspectShape();
3224 hole->InspectShape();
3225 mainAxis->InspectShape();
3226 round1->InspectShape();
3227 round2->InspectShape();
3228 };
3229
3230 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDD C AL (M55J)$");
3231 TGeoVolume *vBaseThermalBridge = new TGeoVolume( "ITSsddBaseThermalBridge",
3232 sBaseThermalBridge,
3233 carbonFiberLadderStruct);
3234
3235 vBaseThermalBridge->SetLineColor(fColorCarbonFiber);
3236 return vBaseThermalBridge;
3237}
3238
3239
3240//________________________________________________________________________
3241TGeoVolumeAssembly* AliITSv11GeometrySDD::CreateEndLadder(Int_t iLay) {
3242 //
3243 // Return an assembly containing a end of a CF ladder.
3244 //
3245
3246 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDD C AL (M55J)$"); // ITSsddCarbonM55J
3247 TGeoMedium *stesalite = GetMedium("G10FR4$");
3248 TGeoMedium *phynoxSDD = GetMedium("INOX$");
3249 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
3250
3251 Double_t length = (fgkLay3LadderLength-fgkLay3Ndet*fgkSegmentLength)/2.;
3252 Double_t coolPipeSuppH = fgkLay3CoolPipeSuppH;
3253 Double_t underSegDH = fLay3LadderUnderSegDH;
3254 Double_t footDZ = fgkRubyZladd3 - fgkLay3Ndet*fgkSegmentLength/2 - length/2;
3255 // footDZ is also where to place the ruby's center in local Z
3256 Double_t coolPipeEndLen = (fgkCoolPipeLay3Len-fgkSegmentLength*fgkLay3Ndet)/2;
3257
3258 if (iLay==3) {
3259 } else if (iLay==4) {
3260 length = (fgkLay4LadderLength-fgkLay4Ndet*fgkSegmentLength)/2.;
3261 coolPipeSuppH = fgkLay4CoolPipeSuppH;
3262 underSegDH = fLay4LadderUnderSegDH;
3263 footDZ = fgkRubyZladd4 - fgkLay4Ndet*fgkSegmentLength/2 - length/2;
3264 coolPipeEndLen = (fgkCoolPipeLay4Len-fgkSegmentLength*fgkLay4Ndet)/2;
3265 } else {
3266 printf("error in AliITSv11GeometrySDD::CreateEndLadder: Wrong layer");
3267 return 0;
3268 };
3269
3270 Double_t tDY = (- fgkLadderSegBoxDH/2 //space left on top of the ladder
3271 + underSegDH/2); //space under ladder segment
3272 // here tDY is not the same as for the segment because the end ladder
3273 // does not have a space under it, inside the general ladder volume.
3274 Double_t segmentLength = fgkSegmentLength;
3275 Double_t topCornerLength = fgkSegmentLength/2.-fgkLay4LaddTopCornerEnd;
3276
3277 TGeoVolumeAssembly *virtualEnd = new TGeoVolumeAssembly("ITSsddEnd");
3278
3279 //**********************************
3280 // coding real matter :
3281 //**********************************
3282 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
3283 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
3284 Double_t beta = (TMath::Pi()-2.*halfTheta)/4.;
3285 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
3286
3287 //--- The 3 V shape corners of the Carbon Fiber Ladder
3288 //--- the top V
3289 TGeoArb8 *cfLaddTop1 = CreateLadderSide("CFladdTopCornerV1shape",
3290 topCornerLength/2., halfTheta, -1,
3291 fgkLadderLa, fgkLadderHa, fgkLadderl);
3292 TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerV1",
3293 cfLaddTop1,carbonFiberLadderStruct);
3294 cfLaddTopVol1->SetLineColor(fColorCarbonFiber);
3295 TGeoArb8 *cfLaddTop2 = CreateLadderSide( "CFladdTopCornerV2shape",
3296 topCornerLength/2., halfTheta, 1,
3297 fgkLadderLa, fgkLadderHa, fgkLadderl);
3298 TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerV2",
3299 cfLaddTop2,carbonFiberLadderStruct);
3300 cfLaddTopVol2->SetLineColor(fColorCarbonFiber);
3301 TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2+tDY,
3302 -(length-topCornerLength)/2.);
3303 virtualEnd->AddNode(cfLaddTopVol1, 1, trTop1);
3304 virtualEnd->AddNode(cfLaddTopVol2, 1, trTop1);
3305
3306 //--- the 2 side V
3307 TGeoArb8 *cfLaddSide1 = CreateLadderSide( "CFladdSideCornerV1shape",
3308 length/2., beta, -1,
3309 fgkLadderLb, fgkLadderHb, fgkLadderl);
3310 TGeoVolume *cfLaddSideVol1 = new TGeoVolume("ITSsddCFladdSideCornerV1",
3311 cfLaddSide1,carbonFiberLadderStruct);
3312 cfLaddSideVol1->SetLineColor(fColorCarbonFiber);
3313 TGeoArb8 *cfLaddSide2 = CreateLadderSide( "CFladdSideCornerV2shape",
3314 length/2., beta, 1,
3315 fgkLadderLb, fgkLadderHb, fgkLadderl);
3316 TGeoVolume *cfLaddSideVol2 = new TGeoVolume("ITSsddCFladdSideCornerV2",
3317 cfLaddSide2,carbonFiberLadderStruct);
3318 cfLaddSideVol2->SetLineColor(fColorCarbonFiber);
3319 Double_t dYTranslation = ( fgkLadderHeight/2. - 0.5*fgkLadderWidth*
3320 TMath::Tan(beta) - fgkLadderBeamRadius );
3321
3322 // because center of the triangle doesn't correspond to virtual vol. center
3323 Double_t distCenterSideDown = 0.5*fgkLadderWidth/TMath::Cos(beta);
3324 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,
3325 alpha*TMath::RadToDeg());
3326 AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation+tDY, 0);
3327 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown, 0,
3328 -alpha*TMath::RadToDeg());
3329 AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation+tDY, 0);
3330 virtualEnd->AddNode(cfLaddSideVol1, 1, ctSideR);
3331 virtualEnd->AddNode(cfLaddSideVol2, 1, ctSideR);
3332 virtualEnd->AddNode(cfLaddSideVol1, 2, ctSideL);
3333 virtualEnd->AddNode(cfLaddSideVol2, 2, ctSideL);
3334
3335 //--- The beams
3336 // Beams on the sides
3337 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*
3338 TMath::Sin(2*beta)/(TanD(fgkBeamSidePhi)*TanD(fgkBeamSidePhi))) ));
3339
3340 //Euler rotation : about Z, then new X, then new Z
3341 TGeoRotation *beamRot1 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
3342 -beamPhiPrime*TMath::RadToDeg(), -90);
3343 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
3344 beamPhiPrime*TMath::RadToDeg(), -90);
3345 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
3346 beamPhiPrime*TMath::RadToDeg(), -90);
3347 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
3348 -beamPhiPrime*TMath::RadToDeg(), -90);
3349 TGeoCombiTrans *beamTransf1 = new TGeoCombiTrans(0.5*triangleHeight*
3350 TMath::Tan(halfTheta),
3351 fgkLadderBeamRadius/2. + tDY,
3352 -length/2 + segmentLength/8, beamRot1);
3353 TGeoCombiTrans *beamTransf3 = new TGeoCombiTrans( 0.5*triangleHeight*
3354 TMath::Tan(halfTheta),
3355 fgkLadderBeamRadius/2.+tDY,
3356 -length/2 + 3*segmentLength/8, beamRot2);
3357 TGeoCombiTrans *beamTransf5 = new TGeoCombiTrans(-0.5*triangleHeight*
3358 TMath::Tan(halfTheta),
3359 fgkLadderBeamRadius/2.+tDY,
3360 -length/2 + segmentLength/8, beamRot3);
3361 TGeoCombiTrans *beamTransf7 = new TGeoCombiTrans(-0.5*triangleHeight*
3362 TMath::Tan(halfTheta),
3363 fgkLadderBeamRadius/2. + tDY,
3364 -length/2+3*segmentLength/8, beamRot4);
3365
3366 virtualEnd->AddNode(fLaddSegCommonVol[6], 1, beamTransf1);
3367 virtualEnd->AddNode(fLaddSegCommonVol[6], 2, beamTransf3);
3368 virtualEnd->AddNode(fLaddSegCommonVol[6], 3, beamTransf5);
3369 virtualEnd->AddNode(fLaddSegCommonVol[6], 4, beamTransf7);
3370
3371 //--- Beams of the bottom
3372 TGeoRotation *bottomBeamRot1 = new TGeoRotation("",90, 90, 90);
3373
3374 /* Not there actually
3375 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
3376 fgkLadderWidth/2.-fgkLadderLb/3, 0, 180);
3377 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol",
3378 bottomBeam1, carbonFiberLadderStruct);
3379 bottomBeam1Vol->SetLineColor(fColorCarbonFiber);
3380
3381 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans(0,
3382 -(fgkLadderHeight/2-fgkLadderBeamRadius)+tDY,
3383 -length/2+fgkSegmentLength/2, bottomBeamRot1);
3384 virtualEnd->AddNode(bottomBeam1Vol, 1, bottomBeamTransf1);
3385*/
3386 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
3387 fgkLadderWidth/2.-fgkLadderLb/3, 0, 90);
3388 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",
3389 bottomBeam2, carbonFiberLadderStruct);
3390 bottomBeam2Vol->SetLineColor(fColorCarbonFiber);
3391 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
3392 -(fgkLadderHeight/2-fgkLadderBeamRadius)+tDY,-length/2,bottomBeamRot1);
3393 virtualEnd->AddNode(bottomBeam2Vol, 1, bottomBeamTransf2);
3394
3395 //**********************************
3396 //the cooling pipe supports
3397 Double_t triangleCPaxeDist = fgkCoolPipeSuppAxeDist-fgkCoolPipeSuppWidthExt-
3398 fgkCoolPipeSuppWidthIn+fgkLadderBeamRadius;
3399
3400 Double_t coolPipeSuppL = TMath::Tan(halfTheta)*
3401 (triangleHeight+triangleCPaxeDist/
3402 TMath::Sin(halfTheta)-coolPipeSuppH);
3403
3404 if (fAddCoolingSyst) {
3405 TGeoRotation *rotCPS2 = new TGeoRotation("",-halfTheta*TMath::RadToDeg(),-90, 90);
3406 TGeoRotation *rotCPS1 = new TGeoRotation("", halfTheta*TMath::RadToDeg(),-90,-90);
3407 TGeoCombiTrans *transCPS1 = new TGeoCombiTrans(coolPipeSuppL,
3408 -fgkLadderHeight/2.+ tDY +
3409 coolPipeSuppH+fgkLadderBeamRadius,
3410 -length/2., rotCPS1);
3411 TGeoCombiTrans *transCPS4 = new TGeoCombiTrans(-coolPipeSuppL,
3412 -fgkLadderHeight/2.+ tDY +
3413 coolPipeSuppH+fgkLadderBeamRadius,
3414 -length/2., rotCPS2);
3415
3416 virtualEnd->AddNode(fCoolPipeSupportL, 1, transCPS1);
3417 virtualEnd->AddNode(fCoolPipeSupportR, 1, transCPS4);
3418 };
3419
3420 //**********************************
3421 //--- The stesalite foot of the ladder
3422
3423 Double_t footDY = -(fgkLadderHeight/2-fgkLadderBeamRadius)+tDY
3424 - fgkLadFootY/2+fgkLadFingerPrintY;
3425
3426 TGeoTranslation *footTr = new TGeoTranslation("SDDfootTr",0,footDY,footDZ);
3427 virtualEnd->AddNode(fLadderFoot, 1, footTr);
3428
3429 //=====================================
3430 //--- cooling pipe
3431
3432 if (fAddCoolingSyst) {
3433
3434 TGeoTranslation *pipeTr1 = new TGeoTranslation(coolPipeSuppL,
3435 -fgkLadderHeight/2.+ tDY +
3436 coolPipeSuppH + fgkLadderBeamRadius,
3437 -length/2.+coolPipeEndLen/2.);
3438 TGeoTranslation *pipeTr2 = new TGeoTranslation(-coolPipeSuppL,
3439 -fgkLadderHeight/2. + tDY +
3440 fgkLadderBeamRadius + coolPipeSuppH,
3441 -length/2.+coolPipeEndLen/2.);
3442
3443 TGeoTube *coolingPipeShape = new TGeoTube( fgkCoolPipeInnerDiam/2,
3444 fgkCoolPipeOuterDiam/2,
3445 coolPipeEndLen/2);
3446 TGeoTube *coolerShape = new TGeoTube( 0, fgkCoolPipeInnerDiam/2,
3447 coolPipeEndLen/2);
3448
3449 TGeoVolume *coolingPipe = new TGeoVolume("ITSsddCoolingPipeEnd",
3450 coolingPipeShape, phynoxSDD );
3451 coolingPipe->SetLineColor(fColorPhynox);
3452 TGeoVolume *cooler = new TGeoVolume("ITSsddCoolingEndLiquid",coolerShape,
3453 coolerMediumSDD );
3454
3455 virtualEnd->AddNode(coolingPipe, 1, pipeTr1);
3456 virtualEnd->AddNode(coolingPipe, 2, pipeTr2);
3457 if (fCoolingOn) {
3458 virtualEnd->AddNode(cooler, 1, pipeTr1);
3459 virtualEnd->AddNode(cooler, 2, pipeTr2);
3460 };
3461 };
3462
3463 //=====================================
3464 //--- HV cable guide
3465
3466
3467 TGeoBBox* guideHVbox = new TGeoBBox("guideHVbox",fgkHVguideX1/2,
3468 fgkHVguideY1/2,fgkHVguideZ1/2);
3469 TGeoVolume *guideHV = new TGeoVolume("guideHV",guideHVbox,stesalite);
3470
3471 TGeoTranslation* guideHVtr = new TGeoTranslation(fgkHVguideDX,
3472 -(fgkLadderHeight/2-fgkLadderBeamRadius)+tDY-fgkHVguideY1/2,
3473 footDZ+fgkLadFootZ/2+fgkHVguideZ1/2-(fgkHVguideSuppFullZ-fgkHVguideZ2));
3474 virtualEnd->AddNode(guideHV, 1, guideHVtr);
3475
3476 //=====================================
3477 //--- raccordo
3478 Double_t raccordFullLen = fgkConnectorCoolTubeL1+fgkConnectorCoolTubeL2+fgkConnectorCoolTubeL3;
3479 TGeoTranslation *trRaccordo1 = new TGeoTranslation("trRaccordo1",-coolPipeSuppL,
3480 -fgkLadderHeight/2.+ tDY +
3481 coolPipeSuppH+fgkLadderBeamRadius,
3482 -length/2.+coolPipeEndLen+raccordFullLen/2);
3483 TGeoTranslation *trRaccordo2 = new TGeoTranslation("trRaccordo2", coolPipeSuppL,
3484 -fgkLadderHeight/2.+ tDY +
3485 coolPipeSuppH+fgkLadderBeamRadius,
3486 -length/2.+coolPipeEndLen+raccordFullLen/2);
3487
3488 virtualEnd->AddNode(fRaccordoL, 1, trRaccordo1);
3489 virtualEnd->AddNode(fRaccordoL, 2, trRaccordo2);
3490
3491 if(GetDebug(1)) virtualEnd->CheckOverlaps(0.01);
3492
3493 return virtualEnd;
3494}
3495
3496//________________________________________________________________________
3497TGeoVolumeAssembly* AliITSv11GeometrySDD::CreateLadderFoot() {
3498
3499 //--- The stesalite foot of the ladder
3500 // Are missing :
3501 // The 2 screw holes on the left part
3502 // the small holes at each corner of the ruby cage (diam 2mm)
3503 // the really small level difference of 0.3mm on the bottom
3504
3505
3506 TGeoMedium *stesalite = GetMedium("G10FR4$");
3507
3508 TGeoVolumeAssembly *virtualFoot = new TGeoVolumeAssembly("ITSsddFoot");
3509
3510 Double_t epsilon = 2e-10;
3511 TGeoBBox *ladFootBox1 = new TGeoBBox("ladFootBox1",fgkLadBox1X/2, fgkLadFootY/2,
3512 fgkLadFootZ/2);
3513 TGeoTranslation *ladFootBox1Tr = new TGeoTranslation("ladFootBox1Tr",
3514 fgkLadFootX/2-fgkLadBox1X/2,0,0);
3515 TGeoBBox *ladFingerPrint = new TGeoBBox("ladFingerPrint",fgkLadFingerPrintX/2,
3516 fgkLadFingerPrintY/2+epsilon, fgkLadFootZ/2+epsilon);
3517
3518 TGeoTranslation *ladFingerPrintTr = new TGeoTranslation("ladFingerPrintTr",
3519 fgkLadFootX/2-fgkLadFingerPrintBorder-fgkLadFingerPrintX/2,
3520 fgkLadFootY/2-fgkLadFingerPrintY/2+epsilon,
3521 0);
3522
3523 TGeoBBox *rubyCageHole = new TGeoBBox("rubyCageHole",fgkRubyCageHoleX/2,
3524 fgkRubyCageHoleY/2+epsilon, fgkRubyCageHoleZ/2);
3525
3526 TGeoTranslation *rubyCageHoleTr = new TGeoTranslation("rubyCageHoleTr",
3527 fgkLadFootX/2-(fgkLadFootX/2-fgkRubyDX)+fgkRubyCageAxisShift,
3528 fgkLadFootY/2-fgkRubyCageHoleY/2,0);
3529
3530 double rubyScrewHoleLen = fgkLadFootX/2-fgkRubyDX;
3531 TGeoTube *rubyScrewHole = new TGeoTube("rubyScrewHole", 0,fgkScrewM4diam/2,
3532 rubyScrewHoleLen/2);
3533
3534 TGeoRotation *rot9090 = new TGeoRotation("",90,90,0);
3535 TGeoCombiTrans *rubyScrewHoleTr = new TGeoCombiTrans("rubyScrewHoleTr",
3536 fgkLadFootX/2-rubyScrewHoleLen/2,
3537 -fgkRubyScrewShiftToCenterY, 0, rot9090);
3538
3539 Double_t rubyHoleLen = fgkLadFootY-fgkRubyCageHoleY;
3540 TGeoTube *rubyHole = new TGeoTube("rubyHole", 0,fgkRubyHoleDiam/2,
3541 rubyHoleLen/2);
3542
3543 TGeoRotation *rot90 = new TGeoRotation("",0,90,0);
3544 TGeoCombiTrans *rubyHoleTr = new TGeoCombiTrans("rubyHoleTr", fgkRubyDX,
3545 -(fgkLadFootY-rubyHoleLen)/2, 0, rot90);
3546
3547 ladFootBox1Tr->RegisterYourself();
3548 ladFingerPrintTr->RegisterYourself();
3549 rubyCageHoleTr->RegisterYourself();
3550 rubyScrewHoleTr->RegisterYourself();
3551 rubyHoleTr->RegisterYourself();
3552
3553 TGeoCompositeShape *footRightPart = new TGeoCompositeShape(
3554 "ladFootBox1:ladFootBox1Tr-(ladFingerPrint:ladFingerPrintTr"
3555 "+rubyCageHole:rubyCageHoleTr+rubyScrewHole:rubyScrewHoleTr"
3556 "+rubyHole:rubyHoleTr)");
3557 TGeoVolume *vFootRightPart = new TGeoVolume("vFootRightPart",
3558 footRightPart,stesalite);
3559 vFootRightPart->SetLineColor(fColorStesalite);
3560
3561 virtualFoot->AddNode(vFootRightPart, 1, 0);
3562
3563
3564 //--- This was the right part of the foot, now let's do the middle
3565 //--- and the right parts
3566
3567 Double_t middleX = fgkLadFootX-fgkLadBox1X-fgkLadFingerPrintX-fgkLadFingerPrintBorder;
3568 TGeoBBox *footMiddle = new TGeoBBox("footMiddle", middleX/2, fgkLadFootMiddleY/2,
3569 fgkLadFootZ/2);
3570 TGeoTranslation *middleXTr = new TGeoTranslation("middleXTr",
3571 fgkLadFootX/2-fgkLadBox1X-middleX/2,
3572 fgkLadFootY/2-fgkLadFootMiddleY/2, 0);
3573
3574 TGeoVolume *vFootMiddle = new TGeoVolume("vFootMiddle", footMiddle,stesalite);
3575 vFootMiddle->SetLineColor(fColorStesalite);
3576 virtualFoot->AddNode(vFootMiddle, 1, middleXTr);
3577
3578 //--
3579 TGeoBBox *footLeftLadFinger = new TGeoBBox("footLeftLadFinger", fgkLadFingerPrintX/2,
3580 (fgkLadFootY-fgkLadFingerPrintY)/2,
3581 fgkLadFootZ/2);
3582 TGeoTranslation *footLeftLadFingerTr = new TGeoTranslation("footLeftLadFingerTr",
3583 -fgkLadFootX/2+fgkLadFingerPrintBorder+fgkLadFingerPrintX/2,
3584 -fgkLadFingerPrintY/2, 0);
3585 TGeoVolume *vFootLeftLadFinger = new TGeoVolume("vFootLeftLadFinger",footLeftLadFinger,
3586 stesalite);
3587 vFootLeftLadFinger->SetLineColor(fColorStesalite);
3588 virtualFoot->AddNode(vFootLeftLadFinger, 1, footLeftLadFingerTr);
3589
3590 //--
3591 TGeoBBox *footLeft = new TGeoBBox("footLeft", fgkLadFingerPrintBorder/2,
3592 fgkLadFootY/2,
3593 fgkLadFootZ/2);
3594 TGeoTranslation *footLeftTr = new TGeoTranslation("footLeftTr",
3595 -fgkLadFootX/2+fgkLadFingerPrintBorder/2,
3596 0, 0);
3597 TGeoVolume *vFootLeft = new TGeoVolume("vFootLeft",footLeft,stesalite);
3598 vFootLeft->SetLineColor(fColorStesalite);
3599 virtualFoot->AddNode(vFootLeft, 1, footLeftTr);
3600
3601 if(GetDebug(3)){ // Remove compiler warning.
3602 ladFingerPrint->InspectShape();
3603 ladFootBox1->InspectShape();
3604 rubyCageHole->InspectShape();
3605 rubyScrewHole->InspectShape();
3606 rubyHole->InspectShape();
3607 }
3608
3609 return virtualFoot;
3610}
3611
3612//________________________________________________________________________
3613TGeoVolumeAssembly* AliITSv11GeometrySDD::CreateCarlosCard(Int_t iLay) {
3614 //
3615 // return an assembly containing the CARLOS end-ladder board
3616 // and the heat bridge
3617 //
3618
3619 (void) iLay;
3620 TGeoMedium *glassFiber = GetMedium("GLASS FIBER$");// glassFiber
3621 TGeoMedium *siliconChip = GetMedium("SDD SI CHIP$");// ITSsddSiChip
3622 TGeoMedium *plastiChip = GetMedium("SDDKAPTON (POLYCH2)$"); // ITSsddKAPTON_POLYCH2
3623 TGeoMedium *copper = GetMedium("COPPER$");
3624 TGeoMedium *alCu12SDD = GetMedium("ALCU12$"); // ITSsddAlCu12
3625 TGeoMedium *stainless = GetMedium("AISI304L$"); // for screws
3626
3627 //=========================================
3628 // cooling support of the Carlos card (HeatBridge):
3629 TGeoVolumeAssembly *assemblySupCarlos = new TGeoVolumeAssembly("assemblySupCarlos");
3630
3631 TGeoBBox *supCarlosBoard1 = new TGeoBBox("",fgkCarlosSuppX1/2,fgkCarlosSuppY1/2,
3632 fgkCarlosSuppZ/2);
3633 TGeoBBox *supCarlosBoard2 = new TGeoBBox("",fgkCarlosSuppX2/2,fgkCarlosSuppY2/2,
3634 fgkCarlosSuppZ/2);
3635 TGeoVolume *vSupCarlosBoard1 = new TGeoVolume("vSupCarlosBoard1",
3636 supCarlosBoard1, alCu12SDD);
3637 TGeoVolume *vSupCarlosBoard2 = new TGeoVolume("vSupCarlosBoard2",
3638 supCarlosBoard2, alCu12SDD);
3639 vSupCarlosBoard1->SetLineColor(4);
3640 vSupCarlosBoard2->SetLineColor(4);
3641
3642
3643 Double_t shiftGlob = -fgkCarlosSuppZ/2+fgkCarlosSuppTopLen;
3644 // shift of the main planes in the direction of their width
3645 // the center is fixed at the center of the 2 small fixing arms on each sides.
3646 //shiftGlob=0.5;
3647
3648 shiftGlob+= 0.5*fgkCarlosSuppY3/cos((90-fgkCarlosSuppAngle)*TMath::DegToRad());
3649 shiftGlob-= 0.5*fgkCarlosSuppY2*tan((90-fgkCarlosSuppAngle)*TMath::DegToRad());
3650 Double_t shiftGlobY = shiftGlob*sin(fgkCarlosSuppAngle*TMath::DegToRad());
3651 Double_t shiftGlobZ = shiftGlob*cos(fgkCarlosSuppAngle*TMath::DegToRad());
3652
3653 TGeoTranslation *carlosSupTr1 = new TGeoTranslation( -fgkCarlosSuppX2/2,
3654 (-fgkCarlosSuppY1+fgkCarlosSuppY2)/2+shiftGlobY,
3655 +shiftGlobZ);
3656
3657 TGeoTranslation *carlosSupTr2 = new TGeoTranslation( fgkCarlosSuppX1/2,
3658 shiftGlobY,
3659 shiftGlobZ);
3660
3661 assemblySupCarlos->AddNode(vSupCarlosBoard1, 0, carlosSupTr1);
3662 assemblySupCarlos->AddNode(vSupCarlosBoard2, 0, carlosSupTr2);
3663
3664 //=========================================
3665 // fixing arm of the cooling support :
3666 TGeoBBox *supCarlosBoard3 = new TGeoBBox("",fgkCarlosSuppX3/2,fgkCarlosSuppY3/2,
3667 fgkCarlosSuppZ3/2);
3668 TGeoVolume *vSupCarlosBoard3 = new TGeoVolume("vSupCarlosBoard3",
3669 supCarlosBoard3, alCu12SDD);
3670 vSupCarlosBoard3->SetLineColor(4);
3671
3672 // screw inside :
3673 TGeoTube *littleScrew = new TGeoTube("littleScrew", 0, fgkLittleScrewR,
3674 fgkCarlosSuppY3/2);
3675 TGeoVolume *vLittleScrew = new TGeoVolume("vLittleScrew",
3676 littleScrew, stainless);
3677 TGeoRotation *rotScrew = new TGeoRotation("",0,90,0);
3678 TGeoCombiTrans *cbScrew1 = new TGeoCombiTrans(0, 0, fgkCarlosSuppZ3/2 -
3679 fgkLittleScrewHeadR-0.07, rotScrew);
3680 TGeoCombiTrans *cbScrew2 = new TGeoCombiTrans(0, 0, -fgkCarlosSuppZ3/2 +
3681 fgkLittleScrewHeadR+0.07, rotScrew);
3682 vSupCarlosBoard3->AddNode(vLittleScrew,1, cbScrew1);
3683 vSupCarlosBoard3->AddNode(vLittleScrew,2, cbScrew2);
3684
3685 TGeoRotation *carlosSupRot = new TGeoRotation("carlosSuppInvertAngle",
3686 0, fgkCarlosSuppAngle, 0);
3687 TGeoCombiTrans *carlosSupTr3 = new TGeoCombiTrans((fgkCarlosSuppX1+
3688 fgkCarlosSuppX2+fgkCarlosSuppX3)/2,0,0, carlosSupRot);
3689 TGeoCombiTrans *carlosSupTr4 = new TGeoCombiTrans(-(fgkCarlosSuppX1+
3690 fgkCarlosSuppX2+fgkCarlosSuppX3)/2,0,0, carlosSupRot);
3691 assemblySupCarlos->AddNode(vSupCarlosBoard3, 0, carlosSupTr3);
3692 assemblySupCarlos->AddNode(vSupCarlosBoard3, 1, carlosSupTr4);
3693
3694
3695 //=========================================
3696 // screws fixing the board on the U tube
3697 Double_t aaa = fgkCarlosSuppY3; // ???
3698 //Double_t aaa = fgkCarlosSuppY3/2 + fgkLittleScrewHeadH/2;
3699 Double_t bbb = fgkCarlosSuppZ3/2 - fgkLittleScrewHeadR;
3700 Double_t screw1y = ( aaa*cos(TMath::DegToRad()*fgkCarlosSuppAngle) -
3701 bbb*sin(TMath::DegToRad()*fgkCarlosSuppAngle) );
3702 Double_t screw1z = ( aaa*sin(TMath::DegToRad()*fgkCarlosSuppAngle) +
3703 bbb*cos(TMath::DegToRad()*fgkCarlosSuppAngle) )-0.07;
3704
3705 TGeoRotation *CarlosSuppRot = (TGeoRotation *)fCommonTr[0];
3706
3707 TGeoCombiTrans* lScrewTr1 = new TGeoCombiTrans((fgkCarlosSuppX1+
3708 fgkCarlosSuppX2+fgkCarlosSuppX3)/2,
3709 screw1y,screw1z, CarlosSuppRot);
3710
3711 TGeoCombiTrans* lScrewTr2 = new TGeoCombiTrans((fgkCarlosSuppX1+
3712 fgkCarlosSuppX2+fgkCarlosSuppX3)/2,
3713 screw1z,screw1y, CarlosSuppRot);
3714
3715 TGeoCombiTrans *lScrewTr3 = new TGeoCombiTrans(-(fgkCarlosSuppX1+
3716 fgkCarlosSuppX2+fgkCarlosSuppX3)/2,
3717 screw1y,screw1z, CarlosSuppRot);
3718
3719 TGeoCombiTrans *lScrewTr4 = new TGeoCombiTrans(-(fgkCarlosSuppX1+
3720 fgkCarlosSuppX2+fgkCarlosSuppX3)/2,
3721 screw1z,screw1y, CarlosSuppRot);
3722
3723 assemblySupCarlos->AddNode(fCommonVol[0], 1, lScrewTr1);
3724 assemblySupCarlos->AddNode(fCommonVol[0], 2, lScrewTr2);
3725 assemblySupCarlos->AddNode(fCommonVol[0], 3, lScrewTr3);
3726 assemblySupCarlos->AddNode(fCommonVol[0], 4, lScrewTr4);
3727
3728 //=========================================
3729 // board
3730 Double_t p1[3], p2[3], vX[3] = {1,0,0};
3731 AliITSv11GeomCableFlat card1("cardCarlos1", fgkCarlosCardZ1, fgkCarlosCardY1); // name, width, thickness
3732 card1.SetNLayers(2);
3733 card1.SetLayer(0, fgkCarlosCardCuY, copper, kOrange); // index, thickness, material, color
3734 card1.SetLayer(1, fgkCarlosCardY1-fgkCarlosCardCuY, glassFiber, 30);
3735 card1.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3736 p1[0] = -fgkCarlosCardX1/2;
3737 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge;
3738 p1[2] = fgkCarlosCardShift;
3739 p2[0] = fgkCarlosCardX1/2;
3740 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge;
3741 p2[2] = fgkCarlosCardShift;
3742 card1.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3743 card1.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3744 card1.CreateAndInsertBoxCableSegment(1,90);
3745
3746 AliITSv11GeomCableFlat card2("cardCarlos2", fgkCarlosCardZ2, fgkCarlosCardY1); // name, width, thickness
3747 card2.SetNLayers(2);
3748 card2.SetLayer(0, fgkCarlosCardCuY, copper, kOrange); // index, thickness, material, color
3749 card2.SetLayer(1, fgkCarlosCardY1-fgkCarlosCardCuY, glassFiber, 30);
3750 card2.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3751
3752 p1[0] = -fgkCarlosCardX1/2;
3753 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge;
3754 p1[2] = fgkCarlosCardShift + fgkCarlosCardZ1/2 + fgkCarlosCardZ2/2;
3755
3756 p2[0] = -fgkCarlosCardX1/2 + fgkCarlosCardX2;
3757 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge;
3758 p2[2] = fgkCarlosCardShift + fgkCarlosCardZ1/2 + fgkCarlosCardZ2/2;
3759 card2.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3760 card2.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3761 card2.CreateAndInsertBoxCableSegment(1,90);
3762
3763 //=========================================
3764 // some chips on the board
3765
3766 AliITSv11GeomCableFlat u1("carlosCardU1", fgkCarlosU1Z, fgkCarlosU1Y); // name, width, thickness
3767 u1.SetNLayers(2);
3768 u1.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3769 u1.SetLayer(1, fgkCarlosU1Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3770 u1.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3771
3772 p1[0] = fgkCarlosU1posX - fgkCarlosU1X/2;
3773 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU1Y/2;
3774 p1[2] = fgkCarlosCardShift + fgkCarlosU1posZ;
3775
3776 p2[0] = fgkCarlosU1posX + fgkCarlosU1X/2;
3777 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU1Y/2;
3778 p2[2] = fgkCarlosCardShift + fgkCarlosU1posZ;
3779 u1.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3780 u1.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3781 u1.CreateAndInsertBoxCableSegment(1,90);
3782
3783 //---
3784 AliITSv11GeomCableFlat u2("carlosCardU2", fgkCarlosU2Z, fgkCarlosU2Y); // name, width, thickness
3785 u2.SetNLayers(2);
3786 u2.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3787 u2.SetLayer(1, fgkCarlosU2Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3788 u2.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3789
3790 p1[0] = fgkCarlosU2posX - fgkCarlosU2X/2;
3791 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU2Y/2;
3792 p1[2] = fgkCarlosCardShift + fgkCarlosU2posZ;
3793
3794 p2[0] = fgkCarlosU2posX + fgkCarlosU2X/2;
3795 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU2Y/2;
3796 p2[2] = fgkCarlosCardShift + fgkCarlosU2posZ;
3797 u2.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3798 u2.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3799 u2.CreateAndInsertBoxCableSegment(1,90);
3800
3801 //---
3802 AliITSv11GeomCableFlat u3("carlosCardU3", fgkCarlosU3Z, fgkCarlosU3Y); // name, width, thickness
3803 u3.SetNLayers(2);
3804 u3.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3805 u3.SetLayer(1, fgkCarlosU3Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3806 u3.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3807
3808 Double_t u3Y = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU3Y/2;
3809 p1[0] = fgkCarlosU3posX - fgkCarlosU3X/2;
3810 p1[1] = u3Y;
3811 p1[2] = fgkCarlosCardShift + fgkCarlosU3posZ;
3812
3813 p2[0] = fgkCarlosU3posX + fgkCarlosU3X/2;
3814 p2[1] = u3Y;
3815 p2[2] = fgkCarlosCardShift + fgkCarlosU3posZ;
3816 u3.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3817 u3.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3818 TGeoVolume *u3Vol = u3.CreateAndInsertBoxCableSegment(1,90);
3819
3820 //--- U4 is like U3 (?)
3821 TGeoCombiTrans *u4Trans = new TGeoCombiTrans;
3822 u4Trans->RotateX(90);
3823 u4Trans->SetTranslation(fgkCarlosU4posX, u3Y,
3824 fgkCarlosCardShift + fgkCarlosU4posZ);
3825 assemblySupCarlos->AddNode(u3Vol, 2, u4Trans);
3826
3827 //---
3828 AliITSv11GeomCableFlat u17("carlosCardU17", fgkCarlosU17Z, fgkCarlosU17Y); // name, width, thickness
3829 u17.SetNLayers(2);
3830 u17.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3831 u17.SetLayer(1, fgkCarlosU17Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3832 u17.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3833
3834 p1[0] = fgkCarlosU17posX - fgkCarlosU17X/2;
3835 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU17Y/2;
3836 p1[2] = fgkCarlosCardShift + fgkCarlosU17posZ;
3837
3838 p2[0] = fgkCarlosU17posX + fgkCarlosU17X/2;
3839 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU17Y/2;
3840 p2[2] = fgkCarlosCardShift + fgkCarlosU17posZ;
3841 u17.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3842 u17.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3843 u17.CreateAndInsertBoxCableSegment(1,90);
3844
3845 //---
3846 AliITSv11GeomCableFlat u35("carlosCardU35", fgkCarlosU35Z, fgkCarlosU35Y); // name, width, thickness
3847 u35.SetNLayers(2);
3848 u35.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3849 u35.SetLayer(1, fgkCarlosU35Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3850 u35.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3851
3852 p1[0] = fgkCarlosU35posX - fgkCarlosU35X/2;
3853 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU35Y/2;
3854 p1[2] = fgkCarlosCardShift + fgkCarlosU35posZ;
3855
3856 p2[0] = fgkCarlosU35posX + fgkCarlosU35X/2;
3857 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU35Y/2;
3858 p2[2] = fgkCarlosCardShift + fgkCarlosU35posZ;
3859 u35.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3860 u35.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3861 u35.CreateAndInsertBoxCableSegment(1,90);
3862
3863 //---
3864 AliITSv11GeomCableFlat u36("carlosCardU36", fgkCarlosU36Z, fgkCarlosU36Y); // name, width, thickness
3865 u36.SetNLayers(2);
3866 u36.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3867 u36.SetLayer(1, fgkCarlosU36Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3868 u36.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3869
3870 p1[0] = fgkCarlosU36posX - fgkCarlosU36X/2;
3871 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU36Y/2;
3872 p1[2] = fgkCarlosCardShift + fgkCarlosU36posZ;
3873
3874 p2[0] = fgkCarlosU36posX + fgkCarlosU36X/2;
3875 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosU36Y/2;
3876 p2[2] = fgkCarlosCardShift + fgkCarlosU36posZ;
3877 u36.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3878 u36.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3879 u36.CreateAndInsertBoxCableSegment(1,90);
3880
3881 //--- QZ1
3882 AliITSv11GeomCableFlat qz1("carlosCardQZ1", fgkCarlosQZ1Z, fgkCarlosQZ1Y); // name, width, thickness
3883 qz1.SetNLayers(2);
3884 qz1.SetLayer(0, fgkCarlosCardChipSiThick, siliconChip, kGreen); // index, thickness, material, color
3885 qz1.SetLayer(1, fgkCarlosQZ1Y - fgkCarlosCardChipSiThick, plastiChip, kGray+3);
3886 qz1.SetInitialNode( (TGeoVolume *) assemblySupCarlos);
3887
3888 p1[0] = fgkCarlosQZ1posX - fgkCarlosQZ1X/2;
3889 p1[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosQZ1Y/2;
3890 p1[2] = fgkCarlosCardShift + fgkCarlosQZ1posZ;
3891
3892 p2[0] = fgkCarlosQZ1posX + fgkCarlosQZ1X/2;
3893 p2[1] = shiftGlobY - fgkCarlosCard2HeatBridge + fgkCarlosCardY1/2 + fgkCarlosQZ1Y/2;
3894 p2[2] = fgkCarlosCardShift + fgkCarlosQZ1posZ;
3895 qz1.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 0, p1, vX);
3896 qz1.AddCheckPoint( (TGeoVolume *) assemblySupCarlos, 1, p2, vX);
3897 qz1.CreateAndInsertBoxCableSegment(1,90);
3898
3899 return assemblySupCarlos;
3900}
3901
3902//________________________________________________________________________
3903Int_t AliITSv11GeometrySDD::CreateLVCard() {
3904 //
3905 // Creates the assemblies containing the LV cards (left and right)
3906 //
3907
3908 TGeoMedium *glassFiber = GetMedium("GLASS FIBER$");// glassFiber
3909 TGeoMedium *siliconChip = GetMedium("SDD SI CHIP$");// ITSsddSiChip
3910 TGeoMedium *plastiChip = GetMedium("SDDKAPTON (POLYCH2)$"); // ITSsddKAPTON_POLYCH2
3911 TGeoMedium *copper = GetMedium("COPPER$");
3912 TGeoMedium *alCu12SDD = GetMedium("ALCU12$"); // ITSsddAlCu12
3913 TGeoMedium *stainless = GetMedium("AISI304L$"); // for screws
3914
3915 fCardLVL = new TGeoVolumeAssembly("ITSsddLVCardLeft");
3916 fCardLVR = new TGeoVolumeAssembly("ITSsddLVCardRight");
3917
3918 // we are going to use flat cable class to create multilayer box,
3919 // then we can use the pointers to created volumes to place them elsewhere
3920 Double_t p1[3], p2[3], vX[3] = {1,0,0};
3921
3922 Double_t carLVfullThick = fgkLVcardZ+fgkLVcardCuZ;
3923 AliITSv11GeomCableFlat cardLV("cardLV", fgkLVcardY, carLVfullThick); // name, width, thickness
3924 cardLV.SetNLayers(2);
3925 cardLV.SetLayer(0, fgkLVcardCuZ, copper, 30); // index, thickness, material, color
3926 cardLV.SetLayer(1, fgkLVcardZ, glassFiber, 30);
3927 cardLV.SetInitialNode( (TGeoVolume *) fCardLVL);
3928 p1[0] = 0;
3929 p1[1] = fgkLVcardY/2;
3930 p1[2] = 0;
3931 p2[0] = fgkLVcardX;
3932 p2[1] = fgkLVcardY/2;
3933 p2[2] = 0;
3934 cardLV.AddCheckPoint( (TGeoVolume *) fCardLVL, 0, p1, vX);
3935 cardLV.AddCheckPoint( (TGeoVolume *) fCardLVL, 1, p2, vX);
3936 TGeoVolume* boxVol = cardLV.CreateAndInsertBoxCableSegment(1);
3937 TGeoRotation *rotAdd = new TGeoRotation("",90,0,0);
3938 TGeoCombiTrans *trCard = new TGeoCombiTrans(-fgkLVcardX/2,fgkLVcardY/2,0,rotAdd);
3939 fCardLVR->AddNode(boxVol, 1, trCard);
3940
3941 Double_t chip0fullThick = fgkLVChip0Z + fgkLVChip0SiZ;
3942 AliITSv11GeomCableFlat chipO("chipO", fgkLVChip0Y, chip0fullThick); // name, width, thickness
3943 chipO.SetNLayers(2);
3944 chipO.SetLayer(0, fgkLVChip0SiZ, siliconChip, 8); // index, thickness, material, color
3945 chipO.SetLayer(1, fgkLVChip0Z, plastiChip, 12);
3946 chipO.SetInitialNode( (TGeoVolume *) fCardLVL);
3947 p1[0] = (fgkLVChip0PosX - fgkLVChip0X/2);
3948 p1[1] = fgkLVChip0PosY;
3949 p1[2] = carLVfullThick/2 + chip0fullThick/2;
3950
3951 p2[0] = (fgkLVChip0PosX + fgkLVChip0X/2);
3952 p2[1] = fgkLVChip0PosY;
3953 p2[2] = carLVfullThick/2 + chip0fullThick/2;
3954 chipO.AddCheckPoint( (TGeoVolume *) fCardLVL, 0, p1, vX);
3955 chipO.AddCheckPoint( (TGeoVolume *) fCardLVL, 1, p2, vX);
3956 boxVol = chipO.CreateAndInsertBoxCableSegment(1);
3957 trCard = new TGeoCombiTrans( -fgkLVChip0PosX,
3958 fgkLVChip0PosY,
3959 carLVfullThick/2+chip0fullThick/2, rotAdd);
3960 fCardLVR->AddNode(boxVol, 1, trCard);
3961
3962 // put also this chip on the other side of the card
3963 trCard = new TGeoCombiTrans( fgkLVChip0PosX,
3964 fgkLVChip0PosY,
3965 -carLVfullThick/2-chip0fullThick/2, rotAdd);
3966 fCardLVL->AddNode(boxVol, 2, trCard);
3967 trCard = new TGeoCombiTrans( -fgkLVChip0PosX,
3968 fgkLVChip0PosY,
3969 -carLVfullThick/2-chip0fullThick/2, rotAdd);
3970 fCardLVR->AddNode(boxVol, 2, trCard);
3971
3972 Double_t chip1fullThick = fgkLVChip1Z + fgkLVChip1SiZ;
3973 AliITSv11GeomCableFlat chip1("chip1", fgkLVChip1Y, chip1fullThick);
3974 chip1.SetNLayers(2);
3975 chip1.SetLayer(0, fgkLVChip1SiZ, siliconChip, 8);
3976 chip1.SetLayer(1, fgkLVChip1Z, plastiChip, 12);
3977 chip1.SetInitialNode( (TGeoVolume *) fCardLVL);
3978 p1[0] = (fgkLVChip1PosX-fgkLVChip1X/2);
3979 p1[1] = fgkLVChip1PosY;
3980 p1[2] = carLVfullThick/2 + chip1fullThick/2;
3981
3982 p2[0] = (fgkLVChip1PosX+fgkLVChip1X/2);
3983 p2[1] = fgkLVChip1PosY;
3984 p2[2] = carLVfullThick/2 + chip1fullThick/2;
3985 chip1.AddCheckPoint( (TGeoVolume *) fCardLVL, 0, p1, vX);
3986 chip1.AddCheckPoint( (TGeoVolume *) fCardLVL, 1, p2, vX);
3987 boxVol = chip1.CreateAndInsertBoxCableSegment(1);
3988 trCard = new TGeoCombiTrans( -fgkLVChip1PosX,
3989 fgkLVChip1PosY,
3990 carLVfullThick/2 + chip1fullThick/2, rotAdd);
3991 fCardLVR->AddNode(boxVol, 1, trCard);
3992
3993 Double_t chip2fullThick = fgkLVChip2Z + fgkLVChip2SiZ;
3994 AliITSv11GeomCableFlat chip2("chip2", fgkLVChip2Y, chip2fullThick);
3995 chip2.SetNLayers(2);
3996 chip2.SetLayer(0, fgkLVChip2SiZ, siliconChip, 8);
3997 chip2.SetLayer(1, fgkLVChip2Z, plastiChip, 12);
3998 chip2.SetInitialNode( (TGeoVolume *) fCardLVL);
3999 p1[0] = (fgkLVChip2PosX-fgkLVChip2X/2);
4000 p1[1] = fgkLVChip2PosY;
4001 p1[2] = carLVfullThick/2 + chip2fullThick/2;
4002 p2[0] = (fgkLVChip2PosX+fgkLVChip2X/2);
4003 p2[1] = fgkLVChip2PosY;
4004 p2[2] = carLVfullThick/2 + chip2fullThick/2;
4005 chip2.AddCheckPoint( (TGeoVolume *) fCardLVL, 0, p1, vX);
4006 chip2.AddCheckPoint( (TGeoVolume *) fCardLVL, 1, p2, vX);
4007 boxVol = chip2.CreateAndInsertBoxCableSegment(1);
4008 trCard = new TGeoCombiTrans( -fgkLVChip2PosX,
4009 fgkLVChip2PosY,
4010 carLVfullThick/2 + chip2fullThick/2, rotAdd);
4011 fCardLVR->AddNode(boxVol, 1, trCard);
4012
4013 Double_t chip3fullThick = fgkLVChip3Z + fgkLVChip3SiZ;
4014 AliITSv11GeomCableFlat chip3("chip3", fgkLVChip3Y, chip3fullThick);
4015 chip3.SetNLayers(2);
4016 chip3.SetLayer(0, fgkLVChip3Z, plastiChip, 12);
4017 chip3.SetLayer(1, fgkLVChip3SiZ, siliconChip, 8);
4018 chip3.SetInitialNode( (TGeoVolume *) fCardLVL);
4019 p1[0] = (fgkLVChip3PosX-fgkLVChip3X/2);
4020 p1[1] = fgkLVChip3PosY;
4021 p1[2] = -carLVfullThick/2 - chip3fullThick/2;
4022 p2[0] = (fgkLVChip3PosX+fgkLVChip3X/2);
4023 p2[1] = fgkLVChip3PosY;
4024 p2[2] = -carLVfullThick/2 - chip3fullThick/2;
4025 chip3.AddCheckPoint( (TGeoVolume *) fCardLVL, 0, p1, vX);
4026 chip3.AddCheckPoint( (TGeoVolume *) fCardLVL, 1, p2, vX);
4027 boxVol = chip3.CreateAndInsertBoxCableSegment(1);
4028 trCard = new TGeoCombiTrans( -fgkLVChip3PosX,
4029 fgkLVChip3PosY,
4030 -carLVfullThick/2 - chip3fullThick/2, rotAdd);
4031 fCardLVR->AddNode(boxVol, 1, trCard);
4032
4033 // the Al pieces for heat exchange :
4034 TGeoBBox *alLVcooling1 = new TGeoBBox("alLVcooling1" ,
4035 fgkLVcoolX1/2, fgkLVcoolY1/2, fgkLVcoolZ1/2);
4036
4037 TGeoTranslation *alLVcooling1Tr = new TGeoTranslation("alLVcooling1Tr",
4038 (fgkLVcoolX1/2+fgkLVcoolX2),
4039 fgkLVcoolPosY+fgkLVcoolY1/2,
4040 carLVfullThick/2+chip0fullThick+fgkLVcoolZ1/2);
4041 TGeoTranslation *alLVcooling1TrB = new TGeoTranslation("alLVcooling1TrB",
4042 (fgkLVcoolX1/2+fgkLVcoolX2),
4043 fgkLVcoolPosY+fgkLVcoolY1/2,
4044 -(carLVfullThick/2+chip0fullThick+fgkLVcoolZ1/2));
4045
4046 TGeoVolume *vAlLVcooling1 = new TGeoVolume("vAlLVcooling1",alLVcooling1,
4047 alCu12SDD);
4048 vAlLVcooling1->SetLineColor(2);
4049
4050 //--
4051 TGeoBBox * alLVcooling2 = new TGeoBBox("lLVcooling2" ,
4052 fgkLVcoolX2/2, fgkLVcoolY2/2, fgkLVcoolZ2/2);
4053 TGeoTranslation *alLVcooling2Tr = new TGeoTranslation("alLVcooling2Tr",
4054 (fgkLVcoolX2/2),
4055 fgkLVcoolPosY+fgkLVcoolY1/2,
4056 carLVfullThick/2+chip0fullThick+fgkLVcoolZ1-fgkLVcoolZ2/2);
4057 TGeoTranslation *alLVcooling2TrB = new TGeoTranslation("alLVcooling2TrB",
4058 (fgkLVcoolX2/2),
4059 fgkLVcoolPosY+fgkLVcoolY1/2,
4060 -(carLVfullThick/2+chip0fullThick+fgkLVcoolZ1-fgkLVcoolZ2/2));
4061
4062 TGeoVolume *vAlLVcooling2 = new TGeoVolume("vAlLVcooling2",alLVcooling2,
4063 alCu12SDD);
4064 vAlLVcooling2->SetLineColor(2);
4065
4066 //--
4067 Double_t alLVcoolZ3 = (fgkLVcardCuZ+fgkLVcardZ+2.*(fgkLVChip0SiZ+fgkLVChip0Z)
4068 +fgkLVcoolZ1*2.);
4069 TGeoBBox * alLVcooling3 = new TGeoBBox("lLVcooling3" ,
4070 fgkLVcoolX3/2, fgkLVcoolY3/2, alLVcoolZ3/2);
4071 TGeoTranslation *alLVcooling3Tr = new TGeoTranslation("alLVcooling3Tr",
4072 (-fgkLVcoolX3/2),
4073 fgkLVcoolPosY+fgkLVcoolY1-fgkLVcoolY3/2,
4074 0);
4075 TGeoVolume *vAlLVcooling3 = new TGeoVolume("vAlLVcooling3",alLVcooling3,alCu12SDD);
4076 vAlLVcooling3->SetLineColor(2);
4077
4078 //=== screw fixing th LV card to the U cooling tube :
4079 TGeoTube *littleScrew = new TGeoTube("littleScrewLV", 0, fgkLittleScrewR,
4080 fgkLVcoolY3/2);
4081 TGeoVolume *vLittleScrew = new TGeoVolume("vLittleScrewLV",
4082 littleScrew, stainless);
4083 TGeoRotation *rotScrew = new TGeoRotation("",0,90,0);
4084
4085 TGeoCombiTrans *cbScrew = new TGeoCombiTrans(0,0,fgkShiftLittleScrewLV,
4086 rotScrew);
4087 vAlLVcooling3->AddNode(vLittleScrew, 1, cbScrew);
4088
4089 TGeoTube *littleScrewHead = new TGeoTube("littleScrewLVhead",
4090 0, fgkLittleLVScrewHeadR,
4091 fgkLittleScrewHeadH/2);
4092 TGeoVolume *vLittleScrewHead = new TGeoVolume("vLittleScrewLVhead",
4093 littleScrewHead, stainless);
4094 vLittleScrewHead->SetLineColor(kGray);
4095 TGeoCombiTrans *cbScrewHeadL = new TGeoCombiTrans( -fgkLVcoolX3/2,
4096 fgkLVcoolPosY+fgkLVcoolY1 + fgkLittleScrewHeadH/2,
4097 fgkShiftLittleScrewLV,
4098 rotScrew);
4099 fCardLVL->AddNode(vLittleScrewHead, 1, cbScrewHeadL);
4100
4101 TGeoCombiTrans *cbScrewHeadR = new TGeoCombiTrans( fgkLVcoolX3/2,
4102 fgkLVcoolPosY+fgkLVcoolY1 + fgkLittleScrewHeadH/2,
4103 fgkShiftLittleScrewLV,
4104 rotScrew);
4105 fCardLVR->AddNode(vLittleScrewHead, 1, cbScrewHeadR);
4106
4107 // adding the cooling pieces to the left card
4108 fCardLVL->AddNode(vAlLVcooling1, 1,alLVcooling1Tr);
4109 fCardLVL->AddNode(vAlLVcooling1, 2,alLVcooling1TrB);
4110 fCardLVL->AddNode(vAlLVcooling2, 1,alLVcooling2Tr);
4111 fCardLVL->AddNode(vAlLVcooling2, 2,alLVcooling2TrB);
4112 fCardLVL->AddNode(vAlLVcooling3, 1,alLVcooling3Tr);
4113
4114 TGeoTranslation *alLVcooling1TrR = new TGeoTranslation("alLVcooling1TrR",
4115 -(fgkLVcoolX1/2+fgkLVcoolX2),
4116 fgkLVcoolPosY+fgkLVcoolY1/2,
4117 carLVfullThick/2+chip0fullThick+fgkLVcoolZ1/2);
4118 TGeoTranslation *alLVcooling1TrBR = new TGeoTranslation("alLVcooling1TrBR",
4119 -(fgkLVcoolX1/2+fgkLVcoolX2),
4120 fgkLVcoolPosY+fgkLVcoolY1/2,
4121 -(carLVfullThick/2+chip0fullThick+fgkLVcoolZ1/2));
4122 TGeoTranslation *alLVcooling2TrR = new TGeoTranslation("alLVcooling2TrR",
4123 -(fgkLVcoolX2/2),
4124 fgkLVcoolPosY+fgkLVcoolY1/2,
4125 carLVfullThick/2+chip0fullThick+fgkLVcoolZ1-fgkLVcoolZ2/2);
4126 TGeoTranslation *alLVcooling2TrBR = new TGeoTranslation("alLVcooling2TrBR",
4127 -(fgkLVcoolX2/2),
4128 fgkLVcoolPosY+fgkLVcoolY1/2,
4129 -(carLVfullThick/2+chip0fullThick+fgkLVcoolZ1-fgkLVcoolZ2/2));
4130
4131 TGeoTranslation *alLVcooling3TrR = new TGeoTranslation("alLVcooling3TrR",
4132 fgkLVcoolX3/2,
4133 fgkLVcoolPosY+fgkLVcoolY1-fgkLVcoolY3/2,
4134 0);
4135 // and to the right card
4136 fCardLVR->AddNode(vAlLVcooling1, 1,alLVcooling1TrR);
4137 fCardLVR->AddNode(vAlLVcooling1, 2,alLVcooling1TrBR);
4138 fCardLVR->AddNode(vAlLVcooling2, 1,alLVcooling2TrR);
4139 fCardLVR->AddNode(vAlLVcooling2, 2,alLVcooling2TrBR);
4140 fCardLVR->AddNode(vAlLVcooling3, 1,alLVcooling3TrR);
4141
4142 return kTRUE;
4143}
4144
4145//________________________________________________________________________
4146TGeoVolumeAssembly* AliITSv11GeometrySDD::CreateHVCard(Int_t iLay){
4147 //
4148 // return an assembly containing the HV card
4149 //
4150 iLay = iLay;
4151
4152 TGeoMedium *ceramic = GetMedium("CERAMICS$"); // ceramicHVcard
4153 TGeoMedium *medSMDcapaMiddle = GetMedium("SDD X7R capacitors$"); // check if different
4154 TGeoMedium *medSMDcapaEnd = GetMedium("SDD X7R capacitors$"); // check if different
4155 TGeoMedium *stainless = GetMedium("INOX$"); // ITSspdStainlesSteal ???????????
4156 TGeoMedium *plastic = GetMedium("SDDKAPTON (POLYCH2)$"); // ITS_ITSsddKAPTON_POLYCH2 ???????????
4157 TGeoMedium *alCu12SDD = GetMedium("ALCU12$"); // ITSsddAlCu12
4158
4159 TGeoVolumeAssembly *highVCard = new TGeoVolumeAssembly("ITSsddHVCard");
4160
4161 //====================================
4162 //--- the card itself
4163 TGeoBBox *ceramicCard = new TGeoBBox("ceramCard", fgkHVCardCeramX/2,
4164 fgkHVCardCeramY/2, fgkHVCardCeramZ/2);
4165 TGeoVolume *vCeramicCard = new TGeoVolume("vCeramCard", ceramicCard, ceramic);
4166 vCeramicCard->SetLineColor(38);// or 9 blue slightly dark
4167
4168 highVCard->AddNode(vCeramicCard, 1, 0);
4169
4170
4171 //====================================
4172 //--- capacitors
4173
4174 // capa1
4175 TGeoBBox *capa1Middle = new TGeoBBox("cardHVCapa1Middle", fgkHVCardCapa1X/2,
4176 fgkHVCardCapa1Ymid/2, fgkHVCardCapa1Z/2);
4177 TGeoVolume *vCapa1Middle = new TGeoVolume("vCardHVCapa1Middle",capa1Middle,
4178 medSMDcapaMiddle);
4179
4180 TGeoBBox *capa1End = new TGeoBBox("cardHVCapa1End", fgkHVCardCapa1X/2,
4181 fgkHVCardCapa1Yend/2, fgkHVCardCapa1Z/2);
4182 TGeoVolume *vCapa1End = new TGeoVolume("vCardHVCapa1End",capa1End,
4183 medSMDcapaEnd);
4184 vCapa1End->SetLineColor(18);// grey silver
4185 TGeoTranslation *capa1EndTr1 = new TGeoTranslation("cardHVcapa1EndTr1", 0,
4186 (fgkHVCardCapa1Ymid+fgkHVCardCapa1Yend)/2,0);
4187 TGeoTranslation *capa1EndTr2 = new TGeoTranslation("cardHVcapa1EndTr2", 0,
4188 -(fgkHVCardCapa1Ymid+fgkHVCardCapa1Yend)/2,0);
4189
4190 TGeoTranslation *capa1PosTr = new TGeoTranslation("cardHVcapa1PosTr",
4191 fgkHVCardCapa1PosX, fgkHVCardCapa1PosY,
4192 -fgkHVCardCeramZ/2-fgkHVCardCapa1Z/2);
4193
4194 TGeoVolumeAssembly *capa1 = new TGeoVolumeAssembly("cardHVCapa1");
4195 capa1->AddNode(vCapa1Middle, 1,0);
4196 capa1->AddNode(vCapa1End, 1, capa1EndTr1);
4197 capa1->AddNode(vCapa1End, 2, capa1EndTr2);
4198
4199 highVCard->AddNode(capa1, 1, capa1PosTr);
4200
4201 // capa2
4202 TGeoBBox *capa2Middle = new TGeoBBox("cardHVCapa2Middle", fgkHVCardCapa2X/2,
4203 fgkHVCardCapa2Ymid/2, fgkHVCardCapa2Z/2);
4204 TGeoVolume *vCapa2Middle = new TGeoVolume("vCardHVCapa2Middle",capa2Middle,
4205 medSMDcapaMiddle);
4206
4207 TGeoBBox *capa2End = new TGeoBBox("cardHVCapa2End", fgkHVCardCapa2X/2,
4208 fgkHVCardCapa2Yend/2, fgkHVCardCapa2Z/2);
4209 TGeoVolume *vCapa2End = new TGeoVolume("vCardHVCapa2End",capa2End,
4210 medSMDcapaEnd);
4211 vCapa2End->SetLineColor(18);// grey silver
4212 TGeoTranslation *capa2EndTr1 = new TGeoTranslation("cardHVcapa2EndTr1", 0,
4213 (fgkHVCardCapa2Ymid+fgkHVCardCapa2Yend)/2,0);
4214 TGeoTranslation *capa2EndTr2 = new TGeoTranslation("cardHVcapa2EndTr2", 0,
4215 -(fgkHVCardCapa2Ymid+fgkHVCardCapa2Yend)/2,0);
4216
4217 TGeoTranslation *capa2PosTr = new TGeoTranslation("cardHVcapa2PosTr",
4218 fgkHVCardCapa2PosX, fgkHVCardCapa2PosY,
4219 -fgkHVCardCeramZ/2-fgkHVCardCapa2Z/2);
4220
4221 TGeoVolumeAssembly *capa2 = new TGeoVolumeAssembly("cardHVCapa2");
4222 capa2->AddNode(vCapa2Middle, 1,0);
4223 capa2->AddNode(vCapa2End, 1, capa2EndTr1);
4224 capa2->AddNode(vCapa2End, 2, capa2EndTr2);
4225
4226 highVCard->AddNode(capa2, 1, capa2PosTr);
4227
4228 // capa3
4229 TGeoBBox *capa3Middle = new TGeoBBox("cardHVCapa3Middle", fgkHVCardCapa3Xmid/2,
4230 fgkHVCardCapa3Y/2, fgkHVCardCapa3Z/2);
4231 TGeoVolume *vCapa3Middle = new TGeoVolume("vCardHVCapa3Middle",capa3Middle,
4232 medSMDcapaMiddle);
4233
4234 TGeoBBox *capa3End = new TGeoBBox("cardHVCapa3End", fgkHVCardCapa3Xend/2,
4235 fgkHVCardCapa3Y/2, fgkHVCardCapa3Z/2);
4236 TGeoVolume *vCapa3End = new TGeoVolume("vCardHVCapa3End",capa3End,
4237 medSMDcapaEnd);
4238 vCapa3End->SetLineColor(18);// grey silver
4239
4240 TGeoTranslation *capa3EndTr1 = new TGeoTranslation("cardHVcapa3EndTr1",
4241 (fgkHVCardCapa3Xmid+fgkHVCardCapa3Xend)/2, 0, 0);
4242 TGeoTranslation *capa3EndTr2 = new TGeoTranslation("cardHVcapa2EndTr2",
4243 -(fgkHVCardCapa3Xmid+fgkHVCardCapa3Xend)/2, 0, 0);
4244
4245 TGeoVolumeAssembly *capa3 = new TGeoVolumeAssembly("cardHVCapa3");
4246 capa3->AddNode(vCapa3Middle, 1,0);
4247 capa3->AddNode(vCapa3End, 1, capa3EndTr1);
4248 capa3->AddNode(vCapa3End, 2, capa3EndTr2);
4249
4250 TGeoTranslation *capa3PosTr1 = new TGeoTranslation("cardHVcapa3PosTr1",
4251 fgkHVCardCapa3PosX1, fgkHVCardCapa3PosY1,
4252 -fgkHVCardCeramZ/2-fgkHVCardCapa3Z/2);
4253
4254 TGeoTranslation *capa3PosTr2 = new TGeoTranslation("cardHVcapa3PosTr2",
4255 fgkHVCardCapa3PosX2, fgkHVCardCapa3PosY1,
4256 -fgkHVCardCeramZ/2-fgkHVCardCapa3Z/2);
4257
4258 TGeoTranslation *capa3PosTr3 = new TGeoTranslation("cardHVcapa3PosTr3",
4259 fgkHVCardCapa3PosX3, fgkHVCardCapa3PosY2,
4260 -fgkHVCardCeramZ/2-fgkHVCardCapa3Z/2);
4261
4262 TGeoTranslation *capa3PosTr4 = new TGeoTranslation("cardHVcapa3PosTr4",
4263 fgkHVCardCapa3PosX4, fgkHVCardCapa3PosY2,
4264 -fgkHVCardCeramZ/2-fgkHVCardCapa3Z/2);
4265
4266 TGeoTranslation *capa3PosTr5 = new TGeoTranslation("cardHVcapa3PosTr5",
4267 fgkHVCardCapa3PosX5, fgkHVCardCapa3PosY3,
4268 -fgkHVCardCeramZ/2-fgkHVCardCapa3Z/2);
4269
4270 highVCard->AddNode(capa3, 1, capa3PosTr1);
4271 highVCard->AddNode(capa3, 2, capa3PosTr2);
4272 highVCard->AddNode(capa3, 3, capa3PosTr3);
4273 highVCard->AddNode(capa3, 4, capa3PosTr4);
4274 highVCard->AddNode(capa3, 5, capa3PosTr5);
4275
4276 //====================================
4277 //--- connexions to LV card
4278
4279 Double_t fgkConnexLVHVdiam1 = 0.8*fgkmm;
4280 Double_t fgkConnexLVHVdiam2 = 2*fgkmm;
4281 Double_t fgkConnexLVHVlen = 6.2*fgkmm;
4282 Double_t fgkConnexLVHVx = 3*fgkmm;
4283 Double_t fgkConnexLVHVy1 = 8*fgkmm;
4284 Double_t fgkConnexLVHVdy = 2.5*fgkmm;
4285
4286 TGeoTube *connexLVHVmetal = new TGeoTube("connexLVHVmetal",0,
4287 fgkConnexLVHVdiam1/2,fgkConnexLVHVlen/2);
4288 TGeoTube *connexLVHVplastic = new TGeoTube("connexLVHVplastic",
4289 fgkConnexLVHVdiam1/2,
4290 fgkConnexLVHVdiam2/2,
4291 fgkConnexLVHVlen/2);
4292 TGeoVolume *vConnexLVHVmetal = new TGeoVolume("ITSsddConnexLVHVmetal",
4293 connexLVHVmetal, stainless);
4294 TGeoVolume *vConnexLVHVplast = new TGeoVolume("ITSsddConnexLVHVplast",
4295 connexLVHVplastic, plastic);
4296 vConnexLVHVmetal->SetLineColor(10);// white
4297 vConnexLVHVplast->SetLineColor(12); // dark grey
4298
4299 TGeoVolumeAssembly *connexion = new TGeoVolumeAssembly("ITSsddConnexLVHV");
4300 connexion->AddNode(vConnexLVHVmetal, 1, 0);
4301 connexion->AddNode(vConnexLVHVplast, 1, 0);
4302
4303 TGeoTranslation *trConnexion1 = new TGeoTranslation(-fgkConnexLVHVx,fgkConnexLVHVy1,
4304 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4305 TGeoTranslation *trConnexion2 = new TGeoTranslation( fgkConnexLVHVx,fgkConnexLVHVy1,
4306 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4307
4308 TGeoTranslation *trConnexion3 = new TGeoTranslation(-fgkConnexLVHVx,
4309 fgkConnexLVHVy1+fgkConnexLVHVdy,
4310 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4311 TGeoTranslation *trConnexion4 = new TGeoTranslation( fgkConnexLVHVx,
4312 fgkConnexLVHVy1+fgkConnexLVHVdy,
4313 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4314
4315 TGeoTranslation *trConnexion5 = new TGeoTranslation(-fgkConnexLVHVx,
4316 fgkConnexLVHVy1+2*fgkConnexLVHVdy,
4317 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4318 TGeoTranslation *trConnexion6 = new TGeoTranslation( fgkConnexLVHVx,
4319 fgkConnexLVHVy1+2*fgkConnexLVHVdy,
4320 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4321
4322 TGeoTranslation *trConnexion7 = new TGeoTranslation(-fgkConnexLVHVx,
4323 fgkConnexLVHVy1+3*fgkConnexLVHVdy,
4324 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4325 TGeoTranslation *trConnexion8 = new TGeoTranslation( fgkConnexLVHVx,
4326 fgkConnexLVHVy1+3*fgkConnexLVHVdy,
4327 -fgkHVCardCeramZ/2-fgkConnexLVHVlen/2 );
4328
4329 highVCard->AddNode(connexion, 1, trConnexion1);
4330 highVCard->AddNode(connexion, 2, trConnexion2);
4331 highVCard->AddNode(connexion, 3, trConnexion3);
4332 highVCard->AddNode(connexion, 4, trConnexion4);
4333 highVCard->AddNode(connexion, 5, trConnexion5);
4334 highVCard->AddNode(connexion, 6, trConnexion6);
4335 highVCard->AddNode(connexion, 7, trConnexion7);
4336 highVCard->AddNode(connexion, 8, trConnexion8);
4337
4338 //====================================
4339 //--- cooling pieces
4340
4341 TGeoBBox *cardHVcool1 = new TGeoBBox("cardHVcool1",fgkHVCardCool1X/2,
4342 fgkHVCardCool1Y/2, fgkHVCardCool1Z/2);
4343
4344
4345 TGeoBBox *cardHVcool2 = new TGeoBBox("cardHVcool2",fgkHVCardCool2X/2,
4346 fgkHVCardCool2Y/2, fgkHVCardCool2Z/2);
4347
4348 TGeoBBox *cardHVcool3 = new TGeoBBox("cardHVcool3",fgkHVCardCool3X/2,
4349 fgkHVCardCool3Y/2, fgkHVCardCool3Z/2);
4350
4351 TGeoVolume *vCardHVcool1 = new TGeoVolume("vCardHVcool1",cardHVcool1,
4352 alCu12SDD);
4353 TGeoVolume *vCardHVcool2 = new TGeoVolume("vCardHVcool2",cardHVcool2,
4354 alCu12SDD);
4355 TGeoVolume *vCardHVcool3 = new TGeoVolume("vCardHVcool3",cardHVcool3,
4356 alCu12SDD);
4357 // This last volume contains the screw used for fixing
4358 // the card to the cooling tube ...
4359 TGeoTube *littleScrewHV = new TGeoTube("littleScrewHV", 0, fgkLittleScrewR,
4360 fgkHVCardCool3Y/2);
4361 TGeoVolume *vLittleScrewHV = new TGeoVolume("vLittleScrewHV",
4362 littleScrewHV, stainless);
4363
4364 TGeoRotation *rotScrewHead = new TGeoRotation("",0,90,0);
4365 vCardHVcool3->AddNode(vLittleScrewHV, 1,rotScrewHead);
4366
4367 vCardHVcool1->SetLineColor(2); //red
4368 vCardHVcool2->SetLineColor(2); //red
4369 vCardHVcool3->SetLineColor(2); //red
4370
4371 TGeoTranslation *cool1Tr1 = new TGeoTranslation("cardHVcool1Tr1",
4372 fgkHVCardCeramX/2-fgkHVCardCool1X/2,
4373 -fgkHVCardCoolDY+fgkHVCardCool1Y/2,
4374 fgkHVCardCeramZ/2+fgkHVCardCool1Z/2);
4375 TGeoTranslation *cool1Tr2 = new TGeoTranslation("cardHVcool1Tr2",
4376 -fgkHVCardCeramX/2+fgkHVCardCool1X/2,
4377 -fgkHVCardCoolDY+fgkHVCardCool1Y/2,
4378 fgkHVCardCeramZ/2+fgkHVCardCool1Z/2);
4379
4380 highVCard->AddNode(vCardHVcool1, 1, cool1Tr1);
4381 highVCard->AddNode(vCardHVcool1, 2, cool1Tr2);
4382
4383 TGeoTranslation *cool2Tr1 = new TGeoTranslation("cardHVcool2Tr1",
4384 fgkHVCardCeramX/2-fgkHVCardCool1X+fgkHVCardCool2X/2,
4385 -fgkHVCardCoolDY-fgkHVCardCool2Y/2,
4386 fgkHVCardCeramZ/2+fgkHVCardCool2Z/2);
4387
4388 TGeoTranslation *cool2Tr2 = new TGeoTranslation("cardHVcool2Tr2",
4389 -fgkHVCardCeramX/2+fgkHVCardCool1X-fgkHVCardCool2X/2,
4390 -fgkHVCardCoolDY-fgkHVCardCool2Y/2,
4391 fgkHVCardCeramZ/2+fgkHVCardCool2Z/2);
4392
4393 highVCard->AddNode(vCardHVcool2, 1, cool2Tr1);
4394 highVCard->AddNode(vCardHVcool2, 2, cool2Tr2);
4395
4396 TGeoTranslation *cool3Tr1 = new TGeoTranslation("cardHVcool2Tr1",
4397 fgkHVCardCeramX/2-fgkHVCardCool1X+fgkHVCardCool2X+fgkHVCardCool3X/2,
4398 -fgkHVCardCoolDY-fgkHVCardCool3Y/2,
4399 fgkHVCardCeramZ/2+fgkHVCardCool2Z-fgkHVCardCool3Z/2);
4400
4401 TGeoTranslation *cool3Tr2 = new TGeoTranslation("cardHVcool2Tr2",
4402 -fgkHVCardCeramX/2+fgkHVCardCool1X-fgkHVCardCool2X-fgkHVCardCool3X/2,
4403 -fgkHVCardCoolDY-fgkHVCardCool3Y/2,
4404 fgkHVCardCeramZ/2+fgkHVCardCool2Z-fgkHVCardCool3Z/2);
4405
4406 highVCard->AddNode(vCardHVcool3, 1, cool3Tr1);
4407 highVCard->AddNode(vCardHVcool3, 2, cool3Tr2);
4408
4409 //====================================
4410 //--- screws
4411 TGeoCombiTrans *cbScrewHead1 = new TGeoCombiTrans("cardHVscrewHeadTr1",
4412 fgkHVCardCeramX/2-fgkHVCardCool1X+fgkHVCardCool2X+fgkHVCardCool3X/2,
4413 -fgkHVCardCoolDY+fgkLittleScrewHeadH/2,
4414 fgkHVCardCeramZ/2+fgkHVCardCool2Z-fgkHVCardCool3Z/2,
4415 rotScrewHead);
4416 TGeoCombiTrans *cbScrewHead2 = new TGeoCombiTrans("cardHVscrewHeadTr2",
4417 -fgkHVCardCeramX/2+fgkHVCardCool1X-fgkHVCardCool2X-fgkHVCardCool3X/2,
4418 -fgkHVCardCoolDY+fgkLittleScrewHeadH/2,
4419 fgkHVCardCeramZ/2+fgkHVCardCool2Z-fgkHVCardCool3Z/2,
4420 rotScrewHead);
4421
4422 highVCard->AddNode(fCommonVol[0], 1, cbScrewHead1);
4423 highVCard->AddNode(fCommonVol[0], 2, cbScrewHead2);
4424
4425 return highVCard;
4426}
4427
4428
4429//________________________________________________________________________
4430TGeoVolumeAssembly* AliITSv11GeometrySDD::CreateEndLadderCards(Int_t iLay) {
4431//
4432// return an assembly containing the LV, HV and Carlos cards of one ladder
4433// and their cooling system
4434//
4435
4436 TGeoMedium *alCu12SDD = GetMedium("ALCU12$"); // ITSsddAlCu12
4437 TGeoMedium *phynoxSDD = GetMedium("INOX$");
4438 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
4439
4440 TGeoVolumeAssembly *endLadderCards = new TGeoVolumeAssembly("endLadderCards");
4441
4442 //=*********************************
4443 //--- The rounded pipe for the end ladder card coooling
4444
4445 Double_t endLadPipeUlength = fgkEndLadPipeUlengthLay3;
4446 Double_t endLadPipeArmZ = fgkEndLadPipeArmZLay3;
4447 Int_t nCards = 3;
4448
4449 if (iLay==4) {
4450 endLadPipeUlength = fgkEndLadPipeUlengthLay4;
4451 endLadPipeArmZ = fgkEndLadPipeArmZLay4;
4452 nCards = 4;
4453 }
4454
4455 AliITSv11GeomCableRound endLadderPipe("endLadderPipe", fgkEndLadPipeOuterDiam/2);
4456 endLadderPipe.SetNLayers(2);
4457 endLadderPipe.SetLayer(0, fgkEndLadPipeInnerDiam/2, coolerMediumSDD, 4);
4458 endLadderPipe.SetLayer(1, (fgkEndLadPipeOuterDiam-fgkEndLadPipeInnerDiam)/2, phynoxSDD, fColorPhynox);
4459
4460 Double_t coolUzPos = fgkEndLadPipeOuterDiam/2+2.*fgkmm; //it is the x coord of the axis
4461 // of the U colling pipe in its center
4462
4463 Double_t coordA[3] = { fgkEndLadPipeUwidth/2, 0, endLadPipeUlength+coolUzPos};
4464 Double_t vectA[3] = {0,0,1};
4465
4466 Double_t coordB[3] = { fgkEndLadPipeUwidth/2,0, fgkEndLadPipeRadius+coolUzPos};
4467 Double_t vectB[3] = {0,0,1};
4468
4469 Double_t coordC[3] = { fgkEndLadPipeUwidth/2-fgkEndLadPipeRadius, 0, coolUzPos};
4470 Double_t vectC[3] = {1,0,0};
4471
4472 Double_t coordD[3] = {-fgkEndLadPipeUwidth/2+fgkEndLadPipeRadius, 0, coolUzPos};
4473 Double_t vectD[3] = {-1,0,0};
4474
4475 Double_t coordE[3] = {-fgkEndLadPipeUwidth/2, 0, fgkEndLadPipeRadius+coolUzPos};
4476 Double_t vectE[3] = {0,0,-1};
4477
4478 Double_t coordF[3] = {-fgkEndLadPipeUwidth/2,0, endLadPipeUlength+coolUzPos};
4479 Double_t vectF[3] = {0,0,-1};
4480
4481 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 0, coordA, vectA);
4482 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 1, coordB, vectB);
4483 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 2, coordC, vectC);
4484 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 3, coordD, vectD);
4485 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 4, coordE, vectE);
4486 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 5, coordF, vectF);
4487
4488 endLadderPipe.SetInitialNode((TGeoVolume *) endLadderCards); //Set the root node
4489 //endLadderPipe.CreateAndInsertCableSegment( 1);
4490 endLadderPipe.CreateAndInsertTubeSegment( 1);
4491 //endLadderPipe.CreateAndInsertCableSegment( 2);
4492 endLadderPipe.CreateAndInsertTorusSegment( 2);
4493 //endLadderPipe.CreateAndInsertCableSegment( 3);
4494 endLadderPipe.CreateAndInsertTubeSegment( 3);
4495 //endLadderPipe.CreateAndInsertCableSegment( 4);
4496 endLadderPipe.CreateAndInsertTorusSegment( 4);
4497 //endLadderPipe.CreateAndInsertCableSegment( 5);
4498 endLadderPipe.CreateAndInsertTubeSegment( 5);
4499
4500 TGeoBBox *endLadPipeArmBox = new TGeoBBox("endLadPipeArmBox",fgkEndLadPipeArmX/2,
4501 fgkEndLadPipeArmY/2, endLadPipeArmZ/2);
4502 TGeoTube *endLadPipeArmTube = new TGeoTube("endLadPipeArmTube", 0,
4503 fgkEndLadPipeOuterDiam/2, endLadPipeArmZ/2);
4504
4505 TGeoTranslation *endLadPipeArmBoxDY1 = new TGeoTranslation("endLadPipeArmBoxDY1",
4506 - fgkEndLadPipeArmBoxDX,
4507 fgkEndLadPipeArmBoxDY,0);
4508 TGeoTranslation *endLadPipeArmBoxDY2 = new TGeoTranslation("endLadPipeArmBoxDY2",
4509 fgkEndLadPipeArmBoxDX,
4510 fgkEndLadPipeArmBoxDY,0);
4511 endLadPipeArmBoxDY1->RegisterYourself();
4512 endLadPipeArmBoxDY2->RegisterYourself();
4513
4514 if(GetDebug(3)) { // Remove compiler warning.
4515 endLadPipeArmBox->InspectShape();
4516 endLadPipeArmTube->InspectShape();
4517 }
4518
4519 TGeoCompositeShape *endLadPipeArm1 = new TGeoCompositeShape("ITSsddEndLadPipeArm1",
4520 "endLadPipeArmBox:endLadPipeArmBoxDY1"
4521 "- endLadPipeArmTube");
4522 TGeoCompositeShape *endLadPipeArm2 = new TGeoCompositeShape("ITSsddEndLadPipeArm2",
4523 "endLadPipeArmBox:endLadPipeArmBoxDY2"
4524 "- endLadPipeArmTube");
4525
4526 TGeoVolume *vEndLadPipeArm1 = new TGeoVolume("ITSsddVolEndLadPipeArm1",
4527 endLadPipeArm1, alCu12SDD);
4528 TGeoVolume *vEndLadPipeArm2 = new TGeoVolume("ITSsddVolEndLadPipeArm2",
4529 endLadPipeArm2, alCu12SDD);
4530 vEndLadPipeArm1->SetLineColor(2);
4531 vEndLadPipeArm2->SetLineColor(2);
4532
4533 Double_t armZ = (coolUzPos-fgkEndLadPipeOuterDiam/2+endLadPipeArmZ/2
4534 +fgkEndLadPipeArmZpos);
4535
4536 TGeoTranslation *trEndLadPipeArm1 = new TGeoTranslation("trEndLadPipeArm1",
4537 -fgkEndLadPipeUwidth/2,0,armZ);
4538 TGeoTranslation *trEndLadPipeArm2 = new TGeoTranslation("trEndLadPipeArm2",
4539 fgkEndLadPipeUwidth/2,0,armZ);
4540
4541 endLadderCards->AddNode(vEndLadPipeArm1, 1, trEndLadPipeArm1);
4542 endLadderCards->AddNode(vEndLadPipeArm2, 1, trEndLadPipeArm2);
4543
4544 //=*********************************
4545 //--- LV cards
4546 TGeoVolumeAssembly *cardLVassemblyR = fCardLVR;
4547 TGeoVolumeAssembly *cardLVassemblyL = fCardLVL;
4548
4549 Double_t spaceBetweenCards = 0.2*fgkmm;
4550
4551 Double_t cardLVxShift = (fgkEndLadPipeUwidth/2-fgkEndLadPipeArmX/2
4552 +fgkEndLadPipeArmBoxDX);
4553 Double_t cardLVyShift = (-fgkLVcoolPosY-fgkLVcoolY1+fgkLVcoolY3
4554 +fgkEndLadPipeArmY/2+fgkEndLadPipeArmBoxDY);
4555
4556 Double_t alLVcoolZ3 = (fgkLVcardCuZ+fgkLVcardZ+2.*(fgkLVChip0SiZ+fgkLVChip0Z)
4557 +fgkLVcoolZ1*2.);
4558
4559 Double_t firstLVCardZ = fgkEndLadPipeArmZpos-fgkEndLadPipeOuterDiam/2.+alLVcoolZ3/2
4560 +coolUzPos+1.25*fgkmm;
4561 // Position in z of the first LVB with respect to the start of the cooling
4562 // rectangular arm, coming (from inside of the ladder)
4563 // The cards are added one after the other
4564
4565 for (Int_t iCard=0; iCard<nCards; iCard++) {
4566
4567 Double_t cardLVzShift = firstLVCardZ +
4568 Double_t(iCard)*(alLVcoolZ3 + 2.*spaceBetweenCards+fgkHVCardCool3Z);
4569
4570 TGeoTranslation *trCardLVassemblyR = new TGeoTranslation(cardLVxShift,
4571 cardLVyShift, cardLVzShift);
4572 TGeoTranslation *trCardLVassemblyL = new TGeoTranslation(-cardLVxShift,
4573 cardLVyShift, cardLVzShift);
4574
4575 endLadderCards->AddNode(cardLVassemblyR, iCard+1, trCardLVassemblyR);
4576 endLadderCards->AddNode(cardLVassemblyL, iCard+1, trCardLVassemblyL);
4577 }
4578
4579 //=*********************************
4580 //--- HV cards
4581 TGeoVolumeAssembly *cardHV = fCardHV;
4582
4583 Double_t coolHVdy = (fgkHVCardCoolDY + fgkHVCardCool3Y
4584 + fgkEndLadPipeArmY/2 + fgkEndLadPipeArmBoxDY);
4585
4586 Double_t coolHVCenterShift = (fgkHVCardCool3Z/2-fgkHVCardCool2Z
4587 -(fgkHVCardCeramZ)/2);
4588
4589 for (Int_t iCard=0; iCard<nCards; iCard++) {
4590
4591 Double_t fact = iCard*2.+1.;
4592 Double_t coolHVdz = (firstLVCardZ + alLVcoolZ3*fact/2 + spaceBetweenCards*fact
4593 + fgkHVCardCool3Z*fact/2. + coolHVCenterShift);
4594 TGeoTranslation *trCardHV = new TGeoTranslation(0,coolHVdy, coolHVdz);
4595 endLadderCards->AddNode(cardHV, iCard+1, trCardHV);
4596 }
4597
4598 //=*********************************
4599 //--- Carlos card
4600
4601 TGeoVolumeAssembly *assemblySupCarlos = fCardCarlos;
4602// TGeoRotation *carlosSupRot1 = new TGeoRotation("carlosSuppAngle",
4603// 0, -fgkCarlosSuppAngle, 0);
4604
4605 Double_t spaceBetweenCarlsoCards = 0.1*fgkmm;
4606 Double_t firstCarlosCardZ = (firstLVCardZ - alLVcoolZ3/2 + alLVcoolZ3*4 +
4607 fgkHVCardCool3Z*4 + spaceBetweenCards*7 + 2*fgkmm);
4608 // position in z of the first Carlos board, coming from inside of the ladder
4609
4610 Double_t coolCarlosDy = (fgkCarlosSuppY3/2 + fgkEndLadPipeArmY/2 +
4611 fgkEndLadPipeArmBoxDY);
4612
4613 for (Int_t iCard=0; iCard<nCards; iCard++) {
4614
4615 Double_t carloszPos = ( firstCarlosCardZ + fgkCarlosSuppZ3/2 +
4616 iCard*(fgkCarlosSuppZ3+spaceBetweenCarlsoCards) );
4617 TGeoCombiTrans *carlosPos = new TGeoCombiTrans(0,coolCarlosDy,carloszPos,
4618 (TGeoRotation*) fCommonTr[0]);
4619
4620 endLadderCards->AddNode(assemblySupCarlos, iCard, carlosPos);
4621 }
4622
4623 return endLadderCards;
4624}
4625
4626
4627//________________________________________________________________________
4628TGeoVolume* AliITSv11GeometrySDD::CreateEndLadderCardsV(Int_t iLay) {
4629//
4630// return an Pcon containing the LV, HV and Carlos cards of one ladder
4631// and their cooling system
4632// This is the code actually used for the end ladder cards
4633//
4634
4635 TGeoMedium *alCu12SDD = GetMedium("ALCU12$"); // ITSsddAlCu12
4636 TGeoMedium *phynoxSDD = GetMedium("INOX$");
4637 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
4638 TGeoMedium *copper = GetMedium("COPPER$");
4639 TGeoMedium *plastic = GetMedium("SDDKAPTON (POLYCH2)$"); // ???
4640 TGeoMedium *airSDD = GetMedium("SDD AIR$");
4641 TGeoMedium *opticalFiber = GetMedium("SDD OPTICFIB$");
4642 TGeoMedium *polyurethane = GetMedium("POLYURETHANE$");
4643
4644 Double_t endLadPipeUlength = fgkEndLadPipeUlengthLay3;
4645 Double_t endLadPipeArmZ = fgkEndLadPipeArmZLay3;
4646 Int_t nCards = 3;
4647 Double_t rREF = fgkEndLaddCardsShortRadiusLay3;
4648 Double_t deltaZcables = 0;
4649 // reference radius corresponding to local y=0
4650
4651 if (iLay==4) {
4652 endLadPipeUlength = fgkEndLadPipeUlengthLay4;
4653 endLadPipeArmZ = fgkEndLadPipeArmZLay4;
4654 nCards = 4;
4655 rREF = fgkEndLaddCardsShortRadiusLay4;
4656 deltaZcables = 2.8*fgkmm;
4657 }
4658
4659 Double_t cardLVxShift = (fgkEndLadPipeUwidth/2-fgkEndLadPipeArmX/2
4660 +fgkEndLadPipeArmBoxDX);
4661 Double_t cardLVyShift = (-fgkLVcoolPosY-fgkLVcoolY1+fgkLVcoolY3
4662 +fgkEndLadPipeArmY/2+fgkEndLadPipeArmBoxDY);
4663
4664 Double_t rMin = rREF + cardLVyShift;
4665 // (The LV card is defining rMin because it is the lower object)
4666
4667 Double_t thickTotCable = 0.5;
4668
4669 //==================================
4670 //--- The Pcon container
4671
4672 // minimum angle of the Pcon :
4673 Double_t tanDPhi = ((fgkEndLadPipeUwidth/2+fgkEndLadPipeArmX/2) /
4674 (rREF-fgkEndLadPipeArmY/2) );
4675 Double_t dphi = 2*TMath::ATan(tanDPhi)*TMath::RadToDeg();
4676 Double_t phi0 = 90-dphi/2;
4677 Double_t coolUzPos = fgkEndLadPipeOuterDiam/2 + fgkDistEndLaddCardsLadd; // it is the z coord of the axis
4678 // of the U colling pipe in its center
4679 Double_t zMax = endLadPipeUlength+coolUzPos;
4680 Double_t rMax = rMin + fgkLVcardY;
4681 rMax = TMath::Sqrt(rMax*rMax + cardLVxShift*cardLVxShift);
4682 Double_t cablesRadius = rMax-0.5;
4683
4684 TGeoPcon *containerShape = new TGeoPcon("EndLadderCcontainerShape", phi0, dphi, 10);
4685 //DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax);
4686 // hard coded numbers are fine tuning to avoid overlaps with other volume in the old geometry
4687 containerShape->DefineSection(0, fgkDistEndLaddCardsLadd, rREF-fgkEndLadPipeOuterDiam/2-0.2, rMax);
4688 containerShape->DefineSection(1, fgkDistEndLaddCardsLadd+1.4, rREF-fgkEndLadPipeOuterDiam/2-0.2, rMax);
4689 containerShape->DefineSection(2, fgkDistEndLaddCardsLadd+1.4, rMin, rMax);
4690 containerShape->DefineSection(3, endLadPipeArmZ+2*fgkEndLadPipeRadius, rMin, rMax);
4691 containerShape->DefineSection(4, endLadPipeArmZ+2*fgkEndLadPipeRadius, rREF-1.*fgkmm, rMax);
4692 containerShape->DefineSection(5, zMax, rREF-1.*fgkmm, rMax);
4693 // the following is quite dirty but works for the moment ...
4694 containerShape->DefineSection(6, zMax, rREF+fgkCarlosCardZ1/2, rMax);
4695 containerShape->DefineSection(7, zMax+1, cablesRadius-thickTotCable/2, rMax);
4696
4697 // The next parameters define the shape of the Pcon at its end and where cables
4698 // are escaping...
4699 Double_t cableSectionR1 = cablesRadius-thickTotCable/2;
4700 Double_t cableSectionR2 = rMax;
4701 Double_t cableSectionZ1 = zMax + 23.6*fgkmm + 3.0*fgkcm + deltaZcables;
4702 Double_t cableSectionZ2 = zMax + 23.6*fgkmm + 4.0*fgkcm + deltaZcables;
4703 // Those numbers are to be fixed to stick the maximum to the SDD cone
4704 // (hardcoded numbers are ugly, but it's easier to find where to stop)
4705
4706 containerShape->DefineSection(8, cableSectionZ1, cableSectionR1, rMax);
4707 containerShape->DefineSection(9, cableSectionZ2, cableSectionR2, rMax);
4708
4709 TGeoVolume *endLadderCards = new TGeoVolume("endLadderCards",containerShape,airSDD);
4710 //endLadderCards->SetVisibility(kFALSE);
4711
4712 //=*********************************
4713 //--- The rounded pipe for the end ladder card cooling
4714
4715 AliITSv11GeomCableRound endLadderPipe("endLadderPipe", fgkEndLadPipeOuterDiam/2);
4716 endLadderPipe.SetNLayers(2);
4717 endLadderPipe.SetLayer(0, fgkEndLadPipeInnerDiam/2, coolerMediumSDD, 4);
4718 endLadderPipe.SetLayer(1, (fgkEndLadPipeOuterDiam-fgkEndLadPipeInnerDiam)/2, phynoxSDD, fColorPhynox);
4719
4720 Double_t coordA[3] = { fgkEndLadPipeUwidth/2, rREF, endLadPipeUlength+coolUzPos};
4721 Double_t vectA[3] = {0,0,1};
4722
4723 Double_t coordB[3] = { fgkEndLadPipeUwidth/2,rREF, fgkEndLadPipeRadius+coolUzPos};
4724 Double_t vectB[3] = {0,0,1};
4725
4726 Double_t coordC[3] = { fgkEndLadPipeUwidth/2-fgkEndLadPipeRadius, rREF, coolUzPos};
4727 Double_t vectC[3] = {1,0,0};
4728
4729 Double_t coordD[3] = {-fgkEndLadPipeUwidth/2+fgkEndLadPipeRadius, rREF, coolUzPos};
4730 Double_t vectD[3] = {-1,0,0};
4731
4732 Double_t coordE[3] = {-fgkEndLadPipeUwidth/2, rREF, fgkEndLadPipeRadius+coolUzPos};
4733 Double_t vectE[3] = {0,0,-1};
4734
4735 Double_t coordF[3] = {-fgkEndLadPipeUwidth/2,rREF, endLadPipeUlength+coolUzPos};
4736 Double_t vectF[3] = {0,0,-1};
4737
4738 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 0, coordA, vectA);
4739 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 1, coordB, vectB);
4740 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 2, coordC, vectC);
4741 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 3, coordD, vectD);
4742 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 4, coordE, vectE);
4743 endLadderPipe.AddCheckPoint( (TGeoVolume *) endLadderCards, 5, coordF, vectF);
4744
4745 endLadderPipe.SetInitialNode((TGeoVolume *) endLadderCards); //Set the root node
4746 //endLadderPipe.CreateAndInsertCableSegment( 1);
4747 endLadderPipe.CreateAndInsertTubeSegment( 1);
4748 //endLadderPipe.CreateAndInsertCableSegment( 2);
4749 endLadderPipe.CreateAndInsertTorusSegment( 2);
4750 //endLadderPipe.CreateAndInsertCableSegment( 3);
4751 endLadderPipe.CreateAndInsertTubeSegment( 3);
4752 //endLadderPipe.CreateAndInsertCableSegment( 4);
4753 endLadderPipe.CreateAndInsertTorusSegment( 4);
4754 //endLadderPipe.CreateAndInsertCableSegment( 5);
4755 endLadderPipe.CreateAndInsertTubeSegment( 5);
4756
4757 TGeoBBox *endLadPipeArmBox = new TGeoBBox("endLadPipeArmBox",fgkEndLadPipeArmX/2,
4758 fgkEndLadPipeArmY/2, endLadPipeArmZ/2);
4759 TGeoTube *endLadPipeArmTube = new TGeoTube("endLadPipeArmTube", 0,
4760 fgkEndLadPipeOuterDiam/2, endLadPipeArmZ/2);
4761
4762 TGeoTranslation *endLadPipeArmBoxDY1 = new TGeoTranslation("endLadPipeArmBoxDY1",
4763 - fgkEndLadPipeArmBoxDX,
4764 fgkEndLadPipeArmBoxDY,0);
4765 TGeoTranslation *endLadPipeArmBoxDY2 = new TGeoTranslation("endLadPipeArmBoxDY2",
4766 fgkEndLadPipeArmBoxDX,
4767 fgkEndLadPipeArmBoxDY,0);
4768 endLadPipeArmBoxDY1->RegisterYourself();
4769 endLadPipeArmBoxDY2->RegisterYourself();
4770
4771 if(GetDebug(3)) { // Remove compiler warning.
4772 endLadPipeArmBox->InspectShape();
4773 endLadPipeArmTube->InspectShape();
4774 }
4775
4776 TGeoCompositeShape *endLadPipeArm1 = new TGeoCompositeShape("ITSsddEndLadPipeArm1",
4777 "endLadPipeArmBox:endLadPipeArmBoxDY1"
4778 "- endLadPipeArmTube");
4779 TGeoCompositeShape *endLadPipeArm2 = new TGeoCompositeShape("ITSsddEndLadPipeArm2",
4780 "endLadPipeArmBox:endLadPipeArmBoxDY2"
4781 "- endLadPipeArmTube");
4782
4783 TGeoVolume *vEndLadPipeArm1 = new TGeoVolume("ITSsddVolEndLadPipeArm1",
4784 endLadPipeArm1, alCu12SDD);
4785 TGeoVolume *vEndLadPipeArm2 = new TGeoVolume("ITSsddVolEndLadPipeArm2",
4786 endLadPipeArm2, alCu12SDD);
4787 vEndLadPipeArm1->SetLineColor(2);
4788 vEndLadPipeArm2->SetLineColor(2);
4789
4790 Double_t armZ = (coolUzPos-fgkEndLadPipeOuterDiam/2+endLadPipeArmZ/2
4791 +fgkEndLadPipeArmZpos);
4792
4793 TGeoTranslation *trEndLadPipeArm1 = new TGeoTranslation("trEndLadPipeArm1",
4794 -fgkEndLadPipeUwidth/2,rREF,armZ);
4795 TGeoTranslation *trEndLadPipeArm2 = new TGeoTranslation("trEndLadPipeArm2",
4796 fgkEndLadPipeUwidth/2,rREF,armZ);
4797
4798 endLadderCards->AddNode(vEndLadPipeArm1, 1, trEndLadPipeArm1);
4799 endLadderCards->AddNode(vEndLadPipeArm2, 1, trEndLadPipeArm2);
4800
4801 //=*********************************
4802 //--- LV cards
4803 TGeoVolumeAssembly *cardLVassemblyR = fCardLVR;
4804 TGeoVolumeAssembly *cardLVassemblyL = fCardLVL;
4805
4806 Double_t spaceBetweenCards = 0.2*fgkmm;
4807
4808
4809 Double_t alLVcoolZ3 = (fgkLVcardCuZ+fgkLVcardZ+2.*(fgkLVChip0SiZ+fgkLVChip0Z)
4810 +fgkLVcoolZ1*2.);
4811
4812 Double_t firstLVCardZ = fgkEndLadPipeArmZpos-fgkEndLadPipeOuterDiam/2.+alLVcoolZ3/2
4813 +coolUzPos+1.25*fgkmm;
4814 // Position in z of the first LVB with respect to the start of the cooling
4815 // rectangular arm, coming (from inside of the ladder)
4816 // The cards are added one after the other
4817
4818 for (Int_t iCard=0; iCard<nCards; iCard++) {
4819
4820 Double_t cardLVzShift = firstLVCardZ +
4821 Double_t(iCard)*(alLVcoolZ3 + 2.*spaceBetweenCards+fgkHVCardCool3Z);
4822
4823 TGeoTranslation *trCardLVassemblyR = new TGeoTranslation(cardLVxShift,
4824 cardLVyShift+rREF, cardLVzShift);
4825 TGeoTranslation *trCardLVassemblyL = new TGeoTranslation(-cardLVxShift,
4826 cardLVyShift+rREF, cardLVzShift);
4827
4828 endLadderCards->AddNode(cardLVassemblyR, iCard+1, trCardLVassemblyR);
4829 endLadderCards->AddNode(cardLVassemblyL, iCard+1, trCardLVassemblyL);
4830 }
4831
4832 //=*********************************
4833 //--- HV cards
4834 TGeoVolumeAssembly *cardHV = fCardHV;
4835
4836 Double_t coolHVdy = (fgkHVCardCoolDY + fgkHVCardCool3Y
4837 + fgkEndLadPipeArmY/2 + fgkEndLadPipeArmBoxDY);
4838 // shift of the HV card in local y w.r.t the local y=0 (center of cooling tube)
4839
4840 Double_t coolHVCenterShift = (fgkHVCardCool3Z/2-fgkHVCardCool2Z
4841 -(fgkHVCardCeramZ)/2);
4842
4843 for (Int_t iCard=0; iCard<nCards; iCard++) {
4844
4845 Double_t fact = iCard*2.+1.;
4846 Double_t coolHVdz = (firstLVCardZ + alLVcoolZ3*fact/2 + spaceBetweenCards*fact
4847 + fgkHVCardCool3Z*fact/2. + coolHVCenterShift);
4848 TGeoTranslation *trCardHV = new TGeoTranslation(0,coolHVdy+rREF, coolHVdz);
4849 endLadderCards->AddNode(cardHV, iCard+1, trCardHV);
4850 }
4851
4852 //=*********************************
4853 //--- Carlos card
4854
4855 TGeoVolumeAssembly *assemblySupCarlos = fCardCarlos;
4856// TGeoRotation *carlosSupRot1 = new TGeoRotation("carlosSuppAngle",
4857// 0, -fgkCarlosSuppAngle, 0);
4858
4859 Double_t spaceBetweenCarlsoCards = 0.1*fgkmm;
4860 Double_t firstCarlosCardZ = (firstLVCardZ - alLVcoolZ3/2 + alLVcoolZ3*4 +
4861 fgkHVCardCool3Z*4 + spaceBetweenCards*7 + 2*fgkmm);
4862 // position in z of the first Carlos board, coming from inside of the ladder
4863
4864 Double_t coolCarlosDy = (fgkCarlosSuppY3/2 + fgkEndLadPipeArmY/2 +
4865 fgkEndLadPipeArmBoxDY);
4866
4867 for (Int_t iCard=0; iCard<nCards; iCard++) {
4868
4869 Double_t carloszPos = ( firstCarlosCardZ + fgkCarlosSuppZ3/2 +
4870 iCard*(fgkCarlosSuppZ3+spaceBetweenCarlsoCards) );
4871 TGeoCombiTrans *carlosPos = new TGeoCombiTrans(0,coolCarlosDy+rREF,carloszPos,
4872 (TGeoRotation*) fCommonTr[0]);
4873
4874 endLadderCards->AddNode(assemblySupCarlos, iCard, carlosPos);
4875 }
4876
4877
4878 //=*********************************
4879 //--- Cables
4880
4881
4882 Double_t sectionV = (fgkSectionCuPerMod+fgkSectionPlastPerMod
4883 + fgkSectionGlassPerMod)*nCards
4884 + fgkSectionCoolPolyuEL + fgkSectionCoolWaterEL;
4885 // We fix thickness, then width is calculated accordingly
4886 Double_t width = sectionV/thickTotCable;
4887 Double_t thickCu = thickTotCable*fgkSectionCuPerMod
4888 / (fgkSectionCuPerMod+fgkSectionPlastPerMod+fgkSectionGlassPerMod+fgkSectionCoolPolyuEL+fgkSectionCoolWaterEL);
4889 Double_t thickPlast = thickTotCable*fgkSectionPlastPerMod
4890 / (fgkSectionCuPerMod+fgkSectionPlastPerMod+fgkSectionGlassPerMod+fgkSectionCoolPolyuEL+fgkSectionCoolWaterEL);
4891 Double_t thickGlass = thickTotCable*fgkSectionGlassPerMod
4892 / (fgkSectionCuPerMod+fgkSectionPlastPerMod+fgkSectionGlassPerMod+fgkSectionCoolPolyuEL+fgkSectionCoolWaterEL);
4893
4894 Double_t thickCoolPolyu = thickTotCable*fgkSectionCoolPolyuEL
4895 / (fgkSectionCuPerMod+fgkSectionPlastPerMod+fgkSectionGlassPerMod+fgkSectionCoolPolyuEL+fgkSectionCoolWaterEL);
4896 Double_t thickCoolWater = thickTotCable*fgkSectionCoolWaterEL
4897 / (fgkSectionCuPerMod+fgkSectionPlastPerMod+fgkSectionGlassPerMod+fgkSectionCoolPolyuEL+fgkSectionCoolWaterEL);
4898
4899 AliITSv11GeomCableFlat cable("SDDcableEndLadder",width,thickTotCable);
4900 cable.SetNLayers(5);
4901 cable.SetLayer(0, thickCu, copper, kRed);
4902 cable.SetLayer(1, thickPlast, plastic, kYellow);
4903 cable.SetLayer(2, thickGlass, opticalFiber, kGreen);
4904 cable.SetLayer(3, thickCoolPolyu, polyurethane, kGray);
4905 cable.SetLayer(4, thickCoolWater, coolerMediumSDD, kBlue);
4906
4907 Double_t zVect[3]={0,0,1};
4908 Double_t xMinCable = firstCarlosCardZ+nCards*(fgkCarlosSuppZ3
4909 +spaceBetweenCarlsoCards)/2 + 2.9;
4910 // the 2.9cm is for taking into account carlos card angle...
4911
4912 Double_t zEndCable = GetConeZ(cablesRadius-thickTotCable/2, cableSectionR1,
4913 cableSectionR2,cableSectionZ1,cableSectionZ2);
4914
4915 Double_t pos1[3] = {0, cablesRadius, xMinCable};
4916 Double_t pos2[3] = {0, cablesRadius, zEndCable};
4917 cable.AddCheckPoint( endLadderCards, 0, pos1, zVect );
4918 cable.AddCheckPoint( endLadderCards, 1, pos2, zVect );
4919 cable.SetInitialNode(endLadderCards);
4920 cable.CreateAndInsertCableSegment(1);
4921
4922 // The earth cable
4923 TGeoTorus *earthShape = new TGeoTorus(rMax-fgkEndLadderEarthCableR,
4924 0., fgkEndLadderEarthCableR,
4925 phi0, dphi); // same as containerShape
4926
4927 TGeoVolume *earthCable = new TGeoVolume("SDDcableEndLadderEarthCable",
4928 earthShape, copper);
4929
4930 endLadderCards->AddNode(earthCable, 1,
4931 new TGeoTranslation(0, 0, fgkDistEndLaddCardsLadd+1));
4932
4933 return endLadderCards;
4934}
4935
4936//________________________________________________________________________
4937TGeoVolumeAssembly* AliITSv11GeometrySDD::CreateSupportRing(Int_t iLay) {
4938//
4939// return an assembly of the support rings, attaching the ladders to the cone
4940//
4941
4942
4943 iLay = iLay;
4944
4945 TGeoMedium *stainless = GetMedium("INOX$"); // To code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4946 TGeoVolumeAssembly *supportRing = new TGeoVolumeAssembly("supportRing");
4947
4948
4949 //**********************************
4950 // ruby cage
4951
4952 Double_t fgkRubyCageX = 9*fgkmm;
4953 Double_t fgkRubyCageY = 5.5*fgkmm;
4954 Double_t fgkRubyCageZ = 8*fgkmm;
4955 Double_t fgkRubyCageInternSide = 5.*fgkmm; //side of the internal square
4956 Double_t fgkRubyCageHoleDX = 2.*fgkmm;
4957 Double_t fgkRubyCageVIntern = 5.42*fgkmm;
4958 Double_t fgkRubyCageScrewHoleR = 4.5/2*fgkmm;
4959 Double_t fgkRubyCageScrewHoleY = 1.5*fgkmm;
4960
4961 TGeoBBox *rubyCageBox = new TGeoBBox("rubyCageBox",fgkRubyCageX/2,fgkRubyCageY/2,
4962 fgkRubyCageZ/2);
4963
4964 Double_t epsilon = 1e-10; //dummy epsilon to force the gl viewer to show holes
4965
4966 // pieces common to both square and V cages
4967 TGeoBBox *rubyCageInternBox = new TGeoBBox("rubyCageInternBox",fgkRubyCageInternSide/2,
4968 fgkRubyCageY/2+epsilon, fgkRubyCageInternSide/2);
4969
4970 TGeoTube *screwHole = new TGeoTube("screwHole", 0, fgkRubyCageScrewHoleR,
4971 fgkRubyCageHoleDX/2+epsilon);
4972
4973 TGeoRotation *rotV = new TGeoRotation("", 90,90,-90);
4974 TGeoCombiTrans *trScrewHole = new TGeoCombiTrans("trScrewHole",
4975 fgkRubyCageX/2-fgkRubyCageHoleDX/2,
4976 -fgkRubyCageY/2+fgkRubyCageScrewHoleY,0,rotV);
4977 trScrewHole->RegisterYourself();
4978
4979 TGeoBBox *screwHoleFoot = new TGeoBBox("screwHoleFoot",fgkRubyCageHoleDX/2+epsilon,
4980 fgkRubyCageScrewHoleY/2+epsilon, fgkRubyCageScrewHoleR);
4981 TGeoTranslation *trScrewHoleFoot = new TGeoTranslation("trScrewHoleFoot",
4982 fgkRubyCageX/2-fgkRubyCageHoleDX/2,
4983 -fgkRubyCageY/2+fgkRubyCageScrewHoleY/2, 0);
4984 trScrewHoleFoot->RegisterYourself();
4985
4986
4987 // pieces which differ
4988 Double_t rubyCageVInternBoxX = fgkRubyCageVIntern - fgkRubyCageInternSide/2;
4989
4990 TGeoBBox *rubyCageVInternBox = new TGeoBBox("rubyCageVInternBox",rubyCageVInternBoxX/2,
4991 fgkRubyCageY/2+epsilon, fgkRubyCageInternSide/2);
4992
4993 TGeoTranslation *trRubyCageVInternBox = new TGeoTranslation("trRubyCageVInternB",
4994 fgkRubyCageX/2-fgkRubyCageHoleDX-rubyCageVInternBoxX/2,0,0);
4995 trRubyCageVInternBox->RegisterYourself();
4996
4997 TGeoTrd1 *rubyCageVInternTriangl = new TGeoTrd1("rubyCageVInternTriangl", 0,
4998 fgkRubyCageInternSide/2, fgkRubyCageY/2+epsilon,
4999 fgkRubyCageInternSide/4);
5000
5001 TGeoCombiTrans *trRubyCageVInternTriangl = new TGeoCombiTrans("trRubyCageVInternTriangl",
5002 fgkRubyCageX/2-fgkRubyCageHoleDX-rubyCageVInternBoxX-fgkRubyCageInternSide/4
5003 +epsilon,0,0, rotV );
5004 trRubyCageVInternTriangl->RegisterYourself();
5005
5006 //---
5007 TGeoCompositeShape *rubyCageSquare = new TGeoCompositeShape("rubyCageSquare",
5008 "rubyCageBox-(rubyCageInternBox"
5009 "+screwHole:trScrewHole+screwHoleFoot:trScrewHoleFoot)");
5010
5011 TGeoVolume *vRubyCageSquare = new TGeoVolume("vRubyCageSquare",
5012 rubyCageSquare, stainless);
5013 vRubyCageSquare->SetLineColor(10);
5014
5015 TGeoCompositeShape *rubyCageV = new TGeoCompositeShape("rubyCageV",
5016 "rubyCageBox-(rubyCageVInternBox:trRubyCageVInternB"
5017 "+rubyCageVInternTriangl:trRubyCageVInternTriangl"
5018 "+screwHole:trScrewHole+screwHoleFoot:trScrewHoleFoot)");
5019 TGeoVolume *vRubyCageV = new TGeoVolume("vRubyCageV", rubyCageV, stainless);
5020 vRubyCageV->SetLineColor(10);
5021
5022 if(GetDebug(3)) { // Remove compiler warning.
5023 rubyCageBox->InspectShape();
5024 rubyCageInternBox->InspectShape();
5025 screwHole->InspectShape();
5026 screwHoleFoot->InspectShape();
5027 rubyCageVInternBox->InspectShape();
5028 rubyCageVInternTriangl->InspectShape();
5029 }
5030
5031 supportRing->AddNode(vRubyCageSquare, 0, 0);
5032 //supportRing->AddNode(vRubyCageV, 0, 0);
5033 return supportRing;
5034}
5035
5036
5037
5038//________________________________________________________________________
5039void AliITSv11GeometrySDD::CreateSDDsensor() {
5040//
5041// return a box containing the SDD sensor
5042//
5043
5044 TGeoMedium *airSDD = GetMedium("SDD AIR$");
5045 TGeoMedium *siliconSDD = GetMedium("SDD SI insensitive$"); // ITSsddSi
5046 TGeoMedium *siliconSDDsens = GetMedium("SI$"); // ITSsddSi
5047 TGeoMedium *alSDD = GetMedium("AL$"); // ITSal
5048 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$"); // ITSsddKAPTON_POLYCH2
5049 TGeoMedium *glassSDD = GetMedium("STDGLASS$"); // StdGlass
5050
5051
5052 Double_t rWraping = fgkWaferThickness/2+fgkWaHVcableAlThick+fgkWaHVcablePolyThick;
5053 Double_t witdhCableBox = (fgkWaHVcableWitdh - TMath::Pi()*rWraping)/2;
5054 // width : in the beam direction !
5055
5056 Double_t sensoxBoxLength = ( fgkWaferLength +
5057 2*(rWraping+witdhCableBox-fgkWaHVcableDW) );
5058 // Makes life easier to include the space for the WA HV cable on both sides
5059 Double_t sensoxBoxThick = fgkWaferThickness +
5060 2*(fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
5061
5062// cout << "fgkWaferLength=" << fgkWaferLength << " sensoxBoxLength="<< sensoxBoxLength <<endl;
5063// cout << "fgkWaferThickness=" << fgkWaferThickness << " sensoxBoxThick=" << sensoxBoxThick << endl;
5064
5065 TGeoBBox *box = new TGeoBBox("ITSsddSensorBox",
5066 fgkWaferWidth/2, sensoxBoxThick/2, sensoxBoxLength/2);
5067
5068 fSDDsensor3 = new TGeoVolume("ITSsddSensor3", box, airSDD);
5069 fSDDsensor4 = new TGeoVolume("ITSsddSensor4", box, airSDD);
5070
5071
5072 //****************************
5073 // silicon wafer
5074 //****************************
5075 if (fAddSensors) {
5076 // we need 2 different sensor objects, because they have to have different names
5077 // This is required for the step manager
5078
5079 TGeoBBox *waferShape = new TGeoBBox("ITSsddWaferShape",
5080 fgkWaferWidth/2, fgkWaferThickness/2, fgkWaferLength/2);
5081
5082
5083 TGeoVolume *wafer3 = new TGeoVolume("ITSsddWafer3", waferShape, siliconSDD);
5084 wafer3->SetLineColor(fColorSilicon);
5085 TGeoBBox *sensBox3 = new TGeoBBox("ITSsddSensorSensBox3",
5086 fgkWaferWidthSens/2, fgkWaferThickSens/2, fgkWaferLengthSens/2);
5087 TGeoVolume *sensVol3 = new TGeoVolume(fgSDDsensitiveVolName3,sensBox3, siliconSDDsens);
5088 sensVol3->SetLineColor(fColorSilicon+5);
5089 wafer3->AddNode(sensVol3, 1, 0);
5090 fSDDsensor3->AddNode(wafer3, 1, 0);
5091
5092 TGeoVolume *wafer4 = new TGeoVolume("ITSsddWafer4", waferShape, siliconSDD);
5093 wafer4->SetLineColor(fColorSilicon);
5094 TGeoBBox *sensBox4 = new TGeoBBox("ITSsddSensorSensBox4",
5095 fgkWaferWidthSens/2, fgkWaferThickSens/2, fgkWaferLengthSens/2);
5096 TGeoVolume *sensVol4 = new TGeoVolume(fgSDDsensitiveVolName4,sensBox4, siliconSDDsens);
5097 sensVol4->SetLineColor(fColorSilicon+5);
5098 wafer4->AddNode(sensVol4, 1, 0);
5099 fSDDsensor4->AddNode(wafer4, 1, 0);
5100 };
5101
5102 //****************************
5103 // glass
5104 //****************************
5105 TGeoBBox *glass = new TGeoBBox("ITSsddGlassBox", fgkSensorGlassLX/2,
5106 fgkSensorGlassLY/2, fgkSensorGlassLZ/2);
5107 TGeoVolume *vGlass = new TGeoVolume("ITSsddGlass",glass, glassSDD);
5108 vGlass->SetLineColor(fColorGlass);
5109 TGeoTranslation *glassTr1 = new TGeoTranslation("",fgkGlassDXOnSensor,
5110 fgkWaferThickness/2+fgkSensorGlassLY/2,
5111 fgkGlassDZOnSensor);
5112 TGeoTranslation *glassTr2 = new TGeoTranslation("",-fgkGlassDXOnSensor,
5113 fgkWaferThickness/2+fgkSensorGlassLY/2,
5114 fgkGlassDZOnSensor);
5115 TGeoTranslation *glassTr3 = new TGeoTranslation("",fgkGlassDXOnSensor,
5116 fgkWaferThickness/2+fgkSensorGlassLY/2,
5117 -fgkGlassDZOnSensor);
5118 TGeoTranslation *glassTr4 = new TGeoTranslation("",-fgkGlassDXOnSensor,
5119 fgkWaferThickness/2+fgkSensorGlassLY/2,
5120 -fgkGlassDZOnSensor);
5121 fSDDsensor3->AddNode(vGlass, 1, glassTr1);
5122 fSDDsensor3->AddNode(vGlass, 2, glassTr2);
5123 fSDDsensor3->AddNode(vGlass, 3, glassTr3);
5124 fSDDsensor3->AddNode(vGlass, 4, glassTr4);
5125
5126 fSDDsensor4->AddNode(vGlass, 1, glassTr1);
5127 fSDDsensor4->AddNode(vGlass, 2, glassTr2);
5128 fSDDsensor4->AddNode(vGlass, 3, glassTr3);
5129 fSDDsensor4->AddNode(vGlass, 4, glassTr4);
5130
5131 //****************************
5132 // Wrap-around cable
5133 //****************************
5134 if (fAddHVcables) {
5135 AliITSv11GeomCableFlat waHVCable("ITSsddWaHVCableU",witdhCableBox,
5136 fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
5137 waHVCable.SetNLayers(2);
5138 waHVCable.SetLayer(0, fgkWaHVcablePolyThick,polyhamideSDD,fColorPolyhamide);
5139 waHVCable.SetLayer(1, fgkWaHVcableAlThick, alSDD, fColorAl);
5140 waHVCable.SetInitialNode(fSDDsensor3);
5141
5142 Double_t x1[3], x2[3], vX[3] = {1,0,0};
5143 x1[0] = -fgkWaHVcableLength/2;
5144 x2[0] = -x1[0];
5145 x1[1] = (fgkWaferThickness + waHVCable.GetThickness())/2;
5146 x2[1] = x1[1];
5147 x1[2] = fgkWaferLength/2+waHVCable.GetWidth()/2-fgkWaHVcableDW;
5148 x2[2] = x1[2];
5149
5150 waHVCable.AddCheckPoint(fSDDsensor3, 0, x1, vX);
5151 waHVCable.AddCheckPoint(fSDDsensor3, 1, x2, vX);
5152 TGeoCombiTrans *ctSegment = 0;
5153 TGeoVolume* segment = waHVCable.CreateAndInsertBoxCableSegment(1,-90, &ctSegment);
5154 fSDDsensor4->AddNode(segment, 1, ctSegment);
5155
5156 x1[1] = -x1[1];
5157 x2[1] = x1[1];
5158 waHVCable.SetName("ITSsddWaHVCableD");
5159 waHVCable.ResetPoints();
5160 waHVCable.AddCheckPoint(fSDDsensor3, 0, x1, vX);
5161 waHVCable.AddCheckPoint(fSDDsensor3, 1, x2, vX);
5162 segment = waHVCable.CreateAndInsertBoxCableSegment(1, 90, &ctSegment);
5163 fSDDsensor4->AddNode(segment, 1, ctSegment);
5164
5165 AliITSv11GeomCableRound waHVCableFold("ITSsddWaHVCableFold",
5166 rWraping);
5167 waHVCableFold.SetPhi(180,360);
5168 waHVCableFold.SetNLayers(2);
5169 waHVCableFold.SetLayer(0, fgkWaferThickness/2+fgkWaHVcablePolyThick,
5170 polyhamideSDD, fColorPolyhamide);
5171 waHVCableFold.SetLayer(1, fgkWaHVcableAlThick, alSDD, fColorAl);
5172 waHVCableFold.SetInitialNode(fSDDsensor3);
5173 x1[1] = 0;
5174 x2[1] = 0;
5175 x1[2] = fgkWaferLength/2-fgkWaHVcableDW+witdhCableBox;
5176 x2[2] = x1[2];
5177 waHVCableFold.AddCheckPoint(fSDDsensor3, 0, x1, vX);
5178 waHVCableFold.AddCheckPoint(fSDDsensor3, 1, x2, vX);
5179 segment = waHVCableFold.CreateAndInsertCableSegment(1, &ctSegment);
5180 fSDDsensor4->AddNode(segment, 1, ctSegment);
5181
5182
5183 //****************************
5184 // transition cable
5185 //****************************
5186 Double_t headRadius = (fgkTransitHVHeadLX*fgkTransitHVHeadLX/4.+
5187 fgkTransitHVHeadLZ*fgkTransitHVHeadLZ)
5188 /(2.*fgkTransitHVHeadLZ);
5189 Double_t theta = TMath::ATan2(fgkTransitHVHeadLX/2,
5190 headRadius-fgkTransitHVHeadLZ)
5191 *TMath::RadToDeg();
5192
5193 TGeoTubeSeg *headPoly = new TGeoTubeSeg(0,headRadius,
5194 fgkTransitHVPolyThick/2,
5195 90-theta,90+theta);
5196 headPoly->SetName("headPoly");
5197 TGeoTranslation *headPolyTr = new TGeoTranslation(0,0,
5198 -fgkTransitHVPolyThick/2);
5199 headPolyTr->SetName("headPolyTr");
5200 headPolyTr->RegisterYourself();
5201
5202 TGeoTubeSeg *headAl = new TGeoTubeSeg(0,headRadius,
5203 fgkTransitHVAlThick/2,
5204 90-theta,90+theta);
5205 headAl->SetName("headAl");
5206 TGeoTranslation *headAlTr = new TGeoTranslation(0,0,
5207 -fgkTransitHVPolyThick
5208 -fgkTransitHVAlThick/2);
5209 headAlTr->SetName("headAlTr");
5210 headAlTr->RegisterYourself();
5211
5212 TGeoBBox *cache = new TGeoBBox(fgkTransitHVHeadLX/2,
5213 (headRadius-fgkTransitHVHeadLZ)/2,
5214 (fgkTransitHVPolyThick+fgkTransitHVAlThick)/2);
5215 cache->SetName("cache");
5216
5217 TGeoTranslation *headCacheTr = new TGeoTranslation(0,
5218 (headRadius-fgkTransitHVHeadLZ)/2,
5219 -(fgkTransitHVPolyThick
5220 +fgkTransitHVAlThick)/2);
5221 headCacheTr->SetName("cacheTr");
5222 headCacheTr->RegisterYourself();
5223
5224 TGeoCompositeShape *headPolyComp = new TGeoCompositeShape(
5225 "headPoly:headPolyTr-cache:cacheTr");
5226 TGeoVolume *vHeadPolyComp = new TGeoVolume(
5227 "ITSsddHVtransitHeadPoly",headPolyComp, polyhamideSDD);
5228 vHeadPolyComp->SetLineColor(fColorPolyhamide);
5229 TGeoCompositeShape *headAlComp = new TGeoCompositeShape(
5230 "headAl:headAlTr-cache:cacheTr");
5231 TGeoVolume *vHeadAlComp = new TGeoVolume(
5232 "ITSsddHVtransitHeadAl",headAlComp, alSDD);
5233 vHeadAlComp->SetLineColor(fColorAl);
5234
5235
5236// TGeoRotation rotHead("",0,90,0);
5237// TGeoCombiTrans *rotHeadTr = new TGeoCombiTrans(0,fgkWaferThickness/2,
5238// -headRadius+fgkTransitHVHeadLZ+fgkTransitHVBondingLZ/2,
5239// &rotHead);
5240 TGeoRotation *rotHead = new TGeoRotation("",0,90,0);
5241 TGeoCombiTrans *rotHeadTr = new TGeoCombiTrans(0,fgkWaferThickness/2,
5242 -headRadius+fgkTransitHVHeadLZ+fgkTransitHVBondingLZ/2,
5243 rotHead);
5244
5245 fSDDsensor3->AddNode(vHeadPolyComp,1,rotHeadTr);
5246 fSDDsensor3->AddNode(vHeadAlComp,1,rotHeadTr);
5247 fSDDsensor4->AddNode(vHeadPolyComp,1,rotHeadTr);
5248 fSDDsensor4->AddNode(vHeadAlComp,1,rotHeadTr);
5249
5250 //---
5251 AliITSv11GeomCableFlat transitHVCable("ITSsddHVtransitCenter",
5252 fgkTransitHVBondingLZ,
5253 fgkTransitHVPolyThick+fgkTransitHVAlThick);
5254 transitHVCable.SetNLayers(2);
5255 transitHVCable.SetLayer(0, fgkTransitHVPolyThick,polyhamideSDD,
5256 fColorPolyhamide);
5257 transitHVCable.SetLayer(1, fgkTransitHVAlThick, alSDD, fColorAl);
5258 transitHVCable.SetInitialNode(fSDDsensor3);
5259
5260 x1[0] = -fgkTransitHVHeadLX/2;
5261 x2[0] = -x1[0];
5262 x1[1] = (fgkWaferThickness+fgkTransitHVPolyThick+fgkTransitHVAlThick)/2;
5263 x2[1] = x1[1];
5264 x1[2] = 0;
5265 x2[2] = 0;
5266 transitHVCable.AddCheckPoint(fSDDsensor3, 0, x1, vX);
5267 transitHVCable.AddCheckPoint(fSDDsensor3, 1, x2, vX);
5268 segment = transitHVCable.CreateAndInsertBoxCableSegment(1,-90,&ctSegment);
5269 fSDDsensor4->AddNode(segment, 1, ctSegment);
5270
5271 transitHVCable.ResetPoints();
5272 transitHVCable.SetName("ITSsddHVtransitTail");
5273 transitHVCable.SetWidth(fgkTransitHVtailWidth);
5274 x1[0] = fgkTransitHVtailXpos;
5275 x2[0] = fgkTransitHVtailXpos;
5276 x1[2] = -fgkTransitHVBondingLZ/2;
5277 x2[2] = -fgkTransitHVBondingLZ/2-fgkTransitHVtailLength;
5278 Double_t vZ[3] = {0,0,1};
5279 transitHVCable.AddCheckPoint(fSDDsensor3, 0, x1, vZ);
5280 transitHVCable.AddCheckPoint(fSDDsensor3, 1, x2, vZ);
5281 segment = transitHVCable.CreateAndInsertBoxCableSegment(1,0, &ctSegment);
5282 fSDDsensor4->AddNode(segment, 1, ctSegment);
5283
5284 //---
5285 TGeoArb8 *sideLeft = new TGeoArb8( fgkTransitHVPolyThick/2 );
5286 sideLeft->SetVertex(0, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
5287 sideLeft->SetVertex(1, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
5288 fgkTransitHVsideLZ);
5289 sideLeft->SetVertex(2, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
5290 sideLeft->SetVertex(3, fgkTransitHVHeadLX/2, 0);
5291 sideLeft->SetVertex(4, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
5292 sideLeft->SetVertex(5, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
5293 fgkTransitHVsideLZ);
5294 sideLeft->SetVertex(6, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
5295 sideLeft->SetVertex(7, fgkTransitHVHeadLX/2, 0);
5296
5297 TGeoArb8 *sideLeftAl = new TGeoArb8( fgkTransitHVAlThick/2 );
5298 sideLeftAl->SetVertex(0, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
5299 sideLeftAl->SetVertex(1, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
5300 fgkTransitHVsideLZ);
5301 sideLeftAl->SetVertex(2, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
5302 sideLeftAl->SetVertex(3, fgkTransitHVHeadLX/2, 0);
5303 sideLeftAl->SetVertex(4, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
5304 sideLeftAl->SetVertex(5, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
5305 fgkTransitHVsideLZ);
5306 sideLeftAl->SetVertex(6, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
5307 sideLeftAl->SetVertex(7, fgkTransitHVHeadLX/2, 0);
5308
5309 // sideRight is not there actually
5310// TGeoArb8 *sideRight = new TGeoArb8( fgkTransitHVPolyThick/2 );
5311// sideRight->SetVertex(0, fgkTransitHVtailXpos-fgkTransitHVtailWidth/2,0);
5312// sideRight->SetVertex(1, fgkTransitHVtailXpos-fgkTransitHVtailWidth/2,
5313