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