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