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