Updated list of classes
[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. *
14 **************************************************************************/
15
b7943f00 16
db486a6e 17//*************************************************************************
18// SDD geometry, based on ROOT geometrical modeler
19//
b7943f00 20// Ludovic Gaudichet gaudichet@to.infn.it
db486a6e 21//*************************************************************************
22
23
db486a6e 24
25// General Root includes
b7943f00 26//#include <Riostream.h>
db486a6e 27#include <TMath.h>
28
29// Root Geometry includes
30#include <TGeoManager.h>
31#include <TGeoVolume.h>
db486a6e 32#include <TGeoCone.h>
33#include <TGeoTube.h>
34#include <TGeoArb8.h>
35#include <TGeoCompositeShape.h>
36#include <TGeoMatrix.h>
c789ee28 37#include <TGeoNode.h>
db486a6e 38
b7943f00 39#include "AliITSgeom.h"
40#include "AliITSgeomSDD.h"
db486a6e 41#include "AliITSv11GeometrySDD.h"
b7943f00 42#include "AliITSv11GeomCableFlat.h"
43#include "AliITSv11GeomCableRound.h"
44
45
46const char* AliITSv11GeometrySDD::fgSDDsensitiveVolName = "ITSsddSensitiv";
47const Double_t AliITSv11GeometrySDD::fgkSegmentLength = 37.2*2*fgkmm;
48const Double_t AliITSv11GeometrySDD::fgkLadderWidth = 50.0*fgkmm;
49const Double_t AliITSv11GeometrySDD::fgkLadderHeight = 30.0*fgkmm;
50const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDW = 3.5*fgkmm;
51const Double_t AliITSv11GeometrySDD::fgkLadderSegBoxDH = 3.*fgkmm;
52
53const Double_t AliITSv11GeometrySDD::fgkLadderBeamRadius = 0.6*fgkmm;
54const Double_t AliITSv11GeometrySDD::fgkLadderLa = 3.*fgkmm;
fa4639a3 55const Double_t AliITSv11GeometrySDD::fgkLadderHa = 0.721979*fgkmm;
b7943f00 56const Double_t AliITSv11GeometrySDD::fgkLadderLb = 3.7*fgkmm;
fa4639a3 57const Double_t AliITSv11GeometrySDD::fgkLadderHb = 0.890428*fgkmm;
b7943f00 58const Double_t AliITSv11GeometrySDD::fgkLadderl = 0.25*fgkmm;
59
60const Double_t AliITSv11GeometrySDD::fgkBottomBeamAngle = 56.5;
61const Double_t AliITSv11GeometrySDD::fgkBeamSidePhi = 65;
62
63const Double_t AliITSv11GeometrySDD::fgkLadWaferSep = 2*fgkmm;
fa4639a3 64const Double_t AliITSv11GeometrySDD::fgkPinSuppWidth = 2.5*fgkmm;
65const Double_t AliITSv11GeometrySDD::fgkPinSuppHeight = 2.*fgkmm;
b7943f00 66const Double_t AliITSv11GeometrySDD::fgkPinSuppRmax = 2.5/2.*fgkmm;
67const Double_t AliITSv11GeometrySDD::fgkPinR = 1.5/2.*fgkmm;
68const Double_t AliITSv11GeometrySDD::fgkPinSuppLength = 5.*fgkmm;
69const Double_t AliITSv11GeometrySDD::fgkPinSuppThickness = 0.5*fgkmm;
70const Double_t AliITSv11GeometrySDD::fgkPinSuppConeAngle = 4;
71const Double_t AliITSv11GeometrySDD::fgkPinDXminOnSensor = (39./2.)*fgkmm;
72const Double_t AliITSv11GeometrySDD::fgkPinPinDDXOnSensor = 3*fgkmm;
73const Double_t AliITSv11GeometrySDD::fgkPinDYOnSensor = (52.5/2.)*fgkmm;
db486a6e 74
b7943f00 75// parameters from ALR-0752/3
76const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppHeight = 3.2*fgkmm;
77const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppMaxLength = 14*fgkmm;
78const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppWidthExt = 0.4*fgkmm;
79const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppWidthIn = 0.65*fgkmm;
80const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppHoleDiam = 2*fgkmm;
81const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppFulWidth = 5.15*fgkmm;
82const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppTongW = 0.8*fgkmm;
83const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppAngle = 22.5;
84const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppSlitL = 4.9*fgkmm;
85const Double_t AliITSv11GeometrySDD::fgkCoolPipeSuppAxeDist = 3.05*fgkmm;
86const Double_t AliITSv11GeometrySDD::fgkCoolPipeInnerDiam = 1.84*fgkmm;
87const Double_t AliITSv11GeometrySDD::fgkCoolPipeOuterDiam = 2.*fgkmm;
88
89const Double_t AliITSv11GeometrySDD::fgkBTBthick = 0.25 *fgkmm;
90const Double_t AliITSv11GeometrySDD::fgkBTBlength = 55. *fgkmm;
91const Double_t AliITSv11GeometrySDD::fgkBTBwidth = 18*fgkmm;
92const Double_t AliITSv11GeometrySDD::fgkBTBaxisAtoBottom = 4*fgkmm;
93const Double_t AliITSv11GeometrySDD::fgkBTBaxisAtoBase = 1.2*fgkmm;
94const Double_t AliITSv11GeometrySDD::fgkRadiusAminBTB = 1. *fgkmm;
95const Double_t AliITSv11GeometrySDD::fgkRadiusBminBTB = 0.53 *fgkmm;
96const Double_t AliITSv11GeometrySDD::fgkBTBHoleLength = 15 *fgkmm;
97const Double_t AliITSv11GeometrySDD::fgkBTBHolewidth = 6 *fgkmm;
98const Double_t AliITSv11GeometrySDD::fgkBTBHoleRefX = 10 *fgkmm;
99const Double_t AliITSv11GeometrySDD::fgkBTBHoleRefY = 6.5 *fgkmm;
100
101const Double_t AliITSv11GeometrySDD::fgkLay3Rmin = 145.*fgkmm; // not min! Rmin virtual tube
102const Double_t AliITSv11GeometrySDD::fgkLay3Rmax = 205.*fgkmm; // not min! Rmax virtual tube
103const Double_t AliITSv11GeometrySDD::fgkLay3Length = (524.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube)
104const Double_t AliITSv11GeometrySDD::fgkLay3LadderLength = 524.*fgkmm;
105const Double_t AliITSv11GeometrySDD::fgkLay3DetShortRadius = 146.0*fgkmm;
106const Double_t AliITSv11GeometrySDD::fgkLay3DetLongRadius = 152.0*fgkmm;
107const Double_t AliITSv11GeometrySDD::fgkLay3LaddTopCornerEnd = 15.6*fgkmm;
108const Int_t AliITSv11GeometrySDD::fgkLay3Ndet = 6;
109const Int_t AliITSv11GeometrySDD::fgkLay3Nladd = 14;
110const Double_t AliITSv11GeometrySDD::fgkLay3CoolPipeSuppH = 7.5*fgkmm;
111
112const Double_t AliITSv11GeometrySDD::fgkLay4Rmin = 220.*fgkmm; // not min! Rmin virtual tube
113const Double_t AliITSv11GeometrySDD::fgkLay4Rmax = 290.*fgkmm; // not min! Rmax virtual tube
114const Double_t AliITSv11GeometrySDD::fgkLay4Length = (671.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube)
115const Double_t AliITSv11GeometrySDD::fgkLay4LadderLength = 671.*fgkmm;
116const Double_t AliITSv11GeometrySDD::fgkLay4DetShortRadius = 235.0*fgkmm;
117const Double_t AliITSv11GeometrySDD::fgkLay4DetLongRadius = 240.5*fgkmm;
118const Double_t AliITSv11GeometrySDD::fgkLay4LaddTopCornerEnd = 15.6*fgkmm;
119const Int_t AliITSv11GeometrySDD::fgkLay4Ndet = 8;
120const Int_t AliITSv11GeometrySDD::fgkLay4Nladd = 22;
121const Double_t AliITSv11GeometrySDD::fgkLay4CoolPipeSuppH = 7.5*fgkmm;
122
123//hybrid
124const Double_t AliITSv11GeometrySDD::fgkHybridAngle = 46; // approx !!!
125// Origine taken at the hybrid corner :
126const Double_t AliITSv11GeometrySDD::fgkHybridLength = 65*fgkmm;
127const Double_t AliITSv11GeometrySDD::fgkHybridWidth = 41*fgkmm;
128const Double_t AliITSv11GeometrySDD::fgkHybRndHoleRad = 1.05*fgkmm;
129const Double_t AliITSv11GeometrySDD::fgkHybRndHoleZ = 2.5*fgkmm;
130const Double_t AliITSv11GeometrySDD::fgkHybRndHoleX = fgkHybridWidth-23.599*fgkmm;
131
132const Double_t AliITSv11GeometrySDD::fgkHybFLlowHoleDZ = 9.698*fgkmm;
133const Double_t AliITSv11GeometrySDD::fgkHybFLlowHolePasDX = 10.754*fgkmm;
134const Double_t AliITSv11GeometrySDD::fgkHybFLlowHoleAmbDX = 9.122*fgkmm;
135 // center of ships to the border
136const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ4 = fgkHybridLength-(4.654 )*fgkmm-fgkHybFLlowHoleDZ/2;
137const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ3 = fgkHybridLength-(4.654+15. )*fgkmm-fgkHybFLlowHoleDZ/2;
138const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ2 = fgkHybridLength-(4.654+15.*2)*fgkmm-fgkHybFLlowHoleDZ/2;
139const Double_t AliITSv11GeometrySDD::fgkHybFLlowChipZ1 = fgkHybridLength-(4.654+15.*3)*fgkmm-fgkHybFLlowHoleDZ/2;
140const Double_t AliITSv11GeometrySDD::fgkHybFLlowPasX = fgkHybridWidth-32.775*fgkmm;
141const Double_t AliITSv11GeometrySDD::fgkHybFLlowAmbX = fgkHybridWidth-20.791*fgkmm;
142const Double_t AliITSv11GeometrySDD::fgkHybChipsDZ = 9.221*fgkmm;
143const Double_t AliITSv11GeometrySDD::fgkHybPascalDX = 10.245*fgkmm;
144const Double_t AliITSv11GeometrySDD::fgkHybAmbraDX = 8.51*fgkmm;
145const Double_t AliITSv11GeometrySDD::fgkHybFLUpperWidth = 15.012*fgkmm;
146const Double_t AliITSv11GeometrySDD::fgkHybFLUpperLength = 59.878*fgkmm;
147const Double_t AliITSv11GeometrySDD::fgkHybFLUpperAlDZ = 11.183*fgkmm;
148const Double_t AliITSv11GeometrySDD::fgkHybFLUpperAldx = 2.307*fgkmm;
149const Double_t AliITSv11GeometrySDD::fgkmu = 1*fgkmicron; // can be increase for checking thin objects
150const Double_t AliITSv11GeometrySDD::fgkHybridThBridgeThick = 0.25*fgkmm; // ???
151const Double_t AliITSv11GeometrySDD::fgkHybAlThick = 30*fgkmu;
152const Double_t AliITSv11GeometrySDD::fgkHybUpThick = 20*fgkmu;
153const Double_t AliITSv11GeometrySDD::fgkHybGlueScrnThick = 50*fgkmu; // ??? ?????
154const Double_t AliITSv11GeometrySDD::fgkHybGlueLowThick = 90*fgkmu;
155const Double_t AliITSv11GeometrySDD::fgkHybGlueUpThick = 90*fgkmu; // sur ?????
156const Double_t AliITSv11GeometrySDD::fgkHybAlCCThick = 12*fgkmu;
157const Double_t AliITSv11GeometrySDD::fgkHybUpCCThick = 12*fgkmu;
158const Double_t AliITSv11GeometrySDD::fgkHybChipThick = 150*fgkmu;
159const Double_t AliITSv11GeometrySDD::fgkHybGlueAgThick = 50*fgkmu; // ??? ????
160const Double_t AliITSv11GeometrySDD::fgkHybUnderNiThick = 20*fgkmu; // ??? ????
161const Int_t AliITSv11GeometrySDD::fgkNHybSMD = 25;
162const Double_t AliITSv11GeometrySDD::fgkHybSMDposX[fgkNHybSMD] =
163 {2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,21.40*fgkmm,
164 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,19.91*fgkmm,
165 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,17.09*fgkmm,21.40*fgkmm,
166 2.92*fgkmm,6.5*fgkmm,10.13*fgkmm,13.59*fgkmm,19.91*fgkmm,
167 1.63*fgkmm,5.22*fgkmm,13.59*fgkmm,21.40*fgkmm};
168const Double_t AliITSv11GeometrySDD::fgkHybSMDposZ[fgkNHybSMD] =
169 { 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm, 2.3 *fgkmm,
170 17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,17.315*fgkmm,
171 32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,32.31*fgkmm,
172 47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,47.38*fgkmm,
173 62.68*fgkmm,62.06*fgkmm,62.06*fgkmm,62.06*fgkmm};
174const Double_t AliITSv11GeometrySDD::fgkHybSMDmiddleW = 0.954*fgkmm;
175const Double_t AliITSv11GeometrySDD::fgkHybSMDmiddleL = 0.47 *fgkmm;
176const Double_t AliITSv11GeometrySDD::fgkHybSMDendW = 1.132*fgkmm;
177const Double_t AliITSv11GeometrySDD::fgkHybSMDendL = 0.925*fgkmm;
178const Double_t AliITSv11GeometrySDD::fgkHybSMDheight = 400.*fgkmu; // ??? ????!!!!!!!
179
180const Double_t AliITSv11GeometrySDD::fgkWaferThickness = 300.*fgkmu;
181const Double_t AliITSv11GeometrySDD::fgkWaferWidth = 72.5 *fgkmm;
182const Double_t AliITSv11GeometrySDD::fgkWaferLength = 87.6 *fgkmm;
183const Double_t AliITSv11GeometrySDD::fgkWaferThickSens = 299.8*fgkmu;
184const Double_t AliITSv11GeometrySDD::fgkWaferWidthSens = 70.17*fgkmm;
185const Double_t AliITSv11GeometrySDD::fgkWaferLengthSens = 74.97*fgkmm;
186
187const Double_t AliITSv11GeometrySDD::fgkDigitCablWidth = 18.4*fgkmm;
188const Double_t AliITSv11GeometrySDD::fgkDigitCablAlThick = (30+30*8./10.)*fgkmicron; // will probably change
189const Double_t AliITSv11GeometrySDD::fgkDigitCablPolyThick = (20+12)*fgkmicron; // will probably change
190
191const Double_t AliITSv11GeometrySDD::fgkWaHVcableAlThick = 30*2./10.*fgkmu; // will probably change // Al ratio is random !!!
192const Double_t AliITSv11GeometrySDD::fgkWaHVcablePolyThick = 175*fgkmu; // will probably change
193const Double_t AliITSv11GeometrySDD::fgkWaHVcableLength = 67.08*fgkmm;
194const Double_t AliITSv11GeometrySDD::fgkWaHVcableWitdh = 17.4 *fgkmm; // check !!!
195const Double_t AliITSv11GeometrySDD::fgkWaHVcableDW = 5.24*fgkmm; // check !!!
196
197const Double_t AliITSv11GeometrySDD::fgkSensorGlassLX = 5. *fgkmm;
198const Double_t AliITSv11GeometrySDD::fgkSensorGlassLZ = 5. *fgkmm;
199const Double_t AliITSv11GeometrySDD::fgkSensorGlassLY = 150. *fgkmu;
200const Double_t AliITSv11GeometrySDD::fgkGlassDXOnSensor = 26.28*fgkmm; // check !!!
201const Double_t AliITSv11GeometrySDD::fgkGlassDZOnSensor = 22.50*fgkmm; // check !!!
202
203const Double_t AliITSv11GeometrySDD::fgkTransitHVAlThick = 30*2./10.*fgkmu; // check // will probably change //Al ratio is random
204const Double_t AliITSv11GeometrySDD::fgkTransitHVPolyThick = 100*fgkmu; // check // will probably change
205const Double_t AliITSv11GeometrySDD::fgkTransitHVHeadLX = 71.46*fgkmm; // check !!!
206const Double_t AliITSv11GeometrySDD::fgkTransitHVHeadLZ = 21.3*fgkmm;
207const Double_t AliITSv11GeometrySDD::fgkTransitHVBondingLZ = 3.6*fgkmm;
208const Double_t AliITSv11GeometrySDD::fgkTransitHVtailLength = 27*fgkmm; // ???, not yet fixed ...
209const Double_t AliITSv11GeometrySDD::fgkTransitHVtailWidth = 26*fgkmm;
210const Double_t AliITSv11GeometrySDD::fgkTransitHVtailXpos = 8*fgkmm; // ???, a mesurer !!!
211const Double_t AliITSv11GeometrySDD::fgkTransitHVsideLZ = 10.34*fgkmm;
212const Double_t AliITSv11GeometrySDD::fgkTransitHVsideLeftZ = 4.11*fgkmm;
213const Double_t AliITSv11GeometrySDD::fgkTransitHVsideRightZ = 3.5*fgkmm; // ???, a mesurer !!!
214
215const Double_t AliITSv11GeometrySDD::fgkLongHVcablePolyThick= (20+30+125+30+20+30+125+30+20)*fgkmu; // check // will probably change
216const Double_t AliITSv11GeometrySDD::fgkLongHVcableAlThick = (30+30*2/10+30)*fgkmu; // check // will probably change
217const Double_t AliITSv11GeometrySDD::fgkLongHVcableSeparation = 600*fgkmicron;
c789ee28 218
c789ee28 219
b7943f00 220ClassImp(AliITSv11GeometrySDD)
c789ee28 221
b7943f00 222//________________________________________________________________________
223 AliITSv11GeometrySDD::AliITSv11GeometrySDD():
224 AliITSv11Geometry(), fMotherVol(0), fAddHybrids(kTRUE), fAddSensors(kTRUE),
225 fAddHVcables(kTRUE), fAddCables(kTRUE), fAddCoolingSyst(kTRUE),
226 fCoolingOn(kTRUE),
227 fAddOnlyLadder3min(-1), fAddOnlyLadder3max(-1),
228 fAddOnlyLadder4min(-1), fAddOnlyLadder4max(-1)
c789ee28 229{
b7943f00 230 //
231 // Standard constructor
232 //
fa4639a3 233 fDigitCableLay3A = 0;
234 fDigitCableLay3B = 0;
235 fDigitCableLay4A = 0;
236 fDigitCableLay4B = 0;
b7943f00 237 SetParameters();
c789ee28 238};
239
b7943f00 240//________________________________________________________________________
241AliITSv11GeometrySDD::AliITSv11GeometrySDD(Int_t debug) :
242 AliITSv11Geometry(debug),fMotherVol(0),fAddHybrids(kTRUE),fAddSensors(kTRUE),
243 fAddHVcables(kTRUE), fAddCables(kTRUE), fAddCoolingSyst(kTRUE),
244 fCoolingOn(kTRUE),
245 fAddOnlyLadder3min(-1), fAddOnlyLadder3max(-1),
246 fAddOnlyLadder4min(-1), fAddOnlyLadder4max(-1)
c789ee28 247{
b7943f00 248 //
249 // Constructor setting debugging level
250 //
fa4639a3 251 fDigitCableLay3A = 0;
252 fDigitCableLay3B = 0;
253 fDigitCableLay4A = 0;
254 fDigitCableLay4B = 0;
b7943f00 255 SetParameters();
c789ee28 256};
257
c789ee28 258//________________________________________________________________________
b7943f00 259AliITSv11GeometrySDD::AliITSv11GeometrySDD(const AliITSv11GeometrySDD &s) :
260 AliITSv11Geometry(s.GetDebug()),fMotherVol(s.fMotherVol),
261 fAddHybrids(s.fAddHybrids),fAddSensors(s.fAddSensors),
262 fAddHVcables(s.fAddHVcables), fAddCables(s.fAddCables),
263 fAddCoolingSyst(s.fAddCoolingSyst),fCoolingOn(s.fCoolingOn),
264 fAddOnlyLadder3min(s.fAddOnlyLadder3min),fAddOnlyLadder3max(s.fAddOnlyLadder3max),
265 fAddOnlyLadder4min(s.fAddOnlyLadder4min), fAddOnlyLadder4max(s.fAddOnlyLadder4max)
266{
267 // Copy Constructor
fa4639a3 268 fDigitCableLay3A = 0;
269 fDigitCableLay3B = 0;
270 fDigitCableLay4A = 0;
271 fDigitCableLay4B = 0;
b7943f00 272 SetParameters();
273}
c789ee28 274
b7943f00 275//________________________________________________________________________
276AliITSv11GeometrySDD& AliITSv11GeometrySDD::
277operator=(const AliITSv11GeometrySDD &s) {
278 // Assignment operator
279 if(&s == this) return *this;
280 fMotherVol = s.fMotherVol;
281 fAddHybrids = s.fAddHybrids;
282 fAddSensors = s.fAddSensors;
283 fAddHVcables = s.fAddHVcables;
284 fAddCables = s.fAddCables;
285 fAddCoolingSyst = s.fAddCoolingSyst;
286 fCoolingOn = s.fCoolingOn;
287 fAddOnlyLadder3min = s.fAddOnlyLadder3min;
288 fAddOnlyLadder3max = s.fAddOnlyLadder3max;
289 fAddOnlyLadder4min = s.fAddOnlyLadder4min;
290 fAddOnlyLadder4max = s.fAddOnlyLadder4max;
291 return *this;
292}
db486a6e 293
c789ee28 294//________________________________________________________________________
b7943f00 295AliITSv11GeometrySDD::~AliITSv11GeometrySDD() {
296 // Look like a destructor
297 // Smell like a destructor
298 // And actually is the destructor
299 if (fDigitCableLay3A) delete [] fDigitCableLay3A;
300 if (fDigitCableLay3B) delete [] fDigitCableLay3B;
301 if (fDigitCableLay4A) delete [] fDigitCableLay4A;
302 if (fDigitCableLay4B) delete [] fDigitCableLay4B;
db486a6e 303};
c789ee28 304
c789ee28 305//________________________________________________________________________
b7943f00 306void AliITSv11GeometrySDD::SetParameters() {
307 //
308 // Define display colors and the non constant geometry parameters
309 //
310
fa4639a3 311 fColorCarbonFiber = 4;
312 fColorRyton = 5;
313 fColorPhynox = 7;
314 fColorSilicon = 3;
315 fColorAl = 7;
316 fColorPolyhamide = 5;
317 fColorGlass = 2;
318 fColorSMD = 12;
319 fColorSMDweld = 17;
320
321 fPinSupport = 0;
b7943f00 322 fCoolPipeSupportL = 0;
323 fCoolPipeSupportR = 0;
fa4639a3 324 fSDDsensor = 0;
325 fBaseThermalBridge= 0;
326 fHybrid = 0;
b7943f00 327
328 Double_t detLadderDist = 8*fgkmm;
329
330 fLay3LadderUnderSegDH = detLadderDist - (fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
331 fLay4LadderUnderSegDH = detLadderDist - (fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
332
333 // radius from the center to the CF ladder :
334 fLay3LaddShortRadius = (fgkLay3DetShortRadius
335 + fgkLadWaferSep+2*fgkWaferThickness
336 + detLadderDist);
337 fLay3LaddLongRadius = (fgkLay3DetLongRadius
338 + fgkLadWaferSep+2*fgkWaferThickness
339 + detLadderDist);
340 fLay4LaddShortRadius = (fgkLay4DetShortRadius
341 + fgkLadWaferSep+2*fgkWaferThickness
342 + detLadderDist);
343 fLay4LaddLongRadius = (fgkLay4DetLongRadius
344 + fgkLadWaferSep+2*fgkWaferThickness
345 + detLadderDist);
c789ee28 346
347 fLay3sensorZPos[0]= ( 35.8+72.4+75.8 )*fgkmm;
348 fLay3sensorZPos[1]= ( 35.8+72.4 )*fgkmm;
349 fLay3sensorZPos[2]= ( 35.8 )*fgkmm;
350 fLay3sensorZPos[3]= ( -37.9 )*fgkmm;
351 fLay3sensorZPos[4]= ( -37.9-74.9 )*fgkmm;
352 fLay3sensorZPos[5]= ( -37.9-74.9-71.1 )*fgkmm;
353
354 fLay4sensorZPos[0] = ( 38.5+73.2+75.4+71.6 )*fgkmm;
355 fLay4sensorZPos[1] = ( 38.5+73.2+75.4 )*fgkmm;
356 fLay4sensorZPos[2] = ( 38.5+73.2 )*fgkmm;
357 fLay4sensorZPos[3] = ( 38.5 )*fgkmm;
358 fLay4sensorZPos[4] = ( -35.6 )*fgkmm;
359 fLay4sensorZPos[5] = ( -35.6-74.8 )*fgkmm;
360 fLay4sensorZPos[6] = ( -35.6-74.8-72.4 )*fgkmm;
361 fLay4sensorZPos[7] = ( -35.6-74.8-72.4-76. )*fgkmm;
db486a6e 362};
c789ee28 363
c789ee28 364//________________________________________________________________________
b7943f00 365TGeoMedium* AliITSv11GeometrySDD::GetMedium(const char* mediumName) {
366 //
367 // Called to get a medium, checks that it exists.
368 // If not, prints an error and returns 0
369 //
c789ee28 370
b7943f00 371 TGeoMedium* medium = gGeoManager->GetMedium(mediumName);
372 if (! medium)
373 printf("Error(AliITSv11GeometrySDD)::medium %s not found !\n", mediumName);
b7943f00 374 return medium;
375};
c789ee28 376
b7943f00 377//________________________________________________________________________
fa4639a3 378Int_t AliITSv11GeometrySDD::GetLay3NLadders() const{
379 // Get the actual number of ladder in layer 3
380 if ( (fAddOnlyLadder3min<0) ||
381 (fAddOnlyLadder3min >= fgkLay3Nladd) ||
382 (fAddOnlyLadder3max<0) ||
383 (fAddOnlyLadder3max >= fgkLay3Nladd) )
384 return fgkLay3Nladd;
385 else return (fAddOnlyLadder3max-fAddOnlyLadder3min+1);
386}
387
388//________________________________________________________________________
389Int_t AliITSv11GeometrySDD::GetLay4NLadders() const{
390 // Get the actual number of ladder in layer 4
391 if ( (fAddOnlyLadder4min<0) ||
392 (fAddOnlyLadder4min >= fgkLay4Nladd) ||
393 (fAddOnlyLadder4max<0) ||
394 (fAddOnlyLadder4max >= fgkLay4Nladd) )
395 return fgkLay4Nladd;
396 else return (fAddOnlyLadder4max-fAddOnlyLadder4min+1);
397}
398
399//________________________________________________________________________
b7943f00 400void AliITSv11GeometrySDD::CreateBasicObjects() {
401 //
402 // Create basics objets which will be assembled together
403 // in Layer3 and Layer4 functions
404 //
405
fa4639a3 406 fDigitCableLay3A = new AliITSv11GeomCableFlat[fgkLay3Ndet];
407 fDigitCableLay3B = new AliITSv11GeomCableFlat[fgkLay3Ndet];
408 fDigitCableLay4A = new AliITSv11GeomCableFlat[fgkLay4Ndet];
409 fDigitCableLay4B = new AliITSv11GeomCableFlat[fgkLay4Ndet];
410
b7943f00 411 fPinSupport = CreatePinSupport();
412 fCoolPipeSupportL = CreateCoolPipeSupportL();
413 fCoolPipeSupportR = CreateCoolPipeSupportR();
414 fSDDsensor = CreateSDDsensor();
415 fBaseThermalBridge = CreateBaseThermalBridge();
416 fHybrid = CreateHybrid(0);
417
418 TGeoMedium *carbonFiberLadderStruct = GetMedium("ITSsddCarbonM55J");
419 TGeoMedium *polyhamideSDD = GetMedium("ITSsddKAPTON_POLYCH2");
420 TGeoMedium *alSDD = GetMedium("ITSal");
421
422 //********************************************************************
423 // pieces of the carbon fiber structure
424 //********************************************************************
425 Double_t dy = fgkLadderSegBoxDH/2;
426 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
427 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
428 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
429 Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.;
430 Double_t dYTranslation = (fgkLadderHeight/2.
431 -0.5*fgkLadderWidth*TMath::Tan(beta)
432 -fgkLadderBeamRadius);
433 Double_t distCenterSideDown = 0.5*fgkLadderWidth/TMath::Cos(beta);
434
435 //--- the top V of the Carbon Fiber Ladder (segment)
436 TGeoArb8 *cfLaddTop1 = CreateLadderSide( fgkSegmentLength/2., halfTheta,
437 -1, fgkLadderLa, fgkLadderHa, fgkLadderl);
438 TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1",
439 cfLaddTop1,carbonFiberLadderStruct);
440 TGeoArb8 *cfLaddTop2 = CreateLadderSide( fgkSegmentLength/2., halfTheta,
441 1, fgkLadderLa, fgkLadderHa, fgkLadderl);
442 TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerVol2",
443 cfLaddTop2, carbonFiberLadderStruct);
444 cfLaddTopVol1->SetLineColor(fColorCarbonFiber);
445 cfLaddTopVol2->SetLineColor(fColorCarbonFiber);
446 TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2-dy, 0);
447
448 //--- the 2 side V
449 TGeoArb8 *cfLaddSide1 = CreateLadderSide( fgkSegmentLength/2., beta, -1,
450 fgkLadderLb, fgkLadderHb, fgkLadderl);
451 TGeoVolume *cfLaddSideVol1 = new TGeoVolume( "ITSsddCFladdSideCornerVol1",
452 cfLaddSide1,carbonFiberLadderStruct);
453 TGeoArb8 *cfLaddSide2 = CreateLadderSide( fgkSegmentLength/2., beta, 1,
454 fgkLadderLb, fgkLadderHb, fgkLadderl);
455 TGeoVolume *cfLaddSideVol2 = new TGeoVolume( "ITSsddCFladdSideCornerVol2",
456 cfLaddSide2,carbonFiberLadderStruct);
457 cfLaddSideVol1->SetLineColor(fColorCarbonFiber);
458 cfLaddSideVol2->SetLineColor(fColorCarbonFiber);
459 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,
460 alpha*TMath::RadToDeg());
461 AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation-dy, 0);
462 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0,
463 -alpha*TMath::RadToDeg());
464 AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation-dy, 0);
465
466 //--- The beams
467 // Beams on the sides
468 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*
469 TMath::Sin(2*beta)/(TanD(fgkBeamSidePhi)*TanD(fgkBeamSidePhi))) ));
470 //cout<<"Phi prime = "<<beamPhiPrime*TMath::RadToDeg()<<endl;
471 Double_t beamLength = TMath::Sqrt( fgkLadderHeight*fgkLadderHeight/
472 ( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))
473 + fgkLadderWidth*fgkLadderWidth/4.)-fgkLadderLa/2-fgkLadderLb/2;
474 TGeoTubeSeg *sideBeamS = new TGeoTubeSeg(0, fgkLadderBeamRadius,beamLength/2.,
475 0, 180);
476 TGeoVolume *sideBeam = new TGeoVolume("ITSsddCFSideBeamVol", sideBeamS,
477 carbonFiberLadderStruct);
478 sideBeam->SetLineColor(fColorCarbonFiber);
479
480 //Euler rotation : about Z, then new X, then new Z
481 TGeoRotation beamRot1("", 90-2.*beta*TMath::RadToDeg(),
482 -beamPhiPrime*TMath::RadToDeg(),-90);
483 TGeoRotation beamRot2("", 90-2.*beta*TMath::RadToDeg(),
484 beamPhiPrime*TMath::RadToDeg(), -90);
485 TGeoRotation beamRot3("", 90+2.*beta*TMath::RadToDeg(),
486 beamPhiPrime*TMath::RadToDeg(), -90);
487 TGeoRotation beamRot4("", 90+2.*beta*TMath::RadToDeg(),
488 -beamPhiPrime*TMath::RadToDeg(),-90);
489
490 TGeoCombiTrans *beamTransf[8];
491 beamTransf[0] = new TGeoCombiTrans( 0.5*triangleHeight*
492 TMath::Tan(halfTheta),
493 fgkLadderBeamRadius/2. - dy,
494 -3*fgkSegmentLength/8, &beamRot1);
495 beamTransf[1] = new TGeoCombiTrans(*beamTransf[0]);
496 AddTranslationToCombiTrans(beamTransf[1], 0, 0, fgkSegmentLength/2);
497
498 beamTransf[2] = new TGeoCombiTrans(0.5*triangleHeight*
499 TMath::Tan(halfTheta),
500 fgkLadderBeamRadius/2. - dy,
501 -fgkSegmentLength/8, &beamRot2);
502 beamTransf[3] = new TGeoCombiTrans(*beamTransf[2]);
503 AddTranslationToCombiTrans(beamTransf[3], 0, 0, fgkSegmentLength/2);
504
505 beamTransf[4] = new TGeoCombiTrans(-0.5*triangleHeight*
506 TMath::Tan(halfTheta),
507 fgkLadderBeamRadius/2. - dy,
508 -3*fgkSegmentLength/8, &beamRot3);
509 beamTransf[5] = new TGeoCombiTrans(*beamTransf[4]);
510 AddTranslationToCombiTrans(beamTransf[5], 0, 0, fgkSegmentLength/2);
511
512 beamTransf[6] = new TGeoCombiTrans(-0.5*triangleHeight*
513 TMath::Tan(halfTheta),fgkLadderBeamRadius/2.-dy, -fgkSegmentLength/8,&beamRot4);
514 beamTransf[7] = new TGeoCombiTrans(-0.5*triangleHeight*
515 TMath::Tan(halfTheta),fgkLadderBeamRadius/2.-dy,3*fgkSegmentLength/8,&beamRot4);
516
517 //--- Beams of the bottom
518 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
519 fgkLadderWidth/2.-fgkLadderLb/3, 0, 180);
520 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol",
521 bottomBeam1, carbonFiberLadderStruct);
522 bottomBeam1Vol->SetLineColor(fColorCarbonFiber);
523 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
524 fgkLadderWidth/2.-fgkLadderLb/3, 0, 90);
525 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",
526 bottomBeam2, carbonFiberLadderStruct);
527 bottomBeam2Vol->SetLineColor(fColorCarbonFiber);
528 TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
529 0.5*fgkLadderWidth/SinD(fgkBottomBeamAngle)
530 - fgkLadderLb/3, 0, 180);
531 TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol",
532 bottomBeam3, carbonFiberLadderStruct);
533 bottomBeam3Vol->SetLineColor(fColorCarbonFiber);
534 //bottomBeam3Vol->SetLineColor(2);
535
536 TGeoRotation bottomBeamRot1("", 90, 90, 90);
537 TGeoRotation bottomBeamRot2("",-90, 90, -90);
538 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans
539 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,0, &bottomBeamRot1);
540 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
541 -(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,
542 -fgkSegmentLength/2, &bottomBeamRot1);
543 TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0,
544 -(fgkLadderHeight/2 - fgkLadderBeamRadius)
545 - dy, fgkSegmentLength/2, &bottomBeamRot2);
546 // be careful for beams #3: when "reading" from -z to +z and
547 // from the bottom of the ladder, it should draw a Lambda, and not a V
548 TGeoRotation bottomBeamRot4("", -90, fgkBottomBeamAngle, -90);
549 TGeoRotation bottomBeamRot5("" ,-90,-fgkBottomBeamAngle, -90);
550 TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans
551 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,-fgkSegmentLength/4,&bottomBeamRot4);
552 TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans
553 (0,-(fgkLadderHeight/2-fgkLadderBeamRadius)-dy,fgkSegmentLength/4, &bottomBeamRot5);
554
555 fLaddSegCommonVol[0] = cfLaddTopVol1; fLaddSegCommonTr[0] = trTop1;
556 fLaddSegCommonVol[1] = cfLaddTopVol2; fLaddSegCommonTr[1] = trTop1;
557 fLaddSegCommonVol[2] = cfLaddSideVol1; fLaddSegCommonTr[2] = ctSideR;
558 fLaddSegCommonVol[3] = cfLaddSideVol1; fLaddSegCommonTr[3] = ctSideL;
559 fLaddSegCommonVol[4] = cfLaddSideVol2; fLaddSegCommonTr[4] = ctSideR;
560 fLaddSegCommonVol[5] = cfLaddSideVol2; fLaddSegCommonTr[5] = ctSideL;
561 fLaddSegCommonVol[6] = sideBeam; fLaddSegCommonTr[6] = beamTransf[0];
562 fLaddSegCommonVol[7] = sideBeam; fLaddSegCommonTr[7] = beamTransf[1];
563 fLaddSegCommonVol[8] = sideBeam; fLaddSegCommonTr[8] = beamTransf[2];
564 fLaddSegCommonVol[9] = sideBeam; fLaddSegCommonTr[9] = beamTransf[3];
565 fLaddSegCommonVol[10]= sideBeam; fLaddSegCommonTr[10]= beamTransf[4];
566 fLaddSegCommonVol[11]= sideBeam; fLaddSegCommonTr[11]= beamTransf[5];
567 fLaddSegCommonVol[12]= sideBeam; fLaddSegCommonTr[12]= beamTransf[6];
568 fLaddSegCommonVol[13]= sideBeam; fLaddSegCommonTr[13]= beamTransf[7];
569 fLaddSegCommonVol[14]= bottomBeam1Vol; fLaddSegCommonTr[14]= bottomBeamTransf1;
570 fLaddSegCommonVol[15]= bottomBeam2Vol; fLaddSegCommonTr[15]= bottomBeamTransf2;
571 fLaddSegCommonVol[16]= bottomBeam2Vol; fLaddSegCommonTr[16]= bottomBeamTransf3;
572 fLaddSegCommonVol[17]= bottomBeam3Vol; fLaddSegCommonTr[17]= bottomBeamTransf4;
573 fLaddSegCommonVol[18]= bottomBeam3Vol; fLaddSegCommonTr[18]= bottomBeamTransf5;
c789ee28 574
b7943f00 575
576 //********************************************************************
577 // cables
578 //********************************************************************
579 char cableName[30];
580 for (Int_t i=0; i<fgkLay3Ndet; i++) {
581 sprintf(cableName, "digitCableLay3A_%i",i);
582 fDigitCableLay3A[i].SetName(cableName);
583 fDigitCableLay3A[i].SetWidth(fgkDigitCablWidth);
584 fDigitCableLay3A[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
585 fDigitCableLay3A[i].SetNLayers(2);
586 fDigitCableLay3A[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
587 fColorPolyhamide);
588 fDigitCableLay3A[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
589 sprintf(cableName, "digitCableLay3B_%i",i);
590 fDigitCableLay3B[i].SetName(cableName);
591 fDigitCableLay3B[i].SetWidth(fgkDigitCablWidth);
592 fDigitCableLay3B[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
593 fDigitCableLay3B[i].SetNLayers(2);
594 fDigitCableLay3B[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
595 fColorPolyhamide);
596 fDigitCableLay3B[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
597 };
598 for (Int_t i=0; i<fgkLay4Ndet; i++) {
599 sprintf(cableName, "digitCableLay4A_%i",i);
600 fDigitCableLay4A[i].SetName(cableName);
601 fDigitCableLay4A[i].SetWidth(fgkDigitCablWidth);
602 fDigitCableLay4A[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
603 fDigitCableLay4A[i].SetNLayers(2);
604 fDigitCableLay4A[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
605 fColorPolyhamide);
606 fDigitCableLay4A[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
607 sprintf(cableName, "digitCableLay4B_%i",i);
608 fDigitCableLay4B[i].SetName(cableName);
609 fDigitCableLay4B[i].SetWidth(fgkDigitCablWidth);
610 fDigitCableLay4B[i].SetThickness(fgkDigitCablPolyThick+fgkDigitCablAlThick);
611 fDigitCableLay4B[i].SetNLayers(2);
612 fDigitCableLay4B[i].SetLayer( 0, fgkDigitCablPolyThick, polyhamideSDD,
613 fColorPolyhamide);
614 fDigitCableLay4B[i].SetLayer(1, fgkDigitCablAlThick, alSDD, fColorAl);
615 };
616 // Well, those digit cables could also include the analog cables
617 // which have the same width and the same path, at least in the ladder.
618 // It will gain some computing ressources (less volumes) and some
619 // coding efforts ... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
620 // The only thing to do is to change the names and put the correct total
621 // thicknesses
c789ee28 622
b7943f00 623};
c789ee28 624
c789ee28 625
b7943f00 626//________________________________________________________________________
627void AliITSv11GeometrySDD::CheckOverlaps(Double_t precision){
628 //
629 // a debugging function for checking some possible overlaps
630 //
631 if (fSDDsensor) fSDDsensor->CheckOverlaps(precision);
632 if (fHybrid) fHybrid->CheckOverlaps(precision);
c789ee28 633};
634
635
db486a6e 636//________________________________________________________________________
637TGeoCombiTrans *AliITSv11GeometrySDD::
638CreateCombiTrans(const char *name, Double_t dy, Double_t dz, Double_t dphi) {
639 //
640 // return the TGeoCombiTrans which make a translation in y and z
641 // and a rotation in phi in the global coord system
642 //
643
644 TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz);
645 TGeoRotation r1("",0.,0.,dphi);
646
647 TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name);
648 combiTrans1->SetTranslation(t1);
649 combiTrans1->SetRotation(r1);
650 return combiTrans1;
651};
c789ee28 652
653
db486a6e 654//________________________________________________________________________
c789ee28 655void AliITSv11GeometrySDD::AddTranslationToCombiTrans(TGeoCombiTrans* ct,
db486a6e 656 Double_t dx,
657 Double_t dy,
b7943f00 658 Double_t dz) const{
659 // Add a dx,dy,dz translation to the initial TGeoCombiTrans
660 const Double_t *vect = ct->GetTranslation();
661 Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz};
662 ct->SetTranslation(newVect);
db486a6e 663};
c789ee28 664
665
666//________________________________________________________________________
667void AliITSv11GeometrySDD::ShowOnePiece(TGeoVolume *moth) {
668// for code developpment and debugging purposes
669
fa4639a3 670 if (! fSDDsensor) CreateBasicObjects();
b7943f00 671
fa4639a3 672// moth->AddNode(fPinSupport, 1, 0);
673// moth->AddNode(fCoolPipeSupportL, 1, 0);
674// moth->AddNode(fBaseThermalBridge, 1, 0);
675// moth->AddNode(fHybrid,100,0);
676 moth->AddNode(fSDDsensor, 1, 0);
b7943f00 677
678
fa4639a3 679// TGeoVolume* seg = CreateLadderSegment( 3, 0);
680// moth->AddNode(seg, 1, 0);
b7943f00 681
c789ee28 682};
683
684
db486a6e 685//________________________________________________________________________
b7943f00 686void AliITSv11GeometrySDD::Layer3(TGeoVolume *moth) {
687 //
688 // Insert the layer 3 in the mother volume. This is a virtual volume
689 // containing ladders of layer 3 and the supporting rings
690 //
691
692 if (! moth) {
693 printf("Error::AliITSv11GeometrySDD: Can't insert layer3, mother is null!\n");
694 return;
695 };
696
697 TGeoMedium *airSDD = GetMedium("ITSair");
698
699 fMotherVol = moth;
700 if (! fSDDsensor) CreateBasicObjects();
701
702 TGeoVolume *lay3Ladder = CreateLadder(3);
703 TGeoVolume *lay3Detectors = CreateDetectors(3);
704 TGeoTube *virtualLayer3Shape = new TGeoTube("ITSsddLayer3Shape",
705 fgkLay3Rmin,fgkLay3Rmax,fgkLay3Length*0.5);
706 TGeoVolume *virtualLayer3 = new TGeoVolume("ITSsddLayer3",
707 virtualLayer3Shape, airSDD);
708
709 Double_t dPhi = 360./fgkLay3Nladd;
710 Double_t detectorsThick = fgkLadWaferSep + 2*fgkWaferThickness;
711 // Placing virtual ladder and detectors volumes following
712 // ladder ordering convention
713 char rotName[30];
714 Int_t iLaddMin = 0;
715 Int_t iLaddMax = fgkLay3Nladd;
716 if ((fAddOnlyLadder3min>=0)&&(fAddOnlyLadder3max<fgkLay3Nladd)) {
717 iLaddMin = fAddOnlyLadder3min;
718 iLaddMax = fAddOnlyLadder3max+1;
719 };
720
721 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
722
723 sprintf(rotName, "ITSsddLay3Ladd%i",iLadd);
724 Double_t minRadiusLadBox = fLay3LaddShortRadius-fLay3LadderUnderSegDH;
725 if (iLadd%2 != 0)
726 minRadiusLadBox = fLay3LaddLongRadius-fLay3LadderUnderSegDH;
727 minRadiusLadBox += ((TGeoBBox*)lay3Ladder->GetShape())->GetDY();
728 TGeoCombiTrans *ctLadd = CreateCombiTrans(rotName,minRadiusLadBox,
729 0,-90+iLadd*dPhi);
730 virtualLayer3->AddNode(lay3Ladder, iLadd, ctLadd);
731 ///////////////////////////////////////////////////
732 sprintf(rotName, "ITSsddLay3DetBox%i",iLadd);
733 Double_t minRadiusDetBox = fgkLay3DetShortRadius;
734 if (iLadd%2 != 0) minRadiusDetBox = fgkLay3DetLongRadius;
735 minRadiusDetBox += detectorsThick/2;
736 TGeoCombiTrans *ctDet = CreateCombiTrans(rotName, minRadiusDetBox,
737 0,-90+iLadd*dPhi);
738 virtualLayer3->AddNode(lay3Detectors, iLadd, ctDet);
739 ///////////////////////////////////////////////////
740 }
741
742 if(GetDebug(1)) virtualLayer3->CheckOverlaps(0.01);
743 virtualLayer3->SetVisibility(kFALSE);
744 moth->AddNode(virtualLayer3, 1, 0);
db486a6e 745};
c789ee28 746
747
db486a6e 748//________________________________________________________________________
b7943f00 749void AliITSv11GeometrySDD::Layer4(TGeoVolume *moth) {
750 //
751 // Insert the layer 4 in the mother volume. This is a virtual volume
752 // containing ladders of layer 4 and the supporting rings
753 //
754
755 if (! moth) {
756 printf("Error::AliITSv11GeometrySDD: Can't insert layer4, mother is null!\n");
757 return;
758 };
759
760 fMotherVol = moth;
761
762 if (! fSDDsensor) CreateBasicObjects();
763
764 TGeoTube *virtualLayer4Shape =new TGeoTube("ITSsddLayer4Shape",
765 fgkLay4Rmin,fgkLay4Rmax,fgkLay4Length*0.5);
766 TGeoMedium *airSDD = GetMedium("ITSair");
767 TGeoVolume *virtualLayer4 = new TGeoVolume("ITSsddLayer4",
768 virtualLayer4Shape, airSDD);
769 TGeoVolume *lay4Ladder = CreateLadder(4);
770 TGeoVolume *lay4Detectors = CreateDetectors(4);
771 Double_t dPhi = 360./fgkLay4Nladd;
772 Double_t detBoxThickness = fgkLadWaferSep + 2*fgkWaferThickness;
773 // placing virtual ladder and detectors volumes following ladder
774 // ordering convention
775 char rotName[20];
776 Int_t iLaddMin = 0;
777 Int_t iLaddMax = fgkLay4Nladd;
778 if ((fAddOnlyLadder4min >= 0)&&(fAddOnlyLadder4max < fgkLay4Nladd)) {
779 iLaddMin = fAddOnlyLadder4min;
780 iLaddMax = fAddOnlyLadder4max+1;
781 }
782 for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) {
783 sprintf(rotName, "ITSsddLay4Ladd%i",iLadd);
784 Double_t minRadiusLadBox = fLay4LaddShortRadius-fLay4LadderUnderSegDH;
785 if (iLadd%2 != 0)
786 minRadiusLadBox = fLay4LaddLongRadius-fLay4LadderUnderSegDH;
787 minRadiusLadBox += ((TGeoBBox*)lay4Ladder->GetShape())->GetDY();
788 TGeoCombiTrans *ctLadd = CreateCombiTrans(rotName, minRadiusLadBox,
789 0, -90+iLadd*dPhi);
790 virtualLayer4->AddNode(lay4Ladder, iLadd, ctLadd);
791 sprintf(rotName, "ITSsddLay4DetBox%i",iLadd);
792 Double_t minRadiusDetBox = fgkLay4DetShortRadius;
793 if (iLadd%2 != 0)
794 minRadiusDetBox = fgkLay4DetLongRadius;
795 minRadiusDetBox += detBoxThickness/2;
796 TGeoCombiTrans *ctDet = CreateCombiTrans(rotName, minRadiusDetBox,
797 0, -90+iLadd*dPhi);
798 virtualLayer4->AddNode(lay4Detectors, iLadd, ctDet);
799 }
800
801 if(GetDebug(1)) virtualLayer4->CheckOverlaps(0.01);
802 virtualLayer4->SetVisibility(kFALSE);
803 moth->AddNode(virtualLayer4,1,0);
804};
805
806
807//________________________________________________________________________
808TGeoVolume *AliITSv11GeometrySDD::CreateLadder(Int_t iLay) {
809 //
810 // return a box volume containing the CF ladder
811 //
812
813 Int_t nDetectors = fgkLay3Ndet;
814 Double_t ladderLength = fgkLay3LadderLength;
815 Double_t underSegDH = fLay3LadderUnderSegDH;
816 Double_t *sensorZPos = fLay3sensorZPos;
817 AliITSv11GeomCableFlat *digitCableA = fDigitCableLay3A;
818 AliITSv11GeomCableFlat *digitCableB = fDigitCableLay3B;
819
820 if (iLay==3) {}
821 else if (iLay==4) {
822 nDetectors = fgkLay4Ndet;
823 ladderLength = fgkLay4LadderLength;
824 digitCableA = fDigitCableLay4A;
825 digitCableB = fDigitCableLay4B;
826 underSegDH = fLay4LadderUnderSegDH;
827 sensorZPos = fLay4sensorZPos;
828 }
829 else {
830 printf("AliITSv11GeometrySDD::CreateLadder : error=wrong layer\n");
831 };
832 Double_t ladderBoxDH = fgkLadderHeight+fgkLadderSegBoxDH+underSegDH;
833 TGeoBBox *ladBox = new TGeoBBox("ITSsddLadBox",
834 fgkLadderWidth/2+fgkPinSuppWidth+fgkLadderSegBoxDW,
835 ladderBoxDH/2, ladderLength/2);
836 TGeoMedium *airSDD = GetMedium("ITSair");
837 TGeoVolume *virtualLadder = new TGeoVolume("ITSsddLadder",ladBox, airSDD);
838
839 // placing virtual ladder segment following detector ordering convention
840 //=======================================================================
841 char transName[30];
842
843 // adding segment this way to create cable points in the correct order ...
844 for (Int_t iSegment = nDetectors/2-1; iSegment >= 0; iSegment-- ) {
845
846 TGeoVolume *laddSegment = CreateLadderSegment(iLay, iSegment);
847 sprintf(transName, "ITSsddLay%iLaddSeg%i", iLay, iSegment);
848 Double_t segmentPos = fgkSegmentLength*(nDetectors/2-1-iSegment)
849 + fgkSegmentLength/2;
850 TGeoTranslation *segTr = new TGeoTranslation(transName, 0,
851 underSegDH/2,segmentPos);
852 ////
853 virtualLadder->AddNode(laddSegment, iSegment, segTr);
854 };
855 for (Int_t iSegment = nDetectors/2; iSegment < nDetectors; iSegment++ ) {
856
857 TGeoVolume *laddSegment = CreateLadderSegment(iLay, iSegment);
858 sprintf(transName, "ITSsddLay%iLaddSeg%i", iLay, iSegment);
859 Double_t segmentPos = fgkSegmentLength*(nDetectors/2-1-iSegment)
860 + fgkSegmentLength/2;
861 TGeoTranslation *segTr = new TGeoTranslation(transName, 0,
862 underSegDH/2,segmentPos);
863 ////
864 virtualLadder->AddNode(laddSegment, iSegment, segTr);
865 };
866
867 // putting virtual volume corresponding to the end of ladder
868 //=======================================================================
869 TGeoVolume *endLadder = CreateEndLadder( iLay );
870 Double_t endLength = (ladderLength - nDetectors*fgkSegmentLength)/2.;
871 TGeoTranslation *endTrZPos = new TGeoTranslation("ITSsddEndTrZPos",0,0,
872 fgkSegmentLength*(nDetectors/2)+endLength/2.);
873 // Euler rotation : about Z, then new X, then new Z
874 TGeoRotation *endZNegRot = new TGeoRotation("",90, 180, -90);
875 TGeoCombiTrans *endTrZNeg = new TGeoCombiTrans(0,0,
876 -fgkSegmentLength*(nDetectors/2)-endLength/2.,endZNegRot);
877 virtualLadder->AddNode(endLadder, 1, endTrZPos);
878 virtualLadder->AddNode(endLadder, 2, endTrZNeg);
879
880 // creating and inserting cable segments
881 // (check points are placed while creating segments)
882 //=======================================================================
883 if (fAddCables)
884 for (Int_t iSegment = 0; iSegment < nDetectors; iSegment++ ) {
885
886 digitCableA[iSegment].SetInitialNode(virtualLadder);
887 digitCableB[iSegment].SetInitialNode(virtualLadder);
888
889 for (Int_t iPt=1; iPt<digitCableA[iSegment].GetNCheckPoints(); iPt++ ) {
890 Double_t rotation = 0;
891 if (iPt>1) rotation = 90-fgkHybridAngle;
892 digitCableA[iSegment].CreateAndInsertCableSegment(iPt, rotation);
893 };
894
895 for (Int_t iPt=1; iPt<digitCableB[iSegment].GetNCheckPoints(); iPt++ ) {
896 Double_t rotation = 0;
897 if (iPt>1) rotation = fgkHybridAngle-90;
898 digitCableB[iSegment].CreateAndInsertCableSegment(iPt, rotation);
899 };
900 };
901
902 // HV cable
903 //=======================================================================
fa4639a3 904 if (fAddHVcables) {
b7943f00 905 TGeoMedium *polyhamideSDD = GetMedium("ITSsddKAPTON_POLYCH2");
906 TGeoMedium *alSDD = GetMedium("ITSal");
907
908 AliITSv11GeomCableFlat cableHV[fgkLay4Ndet]; // temp !!!
909 char cableHVname[30];
910 for (Int_t iSegment = 0; iSegment<nDetectors; iSegment++) {
911 sprintf(cableHVname,"ITSsddHVcable%i", iSegment);
912 cableHV[iSegment].SetName(cableHVname);
913 cableHV[iSegment].SetThickness(fgkLongHVcablePolyThick+fgkLongHVcableAlThick);
914 cableHV[iSegment].SetWidth(fgkTransitHVtailWidth);
915 cableHV[iSegment].SetNLayers(2);
916 cableHV[iSegment].SetLayer(0, fgkLongHVcablePolyThick, polyhamideSDD,
917 fColorPolyhamide);
918 cableHV[iSegment].SetLayer(1, fgkLongHVcableAlThick, alSDD, fColorAl);
919 cableHV[iSegment].SetInitialNode(virtualLadder);
920 };
921 Double_t x1[3], x2[3], x3[3],
922 vY[3] = {0,1,0}, vZ[3] = {0,0,1}, vYZ[3]={0,1,1};
923
fa4639a3 924 x1[0] = -fgkTransitHVtailXpos;
925 x2[0] = -fgkTransitHVtailXpos;
926 x3[0] = -fgkTransitHVtailXpos;
b7943f00 927 for (Int_t iSegment = nDetectors/2-1; iSegment >= 0; iSegment-- ) {
928 Double_t cableSeparation = TMath::Abs(iSegment - (nDetectors/2-1))
929 *fgkLongHVcableSeparation;
930 x1[1] = - ladderBoxDH/2;
931 x2[1] = - ladderBoxDH/2 + underSegDH - cableSeparation
932 - (fgkLongHVcablePolyThick+fgkLongHVcableAlThick)/2;
933 x3[1] = x2[1];
934 x1[2] = sensorZPos[iSegment]+fgkTransitHVtailLength-5*fgkmm;
935 x2[2] = x1[2]+5*fgkmm;
936 x3[2] = ladderLength/2-endLength;
937 cableHV[iSegment].AddCheckPoint( virtualLadder, 0, x1, vY );
938 cableHV[iSegment].AddCheckPoint( virtualLadder, 1, x2, vYZ );
939 cableHV[iSegment].AddCheckPoint( virtualLadder, 2, x3, vZ );
940
941 cableHV[iSegment].CreateAndInsertCableSegment(1,0);
942 cableHV[iSegment].CreateAndInsertCableSegment(2,0);
943 };
944
945 vYZ[2] = -1;
fa4639a3 946 x1[0] = fgkTransitHVtailXpos;
947 x2[0] = fgkTransitHVtailXpos;
948 x3[0] = fgkTransitHVtailXpos;
949
b7943f00 950 for (Int_t iSegment = nDetectors/2; iSegment < nDetectors; iSegment++ ) {
951 Double_t cableSeparation = TMath::Abs(iSegment - (nDetectors/2-1))
952 *fgkLongHVcableSeparation;
953 x1[1] = - ladderBoxDH/2;
954 x2[1] = - ladderBoxDH/2 + underSegDH - cableSeparation
955 - (fgkLongHVcablePolyThick+fgkLongHVcableAlThick)/2;
956 x3[1] = x2[1];
957 x1[2] = sensorZPos[iSegment]-fgkTransitHVtailLength+5*fgkmm;
958 x2[2] = x1[2]-5*fgkmm;
959 x3[2] = -ladderLength/2+endLength;
960 cableHV[iSegment].AddCheckPoint( virtualLadder, 0, x1, vY );
961 cableHV[iSegment].AddCheckPoint( virtualLadder, 1, x2, vYZ );
962 cableHV[iSegment].AddCheckPoint( virtualLadder, 2, x3, vZ );
963
964 cableHV[iSegment].CreateAndInsertCableSegment(1,0);
965 cableHV[iSegment].CreateAndInsertCableSegment(2,0);
966 };
fa4639a3 967 };
c789ee28 968
b7943f00 969 //**********************************
970 if(GetDebug(1)) virtualLadder->CheckOverlaps(0.01);
fa4639a3 971 virtualLadder->SetVisibility(kFALSE);
b7943f00 972 return virtualLadder;
db486a6e 973};
c789ee28 974
975
db486a6e 976//________________________________________________________________________
b7943f00 977TGeoArb8 *AliITSv11GeometrySDD::CreateLadderSide(Double_t dz, Double_t angle,
978 Double_t xSign, Double_t L, Double_t H, Double_t l) {
db486a6e 979 // Create one half of the V shape corner of CF ladder
980
981 TGeoArb8 *cfLaddSide = new TGeoArb8(dz);
c789ee28 982 cfLaddSide->SetVertex( 0, 0, 0);
983 cfLaddSide->SetVertex( 1, 0, -H);
984 cfLaddSide->SetVertex( 2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
985 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
986 cfLaddSide->SetVertex( 3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
987 cfLaddSide->SetVertex( 4, 0, 0);
988 cfLaddSide->SetVertex( 5, 0, -H);
989 cfLaddSide->SetVertex( 6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)),
990 -L*TMath::Cos(angle)-l*TMath::Sin(angle));
991 cfLaddSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle));
db486a6e 992 return cfLaddSide;
993};
c789ee28 994
995
db486a6e 996//________________________________________________________________________
b7943f00 997TGeoVolume* AliITSv11GeometrySDD::CreateHybrid(Int_t iLRSide) {
998 //
999 // return a box containing the front-end hybrid
1000 //
1001
1002 Double_t roundHoleX = -fgkHybridWidth/2+fgkHybRndHoleX;
1003
1004 Double_t screenTotalThick = fgkHybGlueScrnThick+fgkHybUpThick+fgkHybAlThick;
1005 Double_t lowFLTotalThick = fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick;
1006// Double_t upFLTotalThick = fgkHybGlueUpThick +fgkHybUpThick+fgkHybAlThick;
1007 Double_t chipsCCTotThick = fgkHybUnderNiThick+fgkHybGlueAgThick
1008 +fgkHybChipThick+2*(fgkHybUpCCThick+fgkHybAlCCThick);
1009 Double_t ccUpLayerTotThick = fgkHybUpCCThick+fgkHybAlCCThick+fgkHybUpCCThick;
1010// Double_t volumeThick = (fgkHybridThBridgeThick+screenTotalThick+lowFLTotalThick
1011// + upFLTotalThick + ccUpLayerTotThick);
1012 Double_t volumeThick = (fgkHybridThBridgeThick+screenTotalThick+lowFLTotalThick
1013 +fgkHybSMDheight);
1014 Double_t lowLayerYmin = -volumeThick/2+fgkHybridThBridgeThick
1015 +screenTotalThick;
1016 Double_t flUpThick = fgkHybGlueUpThick+fgkHybUpThick;
1017
1018 //**************************************************** media :
1019 TGeoMedium *airSDD = GetMedium("ITSair");
1020 TGeoMedium *carbonFiberLadderStruct = GetMedium("ITSsddCarbonM55J");
1021 TGeoMedium *alSDD = GetMedium("ITSal");
1022 TGeoMedium *alSDD80p100 = GetMedium("ITSal"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1023 TGeoMedium *alSDD50p100 = GetMedium("ITSal"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1024 TGeoMedium *polyhamideSDD = GetMedium("ITSsddKAPTON_POLYCH2");
1025 TGeoMedium *niSDD = GetMedium("COPPER"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1026 TGeoMedium *glueAG = GetMedium("ITSsddKAPTON_POLYCH2"); // to code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1027 TGeoMedium *siliconSDD = GetMedium("ITSsddSiChip");
1028 TGeoMedium *medSMD = GetMedium("SDDX7Rcapacitors"); // TO CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1029 TGeoMedium *medSMDweld = GetMedium("SDDX7Rcapacitors"); // TO CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1030
1031 //**************************************************** main volume :
1032 TGeoBBox *hybridBox = new TGeoBBox("",fgkHybridWidth/2, volumeThick/2,
1033 (fgkHybridLength)/2);
1034 TGeoVolume *hybrid = new TGeoVolume("ITSsddHybridVol", hybridBox,
1035 airSDD);
1036
1037 TGeoBBox *sThermalBridge = new TGeoBBox( "", fgkHybridWidth/2,
1038 fgkHybridThBridgeThick/2,
1039 fgkHybridLength/2);
c789ee28 1040
b7943f00 1041 //**************************************************** Thermal bridge :
c789ee28 1042 TGeoVolume *vThermalBridge = new TGeoVolume("ITSsddHybridThBridge",
1043 sThermalBridge,
1044 carbonFiberLadderStruct);
1045 vThermalBridge->SetLineColor(fColorCarbonFiber);
b7943f00 1046 TGeoTranslation *thBridgeTr = new TGeoTranslation(0, -volumeThick/2
1047 +fgkHybridThBridgeThick/2, 0);
1048 hybrid->AddNode(vThermalBridge, 1, thBridgeTr);
1049
1050 //**************************************************** Screen layer :
1051 TGeoBBox *sAlScreenLayer = new TGeoBBox("sAlScreenLayer", fgkHybridWidth/2,
1052 fgkHybAlThick/2, fgkHybridLength/2);
1053 //here the upedex and glue layers are both assumed to be polyimide
1054 TGeoBBox *sUpGlueScreenLayer = new TGeoBBox("sUpGlueScreenLayer",
1055 fgkHybridWidth/2,
1056 (fgkHybUpThick+fgkHybGlueScrnThick)/2,
1057 fgkHybridLength/2);
1058 TGeoTube *sRoundHole = new TGeoTube("sRoundHole", 0, fgkHybRndHoleRad,
1059 (screenTotalThick+lowFLTotalThick)/2);
1060
1061 TGeoTranslation *upGlueScreenTr = new TGeoTranslation("upGlueScreenTr",0,
1062 -volumeThick/2+fgkHybridThBridgeThick+(fgkHybUpThick+fgkHybGlueScrnThick)/2,0);
1063
1064 TGeoTranslation *alScreenTr = new TGeoTranslation("AlScreenTr", 0,
1065 -volumeThick/2+fgkHybridThBridgeThick+fgkHybUpThick+fgkHybGlueScrnThick
1066 +fgkHybAlThick/2, 0);
1067
1068 TGeoTranslation hybHolePos1Tr(roundHoleX,
1069 -volumeThick/2+fgkHybridThBridgeThick+(screenTotalThick+lowFLTotalThick)/2,
1070 -fgkHybridLength/2+fgkHybRndHoleZ);
1071 TGeoTranslation hybHolePos2Tr(roundHoleX,
1072 -volumeThick/2+fgkHybridThBridgeThick+(screenTotalThick+lowFLTotalThick)/2,
1073 fgkHybridLength/2-fgkHybRndHoleZ);
1074 TGeoRotation rotHole("", 0, 90, 0);
1075 TGeoCombiTrans *hybHolePos1 = new TGeoCombiTrans(hybHolePos1Tr, rotHole);
1076 hybHolePos1->SetName("hybHolePos1");
1077 TGeoCombiTrans *hybHolePos2 = new TGeoCombiTrans(hybHolePos2Tr, rotHole);
1078 hybHolePos2->SetName("hybHolePos2");
1079
1080 upGlueScreenTr->RegisterYourself();
1081 alScreenTr->RegisterYourself();
1082 hybHolePos1->RegisterYourself();
1083 hybHolePos2->RegisterYourself();
1084
1085 TGeoCompositeShape *sScreenAl = new TGeoCompositeShape(
1086 "sAlScreenLayer:AlScreenTr-(sRoundHole:hybHolePos1"
1087 "+sRoundHole:hybHolePos2)");
1088 TGeoVolume *vScreenAl = new TGeoVolume("vScreenAl",sScreenAl, alSDD);
1089 vScreenAl->SetLineColor(fColorAl);
1090 TGeoCompositeShape *sScreenUpGlue = new TGeoCompositeShape(
1091 "sUpGlueScreenLayer:upGlueScreenTr-(sRoundHole:hybHolePos1"
1092 "+sRoundHole:hybHolePos2)");
1093 TGeoVolume *vScreenUpGlue = new TGeoVolume("vScreenUpGlue",
1094 sScreenUpGlue,polyhamideSDD);
1095 vScreenUpGlue->SetLineColor(fColorPolyhamide);
1096
1097 hybrid->AddNode(vScreenUpGlue, 1, 0);
1098 hybrid->AddNode(vScreenAl, 1, 0);
1099
1100 //**************************************************** FL low layer :
1101 Double_t sideWidth1 = fgkHybFLlowChipZ1 - fgkHybFLlowHoleDZ/2;
1102 Double_t sideWidth2 = fgkHybridLength - fgkHybFLlowChipZ4 - fgkHybFLlowHoleDZ/2;
1103
1104 //here the upedex and glue layers are both assumed to be polyimide
1105 TGeoBBox *sUpGlueBar1 = new TGeoBBox("sUpGlueBar1", fgkHybridWidth/2,
1106 (fgkHybGlueLowThick+fgkHybUpThick)/2,
1107 sideWidth1/2);
1108 TGeoBBox *sAlBar1 = new TGeoBBox("sAlBar1", fgkHybridWidth/2,
1109 fgkHybAlThick/2, sideWidth1/2);
1110
1111 TGeoTranslation *upGlueBarTr1 = new TGeoTranslation("upGlueBarTr1", 0,
1112 lowLayerYmin+(fgkHybGlueLowThick+fgkHybUpThick)/2,
1113 -(fgkHybridLength-sideWidth1)/2);
1114 TGeoTranslation *alBarTr1 = new TGeoTranslation("alBarTr1", 0,
1115 lowLayerYmin+fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick/2,
1116 -(fgkHybridLength-sideWidth1)/2);
1117 upGlueBarTr1->RegisterYourself();
1118 alBarTr1->RegisterYourself();
1119
1120 TGeoCompositeShape *sLowUpGlueBar1 = new TGeoCompositeShape(
1121 "sUpGlueBar1:upGlueBarTr1-sRoundHole:hybHolePos1");
1122 TGeoCompositeShape *sLowAlBar1 = new TGeoCompositeShape(
1123 "sAlBar1:alBarTr1-sRoundHole:hybHolePos1");
1124 TGeoVolume *vLowUpGlueBar1 = new TGeoVolume("vLowUpGlueBar1",
1125 sLowUpGlueBar1, polyhamideSDD);
1126 TGeoVolume *vLowAlBar1 = new TGeoVolume("vLowAlBar1",
1127 sLowAlBar1, alSDD);
1128 vLowUpGlueBar1->SetLineColor(fColorPolyhamide);
1129 vLowAlBar1->SetLineColor(fColorAl);
1130 hybrid->AddNode(vLowUpGlueBar1,1,0);
1131 hybrid->AddNode(vLowAlBar1,1,0);
1132
1133 //---
1134 //here the upedex and glue layers are both assumed to be polyimide
1135 TGeoBBox *sUpGlueBar2 = new TGeoBBox("sUpGlueBar2", fgkHybridWidth/2,
1136 (fgkHybGlueLowThick+fgkHybUpThick)/2,
1137 sideWidth2/2);
1138 TGeoBBox *sAlBar2 = new TGeoBBox("sAlBar2", fgkHybridWidth/2,
1139 fgkHybAlThick/2, sideWidth2/2);
1140
1141 TGeoTranslation *upGlueBarTr2 = new TGeoTranslation("upGlueBarTr2", 0,
1142 lowLayerYmin+(fgkHybGlueLowThick+fgkHybUpThick)/2,
1143 (fgkHybridLength-sideWidth2)/2);
1144 TGeoTranslation *alBarTr2 = new TGeoTranslation("alBarTr2", 0,
1145 lowLayerYmin+fgkHybGlueLowThick+fgkHybUpThick+fgkHybAlThick/2,
1146 (fgkHybridLength-sideWidth2)/2);
1147 upGlueBarTr2->RegisterYourself();
1148 alBarTr2->RegisterYourself();
1149
1150 TGeoCompositeShape *sLowUpGlueBar2 = new TGeoCompositeShape(
1151 "sUpGlueBar2:upGlueBarTr2-sRoundHole:hybHolePos2");
1152 TGeoCompositeShape *sLowAlBar2 = new TGeoCompositeShape(
1153 "sAlBar2:alBarTr2-sRoundHole:hybHolePos2");
1154 TGeoVolume *vLowUpGlueBar2 = new TGeoVolume("vLowUpGlueBar2",sLowUpGlueBar2,
1155 polyhamideSDD);
1156 TGeoVolume *vLowAlBar2 = new TGeoVolume("vLowAlBar2",sLowAlBar2,
1157 alSDD);
1158 vLowUpGlueBar2->SetLineColor(fColorPolyhamide);
1159 vLowAlBar2->SetLineColor(fColorAl);
1160 hybrid->AddNode(vLowUpGlueBar2, 1, 0);
1161 hybrid->AddNode(vLowAlBar2, 1, 0);
1162
1163 if(GetDebug(3)){ // Remove compiler warning.
1164 sAlScreenLayer->InspectShape();
1165 sUpGlueScreenLayer->InspectShape();
1166 sRoundHole->InspectShape();
1167 sUpGlueBar1->InspectShape();
1168 sUpGlueBar2->InspectShape();
1169 sAlBar1->InspectShape();
1170 sAlBar2->InspectShape();
1171 };
1172 //---
1173 //using class AliITSv11GeomCableFlat to add 2-layer segments ...
1174 Double_t piece1width = fgkHybFLlowPasX-fgkHybFLlowHolePasDX/2;
1175 AliITSv11GeomCableFlat lowFLpiece("lowFLpiece1",piece1width,
1176 lowFLTotalThick);
1177 lowFLpiece.SetNLayers(2);
1178 lowFLpiece.SetLayer(0, fgkHybGlueLowThick+fgkHybUpThick, polyhamideSDD,
1179 fColorPolyhamide);
1180 lowFLpiece.SetLayer(1, fgkHybAlThick, alSDD80p100, fColorAl);
1181 // alSDD at 80% : mostly to take into account strips of piece 3
1182
1183 Double_t x1[3] = { -fgkHybridWidth/2 + piece1width/2,
1184 lowLayerYmin + lowFLTotalThick/2,
1185 -fgkHybridLength/2 + sideWidth1 };
1186 Double_t x2[3] ={ x1[0], x1[1], fgkHybridLength/2 - sideWidth2 };
1187 Double_t vZ[3] = {0,0,1};
1188 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
1189 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
1190 lowFLpiece.SetInitialNode(hybrid);
1191 lowFLpiece.CreateAndInsertCableSegment(1);
1192 lowFLpiece.ResetPoints();
1193
1194 Double_t piece2width = fgkHybFLlowAmbX-fgkHybFLlowPasX
1195 -fgkHybFLlowHolePasDX/2-fgkHybFLlowHoleAmbDX/2;
1196
1197 lowFLpiece.SetWidth(piece2width);
1198 lowFLpiece.SetName("lowFLpiece2");
1199 x1[0] = piece2width/2+fgkHybFLlowPasX+fgkHybFLlowHolePasDX/2-fgkHybridWidth/2;
1200 x2[0] = x1[0];
1201 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
1202 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
1203 lowFLpiece.CreateAndInsertCableSegment(1);
1204 lowFLpiece.ResetPoints();
1205
1206 Double_t piece3width = fgkHybridWidth - fgkHybFLlowAmbX
1207 - fgkHybFLlowHoleAmbDX/2;
1208
1209 lowFLpiece.SetWidth(piece3width);
1210 lowFLpiece.SetName("lowFLpiece3");
1211 x1[0] = fgkHybridWidth/2-piece3width/2;
1212 x2[0] = x1[0];
1213 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vZ );
1214 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vZ );
1215 lowFLpiece.CreateAndInsertCableSegment(1);
1216
1217 Double_t zChips[4] = {fgkHybFLlowChipZ1,fgkHybFLlowChipZ2,
1218 fgkHybFLlowChipZ3,fgkHybFLlowChipZ4};
1219 Double_t vX[3] = {1,0,0};
1220 for (Int_t i=0; i<3; i++) {
1221 char ch[20];
1222 sprintf(ch, "lowFLpieceA%i", i+4);
1223 lowFLpiece.SetName(ch);
1224 lowFLpiece.SetWidth(zChips[i+1]-zChips[i]-fgkHybFLlowHoleDZ);
1225
1226 lowFLpiece.SetLayer(1, fgkHybAlThick, alSDD, fColorAl);
1227 x1[0] = -fgkHybridWidth/2 + piece1width;
1228 x2[0] = x1[0] + fgkHybFLlowHolePasDX;
1229 Double_t zPiece = (zChips[i+1]+zChips[i])/2 - fgkHybridLength/2;
1230 x1[2] = zPiece; x2[2] = zPiece;
1231 lowFLpiece.AddCheckPoint( hybrid, 0, x2, vX );
1232 lowFLpiece.AddCheckPoint( hybrid, 1, x1, vX );
1233 lowFLpiece.CreateAndInsertCableSegment(1,90);
1234 lowFLpiece.ResetPoints();
1235
1236 sprintf(ch, "lowFLpieceB%i", i+4);
1237 lowFLpiece.SetName(ch);
1238 x1[0] = fgkHybridWidth/2 - piece3width;
1239 x2[0] = x1[0] - fgkHybFLlowHoleAmbDX;
1240 lowFLpiece.AddCheckPoint( hybrid, 0, x1, vX );
1241 lowFLpiece.AddCheckPoint( hybrid, 1, x2, vX );
1242 lowFLpiece.CreateAndInsertCableSegment(1,90);
1243 };
1244
1245 //**************************************************** chips+CC:
1246 AliITSv11GeomCableFlat chip("", fgkHybChipsDZ, chipsCCTotThick);
1247 chip.SetInitialNode(hybrid);
1248 chip.SetNLayers(5);
1249 chip.SetLayer(0, fgkHybUnderNiThick, niSDD, 2);
1250 chip.SetLayer(1, fgkHybGlueAgThick, glueAG, 4);
1251 chip.SetLayer(2, fgkHybChipThick, siliconSDD, fColorSilicon);
1252 chip.SetLayer(3, fgkHybUpCCThick+fgkHybUpCCThick, polyhamideSDD,
1253 fColorPolyhamide);
1254 chip.SetLayer(4, fgkHybAlCCThick+fgkHybAlCCThick, alSDD80p100, fColorAl);
1255 // Here the tho CC (low+up) are merged
1256 // In fact, the last layer has a smaller surface of Al -> I put 80%
1257
1258 x1[1] = lowLayerYmin + chipsCCTotThick/2;
1259 x2[1] = x1[1];
1260 char ch[20];
1261
1262 for (Int_t i=0; i<4; i++) {
1263 sprintf(ch, "pascalCC%i", i);
1264 chip.SetName(ch);
1265 x1[0] = fgkHybFLlowPasX - fgkHybridWidth/2 - fgkHybPascalDX/2;
1266 x2[0] = x1[0] + fgkHybPascalDX;
1267 x1[2] = zChips[i] - fgkHybridLength/2;
1268 x2[2] = x1[2];
1269 chip.AddCheckPoint( hybrid, 0, x1, vX );
1270 chip.AddCheckPoint( hybrid, 1, x2, vX );
1271 chip.CreateAndInsertCableSegment(1,-90);
1272 chip.ResetPoints();
1273
1274 sprintf(ch, "ambraCC%i", i);
1275 chip.SetName(ch);
1276 x1[0] = fgkHybFLlowAmbX - fgkHybridWidth/2 - fgkHybAmbraDX/2;
1277 x2[0] = x1[0] + fgkHybAmbraDX;
1278 chip.AddCheckPoint( hybrid, 0, x1, vX );
1279 chip.AddCheckPoint( hybrid, 1, x2, vX );
1280 chip.CreateAndInsertCableSegment(1,-90);
1281 chip.ResetPoints();
1282 };
c789ee28 1283
b7943f00 1284 //**************************************************** CC outside chips:
1285 // je crois qu'il n'y a pas de 2ieme couche d'alu ici ...
1286 for (Int_t i = 0; i<4; i++) {
1287 char ch[20];
1288 sprintf(ch, "ccLayerA%i", i);
1289
1290 AliITSv11GeomCableFlat ccLayer1(ch, 6.6*fgkmm, ccUpLayerTotThick);
1291 ccLayer1.SetInitialNode(hybrid);
1292 ccLayer1.SetNLayers(2);
1293 ccLayer1.SetLayer(0, 2*fgkHybUpCCThick, polyhamideSDD, fColorPolyhamide);
1294 ccLayer1.SetLayer(1, fgkHybAlCCThick, alSDD50p100, fColorAl);
1295 // Al at ~50%
1296
1297 x1[0] = -fgkHybridWidth/2;
1298 x2[0] = fgkHybFLlowPasX - fgkHybridWidth/2 - fgkHybPascalDX/2;
1299 x1[1] = lowLayerYmin + fgkHybUnderNiThick + fgkHybGlueAgThick
1300 + fgkHybChipThick + ccUpLayerTotThick/2;
1301 x2[1] = x1[1];
1302 x1[2] = zChips[i] - fgkHybridLength/2;
1303 x2[2] = x1[2];
1304 ccLayer1.AddCheckPoint( hybrid, 0, x1, vX );
1305 ccLayer1.AddCheckPoint( hybrid, 1, x2, vX );
1306 ccLayer1.CreateAndInsertCableSegment(1,-90);
1307
1308 sprintf(ch, "ccLayerB%i", i);
1309 AliITSv11GeomCableFlat ccLayer2(ch, fgkHybChipsDZ, ccUpLayerTotThick);
1310 ccLayer2.SetInitialNode(hybrid);
1311 ccLayer2.SetNLayers(2);
1312 ccLayer2.SetLayer(0, 2*fgkHybUpCCThick, polyhamideSDD, fColorPolyhamide);
1313 ccLayer2.SetLayer(1, fgkHybAlCCThick, alSDD50p100, fColorAl);
1314 // Al at ~50%
1315
1316 x1[0] = -fgkHybridWidth/2 + fgkHybFLlowPasX + fgkHybPascalDX/2;
1317 x2[0] = -fgkHybridWidth/2 + fgkHybFLlowAmbX - fgkHybAmbraDX/2;
1318 ccLayer2.AddCheckPoint( hybrid, 0, x1, vX );
1319 ccLayer2.AddCheckPoint( hybrid, 1, x2, vX );
1320 ccLayer2.CreateAndInsertCableSegment(1,-90);
1321 ccLayer2.ResetPoints();
1322 sprintf(ch, "ccLayerC%i", i);
1323 ccLayer2.SetName(ch);
1324 x1[0] = -fgkHybridWidth/2 + fgkHybFLlowAmbX + fgkHybAmbraDX/2;
1325 x2[0] = fgkHybridWidth/2 - fgkHybFLUpperWidth + 3*fgkmm;
1326 x1[1] = lowLayerYmin + lowFLTotalThick + flUpThick + fgkHybAlThick
1327 + ccUpLayerTotThick/2;
1328 x2[1] = x1[1];
1329
1330 ccLayer2.AddCheckPoint( hybrid, 0, x1, vX );
1331 ccLayer2.AddCheckPoint( hybrid, 1, x2, vX );
1332 ccLayer2.CreateAndInsertCableSegment(1,-90);
1333 };
c789ee28 1334
b7943f00 1335 //**************************************************** FL UP:
1336 // (last Al layer will be a special triangular shape)
1337 TGeoBBox *sFLupPolyhamide = new TGeoBBox("sFLupPolyhamide",
1338 fgkHybFLUpperWidth/2, flUpThick/2,
1339 fgkHybFLUpperLength/2);
1340 TGeoVolume *vFLupPolyhamide = new TGeoVolume("vFLupPolyhamide",
1341 sFLupPolyhamide, polyhamideSDD);
1342 vFLupPolyhamide->SetLineColor(fColorPolyhamide);
1343 TGeoTranslation *trFLupPolyhamide =
1344 new TGeoTranslation(fgkHybridWidth/2-fgkHybFLUpperWidth/2,
1345 lowLayerYmin+lowFLTotalThick+flUpThick/2,0);
1346
1347 hybrid->AddNode(vFLupPolyhamide, 1, trFLupPolyhamide);
1348
1349 TGeoArb8 *aluStrip = new TGeoArb8(fgkHybAlThick/2);
1350 aluStrip->SetVertex( 0,-fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
1351 aluStrip->SetVertex( 1, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
1352 aluStrip->SetVertex( 2, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth-fgkHybFLUpperAldx);
1353 aluStrip->SetVertex( 3,-fgkHybFLUpperAlDZ/2, 0);
1354 aluStrip->SetVertex( 4,-fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
1355 aluStrip->SetVertex( 5, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth);
1356 aluStrip->SetVertex( 6, fgkHybFLUpperAlDZ/2, fgkHybFLUpperWidth-fgkHybFLUpperAldx);
1357 aluStrip->SetVertex( 7,-fgkHybFLUpperAlDZ/2, 0);
1358 TGeoVolume *vAluStrip = new TGeoVolume("vAluStrip",aluStrip, alSDD50p100);
1359 // Al at ~50%
1360
1361 vAluStrip->SetLineColor(fColorAl);
1362 TGeoRotation rotAluStrip("rotAluStrip",0, -90, 90);
1363 Double_t yRotAluStrip = lowLayerYmin+lowFLTotalThick
1364 +flUpThick+fgkHybAlThick/2;
1365 TGeoCombiTrans *aluStripTr1 = new TGeoCombiTrans(
1366 fgkHybridWidth/2,yRotAluStrip,
1367 fgkHybridLength/2-fgkHybFLlowChipZ1+1*fgkmm, &rotAluStrip);
1368 TGeoCombiTrans *aluStripTr2 = new TGeoCombiTrans(*aluStripTr1);
1369 AddTranslationToCombiTrans(aluStripTr2,0,0,
1370 fgkHybFLlowChipZ1-fgkHybFLlowChipZ2);
1371 TGeoCombiTrans *aluStripTr3 = new TGeoCombiTrans(*aluStripTr2);
1372 AddTranslationToCombiTrans(aluStripTr3,0,0,
1373 fgkHybFLlowChipZ2-fgkHybFLlowChipZ3);
1374 TGeoCombiTrans *aluStripTr4 = new TGeoCombiTrans(*aluStripTr3);
1375 AddTranslationToCombiTrans(aluStripTr4,0,0,
1376 fgkHybFLlowChipZ3-fgkHybFLlowChipZ4);
1377
1378 hybrid->AddNode(vAluStrip, 1, aluStripTr1);
1379 hybrid->AddNode(vAluStrip, 2, aluStripTr2);
1380 hybrid->AddNode(vAluStrip, 3, aluStripTr3);
1381 hybrid->AddNode(vAluStrip, 4, aluStripTr4);
1382
1383 //**************************************************** SMD:
1384 TGeoBBox *hybSMD = new TGeoBBox("ITSsddSMDshape",
1385 fgkHybSMDmiddleL/2+fgkHybSMDendL,
1386 fgkHybSMDheight/2,fgkHybSMDendW/2);
1387 TGeoVolume *vHybSMD = new TGeoVolume("ITSsddSMD",hybSMD,airSDD);
1388
1389 TGeoBBox *hybSMDmiddle = new TGeoBBox("ITSsddSMDmiddleShape",
1390 fgkHybSMDmiddleL/2,fgkHybSMDheight/2,
1391 fgkHybSMDmiddleW/2);
1392 TGeoVolume *vHybSMDmiddle = new TGeoVolume("ITSsddSMDmiddle",
1393 hybSMDmiddle,medSMD);
1394 vHybSMDmiddle->SetLineColor(fColorSMD);
1395 TGeoBBox *hybSMDend = new TGeoBBox("ITSsddSMDendShape",
1396 fgkHybSMDendL/2,fgkHybSMDheight/2,fgkHybSMDendW/2);
1397 TGeoVolume *vHybSMDend = new TGeoVolume("ITSsddSMDend",
1398 hybSMDend,medSMDweld);
1399 vHybSMDend->SetLineColor(fColorSMDweld);
1400 TGeoTranslation *vHybSMDendTr1 = new TGeoTranslation("",
1401 (fgkHybSMDmiddleL+fgkHybSMDendL)/2,0,0);
1402 TGeoTranslation *vHybSMDendTr2 = new TGeoTranslation("",
1403 -(fgkHybSMDmiddleL+fgkHybSMDendL)/2,0,0);
1404 vHybSMD->AddNode(vHybSMDmiddle,1,0);
1405 vHybSMD->AddNode(vHybSMDend,1,vHybSMDendTr1);
1406 vHybSMD->AddNode(vHybSMDend,2,vHybSMDendTr2);
1407 for (Int_t i=0; i<fgkNHybSMD; i++) {
1408 TGeoTranslation *vHybSMDtr = new TGeoTranslation("",
1409 -fgkHybridWidth/2+fgkHybSMDposX[i],
1410 lowLayerYmin+lowFLTotalThick+fgkHybSMDheight/2,
1411 -fgkHybridLength/2+fgkHybSMDposZ[i]);
1412 hybrid->AddNode(vHybSMD, i+1, vHybSMDtr);
1413 };
1414
1415
1416 if (iLRSide == 0) {
1417 };
1418
1419 if(GetDebug(1)) hybrid->CheckOverlaps(0.01);
1420 hybrid->SetVisibility(kFALSE);
1421 return hybrid;
db486a6e 1422};
c789ee28 1423
1424
db486a6e 1425//________________________________________________________________________
c789ee28 1426TGeoVolume* AliITSv11GeometrySDD::CreateLadderSegment(Int_t iLay, Int_t iSeg) {
b7943f00 1427 //
1428 // Return a box volume containing a segment of a ladder.
1429 //
1430
1431 TGeoMedium *airSDD = GetMedium("ITSair");
1432 TGeoMedium *phynoxSDD = GetMedium("ITSal"); // phynoxSDD To code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1433 TGeoMedium *coolerMediumSDD = GetMedium("WATER");
1434
1435 Double_t tDY = fgkLadderSegBoxDH/2; //space left on top of the ladder
1436 Double_t segmentLength = fgkSegmentLength;
1437 Double_t spaceBetweenCables = 500*fgkmicron;
1438
1439 //*****************************************
1440 // Set parameters according to (iLay,iSeg):
1441 //*****************************************
1442 Int_t nDetectors = fgkLay3Ndet;
1443 Double_t coolPipeSuppH = fgkLay3CoolPipeSuppH;
1444 Double_t sensorCenterZPos = fLay3sensorZPos[iSeg]-
1445 (fgkSegmentLength*fgkLay3Ndet/2. -
1446 fgkSegmentLength/2-(iSeg)*fgkSegmentLength);
1447 // sensorCenterZPos = z in segment local coord syst.
1448
1449 AliITSv11GeomCableFlat *digitCableA = fDigitCableLay3A;
1450 AliITSv11GeomCableFlat *digitCableB = fDigitCableLay3B;
1451
1452 if (iLay==3) {
1453 } else if (iLay==4) {
1454 nDetectors = fgkLay4Ndet;
1455 coolPipeSuppH = fgkLay4CoolPipeSuppH;
1456 sensorCenterZPos = fLay4sensorZPos[iSeg]-
1457 (fgkSegmentLength*fgkLay4Ndet/2. -
1458 fgkSegmentLength/2-(iSeg)*fgkSegmentLength);
1459 digitCableA = fDigitCableLay4A;
1460 digitCableB = fDigitCableLay4B;
1461 } else
1462 printf("AliITSv11GeometrySDD::CreateLadderSegment Wrong layer index !");
1463
1464
1465 Double_t cableSideSign = -1;
1466 if (iSeg<nDetectors/2) cableSideSign = 1;
1467 Double_t spaceForCables = spaceBetweenCables*
1468 (nDetectors-TMath::Abs(nDetectors-2*iSeg-1)-1)/2
1469 +0.1*fgkmicron;
1470 // gives [0-1-2-2-1-0]*spaceBetweenCables
1471 // or [0-1-2-3-3-2-1-0]*spaceBetweenCables
1472 Int_t iUpdateCableMin;
1473 Int_t iUpdateCableMax;
1474 if (cableSideSign==-1) {
1475 iUpdateCableMin = nDetectors/2;
1476 iUpdateCableMax = iSeg-1;
1477 } else {
1478 iUpdateCableMin = iSeg+1;
1479 iUpdateCableMax = nDetectors/2-1;
1480 };
1481
1482 if(GetDebug(1)){
1483 cout << "Segment ("<< iLay <<',' << iSeg
1484 << ") : sensor z shift in local segment coord.="
1485 << sensorCenterZPos << endl;
1486 };
1487
1488 //****************************
1489 // The segment volume
1490 //****************************
1491 TGeoBBox *segBox = new TGeoBBox("ITSsddSegBox",
1492 fgkLadderWidth/2+fgkPinSuppWidth+fgkLadderSegBoxDW,
1493 fgkLadderHeight/2+fgkLadderSegBoxDH/2,
1494 segmentLength/2);
1495
1496 TGeoVolume *virtualSeg = new TGeoVolume("ITSsddSegment",
1497 segBox, airSDD);
1498
1499 //******************************
1500 // Carbon fiber structure :
1501 //******************************
1502
1503 virtualSeg->AddNode(fLaddSegCommonVol[0], 1, fLaddSegCommonTr[0]);
1504 Int_t volumeIndex = 1;
1505 for (Int_t i = 1; i<fgkNladdSegCommonVol;i++ ) {
1506 if (fLaddSegCommonVol[i]==fLaddSegCommonVol[i-1])
1507 volumeIndex++;
1508 else
1509 volumeIndex = 1;
1510 virtualSeg->AddNode(fLaddSegCommonVol[i], volumeIndex,
1511 fLaddSegCommonTr[i]);
1512 };
1513
1514 //**********************************
1515 // Pine support of the sensors :
1516 //**********************************
1517 TGeoRotation rotPS1("",0,-90,90);
1518 TGeoRotation rotPS2("",0,-90,-90);
1519 TGeoCombiTrans *transPS1 = new TGeoCombiTrans( fgkPinDYOnSensor,
1520 - fgkLadderHeight/2.-tDY
1521 + fgkPinSuppHeight/2.,
1522 sensorCenterZPos+fgkPinDXminOnSensor,&rotPS1);
1523 TGeoCombiTrans *transPS2 = new TGeoCombiTrans(*transPS1);
1524 AddTranslationToCombiTrans(transPS2, 0, 0, fgkPinPinDDXOnSensor);
1525 TGeoCombiTrans *transPS3 = new TGeoCombiTrans(*transPS1);
1526 AddTranslationToCombiTrans(transPS3, 0, 0, -2*fgkPinDXminOnSensor);
1527 TGeoCombiTrans *transPS4 = new TGeoCombiTrans(*transPS3);
1528 AddTranslationToCombiTrans(transPS4, 0, 0, -fgkPinPinDDXOnSensor);
1529
1530 TGeoCombiTrans *transPS5 = new TGeoCombiTrans( -fgkPinDYOnSensor,
1531 - fgkLadderHeight/2. - tDY
1532 + fgkPinSuppHeight/2.,
1533 sensorCenterZPos+fgkPinDXminOnSensor,&rotPS2);
1534 TGeoCombiTrans *transPS6 = new TGeoCombiTrans(*transPS5);
1535 AddTranslationToCombiTrans(transPS6, 0, 0, fgkPinPinDDXOnSensor);
1536 TGeoCombiTrans *transPS7 = new TGeoCombiTrans(*transPS5);
1537 AddTranslationToCombiTrans(transPS7, 0, 0, -2*fgkPinDXminOnSensor);
1538 TGeoCombiTrans *transPS8 = new TGeoCombiTrans(*transPS7);
1539 AddTranslationToCombiTrans(transPS8, 0, 0, -fgkPinPinDDXOnSensor);
1540
1541 virtualSeg->AddNode(fPinSupport, 1, transPS1);
1542 virtualSeg->AddNode(fPinSupport, 2, transPS2);
1543 virtualSeg->AddNode(fPinSupport, 3, transPS3);
1544 virtualSeg->AddNode(fPinSupport, 4, transPS4);
1545 virtualSeg->AddNode(fPinSupport, 5, transPS5);
1546 virtualSeg->AddNode(fPinSupport, 6, transPS6);
1547 virtualSeg->AddNode(fPinSupport, 7, transPS7);
1548 virtualSeg->AddNode(fPinSupport, 8, transPS8);
1549
1550 //******************************
1551 // Cooling pipe supports :
1552 //******************************
1553 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
1554 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
1555 Double_t triangleCPaxeDist = fgkCoolPipeSuppAxeDist-fgkCoolPipeSuppWidthExt-
1556 fgkCoolPipeSuppWidthIn+fgkLadderBeamRadius;
1557
1558 Double_t coolPipeSuppL = TMath::Tan(halfTheta)*
1559 (triangleHeight+triangleCPaxeDist/
1560 TMath::Sin(halfTheta)-coolPipeSuppH);
1561 if (fAddCoolingSyst) {
1562 TGeoRotation rotCPS2("", -halfTheta*TMath::RadToDeg(), -90, 90);
1563 TGeoRotation rotCPS1("", halfTheta*TMath::RadToDeg(), -90, -90);
1564 TGeoCombiTrans *transCPS1 = new TGeoCombiTrans(coolPipeSuppL,
fa4639a3 1565 -fgkLadderHeight/2. - tDY
b7943f00 1566 +coolPipeSuppH+fgkLadderBeamRadius,
1567 -segmentLength/2., &rotCPS1);
1568 TGeoCombiTrans *transCPS3 = new TGeoCombiTrans(*transCPS1);
1569 AddTranslationToCombiTrans(transCPS3, 0, 0, segmentLength);
1570
1571 TGeoCombiTrans *transCPS2 = new TGeoCombiTrans(-coolPipeSuppL,
fa4639a3 1572 -fgkLadderHeight/2.- tDY
b7943f00 1573 +coolPipeSuppH+fgkLadderBeamRadius,
1574 segmentLength/2., &rotCPS2);
1575 TGeoCombiTrans *transCPS4 = new TGeoCombiTrans(*transCPS2);
1576 AddTranslationToCombiTrans(transCPS4, 0, 0, -segmentLength);
1577
1578 virtualSeg->AddNode(fCoolPipeSupportL, 1, transCPS1);
1579 virtualSeg->AddNode(fCoolPipeSupportL, 2, transCPS2);
1580 virtualSeg->AddNode(fCoolPipeSupportR, 1, transCPS3);
1581 virtualSeg->AddNode(fCoolPipeSupportR, 2, transCPS4);
1582 };
1583
1584 //************************
1585 // Cooling pipes :
1586 //************************
1587 TGeoTranslation *pipeTr1 = new TGeoTranslation(coolPipeSuppL,
1588 -fgkLadderHeight/2. - tDY +
1589 fgkLadderBeamRadius+coolPipeSuppH, 0);
1590 TGeoTranslation *pipeTr2 = new TGeoTranslation(-coolPipeSuppL,
1591 -fgkLadderHeight/2.- tDY +
1592 fgkLadderBeamRadius+coolPipeSuppH, 0);
1593
1594 if (fAddCoolingSyst) {
1595 TGeoTube *coolingPipeShape = new TGeoTube( fgkCoolPipeInnerDiam/2,
1596 fgkCoolPipeOuterDiam/2,
1597 segmentLength/2);
1598 TGeoTube *coolerShape = new TGeoTube( 0, fgkCoolPipeInnerDiam/2,
1599 segmentLength/2);
1600
1601 TGeoVolume *coolingPipe = new TGeoVolume("ITSsddCoolingPipe",
1602 coolingPipeShape, phynoxSDD );
1603 coolingPipe->SetLineColor(fColorPhynox);
1604 TGeoVolume *cooler = new TGeoVolume("ITSsddCoolingLiquid",coolerShape,
1605 coolerMediumSDD );
1606
1607
1608 virtualSeg->AddNode(coolingPipe, 1, pipeTr1);
1609 virtualSeg->AddNode(coolingPipe, 2, pipeTr2);
1610 if (fCoolingOn) {
1611 virtualSeg->AddNode(cooler, 1, pipeTr1);
1612 virtualSeg->AddNode(cooler, 2, pipeTr2);
1613 };
1614 };
c789ee28 1615
b7943f00 1616 //**********************************
1617 // Bases of hybrid thermal bridges
1618 //**********************************
1619 Double_t shiftHyb = 1.05; // shift between thermal Bridge base and thermal bridge
1620 // approx !!! not clear on 0752/14-A
1621 if (fAddCoolingSyst) {
1622 TGeoRotation rotHybrid1("", 0, 0, -90 - fgkHybridAngle);
1623 TGeoRotation rotHybrid2("", 0 ,180, 90 - fgkHybridAngle);
1624 TGeoCombiTrans *baseTr1 = new TGeoCombiTrans(*pipeTr2, rotHybrid1);
1625 TGeoCombiTrans *baseTr2 = new TGeoCombiTrans(*pipeTr1, rotHybrid2);
1626
1627 virtualSeg->AddNode(fBaseThermalBridge, 1, baseTr1);
1628 virtualSeg->AddNode(fBaseThermalBridge, 2, baseTr2);
1629 };
1630
1631 //*************************
1632 // the 2 hybrids :
1633 //*************************
1634 Double_t hybDy = ((TGeoBBox*)fHybrid->GetShape())->GetDY();
1635 Double_t distAxeToHybridCenter = fgkBTBaxisAtoBase+hybDy;
1636
1637 Double_t hybrVolX = ( distAxeToHybridCenter*CosD(fgkHybridAngle)
1638 - shiftHyb*SinD(fgkHybridAngle) );
1639 Double_t hybrVolY = ( distAxeToHybridCenter*SinD(fgkHybridAngle)
1640 + shiftHyb*CosD(fgkHybridAngle) );
1641 if (fAddHybrids) {
1642 TGeoRotation rotHybrid3("", 0, 0, 90. - fgkHybridAngle);
1643 TGeoRotation rotHybrid4("", 0 ,180, -90. - fgkHybridAngle);
1644 TGeoCombiTrans *hybTr1 = new TGeoCombiTrans(*pipeTr2, rotHybrid3);
1645 TGeoCombiTrans *hybTr2 = new TGeoCombiTrans(*pipeTr1, rotHybrid4);
1646 AddTranslationToCombiTrans( hybTr1, -hybrVolX, hybrVolY, 0);
1647 AddTranslationToCombiTrans( hybTr2, hybrVolX, hybrVolY, 0);
1648
1649 virtualSeg->AddNode(fHybrid, 1, hybTr1);
1650 virtualSeg->AddNode(fHybrid, 2, hybTr2);
1651 };
1652
1653 //***********
1654 // cables
1655 //***********
1656 if (fAddCables) {
1657 // Starting from this segment
1658 Double_t hybDz = ((TGeoBBox*)fHybrid->GetShape())->GetDZ();
1659 Double_t hybDx = ((TGeoBBox*)fHybrid->GetShape())->GetDX();
1660 Double_t posDigitCableAlongHyb = shiftHyb+ hybDx
1661 - digitCableA->GetWidth()/2;
1662 Double_t distAxeToDigitCableCenter = distAxeToHybridCenter+hybDy
1663 - digitCableA->GetThickness()/2;
1664
1665 Double_t digitCableX = ( coolPipeSuppL
1666 + distAxeToDigitCableCenter*CosD(fgkHybridAngle)
1667 - posDigitCableAlongHyb*SinD(fgkHybridAngle) );
1668 Double_t digitCableY = ( - fgkLadderHeight/2.-TMath::Abs(tDY)
1669 + fgkLadderBeamRadius+coolPipeSuppH
1670 + distAxeToDigitCableCenter*SinD(fgkHybridAngle)
1671 + posDigitCableAlongHyb*CosD(fgkHybridAngle) );
1672
1673
1674 Double_t digitCableCenterA0[3]={ -cableSideSign*digitCableX,
1675 digitCableY, cableSideSign*hybDz };
1676 Double_t digitCableCenterA1[3] = {
1677 -cableSideSign*(digitCableX+spaceForCables*CosD(fgkHybridAngle)),
1678 digitCableY+spaceForCables*SinD(fgkHybridAngle),
1679 cableSideSign*segmentLength/2 };
1680
1681 Double_t digitCableCenterB0[3]={ cableSideSign*digitCableX,
1682 digitCableY,cableSideSign*hybDz};
1683 Double_t digitCableCenterB1[3]={
1684 cableSideSign*(digitCableX+spaceForCables*CosD(fgkHybridAngle)),
1685 digitCableY+spaceForCables*SinD(fgkHybridAngle),
1686 cableSideSign*segmentLength/2 };
1687
1688 Double_t vZ[3] = {0,0,1};
1689 digitCableA[iSeg].AddCheckPoint( virtualSeg, 0, digitCableCenterA0, vZ);
1690 digitCableA[iSeg].AddCheckPoint( virtualSeg, 1, digitCableCenterA1, vZ);
1691 digitCableB[iSeg].AddCheckPoint( virtualSeg, 0, digitCableCenterB0, vZ);
1692 digitCableB[iSeg].AddCheckPoint( virtualSeg, 1, digitCableCenterB1, vZ);
1693
1694 // Updating the other cables
1695 for (Int_t iCable=iUpdateCableMin; iCable<=iUpdateCableMax; iCable++) {
1696
1697 Int_t iPoint = TMath::Abs(iCable-iSeg)+1;
1698 Double_t coord[3];
1699 digitCableA[iCable].GetPoint( 1, coord);
1700 digitCableA[iCable].AddCheckPoint( virtualSeg, iPoint, coord, vZ);
1701 digitCableB[iCable].GetPoint( 1, coord);
1702 digitCableB[iCable].AddCheckPoint( virtualSeg, iPoint, coord, vZ);
1703 };
1704 };
1705
1706 //**********************************
1707 if(GetDebug(1)) virtualSeg->CheckOverlaps(0.01);
fa4639a3 1708 virtualSeg->SetVisibility(kFALSE);
b7943f00 1709 return virtualSeg;
db486a6e 1710};
db486a6e 1711
c789ee28 1712
1713//________________________________________________________________________
1714TGeoVolume* AliITSv11GeometrySDD::CreatePinSupport() {
1715//
1716// Create a pine support
1717// axis of rotation is the cone axis, center in its middle
1718//
b7943f00 1719 TGeoCone *cone = new TGeoCone("ITSsddPinSuppCone",fgkPinSuppHeight/2.,
1720 0,fgkPinSuppRmax,0,fgkPinSuppRmax-
1721 fgkPinSuppHeight*TanD(fgkPinSuppConeAngle) );
1722 TGeoBBox *tong = new TGeoBBox("ITSsddPinSuppTong",fgkPinSuppRmax,
1723 fgkPinSuppLength/2.,fgkPinSuppThickness/2.);
1724 TGeoTube *hole = new TGeoTube("ITSsddPinSuppHole",0,fgkPinR,
1725 fgkPinSuppHeight/2.);
c789ee28 1726 if(GetDebug(3)){// Remove compiler warning.
db486a6e 1727 cone->InspectShape();
1728 tong->InspectShape();
1729 hole->InspectShape();
c789ee28 1730 };
db486a6e 1731
1732 TGeoTranslation *tongTrans = new TGeoTranslation("ITSsddPinSuppTongTr",0,
b7943f00 1733 fgkPinSuppLength/2.,-fgkPinSuppHeight/2.+fgkPinSuppThickness/2.);
db486a6e 1734 tongTrans->RegisterYourself();
1735 TGeoCompositeShape *pinSupportShape = new TGeoCompositeShape(
b7943f00 1736 "ITSsddPinSupportShape","(ITSsddPinSuppCone+"
db486a6e 1737 "ITSsddPinSuppTong:ITSsddPinSuppTongTr)-ITSsddPinSuppHole");
1738
b7943f00 1739
1740 TGeoMedium *rytonSDD = GetMedium("ITSsddCarbonM55J"); //medium = ryton ? To code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1741 TGeoVolume *pinSupport = new TGeoVolume("ITSsddPinSupport",pinSupportShape,
db486a6e 1742 rytonSDD);
c789ee28 1743 pinSupport->SetLineColor(fColorRyton);
db486a6e 1744 return pinSupport;
c789ee28 1745 // include the pin itself !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
db486a6e 1746};
c789ee28 1747
b7943f00 1748
db486a6e 1749//________________________________________________________________________
c789ee28 1750TGeoVolume* AliITSv11GeometrySDD::CreateCoolPipeSupportL() {
1751//
1752// Create half of the cooling pipe support (ALR-0752/3)
1753//
1754
b7943f00 1755 Double_t diffX = fgkCoolPipeSuppHeight*TanD(fgkCoolPipeSuppAngle);
c789ee28 1756
b7943f00 1757 TGeoArb8 *side1 = new TGeoArb8(fgkCoolPipeSuppHeight/2.);
1758 side1->SetVertex( 0, 0, -fgkCoolPipeSuppWidthExt/2.);
1759 side1->SetVertex( 1, fgkCoolPipeSuppMaxLength/2.-diffX,
1760 -fgkCoolPipeSuppWidthExt/2.);
1761 side1->SetVertex( 2, fgkCoolPipeSuppMaxLength/2.-diffX,
1762 fgkCoolPipeSuppWidthExt/2.);
1763 side1->SetVertex( 3, 0, fgkCoolPipeSuppWidthExt/2.);
1764 side1->SetVertex( 4, 0, -fgkCoolPipeSuppWidthExt/2.);
1765 side1->SetVertex( 5, fgkCoolPipeSuppMaxLength/2.,
1766 -fgkCoolPipeSuppWidthExt/2.);
1767 side1->SetVertex( 6, fgkCoolPipeSuppMaxLength/2.,
1768 fgkCoolPipeSuppWidthExt/2.);
1769 side1->SetVertex( 7, 0, fgkCoolPipeSuppWidthExt/2.);
c789ee28 1770 side1->SetName("ITSsddCPSside1");
1771
1772 TGeoTranslation *side1Tr = new TGeoTranslation("ITSsddCPStr1",0,
b7943f00 1773 - fgkCoolPipeSuppAxeDist
1774 + fgkCoolPipeSuppWidthExt/2., 0);
c789ee28 1775 side1Tr->RegisterYourself();
1776 TGeoTranslation *side2Tr = new TGeoTranslation("ITSsddCPStr2",0,
b7943f00 1777 - fgkCoolPipeSuppAxeDist
1778 + fgkCoolPipeSuppWidthExt*3/2.
1779 + fgkCoolPipeSuppWidthIn,0);
c789ee28 1780 side2Tr->RegisterYourself();
1781
1782 TGeoBBox *middle = new TGeoBBox("ITSsddCPSmiddle",
b7943f00 1783 (fgkCoolPipeSuppMaxLength/2.-fgkCoolPipeSuppSlitL)/2.,
1784 fgkCoolPipeSuppWidthIn/2., fgkCoolPipeSuppHeight/2.);
c789ee28 1785 TGeoTranslation *middleTr =
1786 new TGeoTranslation("ITSsddCPStr3",
b7943f00 1787 (fgkCoolPipeSuppMaxLength/2.-fgkCoolPipeSuppSlitL)/2.,
1788 -fgkCoolPipeSuppAxeDist+fgkCoolPipeSuppWidthExt
1789 +fgkCoolPipeSuppWidthIn/2., 0);
c789ee28 1790 middleTr->RegisterYourself();
1791
1792 TGeoBBox *axeBox = new TGeoBBox("ITSsddCPSaxeBox",
b7943f00 1793 fgkCoolPipeSuppTongW/4.,
1794 (fgkCoolPipeSuppFulWidth
1795 - 2*fgkCoolPipeSuppWidthExt
1796 - fgkCoolPipeSuppWidthIn)/2,
1797 fgkCoolPipeSuppHeight/2.);
c789ee28 1798
1799 TGeoTranslation *axeBoxTr = new TGeoTranslation("ITSsddCPSAxBoxTr",
b7943f00 1800 fgkCoolPipeSuppTongW/4.,
1801 - fgkCoolPipeSuppAxeDist
1802 + fgkCoolPipeSuppFulWidth
c789ee28 1803 - axeBox->GetDY(), 0);
1804 axeBoxTr->RegisterYourself();
1805
b7943f00 1806 TGeoTube *axe = new TGeoTube("ITSsddCPSaxe",0,fgkCoolPipeSuppHoleDiam/2.,
1807 fgkCoolPipeSuppTongW/4.);
1808 TGeoRotation axeRot("ITSsddCPSaxeRot",90,90,0);
c789ee28 1809
1810 TGeoCombiTrans *axeTrans = new TGeoCombiTrans("ITSsddCPSaxeTr",
b7943f00 1811 fgkCoolPipeSuppTongW/4.,0,0,&axeRot);
c789ee28 1812 axeTrans->RegisterYourself();
1813
1814 if(GetDebug(3)){
1815 middle->InspectShape();
1816 axe->InspectShape();
1817 };
1818
b7943f00 1819 TGeoMedium *rytonSDD = GetMedium("ITSsddCarbonM55J"); //medium = ryton ? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
c789ee28 1820
1821 TGeoCompositeShape *coolPipeSuppShape = new TGeoCompositeShape(
1822 "ITSsddCoolPipeSuppShapeL",
1823 "ITSsddCPSmiddle:ITSsddCPStr3"
1824 "+ITSsddCPSside1:ITSsddCPStr1"
1825 "+ITSsddCPSside1:ITSsddCPStr2"
1826 "+ITSsddCPSaxeBox:ITSsddCPSAxBoxTr"
1827 "-ITSsddCPSaxe:ITSsddCPSaxeTr");
1828 TGeoVolume *coolPipeSupp = new TGeoVolume("ITSsddCoolPipeSupportL",
1829 coolPipeSuppShape, rytonSDD);
1830
1831 coolPipeSupp->SetLineColor(fColorRyton);
1832 return coolPipeSupp;
1833};
1834
1835//________________________________________________________________________
1836TGeoVolume* AliITSv11GeometrySDD::CreateCoolPipeSupportR() {
1837//
1838//Create half of the cooling pipe support (ALR-0752/3)
1839//
1840
b7943f00 1841 Double_t diffX = fgkCoolPipeSuppHeight*TanD(fgkCoolPipeSuppAngle);
c789ee28 1842
b7943f00 1843 TGeoArb8 *side1 = new TGeoArb8(fgkCoolPipeSuppHeight/2.);
1844 side1->SetVertex( 0, 0, -fgkCoolPipeSuppWidthExt/2.);
1845 side1->SetVertex( 1, -(fgkCoolPipeSuppMaxLength/2.-diffX),
1846 -fgkCoolPipeSuppWidthExt/2.);
1847 side1->SetVertex( 2, -(fgkCoolPipeSuppMaxLength/2.-diffX),
1848 fgkCoolPipeSuppWidthExt/2.);
1849 side1->SetVertex( 3, 0, fgkCoolPipeSuppWidthExt/2.);
1850 side1->SetVertex( 4, 0, -fgkCoolPipeSuppWidthExt/2.);
1851 side1->SetVertex( 5, -fgkCoolPipeSuppMaxLength/2.,
1852 -fgkCoolPipeSuppWidthExt/2.);
1853 side1->SetVertex( 6, -fgkCoolPipeSuppMaxLength/2.,
1854 fgkCoolPipeSuppWidthExt/2.);
1855 side1->SetVertex( 7, 0, fgkCoolPipeSuppWidthExt/2.);
c789ee28 1856 side1->SetName("ITSsddCPSside1R");
1857
1858 TGeoTranslation *side1Tr = new TGeoTranslation("ITSsddCPStr1R",0,
b7943f00 1859 - fgkCoolPipeSuppAxeDist
1860 + fgkCoolPipeSuppWidthExt/2., 0);
c789ee28 1861 side1Tr->RegisterYourself();
1862 TGeoTranslation *side2Tr = new TGeoTranslation("ITSsddCPStr2R",0,
b7943f00 1863 - fgkCoolPipeSuppAxeDist
1864 + fgkCoolPipeSuppWidthExt*3/2.
1865 + fgkCoolPipeSuppWidthIn, 0);
c789ee28 1866 side2Tr->RegisterYourself();
1867
1868 TGeoBBox *middle = new TGeoBBox("ITSsddCPSmiddleR",
b7943f00 1869 (fgkCoolPipeSuppMaxLength/2.
1870 - fgkCoolPipeSuppSlitL)/2.,
1871 fgkCoolPipeSuppWidthIn/2.,
1872 fgkCoolPipeSuppHeight/2.);
c789ee28 1873 TGeoTranslation *middleTr =
1874 new TGeoTranslation("ITSsddCPStr3R",
b7943f00 1875 -( fgkCoolPipeSuppMaxLength/2.
1876 -fgkCoolPipeSuppSlitL)/2.,
1877 -fgkCoolPipeSuppAxeDist + fgkCoolPipeSuppWidthExt
1878 + fgkCoolPipeSuppWidthIn/2.,0);
c789ee28 1879 middleTr->RegisterYourself();
1880
1881 TGeoBBox *axeBox = new TGeoBBox("ITSsddCPSaxeBoxR",
b7943f00 1882 fgkCoolPipeSuppTongW/4.,
1883 (fgkCoolPipeSuppFulWidth
1884 - 2*fgkCoolPipeSuppWidthExt
1885 - fgkCoolPipeSuppWidthIn)/2,
1886 fgkCoolPipeSuppHeight/2.);
c789ee28 1887
1888 TGeoTranslation *axeBoxTr = new TGeoTranslation("ITSsddCPSAxBoxTrR",
b7943f00 1889 - fgkCoolPipeSuppTongW/4.,
1890 - fgkCoolPipeSuppAxeDist
1891 + fgkCoolPipeSuppFulWidth
c789ee28 1892 - axeBox->GetDY(),0);
1893 axeBoxTr->RegisterYourself();
1894
b7943f00 1895 TGeoTube *axe = new TGeoTube("ITSsddCPSaxeR",0,fgkCoolPipeSuppHoleDiam/2.,
1896 fgkCoolPipeSuppTongW/4.);
1897 TGeoRotation axeRot("ITSsddCPSaxeRotR",90,90,0);
c789ee28 1898 TGeoCombiTrans *axeTrans = new TGeoCombiTrans("ITSsddCPSaxeTrR",
b7943f00 1899 -fgkCoolPipeSuppTongW/4.,0,0,&axeRot);
c789ee28 1900 axeTrans->RegisterYourself();
1901
1902 if(GetDebug(3)){
1903 middle->InspectShape();
1904 axe->InspectShape();
1905 };
1906
1907 TGeoCompositeShape *coolPipeSuppShape = new TGeoCompositeShape(
1908 "ITSsddCoolPipeSuppShapeR",
1909 "ITSsddCPSmiddleR:ITSsddCPStr3R"
1910 "+ITSsddCPSside1R:ITSsddCPStr1R"
1911 "+ITSsddCPSside1R:ITSsddCPStr2R"
1912 "+ITSsddCPSaxeBoxR:ITSsddCPSAxBoxTrR"
1913 "-ITSsddCPSaxeR:ITSsddCPSaxeTrR");
b7943f00 1914
1915 TGeoMedium *rytonSDD = GetMedium("ITSsddCarbonM55J"); //medium = ryton ? To code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
c789ee28 1916 TGeoVolume *coolPipeSupp = new TGeoVolume( "ITSsddCoolPipeSupportR",
1917 coolPipeSuppShape, rytonSDD);
1918 coolPipeSupp->SetLineColor(fColorRyton);
1919
1920 return coolPipeSupp;
1921};
1922
1923//________________________________________________________________________
1924TGeoVolume* AliITSv11GeometrySDD::CreateBaseThermalBridge() {
1925// ALR 0752/8
1926
b7943f00 1927 Double_t dy = fgkBTBaxisAtoBase - fgkRadiusBminBTB - fgkBTBthick;
c789ee28 1928
b7943f00 1929 Double_t base1width = fgkBTBwidth - fgkBTBaxisAtoBottom - fgkRadiusBminBTB
1930 - (fgkRadiusAminBTB+fgkBTBthick);
c789ee28 1931 TGeoBBox *base1 = new TGeoBBox( "ITSsddBTBbase1", base1width/2.,
b7943f00 1932 fgkBTBthick/2., fgkBTBlength/2.);
c789ee28 1933 TGeoTranslation *base1Tr = new TGeoTranslation("ITSsddBTBtr1",
b7943f00 1934 fgkBTBaxisAtoBottom-fgkBTBwidth+base1width/2.,
1935 -(fgkBTBaxisAtoBase-fgkBTBthick/2.), 0);
c789ee28 1936 base1Tr->RegisterYourself();
1937
b7943f00 1938 Double_t base2width = fgkBTBaxisAtoBottom - fgkRadiusAminBTB - fgkBTBthick
1939 - fgkRadiusBminBTB;
c789ee28 1940 TGeoBBox *base2 = new TGeoBBox( "ITSsddBTBbase2", base2width/2.,
b7943f00 1941 fgkBTBthick/2., fgkBTBlength/2.);
c789ee28 1942 TGeoTranslation *base2Tr = new TGeoTranslation("ITSsddBTBtr2",
b7943f00 1943 fgkBTBaxisAtoBottom - base2width/2.,
1944 -(fgkBTBaxisAtoBase-fgkBTBthick/2.), 0);
c789ee28 1945 base2Tr->RegisterYourself();
1946
1947 TGeoBBox *side = new TGeoBBox( "ITSsddBTBside",
b7943f00 1948 fgkBTBthick/2., dy/2., fgkBTBlength/2.);
c789ee28 1949 TGeoTranslation *sideTr1 = new TGeoTranslation("ITSsddBTBsideTr1",
b7943f00 1950 -fgkRadiusAminBTB-fgkBTBthick/2., -dy/2., 0);
c789ee28 1951 TGeoTranslation *sideTr2 = new TGeoTranslation("ITSsddBTBsideTr2",
b7943f00 1952 fgkRadiusAminBTB+fgkBTBthick/2., -dy/2., 0);
c789ee28 1953 sideTr1->RegisterYourself();
1954 sideTr2->RegisterYourself();
1955
b7943f00 1956 TGeoBBox *hole = new TGeoBBox( "ITSsddBTBhole", fgkBTBHolewidth/2.,
1957 fgkBTBthick/2., fgkBTBHoleLength/2.);
c789ee28 1958 TGeoTranslation *holeTr1 = new TGeoTranslation("ITSsddBTBholeTr1",
b7943f00 1959 - fgkBTBHoleRefX + fgkBTBHolewidth/2.,
1960 - (fgkBTBaxisAtoBase-fgkBTBthick/2.),
1961 fgkBTBHoleRefY+(fgkBTBHoleLength-fgkBTBlength)/2.);
c789ee28 1962 TGeoTranslation *holeTr2 = new TGeoTranslation("ITSsddBTBholeTr2",
b7943f00 1963 - fgkBTBHoleRefX + fgkBTBHolewidth/2.,
1964 - (fgkBTBaxisAtoBase-fgkBTBthick/2.),
1965 - fgkBTBHoleRefY-(fgkBTBHoleLength-fgkBTBlength)/2.);
c789ee28 1966 holeTr1->RegisterYourself();
1967 holeTr2->RegisterYourself();
1968
b7943f00 1969 Double_t radiusAmaxBTB = fgkRadiusAminBTB + fgkBTBthick;
c789ee28 1970 TGeoTubeSeg *mainAxis = new TGeoTubeSeg( "ITSsddBTBmainAxis",
b7943f00 1971 fgkRadiusAminBTB, radiusAmaxBTB,
1972 fgkBTBlength/2., 0., 180.);
c789ee28 1973 TGeoTubeSeg *round1 = new TGeoTubeSeg( "ITSsddBTBround1",
b7943f00 1974 fgkRadiusBminBTB, fgkRadiusBminBTB+fgkBTBthick,
1975 fgkBTBlength/2., 270., 360.);
c789ee28 1976 TGeoTranslation *roundTr1 = new TGeoTranslation("ITSsddBTBround1Tr",
b7943f00 1977 -(fgkRadiusAminBTB+fgkBTBthick+fgkRadiusBminBTB),
c789ee28 1978 -dy, 0);
1979 roundTr1->RegisterYourself();
1980
1981 TGeoTubeSeg *round2 = new TGeoTubeSeg( "ITSsddBTBround2",
b7943f00 1982 fgkRadiusBminBTB, fgkRadiusBminBTB+fgkBTBthick,
1983 fgkBTBlength/2., 180., 270.);
c789ee28 1984 TGeoTranslation *roundTr2 = new TGeoTranslation("ITSsddBTBround2Tr",
b7943f00 1985 (fgkRadiusAminBTB+fgkBTBthick+fgkRadiusBminBTB),
c789ee28 1986 -dy, 0);
1987 roundTr2->RegisterYourself();
1988
1989 TGeoCompositeShape *sBaseThermalBridge = new TGeoCompositeShape(
1990 "ITSsddBaseThermalBridgeShape",
1991 "ITSsddBTBbase1:ITSsddBTBtr1"
1992 "+ ITSsddBTBbase2:ITSsddBTBtr2"
1993 "+ ITSsddBTBround1:ITSsddBTBround1Tr"
1994 "+ ITSsddBTBround2:ITSsddBTBround2Tr"
1995 "+ ITSsddBTBside:ITSsddBTBsideTr1"
1996 "+ ITSsddBTBside:ITSsddBTBsideTr2"
1997 "- ITSsddBTBhole:ITSsddBTBholeTr1"
1998 "- ITSsddBTBhole:ITSsddBTBholeTr2"
1999 "+ ITSsddBTBmainAxis");
2000
2001 if(GetDebug(3)){// Remove compiler warning.
2002 base1->InspectShape();
2003 base2->InspectShape();
2004 side->InspectShape();
2005 hole->InspectShape();
2006 mainAxis->InspectShape();
2007 round1->InspectShape();
2008 round2->InspectShape();
2009 };
2010
b7943f00 2011 TGeoMedium *carbonFiberLadderStruct = GetMedium("ITSsddCarbonM55J");
c789ee28 2012 TGeoVolume *vBaseThermalBridge = new TGeoVolume( "ITSsddBaseThermalBridge",
2013 sBaseThermalBridge,
2014 carbonFiberLadderStruct);
2015
2016 vBaseThermalBridge->SetLineColor(fColorCarbonFiber);
2017 return vBaseThermalBridge;
2018};
2019
2020
c789ee28 2021//________________________________________________________________________
b7943f00 2022TGeoVolume* AliITSv11GeometrySDD::CreateEndLadder(Int_t iLay) {
2023 //
2024 // Return a box volume containing a end of a CF ladder.
2025 //
2026
2027 TGeoMedium *airSDD = GetMedium("ITSair");
2028 TGeoMedium *carbonFiberLadderStruct = GetMedium("ITSsddCarbonM55J");
2029
2030 Double_t length = (fgkLay3LadderLength-fgkLay3Ndet*fgkSegmentLength)/2.;
2031 Double_t coolPipeSuppH = fgkLay3CoolPipeSuppH;
2032 Double_t underSegDH = fLay3LadderUnderSegDH;
2033 if (iLay==3) {
2034 } else if (iLay==4) {
2035 length = (fgkLay4LadderLength-fgkLay4Ndet*fgkSegmentLength)/2.;
2036 coolPipeSuppH = fgkLay4CoolPipeSuppH;
2037 underSegDH = fLay4LadderUnderSegDH;
2038 } else {
2039 printf("error in AliITSv11GeometrySDD::CreateEndLadder: Wrong layer");
2040 return 0;
2041 };
c789ee28 2042
b7943f00 2043 Double_t tDY = (- fgkLadderSegBoxDH/2 //space left on top of the ladder
2044 + underSegDH/2); //space under ladder segment
2045 // here tDY is not the same as for the segment because the end ladder
2046 // does not have a space under it, inside the general ladder volume.
2047 Double_t segmentLength = fgkSegmentLength;
2048 Double_t topCornerLength = fgkSegmentLength/2.-fgkLay4LaddTopCornerEnd;
2049
2050 TGeoBBox *endBox = new TGeoBBox("ITSsddEndLaddBox",
2051 (fgkLadderWidth)/2,
2052 fgkLadderHeight/2+fgkLadderSegBoxDH/2+underSegDH/2,
2053 length/2);
2054 TGeoVolume *virtualEnd = new TGeoVolume("ITSsddEnd",endBox, airSDD);
2055
2056 //**********************************
2057 // coding real matter :
2058 //**********************************
2059 Double_t triangleHeight = fgkLadderHeight - fgkLadderBeamRadius;
2060 Double_t halfTheta = TMath::ATan( 0.5*fgkLadderWidth/triangleHeight );
2061 Double_t beta = (TMath::Pi()-2.*halfTheta)/4.;
2062 Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.;
2063
2064 //--- The 3 V shape corners of the Carbon Fiber Ladder
2065 //--- the top V
2066 TGeoArb8 *cfLaddTop1 = CreateLadderSide(topCornerLength/2., halfTheta, -1,
2067 fgkLadderLa, fgkLadderHa, fgkLadderl);
2068 TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1",
2069 cfLaddTop1,carbonFiberLadderStruct);
2070 cfLaddTopVol1->SetLineColor(fColorCarbonFiber);
2071 TGeoArb8 *cfLaddTop2 = CreateLadderSide( topCornerLength/2., halfTheta, 1,
2072 fgkLadderLa, fgkLadderHa, fgkLadderl);
2073 TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerV2",
2074 cfLaddTop2,carbonFiberLadderStruct);
2075 cfLaddTopVol2->SetLineColor(fColorCarbonFiber);
2076 TGeoTranslation *trTop1 = new TGeoTranslation(0, fgkLadderHeight/2+tDY,
2077 -(length-topCornerLength)/2.);
2078 virtualEnd->AddNode(cfLaddTopVol1, 1, trTop1);
2079 virtualEnd->AddNode(cfLaddTopVol2, 1, trTop1);
2080
2081 //--- the 2 side V
2082 TGeoArb8 *cfLaddSide1 = CreateLadderSide( length/2., beta, -1,
2083 fgkLadderLb, fgkLadderHb, fgkLadderl);
2084 TGeoVolume *cfLaddSideVol1 = new TGeoVolume("ITSsddCFladdSideCornerV1",
2085 cfLaddSide1,carbonFiberLadderStruct);
2086 cfLaddSideVol1->SetLineColor(fColorCarbonFiber);
2087 TGeoArb8 *cfLaddSide2 = CreateLadderSide( length/2., beta, 1,
2088 fgkLadderLb, fgkLadderHb, fgkLadderl);
2089 TGeoVolume *cfLaddSideVol2 = new TGeoVolume("ITSsddCFladdSideCornerV2",
2090 cfLaddSide2,carbonFiberLadderStruct);
2091 cfLaddSideVol2->SetLineColor(fColorCarbonFiber);
2092 Double_t dYTranslation = ( fgkLadderHeight/2. - 0.5*fgkLadderWidth*
2093 TMath::Tan(beta) - fgkLadderBeamRadius );
2094
2095 // because center of the triangle doesn't correspond to virtual vol. center
2096 Double_t distCenterSideDown = 0.5*fgkLadderWidth/TMath::Cos(beta);
2097 TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0,
2098 alpha*TMath::RadToDeg());
2099 AddTranslationToCombiTrans(ctSideR, 0, -dYTranslation+tDY, 0);
2100 TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown, 0,
2101 -alpha*TMath::RadToDeg());
2102 AddTranslationToCombiTrans(ctSideL, 0, -dYTranslation+tDY, 0);
2103 virtualEnd->AddNode(cfLaddSideVol1, 1, ctSideR);
2104 virtualEnd->AddNode(cfLaddSideVol2, 1, ctSideR);
2105 virtualEnd->AddNode(cfLaddSideVol1, 2, ctSideL);
2106 virtualEnd->AddNode(cfLaddSideVol2, 2, ctSideL);
2107
2108 //--- The beams
2109 // Beams on the sides
2110 Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*
2111 TMath::Sin(2*beta)/(TanD(fgkBeamSidePhi)*TanD(fgkBeamSidePhi))) ));
2112
2113 //Euler rotation : about Z, then new X, then new Z
2114 TGeoRotation beamRot1("", 90-2.*beta*TMath::RadToDeg(),
2115 -beamPhiPrime*TMath::RadToDeg(), -90);
2116 TGeoRotation beamRot2("", 90-2.*beta*TMath::RadToDeg(),
2117 beamPhiPrime*TMath::RadToDeg(), -90);
2118 TGeoRotation beamRot3("", 90+2.*beta*TMath::RadToDeg(),
2119 beamPhiPrime*TMath::RadToDeg(), -90);
2120 TGeoRotation beamRot4("", 90+2.*beta*TMath::RadToDeg(),
2121 -beamPhiPrime*TMath::RadToDeg(), -90);
2122 TGeoCombiTrans *beamTransf1 = new TGeoCombiTrans(0.5*triangleHeight*
2123 TMath::Tan(halfTheta),
2124 fgkLadderBeamRadius/2. + tDY,
2125 -length/2 + segmentLength/8, &beamRot1);
2126 TGeoCombiTrans *beamTransf3 = new TGeoCombiTrans( 0.5*triangleHeight*
2127 TMath::Tan(halfTheta),
2128 fgkLadderBeamRadius/2.+tDY,
2129 -length/2 + 3*segmentLength/8, &beamRot2);
2130 TGeoCombiTrans *beamTransf5 = new TGeoCombiTrans(-0.5*triangleHeight*
2131 TMath::Tan(halfTheta),
2132 fgkLadderBeamRadius/2.+tDY,
2133 -length/2 + segmentLength/8, &beamRot3);
2134 TGeoCombiTrans *beamTransf7 = new TGeoCombiTrans(-0.5*triangleHeight*
2135 TMath::Tan(halfTheta),
2136 fgkLadderBeamRadius/2. + tDY,
2137 -length/2+3*segmentLength/8, &beamRot4);
2138
2139 virtualEnd->AddNode(fLaddSegCommonVol[6], 1, beamTransf1);
2140 virtualEnd->AddNode(fLaddSegCommonVol[6], 2, beamTransf3);
2141 virtualEnd->AddNode(fLaddSegCommonVol[6], 3, beamTransf5);
2142 virtualEnd->AddNode(fLaddSegCommonVol[6], 4, beamTransf7);
2143
2144 //--- Beams of the bottom
2145 TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
2146 fgkLadderWidth/2.-fgkLadderLb/3, 0, 180);
2147 TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol",
2148 bottomBeam1, carbonFiberLadderStruct);
2149 bottomBeam1Vol->SetLineColor(fColorCarbonFiber);
2150
2151 TGeoRotation bottomBeamRot1("",90, 90, 90);
2152 TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans(0,
2153 -(fgkLadderHeight/2-fgkLadderBeamRadius)+tDY,
2154 -length/2+fgkSegmentLength/2, &bottomBeamRot1);
2155 virtualEnd->AddNode(bottomBeam1Vol, 1, bottomBeamTransf1);
2156 TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, fgkLadderBeamRadius,
2157 fgkLadderWidth/2.-fgkLadderLb/3, 0, 90);
2158 TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol",
2159 bottomBeam2, carbonFiberLadderStruct);
2160 bottomBeam2Vol->SetLineColor(fColorCarbonFiber);
2161 TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0,
2162 -(fgkLadderHeight/2-fgkLadderBeamRadius)+tDY,-length/2,&bottomBeamRot1);
2163 virtualEnd->AddNode(bottomBeam2Vol, 1, bottomBeamTransf2);
2164
2165 //**********************************
2166 //the cooling pipe supports
2167 Double_t triangleCPaxeDist = fgkCoolPipeSuppAxeDist-fgkCoolPipeSuppWidthExt-
fa4639a3 2168 fgkCoolPipeSuppWidthIn+fgkLadderBeamRadius;
b7943f00 2169
2170 Double_t coolPipeSuppL = TMath::Tan(halfTheta)*
fa4639a3 2171 (triangleHeight+triangleCPaxeDist/
2172 TMath::Sin(halfTheta)-coolPipeSuppH);
b7943f00 2173
2174 if (fAddCoolingSyst) {
2175 TGeoRotation rotCPS2("",-halfTheta*TMath::RadToDeg(),-90, 90);
2176 TGeoRotation rotCPS1("", halfTheta*TMath::RadToDeg(),-90,-90);
2177 TGeoCombiTrans *transCPS1 = new TGeoCombiTrans(coolPipeSuppL,
fa4639a3 2178 -fgkLadderHeight/2.+ tDY +
b7943f00 2179 coolPipeSuppH+fgkLadderBeamRadius,
2180 -length/2., &rotCPS1);
2181 TGeoCombiTrans *transCPS4 = new TGeoCombiTrans(-coolPipeSuppL,
fa4639a3 2182 -fgkLadderHeight/2.+ tDY +
b7943f00 2183 coolPipeSuppH+fgkLadderBeamRadius,
2184 -length/2., &rotCPS2);
2185
2186 virtualEnd->AddNode(fCoolPipeSupportL, 1, transCPS1);
2187 virtualEnd->AddNode(fCoolPipeSupportR, 1, transCPS4);
2188 };
2189
2190 //**********************************
2191 if(GetDebug(1)) virtualEnd->CheckOverlaps(0.01);
fa4639a3 2192 virtualEnd->SetVisibility(kFALSE);
b7943f00 2193 return virtualEnd;
db486a6e 2194};
c789ee28 2195
2196
db486a6e 2197//________________________________________________________________________
2198TGeoVolume* AliITSv11GeometrySDD::CreateSDDsensor() {
b7943f00 2199 //
2200 // return a box containing the SDD sensor
2201 //
2202
2203 TGeoMedium *airSDD = GetMedium("ITSair");
2204 TGeoMedium *siliconSDD = GetMedium("ITSsddSi");
2205 TGeoMedium *alSDD = GetMedium("ITSal");
2206 TGeoMedium *polyhamideSDD = GetMedium("ITSsddKAPTON_POLYCH2");
2207 TGeoMedium *glassSDD = GetMedium("ITSsddSi"); // To code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2208
2209
2210 Double_t rWraping = fgkWaferThickness/2+fgkWaHVcableAlThick+fgkWaHVcablePolyThick;
2211 Double_t witdhCableBox = (fgkWaHVcableWitdh - TMath::Pi()*rWraping)/2;
2212
2213 Double_t sensoxBoxLength = ( fgkWaferLength +
2214 2*(rWraping+witdhCableBox-fgkWaHVcableDW) );
2215 // Makes life easier to include the space for the WA HV cable on both sides
2216 Double_t sensoxBoxThick = fgkWaferThickness +
2217 2*(fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
2218
2219 TGeoBBox *box = new TGeoBBox("ITSsddSensorBox",
2220 fgkWaferWidth/2, sensoxBoxThick/2, sensoxBoxLength/2);
2221 TGeoVolume *virtualSensor = new TGeoVolume("ITSsddSensor",box,airSDD);
2222
2223 //****************************
2224 // silicon wafer
2225 //****************************
2226 if (fAddSensors) {
c789ee28 2227 TGeoBBox *waferShape = new TGeoBBox("ITSsddWaferShape",
b7943f00 2228 fgkWaferWidth/2, fgkWaferThickness/2, fgkWaferLength/2);
2229 TGeoVolume *wafer = new TGeoVolume("ITSsddWafer", waferShape, siliconSDD);
2230 wafer->SetLineColor(fColorSilicon);
2231 TGeoBBox *sensBox = new TGeoBBox("ITSsddSensorSensBox",
2232 fgkWaferWidthSens/2,fgkWaferThickSens/2,fgkWaferLengthSens/2);
2233 TGeoVolume *sensVol=new TGeoVolume(fgSDDsensitiveVolName,sensBox,siliconSDD);
2234 sensVol->SetLineColor(fColorSilicon);
2235
2236 wafer->AddNode(sensVol, 1, 0);
2237 virtualSensor->AddNode(wafer, 1, 0);
2238 };
2239
2240 //****************************
2241 // glass
2242 //****************************
2243 TGeoBBox *glass = new TGeoBBox("ITSsddGlassBox", fgkSensorGlassLX/2,
2244 fgkSensorGlassLY/2, fgkSensorGlassLZ/2);
2245 TGeoVolume *vGlass = new TGeoVolume("ITSsddGlass",glass, glassSDD);
2246 vGlass->SetLineColor(fColorGlass);
2247 TGeoTranslation *glassTr1 = new TGeoTranslation("",fgkGlassDXOnSensor,
2248 fgkWaferThickness/2+fgkSensorGlassLY/2,
2249 fgkGlassDZOnSensor);
2250 TGeoTranslation *glassTr2 = new TGeoTranslation("",-fgkGlassDXOnSensor,
2251 fgkWaferThickness/2+fgkSensorGlassLY/2,
2252 fgkGlassDZOnSensor);
2253 TGeoTranslation *glassTr3 = new TGeoTranslation("",fgkGlassDXOnSensor,
2254 fgkWaferThickness/2+fgkSensorGlassLY/2,
2255 -fgkGlassDZOnSensor);
2256 TGeoTranslation *glassTr4 = new TGeoTranslation("",-fgkGlassDXOnSensor,
2257 fgkWaferThickness/2+fgkSensorGlassLY/2,
2258 -fgkGlassDZOnSensor);
2259 virtualSensor->AddNode(vGlass, 1, glassTr1);
2260 virtualSensor->AddNode(vGlass, 2, glassTr2);
2261 virtualSensor->AddNode(vGlass, 3, glassTr3);
2262 virtualSensor->AddNode(vGlass, 4, glassTr4);
2263
2264 //****************************
2265 // Wrap-around cable
2266 //****************************
2267 if (fAddHVcables) {
2268 AliITSv11GeomCableFlat waHVCable("ITSsddWaHVCableU",witdhCableBox,
2269 fgkWaHVcableAlThick+fgkWaHVcablePolyThick);
2270 waHVCable.SetNLayers(2);
2271 waHVCable.SetLayer(0, fgkWaHVcablePolyThick,polyhamideSDD,fColorPolyhamide);
2272 waHVCable.SetLayer(1, fgkWaHVcableAlThick, alSDD, fColorAl);
2273 waHVCable.SetInitialNode(virtualSensor);
2274
2275 Double_t x1[3], x2[3], vX[3] = {1,0,0};
2276 x1[0] = -fgkWaHVcableLength/2;
2277 x2[0] = -x1[0];
2278 x1[1] = (fgkWaferThickness + waHVCable.GetThickness())/2;
2279 x2[1] = x1[1];
2280 x1[2] = fgkWaferLength/2+waHVCable.GetWidth()/2-fgkWaHVcableDW;
2281 x2[2] = x1[2];
2282
2283 waHVCable.AddCheckPoint(virtualSensor, 0, x1, vX);
2284 waHVCable.AddCheckPoint(virtualSensor, 1, x2, vX);
2285 waHVCable.CreateAndInsertCableSegment(1,-90);
2286 x1[1] = -x1[1];
2287 x2[1] = x1[1];
2288 waHVCable.SetName("ITSsddWaHVCableD");
2289 waHVCable.ResetPoints();
2290 waHVCable.AddCheckPoint(virtualSensor, 0, x1, vX);
2291 waHVCable.AddCheckPoint(virtualSensor, 1, x2, vX);
2292 waHVCable.CreateAndInsertCableSegment(1, 90);
2293
2294 AliITSv11GeomCableRound waHVCableFold("ITSsddWaHVCableFold",
2295 rWraping);
2296 waHVCableFold.SetPhi(180,360);
2297 waHVCableFold.SetNLayers(2);
2298 waHVCableFold.SetLayer(0, fgkWaferThickness/2+fgkWaHVcablePolyThick,
2299 polyhamideSDD, fColorPolyhamide);
2300 waHVCableFold.SetLayer(1, fgkWaHVcableAlThick, alSDD, fColorAl);
2301 waHVCableFold.SetInitialNode(virtualSensor);
2302 x1[1] = 0;
2303 x2[1] = 0;
2304 x1[2] = fgkWaferLength/2-fgkWaHVcableDW+witdhCableBox;
2305 x2[2] = x1[2];
2306 waHVCableFold.AddCheckPoint(virtualSensor, 0, x1, vX);
2307 waHVCableFold.AddCheckPoint(virtualSensor, 1, x2, vX);
2308 waHVCableFold.CreateAndInsertCableSegment(1);
2309
2310 //****************************
2311 // transition cable
2312 //****************************
2313 Double_t headRadius = (fgkTransitHVHeadLX*fgkTransitHVHeadLX/4.+
2314 fgkTransitHVHeadLZ*fgkTransitHVHeadLZ)
2315 /(2.*fgkTransitHVHeadLZ);
2316 Double_t theta = TMath::ATan2(fgkTransitHVHeadLX/2,
2317 headRadius-fgkTransitHVHeadLZ)
2318 *TMath::RadToDeg();
2319
2320 TGeoTubeSeg *headPoly = new TGeoTubeSeg(0,headRadius,
2321 fgkTransitHVPolyThick/2,
2322 90-theta,90+theta);
2323 headPoly->SetName("headPoly");
2324 TGeoTranslation *headPolyTr = new TGeoTranslation(0,0,
2325 -fgkTransitHVPolyThick/2);
2326 headPolyTr->SetName("headPolyTr");
2327 headPolyTr->RegisterYourself();
2328
2329 TGeoTubeSeg *headAl = new TGeoTubeSeg(0,headRadius,
2330 fgkTransitHVAlThick/2,
2331 90-theta,90+theta);
2332 headAl->SetName("headAl");
2333 TGeoTranslation *headAlTr = new TGeoTranslation(0,0,
2334 -fgkTransitHVPolyThick
2335 -fgkTransitHVAlThick/2);
2336 headAlTr->SetName("headAlTr");
2337 headAlTr->RegisterYourself();
2338
2339 TGeoBBox *cache = new TGeoBBox(fgkTransitHVHeadLX/2,
2340 (headRadius-fgkTransitHVHeadLZ)/2,
2341 (fgkTransitHVPolyThick+fgkTransitHVAlThick)/2);
2342 cache->SetName("cache");
2343
2344 TGeoTranslation *headCacheTr = new TGeoTranslation(0,
2345 (headRadius-fgkTransitHVHeadLZ)/2,
2346 -(fgkTransitHVPolyThick
2347 +fgkTransitHVAlThick)/2);
2348 headCacheTr->SetName("cacheTr");
2349 headCacheTr->RegisterYourself();
2350
2351 TGeoCompositeShape *headPolyComp = new TGeoCompositeShape(
2352 "headPoly:headPolyTr-cache:cacheTr");
2353 TGeoVolume *vHeadPolyComp = new TGeoVolume(
2354 "ITSsddHVtransitHeadPoly",headPolyComp, polyhamideSDD);
2355 vHeadPolyComp->SetLineColor(fColorPolyhamide);
2356 TGeoCompositeShape *headAlComp = new TGeoCompositeShape(
2357 "headAl:headAlTr-cache:cacheTr");
2358 TGeoVolume *vHeadAlComp = new TGeoVolume(
2359 "ITSsddHVtransitHeadAl",headAlComp, alSDD);
2360 vHeadAlComp->SetLineColor(fColorAl);
2361
2362
2363 TGeoRotation rotHead("",0,90,0);
2364 TGeoCombiTrans *rotHeadTr = new TGeoCombiTrans(0,fgkWaferThickness/2,
2365 -headRadius+fgkTransitHVHeadLZ+fgkTransitHVBondingLZ/2,
2366 &rotHead);
2367 virtualSensor->AddNode(vHeadPolyComp,1,rotHeadTr);
2368 virtualSensor->AddNode(vHeadAlComp,1,rotHeadTr);
2369
2370 //---
2371 AliITSv11GeomCableFlat transitHVCable("ITSsddHVtransitCenter",
2372 fgkTransitHVBondingLZ,
2373 fgkTransitHVPolyThick+fgkTransitHVAlThick);
2374 transitHVCable.SetNLayers(2);
2375 transitHVCable.SetLayer(0, fgkTransitHVPolyThick,polyhamideSDD,
2376 fColorPolyhamide);
2377 transitHVCable.SetLayer(1, fgkTransitHVAlThick, alSDD, fColorAl);
2378 transitHVCable.SetInitialNode(virtualSensor);
2379
2380 x1[0] = -fgkTransitHVHeadLX/2;
2381 x2[0] = -x1[0];
2382 x1[1] = (fgkWaferThickness+fgkTransitHVPolyThick+fgkTransitHVAlThick)/2;
2383 x2[1] = x1[1];
2384 x1[2] = 0;
2385 x2[2] = 0;
2386 transitHVCable.AddCheckPoint(virtualSensor, 0, x1, vX);
2387 transitHVCable.AddCheckPoint(virtualSensor, 1, x2, vX);
2388 transitHVCable.CreateAndInsertCableSegment(1,-90);
2389 transitHVCable.ResetPoints();
2390 transitHVCable.SetName("ITSsddHVtransitTail");
2391 transitHVCable.SetWidth(fgkTransitHVtailWidth);
2392 x1[0] = fgkTransitHVtailXpos;
2393 x2[0] = fgkTransitHVtailXpos;
2394 x1[2] = -fgkTransitHVBondingLZ/2;
2395 x2[2] = -fgkTransitHVBondingLZ/2-fgkTransitHVtailLength;
2396 Double_t vZ[3] = {0,0,1};
2397 transitHVCable.AddCheckPoint(virtualSensor, 0, x1, vZ);
2398 transitHVCable.AddCheckPoint(virtualSensor, 1, x2, vZ);
2399 transitHVCable.CreateAndInsertCableSegment(1,0);
2400
2401 //---
2402 TGeoArb8 *sideLeft = new TGeoArb8( fgkTransitHVPolyThick/2 );
2403 sideLeft->SetVertex(0, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
2404 sideLeft->SetVertex(1, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
2405 fgkTransitHVsideLZ);
2406 sideLeft->SetVertex(2, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
2407 sideLeft->SetVertex(3, fgkTransitHVHeadLX/2, 0);
2408 sideLeft->SetVertex(4, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
2409 sideLeft->SetVertex(5, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
2410 fgkTransitHVsideLZ);
2411 sideLeft->SetVertex(6, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
2412 sideLeft->SetVertex(7, fgkTransitHVHeadLX/2, 0);
2413
2414 TGeoArb8 *sideLeftAl = new TGeoArb8( fgkTransitHVAlThick/2 );
2415 sideLeftAl->SetVertex(0, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
2416 sideLeftAl->SetVertex(1, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
2417 fgkTransitHVsideLZ);
2418 sideLeftAl->SetVertex(2, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
2419 sideLeftAl->SetVertex(3, fgkTransitHVHeadLX/2, 0);
2420 sideLeftAl->SetVertex(4, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,0);
2421 sideLeftAl->SetVertex(5, fgkTransitHVtailXpos+fgkTransitHVtailWidth/2,
2422 fgkTransitHVsideLZ);
2423 sideLeftAl->SetVertex(6, fgkTransitHVHeadLX/2, fgkTransitHVsideLeftZ);
2424 sideLeftAl->SetVertex(7, fgkTransitHVHeadLX/2, 0);
2425
2426 TGeoArb8 *sideRight = new TGeoArb8( fgkTransitHVPolyThick/2 );
2427 sideRight->SetVertex(0, fgkTransitHVtailXpos-fgkTransitHVtailWidth/2,0);
2428 sideRight->SetVertex(1, fgkTransitHVtailXpos-fgkTransitHVtailWidth/2,
2429 fgkTransitHVsideLZ);
2430 sideRight->SetVertex(2, -fgkTransitHVHeadLX/2, fgkTransitHVsideRightZ);
2431 sideRight->SetVertex(3, -fgkTransitHVHeadLX/2, 0);
2432 sideRight->SetVertex(4, fgkTransitHVtailXpos-fgkTransitHVtailWidth/2,0);
2433 sideRight->SetVertex(5, fgkTransitHVtailXpos-fgkTransitHVtailWidth/2,
2434 fgkTransitHVsideLZ);
2435 sideRight->SetVertex(6, -fgkTransitHVHeadLX/2, fgkTransitHVsideRightZ);
2436 sideRight->SetVertex(7, -fgkTransitHVHeadLX/2, 0);
2437
2438 TGeoRotation rotSide("",0,-90,0);
2439 TGeoCombiTrans *sideRightTr = new TGeoCombiTrans(0,
2440 (fgkWaferThickness+fgkTransitHVPolyThick)/2,
2441 -fgkTransitHVBondingLZ/2,&rotSide);
2442 TGeoCombiTrans *sideLeftTr = new TGeoCombiTrans(0,
2443 (fgkWaferThickness+fgkTransitHVPolyThick)/2,
2444 -fgkTransitHVBondingLZ/2, &rotSide);
2445 TGeoCombiTrans *sideLeftAlTr = new TGeoCombiTrans(0,
2446 fgkTransitHVPolyThick+(fgkWaferThickness+fgkTransitHVAlThick)/2,
2447 -fgkTransitHVBondingLZ/2, &rotSide);
2448
2449 TGeoVolume *vSideLeft = new TGeoVolume("ITSsddHVtransitSideLeft",
2450 sideLeft,polyhamideSDD);
2451 vSideLeft->SetLineColor(fColorPolyhamide);
2452 TGeoVolume *vSideLeftAl = new TGeoVolume("ITSsddHVtransitSideLeftAl",
2453 sideLeftAl,alSDD);
2454 vSideLeftAl->SetLineColor(fColorAl);
2455 TGeoVolume *vSideRight = new TGeoVolume("ITSsddHVtransitSideRight",
2456 sideRight,polyhamideSDD);
2457 vSideRight->SetLineColor(fColorPolyhamide);
2458
2459 virtualSensor->AddNode(vSideLeft, 1, sideLeftTr);
2460 virtualSensor->AddNode(vSideLeftAl, 1, sideLeftAlTr);
2461 virtualSensor->AddNode(vSideRight, 1, sideRightTr);
2462 };
db486a6e 2463
b7943f00 2464 //****************************
2465 if(GetDebug(1)) virtualSensor->CheckOverlaps(0.01);
2466 virtualSensor->SetVisibility(kFALSE);
2467 return virtualSensor;
db486a6e 2468};
c789ee28 2469
2470
db486a6e 2471//________________________________________________________________________
b7943f00 2472TGeoVolume *AliITSv11GeometrySDD::CreateDetectors(Int_t iLay) {
2473 //
2474 // return a box volume containing the detectors
2475 //
2476
2477 TGeoMedium *airSDD = GetMedium("ITSair");
c789ee28 2478
b7943f00 2479 Int_t nDetectors = fgkLay3Ndet;
2480 Double_t ladderLength = fgkLay3LadderLength;
2481 Double_t *sensorZPos = fLay3sensorZPos;
2482
2483 if (iLay==3) {}
2484 else if (iLay==4) {
2485 nDetectors = fgkLay4Ndet;
2486 ladderLength = fgkLay4LadderLength;
2487 sensorZPos = fLay4sensorZPos;
2488 } else {
fa4639a3 2489 printf("AliITSv11GeometrySDD::CreateDetectors: Error : Wrong layer");
b7943f00 2490 };
2491
2492 char name[30];
2493 Double_t volThickness = ( fgkLadWaferSep + 2*fgkWaferThickness +
2494 2*(fgkWaHVcableAlThick+fgkWaHVcablePolyThick));
2495
2496 sprintf(name,"ITSsddDetBox%i",iLay);
2497 TGeoBBox *detBox = new TGeoBBox(name, fgkWaferWidth/2, volThickness/2,
2498 ladderLength*((nDetectors-0.5)/nDetectors)/2);
2499 TGeoVolume *virtualDet = new TGeoVolume("ITSsddLadd",detBox, airSDD);
2500
2501 for (Int_t i=0; i<nDetectors; i++) {
2502 Double_t localZ = sensorZPos[i];
2503 Double_t localY = fgkLadWaferSep/2+fgkWaferThickness/2;
2504 if (iLay==3) if (i%2!=0) localY = -localY;
2505 if (iLay==4) if (i%2==0) localY = -localY;
2506 sprintf(name, "ITSsddLay%iSensorPos%i",iLay, i);
fa4639a3 2507
2508 if (i >= nDetectors/2) {
2509 TGeoTranslation *sensorPos = new TGeoTranslation(0,localY,localZ);
2510 sensorPos->SetName(name);
2511 virtualDet->AddNode(fSDDsensor, i, sensorPos);
2512 }
2513 else {
2514 TGeoRotation rotSensor("",0, 180, 180);
2515 TGeoCombiTrans *sensorPos = new TGeoCombiTrans(0,localY,
2516 localZ,&rotSensor);
2517 sensorPos->SetName(name);
2518 virtualDet->AddNode(fSDDsensor, i, sensorPos);
2519 };
db486a6e 2520 }
b7943f00 2521
2522 if(GetDebug(1)) virtualDet->CheckOverlaps(0.01);
fa4639a3 2523 virtualDet->SetVisibility(kFALSE);
db486a6e 2524 return virtualDet;
2525};
c789ee28 2526
2527
b7943f00 2528
db486a6e 2529//________________________________________________________________________
b7943f00 2530Int_t AliITSv11GeometrySDD::ExportSensorGeometry(AliITSgeom *geom, Int_t iLaySDD,
2531 Int_t startMod) {
2532 //
2533 // export the geometry in a AliITSgeom object
2534 //
2535
2536 if (! geom) {
2537 printf("error:Try to fill null (AliITSgeom *) object");
2538 return kFALSE;
2539 };
2540 if (! fMotherVol) {
2541 printf("error:Try to set sensor geometry while geometry is not defined\n");
2542 return kFALSE;
2543 };
c789ee28 2544
fa4639a3 2545 const Float_t kDxyz[3] = {fgkWaferWidthSens/2., fgkWaferThickSens/2.,
2546 fgkWaferLengthSens/2.};
b7943f00 2547 if(!(geom->IsShapeDefined(kSDD)))
2548 geom->ReSetShape(kSDD, new AliITSgeomSDD256(3, kDxyz));
2549
2550 char layerName[30];
2551 char ladderName[30];
2552 char sensorName[30];
2553 char senstivName[30];
2554 const Int_t kNLay = 2;
fa4639a3 2555 const Int_t kNLadd[kNLay] = {fgkLay3Nladd, fgkLay4Nladd};
2556 const Int_t kNDet[kNLay] = {fgkLay3Ndet, fgkLay4Ndet};
b7943f00 2557
2558 if (GetDebug(1))
2559 printf("AliITSv11GeometrySDD::SetSensorGeometry(), nodes found :\n");
2560
fa4639a3 2561 Int_t firstSDDmod = startMod;
b7943f00 2562 for (Int_t iLay=0; iLay<kNLay; iLay++) {
2563 /////////////////////////////////////////
2564 sprintf(layerName, "ITSsddLayer%i_1",iLay+3);
2565 TGeoNode *layNode = fMotherVol->GetNode(layerName);
2566 if (layNode) {
2567 if (GetDebug(1)) printf("%s\n",layNode->GetName());
2568 TGeoVolume *layVolume = layNode->GetVolume();
2569 TGeoHMatrix layMatrix(*layNode->GetMatrix());
2570
2571 for (Int_t iLadd=0; iLadd<kNLadd[iLay]; iLadd++) {
2572 /////////////////////////////////////////
2573 sprintf(ladderName, "ITSsddLadd_%i", iLadd);
2574 TGeoNode *laddNode = layVolume->GetNode(ladderName);
2575 if (laddNode) {
2576 if (GetDebug(1)) printf("| %s\n",laddNode->GetName());
2577 TGeoVolume *laddVolume = laddNode->GetVolume();
2578 TGeoHMatrix laddMatrix(layMatrix);
2579 laddMatrix.Multiply(laddNode->GetMatrix());
2580
2581 for (Int_t iDet=0; iDet<kNDet[iLay]; iDet++) {
2582 /////////////////////////////////////////
2583 sprintf(sensorName, "ITSsddSensor_%i",iDet);
2584 TGeoNode *detNode = laddVolume->GetNode(sensorName);
2585 if (detNode) {
2586 if (GetDebug(1)) printf("| | %s\n",detNode->GetName());
2587 TGeoVolume *detVolume = detNode->GetVolume();
2588 TGeoHMatrix detMatrix(laddMatrix);
2589 detMatrix.Multiply(detNode->GetMatrix());
2590
2591 TGeoNode *wafNode = detVolume->GetNode("ITSsddWafer_1");
2592 if (wafNode) {
2593 TGeoVolume *wafVolume = wafNode->GetVolume();
2594 TGeoHMatrix wafMatrix(detMatrix);
2595 detMatrix.Multiply(wafNode->GetMatrix());
2596 //--------------------------------------------------------
2597 sprintf(senstivName, "%s%s", fgSDDsensitiveVolName,"_1");
2598 TGeoNode *sensitivNode = wafVolume->GetNode(senstivName);
2599 if (sensitivNode) {
2600 TGeoHMatrix sensMatrix(wafMatrix);
2601 sensMatrix.Multiply(sensitivNode->GetMatrix());
2602
fa4639a3 2603 // Sticking to the convention for local wafer coordinate
2604 // in AliITSgeom :
2605 if (iDet >= kNDet[iLay]/2) {
2606 // TGeoRotation rotY("",0,180,0);
2607 TGeoRotation rotY("",-180,-180,0);
2608 sensMatrix.Multiply(&rotY);
2609 };
2610 // Creating the matrix in AliITSgeom for
2611 // this sensitive volume :
b7943f00 2612 Double_t *trans = sensMatrix.GetTranslation();
2613 Double_t *r = sensMatrix.GetRotationMatrix();
2614 Double_t rot[10] = {r[0],r[1],r[2],
2615 r[3],r[4],r[5],
fa4639a3 2616 r[6],r[7],r[8], 1.0};
2617 //rot[9]!=0.0 => not a unity matrix
b7943f00 2618 geom->CreatMatrix(startMod,iLay+iLaySDD,iLadd+1,iDet+1,
2619 kSDD,trans,rot);
2620 // iLadd+1, iDet+1 because ladd. and det. start at +1
2621 // elsewhere
2622 startMod++;
fa4639a3 2623
b7943f00 2624 } else
2625 printf("Error (ExportSensorGeometry) %s not found !\n",
2626 senstivName);
2627 } else
2628 printf("Error (ExportSensorGeometry) %s not found !\n",
2629 "ITSsddWafer_1");
2630 } else
2631 printf("Error (ExportSensorGeometry) %s not found !\n",
2632 sensorName);
2633 };
2634 } else
2635 printf("Error (ExportSensorGeometry) %s not found !\n",
2636 ladderName);
2637 };
2638 } else
2639 printf("Error (ExportSensorGeometry) %s not found !\n",
2640 layerName);
2641 };
c789ee28 2642
b7943f00 2643 return (startMod-firstSDDmod);
db486a6e 2644};
c789ee28 2645
2646
fa4639a3 2647//________________________________________________________________________
b7943f00 2648Int_t AliITSv11GeometrySDD::
2649GetCurrentLayLaddDet(Int_t &lay, Int_t &ladd, Int_t&det) const {
2650 //
2651 // Function which gives the layer, ladder and det.
2652 // index of the current volume. To be used in
2653 // AliITS::StepManager()
2654 //
c789ee28 2655
b7943f00 2656 if (gGeoManager->GetLevel()<3) return kFALSE;
2657 // Get the det index :
2658 TGeoNode *node = gGeoManager->GetMother(2);
2659 if (!node) return kFALSE;
2660 det = node->GetNumber()+1;
c789ee28 2661
b7943f00 2662 // Get the ladder index :
2663 node = gGeoManager->GetMother(3);
2664 if (!node) return kFALSE;
2665 ladd = node->GetNumber()+1;
2666
2667 // Get the layer index :
2668 if (node->GetNdaughters()==fgkLay3Ndet)
fa4639a3 2669 lay = 3; // this has to be equal to the iLaySDD argument given to ExportSensorGeometry() !!!
2670 else lay = 4;
b7943f00 2671
2672 return kTRUE;
db486a6e 2673};