]>
Commit | Line | Data |
---|---|---|
b705c75b | 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 | // This class Defines the Geometry for the ITS Upgrade using TGeo | |
18 | // This is a work class used to study different configurations | |
19 | // during the development of the new ITS structure. | |
20 | // | |
21 | // Mario Sitta <sitta@to.infn.it> | |
22 | // Chinorat Kobdaj (kobdaj@g.sut.ac.th) | |
23 | //************************************************************************* | |
24 | ||
25 | ||
26 | /* $Id: AliITSUv1Layer.cxx */ | |
27 | // General Root includes | |
28 | #include <TMath.h> | |
29 | // Root Geometry includes | |
30 | //#include <AliLog.h> | |
31 | #include <TGeoManager.h> | |
32 | #include <TGeoVolume.h> | |
33 | #include <TGeoPcon.h> | |
34 | #include <TGeoCone.h> | |
35 | #include <TGeoTube.h> // contaings TGeoTubeSeg | |
36 | #include <TGeoArb8.h> | |
37 | #include <TGeoXtru.h> | |
38 | #include <TGeoCompositeShape.h> | |
39 | #include <TGeoMatrix.h> | |
40 | #include "AliITSUv1Layer.h" | |
41 | #include "AliITSUGeomTGeo.h" | |
42 | #include <TGeoBBox.h> | |
43 | #include <TGeoShape.h> | |
44 | #include <TGeoTrd1.h> | |
45 | using namespace TMath; | |
46 | ||
c55b10c2 | 47 | // General Parameters |
48 | const Int_t AliITSUv1Layer::fgkNumberOfInnerLayers = 3; | |
49 | ||
1fc6eff6 | 50 | const Double_t AliITSUv1Layer::fgkDefaultSensorThick = 18*fgkmicron; |
51 | const Double_t AliITSUv1Layer::fgkDefaultChipThick = 50*fgkmicron; | |
c55b10c2 | 52 | |
53 | // Inner Barrel Parameters | |
54 | const Int_t AliITSUv1Layer::fgkIBChipsPerRow = 9; | |
55 | const Int_t AliITSUv1Layer::fgkIBNChipRows = 1; | |
56 | ||
57 | // Outer Barrel Parameters | |
58 | const Int_t AliITSUv1Layer::fgkOBChipsPerRow = 7; | |
59 | const Int_t AliITSUv1Layer::fgkOBNChipRows = 2; | |
60 | ||
61 | const Double_t AliITSUv1Layer::fgkOBHalfStaveWidth = 3.01 *fgkcm; | |
62 | const Double_t AliITSUv1Layer::fgkOBModuleWidth = fgkOBHalfStaveWidth; | |
63 | const Double_t AliITSUv1Layer::fgkOBModuleGap = 0.01 *fgkcm; | |
64 | const Double_t AliITSUv1Layer::fgkOBChipXGap = 0.01 *fgkcm; | |
65 | const Double_t AliITSUv1Layer::fgkOBChipZGap = 0.01 *fgkcm; | |
66 | const Double_t AliITSUv1Layer::fgkOBFlexCableAlThick = 0.005*fgkcm; | |
1fc6eff6 | 67 | const Double_t AliITSUv1Layer::fgkOBFlexCableCuThick = 0.004*fgkcm; |
f1496ca7 | 68 | const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick1= 0.01 *fgkcm; |
69 | const Double_t AliITSUv1Layer::fgkOBFlexCableKapThick = 125.0 *fgkmicron; | |
c55b10c2 | 70 | const Double_t AliITSUv1Layer::fgkOBBusCableAlThick = 0.02 *fgkcm; |
71 | const Double_t AliITSUv1Layer::fgkOBBusCableKapThick = 0.02 *fgkcm; | |
72 | const Double_t AliITSUv1Layer::fgkOBColdPlateThick = 0.012*fgkcm; | |
73 | const Double_t AliITSUv1Layer::fgkOBCarbonPlateThick = 0.012*fgkcm; | |
1fc6eff6 | 74 | const Double_t AliITSUv1Layer::fgkOBGlueThickM1 = 0.03 *fgkcm; |
75 | const Double_t AliITSUv1Layer::fgkOBGlueThick = 0.01 *fgkcm; | |
c55b10c2 | 76 | const Double_t AliITSUv1Layer::fgkOBModuleZLength = 21.06 *fgkcm; |
77 | const Double_t AliITSUv1Layer::fgkOBHalfStaveYTrans = 1.76 *fgkmm; | |
65740b7a | 78 | const Double_t AliITSUv1Layer::fgkOBHalfStaveXOverlap = 4.3 *fgkmm; |
c55b10c2 | 79 | const Double_t AliITSUv1Layer::fgkOBGraphiteFoilThick = 30.0 *fgkmicron; |
1fc6eff6 | 80 | const Double_t AliITSUv1Layer::fgkOBCarbonFleeceThick = 20.0 *fgkmicron; |
81 | const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerDM1 = 2.052*fgkmm; | |
82 | const Double_t AliITSUv1Layer::fgkOBCoolTubeInnerD = 2.05 *fgkmm; | |
d7ef241e | 83 | const Double_t AliITSUv1Layer::fgkOBCoolTubeThick = 32.0 *fgkmicron; |
c55b10c2 | 84 | const Double_t AliITSUv1Layer::fgkOBCoolTubeXDist = 11.1 *fgkmm; |
85 | ||
86 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameWidth = 42.0 *fgkmm; | |
87 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameTotHigh = 43.1 *fgkmm; | |
88 | const Double_t AliITSUv1Layer::fgkOBSFrameBeamRadius = 0.6 *fgkmm; | |
89 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameLa = 3.0 *fgkmm; | |
90 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameHa = 0.721979*fgkmm; | |
91 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameLb = 3.7 *fgkmm; | |
92 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameHb = 0.890428*fgkmm; | |
93 | const Double_t AliITSUv1Layer::fgkOBSpaceFrameL = 0.25 *fgkmm; | |
94 | const Double_t AliITSUv1Layer::fgkOBSFBotBeamAngle = 56.5; | |
95 | const Double_t AliITSUv1Layer::fgkOBSFrameBeamSidePhi = 65.0; | |
b705c75b | 96 | |
97 | ||
98 | ClassImp(AliITSUv1Layer) | |
99 | ||
100 | #define SQ(A) (A)*(A) | |
101 | ||
102 | //________________________________________________________________________ | |
103 | AliITSUv1Layer::AliITSUv1Layer(): | |
104 | AliITSv11Geometry(), | |
105 | fLayerNumber(0), | |
106 | fPhi0(0), | |
107 | fLayRadius(0), | |
108 | fZLength(0), | |
109 | fSensorThick(0), | |
1fc6eff6 | 110 | fChipThick(0), |
852af72e | 111 | fStaveWidth(0), |
112 | fStaveTilt(0), | |
113 | fNStaves(0), | |
c55b10c2 | 114 | fNModules(0), |
852af72e | 115 | fNChips(0), |
116 | fChipTypeID(0), | |
b705c75b | 117 | fIsTurbo(0), |
118 | fBuildLevel(0), | |
119 | fStaveModel(AliITSUv1::kIBModelDummy) | |
120 | { | |
121 | // | |
122 | // Standard constructor | |
c55b10c2 | 123 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 124 | // |
125 | } | |
126 | ||
127 | //________________________________________________________________________ | |
128 | AliITSUv1Layer::AliITSUv1Layer(Int_t debug): | |
129 | AliITSv11Geometry(debug), | |
130 | fLayerNumber(0), | |
131 | fPhi0(0), | |
132 | fLayRadius(0), | |
133 | fZLength(0), | |
134 | fSensorThick(0), | |
1fc6eff6 | 135 | fChipThick(0), |
852af72e | 136 | fStaveWidth(0), |
137 | fStaveTilt(0), | |
138 | fNStaves(0), | |
c55b10c2 | 139 | fNModules(0), |
852af72e | 140 | fNChips(0), |
141 | fChipTypeID(0), | |
b705c75b | 142 | fIsTurbo(0), |
143 | fBuildLevel(0), | |
144 | fStaveModel(AliITSUv1::kIBModelDummy) | |
145 | { | |
146 | // | |
147 | // Constructor setting debugging level | |
c55b10c2 | 148 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 149 | // |
150 | } | |
151 | ||
152 | //________________________________________________________________________ | |
153 | AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Int_t debug): | |
154 | AliITSv11Geometry(debug), | |
155 | fLayerNumber(lay), | |
156 | fPhi0(0), | |
157 | fLayRadius(0), | |
158 | fZLength(0), | |
159 | fSensorThick(0), | |
1fc6eff6 | 160 | fChipThick(0), |
852af72e | 161 | fStaveWidth(0), |
162 | fStaveTilt(0), | |
163 | fNStaves(0), | |
c55b10c2 | 164 | fNModules(0), |
852af72e | 165 | fNChips(0), |
166 | fChipTypeID(0), | |
b705c75b | 167 | fIsTurbo(0), |
168 | fBuildLevel(0), | |
169 | fStaveModel(AliITSUv1::kIBModelDummy) | |
170 | { | |
171 | // | |
172 | // Constructor setting layer number and debugging level | |
c55b10c2 | 173 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 174 | // |
175 | } | |
176 | ||
177 | //________________________________________________________________________ | |
178 | AliITSUv1Layer::AliITSUv1Layer(Int_t lay, Bool_t turbo, Int_t debug): | |
179 | AliITSv11Geometry(debug), | |
180 | fLayerNumber(lay), | |
181 | fPhi0(0), | |
182 | fLayRadius(0), | |
183 | fZLength(0), | |
184 | fSensorThick(0), | |
1fc6eff6 | 185 | fChipThick(0), |
852af72e | 186 | fStaveWidth(0), |
187 | fStaveTilt(0), | |
188 | fNStaves(0), | |
c55b10c2 | 189 | fNModules(0), |
852af72e | 190 | fNChips(0), |
191 | fChipTypeID(0), | |
b705c75b | 192 | fIsTurbo(turbo), |
193 | fBuildLevel(0), | |
194 | fStaveModel(AliITSUv1::kIBModelDummy) | |
195 | { | |
196 | // | |
197 | // Constructor setting layer number and debugging level | |
852af72e | 198 | // for a "turbo" layer (i.e. where staves overlap in phi) |
c55b10c2 | 199 | for (int i=kNHLevels;i--;) fHierarchy[i] = 0; |
b705c75b | 200 | // |
201 | } | |
202 | ||
203 | //________________________________________________________________________ | |
204 | AliITSUv1Layer::AliITSUv1Layer(const AliITSUv1Layer &s): | |
205 | AliITSv11Geometry(s.GetDebug()), | |
206 | fLayerNumber(s.fLayerNumber), | |
207 | fPhi0(s.fPhi0), | |
208 | fLayRadius(s.fLayRadius), | |
209 | fZLength(s.fZLength), | |
210 | fSensorThick(s.fSensorThick), | |
1fc6eff6 | 211 | fChipThick(s.fChipThick), |
852af72e | 212 | fStaveWidth(s.fStaveWidth), |
213 | fStaveTilt(s.fStaveTilt), | |
214 | fNStaves(s.fNStaves), | |
c55b10c2 | 215 | fNModules(s.fNModules), |
852af72e | 216 | fNChips(s.fNChips), |
217 | fChipTypeID(s.fChipTypeID), | |
b705c75b | 218 | fIsTurbo(s.fIsTurbo), |
219 | fBuildLevel(s.fBuildLevel), | |
220 | fStaveModel(s.fStaveModel) | |
221 | { | |
222 | // | |
223 | // Copy constructor | |
c55b10c2 | 224 | for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i]; |
b705c75b | 225 | // |
226 | } | |
227 | ||
228 | //________________________________________________________________________ | |
229 | AliITSUv1Layer& AliITSUv1Layer::operator=(const AliITSUv1Layer &s) | |
230 | { | |
231 | // | |
232 | // Assignment operator | |
233 | // | |
234 | if(&s == this) return *this; | |
235 | ||
236 | fLayerNumber = s.fLayerNumber; | |
237 | fPhi0 = s.fPhi0; | |
238 | fLayRadius = s.fLayRadius; | |
239 | fZLength = s.fZLength; | |
240 | fSensorThick = s.fSensorThick; | |
1fc6eff6 | 241 | fChipThick = s.fChipThick; |
c55b10c2 | 242 | fStaveWidth = s.fStaveWidth; |
243 | fStaveTilt = s.fStaveTilt; | |
244 | fNStaves = s.fNStaves; | |
245 | fNModules = s.fNModules; | |
246 | fNChips = s.fNChips; | |
b705c75b | 247 | fIsTurbo = s.fIsTurbo; |
c55b10c2 | 248 | fChipTypeID = s.fChipTypeID; |
b705c75b | 249 | fBuildLevel = s.fBuildLevel; |
250 | fStaveModel = s.fStaveModel; | |
c55b10c2 | 251 | for (int i=kNHLevels;i--;) fHierarchy[i] = s.fHierarchy[i]; |
252 | // | |
b705c75b | 253 | return *this; |
254 | } | |
255 | ||
256 | //________________________________________________________________________ | |
257 | AliITSUv1Layer::~AliITSUv1Layer() { | |
258 | // | |
259 | // Destructor | |
260 | // | |
261 | } | |
262 | ||
263 | //________________________________________________________________________ | |
264 | void AliITSUv1Layer::CreateLayer(TGeoVolume *moth){ | |
265 | // | |
266 | // Creates the actual Layer and places inside its mother volume | |
267 | // | |
268 | // Input: | |
269 | // moth : the TGeoVolume owing the volume structure | |
270 | // | |
271 | // Output: | |
272 | // | |
273 | // Return: | |
274 | // | |
275 | // Created: 17 Jun 2011 Mario Sitta | |
276 | // Updated: 08 Jul 2011 Mario Sitta | |
277 | // Updated: 20 May 2013 Mario Sitta Layer is Assembly instead of Tube | |
278 | // | |
279 | // Local variables | |
280 | char volname[30]; | |
281 | Double_t xpos, ypos, zpos; | |
282 | Double_t alpha; | |
283 | ||
284 | ||
285 | // Check if the user set the proper parameters | |
c55b10c2 | 286 | if (fLayRadius<= 0) AliFatal(Form("Wrong layer radius (%f)",fLayRadius)); |
287 | if (fZLength <= 0) AliFatal(Form("Wrong layer length (%f)",fZLength)); | |
852af72e | 288 | if (fNStaves <= 0) AliFatal(Form("Wrong number of staves (%d)",fNStaves)); |
c55b10c2 | 289 | if (fNChips <= 0) AliFatal(Form("Wrong number of chips (%d)",fNChips)); |
290 | ||
291 | if (fLayerNumber >= fgkNumberOfInnerLayers && fNModules <= 0) | |
292 | AliFatal(Form("Wrong number of modules (%d)",fNModules)); | |
b705c75b | 293 | |
1fc6eff6 | 294 | if (fChipThick <= 0) { |
295 | AliInfo(Form("Chip thickness wrong or not set (%f), using default (%f)", | |
296 | fChipThick,fgkDefaultChipThick)); | |
297 | fChipThick = fgkDefaultChipThick; | |
b705c75b | 298 | } |
299 | ||
300 | if (fSensorThick <= 0) { | |
301 | AliInfo(Form("Sensor thickness wrong or not set (%f), using default (%f)", | |
302 | fSensorThick,fgkDefaultSensorThick)); | |
303 | fSensorThick = fgkDefaultSensorThick; | |
304 | } | |
305 | ||
1fc6eff6 | 306 | if (fSensorThick > fChipThick) { |
307 | AliWarning(Form("Sensor thickness (%f) is greater than chip thickness (%f), fixing", | |
308 | fSensorThick,fChipThick)); | |
309 | fSensorThick = fChipThick; | |
b705c75b | 310 | } |
311 | ||
312 | ||
313 | // If a Turbo layer is requested, do it and exit | |
314 | if (fIsTurbo) { | |
315 | CreateLayerTurbo(moth); | |
316 | return; | |
317 | } | |
318 | ||
319 | ||
852af72e | 320 | // First create the stave container |
321 | alpha = (360./(2*fNStaves))*DegToRad(); | |
b705c75b | 322 | |
852af72e | 323 | // fStaveWidth = fLayRadius*Tan(alpha); |
b705c75b | 324 | |
325 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(),fLayerNumber); | |
326 | TGeoVolume *layVol = new TGeoVolumeAssembly(volname); | |
1fc6eff6 | 327 | layVol->SetTitle( |
328 | Form("Model %d Build level %d",(Int_t)fStaveModel,fBuildLevel)); | |
852af72e | 329 | layVol->SetUniqueID(fChipTypeID); |
b705c75b | 330 | |
331 | // layVol->SetVisibility(kFALSE); | |
332 | layVol->SetVisibility(kTRUE); | |
333 | layVol->SetLineColor(1); | |
334 | ||
852af72e | 335 | TGeoVolume *stavVol = CreateStave(); |
b705c75b | 336 | |
337 | ||
338 | // Now build up the layer | |
852af72e | 339 | alpha = 360./fNStaves; |
65740b7a | 340 | Double_t r = fLayRadius + ((TGeoBBox*)stavVol->GetShape())->GetDY(); |
852af72e | 341 | for (Int_t j=0; j<fNStaves; j++) { |
b705c75b | 342 | Double_t phi = j*alpha + fPhi0; |
343 | xpos = r*CosD(phi);// r*SinD(-phi); | |
344 | ypos = r*SinD(phi);// r*CosD(-phi); | |
345 | zpos = 0.; | |
346 | phi += 90; | |
852af72e | 347 | layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos, |
b705c75b | 348 | new TGeoRotation("",phi,0,0))); |
349 | } | |
350 | ||
351 | ||
352 | // Finally put everything in the mother volume | |
353 | moth->AddNode(layVol, 1, 0); | |
354 | ||
355 | ||
356 | // Upgrade geometry is served | |
357 | return; | |
358 | } | |
359 | ||
360 | //________________________________________________________________________ | |
361 | void AliITSUv1Layer::CreateLayerTurbo(TGeoVolume *moth){ | |
362 | // | |
363 | // Creates the actual Layer and places inside its mother volume | |
852af72e | 364 | // A so-called "turbo" layer is a layer where staves overlap in phi |
b705c75b | 365 | // User can set width and tilt angle, no check is performed here |
366 | // to avoid volume overlaps | |
367 | // | |
368 | // Input: | |
369 | // moth : the TGeoVolume owing the volume structure | |
370 | // | |
371 | // Output: | |
372 | // | |
373 | // Return: | |
374 | // | |
375 | // Created: 08 Jul 2011 Mario Sitta | |
376 | // Updated: 08 Mar 2012 Mario Sitta Correct way to compute container R | |
377 | // Updated: 20 May 2013 Mario Sitta Layer is Assemgbly instead of Tube | |
378 | // | |
379 | ||
380 | ||
381 | // Local variables | |
382 | char volname[30]; | |
383 | Double_t xpos, ypos, zpos; | |
384 | Double_t alpha; | |
385 | ||
386 | ||
387 | // Check if the user set the proper (remaining) parameters | |
852af72e | 388 | if (fStaveWidth <= 0) |
389 | AliFatal(Form("Wrong stave width (%f)",fStaveWidth)); | |
390 | if (Abs(fStaveTilt) > 45) | |
391 | AliWarning(Form("Stave tilt angle (%f) greater than 45deg",fStaveTilt)); | |
b705c75b | 392 | |
393 | ||
394 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSLayerPattern(), fLayerNumber); | |
395 | TGeoVolume *layVol = new TGeoVolumeAssembly(volname); | |
1fc6eff6 | 396 | layVol->SetTitle( |
397 | Form("Model %d Build level %d",(Int_t)fStaveModel,fBuildLevel)); | |
852af72e | 398 | layVol->SetUniqueID(fChipTypeID); |
b705c75b | 399 | layVol->SetVisibility(kTRUE); |
400 | layVol->SetLineColor(1); | |
852af72e | 401 | TGeoVolume *stavVol = CreateStave(); |
b705c75b | 402 | |
403 | ||
404 | // Now build up the layer | |
852af72e | 405 | alpha = 360./fNStaves; |
406 | Double_t r = fLayRadius /* +chip thick ?! */; | |
407 | for (Int_t j=0; j<fNStaves; j++) { | |
b705c75b | 408 | Double_t phi = j*alpha + fPhi0; |
409 | xpos = r*CosD(phi);// r*SinD(-phi); | |
410 | ypos = r*SinD(phi);// r*CosD(-phi); | |
411 | zpos = 0.; | |
412 | phi += 90; | |
852af72e | 413 | layVol->AddNode(stavVol, j, new TGeoCombiTrans( xpos, ypos, zpos, |
414 | new TGeoRotation("", phi-fStaveTilt,0,0))); | |
b705c75b | 415 | } |
416 | ||
417 | ||
418 | // Finally put everything in the mother volume | |
419 | moth->AddNode(layVol, 1, 0); | |
420 | ||
421 | return; | |
422 | } | |
423 | ||
424 | //________________________________________________________________________ | |
852af72e | 425 | TGeoVolume* AliITSUv1Layer::CreateStave(const TGeoManager * /*mgr*/){ |
b705c75b | 426 | // |
852af72e | 427 | // Creates the actual Stave |
b705c75b | 428 | // |
429 | // Input: | |
430 | // mgr : the GeoManager (used only to get the proper material) | |
431 | // | |
432 | // Output: | |
433 | // | |
434 | // Return: | |
435 | // | |
436 | // Created: 22 Jun 2011 Mario Sitta | |
437 | // Updated: 18 Dec 2013 Mario Sitta Handle IB and OB | |
438 | // | |
439 | ||
440 | char volname[30]; | |
b705c75b | 441 | |
2b9468b2 | 442 | Double_t xlen, ylen, zlen; |
443 | Double_t xpos, ypos; | |
b705c75b | 444 | Double_t alpha; |
445 | ||
446 | ||
447 | // First create all needed shapes | |
852af72e | 448 | alpha = (360./(2*fNStaves))*DegToRad(); |
b705c75b | 449 | |
852af72e | 450 | // The stave |
2b9468b2 | 451 | xlen = fLayRadius*Tan(alpha); |
452 | if (fIsTurbo) xlen = 0.5*fStaveWidth; | |
1fc6eff6 | 453 | ylen = 0.5*fChipThick; |
b705c75b | 454 | zlen = 0.5*fZLength; |
455 | ||
456 | Double_t yplus = 0.46; | |
852af72e | 457 | TGeoXtru *stave = new TGeoXtru(2); //z sections |
2b9468b2 | 458 | Double_t xv[5] = {xlen,xlen,0,-xlen,-xlen}; |
b705c75b | 459 | Double_t yv[5] = {ylen+0.09,-0.15,-yplus-fSensorThick,-0.15,ylen+0.09}; |
852af72e | 460 | stave->DefinePolygon(5,xv,yv); |
461 | stave->DefineSection(0,-zlen,0,0,1.); | |
462 | stave->DefineSection(1,+zlen,0,0,1.); | |
b705c75b | 463 | |
464 | // We have all shapes: now create the real volumes | |
465 | ||
852af72e | 466 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
c55b10c2 | 467 | // TGeoVolume *staveVol = new TGeoVolume(volname, stave, medAir); |
468 | TGeoVolume *staveVol = new TGeoVolumeAssembly(volname); | |
b705c75b | 469 | |
c55b10c2 | 470 | // staveVol->SetVisibility(kFALSE); |
471 | staveVol->SetVisibility(kTRUE); | |
472 | staveVol->SetLineColor(2); | |
c55b10c2 | 473 | TGeoVolume *mechStaveVol = 0; |
b705c75b | 474 | |
852af72e | 475 | // Now build up the stave |
c55b10c2 | 476 | if (fLayerNumber < fgkNumberOfInnerLayers) { |
2b9468b2 | 477 | TGeoVolume *modVol = CreateStaveInnerB(xlen,ylen,zlen); |
478 | staveVol->AddNode(modVol, 0); | |
c55b10c2 | 479 | fHierarchy[kHalfStave] = 1; |
b705c75b | 480 | |
2b9468b2 | 481 | // Mechanical stave structure |
482 | mechStaveVol = CreateStaveStructInnerB(xlen,zlen); | |
06a9bd15 | 483 | if (mechStaveVol) { |
484 | ypos = ((TGeoBBox*)(modVol->GetShape()))->GetDY() + | |
485 | ((TGeoBBox*)(mechStaveVol->GetShape()))->GetDY(); | |
486 | staveVol->AddNode(mechStaveVol, 1, new TGeoCombiTrans(0, -ypos, 0, new TGeoRotation("",0, 0, 180))); | |
487 | } | |
b705c75b | 488 | } |
489 | ||
490 | else{ | |
2b9468b2 | 491 | TGeoVolume *hstaveVol = CreateStaveOuterB(); |
b705c75b | 492 | if (fStaveModel == AliITSUv1::kOBModel0) { // Create simplified stave struct as in v0 |
2b9468b2 | 493 | staveVol->AddNode(hstaveVol, 0); |
494 | fHierarchy[kHalfStave] = 1; | |
b705c75b | 495 | } else { // (if fStaveModel) Create new stave struct as in TDR |
2b9468b2 | 496 | xpos = ((TGeoBBox*)(hstaveVol->GetShape()))->GetDX() |
c55b10c2 | 497 | - fgkOBHalfStaveXOverlap/2; |
65740b7a | 498 | // ypos is CF height as computed in CreateSpaceFrameOuterB1 |
499 | ypos = (fgkOBSpaceFrameTotHigh - fgkOBHalfStaveYTrans)/2; | |
2b9468b2 | 500 | staveVol->AddNode(hstaveVol, 0, new TGeoTranslation(-xpos, ypos, 0)); |
501 | staveVol->AddNode(hstaveVol, 1, new TGeoTranslation( xpos, ypos+fgkOBHalfStaveYTrans, 0)); | |
c55b10c2 | 502 | fHierarchy[kHalfStave] = 2; // RS |
2b9468b2 | 503 | mechStaveVol = CreateSpaceFrameOuterB(); |
c55b10c2 | 504 | if (mechStaveVol) |
505 | staveVol->AddNode(mechStaveVol, 1, | |
506 | new TGeoCombiTrans(0, 0, 0, | |
507 | new TGeoRotation("", 180, 0, 0))); | |
b705c75b | 508 | } // if (fStaveModel) |
509 | } | |
510 | ||
511 | ||
852af72e | 512 | // Done, return the stave |
c55b10c2 | 513 | return staveVol; |
514 | } | |
515 | ||
516 | //________________________________________________________________________ | |
517 | TGeoVolume* AliITSUv1Layer::CreateStaveInnerB(const Double_t xsta, | |
518 | const Double_t ysta, | |
519 | const Double_t zsta, | |
520 | const TGeoManager *mgr){ | |
521 | // | |
522 | // Create the chip stave for the Inner Barrel | |
523 | // (Here we fake the halfstave volume to have the same | |
524 | // formal geometry hierarchy as for the Outer Barrel) | |
525 | // | |
526 | // Input: | |
2b9468b2 | 527 | // xsta, ysta, zsta : X, Y, Z stave half lengths |
c55b10c2 | 528 | // mgr : the GeoManager (used only to get the proper material) |
529 | // | |
530 | // Output: | |
531 | // | |
532 | // Return: | |
533 | // | |
534 | // Created: 06 Mar 2014 Mario Sitta | |
535 | // | |
536 | ||
537 | // Local variables | |
538 | Double_t xmod, ymod, zmod; | |
539 | char volname[30]; | |
540 | ||
541 | // First we create the module (i.e. the HIC with 9 chips) | |
542 | TGeoVolume *moduleVol = CreateModuleInnerB(xsta, ysta, zsta); | |
543 | ||
544 | // Then we create the fake halfstave and the actual stave | |
545 | xmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDX(); | |
546 | ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY(); | |
547 | zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ(); | |
548 | ||
549 | TGeoBBox *hstave = new TGeoBBox(xmod, ymod, zmod); | |
550 | ||
551 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
552 | ||
553 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); | |
554 | TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir); | |
555 | ||
556 | ||
557 | // Finally build it up | |
558 | hstaveVol->AddNode(moduleVol, 0); | |
559 | fHierarchy[kModule] = 1; | |
560 | ||
561 | // Done, return the stave structure | |
562 | return hstaveVol; | |
563 | } | |
564 | ||
565 | //________________________________________________________________________ | |
566 | TGeoVolume* AliITSUv1Layer::CreateModuleInnerB(Double_t xmod, | |
567 | Double_t ymod, | |
568 | Double_t zmod, | |
569 | const TGeoManager *mgr){ | |
570 | // | |
571 | // Creates the IB Module: (only the chips for the time being) | |
572 | // | |
573 | // Input: | |
2b9468b2 | 574 | // xmod, ymod, zmod : X, Y, Z module half lengths |
c55b10c2 | 575 | // mgr : the GeoManager (used only to get the proper material) |
576 | // | |
577 | // Output: | |
578 | // | |
579 | // Return: | |
580 | // the module as a TGeoVolume | |
581 | // | |
582 | // Created: 06 Mar 2014 M. Sitta | |
583 | // | |
584 | ||
2b9468b2 | 585 | Double_t zchip; |
d2a3dfa2 | 586 | Double_t zpos; |
c55b10c2 | 587 | char volname[30]; |
588 | ||
589 | // First create the single chip | |
2b9468b2 | 590 | zchip = zmod/fgkIBChipsPerRow; |
591 | TGeoVolume *chipVol = CreateChipInnerB(xmod, ymod, zchip); | |
c55b10c2 | 592 | |
593 | // Then create the module and populate it with the chips | |
594 | TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod); | |
595 | ||
596 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
597 | ||
598 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber); | |
599 | TGeoVolume *modVol = new TGeoVolume(volname, module, medAir); | |
600 | ||
d2a3dfa2 | 601 | // mm (not used) zlen = ((TGeoBBox*)chipVol->GetShape())->GetDZ(); |
c55b10c2 | 602 | for (Int_t j=0; j<fgkIBChipsPerRow; j++) { |
2b9468b2 | 603 | zpos = -zmod + j*2*zchip + zchip; |
604 | modVol->AddNode(chipVol, j, new TGeoTranslation(0, 0, zpos)); | |
c55b10c2 | 605 | fHierarchy[kChip]++; |
606 | } | |
607 | ||
608 | // Done, return the module | |
609 | return modVol; | |
b705c75b | 610 | } |
611 | ||
612 | //________________________________________________________________________ | |
852af72e | 613 | TGeoVolume* AliITSUv1Layer::CreateStaveStructInnerB(const Double_t xsta, |
614 | const Double_t zsta, | |
b705c75b | 615 | const TGeoManager *mgr){ |
616 | // | |
617 | // Create the mechanical stave structure | |
618 | // | |
619 | // Input: | |
852af72e | 620 | // xsta : X length |
621 | // zsta : Z length | |
b705c75b | 622 | // mgr : the GeoManager (used only to get the proper material) |
623 | // | |
624 | // Output: | |
625 | // | |
626 | // Return: | |
627 | // | |
628 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
629 | // Updated: 26 Apr 2013 Mario Sitta | |
630 | // | |
631 | ||
852af72e | 632 | TGeoVolume *mechStavVol = 0; |
b705c75b | 633 | |
634 | switch (fStaveModel) { | |
635 | case AliITSUv1::kIBModelDummy: | |
852af72e | 636 | mechStavVol = CreateStaveModelInnerBDummy(xsta,zsta,mgr); |
b705c75b | 637 | break; |
638 | case AliITSUv1::kIBModel0: | |
852af72e | 639 | mechStavVol = CreateStaveModelInnerB0(xsta,zsta,mgr); |
b705c75b | 640 | break; |
641 | case AliITSUv1::kIBModel1: | |
852af72e | 642 | mechStavVol = CreateStaveModelInnerB1(xsta,zsta,mgr); |
b705c75b | 643 | break; |
644 | case AliITSUv1::kIBModel21: | |
852af72e | 645 | mechStavVol = CreateStaveModelInnerB21(xsta,zsta,mgr); |
b705c75b | 646 | break; |
647 | case AliITSUv1::kIBModel22: | |
852af72e | 648 | mechStavVol = CreateStaveModelInnerB22(xsta,zsta,mgr); |
b705c75b | 649 | break; |
650 | case AliITSUv1::kIBModel3: | |
852af72e | 651 | mechStavVol = CreateStaveModelInnerB3(xsta,zsta,mgr); |
b705c75b | 652 | break; |
653 | default: | |
654 | AliFatal(Form("Unknown stave model %d",fStaveModel)); | |
655 | break; | |
656 | } | |
657 | ||
852af72e | 658 | return mechStavVol; |
b705c75b | 659 | } |
660 | ||
661 | ||
662 | //________________________________________________________________________ | |
663 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerBDummy(const Double_t , | |
664 | const Double_t , | |
665 | const TGeoManager *) const { | |
666 | // | |
667 | // Create dummy stave | |
668 | // | |
669 | // Input: | |
852af72e | 670 | // xsta : X length |
671 | // zsta : Z length | |
b705c75b | 672 | // mgr : the GeoManager (used only to get the proper material) |
673 | // | |
674 | // Output: | |
675 | // | |
676 | // Return: | |
677 | // | |
678 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
679 | // Updated: 26 Apr 2013 Mario Sitta | |
680 | // | |
681 | ||
682 | // Done, return the stave structur | |
683 | return 0; | |
684 | } | |
685 | ||
686 | //________________________________________________________________________ | |
852af72e | 687 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB0(const Double_t xsta, |
688 | const Double_t zsta, | |
b705c75b | 689 | const TGeoManager *mgr){ |
690 | // | |
691 | // Create the mechanical stave structure for Model 0 of TDR | |
692 | // | |
693 | // Input: | |
852af72e | 694 | // xsta : X length |
695 | // zsta : Z length | |
b705c75b | 696 | // mgr : the GeoManager (used only to get the proper material) |
697 | // | |
698 | // Output: | |
699 | // | |
700 | // Return: | |
701 | // | |
702 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
703 | // Updated: 26 Apr 2013 Mario Sitta | |
704 | // | |
705 | ||
706 | // Materials defined in AliITSUv1 | |
707 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
708 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
709 | ||
710 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
711 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
712 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
713 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
714 | ||
715 | // Local parameters | |
716 | Double_t kConeOutRadius = 0.15/2; | |
717 | Double_t kConeInRadius = 0.1430/2; | |
852af72e | 718 | Double_t kStaveLength = zsta*2; |
719 | Double_t kStaveWidth = xsta*2-kConeOutRadius*2; | |
b705c75b | 720 | Double_t kWidth = kStaveWidth/4;//1/2 of kWidth |
721 | Double_t kStaveHeight = 0.3; | |
722 | Double_t kHeight = kStaveHeight/2; | |
723 | Double_t kAlpha = 90-67;//90-33.69; | |
724 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
725 | Double_t kS1 = kWidth/TMath::Sin(kTheta); | |
726 | Double_t kL1 = kWidth/TMath::Tan(kTheta); | |
727 | Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2); | |
728 | Double_t kThe2 = TMath::ATan(kHeight/kS1); | |
729 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
730 | // Int_t loop = kStaveLength/(kL1); | |
731 | // Double_t s3 = kWidth/(2*TMath::Sin(kTheta)); | |
732 | // Double_t s4 = 3*kWidth/(2*TMath::Sin(kTheta)); | |
733 | ||
734 | AliDebug(1, Form("BuildLevel %d\n",fBuildLevel)); | |
735 | ||
736 | char volname[30]; | |
852af72e | 737 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 738 | |
739 | Double_t z=0, y=-0.011+0.0150, x=0; | |
740 | ||
852af72e | 741 | TGeoVolume *mechStavVol = 0; |
b705c75b | 742 | |
743 | if (fBuildLevel < 5) { | |
744 | ||
745 | // world (trapezoid) | |
746 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
747 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
748 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07}; | |
749 | mechStruct->DefinePolygon(5,xv,yv); | |
750 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
751 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
752 | ||
852af72e | 753 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
754 | mechStavVol->SetLineColor(12); | |
755 | mechStavVol->SetFillColor(12); | |
756 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 757 | |
758 | // detailed structure ++++++++++++++ | |
759 | //Pipe Kapton grey-35 | |
760 | TGeoTube *coolTube = new TGeoTube(kConeInRadius,kConeOutRadius,kStaveLength/2); | |
761 | TGeoVolume *volCoolTube= new TGeoVolume("pipe", coolTube, medKapton); | |
762 | volCoolTube->SetFillColor(35); | |
763 | volCoolTube->SetLineColor(35); | |
852af72e | 764 | mechStavVol->AddNode(volCoolTube,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); |
765 | mechStavVol->AddNode(volCoolTube,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); | |
b705c75b | 766 | } |
767 | ||
768 | if (fBuildLevel < 4) { | |
769 | TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength/2); | |
770 | TGeoVolume *volCoolTubeW= new TGeoVolume("pipeWater", coolTubeW, medWater); | |
771 | volCoolTubeW->SetFillColor(4); | |
772 | volCoolTubeW->SetLineColor(4); | |
852af72e | 773 | mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x+(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); |
774 | mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x-(kStaveWidth/2),y-(kHeight-kConeOutRadius),0)); | |
b705c75b | 775 | } |
776 | ||
777 | //frequency of filament | |
778 | //n = 4 means very dense(4 filaments per interval) | |
779 | //n = 2 means dense(2 filaments per interval) | |
780 | Int_t n =4; | |
781 | Int_t loop = (Int_t)(kStaveLength/(4*kL1/n) + 2/n)-1; | |
782 | if (fBuildLevel < 3) { | |
783 | //Top CFRP Filament black-12 Carbon structure TGeoBBox (length,thickness,width) | |
784 | TGeoBBox *t2=new TGeoBBox(kS2,0.007/2,0.15/2);//(kS2,0.002,0.02); | |
785 | TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K); | |
786 | volT2->SetLineColor(12); | |
787 | volT2->SetFillColor(12); | |
788 | ||
789 | for(int i=1;i<loop;i++){ //i<60;i++){ | |
852af72e | 790 | mechStavVol->AddNode(volT2,4*i+0, |
b705c75b | 791 | new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
792 | new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); | |
852af72e | 793 | mechStavVol->AddNode(volT2,4*i+1, |
b705c75b | 794 | new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
795 | new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); | |
852af72e | 796 | mechStavVol->AddNode(volT2,4*i+2, |
b705c75b | 797 | new TGeoCombiTrans(x+kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
798 | new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); | |
852af72e | 799 | mechStavVol->AddNode(volT2,4*i+3, |
b705c75b | 800 | new TGeoCombiTrans(x-kWidth,y+(2*kConeOutRadius),z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2,//z-14.25+(i*2*kL1), |
801 | new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); | |
802 | } | |
803 | ||
804 | ||
805 | //Bottom CFRP Filament black-12 Carbon structure TGeoBBox (thickness,width,length) | |
806 | TGeoBBox *t1=new TGeoBBox(0.007/2,0.15/2,kS1);//(0.002,0.02,kS1); | |
807 | TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K); | |
808 | volT1->SetLineColor(12); | |
809 | volT1->SetFillColor(12); | |
810 | ||
811 | for(int i=1;i<loop;i++){ | |
852af72e | 812 | mechStavVol->AddNode(volT1,4*i+0, |
b705c75b | 813 | new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1), |
814 | new TGeoRotation("volT1",-90,kAlpha,0))); | |
852af72e | 815 | mechStavVol->AddNode(volT1,4*i+1, |
b705c75b | 816 | new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(i*2*kL1), |
817 | new TGeoRotation("volT1",90,kAlpha,0))); | |
852af72e | 818 | mechStavVol->AddNode(volT1,4*i+2, |
b705c75b | 819 | new TGeoCombiTrans(x+kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
820 | new TGeoRotation("volT1",-90,-kAlpha,0))); | |
852af72e | 821 | mechStavVol->AddNode(volT1,4*i+3, |
b705c75b | 822 | new TGeoCombiTrans(x-kWidth,y-kHeight,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
823 | new TGeoRotation("volT1",-90,+kAlpha,0))); | |
824 | } | |
825 | } | |
826 | ||
827 | if (fBuildLevel < 2) { | |
828 | // Glue CFRP-Silicon layers TGeoBBox(thickness,width,kS1); | |
829 | TGeoBBox *tG=new TGeoBBox(0.0075/2,0.18/2,kS1); | |
830 | TGeoVolume *volTG=new TGeoVolume("Glue1", tG, medGlue); | |
831 | volTG->SetLineColor(5); | |
832 | volTG->SetFillColor(5); | |
833 | ||
834 | for(int i=1;i<loop;i++){ //i<60;i++){ | |
852af72e | 835 | mechStavVol->AddNode(volTG,4*i+0, |
b705c75b | 836 | new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), |
837 | new TGeoRotation("volTG",-90,kAlpha,0))); | |
852af72e | 838 | mechStavVol->AddNode(volTG,4*i+1, |
b705c75b | 839 | new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+((4/n)*kL1*i)+kS1/2, //z-14.25+(2*kL1*i), |
840 | new TGeoRotation("volTG",90,kAlpha,0))); | |
852af72e | 841 | mechStavVol->AddNode(volTG,4*i+2, |
b705c75b | 842 | new TGeoCombiTrans(x+kWidth,y-0.16,z-kStaveLength/2+((4/n)*i*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
843 | new TGeoRotation("volTG",-90,-kAlpha,0))); | |
852af72e | 844 | mechStavVol->AddNode(volTG,4*i+3, |
b705c75b | 845 | new TGeoCombiTrans(x-kWidth,y-0.16,z-kStaveLength/2+(i*(4/n)*kL1)+kS1/2, //z-14.25+(i*2*kL1), |
846 | new TGeoRotation("volTG",-90,+kAlpha,0))); | |
847 | } | |
848 | ||
852af72e | 849 | TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta); |
b705c75b | 850 | TGeoVolume *volGlue=new TGeoVolume("Glue2", glue, medGlue); |
851 | volGlue->SetLineColor(5); | |
852 | volGlue->SetFillColor(5); | |
852af72e | 853 | //mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0))); |
854 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 855 | } |
856 | ||
857 | if (fBuildLevel < 1) { | |
858 | //Flex cable brown-28 TGeoBBox(width,thickness,length); | |
852af72e | 859 | TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta); |
b705c75b | 860 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
861 | volCable->SetLineColor(28); | |
862 | volCable->SetFillColor(28); | |
852af72e | 863 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 864 | } |
865 | ||
866 | // Done, return the stave structur | |
852af72e | 867 | return mechStavVol; |
b705c75b | 868 | } |
869 | ||
870 | ||
871 | //________________________________________________________________________ | |
852af72e | 872 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB1(const Double_t xsta, |
873 | const Double_t zsta, | |
b705c75b | 874 | const TGeoManager *mgr){ |
875 | // | |
876 | // Create the mechanical stave structure for Model 1 of TDR | |
877 | // | |
878 | // Input: | |
852af72e | 879 | // xsta : X length |
880 | // zsta : Z length | |
b705c75b | 881 | // mgr : the GeoManager (used only to get the proper material) |
882 | // | |
883 | // Output: | |
884 | // | |
885 | // Return: | |
886 | // | |
887 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
888 | // Updated: 26 Apr 2013 Mario Sitta | |
889 | // | |
890 | ||
891 | // Materials defined in AliITSUv1 | |
892 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
893 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
894 | ||
895 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
896 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
897 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
898 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
899 | ||
900 | // Local parameters | |
901 | Double_t kConeOutRadius = 0.15/2; | |
902 | // Double_t kConeInRadius = 0.1430/2; | |
852af72e | 903 | Double_t kStaveLength = zsta*2; |
904 | // Double_t kStaveWidth = xsta*2-kConeOutRadius*2; | |
905 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 906 | Double_t kWidth = kStaveWidth/4;//1/2 of kWidth |
907 | Double_t kStaveHeight = 0.3; | |
908 | Double_t kHeight = kStaveHeight/2; | |
909 | Double_t kAlpha = 90-33.;//90-30; | |
910 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
911 | Double_t kS1 = kWidth/TMath::Sin(kTheta); | |
912 | Double_t kL1 = kWidth/TMath::Tan(kTheta); | |
913 | Double_t kS2 = TMath::Sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2); | |
914 | Double_t kThe2 = TMath::ATan(kHeight/kS1); | |
915 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
916 | Int_t loop = (Int_t)((kStaveLength/(2*kL1))/2); | |
917 | ||
918 | ||
852af72e | 919 | TGeoVolume *mechStavVol = 0; |
b705c75b | 920 | |
921 | char volname[30]; | |
852af72e | 922 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 923 | |
924 | ||
925 | // detailed structure ++++++++++++++ | |
926 | Double_t z=0, y=-0.011+0.0150, x=0; | |
927 | ||
928 | // Polimide micro channels numbers | |
929 | Double_t yMC = y-kHeight+0.01; | |
930 | Int_t nb = (Int_t)(kStaveWidth/0.1)+1; | |
852af72e | 931 | Double_t xstaMC = (nb*0.1-0.08)/2; |
b705c75b | 932 | |
933 | ||
934 | if (fBuildLevel < 5) { | |
935 | // world (trapezoid) | |
936 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
937 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
938 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeight,0,-kConeOutRadius*2-0.07}; | |
939 | mechStruct->DefinePolygon(5,xv,yv); | |
940 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
941 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
942 | ||
852af72e | 943 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
944 | mechStavVol->SetLineColor(12); | |
945 | mechStavVol->SetFillColor(12); | |
946 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 947 | |
948 | // Polimide micro channels numbers | |
852af72e | 949 | TGeoBBox *tM0=new TGeoBBox(xstaMC, 0.005/2, zsta); |
b705c75b | 950 | TGeoVolume *volTM0=new TGeoVolume("MicroChanCover", tM0, medKapton); |
951 | volTM0->SetLineColor(35); | |
952 | volTM0->SetFillColor(35); | |
852af72e | 953 | mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x,-0.0125+yMC, z, new TGeoRotation("",0, 0, 0))); |
954 | mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x,+0.0125+yMC, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 955 | |
852af72e | 956 | TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta); |
b705c75b | 957 | TGeoVolume *volTM0b=new TGeoVolume("MicroChanWalls", tM0b, medKapton); |
958 | volTM0b->SetLineColor(35); | |
959 | volTM0b->SetFillColor(35); | |
960 | for (Int_t ib=0;ib<nb;ib++) { | |
852af72e | 961 | mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 962 | } |
963 | ||
964 | } | |
965 | ||
966 | if (fBuildLevel < 4) { | |
967 | // Water in Polimide micro channels | |
852af72e | 968 | TGeoBBox *water=new TGeoBBox(0.08/2, 0.02/2, zsta+0.1); |
b705c75b | 969 | TGeoVolume *volWater=new TGeoVolume("Water", water, medWater); |
970 | volWater->SetLineColor(4); | |
971 | volWater->SetFillColor(4); | |
972 | for (Int_t ib=0;ib<(nb-1);ib++) { | |
852af72e | 973 | mechStavVol->AddNode(volWater, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.06,yMC, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 974 | } |
975 | } | |
976 | ||
977 | if (fBuildLevel < 3) { | |
978 | //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length) | |
979 | Double_t filWidth = 0.04; | |
980 | Double_t filHeight= 0.02; | |
981 | TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,kS1); | |
982 | TGeoVolume *volT1=new TGeoVolume("CFRPBottom", t1, medM60J3K); | |
983 | volT1->SetLineColor(12); | |
984 | volT1->SetFillColor(12); | |
985 | for(int i=0;i<loop;i++){//i<30;i++){ | |
852af72e | 986 | mechStavVol->AddNode(volT1,4*i+0, |
b705c75b | 987 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1)+kS1/2, |
988 | new TGeoRotation("volT1",-90,kAlpha,0))); | |
852af72e | 989 | mechStavVol->AddNode(volT1,4*i+1, |
b705c75b | 990 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+(4*kL1*i)+kS1/2, |
991 | new TGeoRotation("volT1",90,kAlpha,0))); | |
852af72e | 992 | mechStavVol->AddNode(volT1,4*i+2, |
b705c75b | 993 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
994 | new TGeoRotation("volT1",-90,-kAlpha,0))); | |
852af72e | 995 | mechStavVol->AddNode(volT1,4*i+3, |
b705c75b | 996 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
997 | new TGeoRotation("volT1",-90,+kAlpha,0))); | |
998 | } | |
999 | ||
1000 | // Top filament CFRP black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1001 | TGeoBBox *t2=new TGeoBBox(kS2,filHeight/2,filWidth/2); | |
1002 | TGeoVolume *volT2=new TGeoVolume("CFRPTop", t2, medM60J3K); | |
1003 | volT2->SetLineColor(12); | |
1004 | volT2->SetFillColor(12); | |
1005 | for(int i=0;i<loop;i++){ //i<30;i++){ | |
852af72e | 1006 | mechStavVol->AddNode(volT2,4*i+0, |
b705c75b | 1007 | new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2, |
1008 | new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); | |
852af72e | 1009 | mechStavVol->AddNode(volT2,4*i+1, |
b705c75b | 1010 | new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*kL1)+kS1/2, |
1011 | new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); | |
852af72e | 1012 | mechStavVol->AddNode(volT2,4*i+2, |
b705c75b | 1013 | new TGeoCombiTrans(x+kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1014 | new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); | |
852af72e | 1015 | mechStavVol->AddNode(volT2,4*i+3, |
b705c75b | 1016 | new TGeoCombiTrans(x-kWidth,y+0.04+filHeight/2,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1017 | new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); | |
1018 | } | |
1019 | } | |
1020 | ||
1021 | if (fBuildLevel < 2) { | |
1022 | // Glue between filament and polimide micro channel | |
1023 | TGeoBBox *t3=new TGeoBBox(0.01/2,0.04,kS1); | |
1024 | TGeoVolume *volT3=new TGeoVolume("FilamentGlue", t3, medGlue); | |
1025 | volT3->SetLineColor(5); | |
1026 | volT3->SetFillColor(5); | |
1027 | for(int i=0;i<loop;i++){//i<30;i++){ | |
852af72e | 1028 | mechStavVol->AddNode(volT3,4*i+0, |
b705c75b | 1029 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, |
1030 | new TGeoRotation("volT1",-90,kAlpha,0))); | |
852af72e | 1031 | mechStavVol->AddNode(volT3,4*i+1, |
b705c75b | 1032 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+(4*kL1*i)+kS1/2, |
1033 | new TGeoRotation("volT1",90,kAlpha,0))); | |
852af72e | 1034 | mechStavVol->AddNode(volT3,4*i+2, |
b705c75b | 1035 | new TGeoCombiTrans(x+kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1036 | new TGeoRotation("volT1",-90,-kAlpha,0))); | |
852af72e | 1037 | mechStavVol->AddNode(volT3,4*i+3, |
b705c75b | 1038 | new TGeoCombiTrans(x-kWidth,y-kHeight+0.0325,z-kStaveLength/2+2*kL1+(i*4*kL1)+kS1/2, |
1039 | new TGeoRotation("volT1",-90,+kAlpha,0))); | |
1040 | } | |
1041 | ||
1042 | // Glue microchannel and sensor | |
852af72e | 1043 | TGeoBBox *glueM = new TGeoBBox(xsta, 0.01/2, zsta); |
b705c75b | 1044 | TGeoVolume *volGlueM=new TGeoVolume("MicroChanGlue", glueM, medGlue); |
1045 | volGlueM->SetLineColor(5); | |
1046 | volGlueM->SetFillColor(5); | |
852af72e | 1047 | mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x, y-0.16, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1048 | |
1049 | // Glue sensor and kapton | |
852af72e | 1050 | TGeoBBox *glue = new TGeoBBox(xsta, 0.005/2, zsta); |
b705c75b | 1051 | TGeoVolume *volGlue=new TGeoVolume("SensorGlue", glue, medGlue); |
1052 | volGlue->SetLineColor(5); | |
1053 | volGlue->SetFillColor(5); | |
852af72e | 1054 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1055 | } |
1056 | ||
1057 | if (fBuildLevel < 1) { | |
852af72e | 1058 | TGeoBBox *kapCable = new TGeoBBox(xsta, 0.01/2, zsta); |
b705c75b | 1059 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
1060 | volCable->SetLineColor(28); | |
1061 | volCable->SetFillColor(28); | |
852af72e | 1062 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.165-fSensorThick-0.005-0.01, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1063 | } |
1064 | ||
1065 | // Done, return the stave structur | |
852af72e | 1066 | return mechStavVol; |
b705c75b | 1067 | |
1068 | } | |
1069 | ||
1070 | //________________________________________________________________________ | |
852af72e | 1071 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB21(const Double_t xsta, |
1072 | const Double_t zsta, | |
b705c75b | 1073 | const TGeoManager *mgr){ |
1074 | // | |
1075 | // Create the mechanical stave structure for Model 2.1 of TDR | |
1076 | // | |
1077 | // Input: | |
852af72e | 1078 | // xsta : X length |
1079 | // zsta : Z length | |
b705c75b | 1080 | // mgr : the GeoManager (used only to get the proper material) |
1081 | // | |
1082 | // Output: | |
1083 | // | |
1084 | // Return: | |
1085 | // | |
1086 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
1087 | // Updated: 26 Apr 2013 Mario Sitta | |
1088 | // | |
1089 | ||
1090 | // Materials defined in AliITSUv1 | |
1091 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1092 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
1093 | ||
1094 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
1095 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
1096 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
1097 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
1098 | TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
1099 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
1100 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
1101 | ||
1102 | // Local parameters | |
1103 | Double_t kConeOutRadius =0.151384/2; | |
1104 | Double_t kConeInRadius = 0.145034/2; | |
852af72e | 1105 | Double_t kStaveLength = zsta; |
1106 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 1107 | Double_t kWidth = (kStaveWidth+0.005)/4; |
1108 | Double_t kStaveHeigth = 0.33;//0.33; | |
1109 | Double_t kHeight = (kStaveHeigth+0.025)/2; | |
1110 | Double_t kAlpha = 57; //56.31; | |
1111 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
1112 | Double_t kS1 = (kStaveWidth/4)/TMath::Sin(kTheta); | |
1113 | Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta); | |
1114 | Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(the2); | |
1115 | Double_t kThe2 = TMath::ATan(kHeight/kS1); | |
1116 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
1117 | // Double_t lay1 = 0.003157; | |
1118 | Double_t kLay1 = 0.003;//Amec carbon | |
1119 | // Double_t lay2 = 0.0043215;//C Fleece carbon | |
1120 | Double_t kLay2 = 0.002;//C Fleece carbon | |
1121 | Double_t kLay3 = 0.007;//K13D2U carbon | |
1122 | Int_t loop = (Int_t)(kStaveLength/(2*kL1)); | |
1123 | ||
1124 | ||
1125 | char volname[30]; | |
852af72e | 1126 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 1127 | |
1128 | Double_t z=0, y=-(kConeOutRadius+0.03)+0.0385, x=0; | |
1129 | ||
852af72e | 1130 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1131 | |
1132 | if (fBuildLevel < 5) { | |
1133 | // world (trapezoid) | |
1134 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
1135 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
1136 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,kStaveHeigth,0,-kConeOutRadius*2-0.07}; | |
1137 | mechStruct->DefinePolygon(5,xv,yv); | |
1138 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
1139 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
1140 | ||
852af72e | 1141 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
1142 | mechStavVol->SetLineColor(12); | |
1143 | mechStavVol->SetFillColor(12); | |
1144 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 1145 | |
1146 | //Pipe Kapton grey-35 | |
1147 | TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius,kConeInRadius,kConeOutRadius); | |
1148 | TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton); | |
1149 | volCone1->SetFillColor(35); | |
1150 | volCone1->SetLineColor(35); | |
852af72e | 1151 | mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z)); |
1152 | mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z)); | |
b705c75b | 1153 | } |
1154 | ||
1155 | if (fBuildLevel < 4) { | |
1156 | ||
1157 | TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius,kStaveLength); | |
1158 | TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater); | |
1159 | volCoolTubeW->SetFillColor(4); | |
1160 | volCoolTubeW->SetLineColor(4); | |
852af72e | 1161 | mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z)); |
1162 | mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z)); | |
b705c75b | 1163 | } |
1164 | ||
1165 | if (fBuildLevel < 3) { | |
1166 | //top fillament | |
1167 | // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1168 | TGeoBBox *t2=new TGeoBBox(kS2,0.02/2,0.04/2); //TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02); | |
1169 | TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K); | |
1170 | volT2->SetLineColor(12); | |
1171 | volT2->SetFillColor(12); | |
1172 | for(int i=0;i<loop;i++){// i<28;i++){ | |
852af72e | 1173 | mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); |
1174 | mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); | |
1175 | mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); | |
1176 | mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth,y+kHeight+(0.12/2)-0.014+0.007,z-kStaveLength+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); | |
1177 | // mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight-(0.12/2)+0.072,z+kStaveLength+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); | |
b705c75b | 1178 | |
1179 | } | |
1180 | ||
1181 | //wall side structure out | |
1182 | TGeoBBox *box4 = new TGeoBBox(0.03/2,0.12/2,kStaveLength-0.50); | |
1183 | TGeoVolume *plate4 = new TGeoVolume("WallOut",box4,medM60J3K); | |
1184 | plate4->SetFillColor(35); | |
1185 | plate4->SetLineColor(35); | |
852af72e | 1186 | mechStavVol->AddNode(plate4,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0))); |
1187 | mechStavVol->AddNode(plate4,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+(0.03/2),y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate4",0,0,0))); | |
b705c75b | 1188 | //wall side in |
1189 | TGeoBBox *box5 = new TGeoBBox(0.015/2,0.12/2,kStaveLength-0.50); | |
1190 | TGeoVolume *plate5 = new TGeoVolume("WallIn",box5,medM60J3K); | |
1191 | plate5->SetFillColor(12); | |
1192 | plate5->SetLineColor(12); | |
852af72e | 1193 | mechStavVol->AddNode(plate5,1,new TGeoCombiTrans(x+(2*kStaveWidth/4)-0.03-0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0))); |
1194 | mechStavVol->AddNode(plate5,2,new TGeoCombiTrans(x-(2*kStaveWidth/4)+0.03+0.015/2,y-0.0022-kConeOutRadius+0.12/2+0.007,z,new TGeoRotation("plate5",0,0,0))); | |
b705c75b | 1195 | |
1196 | //Amec Thermasol red-2 cover tube FGS300 | |
1197 | TGeoConeSeg *cons1 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius,kConeOutRadius+kLay1,kConeOutRadius,kConeOutRadius+kLay1,0,180); | |
1198 | TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003); | |
1199 | cone11->SetFillColor(2); | |
1200 | cone11->SetLineColor(2); | |
852af72e | 1201 | mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone11",0,0,0))); |
1202 | mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone11",0,0,0))); | |
b705c75b | 1203 | |
1204 | TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,kLay1/2,kStaveLength-0.50); | |
1205 | TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003); | |
1206 | plate2->SetFillColor(2); | |
1207 | plate2->SetLineColor(2); | |
852af72e | 1208 | mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate2",0,0,0))); |
b705c75b | 1209 | |
1210 | TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay1/2,kStaveLength-0.50); | |
1211 | TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003); | |
1212 | plate21->SetFillColor(2); | |
1213 | plate21->SetLineColor(2); | |
852af72e | 1214 | mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0))); |
1215 | mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(kLay1/2),y-kConeOutRadius+(kLay1/2),z,new TGeoRotation("plate21",0,0,0))); | |
b705c75b | 1216 | |
1217 | TGeoBBox *box22 = new TGeoBBox((kLay1/2),kConeOutRadius/2,kStaveLength-0.50); | |
1218 | TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003); | |
1219 | plate22->SetFillColor(2); | |
1220 | plate22->SetLineColor(2); | |
852af72e | 1221 | mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); |
1222 | mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1223 | mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1224 | mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(kLay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
b705c75b | 1225 | |
1226 | //C Fleece | |
1227 | TGeoConeSeg *cons2 = new TGeoConeSeg(kStaveLength-0.50,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,kConeOutRadius+kLay1,kConeOutRadius+kLay1+kLay2,0,180); | |
1228 | TGeoVolume *cone12 = new TGeoVolume("CFleecePipeCover",cons2,medCarbonFleece); | |
1229 | cone12->SetFillColor(28); | |
1230 | cone12->SetLineColor(28); | |
852af72e | 1231 | mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("Cone12",0,0,0))); |
1232 | mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("Cone12",0,0,0))); | |
b705c75b | 1233 | |
1234 | TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+kLay1)))/2,kLay2/2,kStaveLength-0.50); | |
1235 | TGeoVolume *plate3 = new TGeoVolume("CFleeceMiddle",box3,medCarbonFleece); | |
1236 | plate3->SetFillColor(28); | |
1237 | plate3->SetLineColor(28); | |
852af72e | 1238 | mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate3",0,0,0))); |
b705c75b | 1239 | |
1240 | TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-kLay1)/2,kLay2/2,kStaveLength-0.50); | |
1241 | TGeoVolume *plate31 = new TGeoVolume("CFleeceLeftRight",box31,medCarbonFleece); | |
1242 | plate31->SetFillColor(28); | |
1243 | plate31->SetLineColor(28); | |
852af72e | 1244 | mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0))); |
1245 | mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(0.75-0.25-kConeOutRadius-kLay1)/2,y-kConeOutRadius+kLay1+(kLay2/2),z,new TGeoRotation("plate31",0,0,0))); | |
b705c75b | 1246 | |
1247 | TGeoBBox *box32 = new TGeoBBox((kLay2/2),(kConeOutRadius-kLay1)/2,kStaveLength-0.50); | |
1248 | TGeoVolume *plate32 = new TGeoVolume("CFleeceVertical",box32,medCarbonFleece); | |
1249 | plate32->SetFillColor(28); | |
1250 | plate32->SetLineColor(28); | |
852af72e | 1251 | mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); |
1252 | mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1253 | mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+kLay1+(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1254 | mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-kLay1-(kLay2/2),y+(kLay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
b705c75b | 1255 | |
1256 | ||
1257 | //K13D2U carbon plate | |
1258 | TGeoBBox *box1 = new TGeoBBox(2*kWidth,kLay3/2,kStaveLength-0.50); | |
1259 | TGeoVolume *plate1 = new TGeoVolume("CarbonPlate",box1,medK13D2U2k); | |
1260 | plate1->SetFillColor(5); | |
1261 | plate1->SetLineColor(5); | |
852af72e | 1262 | mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(kLay3/2)),z,new TGeoRotation("plate1",0,0,0))); |
b705c75b | 1263 | |
1264 | //C Fleece bottom plate | |
1265 | TGeoBBox *box6 = new TGeoBBox(2*kWidth,kLay2/2,kStaveLength-0.50); | |
1266 | TGeoVolume *plate6 = new TGeoVolume("CFleeceBottom",box6,medCarbonFleece); | |
1267 | plate6->SetFillColor(2); | |
1268 | plate6->SetLineColor(2); | |
852af72e | 1269 | mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)),z,new TGeoRotation("plate1",0,0,0))); |
b705c75b | 1270 | |
1271 | ||
1272 | } | |
1273 | ||
1274 | if (fBuildLevel < 2) { | |
1275 | //Glue layers and kapton | |
852af72e | 1276 | TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, 0.005/2, zsta); |
b705c75b | 1277 | TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue); |
1278 | volGlue->SetLineColor(5); | |
1279 | volGlue->SetFillColor(5); | |
852af72e | 1280 | mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+(0.01/2)), z, new TGeoRotation("",0, 0, 0))); |
1281 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x,y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+(0.01/2)), z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1282 | } |
1283 | ||
1284 | if (fBuildLevel < 1) { | |
852af72e | 1285 | TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, 0.01/2, zsta); |
b705c75b | 1286 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
1287 | volCable->SetLineColor(28); | |
1288 | volCable->SetFillColor(28); | |
852af72e | 1289 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+kLay3+(kLay2/2)+0.01+fSensorThick+0.01+(0.01/2)), z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1290 | } |
1291 | ||
1292 | ||
1293 | // Done, return the stave structure | |
852af72e | 1294 | return mechStavVol; |
b705c75b | 1295 | |
1296 | } | |
1297 | // new model22 | |
1298 | //________________________________________________________________________ | |
852af72e | 1299 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB22(const Double_t xsta, |
1300 | const Double_t zsta, | |
b705c75b | 1301 | const TGeoManager *mgr){ |
1302 | // | |
1303 | // Create the mechanical stave structure for Model 2.2 of TDR | |
1304 | // | |
1305 | // Input: | |
852af72e | 1306 | // xsta : X length |
1307 | // zsta : Z length | |
b705c75b | 1308 | // mgr : the GeoManager (used only to get the proper material) |
1309 | // | |
1310 | // Output: | |
1311 | // | |
1312 | // Return: | |
1313 | // | |
1314 | // Created: 22 Mar 2013 Chinorat Kobdaj | |
1315 | // Updated: 26 Apr 2013 Mario Sitta | |
1316 | // Updated: 30 Apr 2013 Wanchaloem Poonsawat | |
1317 | // | |
1318 | ||
1319 | // Materials defined in AliITSUv1 | |
1320 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1321 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
1322 | ||
1323 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
1324 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
1325 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
1326 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
1327 | TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
1328 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
1329 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
1330 | ||
1331 | // Local parameters | |
d7ef241e | 1332 | Double_t kConeOutRadius =(0.1024+0.0025)/2;//0.107/2; |
1333 | Double_t kConeInRadius = 0.1024/2;//0.10105/2 | |
852af72e | 1334 | Double_t kStaveLength = zsta; |
1335 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 1336 | Double_t kWidth = (kStaveWidth)/4; |
1337 | Double_t kStaveHeight = 0.283;//0.33; | |
1338 | Double_t kHeight = (kStaveHeight)/2; | |
1339 | Double_t kAlpha = 57;//56.31; | |
1340 | Double_t kTheta = kAlpha*TMath::DegToRad(); | |
1341 | Double_t kS1 = ((kStaveWidth)/4)/TMath::Sin(kTheta); | |
1342 | Double_t kL1 = (kStaveWidth/4)/TMath::Tan(kTheta); | |
1343 | Double_t kS2 = sqrt(kHeight*kHeight + kS1*kS1);//TMath::Sin(kThe2); | |
1344 | Double_t kThe2 = TMath::ATan(kHeight/(0.375-0.036)); | |
1345 | Double_t kBeta = kThe2*TMath::RadToDeg(); | |
1346 | Double_t klay1 = 0.003;//Amec carbon | |
1347 | Double_t klay2 = 0.002;//C Fleece carbon | |
1348 | Double_t klay3 = 0.007;//CFplate K13D2U carbon | |
1349 | Double_t klay4 = 0.007;//GluekStaveLength/2 | |
1350 | Double_t klay5 = 0.01;//Flex cable | |
1351 | Double_t kTopVertexMaxWidth = 0.072; | |
1352 | Double_t kTopVertexHeight = 0.04; | |
1353 | Double_t kSideVertexMWidth = 0.052; | |
1354 | Double_t kSideVertexHeight = 0.11; | |
1355 | ||
1356 | ||
1357 | Int_t loop = (Int_t)(kStaveLength/(2*kL1)); | |
1358 | ||
1359 | char volname[30]; | |
852af72e | 1360 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 1361 | |
1362 | Double_t z=0, y=-(2*kConeOutRadius)+klay1+klay2+fSensorThick/2-0.0004, x=0; | |
1363 | ||
852af72e | 1364 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1365 | |
1366 | if (fBuildLevel < 5) { | |
1367 | // world (trapezoid) | |
1368 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
1369 | Double_t xv[6] = {kStaveWidth/2,kStaveWidth/2,0.012,-0.012,-kStaveWidth/2,-kStaveWidth/2}; | |
1370 | /* Double_t yv[6] = {-2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5), | |
1371 | 0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02, | |
1372 | -2*(kConeOutRadius+klay1+1.5*klay2+klay3+klay4+fSensorThick+klay5)}; // (kConeOutRadius*2)-0.0635 */ | |
dd49bd10 | 1373 | Double_t yv[6] = {-(kConeOutRadius*2)-0.07295,0-0.02,kStaveHeight+0.01,kStaveHeight+0.01,0-0.02,-(kConeOutRadius*2)-0.07295}; // (kConeOutRadius*2)-0.064 |
b705c75b | 1374 | mechStruct->DefinePolygon(6,xv,yv); |
1375 | mechStruct->DefineSection(0,-kStaveLength,0,0,1.); | |
1376 | mechStruct->DefineSection(1,kStaveLength,0,0,1.); | |
1377 | ||
852af72e | 1378 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
1379 | mechStavVol->SetLineColor(12); | |
1380 | mechStavVol->SetFillColor(12); | |
1381 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 1382 | |
1383 | //Polyimide Pipe Kapton grey-35 | |
1384 | TGeoCone *cone1 = new TGeoCone(kStaveLength,kConeInRadius,kConeOutRadius-0.0001,kConeInRadius,kConeOutRadius-0.0001); | |
1385 | TGeoVolume *volCone1= new TGeoVolume("PolyimidePipe", cone1, medKapton); | |
1386 | volCone1->SetFillColor(35); | |
1387 | volCone1->SetLineColor(35); | |
852af72e | 1388 | mechStavVol->AddNode(volCone1,1,new TGeoTranslation(x+0.25,y,z)); |
1389 | mechStavVol->AddNode(volCone1,2,new TGeoTranslation(x-0.25,y,z)); | |
b705c75b | 1390 | } |
1391 | ||
1392 | if (fBuildLevel < 4) { | |
1393 | TGeoTube *coolTubeW = new TGeoTube(0.,kConeInRadius-0.0001,kStaveLength); | |
1394 | TGeoVolume *volCoolTubeW= new TGeoVolume("Water", coolTubeW, medWater); | |
1395 | volCoolTubeW->SetFillColor(4); | |
1396 | volCoolTubeW->SetLineColor(4); | |
852af72e | 1397 | mechStavVol->AddNode(volCoolTubeW,0,new TGeoTranslation(x-0.25,y,z)); |
1398 | mechStavVol->AddNode(volCoolTubeW,1,new TGeoTranslation(x+0.25,y,z)); | |
b705c75b | 1399 | } |
1400 | ||
1401 | if (fBuildLevel < 3) { | |
1402 | //top fillament | |
1403 | // Top filament M60J black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1404 | TGeoBBox *t2=new TGeoBBox(kS2-0.028,0.02/2,0.02/2); //0.04/2//TGeoBBox *t2=new TGeoBBox(kS2,0.01,0.02);//kS2-0.03 old Config.C | |
1405 | TGeoVolume *volT2=new TGeoVolume("TopFilament", t2, medM60J3K); | |
1406 | volT2->SetLineColor(12); | |
1407 | volT2->SetFillColor(12); | |
1408 | for(int i=0;i<loop;i++){// i<28;i++){ | |
1409 | // 1) Front Left Top Filament | |
852af72e | 1410 | mechStavVol->AddNode(volT2,i*4+1,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,90-kBeta))); |
b705c75b | 1411 | // 2) Front Right Top Filament |
852af72e | 1412 | mechStavVol->AddNode(volT2,i*4+2,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,-90+kBeta))); |
b705c75b | 1413 | // 3) Back Left Top Filament |
852af72e | 1414 | mechStavVol->AddNode(volT2,i*4+3,new TGeoCombiTrans(x+kWidth+0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,-90+kAlpha,90-kBeta))); |
b705c75b | 1415 | // 4) Back Right Top Filament |
852af72e | 1416 | mechStavVol->AddNode(volT2,i*4+4,new TGeoCombiTrans(x-kWidth-0.0036,y+kHeight+0.01,z-kStaveLength+0.1+2*kL1+(i*4*kL1)+kS1/2, new TGeoRotation("volT2",90,90-kAlpha,-90+kBeta))); |
b705c75b | 1417 | } |
1418 | ||
1419 | //Vertex structure | |
1420 | ||
1421 | //top ver trd1 | |
1422 | TGeoTrd1 *trd1 = new TGeoTrd1(0,kTopVertexMaxWidth/2,kStaveLength,kTopVertexHeight/2); | |
1423 | TGeoVolume *ibdv = new TGeoVolume("TopVertex",trd1,medM60J3K); | |
1424 | ibdv->SetFillColor(12); | |
1425 | ibdv->SetLineColor(12); | |
852af72e | 1426 | mechStavVol->AddNode(ibdv,1,new TGeoCombiTrans(x,y+kStaveHeight+0.03,z,new TGeoRotation("ibdv",0.,-90,0)));//y+kStaveHeight+0.056 |
b705c75b | 1427 | |
1428 | //left trd2 | |
1429 | TGeoTrd1 *trd2 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2); | |
1430 | TGeoVolume *ibdv2 = new TGeoVolume("LeftVertex",trd2,medM60J3K); | |
1431 | ibdv2->SetFillColor(12); | |
1432 | ibdv2->SetLineColor(12); | |
8397c175 | 1433 | mechStavVol->AddNode(ibdv2,1,new TGeoCombiTrans(x+kStaveWidth/2-0.06,y-0.0348,z,new TGeoRotation("ibdv2",-103.3,90,0))); //x-kStaveWidth/2-0.09 old Config.C y-0.0355, |
b705c75b | 1434 | |
1435 | //right trd3 | |
1436 | TGeoTrd1 *trd3 = new TGeoTrd1(0,kSideVertexMWidth/2,kStaveLength, kSideVertexHeight/2); | |
1437 | TGeoVolume *ibdv3 = new TGeoVolume("RightVertex",trd3,medM60J3K); | |
1438 | ibdv3->SetFillColor(12); | |
1439 | ibdv3->SetLineColor(12); | |
8397c175 | 1440 | mechStavVol->AddNode(ibdv3,1,new TGeoCombiTrans(x-kStaveWidth/2+0.06,y-0.0348,z,new TGeoRotation("ibdv3",103.3,90,0))); //x-kStaveWidth/2+0.09 old Config.C |
b705c75b | 1441 | |
1442 | //Carbon Fleece | |
852af72e | 1443 | TGeoConeSeg *cons2 = new TGeoConeSeg(zsta,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,kConeOutRadius+klay1,kConeOutRadius+klay1+klay2,0,180); |
b705c75b | 1444 | TGeoVolume *cone12 = new TGeoVolume("CarbonFleecePipeCover",cons2,medCarbonFleece); |
1445 | cone12->SetFillColor(28); | |
1446 | cone12->SetLineColor(28); | |
852af72e | 1447 | mechStavVol->AddNode(cone12,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone12",0,0,0))); |
1448 | mechStavVol->AddNode(cone12,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone12",0,0,0))); | |
b705c75b | 1449 | |
852af72e | 1450 | TGeoBBox *box3 = new TGeoBBox((0.50-(2*(kConeOutRadius+klay1)))/2,klay2/2,zsta);//kStaveLength-0.50); |
b705c75b | 1451 | TGeoVolume *plate3 = new TGeoVolume("CarbonFleeceMiddle",box3,medCarbonFleece); |
1452 | plate3->SetFillColor(28); | |
1453 | plate3->SetLineColor(28); | |
852af72e | 1454 | mechStavVol->AddNode(plate3,1,new TGeoCombiTrans(x,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate3",0,0,0))); |
b705c75b | 1455 | |
852af72e | 1456 | TGeoBBox *box31 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,klay2/2,zsta); |
b705c75b | 1457 | TGeoVolume *plate31 = new TGeoVolume("CarbonFleeceLeftRight",box31,medCarbonFleece); |
1458 | plate31->SetFillColor(28); | |
1459 | plate31->SetLineColor(28); | |
852af72e | 1460 | mechStavVol->AddNode(plate31,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0))); |
1461 | mechStavVol->AddNode(plate31,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(0.75-0.25-kConeOutRadius-klay1)/2,y-kConeOutRadius+klay1+(klay2/2),z,new TGeoRotation("plate31",0,0,0))); | |
b705c75b | 1462 | |
852af72e | 1463 | TGeoBBox *box32 = new TGeoBBox((klay2/2),(kConeOutRadius-klay1)/2,zsta); |
b705c75b | 1464 | TGeoVolume *plate32 = new TGeoVolume("CarbonFleeceVertical",box32,medCarbonFleece); |
1465 | plate32->SetFillColor(28); | |
1466 | plate32->SetLineColor(28); | |
852af72e | 1467 | mechStavVol->AddNode(plate32,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); |
1468 | mechStavVol->AddNode(plate32,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1469 | mechStavVol->AddNode(plate32,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+klay1+(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
1470 | mechStavVol->AddNode(plate32,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-klay1-(klay2/2),y+(klay1-kConeOutRadius)/2,z,new TGeoRotation("plate32",0,0,0))); | |
b705c75b | 1471 | |
1472 | //Amec Thermasol red-2 cover tube FGS300 or Carbon Paper | |
852af72e | 1473 | TGeoConeSeg *cons1 = new TGeoConeSeg(zsta,kConeOutRadius,kConeOutRadius+klay1-0.0001,kConeOutRadius,kConeOutRadius+klay1-0.0001,0,180);//kConeOutRadius+klay1-0.0001 |
b705c75b | 1474 | TGeoVolume *cone11 = new TGeoVolume("ThermasolPipeCover",cons1,medFGS003); |
1475 | cone11->SetFillColor(2); | |
1476 | cone11->SetLineColor(2); | |
852af72e | 1477 | mechStavVol->AddNode(cone11,1,new TGeoCombiTrans(x+0.25,y,z,new TGeoRotation("cone11",0,0,0))); |
1478 | mechStavVol->AddNode(cone11,2,new TGeoCombiTrans(x-0.25,y,z,new TGeoRotation("cone11",0,0,0))); | |
b705c75b | 1479 | |
852af72e | 1480 | TGeoBBox *box2 = new TGeoBBox((0.50-(2*kConeOutRadius))/2,(klay1/2),zsta);//kStaveLength-0.50); |
b705c75b | 1481 | TGeoVolume *plate2 = new TGeoVolume("ThermasolMiddle",box2,medFGS003); |
1482 | plate2->SetFillColor(2); | |
1483 | plate2->SetLineColor(2); | |
852af72e | 1484 | mechStavVol->AddNode(plate2,1,new TGeoCombiTrans(x,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate2",0,0,0))); |
b705c75b | 1485 | |
852af72e | 1486 | TGeoBBox *box21 = new TGeoBBox((0.75-0.25-kConeOutRadius-klay1)/2+0.0025,(klay1/2),zsta); |
b705c75b | 1487 | TGeoVolume *plate21 = new TGeoVolume("ThermasolLeftRight",box21,medFGS003); |
1488 | plate21->SetFillColor(2); | |
1489 | plate21->SetLineColor(2); | |
852af72e | 1490 | mechStavVol->AddNode(plate21,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(0.75-0.25-kConeOutRadius)/2-(klay1/2)+0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0))); |
1491 | mechStavVol->AddNode(plate21,2,new TGeoCombiTrans(x-0.25-kConeOutRadius-(0.75-0.25-kConeOutRadius)/2+(klay1/2)-0.0025,y-kConeOutRadius+(klay1/2),z,new TGeoRotation("plate21",0,0,0))); | |
b705c75b | 1492 | |
852af72e | 1493 | TGeoBBox *box22 = new TGeoBBox((klay1/2),kConeOutRadius/2,zsta); |
b705c75b | 1494 | TGeoVolume *plate22 = new TGeoVolume("ThermasolVertical",box22,medFGS003); |
1495 | plate22->SetFillColor(2); | |
1496 | plate22->SetLineColor(2); | |
852af72e | 1497 | mechStavVol->AddNode(plate22,1,new TGeoCombiTrans(x+0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); |
1498 | mechStavVol->AddNode(plate22,2,new TGeoCombiTrans(x+0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1499 | mechStavVol->AddNode(plate22,3,new TGeoCombiTrans(x-0.25+kConeOutRadius+(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
1500 | mechStavVol->AddNode(plate22,4,new TGeoCombiTrans(x-0.25-kConeOutRadius-(klay1/2),y-kConeOutRadius/2,z,new TGeoRotation("plate22",0,0,0))); | |
b705c75b | 1501 | |
1502 | //K13D2U CF plate | |
852af72e | 1503 | TGeoBBox *box1 = new TGeoBBox(2*kWidth,(klay3)/2,zsta); |
b705c75b | 1504 | TGeoVolume *plate1 = new TGeoVolume("CFPlate",box1,medK13D2U2k); |
1505 | plate1->SetFillColor(5); | |
1506 | plate1->SetLineColor(5); | |
852af72e | 1507 | mechStavVol->AddNode(plate1,1,new TGeoCombiTrans(x,y-(kConeOutRadius+(klay3/2)),z,new TGeoRotation("plate1",0,0,0))); |
b705c75b | 1508 | |
1509 | //C Fleece bottom plate | |
852af72e | 1510 | TGeoBBox *box6 = new TGeoBBox(2*kWidth,(klay2)/2,zsta); |
b705c75b | 1511 | TGeoVolume *plate6 = new TGeoVolume("CarbonFleeceBottom",box6,medCarbonFleece); |
1512 | plate6->SetFillColor(2); | |
1513 | plate6->SetLineColor(2); | |
852af72e | 1514 | mechStavVol->AddNode(plate6,1,new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+(klay2/2)),z,new TGeoRotation("plate6",0,0,0))); |
b705c75b | 1515 | |
1516 | } | |
1517 | if (fBuildLevel < 2) { | |
1518 | //Glue klayers and kapton | |
852af72e | 1519 | TGeoBBox *glue = new TGeoBBox(kStaveWidth/2, (klay4)/2, zsta); |
b705c75b | 1520 | TGeoVolume *volGlue=new TGeoVolume("Glue", glue, medGlue); |
1521 | volGlue->SetLineColor(5); | |
1522 | volGlue->SetFillColor(5); | |
852af72e | 1523 | // mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4/2)), z, new TGeoRotation("",0, 0, 0))); |
1524 | mechStavVol->AddNode(volGlue, 0, new TGeoCombiTrans(x,y-(kConeOutRadius+klay3+klay2+(klay4)/2)+0.00005, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1525 | } |
1526 | ||
1527 | if (fBuildLevel < 1) { | |
1528 | //Flex Cable or Bus | |
852af72e | 1529 | TGeoBBox *kapCable = new TGeoBBox(kStaveWidth/2, klay5/2, zsta);//klay5/2 |
b705c75b | 1530 | TGeoVolume *volCable=new TGeoVolume("FlexCable", kapCable, medFlexCable); |
1531 | volCable->SetLineColor(28); | |
1532 | volCable->SetFillColor(28); | |
852af72e | 1533 | // mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+fSensorThick+(klay5)/2)+0.0002, z, new TGeoRotation("",0, 0, 0))); |
dd49bd10 | 1534 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-(kConeOutRadius+klay3+klay2+klay4+(klay5)/2), z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1535 | } |
1536 | // Done, return the stave structe | |
852af72e | 1537 | return mechStavVol; |
b705c75b | 1538 | } |
1539 | ||
1540 | // model3 | |
1541 | //________________________________________________________________________ | |
852af72e | 1542 | TGeoVolume* AliITSUv1Layer::CreateStaveModelInnerB3(const Double_t xsta, |
1543 | const Double_t zsta, | |
b705c75b | 1544 | const TGeoManager *mgr){ |
1545 | // | |
1546 | // Create the mechanical stave structure for Model 3 of TDR | |
1547 | // | |
1548 | // Input: | |
852af72e | 1549 | // xsta : X length |
1550 | // zsta : Z length | |
b705c75b | 1551 | // mgr : the GeoManager (used only to get the proper material) |
1552 | // | |
1553 | // Output: | |
1554 | // | |
1555 | // Return: | |
1556 | // | |
1557 | // Created: 28 May 2013 Chinorat Kobdaj | |
1558 | // Updated: Mario Sitta | |
1559 | // Updated: Wanchaloem Poonsawat | |
1560 | // | |
1561 | ||
1562 | // Materials defined in AliITSUv1 | |
1563 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1564 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); | |
1565 | ||
1566 | TGeoMedium *medM60J3K = mgr->GetMedium("ITS_M60J3K$"); | |
1567 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); | |
1568 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
1569 | TGeoMedium *medFlexCable = mgr->GetMedium("ITS_FLEXCABLE$"); | |
1570 | //TGeoMedium *medK13D2U2k = mgr->GetMedium("ITS_K13D2U2k$"); | |
1571 | //TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); | |
1572 | //TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
1573 | ||
1574 | // Local parameters | |
1575 | Double_t kConeOutRadius = 0.15/2; | |
852af72e | 1576 | Double_t kStaveLength = zsta*2; |
1577 | Double_t kStaveWidth = xsta*2; | |
b705c75b | 1578 | Double_t w = kStaveWidth/4;//1/2 of W |
1579 | Double_t staveHeight = 0.3; | |
1580 | Double_t h = staveHeight/2; | |
1581 | Double_t alpha = 90-33.;//90-30; | |
1582 | Double_t the1 = alpha*TMath::DegToRad(); | |
1583 | Double_t s1 = w/TMath::Sin(the1); | |
1584 | Double_t l = w/TMath::Tan(the1); | |
1585 | Double_t s2 = TMath::Sqrt(h*h + s1*s1);//TMath::Sin(the2); | |
1586 | Double_t the2 = TMath::ATan(h/s1); | |
1587 | Double_t beta = the2*TMath::RadToDeg(); | |
1588 | Double_t klay4 = 0.007; //Glue | |
1589 | Double_t klay5 = 0.01; //Flexcable | |
1590 | Int_t loop = (Int_t)((kStaveLength/(2*l))/2); | |
1591 | Double_t hh = 0.01; | |
1592 | Double_t ang1 = 0*TMath::DegToRad(); | |
1593 | Double_t ang2 = 0*TMath::DegToRad(); | |
1594 | Double_t ang3 = 0*TMath::DegToRad(); | |
852af72e | 1595 | Int_t chips = 4; |
b705c75b | 1596 | Double_t headWidth=0.25; |
852af72e | 1597 | Double_t smcLength=kStaveLength/chips-2*headWidth;//6.25; |
b705c75b | 1598 | Double_t smcWidth=kStaveWidth; |
1599 | Double_t smcSide1Thick=0.03; | |
1600 | Double_t vaporThick=0.032; | |
1601 | Double_t liquidThick=0.028; | |
1602 | Double_t smcSide2Thick=0.01; | |
1603 | Double_t smcSide3Thick=0.0055; | |
1604 | Double_t smcSide4Thick=0.0095; | |
1605 | Double_t smcSide5Thick=0.0075; | |
1606 | Double_t smcSpace=0.01; | |
1607 | ||
1608 | ||
1609 | char volname[30]; | |
852af72e | 1610 | snprintf(volname, 30, "%s%d_StaveStruct", AliITSUGeomTGeo::GetITSStavePattern(), fLayerNumber); |
b705c75b | 1611 | |
1612 | // detailed structure ++++++++++++++ | |
1613 | Double_t z=0, y=0-0.007, x=0; | |
1614 | ||
1615 | // Polimide micro channels numbers | |
1616 | Double_t yMC = y-h+0.01; | |
1617 | Int_t nb = (Int_t)(kStaveWidth/0.1)+1; | |
852af72e | 1618 | Double_t xstaMC = (nb*0.1-0.08)/2; |
b705c75b | 1619 | |
1620 | ||
852af72e | 1621 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1622 | if (fBuildLevel < 5) { |
1623 | // world (trapezoid) | |
1624 | TGeoXtru *mechStruct = new TGeoXtru(2); //z sections | |
1625 | Double_t xv[5] = {kStaveWidth/2+0.1,kStaveWidth/2+0.1,0,-kStaveWidth/2-0.1,-kStaveWidth/2-0.1}; | |
1626 | Double_t yv[5] = {-kConeOutRadius*2-0.07,0,staveHeight,0,-kConeOutRadius*2-0.07}; | |
1627 | mechStruct->DefinePolygon(5,xv,yv); | |
1628 | mechStruct->DefineSection(0,-kStaveLength-0.1,0,0,1.); | |
1629 | mechStruct->DefineSection(1,kStaveLength+0.1,0,0,1.); | |
852af72e | 1630 | mechStavVol = new TGeoVolume(volname, mechStruct, medAir); |
1631 | mechStavVol->SetLineColor(12); | |
1632 | mechStavVol->SetFillColor(12); | |
1633 | mechStavVol->SetVisibility(kTRUE); | |
b705c75b | 1634 | |
1635 | // Silicon micro channels numbers | |
1636 | ||
1637 | TGeoBBox *tM0a=new TGeoBBox(smcWidth/2, 0.003/2, headWidth/2); | |
1638 | TGeoVolume *volTM0a=new TGeoVolume("microChanTop1", tM0a, medKapton); | |
1639 | volTM0a->SetLineColor(35); | |
1640 | volTM0a->SetFillColor(35); | |
1641 | ||
852af72e | 1642 | for(Int_t mo=1; mo<=chips; mo++) { |
1643 | mechStavVol->AddNode(volTM0a, 0, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3))); | |
1644 | mechStavVol->AddNode(volTM0a, 1, new TGeoCombiTrans(x,yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3))); | |
b705c75b | 1645 | } |
1646 | TGeoBBox *tM0c=new TGeoBBox(0.3/2, 0.003/2,smcLength/2); | |
1647 | TGeoVolume *volTM0c=new TGeoVolume("microChanTop2", tM0c, medKapton); | |
1648 | volTM0c->SetLineColor(35); | |
1649 | volTM0c->SetFillColor(35); | |
852af72e | 1650 | for(Int_t mo=1; mo<=chips; mo++) { |
1651 | mechStavVol->AddNode(volTM0c, 0, new TGeoCombiTrans(x+(smcWidth/2)-(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3))); | |
1652 | mechStavVol->AddNode(volTM0c, 1, new TGeoCombiTrans(x-(smcWidth/2)+(0.3/2),yMC+0.03, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1653 | } |
1654 | TGeoBBox *tM0c1=new TGeoBBox(0.2225/2, 0.003/2,smcLength/2); | |
1655 | TGeoVolume *volTM0c1=new TGeoVolume("microChanBot1", tM0c1, medKapton); | |
1656 | volTM0c1->SetLineColor(6); | |
1657 | volTM0c1->SetFillColor(6); | |
852af72e | 1658 | for(Int_t mo=1; mo<=chips; mo++) { |
1659 | mechStavVol->AddNode(volTM0c1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1660 | mechStavVol->AddNode(volTM0c1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+(0.2225/2),yMC+0.03-hh-(0.003), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1661 | } |
1662 | TGeoBBox *tM0c2=new TGeoBBox(0.072/2, 0.003/2,smcLength/2); | |
1663 | TGeoVolume *volTM0c2=new TGeoVolume("microChanBot2", tM0c2, medKapton); | |
1664 | volTM0c2->SetLineColor(35); | |
1665 | volTM0c2->SetFillColor(35); | |
852af72e | 1666 | for(Int_t mo=1; mo<=chips; mo++) { |
1667 | mechStavVol->AddNode(volTM0c2, 0, new TGeoCombiTrans(x+smcWidth/2-(0.072/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1668 | } |
1669 | TGeoBBox *tM0c2r=new TGeoBBox(0.068/2, 0.003/2,smcLength/2); | |
1670 | TGeoVolume *volTM0c2r=new TGeoVolume("microChanBot3", tM0c2r, medKapton); | |
1671 | volTM0c2r->SetLineColor(35); | |
1672 | volTM0c2r->SetFillColor(35); | |
852af72e | 1673 | for(Int_t mo=1; mo<=chips; mo++) { |
1674 | mechStavVol->AddNode(volTM0c2r, 0, new TGeoCombiTrans(x-smcWidth/2+(0.068/2),yMC+0.03-(0.035+0.0015)-(0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1675 | } |
1676 | TGeoBBox *tM0d=new TGeoBBox(smcSide1Thick/2, 0.035/2,smcLength/2); | |
1677 | TGeoVolume *volTM0d=new TGeoVolume("microChanSide1", tM0d, medKapton); | |
1678 | volTM0d->SetLineColor(12); | |
1679 | volTM0d->SetFillColor(12); | |
852af72e | 1680 | for(Int_t mo=1; mo<=chips; mo++) { |
1681 | mechStavVol->AddNode(volTM0d, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1682 | mechStavVol->AddNode(volTM0d, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1683 | } |
1684 | ||
1685 | TGeoBBox *tM0d1=new TGeoBBox(smcSide2Thick/2, 0.035/2,smcLength/2); | |
1686 | TGeoVolume *volTM0d1=new TGeoVolume("microChanSide2", tM0d1, medKapton); | |
1687 | volTM0d1->SetLineColor(12); | |
1688 | volTM0d1->SetFillColor(12); | |
852af72e | 1689 | for(Int_t mo=1; mo<=chips; mo++) { |
1690 | mechStavVol->AddNode(volTM0d1, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1691 | mechStavVol->AddNode(volTM0d1, 1, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick/2),yMC+0.03-(0.003+0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1692 | } |
1693 | TGeoBBox *tM0d2=new TGeoBBox(smcSide3Thick/2, (hh+0.003)/2, smcLength/2); | |
1694 | TGeoVolume *volTM0d2=new TGeoVolume("microChanSide3", tM0d2, medKapton); | |
1695 | volTM0d2->SetLineColor(12); | |
1696 | volTM0d2->SetFillColor(12); | |
852af72e | 1697 | for(Int_t mo=1; mo<=chips; mo++) { |
1698 | mechStavVol->AddNode(volTM0d2, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1699 | } |
1700 | TGeoBBox *tM0d2r=new TGeoBBox(smcSide4Thick/2, (hh+0.003)/2, smcLength/2); | |
1701 | TGeoVolume *volTM0d2r=new TGeoVolume("microChanSide4", tM0d2r, medKapton); | |
1702 | volTM0d2r->SetLineColor(12); | |
1703 | volTM0d2r->SetFillColor(12); | |
852af72e | 1704 | for(Int_t mo=1; mo<=chips; mo++) { |
1705 | mechStavVol->AddNode(volTM0d2r, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick/2),yMC+0.03-(0.003+hh+0.003)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1706 | } |
1707 | TGeoBBox *tM0e=new TGeoBBox(smcSide5Thick/2, hh/2,smcLength/2); | |
1708 | TGeoVolume *volTM0e=new TGeoVolume("microChanSide5", tM0e, medKapton); | |
1709 | volTM0e->SetLineColor(12); | |
1710 | volTM0e->SetFillColor(12); | |
852af72e | 1711 | for(Int_t mo=1; mo<=chips; mo++) { |
b705c75b | 1712 | for (Int_t ie=0;ie<11;ie++) { |
852af72e | 1713 | mechStavVol->AddNode(volTM0e, 0, new TGeoCombiTrans(x-(ie*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace-(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); |
1714 | mechStavVol->AddNode(volTM0e, 1, new TGeoCombiTrans(x+(ie*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(liquidThick)+(smcSide2Thick)+(smcSide4Thick)+smcSpace+(smcSide5Thick/2),yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1715 | } |
1716 | } | |
1717 | ||
1718 | TGeoBBox *tM0f=new TGeoBBox(0.02/2, hh/2, smcLength/2); | |
1719 | TGeoVolume *volTM0f=new TGeoVolume("microChanTop3", tM0f, medKapton); | |
1720 | //Double_t smcChannels=12; | |
1721 | Double_t smcCloseWallvapor=smcWidth/2-smcSide1Thick-vaporThick-smcSide2Thick-smcSide3Thick-12*smcSpace-11*smcSide5Thick; | |
1722 | Double_t smcCloseWallliquid=smcWidth/2-smcSide1Thick-liquidThick-smcSide2Thick-smcSide4Thick-12*smcSpace-11*smcSide5Thick; | |
1723 | volTM0f->SetLineColor(12); | |
1724 | volTM0f->SetFillColor(12); | |
852af72e | 1725 | for(Int_t mo=1; mo<=chips; mo++) { |
1726 | mechStavVol->AddNode(volTM0f, 0, new TGeoCombiTrans(x+smcCloseWallvapor-(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1727 | mechStavVol->AddNode(volTM0f, 1, new TGeoCombiTrans(x-smcCloseWallliquid+(0.02)/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1728 | } |
1729 | //Head(back) microchannel | |
1730 | ||
1731 | TGeoBBox *tM0hb=new TGeoBBox(smcWidth/2, 0.025/2, headWidth/2); | |
1732 | TGeoVolume *volTM0hb=new TGeoVolume("microChanHeadBackBottom1", tM0hb, medKapton); | |
1733 | volTM0hb->SetLineColor(4); | |
1734 | volTM0hb->SetFillColor(4); | |
852af72e | 1735 | for(Int_t mo=1; mo<=chips; mo++) { |
1736 | mechStavVol->AddNode(volTM0hb, 0, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
1737 | mechStavVol->AddNode(volTM0hb, 1, new TGeoCombiTrans(x,yMC+0.03-0.0145-(0.025)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(headWidth/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1738 | } |
1739 | TGeoBBox *tM0h1=new TGeoBBox(smcWidth/2, 0.013/2, 0.05/2); | |
1740 | TGeoVolume *volTM0h1=new TGeoVolume("microChanHeadBackBottom2", tM0h1, medKapton); | |
1741 | volTM0h1->SetLineColor(5); | |
1742 | volTM0h1->SetFillColor(5); | |
852af72e | 1743 | for(Int_t mo=1; mo<=chips; mo++) { |
1744 | mechStavVol->AddNode(volTM0h1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-headWidth+(0.05/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1745 | } |
1746 | TGeoBBox *tM0h2=new TGeoBBox(smcWidth/2, 0.003/2, 0.18/2); | |
1747 | TGeoVolume *volTM0h2=new TGeoVolume("microChanHeadBackBottom7", tM0h2, medKapton); | |
1748 | volTM0h2->SetLineColor(6); | |
1749 | volTM0h2->SetFillColor(6); | |
852af72e | 1750 | for(Int_t mo=1; mo<=chips; mo++) { |
1751 | mechStavVol->AddNode(volTM0h2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-0.02-(0.18/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1752 | } |
1753 | TGeoBBox *tM0h3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2); | |
1754 | TGeoVolume *volTM0h3=new TGeoVolume("microChanHeadBackBottom3", tM0h3, medKapton); | |
1755 | volTM0h3->SetLineColor(5); | |
1756 | volTM0h3->SetFillColor(5); | |
852af72e | 1757 | for(Int_t mo=1; mo<=chips; mo++) { |
1758 | mechStavVol->AddNode(volTM0h3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth-smcLength/2-(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1759 | } |
1760 | TGeoBBox *tM0b1=new TGeoBBox(smcWidth/2, 0.013/2, 0.03/2); | |
1761 | TGeoVolume *volTM0b1=new TGeoVolume("microChanHeadBackBottom4", tM0b1, medKapton); | |
1762 | volTM0b1->SetLineColor(5); | |
1763 | volTM0b1->SetFillColor(5); | |
852af72e | 1764 | for(Int_t mo=1; mo<=chips; mo++) { |
1765 | mechStavVol->AddNode(volTM0b1, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+headWidth-(0.03/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1766 | } |
1767 | TGeoBBox *tM0b2=new TGeoBBox(smcWidth/2, 0.003/2, 0.2/2); | |
1768 | TGeoVolume *volTM0b2=new TGeoVolume("microChanHeadBackBottom5", tM0b2, medKapton); | |
1769 | volTM0b2->SetLineColor(6); | |
1770 | volTM0b2->SetFillColor(6); | |
852af72e | 1771 | for(Int_t mo=1; mo<=chips; mo++) { |
1772 | mechStavVol->AddNode(volTM0b2, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-0.01-(0.003/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+0.02+(0.2/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1773 | } |
1774 | TGeoBBox *tM0b3=new TGeoBBox(smcWidth/2, 0.013/2, 0.02/2); | |
1775 | TGeoVolume *volTM0b3=new TGeoVolume("microChanHeadBackBottom6", tM0b3, medKapton); | |
1776 | volTM0b3->SetLineColor(5); | |
1777 | volTM0b3->SetFillColor(5); | |
852af72e | 1778 | for(Int_t mo=1; mo<=chips; mo++) { |
1779 | mechStavVol->AddNode(volTM0b3, 0, new TGeoCombiTrans(x,yMC+0.03-0.0015-(0.013/2), z+(mo-3)*kStaveLength/4+smcLength/2+headWidth+smcLength/2+(0.02/2), new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1780 | } |
1781 | ||
852af72e | 1782 | TGeoBBox *tM0b=new TGeoBBox(0.02/2, 0.02/2, zsta); |
b705c75b | 1783 | TGeoVolume *volTM0b=new TGeoVolume("microChanWalls", tM0b, medKapton); |
1784 | volTM0b->SetLineColor(35); | |
1785 | volTM0b->SetFillColor(35); | |
1786 | for (Int_t ib=0;ib<nb;ib++) { | |
852af72e | 1787 | //mechStavVol->AddNode(volTM0b, ib, new TGeoCombiTrans(x+ib*0.1-xstaMC+0.01,yMC, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1788 | } |
1789 | ||
1790 | } | |
1791 | ||
1792 | if (fBuildLevel < 4) { | |
1793 | ||
1794 | //**********cooling inlet outlet | |
1795 | ||
1796 | TGeoBBox *tM0dv=new TGeoBBox(vaporThick/2, 0.035/2,smcLength/2); | |
1797 | TGeoVolume *volTM0dv=new TGeoVolume("microChanVapor", tM0dv, medWater); | |
1798 | volTM0dv->SetLineColor(2); | |
1799 | volTM0dv->SetFillColor(2); | |
852af72e | 1800 | for(Int_t mo=1; mo<=chips; mo++) { |
1801 | mechStavVol->AddNode(volTM0dv, 0, new TGeoCombiTrans(x+smcWidth/2-(smcSide1Thick)-(vaporThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1802 | } |
1803 | TGeoBBox *tM0dl=new TGeoBBox(liquidThick/2, 0.035/2,smcLength/2); | |
1804 | TGeoVolume *volTM0dl=new TGeoVolume("microChanLiquid", tM0dl, medWater); | |
1805 | volTM0dl->SetLineColor(3); | |
1806 | volTM0dl->SetFillColor(3); | |
852af72e | 1807 | for(Int_t mo=1; mo<=chips; mo++) { |
1808 | mechStavVol->AddNode(volTM0dl, 0, new TGeoCombiTrans(x-smcWidth/2+(smcSide1Thick)+(liquidThick/2),yMC+0.03-0.0015-(0.035)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1809 | } |
1810 | // small cooling fluid now using water wait for freeon value | |
1811 | TGeoBBox *tM0dlq=new TGeoBBox(smcSpace/2, hh/2,smcLength/2); | |
1812 | TGeoVolume *volTM0dlq=new TGeoVolume("smallLiquid", tM0dlq, medWater); | |
1813 | volTM0dlq->SetLineColor(3); | |
1814 | volTM0dlq->SetFillColor(3); | |
1815 | TGeoBBox *tM0dvp=new TGeoBBox(smcSpace/2, hh/2,smcLength/2); | |
1816 | TGeoVolume *volTM0dvp=new TGeoVolume("microChanVapor", tM0dvp, medWater); | |
1817 | volTM0dvp->SetLineColor(2); | |
1818 | volTM0dvp->SetFillColor(2); | |
852af72e | 1819 | for(Int_t mo=1; mo<=chips; mo++) { |
b705c75b | 1820 | for (Int_t is=0;is<12;is++) { |
852af72e | 1821 | mechStavVol->AddNode(volTM0dlq, 0, new TGeoCombiTrans(x+(is*(smcSpace+smcSide5Thick))-smcWidth/2+(smcSide1Thick)+(vaporThick)+(smcSide2Thick)+(smcSide3Thick)+smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); |
1822 | mechStavVol->AddNode(volTM0dvp, 1, new TGeoCombiTrans(x-(is*(smcSpace+smcSide5Thick))+smcWidth/2-(smcSide1Thick)-(vaporThick)-(smcSide2Thick)-(smcSide3Thick)-smcSpace/2,yMC+0.03-(0.003+hh)/2, z+(mo-3)*kStaveLength/4+smcLength/2+headWidth, new TGeoRotation("",ang1, ang2, ang3)));//("",0, 0, 0))); | |
b705c75b | 1823 | } |
1824 | } | |
1825 | ||
1826 | //************* | |
1827 | ||
1828 | } | |
1829 | ||
1830 | if (fBuildLevel < 3) { | |
1831 | ||
1832 | //Bottom filament CFRP black-12 Carbon structure TGeoBBox (thickness,width,length) | |
1833 | ||
1834 | Double_t filWidth = 0.04; | |
1835 | Double_t filHeight= 0.02; | |
1836 | TGeoBBox *t1=new TGeoBBox(filHeight/2,filWidth/2,s1); | |
1837 | TGeoVolume *volT1=new TGeoVolume("bottomFilament", t1, medM60J3K); | |
1838 | volT1->SetLineColor(12); | |
1839 | volT1->SetFillColor(12); | |
1840 | for(int i=0;i<loop;i++){//i<30;i++){ | |
852af72e | 1841 | mechStavVol->AddNode(volT1,4*i+0, |
b705c75b | 1842 | new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, |
1843 | new TGeoRotation("volT1",-90,alpha,0))); | |
852af72e | 1844 | mechStavVol->AddNode(volT1,4*i+1, |
b705c75b | 1845 | new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+(4*l*i)+s1/2, |
1846 | new TGeoRotation("volT1",90,alpha,0))); | |
852af72e | 1847 | mechStavVol->AddNode(volT1,4*i+2, |
b705c75b | 1848 | new TGeoCombiTrans(x+w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1849 | new TGeoRotation("volT1",-90,-alpha,0))); | |
852af72e | 1850 | mechStavVol->AddNode(volT1,4*i+3, |
b705c75b | 1851 | new TGeoCombiTrans(x-w,y-h+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1852 | new TGeoRotation("volT1",-90,+alpha,0))); | |
1853 | } | |
1854 | ||
1855 | // Top filament CERP black-12 Carbon structure TGeoBBox (length,thickness,width) | |
1856 | ||
1857 | TGeoBBox *t2=new TGeoBBox(s2,filHeight/2,filWidth/2); | |
1858 | TGeoVolume *volT2=new TGeoVolume("topFilament", t2, medM60J3K); | |
1859 | volT2->SetLineColor(12); | |
1860 | volT2->SetFillColor(12); | |
1861 | for(int i=0;i<loop;i++){ //i<30;i++){ | |
852af72e | 1862 | mechStavVol->AddNode(volT2,4*i+0, |
b705c75b | 1863 | new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2, |
1864 | new TGeoRotation("volT2",90,90-alpha,90-beta))); | |
852af72e | 1865 | mechStavVol->AddNode(volT2,4*i+1, |
b705c75b | 1866 | new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+(i*4*l)+s1/2, |
1867 | new TGeoRotation("volT2",90,-90+alpha,-90+beta))); | |
852af72e | 1868 | mechStavVol->AddNode(volT2,4*i+2, |
b705c75b | 1869 | new TGeoCombiTrans(x+w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1870 | new TGeoRotation("volT2",90,-90+alpha,90-beta))); | |
852af72e | 1871 | mechStavVol->AddNode(volT2,4*i+3, |
b705c75b | 1872 | new TGeoCombiTrans(x-w,y+0.04+filHeight/2,z-kStaveLength/2+2*l+(i*4*l)+s1/2, |
1873 | new TGeoRotation("volT2",90,90-alpha,-90+beta))); | |
1874 | } | |
1875 | } | |
1876 | ||
1877 | if (fBuildLevel < 2) { | |
1878 | ||
1879 | // Glue Filament and Silicon MicroChannel | |
852af72e | 1880 | TGeoBBox *tM0=new TGeoBBox(xstaMC/5, klay4/2, zsta); |
b705c75b | 1881 | TGeoVolume *volTM0=new TGeoVolume("glueFM", tM0,medGlue ); |
1882 | volTM0->SetLineColor(5); | |
1883 | volTM0->SetFillColor(5); | |
852af72e | 1884 | mechStavVol->AddNode(volTM0, 0, new TGeoCombiTrans(x-xsta/2-0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0))); |
1885 | mechStavVol->AddNode(volTM0, 1, new TGeoCombiTrans(x+xsta/2+0.25,0.03+yMC, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1886 | |
1887 | ||
1888 | // Glue microchannel and sensor | |
852af72e | 1889 | TGeoBBox *glueM = new TGeoBBox(xstaMC/5, klay4/2, zsta); |
b705c75b | 1890 | TGeoVolume *volGlueM=new TGeoVolume("glueMS", glueM, medGlue); |
1891 | volGlueM->SetLineColor(5); | |
1892 | volGlueM->SetFillColor(5); | |
852af72e | 1893 | mechStavVol->AddNode(volGlueM, 0, new TGeoCombiTrans(x-xsta/2-0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0))); |
1894 | mechStavVol->AddNode(volGlueM, 1, new TGeoCombiTrans(x+xsta/2+0.25,yMC-0.01, z, new TGeoRotation("",0, 0, 0))); | |
b705c75b | 1895 | |
1896 | // Glue sensor and kapton | |
852af72e | 1897 | TGeoBBox *glue = new TGeoBBox(xsta, klay4/2, zsta); |
b705c75b | 1898 | TGeoVolume *volGlue=new TGeoVolume("glueSensorBus", glue, medGlue); |
1899 | volGlue->SetLineColor(5); | |
1900 | volGlue->SetFillColor(5); | |
852af72e | 1901 | mechStavVol->AddNode(volGlue, 1, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4/2, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1902 | } |
1903 | ||
1904 | if (fBuildLevel < 1) { | |
852af72e | 1905 | TGeoBBox *kapCable = new TGeoBBox(xsta, klay5/2, zsta); |
b705c75b | 1906 | TGeoVolume *volCable=new TGeoVolume("Flexcable", kapCable, medFlexCable); |
1907 | volCable->SetLineColor(28); | |
1908 | volCable->SetFillColor(28); | |
852af72e | 1909 | mechStavVol->AddNode(volCable, 0, new TGeoCombiTrans(x, y-0.154-fSensorThick-klay4-klay5/2, z, new TGeoRotation("",0, 0, 0))); |
b705c75b | 1910 | } |
1911 | ||
1912 | // Done, return the stave structur | |
852af72e | 1913 | return mechStavVol; |
b705c75b | 1914 | } |
1915 | ||
1916 | //________________________________________________________________________ | |
2b9468b2 | 1917 | TGeoVolume* AliITSUv1Layer::CreateStaveOuterB(const TGeoManager *mgr){ |
b705c75b | 1918 | // |
852af72e | 1919 | // Create the chip stave for the Outer Barrel |
b705c75b | 1920 | // |
1921 | // Input: | |
b705c75b | 1922 | // mgr : the GeoManager (used only to get the proper material) |
1923 | // | |
1924 | // Output: | |
1925 | // | |
1926 | // Return: | |
1927 | // | |
1928 | // Created: 20 Dec 2013 Mario Sitta | |
2b9468b2 | 1929 | // Updated: 12 Mar 2014 Mario Sitta |
b705c75b | 1930 | // |
1931 | ||
852af72e | 1932 | TGeoVolume *mechStavVol = 0; |
b705c75b | 1933 | |
1934 | switch (fStaveModel) { | |
1935 | case AliITSUv1::kOBModelDummy: | |
2b9468b2 | 1936 | mechStavVol = CreateStaveModelOuterBDummy(mgr); |
b705c75b | 1937 | break; |
1938 | case AliITSUv1::kOBModel0: | |
2b9468b2 | 1939 | mechStavVol = CreateStaveModelOuterB0(mgr); |
b705c75b | 1940 | break; |
1941 | case AliITSUv1::kOBModel1: | |
1fc6eff6 | 1942 | case AliITSUv1::kOBModel2: |
1943 | mechStavVol = CreateStaveModelOuterB12(mgr); | |
b705c75b | 1944 | break; |
1945 | default: | |
1946 | AliFatal(Form("Unknown stave model %d",fStaveModel)); | |
1947 | break; | |
1948 | } | |
1949 | ||
852af72e | 1950 | return mechStavVol; |
b705c75b | 1951 | } |
1952 | ||
1953 | //________________________________________________________________________ | |
2b9468b2 | 1954 | TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterBDummy(const TGeoManager *) const { |
b705c75b | 1955 | // |
1956 | // Create dummy stave | |
1957 | // | |
1958 | // Input: | |
b705c75b | 1959 | // mgr : the GeoManager (used only to get the proper material) |
1960 | // | |
1961 | // Output: | |
1962 | // | |
1963 | // Return: | |
1964 | // | |
1965 | // Created: 20 Dec 2013 Mario Sitta | |
1966 | // | |
1967 | ||
1968 | ||
1969 | // Done, return the stave structure | |
1970 | return 0; | |
1971 | } | |
1972 | ||
1973 | //________________________________________________________________________ | |
2b9468b2 | 1974 | TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB0(const TGeoManager *mgr){ |
b705c75b | 1975 | // |
1976 | // Creation of the mechanical stave structure for the Outer Barrel as in v0 | |
2b9468b2 | 1977 | // (we fake the module and halfstave volumes to have always |
1978 | // the same formal geometry hierarchy) | |
b705c75b | 1979 | // |
1980 | // Input: | |
b705c75b | 1981 | // mgr : the GeoManager (used only to get the proper material) |
1982 | // | |
1983 | // Output: | |
1984 | // | |
1985 | // Return: | |
1986 | // | |
1987 | // Created: 20 Dec 2013 Mario Sitta | |
2b9468b2 | 1988 | // Updated: 12 Mar 2014 Mario Sitta |
b705c75b | 1989 | // |
1990 | ||
2b9468b2 | 1991 | // Local variables |
1992 | Double_t xmod, ymod, zmod; | |
1993 | Double_t xlen, ylen, zlen; | |
1994 | Double_t ypos, zpos; | |
1995 | char volname[30]; | |
1996 | ||
1997 | // First create all needed shapes | |
1998 | ||
1999 | // The chip | |
2000 | xlen = fgkOBHalfStaveWidth; | |
1fc6eff6 | 2001 | ylen = 0.5*fChipThick; |
2b9468b2 | 2002 | zlen = fgkOBModuleZLength/2; |
2003 | ||
2004 | TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen); | |
2005 | ||
2006 | xmod = ((TGeoBBox*)chipVol->GetShape())->GetDX(); | |
2007 | ymod = ((TGeoBBox*)chipVol->GetShape())->GetDY(); | |
2008 | zmod = ((TGeoBBox*)chipVol->GetShape())->GetDZ(); | |
2009 | ||
2010 | TGeoBBox *module = new TGeoBBox(xmod, ymod, zmod); | |
2011 | ||
2012 | zlen = fgkOBModuleZLength*fNModules; | |
2013 | TGeoBBox *hstave = new TGeoBBox(xlen, ylen, zlen/2); | |
2014 | ||
2015 | ||
2016 | // We have all shapes: now create the real volumes | |
2017 | ||
2018 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
2019 | ||
2020 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber); | |
2021 | TGeoVolume *modVol = new TGeoVolume(volname, module, medAir); | |
2022 | modVol->SetVisibility(kTRUE); | |
2023 | ||
2024 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); | |
2025 | TGeoVolume *hstaveVol = new TGeoVolume(volname, hstave, medAir); | |
2026 | ||
2027 | ||
2028 | // Finally build it up | |
2029 | modVol->AddNode(chipVol, 0); | |
2030 | fHierarchy[kChip]=1; | |
2031 | ||
2032 | for (Int_t j=0; j<fNModules; j++) { | |
2033 | ypos = 0.021; // Remove small overlap - M.S: 21may13 | |
2034 | zpos = -hstave->GetDZ() + j*2*zmod + zmod; | |
2035 | hstaveVol->AddNode(modVol, j, new TGeoTranslation(0, ypos, zpos)); | |
2036 | fHierarchy[kModule]++; | |
2037 | } | |
2038 | ||
2039 | ||
b705c75b | 2040 | // Done, return the stave structure |
2b9468b2 | 2041 | return hstaveVol; |
b705c75b | 2042 | } |
2043 | ||
2044 | //________________________________________________________________________ | |
1fc6eff6 | 2045 | TGeoVolume* AliITSUv1Layer::CreateStaveModelOuterB12(const TGeoManager *mgr){ |
b705c75b | 2046 | // |
c55b10c2 | 2047 | // Create the mechanical half stave structure |
2048 | // for the Outer Barrel as in TDR | |
b705c75b | 2049 | // |
2050 | // Input: | |
b705c75b | 2051 | // mgr : the GeoManager (used only to get the proper material) |
2052 | // | |
2053 | // Output: | |
2054 | // | |
2055 | // Return: | |
2056 | // | |
2057 | // Created: 20 Nov 2013 Anastasia Barbano | |
2058 | // Updated: 16 Jan 2014 Mario Sitta | |
c55b10c2 | 2059 | // Updated: 24 Feb 2014 Mario Sitta |
1fc6eff6 | 2060 | // Updated: 11 Nov 2014 Mario Sitta Model2 |
f1496ca7 | 2061 | // Updated: 03 Dec 2014 Mario Sitta Revised with C.Gargiulo latest infos |
b705c75b | 2062 | // |
2063 | ||
c55b10c2 | 2064 | |
2065 | // Local parameters | |
2066 | Double_t yFlex1 = fgkOBFlexCableAlThick; | |
2067 | Double_t yFlex2 = fgkOBFlexCableKapThick; | |
1fc6eff6 | 2068 | Double_t flexOverlap = 5; // to be checked - unused for the time being |
c55b10c2 | 2069 | Double_t xHalfSt = fgkOBHalfStaveWidth/2; |
f1496ca7 | 2070 | Double_t yCFleece = fgkOBCarbonFleeceThick; |
2071 | Double_t yGraph = fgkOBGraphiteFoilThick; | |
c55b10c2 | 2072 | |
c55b10c2 | 2073 | Double_t ymod, zmod; |
2b9468b2 | 2074 | Double_t xtru[12], ytru[12]; |
c55b10c2 | 2075 | Double_t xpos, ypos, ypos1, zpos/*, zpos5cm*/; |
1fc6eff6 | 2076 | Double_t xlen, ylen, zlen; |
c55b10c2 | 2077 | char volname[30]; |
2078 | ||
1fc6eff6 | 2079 | Double_t rCoolMin, rCoolMax; |
2080 | if (fStaveModel == AliITSUv1::kOBModel1) | |
2081 | rCoolMin = fgkOBCoolTubeInnerDM1/2; | |
2082 | else | |
2083 | rCoolMin = fgkOBCoolTubeInnerD/2; | |
2084 | ||
2085 | rCoolMax = rCoolMin + fgkOBCoolTubeThick; | |
c55b10c2 | 2086 | |
2b9468b2 | 2087 | zlen = (fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap)/2; |
c55b10c2 | 2088 | |
2089 | ||
2090 | // First create all needed shapes | |
2091 | ||
2092 | TGeoVolume *moduleVol = CreateModuleOuterB(); | |
2093 | moduleVol->SetVisibility(kTRUE); | |
2094 | ymod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDY(); | |
2095 | zmod = ((TGeoBBox*)(moduleVol->GetShape()))->GetDZ(); | |
2096 | ||
2097 | TGeoBBox *busAl = new TGeoBBox("BusAl", xHalfSt, fgkOBBusCableAlThick/2, | |
2098 | zlen); | |
2099 | TGeoBBox *busKap = new TGeoBBox("BusKap", xHalfSt, fgkOBBusCableKapThick/2, | |
2100 | zlen); | |
2101 | ||
1fc6eff6 | 2102 | TGeoBBox *glue = new TGeoBBox("Glue", xHalfSt, fgkOBGlueThick/2, zlen); |
2103 | ||
c55b10c2 | 2104 | TGeoBBox *coldPlate = new TGeoBBox("ColdPlate", fgkOBHalfStaveWidth/2, |
2105 | fgkOBColdPlateThick/2, zlen); | |
2106 | ||
f1496ca7 | 2107 | TGeoBBox *fleeccent = new TGeoBBox("FleeceCent", xHalfSt, |
2108 | yCFleece/2, zlen); | |
2109 | ||
c55b10c2 | 2110 | TGeoTube *coolTube = new TGeoTube("CoolingTube", rCoolMin, rCoolMax, zlen); |
8397c175 | 2111 | TGeoTube *coolWater = new TGeoTube("CoolingWater", 0., rCoolMin, zlen); |
c55b10c2 | 2112 | |
2113 | xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax(); | |
f1496ca7 | 2114 | TGeoBBox *graphlat = new TGeoBBox("GraphLateral", xlen/2, yGraph/2, zlen); |
c55b10c2 | 2115 | |
2116 | xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax(); | |
f1496ca7 | 2117 | TGeoBBox *graphmid = new TGeoBBox("GraphMiddle", xlen, yGraph/2, zlen); |
c55b10c2 | 2118 | |
f1496ca7 | 2119 | ylen = coolTube->GetRmax() - yGraph; |
2120 | TGeoBBox *graphvert = new TGeoBBox("GraphVertical", yGraph/2, ylen/2, zlen); | |
c55b10c2 | 2121 | |
2122 | TGeoTubeSeg *graphtub = new TGeoTubeSeg("GraphTube", rCoolMax, | |
f1496ca7 | 2123 | rCoolMax+yGraph, zlen, |
c55b10c2 | 2124 | 180., 360.); |
2125 | ||
f1496ca7 | 2126 | xlen = xHalfSt - fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - yGraph; |
2127 | TGeoBBox *fleeclat = new TGeoBBox("FleecLateral", xlen/2, yCFleece/2, zlen); | |
c55b10c2 | 2128 | |
f1496ca7 | 2129 | xlen = fgkOBCoolTubeXDist/2 - coolTube->GetRmax() - yGraph; |
2130 | TGeoBBox *fleecmid = new TGeoBBox("FleecMiddle", xlen, yCFleece/2, zlen); | |
c55b10c2 | 2131 | |
f1496ca7 | 2132 | ylen = coolTube->GetRmax() - yGraph - yCFleece; |
2133 | TGeoBBox *fleecvert = new TGeoBBox("FleecVertical", yCFleece/2, ylen/2, | |
2134 | zlen); | |
c55b10c2 | 2135 | |
f1496ca7 | 2136 | TGeoTubeSeg *fleectub = new TGeoTubeSeg("FleecTube", rCoolMax+yGraph, |
2137 | rCoolMax+yCFleece+yGraph, | |
c55b10c2 | 2138 | zlen, 180., 360.); |
2139 | ||
2140 | TGeoBBox *flex1_5cm = new TGeoBBox("Flex1MV_5cm",xHalfSt,yFlex1/2,flexOverlap/2); | |
2141 | TGeoBBox *flex2_5cm = new TGeoBBox("Flex2MV_5cm",xHalfSt,yFlex2/2,flexOverlap/2); | |
2142 | ||
2b9468b2 | 2143 | // The half stave container (an XTru to avoid overlaps between neightbours) |
1fc6eff6 | 2144 | ylen = ymod + busAl->GetDY() + busKap->GetDY() + coldPlate->GetDY() |
f1496ca7 | 2145 | + fleeccent->GetDY() + graphlat->GetDY() + fleeclat->GetDY(); |
1fc6eff6 | 2146 | if (fStaveModel == AliITSUv1::kOBModel2) |
2147 | ylen += 2*glue->GetDY(); | |
2148 | ||
2b9468b2 | 2149 | xtru[0] = xHalfSt; |
2150 | ytru[0] = 0; | |
2151 | xtru[1] = xtru[0]; | |
1fc6eff6 | 2152 | ytru[1] = -2*ylen; |
2b9468b2 | 2153 | xtru[2] = fgkOBCoolTubeXDist/2 + fleectub->GetRmax(); |
2154 | ytru[2] = ytru[1]; | |
2155 | xtru[3] = xtru[2]; | |
2156 | ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax()); | |
2157 | xtru[4] = fgkOBCoolTubeXDist/2 - fleectub->GetRmax(); | |
2158 | ytru[4] = ytru[3]; | |
2159 | xtru[5] = xtru[4]; | |
2160 | ytru[5] = ytru[2]; | |
2161 | for (Int_t i = 0; i<6; i++) { | |
2162 | xtru[6+i] = -xtru[5-i]; | |
2163 | ytru[6+i] = ytru[5-i]; | |
2164 | } | |
2165 | TGeoXtru *halfStave = new TGeoXtru(2); | |
2166 | halfStave->DefinePolygon(12, xtru, ytru); | |
2167 | halfStave->DefineSection(0,-fZLength/2); | |
2168 | halfStave->DefineSection(1, fZLength/2); | |
c55b10c2 | 2169 | |
2170 | ||
2171 | // We have all shapes: now create the real volumes | |
2172 | ||
b705c75b | 2173 | TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$"); |
f1496ca7 | 2174 | TGeoMedium *medK13D2U120 = mgr->GetMedium("ITS_K13D2U120$"); |
b705c75b | 2175 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); |
b705c75b | 2176 | TGeoMedium *medWater = mgr->GetMedium("ITS_WATER$"); |
2177 | TGeoMedium *medCarbonFleece = mgr->GetMedium("ITS_CarbonFleece$"); | |
2178 | TGeoMedium *medFGS003 = mgr->GetMedium("ITS_FGS003$"); //amec thermasol | |
2179 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
1fc6eff6 | 2180 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); |
b705c75b | 2181 | |
2182 | ||
1fc6eff6 | 2183 | TGeoVolume *busAlVol = new TGeoVolume("PowerBusAlVol", busAl , medAluminum); |
c55b10c2 | 2184 | busAlVol->SetLineColor(kCyan); |
2185 | busAlVol->SetFillColor(busAlVol->GetLineColor()); | |
2186 | busAlVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2187 | |
1fc6eff6 | 2188 | TGeoVolume *busKapVol = new TGeoVolume("PowerBusKapVol", busKap, medKapton); |
c55b10c2 | 2189 | busKapVol->SetLineColor(kBlue); |
2190 | busKapVol->SetFillColor(busKapVol->GetLineColor()); | |
2191 | busKapVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2192 | |
c55b10c2 | 2193 | TGeoVolume *coldPlateVol = new TGeoVolume("ColdPlateVol", |
f1496ca7 | 2194 | coldPlate, medK13D2U120); |
c55b10c2 | 2195 | coldPlateVol->SetLineColor(kYellow-3); |
2196 | coldPlateVol->SetFillColor(coldPlateVol->GetLineColor()); | |
2197 | coldPlateVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2198 | |
f1496ca7 | 2199 | TGeoVolume *fleeccentVol = new TGeoVolume("CarbonFleeceCentral", |
2200 | fleeccent, medCarbonFleece); | |
2201 | fleeccentVol->SetLineColor(kViolet); | |
2202 | fleeccentVol->SetFillColor(fleeccentVol->GetLineColor()); | |
2203 | fleeccentVol->SetFillStyle(4000); // 0% transparent | |
2204 | ||
1fc6eff6 | 2205 | TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue); |
2206 | glueVol->SetLineColor(kBlack); | |
2207 | glueVol->SetFillColor(glueVol->GetLineColor()); | |
2208 | glueVol->SetFillStyle(4000); // 0% transparent | |
2209 | ||
c55b10c2 | 2210 | TGeoVolume *coolTubeVol = new TGeoVolume("CoolingTubeVol", |
2211 | coolTube, medKapton); | |
2212 | coolTubeVol->SetLineColor(kGray); | |
2213 | coolTubeVol->SetFillColor(coolTubeVol->GetLineColor()); | |
2214 | coolTubeVol->SetFillStyle(4000); // 0% transparent | |
2215 | ||
8397c175 | 2216 | TGeoVolume *coolWaterVol; |
2217 | coolWaterVol = new TGeoVolume("CoolingWaterVol", coolWater, medWater); | |
c55b10c2 | 2218 | coolWaterVol->SetLineColor(kBlue); |
2219 | coolWaterVol->SetFillColor(coolWaterVol->GetLineColor()); | |
2220 | coolWaterVol->SetFillStyle(4000); // 0% transparent | |
2221 | ||
2222 | TGeoVolume *graphlatVol = new TGeoVolume("GraphiteFoilLateral", | |
2223 | graphlat, medFGS003); | |
2224 | graphlatVol->SetLineColor(kGreen); | |
2225 | graphlatVol->SetFillColor(graphlatVol->GetLineColor()); | |
2226 | graphlatVol->SetFillStyle(4000); // 0% transparent | |
2227 | ||
2228 | TGeoVolume *graphmidVol = new TGeoVolume("GraphiteFoilMiddle", | |
2229 | graphmid, medFGS003); | |
2230 | graphmidVol->SetLineColor(kGreen); | |
2231 | graphmidVol->SetFillColor(graphmidVol->GetLineColor()); | |
2232 | graphmidVol->SetFillStyle(4000); // 0% transparent | |
2233 | ||
2234 | TGeoVolume *graphvertVol = new TGeoVolume("GraphiteFoilVertical", | |
2235 | graphvert, medFGS003); | |
2236 | graphvertVol->SetLineColor(kGreen); | |
2237 | graphvertVol->SetFillColor(graphvertVol->GetLineColor()); | |
2238 | graphvertVol->SetFillStyle(4000); // 0% transparent | |
2239 | ||
2240 | TGeoVolume *graphtubVol = new TGeoVolume("GraphiteFoilPipeCover", | |
2241 | graphtub, medFGS003); | |
2242 | graphtubVol->SetLineColor(kGreen); | |
2243 | graphtubVol->SetFillColor(graphtubVol->GetLineColor()); | |
2244 | graphtubVol->SetFillStyle(4000); // 0% transparent | |
2245 | ||
2246 | TGeoVolume *fleeclatVol = new TGeoVolume("CarbonFleeceLateral", | |
2247 | fleeclat, medCarbonFleece); | |
2248 | fleeclatVol->SetLineColor(kViolet); | |
2249 | fleeclatVol->SetFillColor(fleeclatVol->GetLineColor()); | |
2250 | fleeclatVol->SetFillStyle(4000); // 0% transparent | |
2251 | ||
2252 | TGeoVolume *fleecmidVol = new TGeoVolume("CarbonFleeceMiddle", | |
2253 | fleecmid, medCarbonFleece); | |
2254 | fleecmidVol->SetLineColor(kViolet); | |
2255 | fleecmidVol->SetFillColor(fleecmidVol->GetLineColor()); | |
2256 | fleecmidVol->SetFillStyle(4000); // 0% transparent | |
2257 | ||
2258 | TGeoVolume *fleecvertVol = new TGeoVolume("CarbonFleeceVertical", | |
2259 | fleecvert, medCarbonFleece); | |
2260 | fleecvertVol->SetLineColor(kViolet); | |
2261 | fleecvertVol->SetFillColor(fleecvertVol->GetLineColor()); | |
2262 | fleecvertVol->SetFillStyle(4000); // 0% transparent | |
2263 | ||
2264 | TGeoVolume *fleectubVol = new TGeoVolume("CarbonFleecePipeCover", | |
2265 | fleectub, medCarbonFleece); | |
2266 | fleectubVol->SetLineColor(kViolet); | |
2267 | fleectubVol->SetFillColor(fleectubVol->GetLineColor()); | |
2268 | fleectubVol->SetFillStyle(4000); // 0% transparent | |
2269 | ||
2270 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); | |
2271 | TGeoVolume *halfStaveVol = new TGeoVolume(volname, halfStave, medAir); | |
2272 | // halfStaveVol->SetLineColor(12); | |
2273 | // halfStaveVol->SetFillColor(12); | |
2274 | // halfStaveVol->SetVisibility(kTRUE); | |
b705c75b | 2275 | |
b705c75b | 2276 | |
b705c75b | 2277 | TGeoVolume *flex1_5cmVol = new TGeoVolume("Flex1Vol5cm",flex1_5cm,medAluminum); |
2278 | TGeoVolume *flex2_5cmVol = new TGeoVolume("Flex2Vol5cm",flex2_5cm,medKapton); | |
b705c75b | 2279 | |
c55b10c2 | 2280 | |
b705c75b | 2281 | flex1_5cmVol->SetLineColor(kRed); |
2282 | flex2_5cmVol->SetLineColor(kGreen); | |
b705c75b | 2283 | |
b705c75b | 2284 | |
c55b10c2 | 2285 | // Now build up the half stave |
2b9468b2 | 2286 | ypos = - busKap->GetDY(); |
1fc6eff6 | 2287 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton |
2288 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) | |
8397c175 | 2289 | halfStaveVol->AddNode(busKapVol, 1, new TGeoTranslation(0, ypos, 0)); |
b705c75b | 2290 | |
c55b10c2 | 2291 | ypos -= (busKap->GetDY() + busAl->GetDY()); |
1fc6eff6 | 2292 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 1) || // Aluminum |
2293 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 2) ) | |
8397c175 | 2294 | halfStaveVol->AddNode(busAlVol, 1, new TGeoTranslation(0, ypos, 0)); |
b705c75b | 2295 | |
1fc6eff6 | 2296 | ypos -= busAl->GetDY(); |
2297 | ||
2298 | if (fStaveModel == AliITSUv1::kOBModel2) { | |
2299 | ypos -= glue->GetDY(); | |
2300 | if (fBuildLevel < 3) // Glue | |
2301 | halfStaveVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2302 | ypos -= glue->GetDY(); | |
2303 | } | |
2304 | ||
2305 | ypos -= ymod; | |
2b9468b2 | 2306 | for (Int_t j=0; j<fNModules; j++) { |
c55b10c2 | 2307 | zpos = -zlen + j*(2*zmod + fgkOBModuleGap) + zmod; |
2308 | halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(0, ypos, zpos)); | |
2309 | fHierarchy[kModule]++; | |
b705c75b | 2310 | } |
c55b10c2 | 2311 | |
1fc6eff6 | 2312 | ypos -= ymod; |
2313 | ||
2314 | if (fStaveModel == AliITSUv1::kOBModel2) { | |
2315 | ypos -= glue->GetDY(); | |
2316 | if (fBuildLevel < 3) // Glue | |
2317 | halfStaveVol->AddNode(glueVol, 2, new TGeoTranslation(0, ypos, 0)); | |
2318 | ypos -= glue->GetDY(); | |
2319 | } | |
2320 | ||
f1496ca7 | 2321 | ypos -= fleeccent->GetDY(); |
2322 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon | |
2323 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) | |
2324 | halfStaveVol->AddNode(fleeccentVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2325 | ypos -= fleeccent->GetDY(); | |
2326 | ||
1fc6eff6 | 2327 | ypos -= coldPlate->GetDY(); |
2328 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon | |
2329 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) | |
8397c175 | 2330 | halfStaveVol->AddNode(coldPlateVol, 1, new TGeoTranslation(0, ypos, 0)); |
c55b10c2 | 2331 | |
2332 | xpos = fgkOBCoolTubeXDist/2; | |
2333 | ypos1 = ypos - (coldPlate->GetDY() + coolTube->GetRmax()); | |
1fc6eff6 | 2334 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 3) || // Water |
2335 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 4) ) { | |
8397c175 | 2336 | halfStaveVol->AddNode(coolWaterVol, 1, new TGeoTranslation(-xpos, ypos1, 0)); |
2337 | halfStaveVol->AddNode(coolWaterVol, 2, new TGeoTranslation( xpos, ypos1, 0)); | |
2338 | } | |
1fc6eff6 | 2339 | |
2340 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton | |
2341 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) { | |
8397c175 | 2342 | halfStaveVol->AddNode(coolTubeVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2343 | halfStaveVol->AddNode(coolTubeVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2344 | } | |
c55b10c2 | 2345 | |
1fc6eff6 | 2346 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon |
2347 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) { | |
8397c175 | 2348 | halfStaveVol->AddNode(graphtubVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2349 | halfStaveVol->AddNode(graphtubVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
c55b10c2 | 2350 | |
8397c175 | 2351 | halfStaveVol->AddNode(fleectubVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2352 | halfStaveVol->AddNode(fleectubVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2353 | } | |
c55b10c2 | 2354 | |
2355 | xpos = xHalfSt - graphlat->GetDX(); | |
2356 | ypos1 = ypos - (coldPlate->GetDY() + graphlat->GetDY()); | |
1fc6eff6 | 2357 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon |
2358 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) { | |
8397c175 | 2359 | halfStaveVol->AddNode(graphlatVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2360 | halfStaveVol->AddNode(graphlatVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2361 | ||
2362 | halfStaveVol->AddNode(graphmidVol,1, new TGeoTranslation(0, ypos1, 0)); | |
2363 | ||
2364 | xpos = xHalfSt - 2*graphlat->GetDX() + graphvert->GetDX(); | |
2365 | ypos1 = ypos - (coldPlate->GetDY()+2*graphlat->GetDY()+graphvert->GetDY()); | |
2366 | halfStaveVol->AddNode(graphvertVol,1,new TGeoTranslation(-xpos, ypos1, 0)); | |
2367 | halfStaveVol->AddNode(graphvertVol,2,new TGeoTranslation( xpos, ypos1, 0)); | |
2368 | xpos = graphmid->GetDX() - graphvert->GetDX(); | |
2369 | halfStaveVol->AddNode(graphvertVol,3,new TGeoTranslation(-xpos, ypos1, 0)); | |
2370 | halfStaveVol->AddNode(graphvertVol,4,new TGeoTranslation( xpos, ypos1, 0)); | |
2371 | } | |
c55b10c2 | 2372 | |
2373 | xpos = xHalfSt - fleeclat->GetDX(); | |
2374 | ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() +fleeclat->GetDY()); | |
1fc6eff6 | 2375 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 5) || // Carbon |
2376 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 6) ) { | |
8397c175 | 2377 | halfStaveVol->AddNode(fleeclatVol,1, new TGeoTranslation(-xpos, ypos1, 0)); |
2378 | halfStaveVol->AddNode(fleeclatVol,2, new TGeoTranslation( xpos, ypos1, 0)); | |
2379 | ||
2380 | halfStaveVol->AddNode(fleecmidVol, 1, new TGeoTranslation(0, ypos1, 0)); | |
2381 | ||
2382 | xpos = xHalfSt - 2*fleeclat->GetDX() + fleecvert->GetDX(); | |
2383 | ypos1 = ypos - (coldPlate->GetDY() +2*graphlat->GetDY() | |
2384 | + 2*fleeclat->GetDY() + fleecvert->GetDY()); | |
2385 | halfStaveVol->AddNode(fleecvertVol,1,new TGeoTranslation(-xpos, ypos1, 0)); | |
2386 | halfStaveVol->AddNode(fleecvertVol,2,new TGeoTranslation( xpos, ypos1, 0)); | |
2387 | xpos = fleecmid->GetDX() - fleecvert->GetDX(); | |
2388 | halfStaveVol->AddNode(fleecvertVol,3,new TGeoTranslation(-xpos, ypos1, 0)); | |
2389 | halfStaveVol->AddNode(fleecvertVol,4,new TGeoTranslation( xpos, ypos1, 0)); | |
2390 | } | |
c55b10c2 | 2391 | |
2392 | ||
2393 | //THE FOLLOWING IS ONLY A REMINDER FOR WHAT IS STILL MISSING | |
2394 | ||
2395 | // for (Int_t j=0; j<fNChips; j++) { | |
2396 | ||
2397 | // zpos = -(zact + (fNChips-1)*modGap)/2 + j*(zMod + modGap) + zMod/2; | |
2398 | // zpos5cm = -(zact + (fNChips-1)*modGap)/2 + (j+1)*(zMod + modGap) + flexOverlap/2 ; | |
2399 | ||
2400 | // halfStaveVol->AddNode(moduleVol, j, new TGeoTranslation(xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod, zpos)); | |
2401 | // halfStaveVol->AddNode(moduleVol, fNChips+j, new TGeoTranslation(-xPos, -ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + ymod +deltaY, zpos)); | |
2402 | ||
2403 | // if((j+1)!=fNChips){ | |
2404 | // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2,zpos5cm)); | |
2405 | // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2 + yFlex1/2 +deltaY,zpos5cm)); | |
2406 | // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2,zpos5cm)); | |
2407 | // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + 2*yFlex1 + 3*yFlex2/2 +deltaY,zpos5cm)); | |
2408 | // } | |
2409 | // else { | |
2410 | // halfStaveVol->AddNode(flex1_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2,zpos5cm-modGap)); | |
2411 | // halfStaveVol->AddNode(flex1_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1/2 +deltaY,zpos5cm-modGap)); | |
2412 | // halfStaveVol->AddNode(flex2_5cmVol,j,new TGeoTranslation(xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate +2*ymod + yFlex1 + yFlex2/2,zpos5cm-modGap)); | |
2413 | // halfStaveVol->AddNode(flex2_5cmVol,fNChips+j,new TGeoTranslation(-xPos,-ylen + yPos + 2*rCoolMax + yCPlate + yGlue + yModPlate + 2*ymod + yFlex1 + yFlex2/2 +deltaY,zpos5cm-modGap)); | |
2414 | ||
2415 | // } | |
2416 | // } | |
b705c75b | 2417 | |
2418 | ||
c55b10c2 | 2419 | // Done, return the half stave structure |
2420 | return halfStaveVol; | |
b705c75b | 2421 | } |
2422 | ||
2423 | //________________________________________________________________________ | |
2b9468b2 | 2424 | TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB(const TGeoManager *mgr){ |
b705c75b | 2425 | // |
2426 | // Create the space frame for the Outer Barrel | |
2427 | // | |
2428 | // Input: | |
b705c75b | 2429 | // mgr : the GeoManager (used only to get the proper material) |
2430 | // | |
2431 | // Output: | |
2432 | // | |
2433 | // Return: | |
2434 | // | |
2435 | // | |
2436 | ||
852af72e | 2437 | TGeoVolume *mechStavVol = 0; |
b705c75b | 2438 | |
2439 | switch (fStaveModel) { | |
2440 | case AliITSUv1::kOBModelDummy: | |
c55b10c2 | 2441 | case AliITSUv1::kOBModel0: |
2b9468b2 | 2442 | mechStavVol = CreateSpaceFrameOuterBDummy(mgr); |
b705c75b | 2443 | break; |
2444 | case AliITSUv1::kOBModel1: | |
1fc6eff6 | 2445 | case AliITSUv1::kOBModel2: |
2b9468b2 | 2446 | mechStavVol = CreateSpaceFrameOuterB1(mgr); |
b705c75b | 2447 | break; |
2448 | default: | |
2449 | AliFatal(Form("Unknown stave model %d",fStaveModel)); | |
2450 | break; | |
2451 | } | |
2452 | ||
852af72e | 2453 | return mechStavVol; |
b705c75b | 2454 | } |
2455 | ||
2456 | //________________________________________________________________________ | |
2b9468b2 | 2457 | TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterBDummy(const TGeoManager *) const { |
b705c75b | 2458 | // |
2459 | // Create dummy stave | |
2460 | // | |
2461 | // Input: | |
b705c75b | 2462 | // mgr : the GeoManager (used only to get the proper material) |
2463 | // | |
2464 | // Output: | |
2465 | // | |
2466 | // Return: | |
2467 | // | |
2468 | ||
2469 | ||
2470 | // Done, return the stave structur | |
2471 | return 0; | |
2472 | } | |
2473 | ||
2474 | //________________________________________________________________________ | |
2b9468b2 | 2475 | TGeoVolume* AliITSUv1Layer::CreateSpaceFrameOuterB1(const TGeoManager *mgr){ |
b705c75b | 2476 | // |
c55b10c2 | 2477 | // Create the space frame for the Outer Barrel (Model 1) |
b705c75b | 2478 | // |
2479 | // Input: | |
b705c75b | 2480 | // mgr : the GeoManager (used only to get the proper material) |
2481 | // | |
2482 | // Output: | |
2483 | // | |
2484 | // Return: | |
2485 | // a TGeoVolume with the Space Frame of a stave | |
2486 | // | |
2487 | // Created: 20 Dec 2013 Anastasia Barbano | |
2488 | // Updated: 15 Jan 2014 Mario Sitta | |
c55b10c2 | 2489 | // Updated: 18 Feb 2014 Mario Sitta |
2b9468b2 | 2490 | // Updated: 12 Mar 2014 Mario Sitta |
b705c75b | 2491 | // |
2492 | ||
2493 | ||
2494 | // Materials defined in AliITSUv0 | |
2495 | TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$"); | |
2496 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); | |
2497 | ||
2498 | ||
2499 | // Local parameters | |
c55b10c2 | 2500 | Double_t sframeWidth = fgkOBSpaceFrameWidth; |
2501 | Double_t sframeHeight = fgkOBSpaceFrameTotHigh - fgkOBHalfStaveYTrans; | |
2b9468b2 | 2502 | Double_t staveBeamRadius = fgkOBSFrameBeamRadius; |
2503 | Double_t staveLa = fgkOBSpaceFrameLa; | |
2504 | Double_t staveHa = fgkOBSpaceFrameHa; | |
2505 | Double_t staveLb = fgkOBSpaceFrameLb; | |
2506 | Double_t staveHb = fgkOBSpaceFrameHb; | |
2507 | Double_t stavel = fgkOBSpaceFrameL; | |
2508 | Double_t bottomBeamAngle = fgkOBSFBotBeamAngle; | |
c55b10c2 | 2509 | Double_t triangleHeight = sframeHeight - staveBeamRadius; |
2510 | Double_t halfTheta = TMath::ATan( 0.5*sframeWidth/triangleHeight ); | |
2b9468b2 | 2511 | // Double_t alpha = TMath::Pi()*3./4. - halfTheta/2.; |
b705c75b | 2512 | Double_t beta = (TMath::Pi() - 2.*halfTheta)/4.; |
2b9468b2 | 2513 | // Double_t distCenterSideDown = 0.5*sframeWidth/TMath::Cos(beta); |
c55b10c2 | 2514 | |
b705c75b | 2515 | Double_t zlen; |
2b9468b2 | 2516 | Double_t xpos, ypos, zpos; |
2517 | Double_t seglen; | |
2518 | char volname[30]; | |
b705c75b | 2519 | |
2520 | ||
c55b10c2 | 2521 | zlen = fNModules*fgkOBModuleZLength + (fNModules-1)*fgkOBModuleGap; |
2522 | ||
2b9468b2 | 2523 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSHalfStavePattern(), fLayerNumber); |
2524 | if (gGeoManager->GetVolume(volname)) { // Should always be so | |
2525 | sframeHeight -= ((TGeoBBox*)gGeoManager->GetVolume(volname)->GetShape())->GetDY()*2; | |
2526 | zlen = ((TGeoBBox*)gGeoManager->GetVolume(volname)->GetShape())->GetDZ()*2; | |
2527 | } | |
2528 | seglen = zlen/fNModules; | |
c55b10c2 | 2529 | |
2530 | ||
b705c75b | 2531 | // First create all needed shapes and volumes |
2532 | ||
2b9468b2 | 2533 | TGeoBBox *spaceFrame = new TGeoBBox(sframeWidth/2,sframeHeight/2,zlen/2); |
c55b10c2 | 2534 | TGeoBBox *segment = new TGeoBBox(sframeWidth/2,sframeHeight/2,seglen/2); |
b705c75b | 2535 | |
2536 | TGeoVolume *spaceFrameVol = new TGeoVolume("CarbonFrameVolume", | |
2537 | spaceFrame, medAir); | |
2b9468b2 | 2538 | spaceFrameVol->SetVisibility(kFALSE); |
b705c75b | 2539 | |
2b9468b2 | 2540 | TGeoVolume *segmentVol = new TGeoVolume("segmentVol", segment, medAir); |
b705c75b | 2541 | |
2542 | //SpaceFrame | |
2543 | ||
852af72e | 2544 | //--- the top V of the Carbon Fiber Stave (segment) |
2545 | TGeoArb8 *cfStavTop1 = CreateStaveSide("CFstavTopCornerVol1shape", seglen/2., halfTheta, -1, staveLa, staveHa, stavel); | |
2b9468b2 | 2546 | TGeoVolume *cfStavTopVol1 = new TGeoVolume("CFstavTopCornerVol1", |
2547 | cfStavTop1, medCarbon); | |
2548 | cfStavTopVol1->SetLineColor(35); | |
2549 | ||
2550 | TGeoArb8 *cfStavTop2 = CreateStaveSide("CFstavTopCornerVol2shape", seglen/2., halfTheta, 1, staveLa, staveHa, stavel); | |
2551 | TGeoVolume *cfStavTopVol2 = new TGeoVolume("CFstavTopCornerVol2", | |
2552 | cfStavTop2, medCarbon ); | |
2553 | cfStavTopVol2->SetLineColor(35); | |
b705c75b | 2554 | |
c55b10c2 | 2555 | TGeoTranslation *trTop1 = new TGeoTranslation(0, sframeHeight/2, 0); |
b705c75b | 2556 | |
2557 | //--- the 2 side V | |
2b9468b2 | 2558 | TGeoArb8 *cfStavSide1 = CreateStaveSide("CFstavSideCornerVol1shape", seglen/2., beta, -1, staveLb, staveHb, stavel); |
2559 | TGeoVolume *cfStavSideVol1 = new TGeoVolume("CFstavSideCornerVol1", | |
2560 | cfStavSide1, medCarbon); | |
2561 | cfStavSideVol1->SetLineColor(35); | |
b705c75b | 2562 | |
2b9468b2 | 2563 | TGeoArb8 *cfStavSide2 = CreateStaveSide("CFstavSideCornerVol2shape", seglen/2., beta, 1, staveLb, staveHb, stavel); |
2564 | TGeoVolume *cfStavSideVol2 = new TGeoVolume("CFstavSideCornerVol2", | |
2565 | cfStavSide2, medCarbon ); | |
2566 | cfStavSideVol2->SetLineColor(35); | |
2567 | ||
2568 | xpos = -sframeWidth/2; | |
2569 | ypos = -sframeHeight/2 + staveBeamRadius + staveHb*TMath::Sin(beta); | |
2570 | TGeoCombiTrans *ctSideR = new TGeoCombiTrans( xpos, ypos, 0, | |
2571 | new TGeoRotation("", 180-2*beta*TMath::RadToDeg(), 0, 0)); | |
2572 | TGeoCombiTrans *ctSideL = new TGeoCombiTrans(-xpos, ypos, 0, | |
2573 | new TGeoRotation("",-180+2*beta*TMath::RadToDeg(), 0, 0)); | |
b705c75b | 2574 | |
852af72e | 2575 | segmentVol->AddNode(cfStavTopVol1,1,trTop1); |
2576 | segmentVol->AddNode(cfStavTopVol2,1,trTop1); | |
2577 | segmentVol->AddNode(cfStavSideVol1,1,ctSideR); | |
2578 | segmentVol->AddNode(cfStavSideVol1,2,ctSideL); | |
2579 | segmentVol->AddNode(cfStavSideVol2,1,ctSideR); | |
2580 | segmentVol->AddNode(cfStavSideVol2,2,ctSideL); | |
b705c75b | 2581 | |
2582 | ||
2583 | //--- The beams | |
2584 | // Beams on the sides | |
c55b10c2 | 2585 | Double_t beamPhiPrime = TMath::ASin(1./TMath::Sqrt( (1+TMath::Sin(2*beta)*TMath::Sin(2*beta)/(TanD(fgkOBSFrameBeamSidePhi)*TanD(fgkOBSFrameBeamSidePhi))) )); |
2586 | Double_t beamLength = TMath::Sqrt( sframeHeight*sframeHeight/( TMath::Sin(beamPhiPrime)*TMath::Sin(beamPhiPrime))+ sframeWidth*sframeWidth/4.)-staveLa/2-staveLb/2; | |
2b9468b2 | 2587 | TGeoTubeSeg *sideBeam = new TGeoTubeSeg(0, staveBeamRadius, |
2588 | beamLength/2, 0, 180); | |
2589 | TGeoVolume *sideBeamVol = new TGeoVolume("CFstavSideBeamVol", | |
2590 | sideBeam, medCarbon); | |
2591 | sideBeamVol->SetLineColor(35); | |
2592 | ||
2593 | TGeoRotation *beamRot1 = new TGeoRotation("", /*90-2*beta*/halfTheta*TMath::RadToDeg(), | |
2594 | -beamPhiPrime*TMath::RadToDeg(), -90); | |
2595 | TGeoRotation *beamRot2 = new TGeoRotation("", 90-2.*beta*TMath::RadToDeg(), | |
2596 | beamPhiPrime*TMath::RadToDeg(), -90); | |
2597 | TGeoRotation *beamRot3 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(), | |
2598 | beamPhiPrime*TMath::RadToDeg(), -90); | |
2599 | TGeoRotation *beamRot4 = new TGeoRotation("", 90+2.*beta*TMath::RadToDeg(), | |
2600 | -beamPhiPrime*TMath::RadToDeg(), -90); | |
b705c75b | 2601 | |
2602 | TGeoCombiTrans *beamTransf[8]; | |
1d19233b | 2603 | xpos = 0.49*triangleHeight*TMath::Tan(halfTheta);//was 0.5, fix small overlap |
2b9468b2 | 2604 | ypos = staveBeamRadius/2; |
2605 | zpos = seglen/8; | |
2606 | beamTransf[0] = new TGeoCombiTrans( xpos, ypos,-3*zpos, beamRot1); | |
b705c75b | 2607 | |
2b9468b2 | 2608 | beamTransf[1] = new TGeoCombiTrans( xpos, ypos,-3*zpos, beamRot1); |
b705c75b | 2609 | AddTranslationToCombiTrans(beamTransf[1], 0, 0, seglen/2); |
2610 | ||
2b9468b2 | 2611 | beamTransf[2] = new TGeoCombiTrans( xpos, ypos, -zpos, beamRot2); |
b705c75b | 2612 | |
2b9468b2 | 2613 | beamTransf[3] = new TGeoCombiTrans( xpos, ypos, -zpos, beamRot2); |
b705c75b | 2614 | AddTranslationToCombiTrans(beamTransf[3], 0, 0, seglen/2); |
2615 | ||
2b9468b2 | 2616 | beamTransf[4] = new TGeoCombiTrans(-xpos, ypos,-3*zpos, beamRot3); |
b705c75b | 2617 | |
2b9468b2 | 2618 | beamTransf[5] = new TGeoCombiTrans(-xpos, ypos,-3*zpos, beamRot3); |
b705c75b | 2619 | AddTranslationToCombiTrans(beamTransf[5], 0, 0, seglen/2); |
2620 | ||
2b9468b2 | 2621 | beamTransf[6] = new TGeoCombiTrans(-xpos, ypos, -zpos, beamRot4); |
2622 | beamTransf[7] = new TGeoCombiTrans(-xpos, ypos, 3*zpos, beamRot4); | |
b705c75b | 2623 | |
2624 | //--- Beams of the bottom | |
2b9468b2 | 2625 | TGeoTubeSeg *bottomBeam1 = new TGeoTubeSeg(0, staveBeamRadius, |
2626 | sframeWidth/2.-staveLb/3, 0, 180); | |
2627 | TGeoVolume *bottomBeam1Vol = new TGeoVolume("CFstavBottomBeam1Vol", | |
2628 | bottomBeam1, medCarbon); | |
b705c75b | 2629 | bottomBeam1Vol->SetLineColor(35); |
2b9468b2 | 2630 | |
2631 | TGeoTubeSeg *bottomBeam2 = new TGeoTubeSeg(0, staveBeamRadius, | |
2632 | sframeWidth/2.-staveLb/3, 0, 90); | |
2633 | TGeoVolume *bottomBeam2Vol = new TGeoVolume("CFstavBottomBeam2Vol", | |
2634 | bottomBeam2, medCarbon); | |
b705c75b | 2635 | bottomBeam2Vol->SetLineColor(35); |
2b9468b2 | 2636 | |
2637 | TGeoTubeSeg *bottomBeam3 = new TGeoTubeSeg(0, staveBeamRadius, | |
2638 | 0.5*sframeWidth/SinD(bottomBeamAngle) - staveLb/3, | |
2639 | 0, 180); | |
2640 | TGeoVolume *bottomBeam3Vol = new TGeoVolume("CFstavBottomBeam3Vol", | |
2641 | bottomBeam3, medCarbon); | |
b705c75b | 2642 | bottomBeam3Vol->SetLineColor(35); |
2643 | ||
2b9468b2 | 2644 | TGeoRotation *bottomBeamRot1 = new TGeoRotation("", 90, 90, 90); |
2645 | TGeoRotation *bottomBeamRot2 = new TGeoRotation("",-90, 90, -90); | |
b705c75b | 2646 | |
2b9468b2 | 2647 | TGeoCombiTrans *bottomBeamTransf1 = new TGeoCombiTrans("",0, |
2648 | -(sframeHeight/2-staveBeamRadius), 0, | |
2649 | bottomBeamRot1); | |
2650 | TGeoCombiTrans *bottomBeamTransf2 = new TGeoCombiTrans(0, | |
2651 | -(sframeHeight/2-staveBeamRadius), | |
2652 | -seglen/2, | |
2653 | bottomBeamRot1); | |
2654 | TGeoCombiTrans *bottomBeamTransf3 = new TGeoCombiTrans(0, | |
2655 | -(sframeHeight/2-staveBeamRadius), | |
2656 | seglen/2, | |
2657 | bottomBeamRot2); | |
2658 | // be careful for beams #3: when "reading" from -z to +z and | |
2659 | // from the bottom of the stave, it should draw a Lambda, and not a V | |
2660 | TGeoRotation *bottomBeamRot4 = new TGeoRotation("",-90, bottomBeamAngle,-90); | |
2661 | TGeoRotation *bottomBeamRot5 = new TGeoRotation("",-90,-bottomBeamAngle,-90); | |
2662 | ||
2663 | TGeoCombiTrans *bottomBeamTransf4 = new TGeoCombiTrans(0, | |
2664 | -(sframeHeight/2-staveBeamRadius), | |
2665 | -seglen/4, | |
2666 | bottomBeamRot4); | |
2667 | TGeoCombiTrans *bottomBeamTransf5 = new TGeoCombiTrans(0, | |
2668 | -(sframeHeight/2-staveBeamRadius), | |
2669 | seglen/4, | |
2670 | bottomBeamRot5); | |
2671 | ||
2672 | ||
2673 | segmentVol->AddNode(sideBeamVol,1, beamTransf[0]); | |
2674 | segmentVol->AddNode(sideBeamVol,2, beamTransf[1]); | |
2675 | segmentVol->AddNode(sideBeamVol,3, beamTransf[2]); | |
2676 | segmentVol->AddNode(sideBeamVol,4, beamTransf[3]); | |
2677 | segmentVol->AddNode(sideBeamVol,5, beamTransf[4]); | |
2678 | segmentVol->AddNode(sideBeamVol,6, beamTransf[5]); | |
2679 | segmentVol->AddNode(sideBeamVol,7, beamTransf[6]); | |
2680 | segmentVol->AddNode(sideBeamVol,8, beamTransf[7]); | |
b705c75b | 2681 | segmentVol->AddNode(bottomBeam1Vol,1,bottomBeamTransf1); |
2682 | segmentVol->AddNode(bottomBeam2Vol,1,bottomBeamTransf2); | |
740c273e | 2683 | segmentVol->AddNode(bottomBeam2Vol,2,bottomBeamTransf3); |
b705c75b | 2684 | segmentVol->AddNode(bottomBeam3Vol,1,bottomBeamTransf4); |
740c273e | 2685 | segmentVol->AddNode(bottomBeam3Vol,2,bottomBeamTransf5); |
b705c75b | 2686 | |
2b9468b2 | 2687 | |
2688 | // Then build up the space frame | |
2689 | for(Int_t i=0; i<fNModules; i++){ | |
2690 | zpos = -spaceFrame->GetDZ() + (1 + 2*i)*segment->GetDZ(); | |
2691 | spaceFrameVol->AddNode(segmentVol, i, new TGeoTranslation(0, 0, zpos)); | |
b705c75b | 2692 | } |
2693 | ||
2694 | ||
2b9468b2 | 2695 | // Done, return the space frame structure |
b705c75b | 2696 | return spaceFrameVol; |
2697 | } | |
2698 | ||
2699 | //________________________________________________________________________ | |
c55b10c2 | 2700 | TGeoVolume* AliITSUv1Layer::CreateChipInnerB(const Double_t xchip, |
2701 | const Double_t ychip, | |
2702 | const Double_t zchip, | |
2703 | const TGeoManager *mgr){ | |
b705c75b | 2704 | // |
852af72e | 2705 | // Creates the actual Chip |
b705c75b | 2706 | // |
2707 | // Input: | |
c55b10c2 | 2708 | // xchip,ychip,zchip : the chip dimensions |
b705c75b | 2709 | // mgr : the GeoManager (used only to get the proper material) |
2710 | // | |
2711 | // Output: | |
2712 | // | |
2713 | // Return: | |
2714 | // | |
2715 | // Created: 22 Jun 2011 Mario Sitta | |
2716 | // | |
2717 | ||
2718 | char volname[30]; | |
2719 | Double_t xlen, ylen, zlen; | |
2720 | Double_t xpos, ypos, zpos; | |
2721 | ||
2722 | ||
2723 | // First create all needed shapes | |
2724 | ||
852af72e | 2725 | // The chip |
c55b10c2 | 2726 | TGeoBBox *chip = new TGeoBBox(xchip, ychip, zchip); |
b705c75b | 2727 | |
2728 | // The sensor | |
852af72e | 2729 | xlen = chip->GetDX(); |
b705c75b | 2730 | ylen = 0.5*fSensorThick; |
852af72e | 2731 | zlen = chip->GetDZ(); |
b705c75b | 2732 | TGeoBBox *sensor = new TGeoBBox(xlen, ylen, zlen); |
2733 | ||
2734 | ||
2735 | // We have all shapes: now create the real volumes | |
b705c75b | 2736 | TGeoMedium *medSi = mgr->GetMedium("ITS_SI$"); |
2737 | ||
852af72e | 2738 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSChipPattern(), fLayerNumber); |
c55b10c2 | 2739 | TGeoVolume *chipVol = new TGeoVolume(volname, chip, medSi); |
2740 | chipVol->SetVisibility(kTRUE); | |
2741 | chipVol->SetLineColor(1); | |
b705c75b | 2742 | |
2743 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSSensorPattern(), fLayerNumber); | |
2744 | TGeoVolume *sensVol = new TGeoVolume(volname, sensor, medSi); | |
2745 | sensVol->SetVisibility(kTRUE); | |
2746 | sensVol->SetLineColor(8); | |
2747 | sensVol->SetLineWidth(1); | |
2748 | sensVol->SetFillColor(sensVol->GetLineColor()); | |
2749 | sensVol->SetFillStyle(4000); // 0% transparent | |
2750 | ||
2751 | ||
852af72e | 2752 | // Now build up the chip |
b705c75b | 2753 | xpos = 0.; |
852af72e | 2754 | ypos = -chip->GetDY() + sensor->GetDY(); |
b705c75b | 2755 | zpos = 0.; |
2756 | ||
c55b10c2 | 2757 | chipVol->AddNode(sensVol, 1, new TGeoTranslation(xpos, ypos, zpos)); |
b705c75b | 2758 | |
852af72e | 2759 | // Done, return the chip |
c55b10c2 | 2760 | return chipVol; |
b705c75b | 2761 | } |
2762 | ||
2763 | //________________________________________________________________________ | |
c55b10c2 | 2764 | TGeoVolume* AliITSUv1Layer::CreateModuleOuterB(const TGeoManager *mgr){ |
b705c75b | 2765 | // |
c55b10c2 | 2766 | // Creates the OB Module: HIC + FPC + Carbon plate |
b705c75b | 2767 | // |
2768 | // Input: | |
b705c75b | 2769 | // mgr : the GeoManager (used only to get the proper material) |
2770 | // | |
2771 | // Output: | |
2772 | // | |
2773 | // Return: | |
c55b10c2 | 2774 | // the module as a TGeoVolume |
b705c75b | 2775 | // |
2776 | // Created: 18 Dec 2013 M. Sitta, A. Barbano | |
c55b10c2 | 2777 | // Updated: 26 Feb 2014 M. Sitta |
1fc6eff6 | 2778 | // Updated: 12 Nov 2014 M. Sitta Model2 is w/o Carbon Plate and Glue |
2779 | // and Cu instead of Al | |
b705c75b | 2780 | // |
2781 | ||
2782 | ||
2783 | char volname[30]; | |
2784 | ||
c55b10c2 | 2785 | Double_t xGap = fgkOBChipXGap; |
2786 | Double_t zGap = fgkOBChipZGap; | |
b705c75b | 2787 | |
2b9468b2 | 2788 | Double_t xchip, ychip, zchip; |
b705c75b | 2789 | Double_t xlen, ylen, zlen; |
2790 | Double_t xpos, ypos, zpos; | |
2791 | ||
2792 | // First create all needed shapes | |
2793 | ||
c55b10c2 | 2794 | // The chip (the same as for IB) |
2795 | xlen = (fgkOBHalfStaveWidth/2-xGap/2)/fgkOBNChipRows; | |
1fc6eff6 | 2796 | ylen = 0.5*fChipThick; |
c55b10c2 | 2797 | zlen = (fgkOBModuleZLength - (fgkOBChipsPerRow-1)*zGap)/(2*fgkOBChipsPerRow); |
b705c75b | 2798 | |
c55b10c2 | 2799 | TGeoVolume *chipVol = CreateChipInnerB(xlen, ylen, zlen); |
2800 | ||
2b9468b2 | 2801 | xchip = ((TGeoBBox*)chipVol->GetShape())->GetDX(); |
2802 | ychip = ((TGeoBBox*)chipVol->GetShape())->GetDY(); | |
2803 | zchip = ((TGeoBBox*)chipVol->GetShape())->GetDZ(); | |
c55b10c2 | 2804 | |
2805 | // The module carbon plate | |
2806 | xlen = fgkOBHalfStaveWidth/2; | |
2807 | ylen = fgkOBCarbonPlateThick/2; | |
2808 | zlen = fgkOBModuleZLength/2; | |
2809 | TGeoBBox *modPlate = new TGeoBBox("CarbonPlate", xlen, ylen, zlen); | |
2810 | ||
2811 | // The glue | |
1fc6eff6 | 2812 | ylen = fgkOBGlueThickM1/2; |
c55b10c2 | 2813 | TGeoBBox *glue = new TGeoBBox("Glue", xlen, ylen, zlen); |
2814 | ||
1fc6eff6 | 2815 | // The FPC cables |
2816 | TGeoBBox *flexMetal; | |
2817 | if (fStaveModel == AliITSUv1::kOBModel1) { | |
2818 | ylen = fgkOBFlexCableAlThick/2; | |
2819 | flexMetal = new TGeoBBox("FlexAl", xlen, ylen, zlen); | |
2820 | } else { | |
2821 | ylen = fgkOBFlexCableCuThick/2; | |
2822 | flexMetal = new TGeoBBox("FlexCu", xlen, ylen, zlen); | |
2823 | } | |
c55b10c2 | 2824 | |
f1496ca7 | 2825 | if (fStaveModel == AliITSUv1::kOBModel1) |
2826 | ylen = fgkOBFlexCableKapThick1/2; | |
2827 | else | |
2828 | ylen = fgkOBFlexCableKapThick/2; | |
c55b10c2 | 2829 | TGeoBBox *flexKap = new TGeoBBox("FlexKap", xlen, ylen, zlen); |
2830 | ||
2831 | // The module | |
2832 | xlen = fgkOBHalfStaveWidth/2; | |
f1496ca7 | 2833 | ylen = ychip + flexMetal->GetDY() + flexKap->GetDY(); |
2834 | if (fStaveModel == AliITSUv1::kOBModel1) | |
2835 | ylen += (modPlate->GetDY() + glue->GetDY()); | |
c55b10c2 | 2836 | zlen = fgkOBModuleZLength/2; |
2837 | TGeoBBox *module = new TGeoBBox("OBModule", xlen, ylen, zlen); | |
b705c75b | 2838 | |
2839 | ||
2840 | // We have all shapes: now create the real volumes | |
2841 | ||
c55b10c2 | 2842 | TGeoMedium *medAir = mgr->GetMedium("ITS_AIR$"); |
2843 | TGeoMedium *medCarbon = mgr->GetMedium("ITS_CARBON$"); | |
2844 | TGeoMedium *medGlue = mgr->GetMedium("ITS_GLUE$"); | |
2845 | TGeoMedium *medAluminum = mgr->GetMedium("ITS_ALUMINUM$"); | |
1fc6eff6 | 2846 | TGeoMedium *medCopper = mgr->GetMedium("ITS_COPPER$"); |
c55b10c2 | 2847 | TGeoMedium *medKapton = mgr->GetMedium("ITS_KAPTON(POLYCH2)$"); |
2848 | ||
2849 | TGeoVolume *modPlateVol = new TGeoVolume("CarbonPlateVol", | |
2850 | modPlate, medCarbon); | |
2851 | modPlateVol->SetLineColor(kMagenta-8); | |
2852 | modPlateVol->SetFillColor(modPlateVol->GetLineColor()); | |
2853 | modPlateVol->SetFillStyle(4000); // 0% transparent | |
b705c75b | 2854 | |
c55b10c2 | 2855 | TGeoVolume *glueVol = new TGeoVolume("GlueVol", glue, medGlue); |
2856 | glueVol->SetLineColor(kBlack); | |
2857 | glueVol->SetFillColor(glueVol->GetLineColor()); | |
2858 | glueVol->SetFillStyle(4000); // 0% transparent | |
2859 | ||
1fc6eff6 | 2860 | TGeoVolume *flexMetalVol; |
2861 | if (fStaveModel == AliITSUv1::kOBModel1) | |
2862 | flexMetalVol = new TGeoVolume("FPCAlVol", flexMetal, medAluminum); | |
2863 | else | |
2864 | flexMetalVol = new TGeoVolume("FPCCuVol", flexMetal, medCopper); | |
2865 | flexMetalVol->SetLineColor(kRed); | |
2866 | flexMetalVol->SetFillColor(flexMetalVol->GetLineColor()); | |
2867 | flexMetalVol->SetFillStyle(4000); // 0% transparent | |
c55b10c2 | 2868 | |
1fc6eff6 | 2869 | TGeoVolume *flexKapVol = new TGeoVolume("FPCKapVol", flexKap, medKapton); |
c55b10c2 | 2870 | flexKapVol->SetLineColor(kGreen); |
2871 | flexKapVol->SetFillColor(flexKapVol->GetLineColor()); | |
2872 | flexKapVol->SetFillStyle(4000); // 0% transparent | |
2873 | ||
2874 | snprintf(volname, 30, "%s%d", AliITSUGeomTGeo::GetITSModulePattern(), fLayerNumber); | |
2875 | TGeoVolume *modVol = new TGeoVolume(volname, module, medAir); | |
2876 | modVol->SetVisibility(kTRUE); | |
b705c75b | 2877 | |
2878 | ||
c55b10c2 | 2879 | // Now build up the module |
1fc6eff6 | 2880 | // Model1 : CarbonPlate-Glue-Chips-AluminumFPC-KaptonFPC |
2881 | // Model2 : Chips-CopperFPC-KaptonFPCChips | |
2882 | ypos = -module->GetDY(); | |
2883 | ||
2884 | if (fStaveModel == AliITSUv1::kOBModel1) { | |
2885 | ypos += modPlate->GetDY(); | |
2886 | if (fBuildLevel < 5) // Carbon | |
2887 | modVol->AddNode(modPlateVol, 1, new TGeoTranslation(0, ypos, 0)); | |
b705c75b | 2888 | |
1fc6eff6 | 2889 | ypos += (modPlate->GetDY() + glue->GetDY()); |
2890 | if (fBuildLevel < 2) // Glue | |
2891 | modVol->AddNode(glueVol, 1, new TGeoTranslation(0, ypos, 0)); | |
2892 | ||
2893 | ypos += glue->GetDY(); | |
2894 | } | |
c55b10c2 | 2895 | |
2b9468b2 | 2896 | xpos = -module->GetDX() + xchip; |
1fc6eff6 | 2897 | ypos += ychip; |
c55b10c2 | 2898 | for(Int_t k=0; k<fgkOBChipsPerRow; k++) //put 7x2 chip into one module |
b705c75b | 2899 | { |
2b9468b2 | 2900 | zpos = -module->GetDZ() + zchip + k*(2*zchip + zGap); |
c55b10c2 | 2901 | modVol->AddNode(chipVol, 2*k , new TGeoTranslation( xpos, ypos, zpos)); |
65740b7a | 2902 | modVol->AddNode(chipVol, 2*k+1, |
2903 | new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("",0,180,180))); | |
c55b10c2 | 2904 | fHierarchy[kChip]+=2; |
b705c75b | 2905 | } |
c55b10c2 | 2906 | |
1fc6eff6 | 2907 | ypos += (ychip + flexMetal->GetDY()); |
2908 | if (fBuildLevel < 1) // Model1: Aluminum Model2: Copper | |
2909 | modVol->AddNode(flexMetalVol, 1, new TGeoTranslation(0, ypos, 0)); | |
c55b10c2 | 2910 | |
1fc6eff6 | 2911 | ypos += (flexMetal->GetDY() + flexKap->GetDY()); |
2912 | if ( (fStaveModel == AliITSUv1::kOBModel1 && fBuildLevel < 4) || // Kapton | |
2913 | (fStaveModel == AliITSUv1::kOBModel2 && fBuildLevel < 5) ) | |
8397c175 | 2914 | modVol->AddNode(flexKapVol, 1, new TGeoTranslation(0, ypos, 0)); |
c55b10c2 | 2915 | |
2916 | // Done, return the module | |
b705c75b | 2917 | return modVol; |
2918 | } | |
2919 | ||
c55b10c2 | 2920 | //________________________________________________________________________ |
2921 | void AliITSUv1Layer::SetNUnits(Int_t u) | |
2922 | { | |
2923 | // | |
2924 | // Sets the number of units in a stave: | |
2925 | // for the Inner Barrel: the number of chips per stave | |
2926 | // for the Outer Barrel: the number of modules per half stave | |
2927 | // | |
2928 | // | |
2929 | // Input: | |
2930 | // u : the number of units | |
2931 | // | |
2932 | // Output: | |
2933 | // | |
2934 | // Return: | |
2935 | // | |
2936 | // Created: 18 Feb 2013 Mario Sitta (was already SetNChips) | |
2937 | // | |
2938 | ||
2939 | if (fLayerNumber < fgkNumberOfInnerLayers) | |
2940 | fNChips = u; | |
2941 | else { | |
2942 | fNModules = u; | |
2943 | fNChips = fgkOBChipsPerRow; | |
2944 | } | |
2945 | ||
2946 | } | |
2947 | ||
b705c75b | 2948 | //________________________________________________________________________ |
852af72e | 2949 | void AliITSUv1Layer::SetStaveTilt(const Double_t t) |
b705c75b | 2950 | { |
2951 | // | |
852af72e | 2952 | // Sets the Stave tilt angle (for turbo layers only) |
b705c75b | 2953 | // |
2954 | // Input: | |
852af72e | 2955 | // t : the stave tilt angle |
b705c75b | 2956 | // |
2957 | // Output: | |
2958 | // | |
2959 | // Return: | |
2960 | // | |
2961 | // Created: 08 Jul 2011 Mario Sitta | |
2962 | // | |
2963 | ||
2964 | if (fIsTurbo) | |
852af72e | 2965 | fStaveTilt = t; |
b705c75b | 2966 | else |
2967 | AliError("Not a Turbo layer"); | |
2968 | ||
2969 | } | |
2970 | ||
2971 | //________________________________________________________________________ | |
852af72e | 2972 | void AliITSUv1Layer::SetStaveWidth(const Double_t w){ |
b705c75b | 2973 | // |
852af72e | 2974 | // Sets the Stave width (for turbo layers only) |
b705c75b | 2975 | // |
2976 | // Input: | |
852af72e | 2977 | // w : the stave width |
b705c75b | 2978 | // |
2979 | // Output: | |
2980 | // | |
2981 | // Return: | |
2982 | // | |
2983 | // Created: 08 Jul 2011 Mario Sitta | |
2984 | // | |
2985 | ||
2986 | if (fIsTurbo) | |
852af72e | 2987 | fStaveWidth = w; |
b705c75b | 2988 | else |
2989 | AliError("Not a Turbo layer"); | |
2990 | ||
2991 | } | |
2992 | ||
2993 | //________________________________________________________________________ | |
852af72e | 2994 | TGeoArb8 *AliITSUv1Layer::CreateStaveSide(const char *name, |
b705c75b | 2995 | Double_t dz, Double_t angle, Double_t xSign, |
2996 | Double_t L, Double_t H, Double_t l) { | |
2997 | // | |
2998 | // Creates the V-shaped sides of the OB space frame | |
2999 | // (from a similar method with same name and function | |
3000 | // in AliITSv11GeometrySDD class by L.Gaudichet) | |
3001 | // | |
3002 | ||
852af72e | 3003 | // Create one half of the V shape corner of CF stave |
b705c75b | 3004 | |
852af72e | 3005 | TGeoArb8 *cfStavSide = new TGeoArb8(dz); |
3006 | cfStavSide->SetName(name); | |
b705c75b | 3007 | |
3008 | // Points must be in clockwise order | |
852af72e | 3009 | cfStavSide->SetVertex(0, 0, 0); |
3010 | cfStavSide->SetVertex(2, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)), | |
b705c75b | 3011 | -L*TMath::Cos(angle)-l*TMath::Sin(angle)); |
852af72e | 3012 | cfStavSide->SetVertex(4, 0, 0); |
3013 | cfStavSide->SetVertex(6, xSign*(L*TMath::Sin(angle)-l*TMath::Cos(angle)), | |
b705c75b | 3014 | -L*TMath::Cos(angle)-l*TMath::Sin(angle)); |
3015 | if (xSign < 0) { | |
852af72e | 3016 | cfStavSide->SetVertex(1, 0, -H); |
3017 | cfStavSide->SetVertex(3, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle)); | |
3018 | cfStavSide->SetVertex(5, 0, -H); | |
3019 | cfStavSide->SetVertex(7, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle)); | |
b705c75b | 3020 | } else { |
852af72e | 3021 | cfStavSide->SetVertex(1, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle)); |
3022 | cfStavSide->SetVertex(3, 0, -H); | |
3023 | cfStavSide->SetVertex(5, xSign*L*TMath::Sin(angle), -L*TMath::Cos(angle)); | |
3024 | cfStavSide->SetVertex(7, 0, -H); | |
b705c75b | 3025 | } |
852af72e | 3026 | return cfStavSide; |
b705c75b | 3027 | } |
3028 | ||
3029 | //________________________________________________________________________ | |
3030 | TGeoCombiTrans *AliITSUv1Layer::CreateCombiTrans(const char *name, | |
3031 | Double_t dy, Double_t dz, | |
3032 | Double_t dphi, Bool_t planeSym) { | |
3033 | // | |
3034 | // Help method to create a TGeoCombiTrans matrix | |
3035 | // (from a similar method with same name and function | |
3036 | // in AliITSv11GeometrySDD class by L.Gaudichet) | |
3037 | // | |
3038 | ||
3039 | // | |
3040 | // return the TGeoCombiTrans which make a translation in y and z | |
3041 | // and a rotation in phi in the global coord system | |
3042 | // If planeSym = true, the rotation places the object symetrically | |
3043 | // (with respect to the transverse plane) to its position in the | |
3044 | // case planeSym = false | |
3045 | // | |
3046 | ||
3047 | TGeoTranslation t1(dy*CosD(90.+dphi),dy*SinD(90.+dphi), dz); | |
3048 | TGeoRotation r1("",0.,0.,dphi); | |
3049 | TGeoRotation r2("",90, 180, -90-dphi); | |
3050 | ||
3051 | TGeoCombiTrans *combiTrans1 = new TGeoCombiTrans(name); | |
3052 | combiTrans1->SetTranslation(t1); | |
3053 | if (planeSym) combiTrans1->SetRotation(r1); | |
3054 | else combiTrans1->SetRotation(r2); | |
3055 | return combiTrans1; | |
3056 | } | |
3057 | ||
3058 | //________________________________________________________________________ | |
3059 | void AliITSUv1Layer::AddTranslationToCombiTrans(TGeoCombiTrans* ct, | |
3060 | Double_t dx, | |
3061 | Double_t dy, | |
3062 | Double_t dz) const{ | |
3063 | // | |
3064 | // Help method to add a translation to a TGeoCombiTrans matrix | |
3065 | // (from a similar method with same name and function | |
3066 | // in AliITSv11GeometrySDD class by L.Gaudichet) | |
3067 | // | |
3068 | ||
3069 | // Add a dx,dy,dz translation to the initial TGeoCombiTrans | |
3070 | const Double_t *vect = ct->GetTranslation(); | |
3071 | Double_t newVect[3] = {vect[0]+dx, vect[1]+dy, vect[2]+dz}; | |
3072 | ct->SetTranslation(newVect); | |
3073 | } |