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