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 | |
16 | //************************************************************************* |
17 | // SDD geometry, based on ROOT geometrical modeler |
18 | // |
19 | // Ludovic Gaudichet (Ludovic.Gaudichet@to.infn.it) |
20 | //************************************************************************* |
21 | |
22 | |
23 | #include <stdio.h> |
24 | #include <stdlib.h> |
25 | |
26 | // General Root includes |
27 | #include <Riostream.h> |
28 | #include <TMath.h> |
29 | |
30 | // Root Geometry includes |
31 | #include <TGeoManager.h> |
32 | #include <TGeoVolume.h> |
33 | #include <TGeoPcon.h> |
34 | #include <TGeoCone.h> |
35 | #include <TGeoTube.h> |
36 | #include <TGeoArb8.h> |
37 | #include <TGeoCompositeShape.h> |
38 | #include <TGeoMatrix.h> |
39 | #include <TGeoMaterial.h> |
40 | #include <TGeoMedium.h> |
41 | |
42 | #include "AliITSv11Geometry.h" |
43 | #include "AliITSv11GeometrySDD.h" |
44 | |
45 | |
46 | |
47 | ClassImp(AliITSv11GeometrySDD) |
48 | |
49 | |
50 | AliITSv11GeometrySDD::AliITSv11GeometrySDD():AliITSv11Geometry() { |
51 | fAddOnlyLadder3 = -1; |
52 | fAddOnlyLadder4 = -1; |
53 | fAddOnlySegment = 0; |
54 | SetGeomParameters(); |
55 | }; |
56 | //---------------------------------------------------------------------- |
57 | AliITSv11GeometrySDD::AliITSv11GeometrySDD(Int_t debug):AliITSv11Geometry(debug) { |
58 | fAddOnlyLadder3 = -1; |
59 | fAddOnlyLadder4 = -1; |
60 | fAddOnlySegment = 0; |
61 | SetGeomParameters(); |
62 | }; |
63 | //---------------------------------------------------------------------- |
64 | void AliITSv11GeometrySDD::SetGeomParameters() { |
65 | |
66 | fSegmentLength = 37.2*2*fgkmm; |
67 | fLadderWidth = 50.0*fgkmm; |
68 | fLadderHeight = 30.0*fgkmm; |
69 | fLadderBeamRadius = 0.6*fgkmm; |
70 | fLadderLa = 3.*fgkmm; |
71 | fLadderHa = 0.6*fgkmm; //total pifometer |
72 | fLadderLb = 3.7*fgkmm; |
73 | fLadderHb = 0.6*fgkmm; //total pifometer |
74 | fLadderl = 0.25*fgkmm; |
75 | |
76 | fBottomBeamAngle = 56.5; |
77 | fBeamSidePhi = 65; |
78 | |
79 | fWaferThickness = 0.3*fgkmm; |
80 | fWaferWidth = 72.5*fgkmm; |
81 | fWaferLength = 87.6*fgkmm; |
82 | |
83 | fHybridLength = (37.2*2-15)*fgkmm; //total pifometer |
84 | fHybridWidth = 35*fgkmm; //total pifometer |
85 | |
86 | fLadWaferSep = 2*fgkmm; |
87 | fPinSuppWidth = 2.5*fgkmm; // pifometer |
88 | fPinSuppHeight = 2.*fgkmm; // pifometer |
89 | fPinSuppRmax = 2.5/2.*fgkmm; |
90 | fPinR = 1.5/2.*fgkmm; |
91 | fPinSuppLength = 5.*fgkmm; |
92 | fPinSuppThickness = 0.5*fgkmm; |
93 | fPinSuppConeAngle = 4; |
94 | |
95 | fLay3Rmin = 130.*fgkmm; //not min! Rmin virtual tube |
96 | fLay3Rmax = 190.*fgkmm; //not min! Rmax virtual tube |
97 | fLay3Length = (524.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube) |
98 | fLay3LadderLength = 524.*fgkmm; |
99 | fLay3DetShortRadius = 146.0*fgkmm; |
100 | fLay3DetLongRadius = 152.0*fgkmm; |
101 | fLay3LaddShortRadius = fLay3DetShortRadius-fLadderBeamRadius+(8-1)*fgkmm; // radius from the center to the CF ladder |
102 | fLay3LaddLongRadius = fLay3DetLongRadius-fLadderBeamRadius+(8-1)*fgkmm; // radius from the center to the CF ladder |
103 | fLay3LaddTopCornerEnd = 15.6*fgkmm; |
104 | fLay3Ndet = 6; |
105 | fLay3Nladd = 14; |
106 | |
107 | fLay4Rmin = 220.*fgkmm; //not min! Rmin virtual tube |
108 | fLay4Rmax = 290.*fgkmm; //not min! Rmax virtual tube |
109 | fLay4Length = (671.+0.)*fgkmm; // ladder+supporting rings (length of the virtual tube) |
110 | fLay4LadderLength = 671.*fgkmm; |
111 | fLay4DetShortRadius = 235.0*fgkmm; |
112 | fLay4DetLongRadius = 240.5*fgkmm; |
113 | fLay4LaddShortRadius = fLay4DetShortRadius-fLadderBeamRadius+(8-1)*fgkmm; // radius from the center to the CF ladder |
114 | fLay4LaddLongRadius = fLay4DetLongRadius-fLadderBeamRadius+(8-1)*fgkmm; // radius from the center to the CF ladder |
115 | fLay4LaddTopCornerEnd = 15.6*fgkmm; |
116 | fLay4Ndet = 8; |
117 | fLay4Nladd = 22; |
118 | |
119 | for (Int_t i=0; i<fLay3Ndet; i++) |
120 | fLay3sensorZPos[i] = -fSegmentLength*fLay3Ndet/2.+fSegmentLength/2.+i*fSegmentLength; |
121 | |
122 | for (Int_t i=0; i<fLay4Ndet; i++) |
123 | fLay4sensorZPos[i] = -fSegmentLength*fLay4Ndet/2.+fSegmentLength/2.+i*fSegmentLength; |
124 | |
125 | }; |
126 | //________________________________________________________________________ |
127 | TGeoCombiTrans *AliITSv11GeometrySDD:: |
128 | CreateCombiTrans(const char *name, Double_t dy, Double_t dz, Double_t dphi) { |
129 | // |
130 | // return the TGeoCombiTrans which make a translation in y and z |
131 | // and a rotation in phi in the global coord system |
132 | // |
133 | |
134 | TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz); |
135 | TGeoRotation r1("",0.,0.,dphi); |
136 | |
137 | TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name); |
138 | combiTrans1->SetTranslation(t1); |
139 | combiTrans1->SetRotation(r1); |
140 | return combiTrans1; |
141 | }; |
142 | //________________________________________________________________________ |
143 | void AliITSv11GeometrySDD::AddTranslationTotCombiTrans(TGeoCombiTrans* ct, |
144 | Double_t dx, |
145 | Double_t dy, |
146 | Double_t dz) { |
147 | // Add a dx,dy,dz translation to the initial TGeoCombiTrans |
148 | const Double_t *vect = ct->GetTranslation(); |
149 | Double_t newVect[3]; |
150 | newVect[0] = vect[0]+dx; |
151 | newVect[1] = vect[1]+dy; |
152 | newVect[2] = vect[2]+dz; |
153 | ct->SetTranslation(newVect); |
154 | }; |
155 | //________________________________________________________________________ |
156 | void AliITSv11GeometrySDD::Layer3(TGeoVolume *Moth) { |
157 | // Insert the layer 3 in the mother volume. This is a virtual volume |
158 | // containing ladders of layer 3 and the supporting rings |
159 | |
160 | TGeoTube *virtualLayer3Shape = new TGeoTube("ITSsddLayer3Shape", |
161 | fLay3Rmin,fLay3Rmax,fLay3Length*0.5); |
162 | TGeoMedium *airSDD = gGeoManager->GetMedium("ITSsddAir"); |
163 | TGeoVolume *virtualLayer3 = new TGeoVolume("ITSsddLayer3", |
164 | virtualLayer3Shape, airSDD); |
165 | TGeoVolume *lay3Ladder = CreateLay3Ladder(); |
166 | TGeoVolume *lay3Detectors = CreateLay3Detectors(); |
167 | |
168 | Double_t dPhi = 360./fLay3Nladd; |
169 | Double_t detBoxThickness = fLadWaferSep + 2*fWaferThickness; |
170 | // placing virtual ladder and detectors volumes following ladder |
171 | // ordering convention |
172 | char rotName[20]; |
173 | Int_t iLaddMin = 0; |
174 | Int_t iLaddMax = fLay3Nladd; |
175 | if ((fAddOnlyLadder3>=0)&&(fAddOnlyLadder3<fLay3Nladd)) { |
176 | iLaddMin = fAddOnlyLadder3; |
177 | iLaddMax = fAddOnlyLadder3+1; |
178 | } |
179 | for (Int_t iLadd = iLaddMin; iLadd < iLaddMax; iLadd++) { |
180 | sprintf(rotName, "ITSsddLay3Ladd%i",iLadd); |
181 | Double_t minRadiusLadBox = fLay3LaddShortRadius; |
182 | if (iLadd%2 != 0) minRadiusLadBox = fLay3LaddLongRadius; |
183 | minRadiusLadBox += ((TGeoBBox*)lay3Ladder->GetShape())->GetDY(); |
184 | |
185 | TGeoCombiTrans *ctLadd = CreateCombiTrans(rotName,minRadiusLadBox,0, |
186 | -90+iLadd*dPhi); |
187 | virtualLayer3->AddNode(lay3Ladder,iLadd,ctLadd); |
188 | sprintf(rotName, "ITSsddLay3DetBox%i",iLadd); |
189 | Double_t minRadiusDetBox = fLay3DetShortRadius; |
190 | if (iLadd%2 != 0) minRadiusDetBox = fLay3DetLongRadius; |
191 | minRadiusDetBox += detBoxThickness/2; |
192 | TGeoCombiTrans *ctDet = CreateCombiTrans(rotName, minRadiusDetBox,0, |
193 | -90+iLadd*dPhi); |
194 | virtualLayer3->AddNode(lay3Detectors, iLadd, ctDet); |
195 | } |
196 | virtualLayer3->SetVisibility(kFALSE); |
197 | Moth->AddNode(virtualLayer3,1,0); |
198 | }; |
199 | //________________________________________________________________________ |
200 | TGeoVolume *AliITSv11GeometrySDD::CreateLay3Ladder() { |
201 | // return a box volume containing the CF ladder |
202 | TGeoVolume *laddSegment = CreateLadderSegment(); |
203 | TGeoBBox *ladBox = new TGeoBBox("ITSsddLadBox", |
204 | ((TGeoBBox*)laddSegment->GetShape())->GetDX(), |
205 | ((TGeoBBox*)laddSegment->GetShape())->GetDY(), |
206 | //dX,dY = dX,dY of the segment |
207 | fLay3LadderLength/2); |
208 | TGeoMedium *airSDD = gGeoManager->GetMedium("ITSsddAir"); |
209 | TGeoVolume *virtualLadder = new TGeoVolume("ITSsddLadder",ladBox, airSDD); |
210 | Double_t segmentLength = fSegmentLength; |
211 | char transName[20]; |
212 | // placing virtual ladder segment following detector ordering convention |
213 | //======================================================================= |
214 | Int_t iSegmentMin = 1; |
215 | Int_t iSegmentMax = fLay3Ndet; |
216 | if (fAddOnlySegment) { |
217 | iSegmentMin = fAddOnlySegment; |
218 | iSegmentMax = fAddOnlySegment; |
219 | } |
220 | for (Int_t iSegment = iSegmentMin; iSegment <= iSegmentMax; iSegment++ ) { |
221 | sprintf(transName, "ITSsddLay3LaddSeg%i", iSegment); |
222 | Double_t segmentPos = segmentLength*(3-iSegment) + segmentLength/2; |
223 | TGeoTranslation *segTr = new TGeoTranslation(transName,0,0,segmentPos); |
224 | virtualLadder->AddNode(laddSegment, iSegment, segTr); |
225 | } |
226 | // putting virtual volume corresponding to the end of ladder |
227 | //======================================================================= |
228 | Double_t endLength = (fLay3LadderLength-fLay3Ndet*fSegmentLength)/2.; |
229 | TGeoVolume *endLadder = CreateEndLadder( endLength ); |
230 | TGeoTranslation *endTrZPos = new TGeoTranslation("ITSsddEndTrZPos",0,0, |
231 | fSegmentLength*(fLay3Ndet/2)+endLength/2.); |
232 | //Euler rotation : about Z, then new X, then new Z |
233 | TGeoRotation *endZNegRot = new TGeoRotation("",90, 180, -90); |
234 | TGeoCombiTrans *endTrZNeg = new TGeoCombiTrans(0,0, |
235 | -fSegmentLength*(fLay3Ndet/2)-endLength/2., endZNegRot); |
236 | if ((fAddOnlySegment==0)||(fAddOnlySegment==1)) |
237 | virtualLadder->AddNode(endLadder, 1, endTrZPos); |
238 | if ((fAddOnlySegment==0)||(fAddOnlySegment==fLay3Ndet)) |
239 | virtualLadder->AddNode(endLadder, 2, endTrZNeg); |
240 | virtualLadder->SetVisibility(kFALSE); |
241 | return virtualLadder; |
242 | }; |
243 | //________________________________________________________________________ |
244 | TGeoArb8 *AliITSv11GeometrySDD::CreateLadderSide(Double_t dz,Double_t angle, |
245 | Double_t xSign,Double_t L, Double_t H, Double_t l) { |
246 | // Create one half of the V shape corner of CF ladder |
247 | |
248 | TGeoArb8 *cfLaddSide = new TGeoArb8(dz); |
249 | cfLaddSide->SetVertex(0, 0,0); |
250 | cfLaddSide->SetVertex(1, 0, -H); |
251 | cfLaddSide->SetVertex(2,xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)), |
252 | -L*TMath::Cos(angle)-l*TMath::Sin(angle)); |
253 | cfLaddSide->SetVertex(3,xSign*L*TMath::Sin(angle),-L*TMath::Cos(angle)); |
254 | cfLaddSide->SetVertex(4, 0,0); |
255 | cfLaddSide->SetVertex(5, 0, -H); |
256 | cfLaddSide->SetVertex(6,xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)), |
257 | -L*TMath::Cos(angle)-l*TMath::Sin(angle)); |
258 | cfLaddSide->SetVertex(7,xSign*L*TMath::Sin(angle),-L*TMath::Cos(angle)); |
259 | return cfLaddSide; |
260 | }; |
261 | //________________________________________________________________________ |
262 | void AliITSv11GeometrySDD::AddLadderCFstruct(Double_t dy, TGeoVolume* vol) { |
263 | // fill a volume (segment) with the CF structure of a ladder |
264 | |
265 | TGeoMedium *carbonFiberLadderStruct = gGeoManager->GetMedium( |
266 | "ITSsddCarbonFiber"); |
267 | Double_t segmentLength = fSegmentLength; |
268 | Double_t triangleHeight = fLadderHeight - fLadderBeamRadius; |
269 | Double_t halfTheta = TMath::ATan( 0.5*fLadderWidth/triangleHeight ); |
270 | Double_t beta = (TMath::Pi()-2.*halfTheta)/4.; |
271 | Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.; |
272 | Int_t colorCarbonFiber = 4; |
273 | |
274 | //--- The 3 V shape corners of the Carbon Fiber Ladder |
275 | //--- the top V |
276 | TGeoArb8 *cfLaddTop1 = CreateLadderSide(segmentLength/2., halfTheta, -1, |
277 | fLadderLa, fLadderHa, fLadderl); |
278 | TGeoVolume *cfLaddTopVol1 = new TGeoVolume("ITSsddCFladdTopCornerVol1", |
279 | cfLaddTop1,carbonFiberLadderStruct); |
280 | cfLaddTopVol1->SetLineColor(colorCarbonFiber); |
281 | TGeoArb8 *cfLaddTop2 = CreateLadderSide(segmentLength/2., halfTheta, 1, |
282 | fLadderLa, fLadderHa, fLadderl); |
283 | TGeoVolume *cfLaddTopVol2 = new TGeoVolume("ITSsddCFladdTopCornerV2", |
284 | cfLaddTop2,carbonFiberLadderStruct); |
285 | cfLaddTopVol2->SetLineColor(colorCarbonFiber); |
286 | TGeoTranslation *trTop1 = new TGeoTranslation(0, fLadderHeight/2+dy, 0); |
287 | vol->AddNode(cfLaddTopVol1, 1, trTop1); |
288 | vol->AddNode(cfLaddTopVol2, 1, trTop1); |
289 | //--- the 2 side V |
290 | TGeoArb8 *cfLaddSide1 = CreateLadderSide( segmentLength/2., beta, -1, |
291 | fLadderLb, fLadderHb, fLadderl); |
292 | TGeoVolume *cfLaddSideVol1 = new TGeoVolume("ITSsddCFladdSideCornerV1", |
293 | cfLaddSide1,carbonFiberLadderStruct); |
294 | cfLaddSideVol1->SetLineColor(colorCarbonFiber); |
295 | TGeoArb8 *cfLaddSide2 = CreateLadderSide( segmentLength/2., beta, 1, |
296 | fLadderLb, fLadderHb, fLadderl); |
297 | TGeoVolume *cfLaddSideVol2 = new TGeoVolume("ITSsddCFladdSideCornerV2", |
298 | cfLaddSide2,carbonFiberLadderStruct); |
299 | cfLaddSideVol2->SetLineColor(colorCarbonFiber); |
300 | |
301 | Double_t dYTranslation = fLadderHeight/2. - |
302 | 0.5*fLadderWidth*TMath::Tan(beta) - fLadderBeamRadius; |
303 | // because center of the triangle doesn't correspond to virtual vol. center |
304 | Double_t distCenterSideDown = 0.5*fLadderWidth/TMath::Cos(beta); |
305 | TGeoCombiTrans *ctSideR = CreateCombiTrans("", distCenterSideDown, 0, |
306 | alpha*TMath::RadToDeg()); |
307 | AddTranslationTotCombiTrans(ctSideR, 0, -dYTranslation+dy, 0); |
308 | TGeoCombiTrans *ctSideL = CreateCombiTrans("", distCenterSideDown,0, |
309 | -alpha*TMath::RadToDeg()); |
310 | AddTranslationTotCombiTrans(ctSideL, 0, -dYTranslation+dy, 0); |
311 | vol->AddNode(cfLaddSideVol1, 1, ctSideR); |
312 | vol->AddNode(cfLaddSideVol2, 1, ctSideR); |
313 | vol->AddNode(cfLaddSideVol1, 2, ctSideL); |
314 | vol->AddNode(cfLaddSideVol2, 2, ctSideL); |
315 | //--- The beams |
316 | // Beams on the sides |
317 | Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)* |
318 | TMath::Sin(2*beta)/(TanD(fBeamSidePhi)*TanD(fBeamSidePhi))) )); |
319 | if(GetDebug(1)) cout<<"Phi prime = "<<beamPhiPrime*TMath::RadToDeg()<<endl; |
320 | Double_t beamLength = TMath::Sqrt( fLadderHeight*fLadderHeight/ |
321 | (TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime)) |
322 | +fLadderWidth*fLadderWidth/4.)-fLadderLa/2-fLadderLb/2; |
323 | TGeoTubeSeg *sideBeam = new TGeoTubeSeg(0,fLadderBeamRadius,beamLength/2., |
324 | 0, 180); |
325 | TGeoVolume *cfSideBeamVol = new TGeoVolume("ITSsddCFSideBeamVol", sideBeam, |
326 | carbonFiberLadderStruct); |
327 | cfSideBeamVol->SetLineColor(colorCarbonFiber); |
328 | //Euler rotation : about Z, then new X, then new Z |
329 | TGeoRotation *beamRot1 = new TGeoRotation("",90-2.*beta*TMath::RadToDeg(), |
330 | -beamPhiPrime*TMath::RadToDeg(),-90); |
331 | TGeoCombiTrans *beamTransf1 = new TGeoCombiTrans(0.5*triangleHeight* |
332 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,-3*segmentLength/8,beamRot1); |
333 | TGeoCombiTrans *beamTransf2 = new TGeoCombiTrans(0.5*triangleHeight* |
334 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,segmentLength/8,beamRot1); |
335 | TGeoRotation *beamRot2 = new TGeoRotation("",90-2.*beta*TMath::RadToDeg(), |
336 | beamPhiPrime*TMath::RadToDeg(), -90); |
337 | TGeoCombiTrans *beamTransf3 = new TGeoCombiTrans(0.5*triangleHeight* |
338 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,-segmentLength/8,beamRot2); |
339 | TGeoCombiTrans *beamTransf4 = new TGeoCombiTrans(0.5*triangleHeight* |
340 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,3*segmentLength/8,beamRot2); |
341 | TGeoRotation *beamRot3 = new TGeoRotation("",90+2.*beta*TMath::RadToDeg(), |
342 | beamPhiPrime*TMath::RadToDeg(), -90); |
343 | TGeoCombiTrans *beamTransf5 = new TGeoCombiTrans(-0.5*triangleHeight* |
344 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy, |
345 | -3*segmentLength/8,beamRot3); |
346 | TGeoCombiTrans *beamTransf6 = new TGeoCombiTrans(-0.5*triangleHeight* |
347 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,segmentLength/8,beamRot3); |
348 | TGeoRotation *beamRot4 = new TGeoRotation("",90+2.*beta*TMath::RadToDeg(), |
349 | -beamPhiPrime*TMath::RadToDeg(), -90); |
350 | TGeoCombiTrans *beamTransf7 = new TGeoCombiTrans(-0.5*triangleHeight* |
351 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,-segmentLength/8,beamRot4); |
352 | TGeoCombiTrans *beamTransf8 = new TGeoCombiTrans(-0.5*triangleHeight* |
353 | TMath::Tan(halfTheta),fLadderBeamRadius/2.+dy,3*segmentLength/8,beamRot4); |
354 | |
355 | vol->AddNode(cfSideBeamVol, 1, beamTransf1); |
356 | vol->AddNode(cfSideBeamVol, 2, beamTransf2); |
357 | vol->AddNode(cfSideBeamVol, 3, beamTransf3); |
358 | vol->AddNode(cfSideBeamVol, 4, beamTransf4); |
359 | vol->AddNode(cfSideBeamVol, 5, beamTransf5); |
360 | vol->AddNode(cfSideBeamVol, 6, beamTransf6); |
361 | vol->AddNode(cfSideBeamVol, 7, beamTransf7); |
362 | vol->AddNode(cfSideBeamVol, 8, beamTransf8); |
363 | //--- Beams of the bottom |
364 | TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, fLadderBeamRadius, |
365 | fLadderWidth/2.-fLadderLb/3, 0, 180); |
366 | TGeoVolume *bottomBeam1Vol = new TGeoVolume("ITSsddBottomBeam1Vol", |
367 | bottomBeam1, carbonFiberLadderStruct); |
368 | bottomBeam1Vol->SetLineColor(colorCarbonFiber); |
369 | |
370 | TGeoRotation *bottomBeamRot1 = new TGeoRotation("",90, 90, 90); |
371 | TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans(0, |
372 | -(fLadderHeight/2-fLadderBeamRadius)+dy,0, bottomBeamRot1); |
373 | vol->AddNode(bottomBeam1Vol, 1, bottomBeamTransf1); |
374 | TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, fLadderBeamRadius, |
375 | fLadderWidth/2.-fLadderLb/3, 0, 90); |
376 | TGeoVolume *bottomBeam2Vol = new TGeoVolume("ITSsddBottomBeam2Vol", |
377 | bottomBeam2, carbonFiberLadderStruct); |
378 | bottomBeam2Vol->SetLineColor(colorCarbonFiber); |
379 | TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0, |
380 | -(fLadderHeight/2-fLadderBeamRadius)+dy, |
381 | -segmentLength/2, bottomBeamRot1); |
382 | TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90); |
383 | TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0, |
384 | -(fLadderHeight/2-fLadderBeamRadius)+dy, |
385 | segmentLength/2, bottomBeamRot2); |
386 | vol->AddNode(bottomBeam2Vol, 1, bottomBeamTransf2); |
387 | vol->AddNode(bottomBeam2Vol, 2, bottomBeamTransf3); |
388 | TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, fLadderBeamRadius, |
389 | 0.5*fLadderWidth/SinD(fBottomBeamAngle)-fLadderLb/3,0,180); |
390 | TGeoVolume *bottomBeam3Vol = new TGeoVolume("ITSsddBottomBeam3Vol", |
391 | bottomBeam3, carbonFiberLadderStruct); |
392 | bottomBeam3Vol->SetLineColor(colorCarbonFiber); |
393 | //bottomBeam3Vol->SetLineColor(2); |
394 | // be careful on the next 2 beams : when "reading" from -z to +z and |
395 | // from the bottom of the ladder, |
396 | // it should draw a Lambda, and not a V |
397 | TGeoRotation *bottomBeamRot4 = new TGeoRotation("", -90, fBottomBeamAngle, |
398 | -90); |
399 | TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0, |
400 | -(fLadderHeight/2-fLadderBeamRadius)+dy,-segmentLength/4,bottomBeamRot4); |
401 | TGeoRotation *bottomBeamRot5 = new TGeoRotation("",-90,-fBottomBeamAngle, |
402 | -90); |
403 | TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0, |
404 | -(fLadderHeight/2-fLadderBeamRadius)+dy,segmentLength/4, bottomBeamRot5); |
405 | vol->AddNode(bottomBeam3Vol, 1, bottomBeamTransf4); |
406 | vol->AddNode(bottomBeam3Vol, 2, bottomBeamTransf5); |
407 | }; |
408 | //________________________________________________________________________ |
409 | TGeoVolume* AliITSv11GeometrySDD::CreateHybrid() { |
410 | // return a box containing the front-end hybrid |
411 | TGeoBBox *hybridBox = new TGeoBBox("ITSsddHybridBox",fHybridWidth/2,0.3/2, |
412 | fHybridLength/2); // <===== 0.3 tempo |
413 | TGeoMedium *airSDD = gGeoManager->GetMedium("ITSsddAir"); |
414 | TGeoVolume *VirtualHybrid =new TGeoVolume("ITSsddHybrid",hybridBox,airSDD); |
415 | |
416 | VirtualHybrid->SetVisibility(kFALSE); |
417 | return VirtualHybrid; |
418 | }; |
419 | //________________________________________________________________________ |
420 | TGeoVolume* AliITSv11GeometrySDD::CreateLadderSegment() { |
421 | // Return a box volume containing a segment of a ladder. |
422 | |
423 | TGeoMedium *airSDD = gGeoManager->GetMedium("ITSsddAir"); |
424 | |
425 | Double_t tDY = -0.5; //space left on top of the ladder |
426 | Double_t segmentLength = fSegmentLength; |
427 | |
428 | TGeoBBox *segBox = new TGeoBBox("ITSsddSegBox", |
429 | (fLadderWidth+fPinSuppWidth)/2, |
430 | fLadderHeight/2+TMath::Abs(tDY), |
431 | segmentLength/2); |
432 | TGeoVolume *VirtualSeg = new TGeoVolume("ITSsddSegment",segBox, airSDD); |
433 | // the carbon fiber structure : |
434 | AddLadderCFstruct(tDY, VirtualSeg); |
435 | // the 2 hybrids : |
436 | TGeoVolume *Hybrid = CreateHybrid(); |
437 | Double_t hybDx = ((TGeoBBox*)Hybrid->GetShape())->GetDX(); |
438 | Double_t hybDy = ((TGeoBBox*)Hybrid->GetShape())->GetDY(); |
439 | Double_t halfDiag = TMath::Sqrt(hybDx*hybDx+hybDy*hybDy); |
440 | Double_t theta = 50; //angle in the transverse plane of hybrids |
441 |