warnings fixed
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySDD.cxx
CommitLineData
db486a6e 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. *
40e2e5ea 14 **************************************************************************/
db486a6e 15
b7943f00 16
db486a6e 17//*************************************************************************
effd7456 18//
db486a6e 19// SDD geometry, based on ROOT geometrical modeler
20//
effd7456 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//
b7943f00 25// Ludovic Gaudichet gaudichet@to.infn.it
db486a6e 26//*************************************************************************
27
28
73dfc864 29// $Id$
30
db486a6e 31
32// General Root includes
112d72a8 33#include <Riostream.h>
db486a6e 34#include <TMath.h>
35
36// Root Geometry includes
37#include <TGeoManager.h>
38#include <TGeoVolume.h>
db486a6e 39#include <TGeoCone.h>
40#include <TGeoTube.h>
108bd0fe 41#include <TGeoTrd1.h>
db486a6e 42#include <TGeoArb8.h>
9c8369f9 43#include <TGeoXtru.h>
db486a6e 44#include <TGeoCompositeShape.h>
45#include <TGeoMatrix.h>
c789ee28 46#include <TGeoNode.h>
bf210566 47#include <TGeoPcon.h>
d485d5bf 48#include <TGeoTorus.h>
db486a6e 49
db486a6e 50#include "AliITSv11GeometrySDD.h"
b7943f00 51#include "AliITSv11GeomCableFlat.h"
52#include "AliITSv11GeomCableRound.h"
b7943f00 53
108bd0fe 54const char* AliITSv11GeometrySDD::fgSDDsensitiveVolName3 = "ITSsddSensitivL3";
55const char* AliITSv11GeometrySDD::fgSDDsensitiveVolName4 = "ITSsddSensitivL4";
9c8369f9 56const Double_t AliITSv11GeometrySDD::fgkSegmentLength = 37.21*2*fgkmm;
b7943f00 57const Double_t AliITSv11GeometrySDD::fgkLadderWidth = 50.0*fgkmm;
58const Double_t AliITSv11GeometrySDD::fgkLadderHeight = 30.0*fgkmm;
9c8369f9 59const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDW = 7.5*fgkmm;
60const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDH = 7.1*fgkmm;
61const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDHCorr= 2.1*fgkmm;
b7943f00 62
63const Double_t AliITSv11GeometrySDD::fgkLadderBeamRadius = 0.6*fgkmm;
64const Double_t AliITSv11GeometrySDD::fgkLadderLa = 3.*fgkmm;
fa4639a3 65const Double_t AliITSv11GeometrySDD::fgkLadderHa = 0.721979*fgkmm;
b7943f00 66const Double_t AliITSv11GeometrySDD::fgkLadderLb = 3.7*fgkmm;
fa4639a3 67const Double_t AliITSv11GeometrySDD::fgkLadderHb = 0.890428*fgkmm;
b7943f00 68const Double_t AliITSv11GeometrySDD::fgkLadderl = 0.25*fgkmm;
69
70const Double_t AliITSv11GeometrySDD::fgkBottomBeamAngle = 56.5;
71const Double_t AliITSv11GeometrySDD::fgkBeamSidePhi = 65;
72
73const Double_t AliITSv11GeometrySDD::fgkLadWaferSep = 2*fgkmm;
fa4639a3 74const Double_t AliITSv11GeometrySDD::fgkPinSuppWidth = 2.5*fgkmm;
75const Double_t AliITSv11GeometrySDD::fgkPinSuppHeight = 2.*fgkmm;
b7943f00 76const Double_t AliITSv11GeometrySDD::fgkPinSuppRmax = 2.5/2.*fgkmm;
77const Double_t AliITSv11GeometrySDD::fgkPinR = 1.5/2.*fgkmm;
78const Double_t AliITSv11GeometrySDD::fgkPinSuppLength = 5.*fgkmm;
79const Double_t AliITSv11GeometrySDD::fgkPinSuppThickness = 0.5*fgkmm;
80const Double_t AliITSv11GeometrySDD::fgkPinSuppConeAngle = 4;
81const Double_t AliITSv11GeometrySDD::fgkPinDXminOnSensor = (39./2.)*fgkmm;
82const Double_t AliITSv11GeometrySDD::fgkPinPinDDXOnSensor = 3*fgkmm;
83const Double_t AliITSv11GeometrySDD::fgkPinDYOnSensor = (52.5/2.)*fgkmm;
db486a6e 84
b7943f00 85// parameters from ALR-0752/3
86const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppHeight = 3.2*fgkmm;
87const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppMaxLength = 14*fgkmm;
88const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppWidthExt = 0.4*fgkmm;
89const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppWidthIn = 0.65*fgkmm;
90const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppHoleDiam = 2*fgkmm;
91const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppFulWidth = 5.15*fgkmm;
92const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppTongW = 0.8*fgkmm;
93const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppAngle = 22.5;
94const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppSlitL = 4.9*fgkmm;
95const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppAxeDist = 3.05*fgkmm;
96const Double_t AliITSv11GeometrySDD::fgkCoolPipeInnerDiam = 1.84*fgkmm;
97const Double_t AliITSv11GeometrySDD::fgkCoolPipeOuterDiam = 2.*fgkmm;
98
99const Double_t AliITSv11GeometrySDD::fgkBTBthick = 0.25 *fgkmm;
100const Double_t AliITSv11GeometrySDD::fgkBTBlength = 55. *fgkmm;
101const Double_t AliITSv11GeometrySDD::fgkBTBwidth = 18*fgkmm;
102const Double_t AliITSv11GeometrySDD::fgkBTBaxisAtoBottom = 4*fgkmm;
103const Double_t AliITSv11GeometrySDD::fgkBTBaxisAtoBase = 1.2*fgkmm;
104const Double_t AliITSv11GeometrySDD::fgkRadiusAminBTB = 1. *fgkmm;
105const Double_t AliITSv11GeometrySDD::fgkRadiusBminBTB = 0.53 *fgkmm;
106const Double_t AliITSv11GeometrySDD::fgkBTBHoleLength = 15 *fgkmm;
107const Double_t AliITSv11GeometrySDD::fgkBTBHolewidth = 6 *fgkmm;
108const Double_t AliITSv11GeometrySDD::fgkBTBHoleRefX = 10 *fgkmm;
109const Double_t AliITSv11GeometrySDD::fgkBTBHoleRefY = 6.5 *fgkmm;
110
1c5895a3 111const Double_t AliITSv11GeometrySDD::fgkLay3Rmin = 129.*fgkmm;
9c8369f9 112const Double_t AliITSv11GeometrySDD::fgkLay3Rmax = 205.*fgkmm;
b7943f00 113const Double_t AliITSv11GeometrySDD::fgkLay3Length = (524.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube)
114const Double_t AliITSv11GeometrySDD::fgkLay3LadderLength = 524.*fgkmm;
115const Double_t AliITSv11GeometrySDD::fgkLay3DetShortRadius = 146.0*fgkmm;
116const Double_t AliITSv11GeometrySDD::fgkLay3DetLongRadius = 152.0*fgkmm;
117const Double_t AliITSv11GeometrySDD::fgkLay3LaddTopCornerEnd = 15.6*fgkmm;
118const Int_t AliITSv11GeometrySDD::fgkLay3Ndet = 6;
119const Int_t AliITSv11GeometrySDD::fgkLay3Nladd = 14;
120const Double_t AliITSv11GeometrySDD::fgkLay3CoolPipeSuppH = 7.5*fgkmm;
121
1c5895a3 122const Double_t AliITSv11GeometrySDD::fgkLay4Rmin = 220.*fgkmm;
9c8369f9 123const Double_t AliITSv11GeometrySDD::fgkLay4Rmax = 291.*fgkmm;
b7943f00 124const Double_t AliITSv11GeometrySDD::fgkLay4Length = (671.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube)
125const Double_t AliITSv11GeometrySDD::fgkLay4LadderLength = 671.*fgkmm;
126const Double_t AliITSv11GeometrySDD::fgkLay4DetShortRadius = 235.0*fgkmm;
127const Double_t AliITSv11GeometrySDD::fgkLay4DetLongRadius = 240.5*fgkmm;
128const Double_t AliITSv11GeometrySDD::fgkLay4LaddTopCornerEnd = 15.6*fgkmm;
129const Int_t AliITSv11GeometrySDD::fgkLay4Ndet = 8;
130const Int_t AliITSv11GeometrySDD::fgkLay4Nladd = 22;
131const Double_t AliITSv11GeometrySDD::fgkLay4CoolPipeSuppH = 7.5*fgkmm;
132
bf210566 133const Double_t AliITSv11GeometrySDD::fgkEndLaddCardsShortRadiusLay3 = fgkLay3DetShortRadius;
134const Double_t AliITSv11GeometrySDD::fgkEndLaddCardsShortRadiusLay4 = fgkLay4DetShortRadius;
135const Double_t AliITSv11GeometrySDD::fgkDistEndLaddCardsLadd = 0.*fgkmm;
136
b7943f00 137//hybrid
138const Double_t AliITSv11GeometrySDD::fgkHybridAngle = 46; // approx !!!
139// Origine taken at the hybrid corner :
140const Double_t AliITSv11GeometrySDD::fgkHybridLength = 65*fgkmm;
141const Double_t AliITSv11GeometrySDD::fgkHybridWidth = 41*fgkmm;
142const Double_t AliITSv11GeometrySDD::fgkHybRndHoleRad = 1.05*fgkmm;
143const Double_t AliITSv11GeometrySDD::fgkHybRndHoleZ = 2.5*fgkmm;
144const Double_t AliITSv11GeometrySDD::fgkHybRndHoleX = fgkHybridWidth-23.599*fgkmm;
145
146const Double_t AliITSv11GeometrySDD::fgkHybFLlowHoleDZ = 9.698*fgkmm;
147const Double_t AliITSv11GeometrySDD::fgkHybFLlowHolePasDX = 10.754*fgkmm;
148const Double_t AliITSv11GeometrySDD::fgkHybFLlowHoleAmbDX = 9.122*fgkmm;
149 // center of ships to the border
150const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ4 = fgkHybridLength-(4.654 )*fgkmm-fgkHybFLlowHoleDZ/2;
151const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ3 = fgkHybridLength-(4.654+15. )*fgkmm-fgkHybFLlowHoleDZ/2;
152const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ2 = fgkHybridLength-(4.654+15.*2)*fgkmm-fgkHybFLlowHoleDZ/2;
153const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ1 = fgkHybridLength-(4.654+15.*3)*fgkmm-fgkHybFLlowHoleDZ/2;
154const Double_t AliITSv11GeometrySDD::fgkHybFLlowPasX = fgkHybridWidth-32.775*fgkmm;
155const Double_t AliITSv11GeometrySDD::fgkHybFLlowAmbX = fgkHybridWidth-20.791*fgkmm;
156const Double_t AliITSv11GeometrySDD::fgkHybChipsDZ = 9.221*fgkmm;
157const Double_t AliITSv11GeometrySDD::fgkHybPascalDX = 10.245*fgkmm;
158const Double_t AliITSv11GeometrySDD::fgkHybAmbraDX = 8.51*fgkmm;
159const Double_t AliITSv11GeometrySDD::fgkHybFLUpperWidth = 15.012*fgkmm;
160const Double_t AliITSv11GeometrySDD::fgkHybFLUpperLength = 59.878*fgkmm;
161const Double_t AliITSv11GeometrySDD::fgkHybFLUpperAlDZ = 11.183*fgkmm;
162const Double_t AliITSv11GeometrySDD::fgkHybFLUpperAldx = 2.307*fgkmm;
531d6cdc 163
9c8369f9 164const Double_t AliITSv11GeometrySDD::fgkHybCC2SensorLen = 12.000*fgkmm;
165const Double_t AliITSv11GeometrySDD::fgkHybCC2SensorWid = 1.490*fgkcm; //???
166const Double_t AliITSv11GeometrySDD::fgkHybCC2SensorAng = 40.0;
167
531d6cdc 168const Double_t AliITSv11GeometrySDD::fgkmu = 1*fgkmicron; // 1*fgkmicron; // can be increase for checking thin objects
b7943f00 169const Double_t AliITSv11GeometrySDD::fgkHybridThBridgeThick = 0.25*fgkmm; // ???
170const Double_t AliITSv11GeometrySDD::fgkHybAlThick = 30*fgkmu;
171const Double_t AliITSv11GeometrySDD::fgkHybUpThick = 20*fgkmu;
172const Double_t AliITSv11GeometrySDD::fgkHybGlueScrnThick = 50*fgkmu; // ??? ?????
173const Double_t AliITSv11GeometrySDD::fgkHybGlueLowThick = 90*fgkmu;
174const Double_t AliITSv11GeometrySDD::fgkHybGlueUpThick = 90*fgkmu; // sur ?????
175const Double_t AliITSv11GeometrySDD::fgkHybAlCCThick = 12*fgkmu;
176const Double_t AliITSv11GeometrySDD::fgkHybUpCCThick = 12*fgkmu;
177const Double_t AliITSv11GeometrySDD::fgkHybChipThick = 150*fgkmu;
178const Double_t AliITSv11GeometrySDD::fgkHybGlueAgThick = 50*fgkmu; // ??? ????
179const Double_t AliITSv11GeometrySDD::fgkHybUnderNiThick = 20*fgkmu; // ??? ????
180const Int_t AliITSv11GeometrySDD::fgkNHybSMD = 25;
181const Double_t AliITSv11GeometrySDD::fgkHybSMDposX[fgkNHybSMD] =
182 {2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,21.40*fgkmm,
183 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,19.91*fgkmm,
184 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,17.09*fgkmm,21.40*fgkmm,
185 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,19.91*fgkmm,
186 1.63*fgkmm,5.22*fgkmm,13.59*fgkmm,21.40*fgkmm};
187const Double_t AliITSv11GeometrySDD::fgkHybSMDposZ[fgkNHybSMD] =
188 { 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm,
189 17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,
190 32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,
191 47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,
192 62.68*fgkmm,62.06*fgkmm,62.06*fgkmm,62.06*fgkmm};
193const Double_t AliITSv11GeometrySDD::fgkHybSMDmiddleW = 0.954*fgkmm;
194const Double_t AliITSv11GeometrySDD::fgkHybSMDmiddleL = 0.47 *fgkmm;
195const Double_t AliITSv11GeometrySDD::fgkHybSMDendW = 1.132*fgkmm;
196const Double_t AliITSv11GeometrySDD::fgkHybSMDendL = 0.925*fgkmm;
197const Double_t AliITSv11GeometrySDD::fgkHybSMDheight = 400.*fgkmu; // ??? ????!!!!!!!
198
199const Double_t AliITSv11GeometrySDD::fgkWaferThickness = 300.*fgkmu;
200const Double_t AliITSv11GeometrySDD::fgkWaferWidth = 72.5 *fgkmm;
201const Double_t AliITSv11GeometrySDD::fgkWaferLength = 87.6 *fgkmm;
202const Double_t AliITSv11GeometrySDD::fgkWaferThickSens = 299.8*fgkmu;
203const Double_t AliITSv11GeometrySDD::fgkWaferWidthSens = 70.17*fgkmm;
03d34d83 204// 256 anodes times 294 microns of pitch
205const Double_t AliITSv11GeometrySDD::fgkWaferLengthSens = 256*294*fgkmicron;
b7943f00 206
207const Double_t AliITSv11GeometrySDD::fgkDigitCablWidth = 18.4*fgkmm;
208const Double_t AliITSv11GeometrySDD::fgkDigitCablAlThick = (30+30*8./10.)*fgkmicron; // will probably change
209const Double_t AliITSv11GeometrySDD::fgkDigitCablPolyThick = (20+12)*fgkmicron; // will probably change
210
211const Double_t AliITSv11GeometrySDD::fgkWaHVcableAlThick = 30*2./10.*fgkmu; // will probably change // Al ratio is random !!!
212const Double_t AliITSv11GeometrySDD::fgkWaHVcablePolyThick = 175*fgkmu; // will probably change
213const Double_t AliITSv11GeometrySDD::fgkWaHVcableLength = 67.08*fgkmm;
108bd0fe 214const Double_t AliITSv11GeometrySDD::fgkWaHVcableWitdh = 17.4*fgkmm; // check !!!
215const Double_t AliITSv11GeometrySDD::fgkWaHVcableDW = 5.24*fgkmm; //5.24*fgkmm;// check !!!
b7943f00 216
217const Double_t AliITSv11GeometrySDD::fgkSensorGlassLX = 5. *fgkmm;
218const Double_t AliITSv11GeometrySDD::fgkSensorGlassLZ = 5. *fgkmm;
219const Double_t AliITSv11GeometrySDD::fgkSensorGlassLY = 150. *fgkmu;
220const Double_t AliITSv11GeometrySDD::fgkGlassDXOnSensor = 26.28*fgkmm; // check !!!
221const Double_t AliITSv11GeometrySDD::fgkGlassDZOnSensor = 22.50*fgkmm; // check !!!
222
223const Double_t AliITSv11GeometrySDD::fgkTransitHVAlThick = 30*2./10.*fgkmu; // check // will probably change //Al ratio is random
224const Double_t AliITSv11GeometrySDD::fgkTransitHVPolyThick = 100*fgkmu; // check // will probably change
225const Double_t AliITSv11GeometrySDD::fgkTransitHVHeadLX = 71.46*fgkmm; // check !!!
226const Double_t AliITSv11GeometrySDD::fgkTransitHVHeadLZ = 21.3*fgkmm;
227const Double_t AliITSv11GeometrySDD::fgkTransitHVBondingLZ = 3.6*fgkmm;
228const Double_t AliITSv11GeometrySDD::fgkTransitHVtailLength = 27*fgkmm; // ???, not yet fixed ...
229const Double_t AliITSv11GeometrySDD::fgkTransitHVtailWidth = 26*fgkmm;
108bd0fe 230const Double_t AliITSv11GeometrySDD::fgkTransitHVtailXpos = 8*fgkmm; //8*fgkmm // ???, a mesurer !!!
b7943f00 231const Double_t AliITSv11GeometrySDD::fgkTransitHVsideLZ = 10.34*fgkmm;
232const Double_t AliITSv11GeometrySDD::fgkTransitHVsideLeftZ = 4.11*fgkmm;
233const Double_t AliITSv11GeometrySDD::fgkTransitHVsideRightZ = 3.5*fgkmm; // ???, a mesurer !!!
234
235const Double_t AliITSv11GeometrySDD::fgkLongHVcablePolyThick= (20+30+125+30+20+30+125+30+20)*fgkmu; // check // will probably change
236const Double_t AliITSv11GeometrySDD::fgkLongHVcableAlThick = (30+30*2/10+30)*fgkmu; // check // will probably change
237const Double_t AliITSv11GeometrySDD::fgkLongHVcableSeparation = 600*fgkmicron;
c789ee28 238
108bd0fe 239const Double_t AliITSv11GeometrySDD::fgkRubyDX = 14.*fgkmm;
240const Double_t AliITSv11GeometrySDD::fgkRubyZladd3 = 250*fgkmm;
241const Double_t AliITSv11GeometrySDD::fgkRubyZladd4 = 325*fgkmm;
242
243// the stesalite ladder foot at its end
effd7456 244const Double_t AliITSv11GeometrySDD::fgkLadFootX = 60.*fgkmm;
245const Double_t AliITSv11GeometrySDD::fgkLadFootZ = 20.*fgkmm;
246const Double_t AliITSv11GeometrySDD::fgkLadFootY = 8.*fgkmm;
108bd0fe 247const Double_t AliITSv11GeometrySDD::fgkLadFootMiddleY = 4.5*fgkmm;
effd7456 248const Double_t AliITSv11GeometrySDD::fgkLadBox1X = 23.*fgkmm;
249const Double_t AliITSv11GeometrySDD::fgkLadFingerPrintX = 6.*fgkmm;
250const Double_t AliITSv11GeometrySDD::fgkLadFingerPrintY = 1.*fgkmm;
108bd0fe 251const Double_t AliITSv11GeometrySDD::fgkLadFingerPrintBorder = 4.*fgkmm;
252const Double_t AliITSv11GeometrySDD::fgkRubyCageHoleZ = 8.*fgkmm;
253const Double_t AliITSv11GeometrySDD::fgkRubyCageHoleX = 9.*fgkmm;
254const Double_t AliITSv11GeometrySDD::fgkRubyCageHoleY = 6.5*fgkmm;
255const Double_t AliITSv11GeometrySDD::fgkRubyCageAxisShift = 0.5*fgkmm;
256const Double_t AliITSv11GeometrySDD::fgkScrewM4diam = 4.*fgkmm;
257
258const Double_t AliITSv11GeometrySDD::fgkRubyScrewShiftToCenterY = 0.1;
73dfc864 259const Double_t AliITSv11GeometrySDD::fgkRubyHoleDiam = 0.5;
108bd0fe 260
73dfc864 261// the U cooling pipe and its heat exchanger in end-ladder cards system
108bd0fe 262const Double_t AliITSv11GeometrySDD::fgkEndLadPipeUlengthLay3 = 138*fgkmm;
263const Double_t AliITSv11GeometrySDD::fgkEndLadPipeUlengthLay4 = 150*fgkmm;
264const Double_t AliITSv11GeometrySDD::fgkEndLadPipeUwidth = 59*fgkmm;
265const Double_t AliITSv11GeometrySDD::fgkEndLadPipeRadius = 5*fgkmm;
266const Double_t AliITSv11GeometrySDD::fgkEndLadPipeInnerDiam = 2.8*fgkmm;
267const Double_t AliITSv11GeometrySDD::fgkEndLadPipeOuterDiam = 3.*fgkmm;
268//--- The al body of the cooling syst.of the heat exchanger :
73dfc864 269const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmZLay3 = 112.*fgkmm; //
270const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmZLay4 = 125.*fgkmm; //
bf210566 271const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmX = 4.75*fgkmm; // the arms of the U cooling tube
73dfc864 272const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmY = 6.8*fgkmm;
273const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmBoxDY = 1.03*fgkmm; // shift in Y of the arms from the axis
bf210566 274const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmBoxDX = 0.125*fgkmm;// shift in X of the arms from the axis
275const Double_t AliITSv11GeometrySDD::fgkEndLadPipeArmZpos = 8.9*fgkmm; //
108bd0fe 276
277// LV card :
73dfc864 278const Double_t AliITSv11GeometrySDD::fgkLVcardX = 26.525*fgkmm;
279const Double_t AliITSv11GeometrySDD::fgkLVcardY = 44.95*fgkmm;
280const Double_t AliITSv11GeometrySDD::fgkLVcardZ = 1.*fgkmm; // all except Cu layer //???
281const Double_t AliITSv11GeometrySDD::fgkLVcardCuZ = 0.1*fgkmm; //???
effd7456 282
283const Double_t AliITSv11GeometrySDD::fgkLVChip0X = 16.525*fgkmm;
284const Double_t AliITSv11GeometrySDD::fgkLVChip0Y = 10.8*fgkmm;
285const Double_t AliITSv11GeometrySDD::fgkLVChip0Z = 3.5*fgkmm; // all except si layer //???
286const Double_t AliITSv11GeometrySDD::fgkLVChip0SiZ = 0.2*fgkmm; //???????????????????????????????????????????????????
287const Double_t AliITSv11GeometrySDD::fgkLVChip0PosX = 13.*fgkmm; //19.95*fgkmm; ???
288const Double_t AliITSv11GeometrySDD::fgkLVChip0PosY = 10.3*fgkmm;
289
290const Double_t AliITSv11GeometrySDD::fgkLVChip1X = 6.00*fgkmm;
291const Double_t AliITSv11GeometrySDD::fgkLVChip1Y = 6.00*fgkmm;
292const Double_t AliITSv11GeometrySDD::fgkLVChip1Z = 1*fgkmm; // ???
293const Double_t AliITSv11GeometrySDD::fgkLVChip1SiZ = 0.2*fgkmm; // ???
294const Double_t AliITSv11GeometrySDD::fgkLVChip1PosX = 18.*fgkmm;
295const Double_t AliITSv11GeometrySDD::fgkLVChip1PosY = 27.6*fgkmm;
296
297const Double_t AliITSv11GeometrySDD::fgkLVChip2X = 6.00*fgkmm;
298const Double_t AliITSv11GeometrySDD::fgkLVChip2Y = 6.00*fgkmm;
299const Double_t AliITSv11GeometrySDD::fgkLVChip2Z = 1*fgkmm; // ???
300const Double_t AliITSv11GeometrySDD::fgkLVChip2SiZ = 0.2*fgkmm; //???
301const Double_t AliITSv11GeometrySDD::fgkLVChip2PosX = 18.0*fgkmm;
302const Double_t AliITSv11GeometrySDD::fgkLVChip2PosY = 39.0*fgkmm;
303
304const Double_t AliITSv11GeometrySDD::fgkLVChip3X = 4.01*fgkmm;
305const Double_t AliITSv11GeometrySDD::fgkLVChip3Y = 4.01*fgkmm;
306const Double_t AliITSv11GeometrySDD::fgkLVChip3Z = 1*fgkmm; // ???
307const Double_t AliITSv11GeometrySDD::fgkLVChip3SiZ = 0.2*fgkmm;
308const Double_t AliITSv11GeometrySDD::fgkLVChip3PosX = 20.7*fgkmm;
309const Double_t AliITSv11GeometrySDD::fgkLVChip3PosY = 21.4*fgkmm;
310
73dfc864 311const Double_t AliITSv11GeometrySDD::fgkLVcoolX1 = 17.25*fgkmm;
312const Double_t AliITSv11GeometrySDD::fgkLVcoolY1 = 8.7*fgkmm;
313const Double_t AliITSv11GeometrySDD::fgkLVcoolZ1 = 1.*fgkmm;
effd7456 314
73dfc864 315const Double_t AliITSv11GeometrySDD::fgkLVcoolX2 = 3.5*fgkmm;
316const Double_t AliITSv11GeometrySDD::fgkLVcoolY2 = 8.7*fgkmm;
317const Double_t AliITSv11GeometrySDD::fgkLVcoolZ2 = 2.3*fgkmm;
effd7456 318
73dfc864 319const Double_t AliITSv11GeometrySDD::fgkLVcoolX3 = 4.75*fgkmm;
320const Double_t AliITSv11GeometrySDD::fgkLVcoolY3 = 3.1*fgkmm; //+0.1=glue
108bd0fe 321const Double_t AliITSv11GeometrySDD::fgkLVcoolPosY = 6.5*fgkmm;
322
323// HV card :
324const Double_t AliITSv11GeometrySDD::fgkHVCardCeramX = 54.01*fgkmm;
325const Double_t AliITSv11GeometrySDD::fgkHVCardCeramY = 40.89*fgkmm;
326const Double_t AliITSv11GeometrySDD::fgkHVCardCeramZ = 0.7*fgkmm; // ???
327
328const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1X = 6.8*fgkmm;
329const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1Z = 1.*fgkmm; // ???
330const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1Ymid = 4.1*fgkmm;
331const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1Yend = 0.95*fgkmm; // doesn't take into account the soldering
332const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1PosX = 13.1*fgkmm;
333const Double_t AliITSv11GeometrySDD::fgkHVCardCapa1PosY = 14.5*fgkmm;
334
335const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2X = 6.8*fgkmm;
336const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2Z = 1.*fgkmm; // ???
337const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2Ymid = 2.9*fgkmm;
338const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2Yend = 0.95*fgkmm;
339const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2PosX = -12.6*fgkmm;
340const Double_t AliITSv11GeometrySDD::fgkHVCardCapa2PosY = 16.54*fgkmm;
341
342const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Xmid = 3.0*fgkmm;
343const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Xend = 0.91*fgkmm;
344const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Z = 2.*fgkmm; // ???
345const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3Y = 3.43*fgkmm;
346
347const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX1 = 14.6*fgkmm;
348const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX2 = 7.2*fgkmm;
349const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX3 = 2.52*fgkmm;
350const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX4 = -4.96*fgkmm;
351const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosX5 = -13.82*fgkmm;
352const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosY1 = 6.27*fgkmm;
353const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosY2 = 0.7*fgkmm;
354const Double_t AliITSv11GeometrySDD::fgkHVCardCapa3PosY3 = 9.1*fgkmm;
355
356const Double_t AliITSv11GeometrySDD::fgkHVCardCool1X = 14.*fgkmm;
357const Double_t AliITSv11GeometrySDD::fgkHVCardCool1Y = 9.5*fgkmm;
358const Double_t AliITSv11GeometrySDD::fgkHVCardCool1Z = 2.*fgkmm;
359const Double_t AliITSv11GeometrySDD::fgkHVCardCool2X = 14.25*fgkmm;
360const Double_t AliITSv11GeometrySDD::fgkHVCardCool2Y = 3.5*fgkmm;
361const Double_t AliITSv11GeometrySDD::fgkHVCardCool2Z = 4.5*fgkmm;
362const Double_t AliITSv11GeometrySDD::fgkHVCardCool3X = 4.5*fgkmm;
363const Double_t AliITSv11GeometrySDD::fgkHVCardCool3Y = 3.5*fgkmm;
364const Double_t AliITSv11GeometrySDD::fgkHVCardCool3Z = 7.2*fgkmm;
365const Double_t AliITSv11GeometrySDD::fgkHVCardCoolDY = 6.*fgkmm;
366
73dfc864 367const Double_t AliITSv11GeometrySDD::fgkCarlosSuppX1 = 19.5*fgkmm;
368const Double_t AliITSv11GeometrySDD::fgkCarlosSuppY1 = 2*fgkmm;
369const Double_t AliITSv11GeometrySDD::fgkCarlosSuppX2 = 35.*fgkmm;
370const Double_t AliITSv11GeometrySDD::fgkCarlosSuppY2 = 3.9*fgkmm;
371const Double_t AliITSv11GeometrySDD::fgkCarlosSuppZ = 17.*fgkmm;
372const Double_t AliITSv11GeometrySDD::fgkCarlosSuppAngle = 45;
373const Double_t AliITSv11GeometrySDD::fgkCarlosSuppX3 = 4.5*fgkmm;
374const Double_t AliITSv11GeometrySDD::fgkCarlosSuppY3 = 3.*fgkmm;
375const Double_t AliITSv11GeometrySDD::fgkCarlosSuppZ3 = 12.*fgkmm;
108bd0fe 376const Double_t AliITSv11GeometrySDD::fgkCarlosSuppTopLen = 8.65*fgkmm;
377
73dfc864 378// screws fixing boards to the end-ladder on the U tube
379const Double_t AliITSv11GeometrySDD::fgkLittleScrewHeadR = 1.85*fgkmm;
380const Double_t AliITSv11GeometrySDD::fgkLittleScrewHeadH = 1.5*fgkmm;
381const Double_t AliITSv11GeometrySDD::fgkLittleScrewR = 0.7*fgkmm;
382const Double_t AliITSv11GeometrySDD::fgkShiftLittleScrewLV = 3*fgkmm; // ???
383const Double_t AliITSv11GeometrySDD::fgkLittleLVScrewHeadR = 1.2*fgkmm; // ???
384
385// CARLOS board
386const Double_t AliITSv11GeometrySDD::fgkCarlosCardX1 = (25.50+28.50)*fgkmm; // length (first part of Carlos card)
387const Double_t AliITSv11GeometrySDD::fgkCarlosCardY1 = 1.6*fgkmm; // thickness
388const Double_t AliITSv11GeometrySDD::fgkCarlosCardZ1 = 40.8*fgkmm; // width
389const Double_t AliITSv11GeometrySDD::fgkCarlosCardCuY = 0.1*fgkmm; // thickness of Cu layer (strips)
390const Double_t AliITSv11GeometrySDD::fgkCarlosCardX2 = 25.50*fgkmm; // length (2nd part of Carlos card)
391const Double_t AliITSv11GeometrySDD::fgkCarlosCardZ2 = 8.20*fgkmm; // width
392
393const Double_t AliITSv11GeometrySDD::fgkCarlosCardChipSiThick = 0.1*fgkmm; // ??? idem for all chips ???
394const Double_t AliITSv11GeometrySDD::fgkCarlosCardShift = 9*fgkmm; // ??? shift in z w.r.t. heat bridge
395
396// size and position of various chips on carlos end-ladder board
397const Double_t AliITSv11GeometrySDD::fgkCarlosU1X = 13*fgkmm;
398const Double_t AliITSv11GeometrySDD::fgkCarlosU1Y = 1.68*fgkmm;
399const Double_t AliITSv11GeometrySDD::fgkCarlosU1Z = 13*fgkmm;
400const Double_t AliITSv11GeometrySDD::fgkCarlosU1posX = 18.4*fgkmm;
401const Double_t AliITSv11GeometrySDD::fgkCarlosU1posZ = -7.2*fgkmm;
402
403const Double_t AliITSv11GeometrySDD::fgkCarlosU2X = 13.75*fgkmm;
404const Double_t AliITSv11GeometrySDD::fgkCarlosU2Y = 1.60*fgkmm;
405const Double_t AliITSv11GeometrySDD::fgkCarlosU2Z = 13.85*fgkmm;
406const Double_t AliITSv11GeometrySDD::fgkCarlosU2posX = -0.375*fgkmm;
407const Double_t AliITSv11GeometrySDD::fgkCarlosU2posZ = -9.725*fgkmm;
408
409const Double_t AliITSv11GeometrySDD::fgkCarlosU3X = 5*fgkmm;
410const Double_t AliITSv11GeometrySDD::fgkCarlosU3Y = 1.*fgkmm;
411const Double_t AliITSv11GeometrySDD::fgkCarlosU3Z = 5*fgkmm;
412const Double_t AliITSv11GeometrySDD::fgkCarlosU3posX = 6.4*fgkmm;
413const Double_t AliITSv11GeometrySDD::fgkCarlosU3posZ = 9.9*fgkmm;
414
415// U4 like U3
416const Double_t AliITSv11GeometrySDD::fgkCarlosU4posX = -12*fgkmm;
417const Double_t AliITSv11GeometrySDD::fgkCarlosU4posZ = 3.6*fgkmm;
418
419const Double_t AliITSv11GeometrySDD::fgkCarlosU17X = 16*fgkmm;
420const Double_t AliITSv11GeometrySDD::fgkCarlosU17Y = 3.5*fgkmm;
421const Double_t AliITSv11GeometrySDD::fgkCarlosU17Z = 10.9*fgkmm;
422const Double_t AliITSv11GeometrySDD::fgkCarlosU17posX = -17.84*fgkmm;
423const Double_t AliITSv11GeometrySDD::fgkCarlosU17posZ = -10.95*fgkmm;
424
425const Double_t AliITSv11GeometrySDD::fgkCarlosU35X = 4*fgkmm;
426const Double_t AliITSv11GeometrySDD::fgkCarlosU35Y = 1.*fgkmm;
427const Double_t AliITSv11GeometrySDD::fgkCarlosU35Z = 4*fgkmm;
428const Double_t AliITSv11GeometrySDD::fgkCarlosU35posX = -21.6*fgkmm;
429const Double_t AliITSv11GeometrySDD::fgkCarlosU35posZ = 2.3*fgkmm;
430
431const Double_t AliITSv11GeometrySDD::fgkCarlosU36X = 6*fgkmm;
432const Double_t AliITSv11GeometrySDD::fgkCarlosU36Y = 1.*fgkmm;
433const Double_t AliITSv11GeometrySDD::fgkCarlosU36Z = 6*fgkmm;
434const Double_t AliITSv11GeometrySDD::fgkCarlosU36posX = -21.6*fgkmm;
435const Double_t AliITSv11GeometrySDD::fgkCarlosU36posZ = 9.6*fgkmm;
436
437const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1X = 8*fgkmm;
438const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1Y = 1.7*fgkmm; // look thicker than design number (0.7) ! ???
439const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1Z = 3.7*fgkmm;
440const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1posX = -12*fgkmm;
441const Double_t AliITSv11GeometrySDD::fgkCarlosQZ1posZ = 10.6*fgkmm;
442
443// distance from the heat bridge center to the card center :
444const Double_t AliITSv11GeometrySDD::fgkCarlosCard2HeatBridge = fgkCarlosSuppY2/2+fgkCarlosCardY1/2+fgkCarlosU1Y+0.1*fgkmm;
445
446// some pieces at the end of the carbon fiber ladder
447 const Double_t AliITSv11GeometrySDD::fgkCoolPipeLay3Len = 467.*fgkmm; // ???
448 const Double_t AliITSv11GeometrySDD::fgkCoolPipeLay4Len = 616.*fgkmm; // ???
449 const Double_t AliITSv11GeometrySDD::fgkHVguideX1 = 42.5*fgkmm;
450 const Double_t AliITSv11GeometrySDD::fgkHVguideY1 = 7.*fgkmm;
451 const Double_t AliITSv11GeometrySDD::fgkHVguideZ1 = 10.*fgkmm;
452 const Double_t AliITSv11GeometrySDD::fgkHVguideZ2 = 6.*fgkmm;
453 const Double_t AliITSv11GeometrySDD::fgkHVguideDX = -8.5*fgkmm;
454 const Double_t AliITSv11GeometrySDD::fgkHVguideSuppFullZ = 37.5*fgkmm;
455
456// Cooling connector between phynox and plastic cooling water tubes
457const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeRmin = 1 *fgkmm;
458const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeR1 = 2.5*fgkmm; // ???
459const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeL1 = 3.*fgkmm; // ???
460const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeR2 = 3.5*fgkmm; // ???
461const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeL2 = 2.*fgkmm; // ???
462const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeR3 = 3.*fgkmm; // ???
463const Double_t AliITSv11GeometrySDD::fgkConnectorCoolTubeL3 = 5 *fgkmm; // ???
108bd0fe 464
c789ee28 465
e118532f 466// parameters for coding SDD cables on SDD and SSD cones
467const Double_t AliITSv11GeometrySDD::fgkSectionCuPerMod = 3*2*0.006 + 3*2*0.0005 + 2*0.002;
468// copper : LV + signal + HV(HV ???)
469const Double_t AliITSv11GeometrySDD::fgkSectionPlastPerMod = (TMath::Pi()*(3*0.36*0.36/4 + 3*0.21*0.21/4 + 2*0.115*0.115/4)
470 - fgkSectionCuPerMod);
471
472const Double_t AliITSv11GeometrySDD::fgkSectionGlassPerMod = 3*0.006; // ???
c890eba4 473const Double_t AliITSv11GeometrySDD::fgkSectionCoolPolyuEL = 0.4672;
474const Double_t AliITSv11GeometrySDD::fgkSectionCoolWaterEL = 0.3496;
d485d5bf 475const Double_t AliITSv11GeometrySDD::fgkEndLadderEarthCableR = 0.5*fgkmm;
e118532f 476// (sections are given in cm square)
477const Double_t AliITSv11GeometrySDD::fgkCableBendRatio = 1.3; // ??? this factor account for the bending of cables
9c8369f9 478const Double_t AliITSv11GeometrySDD::fgkHybridAlFoilThick = 0.1*fgkmm; // Thickness of Al foil on hybrid side - TO BE CHECKED
479const Double_t AliITSv11GeometrySDD::fgkHybridAlFoilWide = 4.2*fgkmm; // Width of Al foil on hybrid side - from digitCableA
480const Double_t AliITSv11GeometrySDD::fgkHybridAlFoilSide = 2.0*fgkmm; // Side length of Al foil on hybrid side
e118532f 481
482const Double_t AliITSv11GeometrySDD::fgkConeSDDr1 = 11.87574*fgkcm;
483const Double_t AliITSv11GeometrySDD::fgkConeSDDr2 = 26.07574*fgkcm;
484const Double_t AliITSv11GeometrySDD::fgkConeSDDz1 = 3.36066*fgkcm + 186.0*fgkmm + 0.5*790.0*fgkmm - 19.18934*fgkcm - 1.6;
485const Double_t AliITSv11GeometrySDD::fgkConeSDDz2 = 17.56066*fgkcm + 186.0*fgkmm + 0.5*790.0*fgkmm - 19.18934*fgkcm - 1.6;
486// These last parameters come from cone's code and define the slope
487// and position of the SDD cone end. For some unknown reason, this doesn't
488// allow to stick on the SDD cone. This has to be checked when a correct
489// version of the cone is available ... For now 'm applying some approximative
490// corrections
491
492const Double_t AliITSv11GeometrySDD::fgkSDDCableR1 = 16*fgkcm; // ??? // part 1 of "cable cone"
493const Double_t AliITSv11GeometrySDD::fgkSDDCableR2 = 23*fgkcm; // ??? // part 1/2 of "cable cone"
494const Double_t AliITSv11GeometrySDD::fgkSDDCableR3 = 26*fgkcm; // ??? // part 2 of "cable cone"
495
496const Double_t AliITSv11GeometrySDD::fgkSDDCableDZint = 3.5*fgkcm;
497const Double_t AliITSv11GeometrySDD::fgkSDDCableR5 = 37*fgkcm; // third part of "cable cone"
498const Double_t AliITSv11GeometrySDD::fgkSDDCableZ5 = 65*fgkcm; // third part of "cable cone"
499
500
501
502
503
504
505
b7943f00 506ClassImp(AliITSv11GeometrySDD)
c789ee28 507
b7943f00 508//________________________________________________________________________
33ddec7d 509AliITSv11GeometrySDD::AliITSv11GeometrySDD():
510 AliITSv11Geometry(),
511 fPinSupport(0),
512 fCoolPipeSupportL(0),
513 fCoolPipeSupportR(0),
108bd0fe 514 fSDDsensor3(0),
515 fSDDsensor4(0),
33ddec7d 516 fBaseThermalBridge(0),
517 fHybrid(0),
c103592b 518 fLadderFoot(0),
73dfc864 519 fCardLVR(0),
520 fCardLVL(0),
521 fCardHV(0),
522 fCardCarlos(0),
523 fRaccordoL(0),
33ddec7d 524 fDigitCableLay3A(0),
525 fDigitCableLay3B(0),
526 fDigitCableLay4A(0),
527 fDigitCableLay4B(0),
528 fMotherVol(0),
529 fAddHybrids(kTRUE),
530 fAddSensors(kTRUE),
531 fAddHVcables(kTRUE),
532 fAddCables(kTRUE),
533 fAddCoolingSyst(kTRUE),
534 fCoolingOn(kTRUE),
535 fAddOnlyLadder3min(-1),
536 fAddOnlyLadder3max(-1),
537 fAddOnlyLadder4min(-1),
538 fAddOnlyLadder4max(-1),
108bd0fe 539 fColorCarbonFiber(4),
540 fColorRyton(5),
541 fColorPhynox(7),
542 fColorSilicon(3),
543 fColorAl(7),
544 fColorPolyhamide(5),
33ddec7d 545 fColorGlass(2),
108bd0fe 546 fColorSMD(12),
547 fColorSMDweld(17),
548 fColorStesalite(20),
33ddec7d 549 fLay3LadderUnderSegDH(0),
550 fLay4LadderUnderSegDH(0),
551 fLay3LaddShortRadius(0),
552 fLay3LaddLongRadius(0),
553 fLay4LaddShortRadius(0),
554 fLay4LaddLongRadius(0)
c789ee28 555{
b7943f00 556 //
557 // Standard constructor
558 //
d8aa7e17 559 fCommonVol[0] = NULL;
560 fCommonVol[1] = NULL;
561 fCommonTr[0] = NULL;
562 fCommonTr[1] = NULL;
563 for (Int_t i=0; i<fgkNladdSegCommonVol; i++){
564 fLaddSegCommonVol[i] = NULL;
565 fLaddSegCommonTr[i] = NULL;
566 }
b7943f00 567 SetParameters();
531d6cdc 568}
c789ee28 569
108bd0fe 570
b7943f00 571//________________________________________________________________________
572AliITSv11GeometrySDD::AliITSv11GeometrySDD(Int_t debug) :
33ddec7d 573 AliITSv11Geometry(debug),
574 fPinSupport(0),
575 fCoolPipeSupportL(0),
576 fCoolPipeSupportR(0),
108bd0fe 577 fSDDsensor3(0),
578 fSDDsensor4(0),
33ddec7d 579 fBaseThermalBridge(0),
580 fHybrid(0),
c103592b 581 fLadderFoot(0),
73dfc864 582 fCardLVR(0),
583 fCardLVL(0),
584 fCardHV(0),
585 fCardCarlos(0),
586 fRaccordoL(0),
33ddec7d 587 fDigitCableLay3A(0),
588 fDigitCableLay3B(0),
589 fDigitCableLay4A(0),
590 fDigitCableLay4B(0),
591 fMotherVol(0),
592 fAddHybrids(kTRUE),
593 fAddSensors(kTRUE),
594 fAddHVcables(kTRUE),
595 fAddCables(kTRUE),
596 fAddCoolingSyst(kTRUE),
b7943f00 597 fCoolingOn(kTRUE),
33ddec7d 598 fAddOnlyLadder3min(-1),
599 fAddOnlyLadder3max(-1),
600 fAddOnlyLadder4min(-1),
601 fAddOnlyLadder4max(-1),
108bd0fe 602 fColorCarbonFiber(4),
603 fColorRyton(5),
604 fColorPhynox(7),
605 fColorSilicon(3),
606 fColorAl(7),
607 fColorPolyhamide(5),
33ddec7d 608 fColorGlass(2),
108bd0fe 609 fColorSMD(12),
610 fColorSMDweld(17),
611 fColorStesalite(20),
33ddec7d 612 fLay3LadderUnderSegDH(0),
613 fLay4LadderUnderSegDH(0),
614 fLay3LaddShortRadius(0),
615 fLay3LaddLongRadius(0),
616 fLay4LaddShortRadius(0),
617 fLay4LaddLongRadius(0)
c789ee28 618{
b7943f00 619 //
620 // Constructor setting debugging level
621 //
d8aa7e17 622 fCommonVol[0] = NULL;
623 fCommonVol[1] = NULL;
624 fCommonTr[0] = NULL;
625 fCommonTr[1] = NULL;
626 for (Int_t i=0; i<fgkNladdSegCommonVol; i++){
627 fLaddSegCommonVol[i] = NULL;
628 fLaddSegCommonTr[i] = NULL;
629 }
b7943f00 630 SetParameters();
531d6cdc 631}
c789ee28 632
c789ee28 633//________________________________________________________________________
b7943f00 634AliITSv11GeometrySDD::AliITSv11GeometrySDD(const AliITSv11GeometrySDD &s) :
108bd0fe 635 AliITSv11Geometry(s.GetDebug()),
33ddec7d 636 fPinSupport(s.fPinSupport),
637 fCoolPipeSupportL(s.fCoolPipeSupportL),
638 fCoolPipeSupportR(s.fCoolPipeSupportR),
108bd0fe 639 fSDDsensor3(s.fSDDsensor3),
640 fSDDsensor4(s.fSDDsensor4),
33ddec7d 641 fBaseThermalBridge(s.fBaseThermalBridge),
642 fHybrid(s.fHybrid),
c103592b 643 fLadderFoot(s.fLadderFoot),
73dfc864 644 fCardLVR(s.fCardLVR),
645 fCardLVL(s.fCardLVL),
646 fCardHV(s.fCardHV),
647 fCardCarlos(s.fCardCarlos),
648 fRaccordoL(s.fRaccordoL),
33ddec7d 649 fDigitCableLay3A(s.fDigitCableLay3A),
650 fDigitCableLay3B(s.fDigitCableLay3B),
651 fDigitCableLay4A(s.fDigitCableLay4A),
652 fDigitCableLay4B(s.fDigitCableLay4B),
653 fMotherVol(s.fMotherVol),
654 fAddHybrids(s.fAddHybrids),
655 fAddSensors(s.fAddSensors),
656 fAddHVcables(s.fAddHVcables),
657 fAddCables(s.fAddCables),
658 fAddCoolingSyst(s.fAddCoolingSyst),
659 fCoolingOn(s.fCoolingOn),
660 fAddOnlyLadder3min(s.fAddOnlyLadder3min),
661 fAddOnlyLadder3max(s.fAddOnlyLadder3max),
662 fAddOnlyLadder4min(s.fAddOnlyLadder4min),
108bd0fe 663 fAddOnlyLadder4max(s.fAddOnlyLadder4max),
33ddec7d 664 fColorCarbonFiber(s.fColorCarbonFiber),
665 fColorRyton(s.fColorRyton),
666 fColorPhynox(s.fColorPhynox),
667 fColorSilicon(s.fColorSilicon),
668 fColorAl(s.fColorAl),
669 fColorPolyhamide(s.fColorPolyhamide),
670 fColorGlass(s.fColorGlass),
671 fColorSMD(s.fColorSMD),
672 fColorSMDweld(s.fColorSMDweld),
108bd0fe 673 fColorStesalite(s.fColorStesalite),
33ddec7d 674 fLay3LadderUnderSegDH(s.fLay3LadderUnderSegDH),
675 fLay4LadderUnderSegDH(s.fLay4LadderUnderSegDH),
676 fLay3LaddShortRadius(s.fLay3LaddShortRadius),
677 fLay3LaddLongRadius(s.fLay3LaddLongRadius),
678 fLay4LaddShortRadius(s.fLay4LaddShortRadius),
679 fLay4LaddLongRadius(s.fLay4LaddLongRadius)
b7943f00 680{
33ddec7d 681 // Copy Constructor
682 // do only a "shallow copy" ...
d8aa7e17 683 fCommonVol[0] = s.fCommonVol[0];
684 fCommonVol[1] = s.fCommonVol[1];
685 fCommonTr[0] = s.fCommonTr[0];
686 fCommonTr[1] = s.fCommonTr[1];
687 for (Int_t i=0; i<fgkNladdSegCommonVol; i++){
688 fLaddSegCommonVol[i] = s.fLaddSegCommonVol[i];
689 fLaddSegCommonTr[i] = s.fLaddSegCommonTr[i];
690 }
b7943f00 691 SetParameters();
692}
c789ee28 693
b7943f00 694//________________________________________________________________________
695AliITSv11GeometrySDD& AliITSv11GeometrySDD::
696operator=(const AliITSv11GeometrySDD &s) {
697 // Assignment operator
698 if(&s == this) return *this;
699 fMotherVol = s.fMotherVol;
700 fAddHybrids = s.fAddHybrids;
701 fAddSensors = s.fAddSensors;
702 fAddHVcables = s.fAddHVcables;
703 fAddCables = s.fAddCables;
704 fAddCoolingSyst = s.fAddCoolingSyst;
705 fCoolingOn = s.fCoolingOn;
706 fAddOnlyLadder3min = s.fAddOnlyLadder3min;
707 fAddOnlyLadder3max = s.fAddOnlyLadder3max;
708 fAddOnlyLadder4min = s.fAddOnlyLadder4min;
709 fAddOnlyLadder4max = s.fAddOnlyLadder4max;
710 return *this;
711}
db486a6e 712
c789ee28 713//________________________________________________________________________
b7943f00 714AliITSv11GeometrySDD::~AliITSv11GeometrySDD() {
715 // Look like a destructor
716 // Smell like a destructor
717 // And actually is the destructor
718 if (fDigitCableLay3A) delete [] fDigitCableLay3A;
719 if (fDigitCableLay3B) delete [] fDigitCableLay3B;
720 if (fDigitCableLay4A) delete [] fDigitCableLay4A;
721 if (fDigitCableLay4B) delete [] fDigitCableLay4B;
531d6cdc 722}
c789ee28 723
c789ee28 724//________________________________________________________________________
b7943f00 725void AliITSv11GeometrySDD::SetParameters() {
726 //
727 // Define display colors and the non constant geometry parameters
728 //
729
b7943f00 730 Double_t detLadderDist = 8*fgkmm;
731
732 fLay3LadderUnderSegDH = detLadderDist - (fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
733 fLay4LadderUnderSegDH = detLadderDist - (fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
734
735 // radius from the center to the CF ladder :
736 fLay3LaddShortRadius = (fgkLay3DetShortRadius
737 + fgkLadWaferSep+2*fgkWaferThickness
738 + detLadderDist);
739 fLay3LaddLongRadius = (fgkLay3DetLongRadius
740 + fgkLadWaferSep+2*fgkWaferThickness
741 + detLadderDist);
742 fLay4LaddShortRadius = (fgkLay4DetShortRadius
743 + fgkLadWaferSep+2*fgkWaferThickness
744 + detLadderDist);
745 fLay4LaddLongRadius = (fgkLay4DetLongRadius
746 + fgkLadWaferSep+2*fgkWaferThickness
747 + detLadderDist);
c789ee28 748
749 fLay3sensorZPos[0]= ( 35.8+72.4+75.8 )*fgkmm;
750 fLay3sensorZPos[1]= ( 35.8+72.4 )*fgkmm;
751 fLay3sensorZPos[2]= ( 35.8 )*fgkmm;
752 fLay3sensorZPos[3]= ( -37.9 )*fgkmm;
753 fLay3sensorZPos[4]= ( -37.9-74.9 )*fgkmm;
754 fLay3sensorZPos[5]= ( -37.9-74.9-71.1 )*fgkmm;
755
756 fLay4sensorZPos[0] = ( 38.5+73.2+75.4+71.6 )*fgkmm;
757 fLay4sensorZPos[1] = ( 38.5+73.2+75.4 )*fgkmm;
758 fLay4sensorZPos[2] = ( 38.5+73.2 )*fgkmm;
759 fLay4sensorZPos[3] = ( 38.5 )*fgkmm;
760 fLay4sensorZPos[4] = ( -35.6 )*fgkmm;
761 fLay4sensorZPos[5] = ( -35.6-74.8 )*fgkmm;
762 fLay4sensorZPos[6] = ( -35.6-74.8-72.4 )*fgkmm;
763 fLay4sensorZPos[7] = ( -35.6-74.8-72.4-76. )*fgkmm;
531d6cdc 764}
765
c789ee28 766
c789ee28 767//________________________________________________________________________
b7943f00 768TGeoMedium* AliITSv11GeometrySDD::GetMedium(const char* mediumName) {
769 //
770 // Called to get a medium, checks that it exists.
771 // If not, prints an error and returns 0
772 //
c789ee28 773
531d6cdc 774 char ch[30];
6932f314 775 snprintf(ch, 30, "ITS_%s",mediumName);
531d6cdc 776 TGeoMedium* medium = gGeoManager->GetMedium(ch);
b7943f00 777 if (! medium)
778 printf("Error(AliITSv11GeometrySDD)::medium %s not found !\n", mediumName);
b7943f00 779 return medium;
531d6cdc 780}
781
c789ee28 782
b7943f00 783//________________________________________________________________________
fa4639a3 784Int_t AliITSv11GeometrySDD::GetLay3NLadders() const{
785 // Get the actual number of ladder in layer 3
786 if ( (fAddOnlyLadder3min<0) ||
787 (fAddOnlyLadder3min >= fgkLay3Nladd) ||
788 (fAddOnlyLadder3max<0) ||
789 (fAddOnlyLadder3max >= fgkLay3Nladd) )
790 return fgkLay3Nladd;
791 else return (fAddOnlyLadder3max-fAddOnlyLadder3min+1);
792}
793
531d6cdc 794
fa4639a3 795//________________________________________________________________________
796Int_t AliITSv11GeometrySDD::GetLay4NLadders() const{
797 // Get the actual number of ladder in layer 4
798 if ( (fAddOnlyLadder4min<0) ||
799 (fAddOnlyLadder4min >= fgkLay4Nladd) ||
800 (fAddOnlyLadder4max<0) ||
801 (fAddOnlyLadder4max >= fgkLay4Nladd) )
802 return fgkLay4Nladd;
803 else return (fAddOnlyLadder4max-fAddOnlyLadder4min+1);
804}
805
531d6cdc 806
fa4639a3 807//________________________________________________________________________
b7943f00 808void AliITSv11GeometrySDD::CreateBasicObjects() {
809 //
810 // Create basics objets which will be assembled together
811 // in Layer3 and Layer4 functions
812 //
813
531d6cdc 814
fa4639a3 815 fDigitCableLay3A = new AliITSv11GeomCableFlat[fgkLay3Ndet];
816 fDigitCableLay3B = new AliITSv11GeomCableFlat[fgkLay3Ndet];
817 fDigitCableLay4A = new AliITSv11GeomCableFlat[fgkLay4Ndet];
818 fDigitCableLay4B = new AliITSv11GeomCableFlat[fgkLay4Ndet];
819
b7943f00 820 fPinSupport = CreatePinSupport();
821 fCoolPipeSupportL = CreateCoolPipeSupportL();
822 fCoolPipeSupportR = CreateCoolPipeSupportR();
108bd0fe 823 CreateSDDsensor();
b7943f00 824 fBaseThermalBridge = CreateBaseThermalBridge();
825 fHybrid = CreateHybrid(0);
826
108bd0fe 827 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDD C AL (M55J)$"); //ITSsddCarbonM55J
73dfc864 828 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$");//ITSsddKAPTON_POLYCH2
829 TGeoMedium *alSDD = GetMedium("AL$"); //ITSal
9c8369f9 830 TGeoMedium *stainless = GetMedium("AISI304L$"); // for screws
73dfc864 831 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
9c8369f9 832 TGeoMedium *raccordMedium = GetMedium("INOX$"); // same as AISI 316-L
b7943f00 833
834 //********************************************************************
835 // pieces of the carbon fiber structure
836 //********************************************************************
837 Double_t dy = fgkLadderSegBoxDH/2;
838 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
839 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
840 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
841 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
842 Double_t dYTranslation = (fgkLadderHeight/2.
843 -0.5*fgkLadderWidth*TMath::Tan(beta)
844 -fgkLadderBeamRadius);
845 Double_t distCenterSideDown = 0.5*fgkLadderWidth/TMath::Cos(beta);
846
847 //--- the top V of the Carbon Fiber Ladder (segment)
8f20b5e4 848 TGeoArb8 *cfLaddTop1 = CreateLadderSide( "CFladdTopCornerVol1shape",
849 fgkSegmentLength/2., halfTheta,
b7943f00 850 -1, fgkLadderLa, fgkLadderHa, fgkLadderl);
851 TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1",
852 cfLaddTop1,carbonFiberLadderStruct);
8f20b5e4 853 TGeoArb8 *cfLaddTop2 = CreateLadderSide( "CFladdTopCornerVol2shape",
854 fgkSegmentLength/2., halfTheta,
b7943f00 855 1, fgkLadderLa, fgkLadderHa, fgkLadderl);
856 TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerVol2",
857 cfLaddTop2, carbonFiberLadderStruct);
858 cfLaddTopVol1->SetLineColor(fColorCarbonFiber);
859 cfLaddTopVol2->SetLineColor(fColorCarbonFiber);
860 TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2-dy, 0);
861
862 //--- the 2 side V
8f20b5e4 863 TGeoArb8 *cfLaddSide1 = CreateLadderSide( "CFladdSideCornerVol1shape",
864 fgkSegmentLength/2., beta, -1,
b7943f00 865 fgkLadderLb, fgkLadderHb, fgkLadderl);
866 TGeoVolume *cfLaddSideVol1 = new TGeoVolume( "ITSsddCFladdSideCornerVol1",
867 cfLaddSide1,carbonFiberLadderStruct);
8f20b5e4 868 TGeoArb8 *cfLaddSide2 = CreateLadderSide( "CFladdSideCornerVol2shape",
869 fgkSegmentLength/2., beta, 1,
b7943f00 870 fgkLadderLb, fgkLadderHb, fgkLadderl);
871 TGeoVolume *cfLaddSideVol2 = new TGeoVolume( "ITSsddCFladdSideCornerVol2",
872 cfLaddSide2,carbonFiberLadderStruct);
873 cfLaddSideVol1->SetLineColor(fColorCarbonFiber);
874 cfLaddSideVol2->SetLineColor(fColorCarbonFiber);
875 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,
876 alpha*TMath::RadToDeg());
877 AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation-dy, 0);
878 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0,
879 -alpha*TMath::RadToDeg());
880 AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation-dy, 0);
881
882 //--- The beams
883 // Beams on the sides
884 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*
885 TMath::Sin(2*beta)/(TanD(fgkBeamSidePhi)*TanD(fgkBeamSidePhi))) ));
886 //cout<<"Phi prime = "<<beamPhiPrime*TMath::RadToDeg()<<endl;
887 Double_t beamLength = TMath::Sqrt( fgkLadderHeight*fgkLadderHeight/
888 ( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))
889 + fgkLadderWidth*fgkLadderWidth/4.)-fgkLadderLa/2-fgkLadderLb/2;
890 TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, fgkLadderBeamRadius,beamLength/2.,
891 0, 180);
892 TGeoVolume *sideBeam = new TGeoVolume("ITSsddCFSideBeamVol", sideBeamS,
893 carbonFiberLadderStruct);
894 sideBeam->SetLineColor(fColorCarbonFiber);
895
896 //Euler rotation : about Z, then new X, then new Z
531d6cdc 897 TGeoRotation *beamRot1 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
898 -beamPhiPrime*TMath::RadToDeg(),-90);
899 TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(),
900 beamPhiPrime*TMath::RadToDeg(), -90);
901 TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
902 beamPhiPrime*TMath::RadToDeg(), -90);
903 TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(),
904 -beamPhiPrime*TMath::RadToDeg(),-90);
b7943f00 905
906 TGeoCombiTrans *beamTransf[8];
907 beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*
908 TMath::Tan(halfTheta),
909 fgkLadderBeamRadius/2. - dy,
531d6cdc 910 -3*fgkSegmentLength/8, beamRot1);
73dfc864 911
912 beamTransf[1] = new TGeoCombiTrans( 0.5*triangleHeight*
913 TMath::Tan(halfTheta),
914 fgkLadderBeamRadius/2. - dy,
915 -3*fgkSegmentLength/8, beamRot1);
b7943f00 916 AddTranslationToCombiTrans(beamTransf[1], 0, 0, fgkSegmentLength/2);
917
918 beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*
919 TMath::Tan(halfTheta),
920 fgkLadderBeamRadius/2. - dy,
531d6cdc 921 -fgkSegmentLength/8, beamRot2);
73dfc864 922
923 beamTransf[3] = new TGeoCombiTrans(0.5*triangleHeight*
924 TMath::Tan(halfTheta),
925 fgkLadderBeamRadius/2. - dy,
926 -fgkSegmentLength/8, beamRot2);
b7943f00 927 AddTranslationToCombiTrans(beamTransf[3], 0, 0, fgkSegmentLength/2);
928
929 beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*
930 TMath::Tan(halfTheta),
931 fgkLadderBeamRadius/2. - dy,
531d6cdc 932 -3*fgkSegmentLength/8, beamRot3);
73dfc864 933
934 beamTransf[5] = new TGeoCombiTrans(-0.5*triangleHeight*
935 TMath::Tan(halfTheta),
936 fgkLadderBeamRadius/2. - dy,
937 -3*fgkSegmentLength/8, beamRot3);
b7943f00 938 AddTranslationToCombiTrans(beamTransf[5], 0, 0, fgkSegmentLength/2);
939
940 beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight*
531d6cdc 941 TMath::Tan(halfTheta),fgkLadderBeamRadius/2.-dy, -fgkSegmentLength/8,beamRot4);
b7943f00 942 beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight*
531d6cdc 943 TMath::Tan(halfTheta),fgkLadderBeamRadius/2.-dy,3*fgkSegmentLength/8,beamRot4);
b7943f00 944
945 //--- Beams of the bottom
946 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
947 fgkLadderWidth/2.-fgkLadderLb/3, 0, 180);
948 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol",
949 bottomBeam1, carbonFiberLadderStruct);
950 bottomBeam1Vol->SetLineColor(fColorCarbonFiber);
951 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
952 fgkLadderWidth/2.-fgkLadderLb/3, 0, 90);
953 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",
954 bottomBeam2, carbonFiberLadderStruct);
955 bottomBeam2Vol->SetLineColor(fColorCarbonFiber);
956 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
957 0.5*fgkLadderWidth/SinD(fgkBottomBeamAngle)
958 - fgkLadderLb/3, 0, 180);
959 TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol",
960 bottomBeam3, carbonFiberLadderStruct);
961 bottomBeam3Vol->SetLineColor(fColorCarbonFiber);
962 //bottomBeam3Vol->SetLineColor(2);
531d6cdc 963 TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90);
964 TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90);
b7943f00 965
b7943f00 966 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans
531d6cdc 967 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,0, bottomBeamRot1);
b7943f00 968 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
969 -(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,
531d6cdc 970 -fgkSegmentLength/2, bottomBeamRot1);
b7943f00 971 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,
972 -(fgkLadderHeight/2 - fgkLadderBeamRadius)
531d6cdc 973 - dy, fgkSegmentLength/2, bottomBeamRot2);
b7943f00 974 // be careful for beams #3: when "reading" from -z to +z and
975 // from the bottom of the ladder, it should draw a Lambda, and not a V
531d6cdc 976 TGeoRotation *bottomBeamRot4 = new TGeoRotation("", -90, fgkBottomBeamAngle, -90);
977 TGeoRotation *bottomBeamRot5 = new TGeoRotation("" ,-90,-fgkBottomBeamAngle, -90);
b7943f00 978 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans
531d6cdc 979 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,-fgkSegmentLength/4,bottomBeamRot4);
b7943f00 980 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans
531d6cdc 981 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,fgkSegmentLength/4, bottomBeamRot5);
b7943f00 982
983 fLaddSegCommonVol[0] = cfLaddTopVol1; fLaddSegCommonTr[0] = trTop1;
984 fLaddSegCommonVol[1] = cfLaddTopVol2; fLaddSegCommonTr[1] = trTop1;
985 fLaddSegCommonVol[2] = cfLaddSideVol1; fLaddSegCommonTr[2] = ctSideR;
986 fLaddSegCommonVol[3] = cfLaddSideVol1; fLaddSegCommonTr[3] = ctSideL;
987 fLaddSegCommonVol[4] = cfLaddSideVol2; fLaddSegCommonTr[4] = ctSideR;
988 fLaddSegCommonVol[5] = cfLaddSideVol2; fLaddSegCommonTr[5] = ctSideL;
989 fLaddSegCommonVol[6] = sideBeam; fLaddSegCommonTr[6] = beamTransf[0];
990 fLaddSegCommonVol[7] = sideBeam; fLaddSegCommonTr[7] = beamTransf[1];
991 fLaddSegCommonVol[8] = sideBeam; fLaddSegCommonTr[8] = beamTransf[2];
992 fLaddSegCommonVol[9] = sideBeam; fLaddSegCommonTr[9] = beamTransf[3];
993 fLaddSegCommonVol[10]= sideBeam; fLaddSegCommonTr[10]= beamTransf[4];
994 fLaddSegCommonVol[11]= sideBeam; fLaddSegCommonTr[11]= beamTransf[5];
995 fLaddSegCommonVol[12]= sideBeam; fLaddSegCommonTr[12]= beamTransf[6];
996 fLaddSegCommonVol[13]= sideBeam; fLaddSegCommonTr[13]= beamTransf[7];
997 fLaddSegCommonVol[14]= bottomBeam1Vol; fLaddSegCommonTr[14]= bottomBeamTransf1;
998 fLaddSegCommonVol[15]= bottomBeam2Vol; fLaddSegCommonTr[15]= bottomBeamTransf2;
999 fLaddSegCommonVol[16]= bottomBeam2Vol; fLaddSegCommonTr[16]= bottomBeamTransf3;
1000 fLaddSegCommonVol[17]= bottomBeam3Vol; fLaddSegCommonTr[17]= bottomBeamTransf4;
1001 fLaddSegCommonVol[18]= bottomBeam3Vol; fLaddSegCommonTr[18]= bottomBeamTransf5;
c789ee28 1002
b7943f00 1003
1004 //********************************************************************
1005 // cables
1006 //********************************************************************
1007 char cableName[30];
1008 for (Int_t i=0; i<fgkLay3Ndet; i++) {
6932f314 1009 snprintf(cableName, 30, "digitCableLay3A_%i",i);
b7943f00 1010 fDigitCableLay3A[i].SetName(cableName);
1011 fDigitCableLay3A[i].SetWidth(fgkDigitCablWidth);
1012 fDigitCableLay3A[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1013 fDigitCableLay3A[i].SetNLayers(2);
1014 fDigitCableLay3A[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1015 fColorPolyhamide);
1016 fDigitCableLay3A[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
6932f314 1017 snprintf(cableName, 30, "digitCableLay3B_%i",i);
b7943f00 1018 fDigitCableLay3B[i].SetName(cableName);
1019 fDigitCableLay3B[i].SetWidth(fgkDigitCablWidth);
1020 fDigitCableLay3B[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1021 fDigitCableLay3B[i].SetNLayers(2);
1022 fDigitCableLay3B[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1023 fColorPolyhamide);
1024 fDigitCableLay3B[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
1025 };
1026 for (Int_t i=0; i<fgkLay4Ndet; i++) {
6932f314 1027 snprintf(cableName, 30, "digitCableLay4A_%i",i);
b7943f00 1028 fDigitCableLay4A[i].SetName(cableName);
1029 fDigitCableLay4A[i].SetWidth(fgkDigitCablWidth);
1030 fDigitCableLay4A[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1031 fDigitCableLay4A[i].SetNLayers(2);
1032 fDigitCableLay4A[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1033 fColorPolyhamide);
1034 fDigitCableLay4A[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
6932f314 1035 snprintf(cableName, 30, "digitCableLay4B_%i",i);
b7943f00 1036 fDigitCableLay4B[i].SetName(cableName);
1037 fDigitCableLay4B[i].SetWidth(fgkDigitCablWidth);
1038 fDigitCableLay4B[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
1039 fDigitCableLay4B[i].SetNLayers(2);
1040 fDigitCableLay4B[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
1041 fColorPolyhamide);
1042 fDigitCableLay4B[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
1043 };
1044 // Well, those digit cables could also include the analog cables
1045 // which have the same width and the same path, at least in the ladder.
1046 // It will gain some computing ressources (less volumes) and some
1047 // coding efforts ... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1048 // The only thing to do is to change the names and put the correct total
1049 // thicknesses
73dfc864 1050
1051 // some transformations and volumes used in several places
1052 fCommonTr[0] = new TGeoRotation("CarlosSuppRotN",
1053 0, -fgkCarlosSuppAngle, 0);
1054
1055 TGeoTube *littleScrewHead = new TGeoTube("littleScrewHead", 0, fgkLittleScrewHeadR,
1056 fgkLittleScrewHeadH/2);
1057 fCommonVol[0] = new TGeoVolume("vLittleScrewHead",
1058 littleScrewHead, stainless);
1059 fCommonVol[0]->SetLineColor(kGray);
1060
1061 fLadderFoot = CreateLadderFoot();
1062 CreateLVCard();
1063 fCardHV = CreateHVCard(0);
1064 fCardCarlos = CreateCarlosCard(0);
1065
1066 //==================
1067 // link beteen phynox and plastic cooling tubes
1068 //==================
1069
1070 fRaccordoL = new TGeoVolumeAssembly("RaccordoL");
1071 Double_t fullRacLen = fgkConnectorCoolTubeL1+fgkConnectorCoolTubeL2+fgkConnectorCoolTubeL3;
1072 TGeoTube *waterRac = new TGeoTube("waterRac", 0, fgkConnectorCoolTubeRmin, fullRacLen/2);
1073 TGeoVolume * vwaterRac = new TGeoVolume("vwaterRac", waterRac, coolerMediumSDD);
1074 vwaterRac->SetLineColor(kBlue);
1075
1076 TGeoTube *tube1Rac = new TGeoTube("tube1Rac", fgkConnectorCoolTubeRmin,
1077 fgkConnectorCoolTubeR1, fgkConnectorCoolTubeL1/2);
1078 TGeoTube *tube2Rac = new TGeoTube("tube2Rac", fgkConnectorCoolTubeRmin,
1079 fgkConnectorCoolTubeR2, fgkConnectorCoolTubeL2/2);
1080 TGeoTube *tube3Rac = new TGeoTube("tube3Rac", fgkConnectorCoolTubeRmin,
1081 fgkConnectorCoolTubeR3, fgkConnectorCoolTubeL3/2);
1082 TGeoVolume * vtube1Rac = new TGeoVolume("vtube1Rac", tube1Rac, raccordMedium);
1083 TGeoVolume * vtube2Rac = new TGeoVolume("vtube2Rac", tube2Rac, raccordMedium);
1084 TGeoVolume * vtube3Rac = new TGeoVolume("vtube3Rac", tube3Rac, raccordMedium);
1085 vtube1Rac->SetLineColor(kGray);
1086 vtube2Rac->SetLineColor(kGray);
1087 vtube3Rac->SetLineColor(kGray);
1088
1089 TGeoTranslation *trTube1Rac = new TGeoTranslation("trTube1Rac",0,0,
1090 -fullRacLen/2+fgkConnectorCoolTubeL1/2);
1091 TGeoTranslation *trTube2Rac = new TGeoTranslation("trTube2Rac",0,0,
1092 (-fullRacLen/2+fgkConnectorCoolTubeL1+fgkConnectorCoolTubeL2/2));
1093 TGeoTranslation *trTube3Rac = new TGeoTranslation("trTube3Rac",0,0,
1094 (-fullRacLen/2+fgkConnectorCoolTubeL1+
1095 fgkConnectorCoolTubeL2+fgkConnectorCoolTubeL3/2));
1096 fRaccordoL->AddNode(vwaterRac, 1,0);
1097 fRaccordoL->AddNode(vtube1Rac, 1,trTube1Rac);
1098 fRaccordoL->AddNode(vtube2Rac, 1,trTube2Rac);
1099 fRaccordoL->AddNode(vtube3Rac, 1,trTube3Rac);
531d6cdc 1100}
c789ee28 1101
c789ee28 1102
b7943f00 1103//________________________________________________________________________
1104void AliITSv11GeometrySDD::CheckOverlaps(Double_t precision){
1105 //
1106 // a debugging function for checking some possible overlaps
1107 //
108bd0fe 1108 if (fSDDsensor3) fSDDsensor3->CheckOverlaps(precision);
1109 if (fSDDsensor4) fSDDsensor4->CheckOverlaps(precision);
b7943f00 1110 if (fHybrid) fHybrid->CheckOverlaps(precision);
531d6cdc 1111}
c789ee28 1112
1113
db486a6e 1114//________________________________________________________________________
1115TGeoCombiTrans *AliITSv11GeometrySDD::
108bd0fe 1116CreateCombiTrans(const char *name, Double_t dy, Double_t dz, Double_t dphi,
1117 Bool_t planeSym) {
db486a6e 1118 //
1119 // return the TGeoCombiTrans which make a translation in y and z
1120 // and a rotation in phi in the global coord system
108bd0fe 1121 // If planeSym = true, the rotation places the object symetrically
1122 // (with respect to the transverse plane) to its position in the
1123 // case planeSym = false
db486a6e 1124 //
1125
1126 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
1127 TGeoRotation r1("",0.,0.,dphi);
108bd0fe 1128 TGeoRotation r2("",90, 180, -90-dphi);
db486a6e 1129
1130 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
1131 combiTrans1->SetTranslation(t1);
108bd0fe 1132 if (planeSym) combiTrans1->SetRotation(r1);
1133 else combiTrans1->SetRotation(r2);
db486a6e 1134 return combiTrans1;
531d6cdc 1135}
c789ee28 1136
1137
db486a6e 1138//________________________________________________________________________
c789ee28 1139void AliITSv11GeometrySDD::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
db486a6e 1140 Double_t dx,
1141 Double_t dy,
b7943f00 1142 Double_t dz) const{
1143 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
1144 const Double_t *vect = ct->GetTranslation();
1145 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
1146 ct->SetTranslation(newVect);
531d6cdc 1147}
c789ee28 1148
1149
1150//________________________________________________________________________
1151void AliITSv11GeometrySDD::ShowOnePiece(TGeoVolume *moth) {
1152// for code developpment and debugging purposes
1153
108bd0fe 1154 if (! fSDDsensor3) CreateBasicObjects();
531d6cdc 1155
1156 // moth->AddNode(fPinSupport, 1, 0);
1157 // moth->AddNode(fCoolPipeSupportL, 1, 0);
73dfc864 1158 // moth->AddNode(fSDDsensor3, 1, 0);
1159 // moth->AddNode(fSDDsensor4, 1, 0);
531d6cdc 1160 // moth->AddNode(fBaseThermalBridge, 1, 0);
1161 // moth->AddNode(fHybrid,100,0);
73dfc864 1162 // moth->AddNode(fLadderFoot,1,0);
1163 //moth->AddNode(fCardLVL,1,0);
1164 //moth->AddNode(fCardLVR,1,0);
b7943f00 1165
e118532f 1166 TGeoVolume* seg = CreateLadderSegment( 3, 0);
1167 moth->AddNode(seg, 1, 0);
b7943f00 1168
108bd0fe 1169// TGeoVolumeAssembly *lay3Ladder = CreateLadder(3);
531d6cdc 1170// moth->AddNode(lay3Ladder, 1, 0);
1171
108bd0fe 1172// TGeoVolumeAssembly *lay3Detectors = CreateDetectorsAssembly(3);
531d6cdc 1173// moth->AddNode(lay3Detectors, 1, 0);
1174
73dfc864 1175// TGeoVolumeAssembly *lay3Detectors = CreateDetectorsAssembly(3);
1176// moth->AddNode(lay3Detectors, 1, 0);
108bd0fe 1177
1178
bf210566 1179// TGeoVolumeAssembly *endLadder = CreateEndLadder( 4 );
1180// moth->AddNode(endLadder, 1, 0);
108bd0fe 1181
1182// TGeoVolumeAssembly *highVCard = CreateHVCard( 4 );
1183// moth->AddNode(highVCard, 1, 0);
1184
73dfc864 1185// TGeoVolumeAssembly *supportRing = CreateSupportRing( 4 );
1186// moth->AddNode(supportRing, 1, 0);
1187
e118532f 1188// TGeoVolume *endLadderCards = CreateEndLadderCardsV( 4 );
108bd0fe 1189// moth->AddNode(endLadderCards, 1, 0);
1190
73dfc864 1191// TGeoVolumeAssembly *carlosCard = CreateCarlosCard( 4 );
1192// moth->AddNode(carlosCard, 1, 0);
bf210566 1193
1194
1195
1196 /*
1197 //==================================
1198 //--- test of flat cable curvature
1199 //==================================
1200
1201 double angle = 90;
1202 AliITSv11GeomCableFlat cable("test", 3, 0.3);
1203 cable.SetNLayers(1);
1204 cable.SetNLayers(2);
1205 cable.SetLayer(0, 0.2, coolerMediumSDD, 2);
1206 cable.SetLayer(1, 0.1, coolerMediumSDD, 3);
1207 cable.SetInitialNode(endLadderCards);
1208
1209 Double_t p1[3], p2[3], vX[3] = {1,0,0},vY[3] = {0,5,0};
1210
1211 p1[0] = -3;
1212 p1[1] = 1;
1213 p1[2] = 10;
1214
1215 p2[0] = 0;
1216 p2[1] = 1;
1217 p2[2] = 10;
1218 cable.AddCheckPoint(endLadderCards, 0, p1, vX);
1219 cable.AddCheckPoint(endLadderCards, 1, p2, vX);
1220 cable.CreateAndInsertBoxCableSegment(1,angle);
1221
1222 Double_t p3[3], p4[3];
1223
1224 p3[0] = 2;
1225 p3[1] = 3;
1226 p3[2] = 10;
1227 cable.AddCheckPoint(endLadderCards, 2, p3, vY);
1228 cable.CreateAndInsertCableCylSegment(2,angle);
1229
1230 p4[0] = 2;
1231 p4[1] = 6;
1232 p4[2] = 10;
1233 cable.AddCheckPoint(endLadderCards, 3, p4, vY);
1234 cable.CreateAndInsertCableSegment(3,angle);
1235 */
531d6cdc 1236}
c789ee28 1237
1238
db486a6e 1239//________________________________________________________________________
b7943f00 1240void AliITSv11GeometrySDD::Layer3(TGeoVolume *moth) {
1241 //
1242 // Insert the layer 3 in the mother volume. This is a virtual volume
1243 // containing ladders of layer 3 and the supporting rings
1244 //
1245
1246 if (! moth) {
1247 printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
1248 return;
1249 };
1250
108bd0fe 1251 TGeoMedium *airSDD = GetMedium("SDD AIR$");
b7943f00 1252
1253 fMotherVol = moth;
108bd0fe 1254 if (! fSDDsensor3) CreateBasicObjects();
b7943f00 1255
108bd0fe 1256 //====================================
1257 // First we create the central barrel
1258 //====================================
1259
1260 TGeoVolumeAssembly *lay3Ladder = CreateLadder(3);
1261 TGeoVolumeAssembly *lay3Detectors = CreateDetectorsAssembly(3);
6801b453 1262 TGeoVolumeAssembly *lay3Ladd2Det = CreateDetectorsAssemblyLadd2();
108bd0fe 1263 //TGeoVolume *lay3Detectors = CreateDetectors(3);
b7943f00 1264 TGeoTube *virtualLayer3Shape = new TGeoTube("ITSsddLayer3Shape",
1265 fgkLay3Rmin,fgkLay3Rmax,fgkLay3Length*0.5);
1266 TGeoVolume *virtualLayer3 = new TGeoVolume("ITSsddLayer3",
1267 virtualLayer3Shape, airSDD);
1268
1269 Double_t dPhi = 360./fgkLay3Nladd;
1270 Double_t detectorsThick = fgkLadWaferSep + 2*fgkWaferThickness;
1271 // Placing virtual ladder and detectors volumes following
1272 // ladder ordering convention
1273 char rotName[30];
1274 Int_t iLaddMin = 0;
1275 Int_t iLaddMax = fgkLay3Nladd;
1276 if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
1277 iLaddMin = fAddOnlyLadder3min;
1278 iLaddMax = fAddOnlyLadder3max+1;
1279 };
1280
1281 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1282
108bd0fe 1283 Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
6932f314 1284 snprintf(rotName, 30, "ITSsddLay3Ladd%i",iLadd);
b7943f00 1285 Double_t minRadiusLadBox = fLay3LaddShortRadius-fLay3LadderUnderSegDH;
1286 if (iLadd%2 != 0)
1287 minRadiusLadBox = fLay3LaddLongRadius-fLay3LadderUnderSegDH;
1288 minRadiusLadBox += ((TGeoBBox*)lay3Ladder->GetShape())->GetDY();
73dfc864 1289 TGeoCombiTrans *ctLadd;
1290 //=============================================================
1291 //
1292 // Special modification for ladder 2 of layer 3:
1293 // It has been inverted (pi rotation around y axis)
1294 //
1295 //=============================================================
1296 if (iLadd != 2)
1297 ctLadd = CreateCombiTrans(rotName,minRadiusLadBox,
1298 0, ladderPhi, kTRUE);
1299 else
1300 ctLadd = CreateCombiTrans(rotName,minRadiusLadBox,
1301 0, ladderPhi, kFALSE);
b7943f00 1302 virtualLayer3->AddNode(lay3Ladder, iLadd, ctLadd);
1303 ///////////////////////////////////////////////////
6932f314 1304 snprintf(rotName, 30, "ITSsddLay3DetBox%i",iLadd);
b7943f00 1305 Double_t minRadiusDetBox = fgkLay3DetShortRadius;
1306 if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
1307 minRadiusDetBox += detectorsThick/2;
73dfc864 1308 TGeoCombiTrans *ctDet;
6801b453 1309 ctDet = CreateCombiTrans(rotName, minRadiusDetBox,
1310 0, ladderPhi, kTRUE);
1311
73dfc864 1312 if (iLadd != 2)
6801b453 1313 virtualLayer3->AddNode(lay3Detectors, iLadd, ctDet);
73dfc864 1314 else
6801b453 1315 virtualLayer3->AddNode(lay3Ladd2Det , iLadd, ctDet);
73dfc864 1316
b7943f00 1317 ///////////////////////////////////////////////////
1318 }
1319
bf210566 1320 /*
108bd0fe 1321 //====================================
1322 // Then the forward rapidity pieces
1323 // (cooling, Carlos, LV, HV ...)
1324 //====================================
1325
bf210566 1326 Double_t fgkForwardLay3Length = fgkEndLadPipeUlengthLay3+10*fgkmm; // this has to be tune
1327 Double_t fgkForwardLay3Rmin = fgkLay3Rmin-7*fgkmm;
1328 Double_t fgkForwardLay3Rmax = fgkLay3Rmax-5*fgkmm;
108bd0fe 1329
1330 TGeoVolumeAssembly* lay3EndLadder = CreateEndLadderCards(3);
1331 TGeoTube *virtualForward3Shape = new TGeoTube("virtualForward3Shape",
1332 fgkForwardLay3Rmin, fgkForwardLay3Rmax,
1333 fgkForwardLay3Length/2.);
bf210566 1334
1335// TGeoPcon *virtualForward3Shape = new TGeoPcon("virtualForward3Shape",0,360,2);
1336// // virtualForward3Shape->DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax);
1337// virtualForward3Shape->DefineSection(0, Double_t z, Double_t rmin, Double_t rmax);
1338
1339
108bd0fe 1340 TGeoVolume *virtualForward3Pos = new TGeoVolume("ITSsddForward3Pos",
1341 virtualForward3Shape, airSDD);
1342 TGeoVolume *virtualForward3Neg = new TGeoVolume("ITSsddForward3Neg",
1343 virtualForward3Shape, airSDD);
bf210566 1344// TGeoVolume *virtualForward3Neg = new TGeoVolumeAssembly("ITSsddForward3Neg");
1345// TGeoVolume *virtualForward3Pos = new TGeoVolumeAssembly("ITSsddForward3Pos");
1346
108bd0fe 1347 TGeoTranslation *virtualForward3TrPos = new TGeoTranslation("virtualForward3TrPos",0,0,
1348 fgkLay3Length/2+fgkForwardLay3Length/2);
1349 TGeoTranslation *virtualForward3TrNeg = new TGeoTranslation("virtualForward3TrNeg",0,0,
1350 -fgkLay3Length/2-fgkForwardLay3Length/2);
1351
1352 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1353
1354 Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1355 Double_t minRadiusDetBox = fgkLay3DetShortRadius;
1356 if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
1357 minRadiusDetBox += detectorsThick/2;
1358
1359 sprintf(rotName, "ITSsddLay3EndLadd%i",iLadd);
1360
1361 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1362 -fgkForwardLay3Length/2, ladderPhi, kTRUE);
1363 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1364 fgkForwardLay3Length/2, ladderPhi, kFALSE);
1365
1366 virtualForward3Pos->AddNode(lay3EndLadder, iLadd*2, ctEndLaddPos);
1367 virtualForward3Neg->AddNode(lay3EndLadder, iLadd*2, ctEndLaddNeg);
1368 }
1369
bf210566 1370 */
1371
1372
108bd0fe 1373 if(GetDebug(1)) {
1374 virtualLayer3->CheckOverlaps(0.01);
bf210566 1375 //virtualForward3Pos->CheckOverlaps(0.01);
1376 //virtualForward3Neg->CheckOverlaps(0.01);
108bd0fe 1377 }
1378
b7943f00 1379 virtualLayer3->SetVisibility(kFALSE);
bf210566 1380 //virtualForward3Pos->SetVisibility(kFALSE);
1381 //virtualForward3Neg->SetVisibility(kFALSE);
1382
108bd0fe 1383
b7943f00 1384 moth->AddNode(virtualLayer3, 1, 0);
bf210566 1385 //moth->AddNode(virtualForward3Pos, 1, virtualForward3TrPos);
1386 //moth->AddNode(virtualForward3Neg, 1, virtualForward3TrNeg);
531d6cdc 1387}
c789ee28 1388
1389
bf210566 1390// //________________________________________________________________________
1391// void AliITSv11GeometrySDD::ForwardLayer3(TGeoVolume *moth) {
1392// //
1393// // Insert the forward pieces of layer 3 in the mother volume.
1394// // (cooling, Carlos, LV, HV ...)
1395// //
1396
1397// if (! moth) {
1398// printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
1399// return;
1400// };
1401
1402// TGeoMedium *airSDD = GetMedium("SDD AIR$");
1403
1404// if (! fSDDsensor3) CreateBasicObjects();
1405
1406// Double_t dPhi = 360./fgkLay3Nladd;
1407// Double_t detectorsThick = fgkLadWaferSep + 2*fgkWaferThickness;
1408// Int_t iLaddMin = 0;
1409// Int_t iLaddMax = fgkLay3Nladd;
1410// if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
1411// iLaddMin = fAddOnlyLadder3min;
1412// iLaddMax = fAddOnlyLadder3max+1;
1413// };
1414// char rotName[30];
1415
1416
1417// //=================
1418
1419// Double_t fgkForwardLay3Length = fgkEndLadPipeUlengthLay3+10*fgkmm; // this has to be tune
1420// Double_t fgkForwardLay3Rmin = fgkLay3Rmin-7*fgkmm;
1421// Double_t fgkForwardLay3Rmax = fgkLay3Rmax-5*fgkmm;
1422
1423// TGeoVolumeAssembly* lay3EndLadder = CreateEndLadderCards(3);
1424// TGeoTube *virtualForward3Shape = new TGeoTube("virtualForward3Shape",
1425// fgkForwardLay3Rmin, fgkForwardLay3Rmax,
1426// fgkForwardLay3Length/2.);
1427
1428// // TGeoPcon *virtualForward3Shape = new TGeoPcon("virtualForward3Shape",0,360,2);
1429// // // virtualForward3Shape->DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax);
1430// // virtualForward3Shape->DefineSection(0, Double_t z, Double_t rmin, Double_t rmax);
1431
1432
1433// TGeoVolume *virtualForward3Pos = new TGeoVolume("ITSsddForward3Pos",
1434// virtualForward3Shape, airSDD);
1435// TGeoVolume *virtualForward3Neg = new TGeoVolume("ITSsddForward3Neg",
1436// virtualForward3Shape, airSDD);
1437// // TGeoVolume *virtualForward3Neg = new TGeoVolumeAssembly("ITSsddForward3Neg");
1438// // TGeoVolume *virtualForward3Pos = new TGeoVolumeAssembly("ITSsddForward3Pos");
1439
1440// TGeoTranslation *virtualForward3TrPos = new TGeoTranslation("virtualForward3TrPos",0,0,
1441// fgkLay3Length/2+fgkForwardLay3Length/2);
1442// TGeoTranslation *virtualForward3TrNeg = new TGeoTranslation("virtualForward3TrNeg",0,0,
1443// -fgkLay3Length/2-fgkForwardLay3Length/2);
1444
1445// for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1446
1447// Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1448// Double_t minRadiusDetBox = fgkLay3DetShortRadius;
1449// if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
1450// minRadiusDetBox += detectorsThick/2;
1451
1452// sprintf(rotName, "ITSsddLay3EndLadd%i",iLadd);
1453
1454// TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1455// -fgkForwardLay3Length/2, ladderPhi, kTRUE);
1456// TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1457// fgkForwardLay3Length/2, ladderPhi, kFALSE);
1458
1459// virtualForward3Pos->AddNode(lay3EndLadder, iLadd*2, ctEndLaddPos);
1460// virtualForward3Neg->AddNode(lay3EndLadder, iLadd*2, ctEndLaddNeg);
1461// }
1462
1463// if(GetDebug(1)) {
1464// virtualForward3Pos->CheckOverlaps(0.01);
1465// virtualForward3Neg->CheckOverlaps(0.01);
1466// }
1467
1468// virtualForward3Pos->SetVisibility(kFALSE);
1469// virtualForward3Neg->SetVisibility(kFALSE);
1470
1471// moth->AddNode(virtualForward3Pos, 1, virtualForward3TrPos);
1472// moth->AddNode(virtualForward3Neg, 1, virtualForward3TrNeg);
1473// }
1474
1475
1476
1477//________________________________________________________________________
1478void AliITSv11GeometrySDD::ForwardLayer3(TGeoVolume *moth) {
1479 //
1480 // Insert the end-ladder of layer 3 in the mother volume.
1481 // (cooling, Carlos, LV, HV ...)
1482 //
1483
1484 if (! moth) {
1485 printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
1486 return;
1487 };
1488
1489 if (! fSDDsensor3) CreateBasicObjects();
1490
1491 Int_t iLaddMin = 0;
1492 Int_t iLaddMax = fgkLay3Nladd;
1493 if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
1494 iLaddMin = fAddOnlyLadder3min;
1495 iLaddMax = fAddOnlyLadder3max+1;
1496 };
1497
1498 TGeoVolume *virtualForward3Neg = new TGeoVolumeAssembly("ITSsddForward3Neg");
1499 TGeoVolume *virtualForward3Pos = new TGeoVolumeAssembly("ITSsddForward3Pos");
1500
1501 char rotName[30];
1502 Double_t dPhi = 360./fgkLay3Nladd;
1503 TGeoVolume* lay3EndLadder = CreateEndLadderCardsV(3);
1504
1505 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1506
1507 Double_t ladderPhi = -3*dPhi+iLadd*dPhi;
1508 Double_t dR = 0;
1509 if (iLadd%2 != 0) dR = fgkLay3DetLongRadius-fgkLay3DetShortRadius;
1510
6932f314 1511 snprintf(rotName, 30, "ITSsddLay3EndLadd%i",iLadd);
bf210566 1512
1513 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, dR,
1514 fgkLay3Length/2, ladderPhi, kTRUE);
1515 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, dR,
1516 -fgkLay3Length/2, ladderPhi, kFALSE);
1517
1518 virtualForward3Pos->AddNode(lay3EndLadder, iLadd*2, ctEndLaddPos);
1519 virtualForward3Neg->AddNode(lay3EndLadder, iLadd*2, ctEndLaddNeg);
1520 }
1521
1522 if(GetDebug(1)) {
1523 virtualForward3Pos->CheckOverlaps(0.01);
1524 virtualForward3Neg->CheckOverlaps(0.01);
1525 }
1526
40e2e5ea 1527 // 180deg Y rotation to compensate the cancellation of ITSD volume
1528 // (idortm[199] in AliITSv11Hybrid : z---> -z; x ---> -x; y ---> y)
1529 TGeoRotation *y180 = new TGeoRotation();
1530 y180->SetAngles( 90.,180., 90., 90.,180., 0.);
1531 moth->AddNode(virtualForward3Pos, 1, y180);
1532 moth->AddNode(virtualForward3Neg, 1, y180);
bf210566 1533}
1534
db486a6e 1535//________________________________________________________________________
b7943f00 1536void AliITSv11GeometrySDD::Layer4(TGeoVolume *moth) {
1537 //
1538 // Insert the layer 4 in the mother volume. This is a virtual volume
1539 // containing ladders of layer 4 and the supporting rings
1540 //
1541
1542 if (! moth) {
1543 printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
1544 return;
1545 };
1546
1547 fMotherVol = moth;
1548
108bd0fe 1549 if (! fSDDsensor3) CreateBasicObjects();
b7943f00 1550
1551 TGeoTube *virtualLayer4Shape =new TGeoTube("ITSsddLayer4Shape",
1552 fgkLay4Rmin,fgkLay4Rmax,fgkLay4Length*0.5);
108bd0fe 1553 TGeoMedium *airSDD = GetMedium("SDD AIR$");
b7943f00 1554 TGeoVolume *virtualLayer4 = new TGeoVolume("ITSsddLayer4",
1555 virtualLayer4Shape, airSDD);
108bd0fe 1556
1557 //====================================
1558 // First we create the central barrel
1559 //====================================
1560
1561 TGeoVolumeAssembly *lay4Ladder = CreateLadder(4);
1562 //TGeoVolume *lay4Detectors = CreateDetectors(4);
1563 TGeoVolumeAssembly *lay4Detectors = CreateDetectorsAssembly(4);
1564
b7943f00 1565 Double_t dPhi = 360./fgkLay4Nladd;
1566 Double_t detBoxThickness = fgkLadWaferSep + 2*fgkWaferThickness;
108bd0fe 1567
b7943f00 1568 // placing virtual ladder and detectors volumes following ladder
1569 // ordering convention
6932f314 1570 char rotName[30];
b7943f00 1571 Int_t iLaddMin = 0;
1572 Int_t iLaddMax = fgkLay4Nladd;
1573 if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
1574 iLaddMin = fAddOnlyLadder4min;
1575 iLaddMax = fAddOnlyLadder4max+1;
1576 }
1577 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
108bd0fe 1578
1579 Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
6932f314 1580 snprintf(rotName, 30, "ITSsddLay4Ladd%i",iLadd);
b7943f00 1581 Double_t minRadiusLadBox = fLay4LaddShortRadius-fLay4LadderUnderSegDH;
1582 if (iLadd%2 != 0)
1583 minRadiusLadBox = fLay4LaddLongRadius-fLay4LadderUnderSegDH;
1584 minRadiusLadBox += ((TGeoBBox*)lay4Ladder->GetShape())->GetDY();
1585 TGeoCombiTrans *ctLadd = CreateCombiTrans(rotName, minRadiusLadBox,
108bd0fe 1586 0, ladderPhi, kTRUE);
b7943f00 1587 virtualLayer4->AddNode(lay4Ladder, iLadd, ctLadd);
108bd0fe 1588 ///////////////////////////////////////////////////
6932f314 1589 snprintf(rotName, 30, "ITSsddLay4DetBox%i",iLadd);
b7943f00 1590 Double_t minRadiusDetBox = fgkLay4DetShortRadius;
1591 if (iLadd%2 != 0)
1592 minRadiusDetBox = fgkLay4DetLongRadius;
1593 minRadiusDetBox += detBoxThickness/2;
1594 TGeoCombiTrans *ctDet = CreateCombiTrans(rotName, minRadiusDetBox,
108bd0fe 1595 0, ladderPhi, kTRUE);
b7943f00 1596 virtualLayer4->AddNode(lay4Detectors, iLadd, ctDet);
108bd0fe 1597 ///////////////////////////////////////////////////
1598 }
1599
bf210566 1600 /*
108bd0fe 1601 //====================================
1602 // Then the pieces at forward rapidity
1603 // (cooling, Carlos, LV, HV ...)
1604 //====================================
1605
bf210566 1606 Double_t fgkForwardLay4Length = fgkEndLadPipeUlengthLay4+10*fgkmm; // this has to be tuned
1607 Double_t fgkForwardLay4Rmin = fgkLay4Rmin-9*fgkmm;
1608 Double_t fgkForwardLay4Rmax = fgkLay4Rmax-5*fgkmm;
108bd0fe 1609
1610 TGeoVolumeAssembly* lay4EndLadder = CreateEndLadderCards(4);
1611 TGeoTube *virtualForward4Shape = new TGeoTube("virtualForward3Shape",
1612 fgkForwardLay4Rmin, fgkForwardLay4Rmax,
1613 fgkForwardLay4Length/2.);
1614 TGeoVolume *virtualForward4Pos = new TGeoVolume("ITSsddForward4Pos",
1615 virtualForward4Shape, airSDD);
1616 TGeoVolume *virtualForward4Neg = new TGeoVolume("ITSsddForward4Neg",
1617 virtualForward4Shape, airSDD);
bf210566 1618// TGeoVolume *virtualForward4Pos = new TGeoVolumeAssembly("ITSsddForward4Pos");
1619// TGeoVolume *virtualForward4Neg = new TGeoVolumeAssembly("ITSsddForward4Neg");
1620
108bd0fe 1621 TGeoTranslation *virtualForward4TrPos = new TGeoTranslation("virtualForward4TrPos",0,0,
1622 fgkLay4Length/2+fgkForwardLay4Length/2);
1623 TGeoTranslation *virtualForward4TrNeg = new TGeoTranslation("virtualForward4TrNeg",0,0,
1624 -fgkLay4Length/2-fgkForwardLay4Length/2);
1625
1626 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1627
1628 Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1629 Double_t minRadiusDetBox = fgkLay4DetShortRadius;
1630 if (iLadd%2 != 0)
1631 minRadiusDetBox = fgkLay4DetLongRadius;
1632 minRadiusDetBox += detBoxThickness/2;
1633
1634 sprintf(rotName, "ITSsddLay4EndLadd%i",iLadd);
1635
1636 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1637 -fgkForwardLay4Length/2, ladderPhi, kTRUE);
1638 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1639 fgkForwardLay4Length/2, ladderPhi, kFALSE);
1640 virtualForward4Pos->AddNode(lay4EndLadder, iLadd*2, ctEndLaddPos);
1641 virtualForward4Neg->AddNode(lay4EndLadder, iLadd*2+1, ctEndLaddNeg);
b7943f00 1642 }
bf210566 1643 */
b7943f00 1644
1645 if(GetDebug(1)) virtualLayer4->CheckOverlaps(0.01);
108bd0fe 1646
b7943f00 1647 virtualLayer4->SetVisibility(kFALSE);
bf210566 1648 //virtualForward4Pos->SetVisibility(kFALSE);
1649 //virtualForward4Neg->SetVisibility(kFALSE);
108bd0fe 1650
b7943f00 1651 moth->AddNode(virtualLayer4,1,0);
bf210566 1652 //moth->AddNode(virtualForward4Pos, 1, virtualForward4TrPos);
1653 //moth->AddNode(virtualForward4Neg, 1, virtualForward4TrNeg);
1654}
1655
1656
1657// //________________________________________________________________________
1658// void AliITSv11GeometrySDD::ForwardLayer4(TGeoVolume *moth) {
1659// //
1660// // Insert the layer 4 in the mother volume. This is a virtual volume
1661// // containing ladders of layer 4 and the supporting rings
1662// // (cooling, Carlos, LV, HV ...)
1663// //
1664
1665// if (! moth) {
1666// printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
1667// return;
1668// };
1669
1670// TGeoMedium *airSDD = GetMedium("SDD AIR$");
1671
1672// if (! fSDDsensor3) CreateBasicObjects();
1673
1674// Double_t dPhi = 360./fgkLay4Nladd;
1675// Double_t detBoxThickness = fgkLadWaferSep + 2*fgkWaferThickness;
1676
1677// // placing virtual ladder and detectors volumes following ladder
1678// // ordering convention
1679// char rotName[20];
1680// Int_t iLaddMin = 0;
1681// Int_t iLaddMax = fgkLay4Nladd;
1682// if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
1683// iLaddMin = fAddOnlyLadder4min;
1684// iLaddMax = fAddOnlyLadder4max+1;
1685// }
1686
1687// //=================
1688// Double_t fgkForwardLay4Length = fgkEndLadPipeUlengthLay4+10*fgkmm; // this has to be tuned
1689// Double_t fgkForwardLay4Rmin = fgkLay4Rmin-9*fgkmm;
1690// Double_t fgkForwardLay4Rmax = fgkLay4Rmax-5*fgkmm;
1691
1692// TGeoVolumeAssembly* lay4EndLadder = CreateEndLadderCards(4);
1693// TGeoTube *virtualForward4Shape = new TGeoTube("virtualForward3Shape",
1694// fgkForwardLay4Rmin, fgkForwardLay4Rmax,
1695// fgkForwardLay4Length/2.);
1696// TGeoVolume *virtualForward4Pos = new TGeoVolume("ITSsddForward4Pos",
1697// virtualForward4Shape, airSDD);
1698// TGeoVolume *virtualForward4Neg = new TGeoVolume("ITSsddForward4Neg",
1699// virtualForward4Shape, airSDD);
1700// // TGeoVolume *virtualForward4Pos = new TGeoVolumeAssembly("ITSsddForward4Pos");
1701// // TGeoVolume *virtualForward4Neg = new TGeoVolumeAssembly("ITSsddForward4Neg");
1702
1703// TGeoTranslation *virtualForward4TrPos = new TGeoTranslation("virtualForward4TrPos",0,0,
1704// fgkLay4Length/2+fgkForwardLay4Length/2);
1705// TGeoTranslation *virtualForward4TrNeg = new TGeoTranslation("virtualForward4TrNeg",0,0,
1706// -fgkLay4Length/2-fgkForwardLay4Length/2);
1707
1708// for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1709
1710// Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1711// Double_t minRadiusDetBox = fgkLay4DetShortRadius;
1712// if (iLadd%2 != 0)
1713// minRadiusDetBox = fgkLay4DetLongRadius;
1714// minRadiusDetBox += detBoxThickness/2;
1715
1716// sprintf(rotName, "ITSsddLay4EndLadd%i",iLadd);
1717
1718// TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1719// -fgkForwardLay4Length/2, ladderPhi, kTRUE);
1720// TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, minRadiusDetBox-0.1,
1721// fgkForwardLay4Length/2, ladderPhi, kFALSE);
1722// virtualForward4Pos->AddNode(lay4EndLadder, iLadd*2, ctEndLaddPos);
1723// virtualForward4Neg->AddNode(lay4EndLadder, iLadd*2+1, ctEndLaddNeg);
1724// }
1725
1726// virtualForward4Pos->SetVisibility(kFALSE);
1727// virtualForward4Neg->SetVisibility(kFALSE);
1728
1729// moth->AddNode(virtualForward4Pos, 1, virtualForward4TrPos);
1730// moth->AddNode(virtualForward4Neg, 1, virtualForward4TrNeg);
1731// }
1732
1733
1734//________________________________________________________________________
1735void AliITSv11GeometrySDD::ForwardLayer4(TGeoVolume *moth) {
1736 //
1737 // Insert the end-ladder of layer 4 in the mother volume.
1738 // (cooling, Carlos, LV, HV ...)
1739 //
1740
1741 if (! moth) {
1742 printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
1743 return;
1744 };
1745
1746 if (! fSDDsensor3) CreateBasicObjects();
1747
1748 // placing virtual ladder and detectors volumes following ladder
1749 // ordering convention
1750 Int_t iLaddMin = 0;
1751 Int_t iLaddMax = fgkLay4Nladd;
1752 if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
1753 iLaddMin = fAddOnlyLadder4min;
1754 iLaddMax = fAddOnlyLadder4max+1;
1755 }
1756
1757 TGeoVolume *virtualForward4Pos = new TGeoVolumeAssembly("ITSsddForward4Pos");
1758 TGeoVolume *virtualForward4Neg = new TGeoVolumeAssembly("ITSsddForward4Neg");
1759
1760 char rotName[30];
1761 Double_t dPhi = 360./fgkLay4Nladd;
1762 TGeoVolume* lay4EndLadder = CreateEndLadderCardsV(4);
1763
1764 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
1765
1766 Double_t ladderPhi = -5*dPhi + iLadd*dPhi;
1767 Double_t dR = 0;
1768 if (iLadd%2 != 0)
1769 dR = fgkLay4DetLongRadius-fgkLay4DetShortRadius;
1770
6932f314 1771 snprintf(rotName, 30, "ITSsddLay4EndLadd%i",iLadd);
bf210566 1772
1773 TGeoCombiTrans *ctEndLaddPos = CreateCombiTrans(rotName, dR,
1774 fgkLay4Length/2, ladderPhi, kTRUE);
1775 TGeoCombiTrans *ctEndLaddNeg = CreateCombiTrans(rotName, dR,
1776 -fgkLay4Length/2, ladderPhi, kFALSE);
1777 virtualForward4Pos->AddNode(lay4EndLadder, iLadd*2, ctEndLaddPos);
1778 virtualForward4Neg->AddNode(lay4EndLadder, iLadd*2, ctEndLaddNeg);
1779 }
1780
40e2e5ea 1781 // 180deg Y rotation to compensate the cancellation of ITSD volume
1782 // (idortm[199] in AliITSv11Hybrid : z---> -z; x ---> -x; y ---> y)
1783 TGeoRotation *y180 = new TGeoRotation();
1784 y180->SetAngles( 90.,180., 90., 90.,180., 0.);
1785 moth->AddNode(virtualForward4Pos, 1, y180);
1786 moth->AddNode(virtualForward4Neg, 1, y180);
531d6cdc 1787}
b7943f00 1788
1789
1790//________________________________________________________________________
108bd0fe 1791TGeoVolumeAssembly *AliITSv11GeometrySDD::CreateLadder(Int_t iLay) {
b7943f00 1792 //
73dfc864 1793 // return an assembly volume containing the CF ladder
b7943f00 1794 //
1795
1796 Int_t nDetectors = fgkLay3Ndet;
1797 Double_t ladderLength = fgkLay3LadderLength;
1798 Double_t underSegDH = fLay3LadderUnderSegDH;
1799 Double_t *sensorZPos = fLay3sensorZPos;
1800 AliITSv11GeomCableFlat *digitCableA = fDigitCableLay3A;
1801 AliITSv11GeomCableFlat *digitCableB = fDigitCableLay3B;
1802
1803 if (iLay==3) {}
1804 else if (iLay==4) {
1805 nDetectors = fgkLay4Ndet;
1806 ladderLength = fgkLay4LadderLength;
1807 digitCableA = fDigitCableLay4A;
1808 digitCableB = fDigitCableLay4B;
1809 underSegDH = fLay4LadderUnderSegDH;
1810 sensorZPos = fLay4sensorZPos;
1811 }
1812 else {
1813 printf("AliITSv11GeometrySDD::CreateLadder : error=wrong layer\n");
1814 };
1815 Double_t ladderBoxDH = fgkLadderHeight+fgkLadderSegBoxDH+underSegDH;
108bd0fe 1816 TGeoVolumeAssembly *virtualLadder = new TGeoVolumeAssembly("ITSsddLadder");
b7943f00 1817
1818 // placing virtual ladder segment following detector ordering convention
1819 //=======================================================================
1820 char transName[30];
1821
1822 // adding segment this way to create cable points in the correct order ...
1823 for (Int_t iSegment = nDetectors/2-1; iSegment >= 0; iSegment-- ) {
1824
73dfc864 1825 //TGeoVolumeAssembly *laddSegment = CreateLadderSegment(iLay, iSegment);
1826 TGeoVolume *laddSegment = CreateLadderSegment(iLay, iSegment);
6932f314 1827 snprintf(transName, 30, "ITSsddLay%iLaddSeg%i", iLay, iSegment);
b7943f00 1828 Double_t segmentPos = fgkSegmentLength*(nDetectors/2-1-iSegment)
1829 + fgkSegmentLength/2;
1830 TGeoTranslation *segTr = new TGeoTranslation(transName, 0,
1831 underSegDH/2,segmentPos);
1832 ////
1833 virtualLadder->AddNode(laddSegment, iSegment, segTr);
1834 };
1835 for (Int_t iSegment = nDetectors/2; iSegment < nDetectors; iSegment++ ) {
1836
73dfc864 1837 TGeoVolume *laddSegment = CreateLadderSegment(iLay, iSegment);
1838 //TGeoVolumeAssembly *laddSegment = CreateLadderSegment(iLay, iSegment);
6932f314 1839 snprintf(transName, 30, "ITSsddLay%iLaddSeg%i", iLay, iSegment);
b7943f00 1840 Double_t segmentPos = fgkSegmentLength*(nDetectors/2-1-iSegment)
1841 + fgkSegmentLength/2;
1842 TGeoTranslation *segTr = new TGeoTranslation(transName, 0,
1843 underSegDH/2,segmentPos);
1844 ////
1845 virtualLadder->AddNode(laddSegment, iSegment, segTr);
1846 };
1847
1848 // putting virtual volume corresponding to the end of ladder
1849 //=======================================================================
108bd0fe 1850 TGeoVolumeAssembly *endLadder = CreateEndLadder( iLay );
b7943f00 1851 Double_t endLength = (ladderLength - nDetectors*fgkSegmentLength)/2.;
1852 TGeoTranslation *endTrZPos = new TGeoTranslation("ITSsddEndTrZPos",0,0,
1853 fgkSegmentLength*(nDetectors/2)+endLength/2.);
1854 // Euler rotation : about Z, then new X, then new Z
1855 TGeoRotation *endZNegRot = new TGeoRotation("",90, 180, -90);
1856 TGeoCombiTrans *endTrZNeg = new TGeoCombiTrans(0,0,
1857 -fgkSegmentLength*(nDetectors/2)-endLength/2.,endZNegRot);
1858 virtualLadder->AddNode(endLadder, 1, endTrZPos);
1859 virtualLadder->AddNode(endLadder, 2, endTrZNeg);
1860
1861 // creating and inserting cable segments
1862 // (check points are placed while creating segments)
1863 //=======================================================================
1864 if (fAddCables)
1865 for (Int_t iSegment = 0; iSegment < nDetectors; iSegment++ ) {
1866
1867 digitCableA[iSegment].SetInitialNode(virtualLadder);
1868 digitCableB[iSegment].SetInitialNode(virtualLadder);
1869
1870 for (Int_t iPt=1; iPt<digitCableA[iSegment].GetNCheckPoints(); iPt++ ) {
1871 Double_t rotation = 0;
73dfc864 1872 if (iPt>1) {
1873 rotation = 90-fgkHybridAngle;
1874 digitCableA[iSegment].CreateAndInsertCableSegment(iPt, rotation);
1875 } else
bf210566 1876 digitCableA[iSegment].CreateAndInsertCableSegment(iPt);
73dfc864 1877
b7943f00 1878 };
1879
1880 for (Int_t iPt=1; iPt<digitCableB[iSegment].GetNCheckPoints(); iPt++ ) {
1881 Double_t rotation = 0;
73dfc864 1882 if (iPt>1) {
1883 rotation = fgkHybridAngle-90;
1884 digitCableB[iSegment].CreateAndInsertCableSegment(iPt, rotation);
1885 } else
bf210566 1886 digitCableB[iSegment].CreateAndInsertCableSegment(iPt);
b7943f00 1887 };
1888 };
1889
1890 // HV cable
1891 //=======================================================================
fa4639a3 1892 if (fAddHVcables) {
108bd0fe 1893 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$"); //ITSsddKAPTON_POLYCH2
1894 TGeoMedium *alSDD = GetMedium("AL$"); //ITSal
b7943f00 1895
1896 AliITSv11GeomCableFlat cableHV[fgkLay4Ndet]; // temp !!!
1897 char cableHVname[30];
1898 for (Int_t iSegment = 0; iSegment<nDetectors; iSegment++) {
6932f314 1899 snprintf(cableHVname,30,"ITSsddHVcable%i", iSegment);
b7943f00 1900 cableHV[iSegment].SetName(cableHVname);
1901 cableHV[iSegment].SetThickness(fgkLongHVcablePolyThick+fgkLongHVcableAlThick);
1902 cableHV[iSegment].SetWidth(fgkTransitHVtailWidth);
1903 cableHV[iSegment].SetNLayers(2);
1904 cableHV[iSegment].SetLayer(0, fgkLongHVcablePolyThick, polyhamideSDD,
1905 fColorPolyhamide);
1906 cableHV[iSegment].SetLayer(1, fgkLongHVcableAlThick, alSDD, fColorAl);
1907 cableHV[iSegment].SetInitialNode(virtualLadder);
1908 };
1909 Double_t x1[3], x2[3], x3[3],
1910 vY[3] = {0,1,0}, vZ[3] = {0,0,1}, vYZ[3]={0,1,1};
1911
fa4639a3 1912 x1[0] = -fgkTransitHVtailXpos;
1913 x2[0] = -fgkTransitHVtailXpos;
1914 x3[0] = -fgkTransitHVtailXpos;
b7943f00 1915 for (Int_t iSegment = nDetectors/2-1; iSegment >= 0; iSegment-- ) {
1916 Double_t cableSeparation = TMath::Abs(iSegment - (nDetectors/2-1))
1917 *fgkLongHVcableSeparation;
73dfc864 1918 // adjust where HV long cable starts in Y
1919 // useful if you want to let some space for alignment
1920 x1[1] = - ladderBoxDH/2 + 2*fgkmm;
b7943f00 1921 x2[1] = - ladderBoxDH/2 + underSegDH - cableSeparation
1922 - (fgkLongHVcablePolyThick+fgkLongHVcableAlThick)/2;
1923 x3[1] = x2[1];
1924 x1[2] = sensorZPos[iSegment]+fgkTransitHVtailLength-5*fgkmm;
1925 x2[2] = x1[2]+5*fgkmm;
1926 x3[2] = ladderLength/2-endLength;
1927 cableHV[iSegment].AddCheckPoint( virtualLadder, 0, x1, vY );
73dfc864 1928 cableHV[iSegment].AddCheckPoint( virtualLadder, 1, x2, vZ ); // vYZ
b7943f00 1929 cableHV[iSegment].AddCheckPoint( virtualLadder, 2, x3, vZ );
1930
73dfc864 1931 //cableHV[iSegment].CreateAndInsertCableSegment(1,0);
1932 cableHV[iSegment].CreateAndInsertCableCylSegment(1, -45+180);
1933 //cableHV[iSegment].CreateAndInsertCableSegment(2,0);
1934 cableHV[iSegment].CreateAndInsertBoxCableSegment(2,0);
b7943f00 1935 };
1936
1937 vYZ[2] = -1;
fa4639a3 1938 x1[0] = fgkTransitHVtailXpos;
1939 x2[0] = fgkTransitHVtailXpos;
1940 x3[0] = fgkTransitHVtailXpos;
1941
b7943f00 1942 for (Int_t iSegment = nDetectors/2; iSegment < nDetectors; iSegment++ ) {
1943 Double_t cableSeparation = TMath::Abs(iSegment - (nDetectors/2-1))
1944 *fgkLongHVcableSeparation;
73dfc864 1945 x1[1] = - ladderBoxDH/2 + 2*fgkmm; // adjust where HV long cable starts in Y
b7943f00 1946 x2[1] = - ladderBoxDH/2 + underSegDH - cableSeparation
1947 - (fgkLongHVcablePolyThick+fgkLongHVcableAlThick)/2;
1948 x3[1] = x2[1];
1949 x1[2] = sensorZPos[iSegment]-fgkTransitHVtailLength+5*fgkmm;
1950 x2[2] = x1[2]-5*fgkmm;
1951 x3[2] = -ladderLength/2+endLength;
1952 cableHV[iSegment].AddCheckPoint( virtualLadder, 0, x1, vY );
73dfc864 1953 cableHV[iSegment].AddCheckPoint( virtualLadder, 1, x2, vZ ); // vYZ
b7943f00 1954 cableHV[iSegment].AddCheckPoint( virtualLadder, 2, x3, vZ );
1955
73dfc864 1956 cableHV[iSegment].CreateAndInsertCableCylSegment(1, -45);
1957 cableHV[iSegment].CreateAndInsertBoxCableSegment(2,0);
b7943f00 1958 };
fa4639a3 1959 };
c789ee28 1960
b7943f00 1961 //**********************************
1962 if(GetDebug(1)) virtualLadder->CheckOverlaps(0.01);
b7943f00 1963 return virtualLadder;
531d6cdc 1964}
c789ee28 1965
1966
db486a6e 1967//________________________________________________________________________
8f20b5e4 1968TGeoArb8 *AliITSv11GeometrySDD::CreateLadderSide(const char *name,
1969 Double_t dz, Double_t angle, Double_t xSign,
1970 Double_t L, Double_t H, Double_t l) {
db486a6e 1971 // Create one half of the V shape corner of CF ladder
1972
1973 TGeoArb8 *cfLaddSide = new TGeoArb8(dz);
8f20b5e4 1974 cfLaddSide->SetName(name);
1975
1976 // Points must be in clockwise order
1977 cfLaddSide->SetVertex(0, 0, 0);
1978 cfLaddSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
1979 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
1980 cfLaddSide->SetVertex(4, 0, 0);
1981 cfLaddSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
1982 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
1983 if (xSign < 0) {
1984 cfLaddSide->SetVertex(1, 0, -H);
1985 cfLaddSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1986 cfLaddSide->SetVertex(5, 0, -H);
1987 cfLaddSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1988 } else {
1989 cfLaddSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1990 cfLaddSide->SetVertex(3, 0, -H);
1991 cfLaddSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
1992 cfLaddSide->SetVertex(7, 0, -H);
1993 }
db486a6e 1994 return cfLaddSide;
531d6cdc 1995}
c789ee28 1996
1997
db486a6e 1998//________________________________________________________________________
b7943f00 1999TGeoVolume* AliITSv11GeometrySDD::CreateHybrid(Int_t iLRSide) {
2000 //
2001 // return a box containing the front-end hybrid
2002 //
2003
2004 Double_t roundHoleX = -fgkHybridWidth/2+fgkHybRndHoleX;
2005
2006 Double_t screenTotalThick = fgkHybGlueScrnThick+fgkHybUpThick+fgkHybAlThick;
2007 Double_t lowFLTotalThick = fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick;
2008// Double_t upFLTotalThick = fgkHybGlueUpThick +fgkHybUpThick+fgkHybAlThick;
2009 Double_t chipsCCTotThick = fgkHybUnderNiThick+fgkHybGlueAgThick
2010 +fgkHybChipThick+2*(fgkHybUpCCThick+fgkHybAlCCThick);
2011 Double_t ccUpLayerTotThick = fgkHybUpCCThick+fgkHybAlCCThick+fgkHybUpCCThick;
2012// Double_t volumeThick = (fgkHybridThBridgeThick+screenTotalThick+lowFLTotalThick
2013// + upFLTotalThick + ccUpLayerTotThick);
2014 Double_t volumeThick = (fgkHybridThBridgeThick+screenTotalThick+lowFLTotalThick
2015 +fgkHybSMDheight);
2016 Double_t lowLayerYmin = -volumeThick/2+fgkHybridThBridgeThick
2017 +screenTotalThick;
2018 Double_t flUpThick = fgkHybGlueUpThick+fgkHybUpThick;
2019
2020 //**************************************************** media :
108bd0fe 2021 TGeoMedium *airSDD = GetMedium("SDD AIR$");
2022 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDDKAPTON (POLYCH2)$"); //ITSsddCarbonM55J
2023 TGeoMedium *alSDD = GetMedium("AL$"); //ITSal
2024 TGeoMedium *alSDD80p100 = GetMedium("AL$"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2025 TGeoMedium *alSDD50p100 = GetMedium("AL$"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2026 TGeoMedium *polyhamideSDD = GetMedium("SDDKAPTON (POLYCH2)$"); //ITSsddKAPTON_POLYCH2
9c8369f9 2027 TGeoMedium *niSDD = GetMedium("NICKEL$");
108bd0fe 2028 TGeoMedium *glueAG = GetMedium("SDDKAPTON (POLYCH2)$"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2029 TGeoMedium *siliconSDD = GetMedium("SDD SI CHIP$"); //ITSsddSiChip
9c8369f9 2030 TGeoMedium *medSMD = GetMedium("SDD X7R capacitors$"); // SDDX7Rcapacitors
2031 TGeoMedium *medSMDweld = GetMedium("SDD X7R weld$");
b7943f00 2032
2033 //**************************************************** main volume :
9c8369f9 2034// TGeoBBox *hybridBox = new TGeoBBox("",fgkHybridWidth/2, volumeThick/2,
2035// (fgkHybridLength)/2);
2036 Double_t xhybr[6],yhybr[6];
2037 xhybr[0] = -fgkHybridWidth/2;
2038 yhybr[0] = -volumeThick/2;
2039 xhybr[1] = fgkHybridWidth/2;
2040 yhybr[1] = -volumeThick/2;
2041 xhybr[2] = fgkHybridWidth/2;
2042 yhybr[2] = volumeThick/2;
2043 xhybr[3] = -fgkHybridWidth/2;
2044 yhybr[3] = volumeThick/2;
2045 xhybr[4] = xhybr[3] - 1.05*fgkHybCC2SensorLen*SinD(fgkHybCC2SensorAng);
2046 yhybr[4] = yhybr[3] - 1.05*fgkHybCC2SensorLen*CosD(fgkHybCC2SensorAng);
2047 xhybr[5] = xhybr[4];
2048 yhybr[5] = yhybr[4] - volumeThick;
2049
2050 TGeoXtru *hybridBox = new TGeoXtru(2);
2051 hybridBox->DefinePolygon(6, xhybr, yhybr);
2052 hybridBox->DefineSection(0,-fgkHybridLength/2);
2053 hybridBox->DefineSection(1, fgkHybridLength/2);
2054
b7943f00 2055 TGeoVolume *hybrid = new TGeoVolume("ITSsddHybridVol", hybridBox,
2056 airSDD);
2057
2058 TGeoBBox *sThermalBridge = new TGeoBBox( "", fgkHybridWidth/2,
2059 fgkHybridThBridgeThick/2,
2060 fgkHybridLength/2);
c789ee28 2061
b7943f00 2062 //**************************************************** Thermal bridge :
c789ee28 2063 TGeoVolume *vThermalBridge = new TGeoVolume("ITSsddHybridThBridge",
2064 sThermalBridge,
2065 carbonFiberLadderStruct);
2066 vThermalBridge->SetLineColor(fColorCarbonFiber);
b7943f00 2067 TGeoTranslation *thBridgeTr = new TGeoTranslation(0, -volumeThick/2
2068 +fgkHybridThBridgeThick/2, 0);
2069 hybrid->AddNode(vThermalBridge, 1, thBridgeTr);
2070
2071 //**************************************************** Screen layer :
2072 TGeoBBox *sAlScreenLayer = new TGeoBBox("sAlScreenLayer", fgkHybridWidth/2,
2073 fgkHybAlThick/2, fgkHybridLength/2);
2074 //here the upedex and glue layers are both assumed to be polyimide
2075 TGeoBBox *sUpGlueScreenLayer = new TGeoBBox("sUpGlueScreenLayer",
2076 fgkHybridWidth/2,
2077 (fgkHybUpThick+fgkHybGlueScrnThick)/2,
2078 fgkHybridLength/2);
2079 TGeoTube *sRoundHole = new TGeoTube("sRoundHole", 0, fgkHybRndHoleRad,
2080 (screenTotalThick+lowFLTotalThick)/2);
2081
2082 TGeoTranslation *upGlueScreenTr = new TGeoTranslation("upGlueScreenTr",0,
2083 -volumeThick/2+fgkHybridThBridgeThick+(fgkHybUpThick+fgkHybGlueScrnThick)/2,0);
2084
2085 TGeoTranslation *alScreenTr = new TGeoTranslation("AlScreenTr", 0,
2086 -volumeThick/2+fgkHybridThBridgeThick+fgkHybUpThick+fgkHybGlueScrnThick
2087 +fgkHybAlThick/2, 0);
2088
2089 TGeoTranslation hybHolePos1Tr(roundHoleX,
2090 -volumeThick/2+fgkHybridThBridgeThick+(screenTotalThick+lowFLTotalThick)/2,
2091 -fgkHybridLength/2+fgkHybRndHoleZ);
2092 TGeoTranslation hybHolePos2Tr(roundHoleX,
2093 -volumeThick/2+fgkHybridThBridgeThick+(screenTotalThick+lowFLTotalThick)/2,
2094 fgkHybridLength/2-fgkHybRndHoleZ);
531d6cdc 2095
2096 TGeoRotation *rotHole = new TGeoRotation("", 0, 90, 0);
2097 TGeoCombiTrans *hybHolePos1 = new TGeoCombiTrans(hybHolePos1Tr, *rotHole);
b7943f00 2098 hybHolePos1->SetName("hybHolePos1");
531d6cdc 2099 TGeoCombiTrans *hybHolePos2 = new TGeoCombiTrans(hybHolePos2Tr, *rotHole);
b7943f00 2100 hybHolePos2->SetName("hybHolePos2");
2101
2102 upGlueScreenTr->RegisterYourself();
2103 alScreenTr->RegisterYourself();
2104 hybHolePos1->RegisterYourself();
2105 hybHolePos2->RegisterYourself();
531d6cdc 2106 delete rotHole;
b7943f00 2107
2108 TGeoCompositeShape *sScreenAl = new TGeoCompositeShape(
2109 "sAlScreenLayer:AlScreenTr-(sRoundHole:hybHolePos1"
2110 "+sRoundHole:hybHolePos2)");
2111 TGeoVolume *vScreenAl = new TGeoVolume("vScreenAl",sScreenAl, alSDD);
2112 vScreenAl->SetLineColor(fColorAl);
2113 TGeoCompositeShape *sScreenUpGlue = new TGeoCompositeShape(
2114 "sUpGlueScreenLayer:upGlueScreenTr-(sRoundHole:hybHolePos1"
2115 "+sRoundHole:hybHolePos2)");
2116 TGeoVolume *vScreenUpGlue = new TGeoVolume("vScreenUpGlue",
2117 sScreenUpGlue,polyhamideSDD);
2118 vScreenUpGlue->SetLineColor(fColorPolyhamide);
2119
2120 hybrid->AddNode(vScreenUpGlue, 1, 0);
2121 hybrid->AddNode(vScreenAl, 1, 0);
2122
2123 //**************************************************** FL low layer :
2124 Double_t sideWidth1 = fgkHybFLlowChipZ1 - fgkHybFLlowHoleDZ/2;
2125 Double_t sideWidth2 = fgkHybridLength - fgkHybFLlowChipZ4 - fgkHybFLlowHoleDZ/2;
2126
2127 //here the upedex and glue layers are both assumed to be polyimide
2128 TGeoBBox *sUpGlueBar1 = new TGeoBBox("sUpGlueBar1", fgkHybridWidth/2,
2129 (fgkHybGlueLowThick+fgkHybUpThick)/2,
2130 sideWidth1/2);
2131 TGeoBBox *sAlBar1 = new TGeoBBox("sAlBar1", fgkHybridWidth/2,
2132 fgkHybAlThick/2, sideWidth1/2);
2133
2134 TGeoTranslation *upGlueBarTr1 = new TGeoTranslation("upGlueBarTr1", 0,
2135 lowLayerYmin+(fgkHybGlueLowThick+fgkHybUpThick)/2,
2136 -(fgkHybridLength-sideWidth1)/2);
2137 TGeoTranslation *alBarTr1 = new TGeoTranslation("alBarTr1", 0,
2138 lowLayerYmin+fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick/2,
2139 -(fgkHybridLength-sideWidth1)/2);
2140 upGlueBarTr1->RegisterYourself();
2141 alBarTr1->RegisterYourself();
2142
2143 TGeoCompositeShape *sLowUpGlueBar1 = new TGeoCompositeShape(
2144 "sUpGlueBar1:upGlueBarTr1-sRoundHole:hybHolePos1");
2145 TGeoCompositeShape *sLowAlBar1 = new TGeoCompositeShape(
2146 "sAlBar1:alBarTr1-sRoundHole:hybHolePos1");
2147 TGeoVolume *vLowUpGlueBar1 = new TGeoVolume("vLowUpGlueBar1",
2148 sLowUpGlueBar1, polyhamideSDD);
2149 TGeoVolume *vLowAlBar1 = new TGeoVolume("vLowAlBar1",
2150 sLowAlBar1, alSDD);
2151 vLowUpGlueBar1->SetLineColor(fColorPolyhamide);
2152 vLowAlBar1->SetLineColor(fColorAl);
2153 hybrid->AddNode(vLowUpGlueBar1,1,0);
2154 hybrid->AddNode(vLowAlBar1,1,0);
2155
2156 //---
2157 //here the upedex and glue layers are both assumed to be polyimide
2158 TGeoBBox *sUpGlueBar2 = new TGeoBBox("sUpGlueBar2", fgkHybridWidth/2,
2159 (fgkHybGlueLowThick+fgkHybUpThick)/2,
2160 sideWidth2/2);
2161 TGeoBBox *sAlBar2 = new TGeoBBox("sAlBar2", fgkHybridWidth/2,
2162 fgkHybAlThick/2, sideWidth2/2);
2163
9c8369f9 2164 TGeoTranslation *upGlueBarTr2 = new TGeoTranslation("upGlueBarTr2", 0,
b7943f00 2165 lowLayerYmin+(fgkHybGlueLowThick+fgkHybUpThick)/2,
2166 (fgkHybridLength-sideWidth2)/2);
2167 TGeoTranslation *alBarTr2 = new TGeoTranslation("alBarTr2", 0,
2168 lowLayerYmin+fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick/2,
2169 (fgkHybridLength-sideWidth2)/2);
2170 upGlueBarTr2->RegisterYourself();
2171 alBarTr2->RegisterYourself();
2172
2173 TGeoCompositeShape *sLowUpGlueBar2 = new TGeoCompositeShape(
2174 "sUpGlueBar2:upGlueBarTr2-sRoundHole:hybHolePos2");
2175 TGeoCompositeShape *sLowAlBar2 = new TGeoCompositeShape(
2176 "sAlBar2:alBarTr2-sRoundHole:hybHolePos2");
2177 TGeoVolume *vLowUpGlueBar2 = new TGeoVolume("vLowUpGlueBar2",sLowUpGlueBar2,
2178 polyhamideSDD);
2179 TGeoVolume *vLowAlBar2 = new TGeoVolume("vLowAlBar2",sLowAlBar2,
2180 alSDD);
2181 vLowUpGlueBar2->SetLineColor(fColorPolyhamide);
2182 vLowAlBar2->SetLineColor(fColorAl);
2183 hybrid->AddNode(vLowUpGlueBar2, 1, 0);
2184 hybrid->AddNode(vLowAlBar2, 1, 0);
2185
108bd0fe 2186 if(GetDebug(3)) { // Remove compiler warning.
b7943f00 2187 sAlScreenLayer->InspectShape();
2188 sUpGlueScreenLayer->InspectShape();
2189 sRoundHole->InspectShape();
2190 sUpGlueBar1->InspectShape();
2191 sUpGlueBar2->InspectShape();
2192 sAlBar1->InspectShape();
2193 sAlBar2->InspectShape();
2194 };
2195 //---
2196 //using class AliITSv11GeomCableFlat to add 2-layer segments ...
2197 Double_t piece1width = fgkHybFLlowPasX-fgkHybFLlowHolePasDX/2;
2198 AliITSv11GeomCableFlat lowFLpiece("lowFLpiece1",piece1width,
2199 lowFLTotalThick);
2200 lowFLpiece.SetNLayers(2);
2201 lowFLpiece.SetLayer(0, fgkHybGlueLowThick+fgkHybUpThick, polyhamideSDD,
2202 fColorPolyhamide);
2203 lowFLpiece.SetLayer(1, fgkHybAlThick, alSDD80p100, fColorAl);
2204 // alSDD at 80% : mostly to take into account strips of piece 3
2205
2206 Double_t x1[3] = { -fgkHybridWidth/2 + piece1width/2,
2207 lowLayerYmin + lowFLTotalThick/2,
2208 -fgkHybridLength/2 + sideWidth1 };
2209 Double_t x2[3] ={ x1[0], x1[1], fgkHybridLength/2 - sideWidth2 };
2210 Double_t vZ[3] = {0,0,1};
2211 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
2212 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
2213 lowFLpiece.SetInitialNode(hybrid);
108bd0fe 2214 lowFLpiece.CreateAndInsertBoxCableSegment(1);
b7943f00 2215 lowFLpiece.ResetPoints();
2216
2217 Double_t piece2width = fgkHybFLlowAmbX-fgkHybFLlowPasX
2218 -fgkHybFLlowHolePasDX/2-fgkHybFLlowHoleAmbDX/2;
2219
2220 lowFLpiece.SetWidth(piece2width);
2221 lowFLpiece.SetName("lowFLpiece2");
2222 x1[0] = piece2width/2+fgkHybFLlowPasX+fgkHybFLlowHolePasDX/2-fgkHybridWidth/2;
2223 x2[0] = x1[0];
2224 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
2225 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
108bd0fe 2226 lowFLpiece.CreateAndInsertBoxCableSegment(1);
b7943f00 2227 lowFLpiece.ResetPoints();
2228
2229 Double_t piece3width = fgkHybridWidth - fgkHybFLlowAmbX
2230 - fgkHybFLlowHoleAmbDX/2;
2231
2232 lowFLpiece.SetWidth(piece3width);
2233 lowFLpiece.SetName("lowFLpiece3");
2234 x1[0] = fgkHybridWidth/2-piece3width/2;
2235 x2[0] = x1[0];
2236 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
2237 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
108bd0fe 2238 lowFLpiece.CreateAndInsertBoxCableSegment(1);
b7943f00 2239
2240 Double_t zChips[4] = {fgkHybFLlowChipZ1,fgkHybFLlowChipZ2,
2241 fgkHybFLlowChipZ3,fgkHybFLlowChipZ4};
2242 Double_t vX[3] = {1,0,0};
2243 for (Int_t i=0; i<3; i++) {
2244 char ch[20];
6932f314 2245 snprintf(ch, 20, "lowFLpieceA%i", i+4);
b7943f00 2246 lowFLpiece.SetName(ch);
2247 lowFLpiece.SetWidth(zChips[i+1]-zChips[i]-fgkHybFLlowHoleDZ);
2248
2249 lowFLpiece.SetLayer(1, fgkHybAlThick, alSDD, fColorAl);
2250 x1[0] = -fgkHybridWidth/2 + piece1width;
2251 x2[0] = x1[0] + fgkHybFLlowHolePasDX;
2252 Double_t zPiece = (zChips[i+1]+zChips[i])/2 - fgkHybridLength/2;
2253 x1[2] = zPiece; x2[2] = zPiece;
2254 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vX );
2255 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vX );
108bd0fe 2256 lowFLpiece.CreateAndInsertBoxCableSegment(1,90);
b7943f00 2257 lowFLpiece.ResetPoints();
2258
6932f314 2259 snprintf(ch, 20, "lowFLpieceB%i", i+4);
b7943f00 2260 lowFLpiece.SetName(ch);
2261 x1[0] = fgkHybridWidth/2 - piece3width;
2262 x2[0] = x1[0] - fgkHybFLlowHoleAmbDX;
2263 lowFLpiece.AddCheckPoint( hybrid, 0, x1, vX );
2264 lowFLpiece.AddCheckPoint( hybrid, 1, x2, vX );
108bd0fe 2265 lowFLpiece.CreateAndInsertBoxCableSegment(1,90);
b7943f00 2266 };
2267
2268 //**************************************************** chips+CC:
2269 AliITSv11GeomCableFlat chip("", fgkHybChipsDZ, chipsCCTotThick);
2270 chip.SetInitialNode(hybrid);
2271 chip.SetNLayers(5);
2272 chip.SetLayer(0, fgkHybUnderNiThick, niSDD, 2);
2273 chip.SetLayer(1, fgkHybGlueAgThick, glueAG, 4);
2274 chip.SetLayer(2, fgkHybChipThick, siliconSDD, fColorSilicon);
2275 chip.SetLayer(3, fgkHybUpCCThick+fgkHybUpCCThick, polyhamideSDD,
2276 fColorPolyhamide);
2277 chip.SetLayer(4, fgkHybAlCCThick+fgkHybAlCCThick, alSDD80p100, fColorAl);
2278 // Here the tho CC (low+up) are merged
2279 // In fact, the last layer has a smaller surface of Al -> I put 80%
2280
2281 x1[1] = lowLayerYmin + chipsCCTotThick/2;
2282 x2[1] = x1[1];
2283 char ch[20];
2284
2285 for (Int_t i=0; i<4; i++) {
6932f314 2286 snprintf(ch, 20, "pascalCC%i", i);
b7943f00 2287 chip.SetName(ch);
2288 x1[0] = fgkHybFLlowPasX - fgkHybridWidth/2 - fgkHybPascalDX/2;
2289 x2[0] = x1[0] + fgkHybPascalDX;
2290 x1[2] = zChips[i] - fgkHybridLength/2;
2291 x2[2] = x1[2];
2292 chip.AddCheckPoint( hybrid, 0, x1, vX );
2293 chip.AddCheckPoint( hybrid, 1, x2, vX );
108bd0fe 2294 chip.CreateAndInsertBoxCableSegment(1,-90);
b7943f00 2295 chip.ResetPoints();
2296
6932f314 2297 snprintf(ch, 20, "ambraCC%i", i);
b7943f00 2298 chip.SetName(ch);
2299 x1[0] = fgkHybFLlowAmbX - fgkHybridWidth/2 - fgkHybAmbraDX/2;
2300 x2[0] = x1[0] + fgkHybAmbraDX;
2301 chip.AddCheckPoint( hybrid, 0, x1, vX );
2302 chip.AddCheckPoint( hybrid, 1, x2, vX );
108bd0fe 2303 chip.CreateAndInsertBoxCableSegment(1,-90);
b7943f00 2304 chip.ResetPoints();
2305 };
c789ee28 2306
b7943f00 2307 //**************************************************** CC outside chips:
73dfc864 2308 // I don't think there is a second aluminium layer here ...
b7943f00 2309 for (Int_t i = 0; i<4; i++) {
6932f314 2310 snprintf(ch, 20, "ccLayerA%i", i);
b7943f00 2311
2312 AliITSv11GeomCableFlat ccLayer1(ch, 6.6*fgkmm, ccUpLayerTotThick);
2313 ccLayer1.SetInitialNode(hybrid);
2314 ccLayer1.SetNLayers(2);
2315 ccLayer1.SetLayer(0, 2*fgkHybUpCCThick, polyhamideSDD, fColorPolyhamide);
2316 ccLayer1.SetLayer(1, fgkHybAlCCThick, alSDD50p100, fColorAl);
2317 // Al at ~50%
2318
2319 x1[0] = -fgkHybridWidth/2;
2320 x2[0] = fgkHybFLlowPasX - fgkHybridWidth/2 - fgkHybPascalDX/2;
2321 x1[1] = lowLayerYmin + fgkHybUnderNiThick + fgkHybGlueAgThick
2322 + fgkHybChipThick + ccUpLayerTotThick/2;
2323 x2[1] = x1[1];
2324 x1[2] = zChips[i] - fgkHybridLength/2;
2325 x2[2] = x1[2];
2326 ccLayer1.AddCheckPoint( hybrid, 0, x1, vX );
2327 ccLayer1.AddCheckPoint( hybrid, 1, x2, vX );
108bd0fe 2328 ccLayer1.CreateAndInsertBoxCableSegment(1,-90);
b7943f00 2329
6932f314 2330 snprintf(ch, 20, "ccLayerB%i", i);
b7943f00 2331 AliITSv11GeomCableFlat ccLayer2(ch, fgkHybChipsDZ, ccUpLayerTotThick);
2332 ccLayer2.SetInitialNode(hybrid);
2333 ccLayer2.SetNLayers(2);
2334 ccLayer2.SetLayer(0, 2*fgkHybUpCCThick, polyhamideSDD, fColorPolyhamide);
2335 ccLayer2.SetLayer(1, fgkHybAlCCThick, alSDD50p100, fColorAl);
2336 // Al at ~50%
2337
2338 x1[0] = -fgkHybridWidth/2 + fgkHybFLlowPasX + fgkHybPascalDX/2;
2339 x2[0] = -fgkHybridWidth/2 + fgkHybFLlowAmbX - fgkHybAmbraDX/2;
2340 ccLayer2.AddCheckPoint( hybrid, 0, x1, vX );
2341 ccLayer2.AddCheckPoint( hybrid, 1, x2, vX );
108bd0fe 2342 ccLayer2.CreateAndInsertBoxCableSegment(1,-90);
b7943f00 2343 ccLayer2.ResetPoints();
6932f314 2344 snprintf(ch, 20, "ccLayerC%i", i);
b7943f00 2345 ccLayer2.SetName(ch);
2346 x1[0] = -fgkHybridWidth/2 + fgkHybFLlowAmbX + fgkHybAmbraDX/2;
2347 x2[0] = fgkHybridWidth/2 - fgkHybFLUpperWidth + 3*fgkmm;
2348 x1[1] = lowLayerYmin + lowFLTotalThick + flUpThick + fgkHybAlThick
2349 + ccUpLayerTotThick/2;
2350 x2[1] = x1[1];
2351
2352 ccLayer2.AddCheckPoint( hybrid, 0, x1, vX );
2353 ccLayer2.AddCheckPoint( hybrid, 1, x2, vX );
108bd0fe 2354 ccLayer2.CreateAndInsertBoxCableSegment(1,-90);
9c8369f9 2355
2356 //**************************************************** CC to sensors:
2357 // (alas, we cannot use GeomCableFlat here because section is not constant)
2358 Double_t xcc[6],ycc[6];
2359 xcc[0] = -0.5*ccLayer1.GetWidth();
2360 ycc[0] = 0;
2361 xcc[1] = 0.5*ccLayer1.GetWidth();
2362 ycc[1] = 0;
2363 xcc[2] = xcc[1];
2364 ycc[2] = -fgkHybCC2SensorLen;
2365 xcc[3] = xcc[2] - fgkHybCC2SensorWid;
2366 ycc[3] = ycc[2];
2367 xcc[4] = xcc[3];
2368 ycc[4] = 0.8*ycc[3];
2369 xcc[5] = xcc[0];
2370 ycc[5] = 0.2*ycc[3];
2371
2372 TGeoXtru* ccToSensPoliSh = new TGeoXtru(2);
2373 ccToSensPoliSh->DefinePolygon(6, xcc, ycc);
2374 ccToSensPoliSh->DefineSection(0, 0.);
2375 ccToSensPoliSh->DefineSection(1, ccLayer1.GetThickness());
2376
6932f314 2377 snprintf(ch, 20, "ccToSens%i", i);
9c8369f9 2378 TGeoVolume* ccToSensPoliVol = new TGeoVolume(ch, ccToSensPoliSh, polyhamideSDD);
2379 ccToSensPoliVol->SetLineColor(fColorPolyhamide);
2380
2381 TGeoXtru* ccToSensAlSh = new TGeoXtru(2);
2382 ccToSensAlSh->DefinePolygon(6, xcc, ycc);
2383 ccToSensAlSh->DefineSection(0, 0.);
2384 ccToSensAlSh->DefineSection(1, fgkHybAlCCThick);
2385
6932f314 2386 snprintf(ch, 20, "ccToSensAl%i", i);
9c8369f9 2387 TGeoVolume* ccToSensAlVol = new TGeoVolume(ch, ccToSensAlSh, alSDD50p100);
2388 ccToSensAlVol->SetLineColor(fColorAl);
2389
2390 ccToSensPoliVol->AddNode(ccToSensAlVol, 1, 0);
2391
2392 Double_t coord[3];
2393 ccLayer1.GetPoint(0,coord);
2394 hybrid->AddNode(ccToSensPoliVol, i+1,
2395 new TGeoCombiTrans(coord[0], coord[1], coord[2],
2396 new TGeoRotation("",-90-fgkHybCC2SensorAng, 90, 90)));
b7943f00 2397 };
c789ee28 2398
b7943f00 2399 //**************************************************** FL UP:
2400 // (last Al layer will be a special triangular shape)
2401 TGeoBBox *sFLupPolyhamide = new TGeoBBox("sFLupPolyhamide",
2402 fgkHybFLUpperWidth/2, flUpThick/2,
2403 fgkHybFLUpperLength/2);
2404 TGeoVolume *vFLupPolyhamide = new TGeoVolume("vFLupPolyhamide",
2405 sFLupPolyhamide, polyhamideSDD);
2406 vFLupPolyhamide->SetLineColor(fColorPolyhamide);
2407 TGeoTranslation *trFLupPolyhamide =
2408 new TGeoTranslation(fgkHybridWidth/2-fgkHybFLUpperWidth/2,
2409 lowLayerYmin+lowFLTotalThick+flUpThick/2,0);
2410
2411 hybrid->AddNode(vFLupPolyhamide, 1, trFLupPolyhamide);
2412
2413 TGeoArb8 *aluStrip = new TGeoArb8(fgkHybAlThick/2);
2414 aluStrip->SetVertex( 0,-fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2415 aluStrip->SetVertex( 1, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2416 aluStrip->SetVertex( 2, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth-fgkHybFLUpperAldx);
2417 aluStrip->SetVertex( 3,-fgkHybFLUpperAlDZ/2, 0);
2418 aluStrip->SetVertex( 4,-fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2419 aluStrip->SetVertex( 5, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
2420 aluStrip->SetVertex( 6, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth-fgkHybFLUpperAldx);
2421 aluStrip->SetVertex( 7,-fgkHybFLUpperAlDZ/2, 0);
2422 TGeoVolume *vAluStrip = new TGeoVolume("vAluStrip",aluStrip, alSDD50p100);
2423 // Al at ~50%
2424
2425 vAluStrip->SetLineColor(fColorAl);
531d6cdc 2426 //TGeoRotation rotAluStrip("rotAluStrip",0, -90, 90);
2427 TGeoRotation *rotAluStrip = new TGeoRotation("rotAluStrip",0, -90, 90);
2428
b7943f00 2429 Double_t yRotAluStrip = lowLayerYmin+lowFLTotalThick
2430 +flUpThick+fgkHybAlThick/2;
2431 TGeoCombiTrans *aluStripTr1 = new TGeoCombiTrans(
2432 fgkHybridWidth/2,yRotAluStrip,
531d6cdc 2433 fgkHybridLength/2-fgkHybFLlowChipZ1+1*fgkmm, rotAluStrip);
b7943f00 2434 TGeoCombiTrans *aluStripTr2 = new TGeoCombiTrans(*aluStripTr1);
2435 AddTranslationToCombiTrans(aluStripTr2,0,0,
2436 fgkHybFLlowChipZ1-fgkHybFLlowChipZ2);
2437 TGeoCombiTrans *aluStripTr3 = new TGeoCombiTrans(*aluStripTr2);
2438 AddTranslationToCombiTrans(aluStripTr3,0,0,
2439 fgkHybFLlowChipZ2-fgkHybFLlowChipZ3);
2440 TGeoCombiTrans *aluStripTr4 = new TGeoCombiTrans(*aluStripTr3);
2441 AddTranslationToCombiTrans(aluStripTr4,0,0,
2442 fgkHybFLlowChipZ3-fgkHybFLlowChipZ4);
2443
2444 hybrid->AddNode(vAluStrip, 1, aluStripTr1);
2445 hybrid->AddNode(vAluStrip, 2, aluStripTr2);
2446 hybrid->AddNode(vAluStrip, 3, aluStripTr3);
2447 hybrid->AddNode(vAluStrip, 4, aluStripTr4);
b7943f00 2448 //**************************************************** SMD:
2449 TGeoBBox *hybSMD = new TGeoBBox("ITSsddSMDshape",
2450 fgkHybSMDmiddleL/2+fgkHybSMDendL,
2451 fgkHybSMDheight/2,fgkHybSMDendW/2);
2452 TGeoVolume *vHybSMD = new TGeoVolume("ITSsddSMD",hybSMD,airSDD);
2453
2454 TGeoBBox *hybSMDmiddle = new TGeoBBox("ITSsddSMDmiddleShape",
2455 fgkHybSMDmiddleL/2,fgkHybSMDheight/2,
2456 fgkHybSMDmiddleW/2);
2457 TGeoVolume *vHybSMDmiddle = new TGeoVolume("ITSsddSMDmiddle",
2458 hybSMDmiddle,medSMD);
2459 vHybSMDmiddle->SetLineColor(fColorSMD);
2460 TGeoBBox *hybSMDend = new TGeoBBox("ITSsddSMDendShape",
2461 fgkHybSMDendL/2,fgkHybSMDheight/2,fgkHybSMDendW/2);
2462 TGeoVolume *vHybSMDend = new TGeoVolume("ITSsddSMDend",
2463 hybSMDend,medSMDweld);
2464 vHybSMDend->SetLineColor(fColorSMDweld);
2465 TGeoTranslation *vHybSMDendTr1 = new TGeoTranslation("",
2466 (fgkHybSMDmiddleL+fgkHybSMDendL)/2,0,0);
2467 TGeoTranslation *vHybSMDendTr2 = new TGeoTranslation("",
2468 -(fgkHybSMDmiddleL+fgkHybSMDendL)/2,0,0);
2469 vHybSMD->AddNode(vHybSMDmiddle,1,0);
2470 vHybSMD->AddNode(vHybSMDend,1,vHybSMDendTr1);
2471 vHybSMD->AddNode(vHybSMDend,2,vHybSMDendTr2);
2472 for (Int_t i=0; i<fgkNHybSMD; i++) {
2473 TGeoTranslation *vHybSMDtr = new TGeoTranslation("",
2474 -fgkHybridWidth/2+fgkHybSMDposX[i],
2475 lowLayerYmin+lowFLTotalThick+fgkHybSMDheight/2,
2476 -fgkHybridLength/2+fgkHybSMDposZ[i]);
2477 hybrid->AddNode(vHybSMD, i+1, vHybSMDtr);
2478 };
2479
b7943f00 2480 if (iLRSide == 0) {
2481 };
2482
2483 if(GetDebug(1)) hybrid->CheckOverlaps(0.01);
2484 hybrid->SetVisibility(kFALSE);
2485 return hybrid;
531d6cdc 2486}
c789ee28 2487
db486a6e 2488//________________________________________________________________________
73dfc864 2489TGeoVolume* AliITSv11GeometrySDD::CreateLadderSegment(Int_t iLay, Int_t iSeg) {
b7943f00 2490 //
73dfc864 2491 // Return a TGeoVolume* containing a segment of a ladder.
b7943f00 2492 //
2493
e118532f 2494 TGeoMedium *phynoxSDD = GetMedium("INOX$");
108bd0fe 2495 TGeoMedium *coolerMediumSDD = GetMedium("WATER$");
73dfc864 2496 TGeoMedium *airSDD = GetMedium("SDD AIR$");
9c8369f9 2497 TGeoMedium *alSDD = GetMedium("AL$");
b7943f00 2498
2499 Double_t tDY = fgkLadderSegBoxDH/2; //space left on top of the ladder
2500 Double_t segmentLength = fgkSegmentLength;
2501 Double_t spaceBetweenCables = 500*fgkmicron;
2502
2503 //*****************************************
2504 // Set parameters according to (iLay,iSeg):
2505 //*****************************************
2506 Int_t nDetectors = fgkLay3Ndet;
2507 Double_t coolPipeSuppH = fgkLay3CoolPipeSuppH;
2508 Double_t sensorCenterZPos = fLay3sensorZPos[iSeg]-
2509 (fgkSegmentLength*fgkLay3Ndet/2. -
2510 fgkSegmentLength/2-(iSeg)*fgkSegmentLength);
2511 // sensorCenterZPos = z in segment local coord syst.
2512
2513 AliITSv11GeomCableFlat *digitCableA = fDigitCableLay3A;
2514 AliITSv11GeomCableFlat *digitCableB = fDigitCableLay3B;
2515
2516 if (iLay==3) {
2517 } else if (iLay==4) {
2518 nDetectors = fgkLay4Ndet;
2519 coolPipeSuppH = fgkLay4CoolPipeSuppH;
2520 sensorCenterZPos = fLay4sensorZPos[iSeg]-
2521 (fgkSegmentLength*fgkLay4Ndet/2. -
2522 fgkSegmentLength/2-(iSeg)*fgkSegmentLength);
2523 digitCableA = fDigitCableLay4A;
2524 digitCableB = fDigitCableLay4B;
2525 } else
2526 printf("AliITSv11GeometrySDD::CreateLadderSegment Wrong layer index !");
2527
2528
2529 Double_t cableSideSign = -1;
2530 if (iSeg<nDetectors/2) cableSideSign = 1;
2531 Double_t spaceForCables = spaceBetweenCables*
2532 (nDetectors-TMath::Abs(nDetectors-2*iSeg-1)-1)/2
2533 +0.1*fgkmicron;
2534 // gives [0-1-2-2-1-0]*spaceBetweenCables
2535 // or [0-1-2-3-3-2-1-0]*spaceBetweenCables
2536 Int_t iUpdateCableMin;
2537 Int_t iUpdateCableMax;
2538 if (cableSideSign==-1) {
2539 iUpdateCableMin = nDetectors/2;
2540 iUpdateCableMax = iSeg-1;
2541 } else {
2542 iUpdateCableMin = iSeg+1;
2543 iUpdateCableMax = nDetectors/2-1;
2544 };
2545
2546 if(GetDebug(1)){
2547 cout << "Segment ("<< iLay <<',' << iSeg
2548 << ") : sensor z shift in local segment coord.="
2549 << sensorCenterZPos << endl;
2550 };
2551
2552 //****************************
2553 // The segment volume
2554 //****************************
108bd0fe 2555
73dfc864 2556 // Use of TGeoVolumeAssembly increases the calculation time of overlaps and very
2557 // likely slows down the transport of particles through the geometry
2558
2559 //TGeoVolumeAssembly *virtualSeg = new TGeoVolumeAssembly("ITSsddSegment");
2560
9c8369f9 2561// TGeoBBox *segBox = new TGeoBBox("ITSsddSegBox",
2562// fgkLadderWidth/2+fgkPinSuppWidth+fgkLadderSegBoxDW,
2563// fgkLadderHeight/2+fgkLadderSegBoxDH/2,
2564// segmentLength/2);
2565 // A shaped Xtru instead of a simple BBox to avoid overlaps and extrusions
2566 TGeoXtru *segBox = new TGeoXtru(2);
2567 segBox->SetName("ITSsddSegBox");
2568
2569 Double_t xseg[8],yseg[8];
2570 xseg[0] = -(fgkLadderWidth/2+fgkPinSuppWidth+fgkLadderSegBoxDW);
2571 yseg[0] = fgkLadderHeight/2+fgkLadderSegBoxDH/2;
2572 xseg[1] = xseg[0];
2573 yseg[1] = -yseg[0];
2574 xseg[2] = -xseg[1];
2575 yseg[2] = yseg[1];
2576 xseg[3] = xseg[2];
2577 yseg[3] = yseg[0];
2578 xseg[4] = 0.35*xseg[3];
2579 yseg[4] = yseg[3];
2580 xseg[5] = xseg[4];
2581 yseg[5] = yseg[4] + fgkLadderSegBoxDHCorr;
2582 xseg[6] = -xseg[4];
2583 yseg[6] = yseg[5];
2584 xseg[7] = xseg[6];
2585 yseg[7] = yseg[0];
2586
2587 segBox->DefinePolygon(8, xseg, yseg);
2588 segBox->DefineSection(0,-segmentLength/2);
2589 segBox->DefineSection(1, segmentLength/2);
2590
73dfc864 2591 TGeoVolume *virtualSeg = new TGeoVolume("ITSsddSegment",
2592 segBox, airSDD);
2593 virtualSeg->SetVisibility(kFALSE);
b7943f00 2594
2595 //******************************
2596 // Carbon fiber structure :
2597 //******************************
2598
2599 virtualSeg->AddNode(fLaddSegCommonVol[0], 1, fLaddSegCommonTr[0]);
2600 Int_t volumeIndex = 1;
2601 for (Int_t i = 1; i<fgkNladdSegCommonVol;i++ ) {
2602 if (fLaddSegCommonVol[i]==fLaddSegCommonVol[i-1])
2603 volumeIndex++;
2604 else
2605 volumeIndex = 1;
2606 virtualSeg->AddNode(fLaddSegCommonVol[i], volumeIndex,
2607 fLaddSegCommonTr[i]);
2608 };
2609
2610 //**********************************
2611 // Pine support of the sensors :
2612 //**********************************
531d6cdc 2613 TGeoRotation *rotPS1 = new TGeoRotation("",0,-90,90);
2614 TGeoRotation *rotPS2 = new TGeoRotation("",0,-90,-90);
2615
73dfc864 2616 // The use of the following constructor type allow to use rotPS1 and rotPS2
2617 // (and not copy them) therefore we gain some memory
b7943f00 2618 TGeoCombiTrans *transPS1 = new TGeoCombiTrans( fgkPinDYOnSensor,
2619 - fgkLadderHeight/2.-tDY
2620 + fgkPinSuppHeight/2.,
531d6cdc 2621 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
73dfc864 2622
2623 TGeoCombiTrans *transPS2 = new TGeoCombiTrans( fgkPinDYOnSensor,
2624 - fgkLadderHeight/2.-tDY
2625 + fgkPinSuppHeight/2.,
2626 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
b7943f00 2627 AddTranslationToCombiTrans(transPS2, 0, 0, fgkPinPinDDXOnSensor);
73dfc864 2628
2629 TGeoCombiTrans *transPS3 = new TGeoCombiTrans( fgkPinDYOnSensor,
2630 - fgkLadderHeight/2.-tDY
2631 + fgkPinSuppHeight/2.,
2632 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
b7943f00 2633 AddTranslationToCombiTrans(transPS3, 0, 0, -2*fgkPinDXminOnSensor);
73dfc864 2634
2635 TGeoCombiTrans *transPS4 = new TGeoCombiTrans( fgkPinDYOnSensor,
2636 - fgkLadderHeight/2.-tDY
2637 + fgkPinSuppHeight/2.,
2638 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2639 AddTranslationToCombiTrans(transPS4, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
b7943f00 2640
2641 TGeoCombiTrans *transPS5 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2642 - fgkLadderHeight/2. - tDY
2643 + fgkPinSuppHeight/2.,
531d6cdc 2644 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
73dfc864 2645
2646 TGeoCombiTrans *transPS6 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2647 - fgkLadderHeight/2. - tDY
2648 + fgkPinSuppHeight/2.,
2649 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
b7943f00 2650 AddTranslationToCombiTrans(transPS6, 0, 0, fgkPinPinDDXOnSensor);
73dfc864 2651
2652 TGeoCombiTrans *transPS7 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2653 - fgkLadderHeight/2. - tDY
2654 + fgkPinSuppHeight/2.,
2655 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
b7943f00 2656 AddTranslationToCombiTrans(transPS7, 0, 0, -2*fgkPinDXminOnSensor);
73dfc864 2657
2658 TGeoCombiTrans *transPS8 = new TGeoCombiTrans( -fgkPinDYOnSensor,
2659 - fgkLadderHeight/2. - tDY
2660 + fgkPinSuppHeight/2.,
2661 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2662 AddTranslationToCombiTrans(transPS8, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
b7943f00 2663
2664 virtualSeg->AddNode(fPinSupport, 1, transPS1);
2665 virtualSeg->AddNode(fPinSupport, 2, transPS2);
2666 virtualSeg->AddNode(fPinSupport, 3, transPS3);
2667 virtualSeg->AddNode(fPinSupport, 4, transPS4);
2668 virtualSeg->AddNode(fPinSupport, 5, transPS5);
2669 virtualSeg->AddNode(fPinSupport, 6, transPS6);
2670 virtualSeg->AddNode(fPinSupport, 7, transPS7);
2671 virtualSeg->AddNode(fPinSupport, 8, transPS8);
e118532f 2672
9c8369f9 2673 TGeoMedium *pinMed = GetMedium("RYTON$");
e118532f 2674 Double_t fgkPinHeight = 4.5*fgkmm;
2675 TGeoTube *pineS = new TGeoTube("ITSsddPin",0,fgkPinR,
2676 fgkPinHeight/2.);
2677 TGeoVolume *pineV = new TGeoVolume("ITSsddPinVol", pineS, pinMed);
2678
2679 TGeoCombiTrans *transPS2b = new TGeoCombiTrans( fgkPinDYOnSensor,
2680 - fgkLadderHeight/2.-tDY
2681 + fgkPinHeight/2.,
2682 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2683 AddTranslationToCombiTrans(transPS2b, 0, 0, fgkPinPinDDXOnSensor);
2684 virtualSeg->AddNode(pineV, 1, transPS2b);
2685
2686 TGeoCombiTrans *transPS6b = new TGeoCombiTrans( -fgkPinDYOnSensor,
2687 - fgkLadderHeight/2. - tDY
2688 + fgkPinHeight/2.,
2689 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2690 AddTranslationToCombiTrans(transPS6b, 0, 0, fgkPinPinDDXOnSensor);
2691 virtualSeg->AddNode(pineV, 2, transPS6b);
2692
2693
2694 TGeoCombiTrans *transPS4b = new TGeoCombiTrans( fgkPinDYOnSensor,
2695 - fgkLadderHeight/2.-tDY
2696 + fgkPinHeight/2.,
2697 sensorCenterZPos+fgkPinDXminOnSensor,rotPS1);
2698 AddTranslationToCombiTrans(transPS4b, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
2699 virtualSeg->AddNode(pineV, 3, transPS4b);
2700
2701 TGeoCombiTrans *transPS8b = new TGeoCombiTrans( -fgkPinDYOnSensor,
2702 - fgkLadderHeight/2. - tDY
2703 + fgkPinHeight/2.,
2704 sensorCenterZPos+fgkPinDXminOnSensor,rotPS2);
2705 AddTranslationToCombiTrans(transPS8b, 0, 0, -2*fgkPinDXminOnSensor-fgkPinPinDDXOnSensor);
2706 virtualSeg->AddNode(pineV, 4, transPS8b);
2707
2708
b7943f00 2709 //******************************
2710 // Cooling pipe supports :
2711 //******************************
2712 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
2713 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
2714 Double_t triangleCPaxeDist = fgkCoolPipeSuppAxeDist-fgkCoolPipeSuppWidthExt-
2715 fgkCoolPipeSuppWidthIn+fgkLadderBeamRadius;
2716
2717 Double_t coolPipeSuppL = TMath::Tan(halfTheta)*
2718 (triangleHeight+triangleCPaxeDist/
2719 TMath::Sin(halfTheta)-coolPipeSuppH);
2720 if (fAddCoolingSyst) {
531d6cdc 2721 TGeoRotation *rotCPS2 = new TGeoRotation("", -halfTheta*TMath::RadToDeg(), -90, 90);
2722 TGeoRotation *rotCPS1 = new TGeoRotation("", halfTheta*TMath::RadToDeg(), -90, -90);
b7943f00 2723 TGeoCombiTrans *transCPS1 = new TGeoCombiTrans(coolPipeSuppL,
fa4639a3 2724 -fgkLadderHeight/2. - tDY
b7943f00 2725 +coolPipeSuppH+fgkLadderBeamRadius,
531d6cdc 2726 -segmentLength/2., rotCPS1);
73dfc864 2727
2728 TGeoCombiTrans *transCPS3 = new TGeoCombiTrans(coolPipeSuppL,
2729 -fgkLadderHeight/2. - tDY
2730 +coolPipeSuppH+fgkLadderBeamRadius,
2731 -segmentLength/2., rotCPS1);
b7943f00 2732 AddTranslationToCombiTrans(transCPS3, 0, 0, segmentLength);
2733
2734 TGeoCombiTrans *transCPS2 = new TGeoCombiTrans(-coolPipeSuppL,
fa4639a3 2735 -fgkLadderHeight/2.- tDY
b7943f00 2736 +coolPipeSuppH+fgkLadderBeamRadius,
531d6cdc 2737 segmentLength/2., rotCPS2);
73dfc864 2738
2739 TGeoCombiTrans *transCPS4 = new TGeoCombiTrans(-coolPipeSuppL,
2740 -fgkLadderHeight/2.- tDY
2741 +coolPipeSuppH+fgkLadderBeamRadius,
2742 segmentLength/2., rotCPS2);
b7943f00 2743 AddTranslationToCombiTrans(transCPS4, 0, 0, -segmentLength);
2744
2745 virtualSeg->AddNode(fCoolPipeSupportL, 1, transCPS1);
2746 virtualSeg->AddNode(fCoolPipeSupportL, 2, transCPS2);
2747 virtualSeg->AddNode(fCoolPipeSupportR, 1, transCPS3);
2748 virtualSeg->AddNode(fCoolPipeSupportR, 2, transCPS4);
2749 };
2750
2751 //************************
2752 // Cooling pipes :
2753 //************************
2754 TGeoTranslation *pipeTr1 = new TGeoTranslation(coolPipeSuppL,
2755 -fgkLadderHeight/2. - tDY +
2756 fgkLadderBeamRadius+coolPipeSuppH, 0);
2757 TGeoTranslation *pipeTr2 = new TGeoTranslation(-coolPipeSuppL,
2758 -fgkLadderHeight/2.- tDY +
2759 fgkLadderBeamRadius+coolPipeSuppH, 0);
2760
2761 if (fAddCoolingSyst) {
108bd0fe 2762 TGeoTube *coolingPipeShape = new TGeoTube( fgkCoolPipeInnerDiam/2,
2763 fgkCoolPipeOuterDiam/2,
2764 segmentLength/2);
2765 TGeoTube *coolerShape = new TGeoTube( 0, fgkCoolPipeInnerDiam/2,
2766 segmentLength/2);
2767
2768 TGeoVolume *coolingPipe = new TGeoVolume("ITSsddCoolingPipe",
2769 coolingPipeShape, phynoxSDD );
2770 coolingPipe->SetLineColor(fColorPhynox);
2771 TGeoVolume *cooler = new TGeoVolume("ITSsddCoolingLiquid",coolerShape,
2772 coolerMediumSDD );
2773
2774
2775 virtualSeg->AddNode(coolingPipe, 1, pipeTr1);
2776 virtualSeg->AddNode(coolingPipe, 2, pipeTr2);
2777 if (fCoolingOn) {
2778 virtualSeg->AddNode(cooler, 1, pipeTr1);
2779 virtualSeg->AddNode(cooler, 2, pipeTr2);
2780 };
b7943f00 2781 };
c789ee28 2782
b7943f00 2783 //**********************************
2784 // Bases of hybrid thermal bridges
2785 //**********************************
2786 Double_t shiftHyb = 1.05; // shift between thermal Bridge base and thermal bridge
2787 // approx !!! not clear on 0752/14-A
2788 if (fAddCoolingSyst) {
73dfc864 2789 TGeoRotation rotHybrid1("", 0, 0, -90 - fgkHybridAngle);
2790 TGeoRotation rotHybrid2("", 0 ,180, 90 - fgkHybridAngle);
2791 TGeoCombiTrans *baseTr1 = new TGeoCombiTrans(*pipeTr2, rotHybrid1);
2792 TGeoCombiTrans *baseTr2 = new TGeoCombiTrans(*pipeTr1, rotHybrid2);
b7943f00 2793
2794 virtualSeg->AddNode(fBaseThermalBridge, 1, baseTr1);
2795 virtualSeg->AddNode(fBaseThermalBridge, 2, baseTr2);
2796 };
2797
2798 //*************************
2799 // the 2 hybrids :
2800 //*************************
2801 Double_t hybDy = ((TGeoBBox*)fHybrid->GetShape())->GetDY();
2802 Double_t distAxeToHybridCenter = fgkBTBaxisAtoBase+hybDy;
2803
2804 Double_t hybrVolX = ( distAxeToHybridCenter*CosD(fgkHybridAngle)
2805 - shiftHyb*SinD(fgkHybridAngle) );
2806 Double_t hybrVolY = ( distAxeToHybridCenter*SinD(fgkHybridAngle)
2807 + shiftHyb*CosD(fgkHybridAngle) );
2808 if (fAddHybrids) {
2809 TGeoRotation rotHybrid3("", 0, 0, 90. - fgkHybridAngle);
2810 TGeoRotation rotHybrid4("", 0 ,180, -90. - fgkHybridAngle);
2811 TGeoCombiTrans *hybTr1 = new TGeoCombiTrans(*pipeTr2, rotHybrid3);
2812 TGeoCombiTrans *hybTr2 = new TGeoCombiTrans(*pipeTr1, rotHybrid4);
2813 AddTranslationToCombiTrans( hybTr1, -hybrVolX, hybrVolY, 0);
2814 AddTranslationToCombiTrans( hybTr2, hybrVolX, hybrVolY, 0);
2815
2816 virtualSeg->AddNode(fHybrid, 1, hybTr1);
2817 virtualSeg->AddNode(fHybrid, 2, hybTr2);
2818 };
2819
2820 //***********
2821 // cables
2822 //***********
2823 if (fAddCables) {
2824 // Starting from this segment
9c8369f9 2825 Double_t hybDz = ((TGeoXtru*)fHybrid->GetShape())->GetZ(1);
2826 Double_t hybDx = ((TGeoXtru*)fHybrid->GetShape())->GetX(1);
b7943f00 2827 Double_t posDigitCableAlongHyb = shiftHyb+ hybDx
2828 - digitCableA->GetWidth()/2;
2829 Double_t distAxeToDigitCableCenter = distAxeToHybridCenter+hybDy
2830 - digitCableA->GetThickness()/2;
2831
2832 Double_t digitCableX = ( coolPipeSuppL
2833 + distAxeToDigitCableCenter*CosD(fgkHybridAngle)
2834 - posDigitCableAlongHyb*SinD(fgkHybridAngle) );
2835 Double_t digitCableY = ( - fgkLadderHeight/2.-TMath::Abs(tDY)
2836 + fgkLadderBeamRadius+coolPipeSuppH
2837 + distAxeToDigitCableCenter*SinD(fgkHybridAngle)
2838 + posDigitCableAlongHyb*CosD(fgkHybridAngle) );
2839
2840
2841 Double_t digitCableCenterA0[3]={ -cableSideSign*digitCableX,
2842 digitCableY, cableSideSign*hybDz };
2843 Double_t digitCableCenterA1[3] = {
2844 -cableSideSign*(digitCableX+spaceForCables*CosD(fgkHybridAngle)),
2845 digitCableY+spaceForCables*SinD(fgkHybridAngle),
2846 cableSideSign*segmentLength/2 };
2847
2848 Double_t digitCableCenterB0[3]={ cableSideSign*digitCableX,
2849 digitCableY,cableSideSign*hybDz};
2850 Double_t digitCableCenterB1[3]={
2851 cableSideSign*(digitCableX+spaceForCables*CosD(fgkHybridAngle)),
2852 digitCableY+spaceForCables*SinD(fgkHybridAngle),
2853 cableSideSign*segmentLength/2 };
2854
2855 Double_t vZ[3] = {0,0,1};
2856 digitCableA[iSeg].AddCheckPoint( virtualSeg, 0, digitCableCenterA0, vZ);
2857 digitCableA[iSeg].AddCheckPoint( virtualSeg, 1, digitCableCenterA1, vZ);
2858 digitCableB[iSeg].AddCheckPoint( virtualSeg, 0, digitCableCenterB0, vZ);
2859 digitCableB[iSeg].AddCheckPoint( virtualSeg, 1, digitCableCenterB1, vZ);
2860
2861 // Updating the other cables
2862 for (Int_t iCable=iUpdateCableMin; iCable<=iUpdateCableMax; iCable++) {
2863
2864 Int_t iPoint = TMath::Abs(iCable-iSeg)+1;
2865 Double_t coord[3];
2866 digitCableA[iCable].GetPoint( 1, coord);
2867 digitCableA[iCable].AddCheckPoint( virtualSeg, iPoint, coord, vZ);
2868 digitCableB[iCable].GetPoint( 1, coord);
2869 digitCableB[iCable].AddCheckPoint( virtualSeg, iPoint, coord, vZ);
2870 };
9c8369f9 2871
2872 // Now the small Al foil on the same hybrid side
2873 Double_t xfoil[5],yfoil[5];
2874 hybDx *= 0.95;
2875 xfoil[0] = -fgkHybridAlFoilWide/2;
2876 yfoil[0] = hybDx;
2877 xfoil[1] = fgkHybridAlFoilWide/2;
2878 yfoil[1] = yfoil[0];
2879 xfoil[2] = xfoil[1];
2880 yfoil[2] = -hybDx + (fgkHybridAlFoilWide - fgkHybridAlFoilSide);
2881 xfoil[3] = xfoil[0] + fgkHybridAlFoilSide;
2882 yfoil[3] = -hybDx;
2883 xfoil[4] = xfoil[0];
2884 yfoil[4] = yfoil[3];
2885
2886 TGeoXtru* alFoilSh = new TGeoXtru(2);
2887 alFoilSh->DefinePolygon(5, xfoil, yfoil);
2888 alFoilSh->DefineSection(0,-fgkHybridAlFoilThick/2);
2889 alFoilSh->DefineSection(1, fgkHybridAlFoilThick/2);
2890
2891 TGeoVolume* alFoilVol = new TGeoVolume("ITSsddAlFoilHybSide", alFoilSh, alSDD);
2892 alFoilVol->SetLineColor(fColorAl);
2893
2894 Double_t zFoilTrans = cableSideSign*(hybDz + alFoilSh->GetX(1));
2895 TGeoRotation rotFoil3;
2896 TGeoRotation rotFoil4;
2897 if (cableSideSign > 0) {
2898 rotFoil3 = TGeoRotation("", 90-fgkHybridAngle, -90, -90);
2899 rotFoil4 = TGeoRotation("",-90+fgkHybridAngle, 90, 90);
2900 } else {
2901 rotFoil3 = TGeoRotation("", 90-fgkHybridAngle, 90, -90);
2902 rotFoil4 = TGeoRotation("",-90+fgkHybridAngle, -90, 90);
2903 }
2904 TGeoCombiTrans *foiTr1 = new TGeoCombiTrans(*pipeTr2, rotFoil3);
2905 TGeoCombiTrans *foiTr2 = new TGeoCombiTrans(*pipeTr1, rotFoil4);
2906 AddTranslationToCombiTrans( foiTr1, -hybrVolX, hybrVolY, zFoilTrans);
2907 AddTranslationToCombiTrans( foiTr2, hybrVolX, hybrVolY, zFoilTrans);
2908
2909 virtualSeg->AddNode(alFoilVol, 1, foiTr1);
2910 virtualSeg->AddNode(alFoilVol, 2, foiTr2);
b7943f00 2911 };
2912
2913 //**********************************
2914 if(GetDebug(1)) virtualSeg->CheckOverlaps(0.01);
b7943f00 2915 return virtualSeg;
531d6cdc 2916}
db486a6e 2917
c789ee28 2918
2919//________________________________________________________________________
2920TGeoVolume* AliITSv11GeometrySDD::CreatePinSupport() {
2921//
e118532f 2922// Create a pine support and its pine
c789ee28 2923// axis of rotation is the cone axis, center in its middle
2924//
9c8369f9 2925 TGeoMedium *rytonSDD = GetMedium("RYTON$");
e118532f 2926
b7943f00 2927 TGeoCone *cone = new TGeoCone("ITSsddPinSuppCone",fgkPinSuppHeight/2.,
2928 0,fgkPinSuppRmax,0,fgkPinSuppRmax-
2929 fgkPinSuppHeight*TanD(fgkPinSuppConeAngle) );
2930 TGeoBBox *tong = new TGeoBBox("ITSsddPinSuppTong",fgkPinSuppRmax,
2931 fgkPinSuppLength/2.,fgkPinSuppThickness/2.);
2932 TGeoTube *hole = new TGeoTube("ITSsddPinSuppHole",0,fgkPinR,
e118532f 2933 fgkPinSuppHeight/2.+0.00001);
2934 // 0.00001 is for seing the actual hole (avoid viewer artefact)
2935
c789ee28 2936 if(GetDebug(3)){// Remove compiler warning.
db486a6e 2937 cone->InspectShape();
2938 tong->InspectShape();
2939 hole->InspectShape();
c789ee28 2940 };
db486a6e 2941
2942 TGeoTranslation *tongTrans = new TGeoTranslation("ITSsddPinSuppTongTr",0,
b7943f00 2943 fgkPinSuppLength/2.,-fgkPinSuppHeight/2.+fgkPinSuppThickness/2.);
db486a6e 2944 tongTrans->RegisterYourself();
2945 TGeoCompositeShape *pinSupportShape = new TGeoCompositeShape(
b7943f00 2946 "ITSsddPinSupportShape","(ITSsddPinSuppCone+"
e118532f 2947 "ITSsddPinSuppTong:ITSsddPinSuppTongTr)-ITSsddPinSuppHole");
db486a6e 2948
e118532f 2949 TGeoVolume *pinSupport = new TGeoVolume("ITSsddPinSupport", pinSupportShape,
db486a6e 2950 rytonSDD);
c789ee28 2951 pinSupport->SetLineColor(fColorRyton);
e118532f 2952
db486a6e 2953 return pinSupport;
531d6cdc 2954}
c789ee28 2955
b7943f00 2956
db486a6e 2957//________________________________________________________________________
c789ee28 2958TGeoVolume* AliITSv11GeometrySDD::CreateCoolPipeSupportL() {
2959//
2960// Create half of the cooling pipe support (ALR-0752/3)
2961//
2962
b7943f00 2963 Double_t diffX = fgkCoolPipeSuppHeight*TanD(fgkCoolPipeSuppAngle);
c789ee28 2964
b7943f00 2965 TGeoArb8 *side1 = new TGeoArb8(fgkCoolPipeSuppHeight/2.);
8f20b5e4 2966 side1->SetName("ITSsddCPSside1");
b7943f00 2967 side1->SetVertex( 0, 0, -fgkCoolPipeSuppWidthExt/2.);
8f20b5e4 2968 side1->SetVertex( 1, 0, fgkCoolPipeSuppWidthExt/2.);
b7943f00 2969 side1->SetVertex( 2, fgkCoolPipeSuppMaxLength/2.-diffX,
2970 fgkCoolPipeSuppWidthExt/2.);
8f20b5e4 2971 side1->SetVertex( 3, fgkCoolPipeSuppMaxLength/2.-diffX,
b7943f00 2972 -fgkCoolPipeSuppWidthExt/2.);
8f20b5e4 2973 side1->SetVertex( 4, 0, -fgkCoolPipeSuppWidthExt/2.);
2974 side1->SetVertex( 5, 0, fgkCoolPipeSuppWidthExt/2.);
b7943f00 2975 side1->SetVertex( 6, fgkCoolPipeSuppMaxLength/2.,
2976 fgkCoolPipeSuppWidthExt/2.);
8f20b5e4 2977 side1->SetVertex( 7, fgkCoolPipeSuppMaxLength/2.,
2978 -fgkCoolPipeSuppWidthExt/2.);
c789ee28 2979
2980 TGeoTranslation *side1Tr = new TGeoTranslation("ITSsddCPStr1",0,
b7943f00 2981 - fgkCoolPipeSuppAxeDist
2982 + fgkCoolPipeSuppWidthExt/2., 0);
c789ee28 2983 side1Tr->RegisterYourself();
2984 TGeoTranslation *side2Tr = new TGeoTranslation("ITSsddCPStr2",0,
b7943f00 2985 - fgkCoolPipeSuppAxeDist
2986 + fgkCoolPipeSuppWidthExt*3/2.
2987 + fgkCoolPipeSuppWidthIn,0);
c789ee28 2988 side2Tr->RegisterYourself();
2989
2990 TGeoBBox *middle = new TGeoBBox("ITSsddCPSmiddle",
b7943f00 2991 (fgkCoolPipeSuppMaxLength/2.-fgkCoolPipeSuppSlitL)/2.,
2992 fgkCoolPipeSuppWidthIn/2., fgkCoolPipeSuppHeight/2.);
c789ee28 2993 TGeoTranslation *middleTr =
2994 new TGeoTranslation("ITSsddCPStr3",
b7943f00 2995 (fgkCoolPipeSuppMaxLength/2.-fgkCoolPipeSuppSlitL)/2.,
2996 -fgkCoolPipeSuppAxeDist+fgkCoolPipeSuppWidthExt
2997 +fgkCoolPipeSuppWidthIn/2., 0);
c789ee28 2998 middleTr->RegisterYourself();
2999
3000 TGeoBBox *axeBox = new TGeoBBox("ITSsddCPSaxeBox",
b7943f00 3001 fgkCoolPipeSuppTongW/4.,
3002 (fgkCoolPipeSuppFulWidth
3003 - 2*fgkCoolPipeSuppWidthExt
3004 - fgkCoolPipeSuppWidthIn)/2,
3005 fgkCoolPipeSuppHeight/2.);
c789ee28 3006
3007 TGeoTranslation *axeBoxTr = new TGeoTranslation("ITSsddCPSAxBoxTr",
b7943f00 3008 fgkCoolPipeSuppTongW/4.,
3009 - fgkCoolPipeSuppAxeDist
3010 + fgkCoolPipeSuppFulWidth
c789ee28 3011 - axeBox->GetDY(), 0);
3012 axeBoxTr->RegisterYourself();
3013
b7943f00 3014 TGeoTube *axe = new TGeoTube("ITSsddCPSaxe",0,fgkCoolPipeSuppHoleDiam/2.,
3015 fgkCoolPipeSuppTongW/4.);
c789ee28 3016
531d6cdc 3017 TGeoRotation *axeRot = new TGeoRotation("ITSsddCPSaxeRot",90,90,0);
c789ee28 3018 TGeoCombiTrans *axeTrans = new TGeoCombiTrans("ITSsddCPSaxeTr",
531d6cdc 3019 fgkCoolPipeSuppTongW/4.,0,0,axeRot);
c789ee28 3020 axeTrans->RegisterYourself();
531d6cdc 3021 //delete axeRot; // make the code crash, no idea of why !!!
c789ee28 3022
3023 if(GetDebug(3)){
3024 middle->InspectShape();
3025 axe->InspectShape();
3026 };
3027
9c8369f9 3028 TGeoMedium *rytonSDD = GetMedium("RYTON$");
c789ee28 3029
3030 TGeoCompositeShape *coolPipeSuppShape = new TGeoCompositeShape(
3031 "ITSsddCoolPipeSuppShapeL",
3032 "ITSsddCPSmiddle:ITSsddCPStr3"
3033 "+ITSsddCPSside1:ITSsddCPStr1"
3034 "+ITSsddCPSside1:ITSsddCPStr2"
3035 "+ITSsddCPSaxeBox:ITSsddCPSAxBoxTr"
3036 "-ITSsddCPSaxe:ITSsddCPSaxeTr");
3037 TGeoVolume *coolPipeSupp = new TGeoVolume("ITSsddCoolPipeSupportL",
3038 coolPipeSuppShape, rytonSDD);
3039
3040 coolPipeSupp->SetLineColor(fColorRyton);
531d6cdc 3041
c789ee28 3042 return coolPipeSupp;
531d6cdc 3043}
3044
c789ee28 3045
3046//________________________________________________________________________
3047TGeoVolume* AliITSv11GeometrySDD::CreateCoolPipeSupportR() {
3048//
3049//Create half of the cooling pipe support (ALR-0752/3)
3050//
3051
b7943f00 3052 Double_t diffX = fgkCoolPipeSuppHeight*TanD(fgkCoolPipeSuppAngle);
c789ee28 3053
b7943f00 3054 TGeoArb8 *side1 = new TGeoArb8(fgkCoolPipeSuppHeight/2.);
8f20b5e4 3055 side1->SetName("ITSsddCPSside1R");
b7943f00 3056 side1->SetVertex( 0, 0, -fgkCoolPipeSuppWidthExt/2.);
3057 side1->SetVertex( 1, -(fgkCoolPipeSuppMaxLength/2.-diffX),
3058 -fgkCoolPipeSuppWidthExt/2.);
3059 side1->SetVertex( 2, -(fgkCoolPipeSuppMaxLength/2.-diffX),
3060 fgkCoolPipeSuppWidthExt/2.);
3061 side1->SetVertex( 3, 0, fgkCoolPipeSuppWidthExt/2.);
3062 side1->SetVertex( 4, 0, -fgkCoolPipeSuppWidthExt/2.);
3063 side1->SetVertex( 5, -fgkCoolPipeSuppMaxLength/2.,
3064 -fgkCoolPipeSuppWidthExt/2.);
3065 side1->SetVertex( 6, -fgkCoolPipeSuppMaxLength/2.,
3066 fgkCoolPipeSuppWidthExt/2.);
3067 side1->SetVertex( 7, 0, fgkCoolPipeSuppWidthExt/2.);
c789ee28 3068
3069 TGeoTranslation *side1Tr = new TGeoTranslation("ITSsddCPStr1R",0,
b7943f00 3070 - fgkCoolPipeSuppAxeDist
3071 + fgkCoolPipeSuppWidthExt/2., 0);
c789ee28 3072 side1Tr->RegisterYourself();
3073 TGeoTranslation *side2Tr = new TGeoTranslation("ITSsddCPStr2R",0,
b7943f00 3074 - fgkCoolPipeSuppAxeDist
3075 + fgkCoolPipeSuppWidthExt*3/2.
3076 + fgkCoolPipeSuppWidthIn, 0);
c789ee28 3077 side2Tr->RegisterYourself();
3078
3079 TGeoBBox *middle = new TGeoBBox("ITSsddCPSmiddleR",
b7943f00 3080 (fgkCoolPipeSuppMaxLength/2.
3081 - fgkCoolPipeSuppSlitL)/2.,
3082 fgkCoolPipeSuppWidthIn/2.,
3083 fgkCoolPipeSuppHeight/2.);
c789ee28 3084 TGeoTranslation *middleTr =
3085 new TGeoTranslation("ITSsddCPStr3R",
b7943f00 3086 -( fgkCoolPipeSuppMaxLength/2.
3087 -fgkCoolPipeSuppSlitL)/2.,
3088 -fgkCoolPipeSuppAxeDist + fgkCoolPipeSuppWidthExt
3089 + fgkCoolPipeSuppWidthIn/2.,0);
c789ee28 3090 middleTr->RegisterYourself();
3091
3092 TGeoBBox *axeBox = new TGeoBBox("ITSsddCPSaxeBoxR",
b7943f00 3093 fgkCoolPipeSuppTongW/4.,
3094 (fgkCoolPipeSuppFulWidth
3095 - 2*fgkCoolPipeSuppWidthExt
3096 - fgkCoolPipeSuppWidthIn)/2,
3097 fgkCoolPipeSuppHeight/2.);
c789ee28 3098
3099 TGeoTranslation *axeBoxTr = new TGeoTranslation("ITSsddCPSAxBoxTrR",
b7943f00 3100 - fgkCoolPipeSuppTongW/4.,
3101 - fgkCoolPipeSuppAxeDist
3102 + fgkCoolPipeSuppFulWidth
c789ee28 3103 - axeBox->GetDY(),0);
3104 axeBoxTr->RegisterYourself();
3105
b7943f00 3106 TGeoTube *axe = new TGeoTube("ITSsddCPSaxeR",0,fgkCoolPipeSuppHoleDiam/2.,
3107 fgkCoolPipeSuppTongW/4.);
531d6cdc 3108
3109 TGeoRotation *axeRot = new TGeoRotation("ITSsddCPSaxeRotR",90,90,0);
c789ee28 3110 TGeoCombiTrans *axeTrans = new TGeoCombiTrans("ITSsddCPSaxeTrR",
531d6cdc 3111 -fgkCoolPipeSuppTongW/4.,0,0,axeRot);
c789ee28 3112 axeTrans->RegisterYourself();
531d6cdc 3113 //delete axeRot;
c789ee28 3114
3115 if(GetDebug(3)){
3116 middle->InspectShape();
3117 axe->InspectShape();
3118 };
3119
3120 TGeoCompositeShape *coolPipeSuppShape = new TGeoCompositeShape(
3121 "ITSsddCoolPipeSuppShapeR",
3122 "ITSsddCPSmiddleR:ITSsddCPStr3R"
3123 "+ITSsddCPSside1R:ITSsddCPStr1R"
3124 "+ITSsddCPSside1R:ITSsddCPStr2R"
3125 "+ITSsddCPSaxeBoxR:ITSsddCPSAxBoxTrR"
3126 "-ITSsddCPSaxeR:ITSsddCPSaxeTrR");
b7943f00 3127
9c8369f9 3128 TGeoMedium *rytonSDD = GetMedium("RYTON$");
c789ee28 3129 TGeoVolume *coolPipeSupp = new TGeoVolume( "ITSsddCoolPipeSupportR",
3130 coolPipeSuppShape, rytonSDD);
3131 coolPipeSupp->SetLineColor(fColorRyton);
3132
3133 return coolPipeSupp;
531d6cdc 3134}
c789ee28 3135
3136//________________________________________________________________________
3137TGeoVolume* AliITSv11GeometrySDD::CreateBaseThermalBridge() {
108bd0fe 3138 //
3139 // based on ALR 0752/8
3140 //
c789ee28 3141
b7943f00 3142 Double_t dy = fgkBTBaxisAtoBase - fgkRadiusBminBTB - fgkBTBthick;
c789ee28 3143
b7943f00 3144 Double_t base1width = fgkBTBwidth - fgkBTBaxisAtoBottom - fgkRadiusBminBTB
3145 - (fgkRadiusAminBTB+fgkBTBthick);
c789ee28 3146 TGeoBBox *base1 = new TGeoBBox( "ITSsddBTBbase1", base1width/2.,
b7943f00 3147 fgkBTBthick/2., fgkBTBlength/2.);
c789ee28 3148 TGeoTranslation *base1Tr = new TGeoTranslation("ITSsddBTBtr1",
b7943f00 3149 fgkBTBaxisAtoBottom-fgkBTBwidth+base1width/2.,
3150 -(fgkBTBaxisAtoBase-fgkBTBthick/2.), 0);
c789ee28 3151 base1Tr->RegisterYourself();
3152
b7943f00 3153 Double_t base2width = fgkBTBaxisAtoBottom - fgkRadiusAminBTB - fgkBTBthick
3154 - fgkRadiusBminBTB;
c789ee28 3155 TGeoBBox *base2 = new TGeoBBox( "ITSsddBTBbase2", base2width/2.,
b7943f00 3156 fgkBTBthick/2., fgkBTBlength/2.);
c789ee28 3157 TGeoTranslation *base2Tr = new TGeoTranslation("ITSsddBTBtr2",
b7943f00 3158 fgkBTBaxisAtoBottom - base2width/2.,
3159 -(fgkBTBaxisAtoBase-fgkBTBthick/2.), 0);
c789ee28 3160 base2Tr->RegisterYourself();
3161
3162 TGeoBBox *side = new TGeoBBox( "ITSsddBTBside",
b7943f00 3163 fgkBTBthick/2., dy/2., fgkBTBlength/2.);
c789ee28 3164 TGeoTranslation *sideTr1 = new TGeoTranslation("ITSsddBTBsideTr1",
b7943f00 3165 -fgkRadiusAminBTB-fgkBTBthick/2., -dy/2., 0);
c789ee28 3166 TGeoTranslation *sideTr2 = new TGeoTranslation("ITSsddBTBsideTr2",
b7943f00 3167 fgkRadiusAminBTB+fgkBTBthick/2., -dy/2., 0);
c789ee28 3168 sideTr1->RegisterYourself();
3169 sideTr2->RegisterYourself();
3170
b7943f00 3171 TGeoBBox *hole = new TGeoBBox( "ITSsddBTBhole", fgkBTBHolewidth/2.,
3172 fgkBTBthick/2., fgkBTBHoleLength/2.);
c789ee28 3173 TGeoTranslation *holeTr1 = new TGeoTranslation("ITSsddBTBholeTr1",
b7943f00 3174 - fgkBTBHoleRefX + fgkBTBHolewidth/2.,
3175 - (fgkBTBaxisAtoBase-fgkBTBthick/2.),
3176 fgkBTBHoleRefY+(fgkBTBHoleLength-fgkBTBlength)/2.);
c789ee28 3177 TGeoTranslation *holeTr2 = new TGeoTranslation("ITSsddBTBholeTr2",
b7943f00 3178 - fgkBTBHoleRefX + fgkBTBHolewidth/2.,
3179 - (fgkBTBaxisAtoBase-fgkBTBthick/2.),
3180 - fgkBTBHoleRefY-(fgkBTBHoleLength-fgkBTBlength)/2.);
c789ee28 3181 holeTr1->RegisterYourself();
3182 holeTr2->RegisterYourself();
3183
b7943f00 3184 Double_t radiusAmaxBTB = fgkRadiusAminBTB + fgkBTBthick;
c789ee28 3185 TGeoTubeSeg *mainAxis = new TGeoTubeSeg( "ITSsddBTBmainAxis",
b7943f00 3186 fgkRadiusAminBTB, radiusAmaxBTB,
3187 fgkBTBlength/2., 0., 180.);
c789ee28 3188 TGeoTubeSeg *round1 = new TGeoTubeSeg( "ITSsddBTBround1",
b7943f00 3189 fgkRadiusBminBTB, fgkRadiusBminBTB+fgkBTBthick,
3190 fgkBTBlength/2., 270., 360.);
c789ee28 3191 TGeoTranslation *roundTr1 = new TGeoTranslation("ITSsddBTBround1Tr",
b7943f00 3192 -(fgkRadiusAminBTB+fgkBTBthick+fgkRadiusBminBTB),
c789ee28 3193 -dy, 0);
3194 roundTr1->RegisterYourself();
3195
3196 TGeoTubeSeg *round2 = new TGeoTubeSeg( "ITSsddBTBround2",
b7943f00 3197 fgkRadiusBminBTB, fgkRadiusBminBTB+fgkBTBthick,
3198 fgkBTBlength/2., 180., 270.);
c789ee28 3199 TGeoTranslation *roundTr2 = new TGeoTranslation("ITSsddBTBround2Tr",
b7943f00 3200 (fgkRadiusAminBTB+fgkBTBthick+fgkRadiusBminBTB),
c789ee28 3201 -dy, 0);
3202 roundTr2->RegisterYourself();
3203
3204 TGeoCompositeShape *sBaseThermalBridge = new TGeoCompositeShape(
3205 "ITSsddBaseThermalBridgeShape",
3206 "ITSsddBTBbase1:ITSsddBTBtr1"
3207 "+ ITSsddBTBbase2:ITSsddBTBtr2"
3208 "+ ITSsddBTBround1:ITSsddBTBround1Tr"
3209 "+ ITSsddBTBround2:ITSsddBTBround2Tr"
3210 "+ ITSsddBTBside:ITSsddBTBsideTr1"
3211 "+ ITSsddBTBside:ITSsddBTBsideTr2"
3212 "- ITSsddBTBhole:ITSsddBTBholeTr1"
3213 "- ITSsddBTBhole:ITSsddBTBholeTr2"
3214 "+ ITSsddBTBmainAxis");
3215
3216 if(GetDebug(3)){// Remove compiler warning.
3217 base1->InspectShape();
3218 base2->InspectShape();
3219 side->InspectShape();
3220 hole->InspectShape();
3221 mainAxis->InspectShape();
3222 round1->InspectShape();
3223 round2->InspectShape();
3224 };
3225
108bd0fe 3226 TGeoMedium *carbonFiberLadderStruct = GetMedium("SDD C AL (M55J)$");
c789ee28 3227 TGeoVolume *vBaseThermalBridge = new TGeoVolume( "ITSsddBaseThermalBridge",
3228 sBaseThermalBridge,
3229 carbonFiberLadderStruct);
3230
3231 vBaseThermalBridge->SetLineColor(fColorCarbonFiber);
3232 return vBaseThermalBridge;
531d6cdc 3233}
c789ee28 3234