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