Project
Loading...
Searching...
No Matches
V3Services.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
21
22#include <fairlogger/Logger.h> // for LOG
23
24#include <TGeoArb8.h> // for TGeoArb8
25#include <TGeoBBox.h> // for TGeoBBox
26#include <TGeoCone.h> // for TGeoConeSeg, TGeoCone
27#include <TGeoPcon.h> // for TGeoPcon
28#include <TGeoManager.h> // for TGeoManager, gGeoManager
29#include <TGeoMatrix.h> // for TGeoCombiTrans, TGeoRotation, etc
30// #include <TGeoTrd1.h> // for TGeoTrd1
31#include <TGeoTube.h> // for TGeoTube, TGeoTubeSeg
32#include <TGeoVolume.h> // for TGeoVolume, TGeoVolumeAssembly
33#include <TGeoXtru.h> // for TGeoXtru
34#include <TGeoCompositeShape.h> // for TGeoCompositeShape
35#include "TMathBase.h" // for Abs
36#include <TMath.h> // for Sin, RadToDeg, DegToRad, Cos, Tan, etc
37
38#include <cstdio> // for snprintf
39
40class TGeoMedium;
41
42using namespace TMath;
43using namespace o2::its;
44
45// Parameters
46const Double_t V3Services::sIBWheelACZdist = 306.0 * sMm;
47const Double_t V3Services::sIBCYSSFlangeCZPos = 171.5 * sMm; // Computed from different drawings
48const Double_t V3Services::sOBWheelThickness = 2.0 * sMm;
49const Double_t V3Services::sMBWheelsZpos = 457.0 * sMm;
50const Double_t V3Services::sOBWheelsZpos = 770.0 * sMm;
51const Double_t V3Services::sOBConesZpos = 798.0 * sMm;
52
54
55#define SQ(A) (A) * (A)
56
61
63 : V11Geometry(0, name)
64{
65}
66
67V3Services::~V3Services() = default;
68
69TGeoVolume* V3Services::createIBEndWheelsSideA(const TGeoManager* mgr)
70{
71 //
72 // Creates the Inner Barrel End Wheels on Side A
73 //
74 // Input:
75 // mgr : the GeoManager (used only to get the proper material)
76 //
77 // Output:
78 //
79 // Return:
80 // a TGeoVolume(Assembly) with all the wheels
81 //
82 // Created: 19 Jun 2019 Mario Sitta
83 // (partially based on P.Namwongsa implementation in AliRoot)
84 //
85
86 TGeoVolume* endWheelsVol = new TGeoVolumeAssembly("EndWheelsSideA");
87 endWheelsVol->SetVisibility(kTRUE);
88
89 for (Int_t jLay = 0; jLay < sNumberInnerLayers; jLay++) {
90 ibEndWheelSideA(jLay, endWheelsVol, mgr);
91 }
92
93 // Return the wheels
94 return endWheelsVol;
95}
96
97TGeoVolume* V3Services::createIBEndWheelsSideC(const TGeoManager* mgr)
98{
99 //
100 // Creates the Inner Barrel End Wheels on Side C
101 //
102 // Input:
103 // mgr : the GeoManager (used only to get the proper material)
104 //
105 // Output:
106 //
107 // Return:
108 // a TGeoVolume(Assembly) with all the wheels
109 //
110 // Created: 15 May 2019 Mario Sitta
111 // (partially based on P.Namwongsa implementation in AliRoot)
112 //
113
114 TGeoVolume* endWheelsVol = new TGeoVolumeAssembly("EndWheelsSideC");
115 endWheelsVol->SetVisibility(kTRUE);
116
117 for (Int_t jLay = 0; jLay < sNumberInnerLayers; jLay++) {
118 ibEndWheelSideC(jLay, endWheelsVol, mgr);
119 }
120
121 // Return the wheels
122 return endWheelsVol;
123}
124
125TGeoVolume* V3Services::createCYSSAssembly(const TGeoManager* mgr)
126{
127 //
128 // Creates the CYSS Assembly (i.e. the supporting cylinder and cone)
129 //
130 // Input:
131 // mgr : the GeoManager (used only to get the proper material)
132 //
133 // Output:
134 //
135 // Return:
136 // a TGeoVolume(Assembly) with all the elements
137 //
138 // Created: 21 Oct 2019 Mario Sitta
139 // Updated: 02 Dec 2019 Mario Sitta Full cylinder implemented
140 //
141
142 static const Double_t sCyssFlangeAZpos = 9.0 * sMm;
143 static const Double_t sCyssFlangeCZpos = 1.0 * sMm;
144
145 Double_t zlen, zpos;
146
147 TGeoVolume* cyssVol = new TGeoVolumeAssembly("IBCYSSAssembly");
148 cyssVol->SetVisibility(kTRUE);
149
150 TGeoVolume* cyssCylinder = ibCyssCylinder(mgr);
151 zlen = (static_cast<TGeoTubeSeg*>(cyssCylinder->GetShape()))->GetDz();
152 zpos = sIBCYSSFlangeCZPos - sCyssFlangeCZpos - zlen;
153 cyssVol->AddNode(cyssCylinder, 1, new TGeoTranslation(0, 0, -zpos));
154 cyssVol->AddNode(cyssCylinder, 2, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 180, 0, 0)));
155
156 TGeoVolume* cyssCone = ibCyssCone(mgr);
157 zpos = -zpos + zlen - (static_cast<TGeoPcon*>(cyssCone->GetShape()))->GetZ(2);
158 cyssVol->AddNode(cyssCone, 1, new TGeoTranslation(0, 0, zpos));
159 cyssVol->AddNode(cyssCone, 2, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 180, 0, 0)));
160
161 TGeoVolume* cyssFlangeA = ibCyssFlangeSideA(mgr);
162 Int_t nZPlanes = (static_cast<TGeoPcon*>(cyssCone->GetShape()))->GetNz();
163 zpos = zpos + (static_cast<TGeoPcon*>(cyssCone->GetShape()))->GetZ(nZPlanes - 1) + sCyssFlangeAZpos;
164 cyssVol->AddNode(cyssFlangeA, 1, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 180, 180, 0)));
165 cyssVol->AddNode(cyssFlangeA, 2, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 0, 180, 0)));
166
167 TGeoVolume* cyssFlangeC = ibCyssFlangeSideC(mgr);
168 zpos = sIBCYSSFlangeCZPos;
169 cyssVol->AddNode(cyssFlangeC, 1, new TGeoTranslation(0, 0, -zpos));
170 cyssVol->AddNode(cyssFlangeC, 2, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 180, 0, 0)));
171
172 // Return the whole assembly
173 return cyssVol;
174}
175
176void V3Services::createMBEndWheelsSideA(TGeoVolume* mother, const TGeoManager* mgr)
177{
178 //
179 // Creates the Middle Barrel End Wheels on Side A
180 //
181 // Input:
182 // mother : the volume hosting the wheels
183 // mgr : the GeoManager (used only to get the proper material)
184 //
185 // Output:
186 //
187 // Return:
188 //
189 // Created: 24 Sep 2019 Mario Sitta
190 //
191
192 for (Int_t jLay = 0; jLay < sNumberMiddlLayers; jLay++) {
193 obEndWheelSideA(jLay, mother, mgr);
194 }
195}
196
197void V3Services::createMBEndWheelsSideC(TGeoVolume* mother, const TGeoManager* mgr)
198{
199 //
200 // Creates the Middle Barrel End Wheels on Side C
201 //
202 // Input:
203 // mother : the volume hosting the wheels
204 // mgr : the GeoManager (used only to get the proper material)
205 //
206 // Output:
207 //
208 // Return:
209 //
210 // Created: 26 Sep 2019 Mario Sitta
211 //
212
213 for (Int_t jLay = 0; jLay < sNumberMiddlLayers; jLay++) {
214 mbEndWheelSideC(jLay, mother, mgr);
215 }
216}
217
218void V3Services::createOBEndWheelsSideA(TGeoVolume* mother, const TGeoManager* mgr)
219{
220 //
221 // Creates the Outer Barrel End Wheels on Side A
222 //
223 // Input:
224 // mother : the volume hosting the wheels
225 // mgr : the GeoManager (used only to get the proper material)
226 //
227 // Output:
228 //
229 // Return:
230 //
231 // Created: 27 Sep 2019 Mario Sitta
232 //
233
234 for (Int_t jLay = 0; jLay < sNumberOuterLayers; jLay++) {
235 obEndWheelSideA(jLay + sNumberMiddlLayers, mother, mgr);
236 }
237}
238
239void V3Services::createOBEndWheelsSideC(TGeoVolume* mother, const TGeoManager* mgr)
240{
241 //
242 // Creates the Outer Barrel End Wheels on Side C
243 //
244 // Input:
245 // mother : the volume hosting the wheels
246 // mgr : the GeoManager (used only to get the proper material)
247 //
248 // Output:
249 //
250 // Return:
251 //
252 // Created: 27 Sep 2019 Mario Sitta
253 //
254
255 for (Int_t jLay = 0; jLay < sNumberOuterLayers; jLay++) {
256 obEndWheelSideC(jLay, mother, mgr);
257 }
258}
259
260void V3Services::createOBConeSideA(TGeoVolume* mother, const TGeoManager* mgr)
261{
262 //
263 // Creates the Outer Barrel Cone on Side A
264 //
265 // Input:
266 // mother : the volume hosting the cones
267 // mgr : the GeoManager (used only to get the proper material)
268 //
269 // Output:
270 //
271 // Return:
272 //
273 // Created: 03 Feb 2020 Mario Sitta
274 //
275
276 obConeSideA(mother, mgr);
277 obConeTraysSideA(mother, mgr);
278}
279
280void V3Services::createOBConeSideC(TGeoVolume* mother, const TGeoManager* mgr)
281{
282 //
283 // Creates the Outer Barrel Cone on Side C
284 //
285 // Input:
286 // mother : the volume hosting the cones
287 // mgr : the GeoManager (used only to get the proper material)
288 //
289 // Output:
290 //
291 // Return:
292 //
293 // Created: 26 Jan 2020 Mario Sitta
294 //
295
296 obConeSideC(mother, mgr);
297}
298
299void V3Services::createOBCYSSCylinder(TGeoVolume* mother, const TGeoManager* mgr)
300{
301 //
302 // Creates the Outer Barrel CYSS Cylinder
303 // Volume and method names correspond to element names in blueprints
304 //
305 // Input:
306 // mother : the volume hosting the cones
307 // mgr : the GeoManager (used only to get the proper material)
308 //
309 // Output:
310 //
311 // Return:
312 //
313 // Created: 02 Mar 2020 Mario Sitta
314 // Last change: 14 Apr 2022 Matteo Concas
315
316 obCYSS11(mother, mgr);
317}
318
319void V3Services::createIBGammaConvWire(TGeoVolume* mother, const TGeoManager* mgr)
320{
321 //
322 // Creates the Inner Barrel Gamma Conversion Wire
323 // Volume and method names correspond to element names in blueprints
324 //
325 // Input:
326 // mother : the volume hosting the cones
327 // mgr : the GeoManager (used only to get the proper material)
328 //
329 // Output:
330 //
331 // Return:
332 //
333 // Created: 28 Sep 2022 Mario Sitta
334 //
335
336 ibConvWire(mother, mgr);
337}
338
339void V3Services::createOBGammaConvWire(TGeoVolume* mother, const TGeoManager* mgr)
340{
341 //
342 // Creates the Outer Barrel Gamma Conversion Wire
343 // Volume and method names correspond to element names in blueprints
344 //
345 // Input:
346 // mother : the volume hosting the cones
347 // mgr : the GeoManager (used only to get the proper material)
348 //
349 // Output:
350 //
351 // Return:
352 //
353 // Created: 08 Sep 2022 Mario Sitta
354 //
355
356 obConvWire(mother, mgr);
357}
358
359void V3Services::ibEndWheelSideA(const Int_t iLay, TGeoVolume* endWheel, const TGeoManager* mgr)
360{
361 //
362 // Creates the single End Wheel on Side A
363 // for a given layer of the Inner Barrel
364 // (Layer 0: ALIITSSUP0183+ALIITSUP0127)
365 // (Layer 1: ALIITSSUP0173+ALIITSUP0124)
366 // (Layer 2: ALIITSSUP0139+ALIITSUP0125)
367 //
368 // Input:
369 // iLay : the layer number
370 // endWheel : the whole end wheel volume
371 // where to place the current created wheel
372 // mgr : the GeoManager (used only to get the proper material)
373 //
374 // Output:
375 //
376 // Return:
377 //
378 // Created: 19 Jun 2019 Mario Sitta
379 // (partially based on P.Namwongsa implementation in AliRoot)
380 //
381
382 // The Basis Cone A Side and the Reinforcement C Side are physically two
383 // different pieces put together. For sake of simplicity here they are
384 // made out of the same TGeoPcon volume. Moreover they are two halves,
385 // so here they are made as a single cone.
386 static const Double_t sConeATotalLength[3] = {191.0 * sMm, 184.0 * sMm, 177 * sMm};
387 static const Double_t sConeAIntSectZlen1[3] = {40.35 * sMm, 39.0 * sMm, 36.0 * sMm};
388 static const Double_t sConeAIntSectZlen2[3] = {47.0 * sMm, 44.0 * sMm, 41.0 * sMm};
389 static const Double_t sConeAIntSectDmin[3] = {55.8 * sMm, 71.8 * sMm, 87.8 * sMm};
390 static const Double_t sConeAIntSectDmax[3] = {57.0 * sMm, 73.0 * sMm, 89.0 * sMm};
391 static const Double_t sConeAExtSectZlen1[3] = {60.0 * sMm, 47.0 * sMm, 44.0 * sMm};
392 static const Double_t sConeAExtSectZlen2[3] = {66.0 * sMm, 52.0 * sMm, 50.0 * sMm};
393 static const Double_t sConeAExtSectDmin[3] = {114.0 * sMm, 174.0 * sMm, 234.0 * sMm};
394 static const Double_t sConeAExtSectDmax[3] = {116.0 * sMm, 176.0 * sMm, 236.0 * sMm};
395 static const Double_t sConeASectThicker = 0.8 * sMm;
396 static const Double_t sConeAOpeningAngle[3] = {20.0, 30.0, 40.2}; // Deg
397
398 static const Int_t sConeAWallNHoles[3] = {6, 8, 10};
399 static const Double_t sConeAWallHoleD = 4.5 * sMm;
400 static const Double_t sConeAWallHoleZpos = 4.0 * sMm;
401
402 static const Double_t sConeACentralHole1D = 3.0 * sMm;
403 static const Double_t sConeACentralHole2D = 3.4 * sMm;
404 static const Double_t sConeACentralHole3D = 3.0 * sMm;
405 static const Double_t sConeACentralHole1Z = 20.0 * sMm;
406 static const Double_t sConeACentralHole2Z = 30.0 * sMm;
407 static const Double_t sConeACentralHole3Z[3] = {177.0 * sMm, 170.0 * sMm, 163.0 * sMm};
408
409 // The Cone Reinforcement
410 static const Double_t sConeARenfDmin[3] = {54.3 * sMm, 69.85 * sMm, 85.0 * sMm};
411 static const Double_t sConeARenfZlen = 2.5 * sMm;
412 static const Double_t sConeARenfZpos = 14.5 * sMm;
413
414 // The Middle Ring
415 static const Double_t sConeAMidRingDmin[3] = {56.0 * sMm, 116.0 * sMm, 176.0 * sMm};
416 static const Double_t sConeAMidRingDmax[3] = {58.0 * sMm, 118.0 * sMm, 178.0 * sMm};
417 static const Double_t sConeAMidRingZlen = 42.0 * sMm;
418
419 static const Double_t sConeAMidRingZpos[3] = {5.0 * sMm, 0.0 * sMm, 0.0 * sMm};
420
421 // The Ribs
422 static const Int_t sConeANRibs[3] = {6, 8, 10};
423 static const Double_t sConeARibsZpos = 17.0 * sMm;
424
425 // The End Wheel Steps
426 static const Double_t sConeAStepXdispl[3] = {4.0 * sMm, 6.5 * sMm, 8.5 * sMm};
427 static const Double_t sConeAStepYdispl[3] = {24.4 * sMm, 32.1 * sMm, 39.6 * sMm};
428 static const Double_t sConeAStepR[3] = {27.8 * sMm, 35.8 * sMm, 43.8 * sMm};
429
430 static const Double_t sConeAStepZlen = 14.0 * sMm;
431
432 static const Double_t sConeAStepHoleXpos = 3.0 * sMm;
433 static const Double_t sConeAStepHoleZpos = 4.0 * sMm;
434 static const Double_t sConeAStepHoleZdist = 4.0 * sMm;
435
436 static const Double_t sConeAStepHolePhi[3] = {30.0, 22.5, 18.0}; // Deg
437 static const Double_t sConeAStepHolePhi0[3] = {0.7, -16.2, -10.5}; // Deg
438
439 // Local variables
440 Double_t xlen, ylen, zlen;
441 Double_t rmin, rmax, thick, phimin, dphi;
442 Double_t xpos, ypos, zpos, zref;
443
444 // Create the whole cone (Basic + Reinforcement) as a CompositeShape
445 // (a single Pcon minus the holes)
446 TGeoPcon* coneabasis = new TGeoPcon(Form("coneabasis%d", iLay), 0, 360, 15);
447
448 rmin = sConeAIntSectDmin[iLay] / 2;
449 rmax = sConeAIntSectDmax[iLay] / 2;
450 coneabasis->DefineSection(0, 0., rmin, rmax);
451 zpos = sConeARenfZpos;
452 coneabasis->DefineSection(1, zpos, rmin, rmax);
453 rmin = sConeARenfDmin[iLay] / 2;
454 coneabasis->DefineSection(2, zpos, rmin, rmax);
455 zpos += sConeARenfZlen;
456 coneabasis->DefineSection(3, zpos, rmin, rmax);
457 rmin = coneabasis->GetRmin(0);
458 coneabasis->DefineSection(4, zpos, rmin, rmax);
459 coneabasis->DefineSection(5, sConeAIntSectZlen1[iLay], rmin, rmax);
460 rmax += sConeASectThicker;
461 coneabasis->DefineSection(6, sConeAIntSectZlen1[iLay], rmin, rmax);
462 coneabasis->DefineSection(7, sConeAIntSectZlen2[iLay], rmin, rmax);
463 rmin = coneabasis->GetRmax(1);
464 coneabasis->DefineSection(8, sConeAIntSectZlen2[iLay], rmin, rmax);
465 rmin = sConeAExtSectDmin[iLay] / 2 - sConeASectThicker;
466 rmax = sConeAExtSectDmin[iLay] / 2;
467 zlen = sConeAIntSectZlen2[iLay] + (rmin - coneabasis->GetRmin(4)) / TMath::Tan(sConeAOpeningAngle[iLay] * TMath::DegToRad());
468 coneabasis->DefineSection(9, zlen, rmin, rmax);
469 zlen = sConeATotalLength[iLay] - sConeAExtSectZlen2[iLay];
470 coneabasis->DefineSection(10, zlen, rmin, rmax);
471 rmax = sConeAExtSectDmax[iLay] / 2;
472 coneabasis->DefineSection(11, zlen, rmin, rmax);
473 zlen = sConeATotalLength[iLay] - sConeAExtSectZlen1[iLay];
474 coneabasis->DefineSection(12, zlen, rmin, rmax);
475 rmin = sConeAExtSectDmin[iLay] / 2;
476 coneabasis->DefineSection(13, zlen, rmin, rmax);
477 coneabasis->DefineSection(14, sConeATotalLength[iLay], rmin, rmax);
478
479 TString coneAComposite = Form("coneabasis%d", iLay);
480
481 // The holes in the vertical wall
482 thick = coneabasis->GetRmax(0) - coneabasis->GetRmin(0);
483 TGeoTube* coneawallhole = new TGeoTube(Form("coneawallhole%d", iLay), 0, sConeAWallHoleD / 2, 4 * thick);
484
485 rmin = sConeAIntSectDmax[iLay] / 2 - thick / 2;
486 zpos = sConeAWallHoleZpos;
487 dphi = 180. / sConeAWallNHoles[iLay];
488 phimin = dphi / 2.;
489 for (Int_t ihole = 0; ihole < 2 * sConeAWallNHoles[iLay]; ihole++) {
490 Double_t phi = phimin + ihole * dphi;
491 xpos = rmin * TMath::Sin(phi * TMath::DegToRad());
492 ypos = rmin * TMath::Cos(phi * TMath::DegToRad());
493 TGeoCombiTrans* coneawhmat = new TGeoCombiTrans(Form("coneawhmat%dl%d", ihole, iLay), xpos, ypos, zpos, new TGeoRotation("", -phi, 90, 0));
494 coneawhmat->RegisterYourself();
495 coneAComposite += Form("-coneawallhole%d:coneawhmat%dl%d", iLay, ihole, iLay);
496 }
497
498 // The central holes
499 TGeoTube* coneacenthole1 = new TGeoTube(Form("coneacenthole1l%d", iLay), 0, sConeACentralHole1D / 2, 4 * thick);
500
501 TGeoCombiTrans* coneach1mat1 = new TGeoCombiTrans(Form("coneach1mat1l%d", iLay), 0, rmin, sConeACentralHole1Z, new TGeoRotation("", 0, 90, 0));
502 coneach1mat1->RegisterYourself();
503 TGeoCombiTrans* coneach1mat2 = new TGeoCombiTrans(Form("coneach1mat2l%d", iLay), 0, -rmin, sConeACentralHole1Z, new TGeoRotation("", 0, 90, 0));
504 coneach1mat2->RegisterYourself();
505
506 coneAComposite += Form("-coneacenthole1l%d:coneach1mat1l%d-coneacenthole1l%d:coneach1mat2l%d", iLay, iLay, iLay, iLay);
507
508 TGeoTube* coneacenthole2 = new TGeoTube(Form("coneacenthole2l%d", iLay), 0, sConeACentralHole2D / 2, 4 * thick);
509
510 TGeoCombiTrans* coneach2mat1 = new TGeoCombiTrans(Form("coneach2mat1l%d", iLay), 0, rmin, sConeACentralHole2Z, new TGeoRotation("", 0, 90, 0));
511 coneach2mat1->RegisterYourself();
512 TGeoCombiTrans* coneach2mat2 = new TGeoCombiTrans(Form("coneach2mat2l%d", iLay), 0, -rmin, sConeACentralHole2Z, new TGeoRotation("", 0, 90, 0));
513 coneach2mat2->RegisterYourself();
514
515 coneAComposite += Form("-coneacenthole2l%d:coneach2mat1l%d-coneacenthole2l%d:coneach2mat2l%d", iLay, iLay, iLay, iLay);
516
517 TGeoTube* coneacenthole3 = new TGeoTube(Form("coneacenthole3l%d", iLay), 0, sConeACentralHole3D / 2, 4 * thick);
518
519 rmin = sConeAExtSectDmax[iLay] / 2 - thick / 2;
520 TGeoCombiTrans* coneach3mat1 = new TGeoCombiTrans(Form("coneach3mat1l%d", iLay), 0, rmin, sConeACentralHole3Z[iLay], new TGeoRotation("", 0, 90, 0));
521 coneach3mat1->RegisterYourself();
522 TGeoCombiTrans* coneach3mat2 = new TGeoCombiTrans(Form("coneach3mat2l%d", iLay), 0, -rmin, sConeACentralHole3Z[iLay], new TGeoRotation("", 0, 90, 0));
523 coneach3mat2->RegisterYourself();
524
525 coneAComposite += Form("-coneacenthole3l%d:coneach3mat1l%d-coneacenthole3l%d:coneach3mat2l%d", iLay, iLay, iLay, iLay);
526
527 TGeoCompositeShape* coneABasisSh = new TGeoCompositeShape(coneAComposite.Data());
528
529 // The Middle Ring (a Tube)
530 rmin = sConeAMidRingDmin[iLay] / 2;
531 rmax = sConeAMidRingDmax[iLay] / 2;
532 zlen = sConeAMidRingZlen / 2;
533 TGeoTube* midRingSh = new TGeoTube(Form("midRingSh%d", iLay), rmin, rmax, zlen);
534
535 // A Rib (a TGeoXtru)
536 TGeoXtru* coneARibSh = ibEndWheelARibShape(iLay);
537
538 // Now the Step as a Composite Shape (subtraction of a Pcon from a BBox)
539 // (cutting volume should be slightly larger than desired region)
540 rmin = sConeAStepR[iLay];
541
542 xlen = TMath::Sqrt(rmin * rmin - sConeAStepYdispl[iLay] * sConeAStepYdispl[iLay]) - sConeAStepXdispl[iLay];
543 ylen = TMath::Sqrt(rmin * rmin - sConeAStepXdispl[iLay] * sConeAStepXdispl[iLay]) - sConeAStepYdispl[iLay];
544 TGeoBBox* stepBoxSh = new TGeoBBox(Form("stepBoxASh%d", iLay), xlen / 2, ylen / 2, sConeAStepZlen / 2);
545
546 xpos = sConeAStepXdispl[iLay] + stepBoxSh->GetDX();
547 ypos = sConeAStepYdispl[iLay] + stepBoxSh->GetDY();
548 TGeoTranslation* stepBoxTr = new TGeoTranslation(Form("stepBoxATr%d", iLay), xpos, ypos, 0);
549 stepBoxTr->RegisterYourself();
550
551 phimin = 90. - TMath::ACos(sConeAStepYdispl[iLay] / rmin) * TMath::RadToDeg() - 5;
552 dphi = 90. - TMath::ASin(sConeAStepXdispl[iLay] / rmin) * TMath::RadToDeg() - phimin + 10;
553 rmax = rmin + 2 * stepBoxSh->GetDY();
554
555 TGeoPcon* stepPconSh = new TGeoPcon(Form("stepPconASh%d", iLay), phimin, dphi, 2);
556 stepPconSh->DefineSection(0, -1.05 * sConeAStepZlen / 2, rmin, rmax);
557 stepPconSh->DefineSection(1, 1.05 * sConeAStepZlen / 2, rmin, rmax);
558
559 TGeoCompositeShape* stepASh = new TGeoCompositeShape(Form("stepBoxASh%d:stepBoxATr%d-stepPconASh%d", iLay, iLay, iLay));
560
561 // We have all shapes: now create the real volumes
562 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
563 TGeoMedium* medPEEK = mgr->GetMedium(Form("%s_PEEKCF30$", GetDetName()));
564
565 TGeoVolume* coneABasisVol = new TGeoVolume(Form("ConeABasis%d", iLay), coneABasisSh, medCarbon);
566 coneABasisVol->SetFillColor(kBlue);
567 coneABasisVol->SetLineColor(kBlue);
568
569 TGeoVolume* midRingVol = new TGeoVolume(Form("ConeAMidRing%d", iLay), midRingSh, medCarbon);
570 coneABasisVol->SetFillColor(kBlue);
571 coneABasisVol->SetLineColor(kBlue);
572
573 TGeoVolume* coneARibVol = new TGeoVolume(Form("ConeARibVol%d", iLay), coneARibSh, medCarbon);
574 coneARibVol->SetFillColor(kBlue);
575 coneARibVol->SetLineColor(kBlue);
576
577 TGeoVolume* stepAVol = new TGeoVolume(Form("ConeAStep%d", iLay), stepASh, medPEEK);
578 stepAVol->SetFillColor(kBlue);
579 stepAVol->SetLineColor(kBlue);
580
581 // Finally put everything in the mother volume
582 // (origin of local coordinates is at smaller end of Cone Basis)
583 zref = sIBWheelACZdist / 2 - (sConeAStepHoleZpos + sConeAStepHoleZdist);
584
585 zpos = zref;
586 endWheel->AddNode(coneABasisVol, 1, new TGeoTranslation(0, 0, zpos));
587
588 zpos = zref + sConeATotalLength[iLay] - sConeAMidRingZpos[iLay] - midRingSh->GetDz();
589 endWheel->AddNode(midRingVol, 1, new TGeoTranslation(0, 0, zpos));
590
591 rmin = sConeAExtSectDmin[iLay] / 2 - 0.035;
592 zpos = zref + sConeATotalLength[iLay] - sConeARibsZpos;
593 dphi = 180. / sConeANRibs[iLay];
594 for (Int_t irib = 0; irib < 2 * sConeANRibs[iLay]; irib++) {
595 Double_t phi = irib * dphi;
596 xpos = rmin * TMath::Sin(phi * TMath::DegToRad());
597 ypos = rmin * TMath::Cos(phi * TMath::DegToRad());
598 endWheel->AddNode(coneARibVol, 1, new TGeoCombiTrans(xpos, -ypos, zpos, new TGeoRotation("", 90 + phi, 90, -90)));
599 }
600
601 // The position of the Steps is given wrt the holes (see eg. ALIITSUP0187)
602 dphi = 180. - sConeAStepHolePhi0[iLay];
603
604 Int_t numberOfStaves = GeometryTGeo::Instance()->getNumberOfStaves(iLay);
605 zpos = zref + (static_cast<TGeoBBox*>(stepAVol->GetShape()))->GetDZ();
606 for (Int_t j = 0; j < numberOfStaves; j++) {
607 Double_t phi = dphi + j * sConeAStepHolePhi[iLay];
608 endWheel->AddNode(stepAVol, j + 1, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 180, 180, -90 - phi)));
609 }
610}
611
612void V3Services::ibEndWheelSideC(const Int_t iLay, TGeoVolume* endWheel, const TGeoManager* mgr)
613{
614 //
615 // Creates the single End Wheel on Side C
616 // for a given layer of the Inner Barrel
617 // (Layer 0: ALIITSSUP0186+ALIITSUP0126)
618 // (Layer 1: ALIITSSUP0176+ALIITSUP0123)
619 // (Layer 2: ALIITSSUP0143+ALIITSUP0121)
620 //
621 // Input:
622 // iLay : the layer number
623 // endWheel : the whole end wheel volume
624 // where to place the current created wheel
625 // mgr : the GeoManager (used only to get the proper material)
626 //
627 // Output:
628 //
629 // Return:
630 //
631 // Created: 15 May 2019 Mario Sitta
632 // (partially based on P.Namwongsa implementation in AliRoot)
633 //
634
635 // The Basis C Side and the Reinforcement C Side are physically two
636 // different pieces put together. For sake of simplicity here they are
637 // made out of the same TGeoPcon volume. Moreover they are two halves,
638 // so here they are made as a single cylinder.
639 // The End Wheel Basis
640 static const Double_t sEndWheelCDmax[3] = {57.0 * sMm, 73.0 * sMm, 89.0 * sMm};
641 static const Double_t sEndWheelCDmin[3] = {44.5 * sMm, 58.0 * sMm, 74.0 * sMm};
642 static const Double_t sEndWheelCHeigh[3] = {25.0 * sMm, 22.5 * sMm, 20.0 * sMm};
643 static const Double_t sEndWheelCThick = 0.6 * sMm;
644
645 static const Int_t sEndWCWallNHoles[3] = {6, 8, 10};
646 static const Double_t sEndWCWallHoleD = 4.5 * sMm;
647 static const Double_t sEndWCWallHoleZpos = 4.0 * sMm;
648
649 static const Int_t sEndWCBaseNBigHoles = 5;
650 static const Int_t sEndWCBaseNSmalHoles = 6;
651 static const Double_t sEndWCBaseBigHoleD = 3.6 * sMm;
652 static const Double_t sEndWCBaseSmalHoleD = 2.5 * sMm;
653 static const Double_t sEndWCBaseHolesDpos[3] = {50.0 * sMm, 64.0 * sMm, 80.0 * sMm};
654 static const Double_t sEndWCBaseHolesPhi = 15.0; // Deg
655
656 // The End Wheel Reinforcement
657 static const Double_t sEndWCRenfDmin[3] = {44.0 * sMm, 58.0 * sMm, 74.0 * sMm};
658 static const Double_t sEndWCRenfDint[3] = {55.0 * sMm, 71.0 * sMm, 87.0 * sMm};
659 static const Double_t sEndWCRenfHeigh[3] = {4.0 * sMm, 3.0 * sMm, 3.0 * sMm};
660 static const Double_t sEndWCRenfThick = 0.6 * sMm;
661
662 static const Double_t sEndWCRenfZpos = 14.2 * sMm;
663
664 static const Int_t sEndWCRenfNSmalHoles[3] = {5, 7, 9};
665
666 // The End Wheel Steps
667 static const Double_t sEndWCStepXdispl[3] = {4.0 * sMm, 6.5 * sMm, 8.5 * sMm};
668 static const Double_t sEndWCStepYdispl[3] = {24.4 * sMm, 32.1 * sMm, 39.6 * sMm};
669 static const Double_t sEndWCStepR[3] = {27.8 * sMm, 35.8 * sMm, 43.8 * sMm};
670
671 static const Double_t sEndWCStepZlen = 14.0 * sMm;
672
673 static const Double_t sEndWCStepHoleXpos = 3.0 * sMm;
674 static const Double_t sEndWCStepHoleZpos = 4.0 * sMm;
675 static const Double_t sEndWCStepHoleZdist = 4.0 * sMm;
676
677 static const Double_t sEndWCStepHolePhi[3] = {30.0, 22.5, 18.0}; // Deg
678 static const Double_t sEndWCStepHolePhi0[2] = {9.5, 10.5}; // Deg - Lay 1-2
679 static const Double_t sEndWCStepYlow = 7.0 * sMm; // Lay 0 only
680
681 // Local variables
682 Double_t xlen, ylen, zlen;
683 Double_t rmin, rmax, phimin, dphi;
684 Double_t xpos, ypos, zpos;
685
686 // Create the whole wheel (Basic + Reinforcement) as a CompositeShape
687 // (a single Pcon minus the (copious!) holes)
688 TGeoPcon* endwcbasis = new TGeoPcon(Form("endwcbasis%d", iLay), 0, 360, 10);
689
690 rmin = sEndWheelCDmax[iLay] / 2 - sEndWheelCThick;
691 endwcbasis->DefineSection(0, 0., rmin, sEndWheelCDmax[iLay] / 2);
692 endwcbasis->DefineSection(1, sEndWCRenfZpos, rmin, sEndWheelCDmax[iLay] / 2);
693 endwcbasis->DefineSection(2, sEndWCRenfZpos, sEndWCRenfDmin[iLay] / 2, sEndWheelCDmax[iLay] / 2);
694 zlen = sEndWCRenfZpos + sEndWCRenfThick;
695 endwcbasis->DefineSection(3, zlen, sEndWCRenfDmin[iLay] / 2, sEndWheelCDmax[iLay] / 2);
696 endwcbasis->DefineSection(4, zlen, sEndWCRenfDint[iLay] / 2, sEndWheelCDmax[iLay] / 2);
697 zlen = sEndWCRenfZpos + sEndWCRenfHeigh[iLay];
698 endwcbasis->DefineSection(5, zlen, sEndWCRenfDint[iLay] / 2, sEndWheelCDmax[iLay] / 2);
699 endwcbasis->DefineSection(6, zlen, rmin, sEndWheelCDmax[iLay] / 2);
700 zlen = sEndWheelCHeigh[iLay] - sEndWheelCThick;
701 endwcbasis->DefineSection(7, zlen, rmin, sEndWheelCDmax[iLay] / 2);
702 endwcbasis->DefineSection(8, zlen, sEndWheelCDmin[iLay] / 2, sEndWheelCDmax[iLay] / 2);
703 endwcbasis->DefineSection(9, sEndWheelCHeigh[iLay], sEndWheelCDmin[iLay] / 2, sEndWheelCDmax[iLay] / 2);
704
705 TString endWheelComposite = Form("endwcbasis%d", iLay);
706
707 // The holes in the vertical wall
708 TGeoTube* endwcwalhol = new TGeoTube(Form("endwcwalhol%d", iLay), 0, sEndWCWallHoleD / 2, 4 * sEndWheelCThick);
709
710 rmin = sEndWheelCDmax[iLay] / 2 - sEndWheelCThick / 2;
711 zpos = sEndWCWallHoleZpos;
712 dphi = 180. / sEndWCWallNHoles[iLay];
713 phimin = dphi / 2.;
714 for (Int_t ihole = 0; ihole < 2 * sEndWCWallNHoles[iLay]; ihole++) {
715 Double_t phi = phimin + ihole * dphi;
716 xpos = rmin * TMath::Sin(phi * TMath::DegToRad());
717 ypos = rmin * TMath::Cos(phi * TMath::DegToRad());
718 TGeoCombiTrans* endwcwhmat = new TGeoCombiTrans(Form("endwcwhmat%dl%d", ihole, iLay), xpos, ypos, zpos, new TGeoRotation("", -phi, 90, 0));
719 endwcwhmat->RegisterYourself();
720 endWheelComposite += Form("-endwcwalhol%d:endwcwhmat%dl%d", iLay, ihole, iLay);
721 }
722
723 // The holes in the base
724 TGeoTube* endwcbasBhol = new TGeoTube(Form("endwcbasBhol%d", iLay), 0, sEndWCBaseBigHoleD / 2, 1.5 * sEndWheelCThick);
725
726 TGeoTube* endwcbasShol = new TGeoTube(Form("endwcbasShol%d", iLay), 0, sEndWCBaseSmalHoleD / 2, 1.5 * sEndWheelCThick);
727
728 rmin = sEndWCBaseHolesDpos[iLay] / 2;
729 zpos = (endwcbasis->GetZ(8) + endwcbasis->GetZ(9)) / 2;
730
731 char holename[strlen(endwcbasBhol->GetName()) + 1];
732
733 phimin = 0.;
734 for (Int_t ihole = 0; ihole < (sEndWCBaseNBigHoles + sEndWCBaseNSmalHoles); ihole++) {
735 phimin += sEndWCBaseHolesPhi;
736 xpos = rmin * TMath::Cos(phimin * TMath::DegToRad());
737 ypos = rmin * TMath::Sin(phimin * TMath::DegToRad());
738 TGeoTranslation* endwcbshmata = new TGeoTranslation(Form("endwcbshmat%dl%da", ihole, iLay), xpos, ypos, zpos);
739 endwcbshmata->RegisterYourself();
740 TGeoTranslation* endwcbshmatb = new TGeoTranslation(Form("endwcbshmat%dl%db", ihole, iLay), -xpos, -ypos, zpos);
741 endwcbshmatb->RegisterYourself();
742 if ((ihole > 1 && ihole < 5) || (ihole > 5 && ihole < 9)) { // Small holes
743 strcpy(holename, endwcbasShol->GetName());
744 } else {
745 strcpy(holename, endwcbasBhol->GetName());
746 }
747 endWheelComposite += Form("-%s:endwcbshmat%dl%da-%s:endwcbshmat%dl%db", holename, ihole, iLay, holename, ihole, iLay);
748 }
749
750 // The holes in the reinforcement
751 zpos = (endwcbasis->GetZ(2) + endwcbasis->GetZ(3)) / 2;
752
753 phimin = 0.;
754 dphi = 180. / (sEndWCRenfNSmalHoles[iLay] + 1);
755 for (Int_t ihole = 0; ihole < sEndWCRenfNSmalHoles[iLay]; ihole++) {
756 phimin += dphi;
757 xpos = rmin * TMath::Cos(phimin * TMath::DegToRad());
758 ypos = rmin * TMath::Sin(phimin * TMath::DegToRad());
759 TGeoTranslation* endwcrshmata = new TGeoTranslation(Form("endwcrshmat%dl%da", ihole, iLay), xpos, ypos, zpos);
760 endwcrshmata->RegisterYourself();
761 TGeoTranslation* endwcrshmatb = new TGeoTranslation(Form("endwcrshmat%dl%db", ihole, iLay), -xpos, -ypos, zpos);
762 endwcrshmatb->RegisterYourself();
763 endWheelComposite += Form("-endwcbasShol%d:endwcrshmat%dl%da-endwcbasShol%d:endwcrshmat%dl%db", iLay, ihole, iLay, iLay, ihole, iLay);
764 }
765
766 TGeoCompositeShape* endWheelCSh = new TGeoCompositeShape(endWheelComposite.Data());
767
768 // Now the Step as a Composite Shape (subtraction of a Pcon from a BBox)
769 // (cutting volume should be slightly larger than desired region)
770 rmin = sEndWCStepR[iLay];
771
772 xlen = TMath::Sqrt(rmin * rmin - sEndWCStepYdispl[iLay] * sEndWCStepYdispl[iLay]) - sEndWCStepXdispl[iLay];
773 ylen = TMath::Sqrt(rmin * rmin - sEndWCStepXdispl[iLay] * sEndWCStepXdispl[iLay]) - sEndWCStepYdispl[iLay];
774 TGeoBBox* stepBoxSh = new TGeoBBox(Form("stepBoxCSh%d", iLay), xlen / 2, ylen / 2, sEndWCStepZlen / 2);
775
776 xpos = sEndWCStepXdispl[iLay] + stepBoxSh->GetDX();
777 ypos = sEndWCStepYdispl[iLay] + stepBoxSh->GetDY();
778 TGeoTranslation* stepBoxTr = new TGeoTranslation(Form("stepBoxCTr%d", iLay), xpos, ypos, 0);
779 stepBoxTr->RegisterYourself();
780
781 phimin = 90. - TMath::ACos(sEndWCStepYdispl[iLay] / rmin) * TMath::RadToDeg() - 5;
782 dphi = 90. - TMath::ASin(sEndWCStepXdispl[iLay] / rmin) * TMath::RadToDeg() - phimin + 10;
783 rmax = rmin + 2 * stepBoxSh->GetDY();
784
785 TGeoPcon* stepPconSh = new TGeoPcon(Form("stepPconCSh%d", iLay), phimin, dphi, 2);
786 stepPconSh->DefineSection(0, -1.05 * sEndWCStepZlen / 2, rmin, rmax);
787 stepPconSh->DefineSection(1, 1.05 * sEndWCStepZlen / 2, rmin, rmax);
788
789 TGeoCompositeShape* stepCSh = new TGeoCompositeShape(Form("stepBoxCSh%d:stepBoxCTr%d-stepPconCSh%d", iLay, iLay, iLay));
790
791 // We have all shapes: now create the real volumes
792 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
793 TGeoMedium* medPEEK = mgr->GetMedium(Form("%s_PEEKCF30$", GetDetName()));
794
795 TGeoVolume* endWheelCVol = new TGeoVolume(Form("EndWheelCBasis%d", iLay), endWheelCSh, medCarbon);
796 endWheelCVol->SetFillColor(kBlue);
797 endWheelCVol->SetLineColor(kBlue);
798
799 TGeoVolume* stepCVol = new TGeoVolume(Form("EndWheelCStep%d", iLay), stepCSh, medPEEK);
800 stepCVol->SetFillColor(kBlue);
801 stepCVol->SetLineColor(kBlue);
802
803 // Finally put everything in the mother volume
804 zpos = sIBWheelACZdist / 2 - (sEndWCStepHoleZpos + sEndWCStepHoleZdist);
805 endWheel->AddNode(endWheelCVol, 1, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 0, 180, 0)));
806
807 // The position of the Steps is given wrt the holes (see eg. ALIITSUP0187)
808 if (iLay == 0) {
809 dphi = (sEndWCStepYlow / sEndWCStepYdispl[iLay]) * TMath::RadToDeg();
810 } else {
811 dphi = sEndWCStepHolePhi0[iLay - 1];
812 }
813
814 Int_t numberOfStaves = GeometryTGeo::Instance()->getNumberOfStaves(iLay);
815 zpos += (static_cast<TGeoBBox*>(stepCVol->GetShape()))->GetDZ();
816 for (Int_t j = 0; j < numberOfStaves; j++) {
817 Double_t phi = dphi + j * sEndWCStepHolePhi[iLay];
818 endWheel->AddNode(stepCVol, j + 1, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 180, 180, -90 - phi)));
819 }
820}
821
822TGeoXtru* V3Services::ibEndWheelARibShape(const Int_t iLay)
823{
824 //
825 // Creates the shape of a Rib on Side A cone
826 // (Layer 0: ALIITSSUP0182)
827 // (Layer 1: ALIITSSUP0172)
828 // (Layer 2: ALIITSSUP0136)
829 //
830 // Input:
831 // iLay : the layer number
832 //
833 // Output:
834 //
835 // Return:
836 // the Rib shape as a TGeoXtru
837 //
838 // Created: 23 Aug 2019 Mario Sitta
839 //
840
841 static const Int_t sConeARibNVert = 8;
842
843 static const Double_t sConeARibWidth = 27.3 * sMm;
844 static const Double_t sConeARibTotalLen[3] = {98.03 * sMm, 104.65 * sMm, 101.43 * sMm};
845 static const Double_t sConeARibIntLen[3] = {50.0 * sMm, 40.0 * sMm, 28.5 * sMm};
846 static const Double_t sConeARibStep[3] = {1.0 * sMm, 1.1 * sMm, 1.0 * sMm};
847 static const Double_t sConeARibLenToStep[3] = {42.0 * sMm, 29.0 * sMm, 26.0 * sMm};
848 static const Double_t sConeARibLenAfterStep[3] = {50.5 * sMm, 37.0 * sMm, 33.5 * sMm};
849 static const Double_t sConeARibVertexPos[3] = {9.0 * sMm, 40.0 * sMm, 58.0 * sMm};
850 static const Double_t sConeARibIntAngle = 45.0; // Deg
851 static const Double_t sConeARibVertexAngle[2] = {20.0, 30.0}; // Deg
852
853 static const Double_t sConeARibThick = 0.9 * sMm;
854
855 // Local variables
856 Double_t xtru[sConeARibNVert], ytru[sConeARibNVert];
857
858 // Rib shapes for Layer 0 and Layers 1,2 are different
859 xtru[0] = 0.;
860 ytru[0] = 0.;
861 xtru[1] = sConeARibLenToStep[iLay];
862 ytru[1] = 0.;
863 xtru[2] = xtru[1];
864 ytru[2] = sConeARibStep[iLay];
865 xtru[3] = sConeARibLenAfterStep[iLay];
866 ytru[3] = ytru[2];
867 xtru[4] = sConeARibTotalLen[iLay];
868 if (iLay == 0) {
869 ytru[4] = sConeARibWidth - sConeARibVertexPos[iLay];
870 xtru[5] = sConeARibIntLen[iLay] + sConeARibVertexPos[iLay] / TMath::Tan(sConeARibIntAngle * TMath::DegToRad());
871 } else {
872 ytru[4] = sConeARibVertexPos[iLay];
873 xtru[5] = sConeARibIntLen[iLay] + (sConeARibVertexPos[iLay] - sConeARibWidth) / TMath::Tan(sConeARibVertexAngle[iLay - 1] * TMath::DegToRad());
874 }
875 ytru[5] = ytru[4];
876 xtru[6] = sConeARibIntLen[iLay];
877 ytru[6] = sConeARibWidth;
878 xtru[7] = 0.;
879 ytru[7] = ytru[6];
880
881 // The actual Xtru
882 TGeoXtru* ribShape = new TGeoXtru(2);
883 ribShape->DefinePolygon(sConeARibNVert, xtru, ytru);
884 ribShape->DefineSection(0, -sConeARibThick / 2);
885 ribShape->DefineSection(1, sConeARibThick / 2);
886
887 return ribShape;
888}
889
890TGeoVolume* V3Services::ibCyssCylinder(const TGeoManager* mgr)
891{
892 //
893 // Creates the cylinder of the Inner Barrel CYSS
894 // (ALIITSUP0191)
895 //
896 // Input:
897 // mgr : the GeoManager (used only to get the proper material)
898 //
899 // Output:
900 //
901 // Return:
902 // the cylinder as a TGeoVolume
903 //
904 // Created: 21 Oct 2019 Mario Sitta
905 //
906
907 static const Double_t sCyssCylInnerD = 95.6 * sMm;
908 static const Double_t sCyssCylOuterD = 100.0 * sMm;
909 static const Double_t sCyssCylZLength = 353.0 * sMm;
910 static const Double_t sCyssCylFabricThick = 0.1 * sMm;
911
912 // Local variables
913 Double_t rmin, rmax, zlen, phimin, phimax, dphi;
914
915 // First create the shapes
916 rmin = sCyssCylInnerD / 2;
917 rmax = sCyssCylOuterD / 2;
918 zlen = sCyssCylZLength / 2;
919 TGeoTubeSeg* cyssOuterCylSh = new TGeoTubeSeg(rmin, rmax, zlen, 180, 360);
920
921 rmin += sCyssCylFabricThick;
922 rmax -= sCyssCylFabricThick;
923 zlen -= sCyssCylFabricThick;
924
925 dphi = TMath::ASin(sCyssCylFabricThick / rmax);
926 phimin = 180 + dphi * TMath::RadToDeg();
927 phimax = 360 - dphi * TMath::RadToDeg();
928
929 TGeoTubeSeg* cyssInnerCylSh = new TGeoTubeSeg(rmin, rmax, zlen, phimin, phimax);
930
931 // We have all shapes: now create the real volumes
932 TGeoMedium* medPrepreg = mgr->GetMedium(Form("%s_AS4C200$", GetDetName()));
933 TGeoMedium* medRohacell = mgr->GetMedium(Form("%s_RIST110$", GetDetName()));
934
935 TGeoVolume* cyssOuterCylVol = new TGeoVolume("IBCYSSCylinder", cyssOuterCylSh, medPrepreg);
936 cyssOuterCylVol->SetLineColor(35);
937
938 TGeoVolume* cyssInnerCylVol = new TGeoVolume("IBCYSSCylinderFoam", cyssInnerCylSh, medRohacell);
939 cyssInnerCylVol->SetLineColor(kGreen);
940
941 cyssOuterCylVol->AddNode(cyssInnerCylVol, 1, nullptr);
942
943 // Finally return the cylinder volume
944 return cyssOuterCylVol;
945}
946
947TGeoVolume* V3Services::ibCyssCone(const TGeoManager* mgr)
948{
949 //
950 // Creates the cone of the Inner Barrel CYSS
951 // (ALIITSUP0190)
952 //
953 // Input:
954 // mgr : the GeoManager (used only to get the proper material)
955 //
956 // Output:
957 //
958 // Return:
959 // the cone as a TGeoVolume
960 //
961 // Created: 24 Oct 2019 Mario Sitta
962 //
963
964 static const Double_t sCyssConeTotalLength = 150.0 * sMm;
965
966 static const Double_t sCyssConeIntSectDmin = 100.0 * sMm;
967 static const Double_t sCyssConeIntSectDmax = 101.2 * sMm;
968 static const Double_t sCyssConeIntSectZlen = 23.0 * sMm;
969 static const Double_t sCyssConeIntCylZlen = 15.0 * sMm;
970
971 static const Double_t sCyssConeExtSectDmin = 246.0 * sMm;
972 static const Double_t sCyssConeExtSectDmax = 257.2 * sMm;
973 static const Double_t sCyssConeExtSectZlen = 42.0 * sMm;
974 static const Double_t sCyssConeExtCylZlen = 40.0 * sMm;
975
976 static const Double_t sCyssConeOpeningAngle = 40.0; // Deg
977
978 static const Double_t sCyssConeFabricThick = 0.3 * sMm;
979
980 // Local variables
981 Double_t rmin, rmax, zlen1, zlen2, phimin, phirot, dphi;
982 Double_t x1, y1, x2, y2, x3, y3, m, xin, yin;
983
984 // The CYSS Cone is physically a single piece made by a cylindrical
985 // section, a conical section, and a second cylindrical section
986 // The cone and the second cylinder have a foam core
987 // Both are implemented as two Pcon's
988
989 TGeoPcon* cyssConeSh = new TGeoPcon(180, 180, 6);
990
991 rmin = sCyssConeIntSectDmin / 2;
992 rmax = sCyssConeIntSectDmax / 2;
993 cyssConeSh->DefineSection(0, 0, rmin, rmax);
994 cyssConeSh->DefineSection(1, sCyssConeIntCylZlen, rmin, rmax);
995 zlen1 = sCyssConeTotalLength - sCyssConeExtSectZlen;
996 rmax = yFrom2Points(sCyssConeIntCylZlen, sCyssConeIntSectDmax / 2, zlen1, sCyssConeExtSectDmax / 2, sCyssConeIntSectZlen);
997 cyssConeSh->DefineSection(2, sCyssConeIntSectZlen, rmin, rmax);
998 zlen2 = sCyssConeTotalLength - sCyssConeExtCylZlen;
999 rmin = yFrom2Points(sCyssConeIntSectZlen, sCyssConeIntSectDmin / 2, zlen2, sCyssConeExtSectDmin / 2, zlen1);
1000 rmax = sCyssConeExtSectDmax / 2;
1001 cyssConeSh->DefineSection(3, zlen1, rmin, rmax);
1002 rmin = sCyssConeExtSectDmin / 2;
1003 cyssConeSh->DefineSection(4, zlen2, rmin, rmax);
1004 cyssConeSh->DefineSection(5, sCyssConeTotalLength, rmin, rmax);
1005
1006 dphi = TMath::ASin(sCyssConeFabricThick / (0.5 * sCyssConeIntSectDmax));
1007 phimin = 180 + dphi * TMath::RadToDeg();
1008 phirot = 180 - 2 * dphi * TMath::RadToDeg();
1009
1010 // The foam cone is built from the points of the outer cone
1011 TGeoPcon* cyssConeFoamSh = new TGeoPcon(phimin, phirot, 5);
1012
1013 m = TMath::Tan(sCyssConeOpeningAngle * TMath::DegToRad());
1014 x1 = cyssConeSh->GetZ(2);
1015 y1 = cyssConeSh->GetRmin(2);
1016 x2 = cyssConeSh->GetZ(1);
1017 y2 = cyssConeSh->GetRmin(1);
1018 x3 = x1;
1019 y3 = y2 + m * (x3 - x2);
1020
1021 insidePoint(x1, y1, x2, y2, x3, y3, -sCyssConeFabricThick, xin, yin);
1022 cyssConeFoamSh->DefineSection(0, xin, yin, yin);
1023
1024 x3 = cyssConeSh->GetZ(3);
1025 y3 = cyssConeSh->GetRmin(3);
1026
1027 insidePoint(x3, y3, x1, y1, x2, y2, -sCyssConeFabricThick, xin, yin);
1028 zlen1 = xin;
1029 rmin = yin;
1030 rmax = y2 + m * (zlen1 - x2);
1031 cyssConeFoamSh->DefineSection(1, zlen1, rmin, rmax);
1032
1033 x1 = cyssConeSh->GetZ(5);
1034 y1 = cyssConeSh->GetRmax(5);
1035 x2 = cyssConeSh->GetZ(3);
1036 y2 = cyssConeSh->GetRmax(3);
1037 x3 = cyssConeSh->GetZ(2);
1038 y3 = cyssConeSh->GetRmax(2);
1039
1040 insidePoint(x1, y1, x2, y2, x3, y3, -sCyssConeFabricThick, xin, yin);
1041 zlen1 = xin;
1042 rmin = cyssConeFoamSh->GetRmin(1) + m * (zlen1 - cyssConeFoamSh->GetZ(1));
1043 rmax = sCyssConeExtSectDmax / 2 - sCyssConeFabricThick;
1044 cyssConeFoamSh->DefineSection(2, zlen1, rmin, rmax);
1045
1046 rmin = sCyssConeExtSectDmin / 2 + sCyssConeFabricThick;
1047 zlen1 = cyssConeSh->GetZ(4);
1048 cyssConeFoamSh->DefineSection(3, zlen1, rmin, rmax);
1049
1050 zlen1 = sCyssConeTotalLength - sCyssConeFabricThick;
1051 cyssConeFoamSh->DefineSection(4, zlen1, rmin, rmax);
1052
1053 // We have all shapes: now create the real volumes
1054 TGeoMedium* medPrepreg = mgr->GetMedium(Form("%s_AS4C200$", GetDetName()));
1055 TGeoMedium* medRohacell = mgr->GetMedium(Form("%s_RIST110$", GetDetName()));
1056
1057 TGeoVolume* cyssConeVol = new TGeoVolume("IBCYSSCone", cyssConeSh, medPrepreg);
1058 cyssConeVol->SetLineColor(35);
1059
1060 TGeoVolume* cyssConeFoamVol = new TGeoVolume("IBCYSSConeFoam", cyssConeFoamSh, medRohacell);
1061 cyssConeFoamVol->SetLineColor(kGreen);
1062
1063 cyssConeVol->AddNode(cyssConeFoamVol, 1, nullptr);
1064
1065 // Finally return the cone volume
1066 return cyssConeVol;
1067}
1068
1069TGeoVolume* V3Services::ibCyssFlangeSideA(const TGeoManager* mgr)
1070{
1071 //
1072 // Creates the Flange on Side A for the Inner Barrel CYSS
1073 // (ALIITSUP0189)
1074 //
1075 // Input:
1076 // mgr : the GeoManager (used only to get the proper material)
1077 //
1078 // Output:
1079 //
1080 // Return:
1081 // the flange as a TGeoVolume
1082 //
1083 // Created: 28 Oct 2019 Mario Sitta
1084 //
1085
1086 // Radii of the steps
1087 static const Double_t sCyssFlangeAStep1Dmin = 254.1 * sMm;
1088 static const Double_t sCyssFlangeAStep1Dmax = 287.0 * sMm;
1089 static const Double_t sCyssFlangeAStep2Dmax = 259.0 * sMm;
1090 static const Double_t sCyssFlangeAStep3Dmin = 243.0 * sMm;
1091 static const Double_t sCyssFlangeAStep3Dmax = 245.5 * sMm;
1092 static const Double_t sCyssFlangeAStep4Dmax = 239.0 * sMm;
1093 static const Double_t sCyssFlangeAInnerD = 236.0 * sMm;
1094 static const Double_t sCyssFlangeAInRingD = 238.0 * sMm;
1095
1096 // Heights of the steps
1097 static const Double_t sCyssFlangeATotHei = 39.0 * sMm;
1098 static const Double_t sCyssFlangeAStep1H = 5.5 * sMm;
1099 static const Double_t sCyssFlangeAInRingH = 7.0 * sMm;
1100 static const Double_t sCyssFlangeAInRingUp = 1.0 * sMm;
1101 static const Double_t sCyssFlangeAStep2H = 9.0 * sMm;
1102 static const Double_t sCyssFlangeAStep3H = 10.0 * sMm;
1103 static const Double_t sCyssFlangeAStep4H = 8.5 * sMm;
1104
1105 // The wings
1106 static const Double_t sCyssFlangeAWingD = 307.0 * sMm;
1107 static const Double_t sCyssFlangeAWingW = 16.0 * sMm;
1108
1109 // Holes
1110 static const Double_t sCyssFlangeANotchW = 3.0 * sMm;
1111
1112 static const Double_t sCyssFlangeAHolesDpos = 274.0 * sMm;
1113
1114 static const Double_t sCyssFlangeAHole1Num = 8;
1115 static const Double_t sCyssFlangeAHole1D = 5.5 * sMm;
1116 static const Double_t sCyssFlangeAHole1Phi0 = 10; // Deg
1117 static const Double_t sCyssFlangeAHole1PhiStep = 20; // Deg
1118
1119 static const Double_t sCyssFlangeAHole2D = 4.0 * sMm;
1120 static const Double_t sCyssFlangeAHole2Phi = 20; // Deg
1121
1122 static const Double_t sCyssFlangeAHole3D = 7.0 * sMm;
1123 static const Double_t sCyssFlangeAHole3Phi = 6; // Deg
1124
1125 static const Double_t sCyssFlangeAWingHoleD = 8.1 * sMm;
1126 static const Double_t sCyssFlangeAWingHoleYpos = 9.0 * sMm;
1127 static const Double_t sCyssFlangeAWingHoleRpos = 146.0 * sMm;
1128
1129 // Local variables
1130 Double_t rmin, rmax, zlen, phi, dphi;
1131 Double_t xpos, ypos;
1132
1133 // The CYSS Flange on Side A is physically a single piece.
1134 // It is implemented as a CompositeShape of two Pcon's and one TubeSeg
1135 // minus a huge number of holes
1136
1137 // The flange body
1138 TGeoPcon* cyssFlangeABody = new TGeoPcon("cyssflangeabody", 180, 180, 12);
1139
1140 rmin = sCyssFlangeAStep1Dmin / 2;
1141 rmax = sCyssFlangeAStep1Dmax / 2;
1142 cyssFlangeABody->DefineSection(0, 0, rmin, rmax);
1143 cyssFlangeABody->DefineSection(1, sCyssFlangeAStep1H, rmin, rmax);
1144 rmax = sCyssFlangeAStep2Dmax / 2;
1145 cyssFlangeABody->DefineSection(2, sCyssFlangeAStep1H, rmin, rmax);
1146 cyssFlangeABody->DefineSection(3, sCyssFlangeAInRingH, rmin, rmax);
1147 rmin = sCyssFlangeAStep3Dmin / 2;
1148 cyssFlangeABody->DefineSection(4, sCyssFlangeAInRingH, rmin, rmax);
1149 cyssFlangeABody->DefineSection(5, sCyssFlangeAStep2H, rmin, rmax);
1150 rmax = sCyssFlangeAStep3Dmax / 2;
1151 cyssFlangeABody->DefineSection(6, sCyssFlangeAStep2H, rmin, rmax);
1152 zlen = sCyssFlangeATotHei - sCyssFlangeAStep3H;
1153 cyssFlangeABody->DefineSection(7, zlen, rmin, rmax);
1154 rmin = sCyssFlangeAInnerD / 2;
1155 cyssFlangeABody->DefineSection(8, zlen, rmin, rmax);
1156 zlen = sCyssFlangeATotHei - sCyssFlangeAStep4H;
1157 cyssFlangeABody->DefineSection(9, zlen, rmin, rmax);
1158 rmax = sCyssFlangeAStep4Dmax / 2;
1159 cyssFlangeABody->DefineSection(10, zlen, rmin, rmax);
1160 cyssFlangeABody->DefineSection(11, sCyssFlangeATotHei, rmin, rmax);
1161
1162 // The inner ring
1163 // We define half of it and put two copies to leave the notch space
1164 rmin = sCyssFlangeAStep3Dmin / 2;
1165 phi = 0.5 * (sCyssFlangeANotchW / rmin) * TMath::RadToDeg();
1166
1167 TGeoPcon* cyssFlangeAInRing = new TGeoPcon("cflangearing", 180, 90 - phi, 4);
1168
1169 rmin = sCyssFlangeAInnerD / 2;
1170 rmax = sCyssFlangeAInRingD / 2;
1171 cyssFlangeAInRing->DefineSection(0, sCyssFlangeAInRingUp, rmin, rmax);
1172 cyssFlangeAInRing->DefineSection(1, sCyssFlangeAInRingH, rmin, rmax);
1173 rmax = sCyssFlangeAStep3Dmin / 2;
1174 cyssFlangeAInRing->DefineSection(2, sCyssFlangeAInRingH, rmin, rmax);
1175 cyssFlangeAInRing->DefineSection(3, sCyssFlangeAStep2H, rmin, rmax);
1176
1177 TGeoRotation* flangeARingRot = new TGeoRotation("cringrot", 90 + phi, 0, 0);
1178 flangeARingRot->RegisterYourself();
1179
1180 TString cyssFlangeAComposite = Form("cyssflangeabody+cflangearing+cflangearing:cringrot");
1181
1182 // The wings
1183 rmin = sCyssFlangeAStep1Dmax / 2;
1184 rmax = sCyssFlangeAWingD / 2;
1185 zlen = sCyssFlangeAStep1H / 2;
1186 phi = 0.5 * (sCyssFlangeAWingW / rmin) * TMath::RadToDeg();
1187
1188 TGeoTubeSeg* cyssFlangeAWing = new TGeoTubeSeg("cflangeawing", rmin, rmax, zlen, 270 - phi, 270 + phi);
1189
1190 TGeoTranslation* cwingTR1 = new TGeoTranslation("cwingtr1", 0, 0, zlen);
1191 cwingTR1->RegisterYourself();
1192
1193 TGeoCombiTrans* cwingCT2 = new TGeoCombiTrans("cwingct2", 0, 0, zlen, new TGeoRotation("", 90 - phi, 0, 0));
1194 cwingCT2->RegisterYourself();
1195
1196 TGeoCombiTrans* cwingCT3 = new TGeoCombiTrans("cwingct3", 0, 0, zlen, new TGeoRotation("", -90 + phi, 0, 0));
1197 cwingCT3->RegisterYourself();
1198
1199 cyssFlangeAComposite += "+cflangeawing:cwingtr1+cflangeawing:cwingct2+cflangeawing:cwingct3";
1200
1201 // The (many) holes
1202 zlen = cyssFlangeAWing->GetDz();
1203
1204 // The 8 round holes (4 on each side)
1205 rmax = sCyssFlangeAHole1D / 2;
1206 TGeoTube* hole1 = new TGeoTube("hole1", 0, rmax, 2 * zlen);
1207
1208 for (Int_t i = 0; i < sCyssFlangeAHole1Num / 2; i++) {
1209 Double_t phi = sCyssFlangeAHole1Phi0 + i * sCyssFlangeAHole1PhiStep;
1210 xpos = 0.5 * sCyssFlangeAHolesDpos * TMath::Sin(phi * TMath::DegToRad());
1211 ypos = 0.5 * sCyssFlangeAHolesDpos * TMath::Cos(phi * TMath::DegToRad());
1212 TGeoTranslation* hole1Tr1 = new TGeoTranslation(Form("hole1Tr1%d", i), xpos, -ypos, zlen);
1213 hole1Tr1->RegisterYourself();
1214 TGeoTranslation* hole1Tr2 = new TGeoTranslation(Form("hole1Tr2%d", i), -xpos, -ypos, zlen);
1215 hole1Tr2->RegisterYourself();
1216 cyssFlangeAComposite += Form("-hole1:hole1Tr1%d-hole1:hole1Tr2%d", i, i);
1217 }
1218
1219 // The 2 smaller round holes (1 on each side)
1220 rmax = sCyssFlangeAHole2D / 2;
1221 TGeoTube* hole2 = new TGeoTube("hole2", 0, rmax, 2 * zlen);
1222
1223 xpos = 0.5 * sCyssFlangeAHolesDpos * TMath::Sin(sCyssFlangeAHole2Phi * TMath::DegToRad());
1224 ypos = 0.5 * sCyssFlangeAHolesDpos * TMath::Cos(sCyssFlangeAHole2Phi * TMath::DegToRad());
1225 TGeoTranslation* hole2Tr1 = new TGeoTranslation("hole2Tr1", xpos, -ypos, zlen);
1226 hole2Tr1->RegisterYourself();
1227 TGeoTranslation* hole2Tr2 = new TGeoTranslation("hole2Tr2", -xpos, -ypos, zlen);
1228 hole2Tr2->RegisterYourself();
1229
1230 cyssFlangeAComposite += "-hole2:hole2Tr1-hole2:hole2Tr2";
1231
1232 // The 2 bigger round holes (1 on each side)
1233 rmax = sCyssFlangeAHole3D / 2;
1234 TGeoTube* hole3 = new TGeoTube("hole3", 0, rmax, 2 * zlen);
1235
1236 xpos = 0.5 * sCyssFlangeAHolesDpos * TMath::Sin(sCyssFlangeAHole3Phi * TMath::DegToRad());
1237 ypos = 0.5 * sCyssFlangeAHolesDpos * TMath::Cos(sCyssFlangeAHole3Phi * TMath::DegToRad());
1238 TGeoTranslation* hole3Tr1 = new TGeoTranslation("hole3Tr1", xpos, -ypos, zlen);
1239 hole3Tr1->RegisterYourself();
1240 TGeoTranslation* hole3Tr2 = new TGeoTranslation("hole3Tr2", -xpos, -ypos, zlen);
1241 hole3Tr2->RegisterYourself();
1242
1243 cyssFlangeAComposite += "-hole3:hole3Tr1-hole3:hole3Tr2";
1244
1245 // The holes in the wings
1246 rmax = sCyssFlangeAWingHoleD / 2;
1247 TGeoTube* wingHole = new TGeoTube("wingHole", 0, rmax, 2 * zlen);
1248
1249 TGeoTranslation* wingHoleTr1 = new TGeoTranslation("wingHoleTr1", 0, -sCyssFlangeAWingHoleRpos, zlen);
1250 wingHoleTr1->RegisterYourself();
1251
1252 TGeoTranslation* wingHoleTr2 = new TGeoTranslation("wingHoleTr2", sCyssFlangeAWingHoleRpos, -sCyssFlangeAWingHoleYpos, zlen);
1253 wingHoleTr2->RegisterYourself();
1254
1255 TGeoTranslation* wingHoleTr3 = new TGeoTranslation("wingHoleTr3", -sCyssFlangeAWingHoleRpos, -sCyssFlangeAWingHoleYpos, zlen);
1256 wingHoleTr3->RegisterYourself();
1257
1258 cyssFlangeAComposite += "-wingHole:wingHoleTr1-wingHole:wingHoleTr2-wingHole:wingHoleTr3";
1259
1260 // Lastly the hollows (évidements): a nightmare deserving its own method
1261 TString cyssFlangeAHollows = ibCreateHollowsCyssFlangeSideA(zlen);
1262
1263 cyssFlangeAComposite += cyssFlangeAHollows.Data();
1264
1265 // The final flange shape
1266 TGeoCompositeShape* cyssFlangeASh = new TGeoCompositeShape(cyssFlangeAComposite.Data());
1267
1268 // We have all shapes: now create the real volumes
1269 TGeoMedium* medAlu = mgr->GetMedium(Form("%s_ALUMINUM$", GetDetName()));
1270
1271 TGeoVolume* cyssFlangeAVol = new TGeoVolume("IBCYSSFlangeA", cyssFlangeASh, medAlu);
1272 cyssFlangeAVol->SetLineColor(kCyan);
1273 cyssFlangeAVol->SetFillColor(kCyan);
1274
1275 // Finally return the flange volume
1276 return cyssFlangeAVol;
1277}
1278
1279TString V3Services::ibCreateHollowsCyssFlangeSideA(const Double_t zlen)
1280{
1281 //
1282 // Creates the very complicate hollow holes in the Flange
1283 // on Side A for the Inner Barrel CYSS
1284 // (ALIITSUP0189)
1285 //
1286 // Input:
1287 // zlen : the thickness of the ring where the hollows are located
1288 //
1289 // Output:
1290 //
1291 // Return:
1292 // the string describing the holes and their positions
1293 //
1294 // Created: 04 Nov 2019 Mario Sitta
1295 //
1296
1297 static const Double_t sCyssFlangeAHolesDpos = 274.0 * sMm;
1298
1299 static const Double_t sCyssFlangeAHole1Phi0 = 10; // Deg
1300 static const Double_t sCyssFlangeAHole1PhiStep = 20; // Deg
1301
1302 static const Double_t sCyssFlangeAHole2Phi = 20; // Deg
1303
1304 static const Double_t sCyssFlangeAHollowD = 7.0 * sMm;
1305 static const Double_t sCyssFlangeAHollowPhi0 = 13; // Deg
1306 static const Double_t sCyssFlangeAHollowPhi1 = 8; // Deg
1307
1308 // Local variables
1309 Double_t rmin, rmax, phi, dphi;
1310 Double_t xpos, ypos;
1311
1312 TString cyssFlangeAHollows;
1313
1314 //
1315 rmax = sCyssFlangeAHollowD / 2;
1316 TGeoTubeSeg* roundHalf = new TGeoTubeSeg("roundhalf", 0, rmax, 2 * zlen, 0, 180);
1317
1318 Double_t rHoles = sCyssFlangeAHolesDpos / 2;
1319
1320 xpos = rHoles * TMath::Cos(sCyssFlangeAHollowPhi0 * TMath::DegToRad());
1321 ypos = rHoles * TMath::Sin(sCyssFlangeAHollowPhi0 * TMath::DegToRad());
1322 TGeoCombiTrans* roundTr1 = new TGeoCombiTrans("roundtr1", xpos, -ypos, zlen, new TGeoRotation("", -sCyssFlangeAHollowPhi0, 0, 0));
1323 roundTr1->RegisterYourself();
1324 TGeoCombiTrans* roundTr2 = new TGeoCombiTrans("roundtr2", -xpos, -ypos, zlen, new TGeoRotation("", sCyssFlangeAHollowPhi0, 0, 0));
1325 roundTr2->RegisterYourself();
1326
1327 cyssFlangeAHollows += "-roundhalf:roundtr1-roundhalf:roundtr2";
1328
1329 TGeoTranslation* noRot = new TGeoTranslation("norot", 0, 0, zlen);
1330 noRot->RegisterYourself();
1331 TGeoCombiTrans* yRot180 = new TGeoCombiTrans("yrot180", 0, 0, zlen, new TGeoRotation("", 0, 180, 180));
1332 yRot180->RegisterYourself();
1333
1334 rmin = sCyssFlangeAHolesDpos / 2 - sCyssFlangeAHollowD / 2;
1335 rmax = sCyssFlangeAHolesDpos / 2 + sCyssFlangeAHollowD / 2;
1336
1337 for (Int_t j = 1; j < 4; j++) {
1338 phi = 90 - (sCyssFlangeAHole1Phi0 + j * sCyssFlangeAHole1PhiStep + 0.5 * sCyssFlangeAHollowPhi1);
1339 xpos = rHoles * TMath::Cos(phi * TMath::DegToRad());
1340 ypos = rHoles * TMath::Sin(phi * TMath::DegToRad());
1341 TGeoCombiTrans* roundTr3 = new TGeoCombiTrans(Form("roundtr%d", j + 2), xpos, -ypos, zlen, new TGeoRotation("", 180 - phi, 0, 0));
1342 roundTr3->RegisterYourself();
1343 TGeoCombiTrans* roundTr4 = new TGeoCombiTrans(Form("roundtr%d", j + 5), -xpos, -ypos, zlen, new TGeoRotation("", phi - 180, 0, 0));
1344 roundTr4->RegisterYourself();
1345
1346 cyssFlangeAHollows += Form("-roundhalf:roundtr%d-roundhalf:roundtr%d", j + 2, j + 5);
1347
1348 phi = 360 - phi - 0.05;
1349 if (j == 3) {
1350 dphi = 360 - sCyssFlangeAHollowPhi0 + 0.05;
1351 } else {
1352 dphi = phi + (sCyssFlangeAHole1PhiStep - sCyssFlangeAHollowPhi1) + 0.1;
1353 }
1354
1355 TGeoTubeSeg* hollow1 = new TGeoTubeSeg(Form("hollow%d", j), rmin, rmax, 2 * zlen, phi, dphi);
1356
1357 cyssFlangeAHollows += Form("-hollow%d:norot-hollow%d:yrot180", j, j);
1358
1359 phi = 90 - (sCyssFlangeAHole1Phi0 + j * sCyssFlangeAHole1PhiStep - 0.5 * sCyssFlangeAHollowPhi1);
1360 xpos = rHoles * TMath::Cos(phi * TMath::DegToRad());
1361 ypos = rHoles * TMath::Sin(phi * TMath::DegToRad());
1362 TGeoCombiTrans* roundTr5 = new TGeoCombiTrans(Form("roundtr%d", j + 8), xpos, -ypos, zlen, new TGeoRotation("", -phi, 0, 0));
1363 roundTr5->RegisterYourself();
1364 TGeoCombiTrans* roundTr6 = new TGeoCombiTrans(Form("roundtr%d", j + 11), -xpos, -ypos, zlen, new TGeoRotation("", phi, 0, 0));
1365 roundTr6->RegisterYourself();
1366
1367 cyssFlangeAHollows += Form("-roundhalf:roundtr%d-roundhalf:roundtr%d", j + 8, j + 11);
1368 }
1369
1370 //
1371 phi = 90 - (sCyssFlangeAHole2Phi + 0.5 * sCyssFlangeAHollowPhi1);
1372 xpos = rHoles * TMath::Cos(phi * TMath::DegToRad());
1373 ypos = rHoles * TMath::Sin(phi * TMath::DegToRad());
1374 TGeoCombiTrans* roundTr15 = new TGeoCombiTrans("roundtr15", xpos, -ypos, zlen, new TGeoRotation("", 180 - phi, 0, 0));
1375 roundTr15->RegisterYourself();
1376 TGeoCombiTrans* roundTr16 = new TGeoCombiTrans("roundtr16", -xpos, -ypos, zlen, new TGeoRotation("", phi - 180, 0, 0));
1377 roundTr16->RegisterYourself();
1378
1379 cyssFlangeAHollows += "-roundhalf:roundtr15-roundhalf:roundtr16";
1380
1381 phi = 360 - phi - 0.5;
1382 dphi = phi + (sCyssFlangeAHole1Phi0 + sCyssFlangeAHole1PhiStep - sCyssFlangeAHole2Phi - sCyssFlangeAHollowPhi1) + 0.5;
1383 TGeoTubeSeg* hollow4 = new TGeoTubeSeg("hollow4", rmin, rmax, 2 * zlen, phi, dphi);
1384
1385 cyssFlangeAHollows += "-hollow4:norot-hollow4:yrot180";
1386
1387 //
1388 phi = 90 - (sCyssFlangeAHole2Phi - 0.5 * sCyssFlangeAHollowPhi1);
1389 xpos = rHoles * TMath::Cos(phi * TMath::DegToRad());
1390 ypos = rHoles * TMath::Sin(phi * TMath::DegToRad());
1391 TGeoCombiTrans* roundTr17 = new TGeoCombiTrans("roundtr17", xpos, -ypos, zlen, new TGeoRotation("", -phi, 0, 0));
1392 roundTr17->RegisterYourself();
1393 TGeoCombiTrans* roundTr18 = new TGeoCombiTrans("roundtr18", -xpos, -ypos, zlen, new TGeoRotation("", phi, 0, 0));
1394 roundTr18->RegisterYourself();
1395
1396 cyssFlangeAHollows += "-roundhalf:roundtr17-roundhalf:roundtr18";
1397
1398 phi = 90 - (sCyssFlangeAHole1Phi0 + 0.5 * sCyssFlangeAHollowPhi1);
1399 xpos = rHoles * TMath::Cos(phi * TMath::DegToRad());
1400 ypos = rHoles * TMath::Sin(phi * TMath::DegToRad());
1401 TGeoCombiTrans* roundTr19 = new TGeoCombiTrans("roundtr19", xpos, -ypos, zlen, new TGeoRotation("", 180 - phi, 0, 0));
1402 roundTr19->RegisterYourself();
1403 TGeoCombiTrans* roundTr20 = new TGeoCombiTrans("roundtr20", -xpos, -ypos, zlen, new TGeoRotation("", phi - 180, 0, 0));
1404 roundTr20->RegisterYourself();
1405
1406 cyssFlangeAHollows += "-roundhalf:roundtr19-roundhalf:roundtr20";
1407
1408 TGeoCombiTrans* zRotPhi = new TGeoCombiTrans("zrotphi", 0, 0, zlen, new TGeoRotation("", -sCyssFlangeAHole1Phi0, 0, 0));
1409 zRotPhi->RegisterYourself();
1410 TGeoCombiTrans* yzRot180Phi = new TGeoCombiTrans("yzrot180phi", 0, 0, zlen, new TGeoRotation("", 0, 180, 180 - sCyssFlangeAHole1Phi0));
1411 yzRot180Phi->RegisterYourself();
1412
1413 cyssFlangeAHollows += "-hollow4:zrotphi-hollow4:yzrot180phi";
1414
1415 // Finally we return the string
1416 return cyssFlangeAHollows;
1417}
1418
1419TGeoVolume* V3Services::ibCyssFlangeSideC(const TGeoManager* mgr)
1420{
1421 //
1422 // Creates the Flange on Side C for the Inner Barrel CYSS
1423 // (ALIITSUP0098)
1424 //
1425 // Input:
1426 // mgr : the GeoManager (used only to get the proper material)
1427 //
1428 // Output:
1429 //
1430 // Return:
1431 // the flange as a TGeoVolume
1432 //
1433 // Created: 23 Oct 2019 Mario Sitta
1434 //
1435
1436 // Radii of the rings
1437 static const Double_t sCyssFlangeCDmin1 = 44.0 * sMm;
1438 static const Double_t sCyssFlangeCDmin2 = 57.0 * sMm;
1439 static const Double_t sCyssFlangeCDmin3 = 73.0 * sMm;
1440
1441 static const Double_t sCyssFlangeCDmax1 = 58.8 * sMm;
1442 static const Double_t sCyssFlangeCDmax2 = 74.8 * sMm;
1443 static const Double_t sCyssFlangeCDmax3 = 94.0 * sMm;
1444
1445 static const Double_t sCyssFlangeCDWallIn = 89.0 * sMm;
1446 static const Double_t sCyssFlangeCDWallOut = 95.6 * sMm;
1447
1448 static const Double_t sCyssFlangeCDExt = 100.0 * sMm;
1449
1450 // Thicknesses and heights
1451 static const Double_t sCyssFlangeCTotH = 10.0 * sMm;
1452 static const Double_t sCyssFlangeCExtThick = 1.0 * sMm;
1453
1454 static const Double_t sCyssFlangeCHmax1 = 1.5 * sMm;
1455 static const Double_t sCyssFlangeCHmax2 = 4.0 * sMm;
1456 static const Double_t sCyssFlangeCHmax3 = 6.5 * sMm;
1457
1458 static const Double_t sCyssFlangeCHmin2 = 2.5 * sMm;
1459 static const Double_t sCyssFlangeCHmin3 = 5.0 * sMm;
1460
1461 // Holes
1462 static const Double_t sHoles22Dia = 2.2 * sMm;
1463 static const Double_t sHoles22Phi = 60; // Deg
1464
1465 static const Double_t sHoles30Dia = 3.0 * sMm;
1466 static const Double_t sHoles30Phi = 15; // Deg
1467
1468 static const Double_t sHoles12Dia = 1.2 * sMm;
1469 static const Double_t sHoles12Phi = 75; // Deg
1470
1471 static const Double_t sHolesDdist[3] = {50.0 * sMm, 64.0 * sMm, 80.0 * sMm};
1472
1473 static const Double_t sCyssFlangeCNotchH = 3.2 * sMm;
1474 static const Double_t sCyssFlangeCNotchW = 3.0 * sMm;
1475
1476 // Local variables
1477 Double_t rmin, rmax, zlen;
1478 Double_t xpos, ypos;
1479
1480 // The CYSS Flange on Side C is physically a single piece.
1481 // It is implemented as a CompositeShape of two Pcon's minus the holes
1482
1483 // The flange body
1484 TGeoPcon* cyssFlangeCDisks = new TGeoPcon("cyssflangecdisks", 180, 180, 12);
1485
1486 rmin = sCyssFlangeCDmin1 / 2;
1487 rmax = sCyssFlangeCDmax1 / 2;
1488 cyssFlangeCDisks->DefineSection(0, 0, rmin, rmax);
1489 cyssFlangeCDisks->DefineSection(1, sCyssFlangeCHmax1, rmin, rmax);
1490 rmin = sCyssFlangeCDmin2 / 2;
1491 cyssFlangeCDisks->DefineSection(2, sCyssFlangeCHmax1, rmin, rmax);
1492 cyssFlangeCDisks->DefineSection(3, sCyssFlangeCHmin2, rmin, rmax);
1493 rmax = sCyssFlangeCDmax2 / 2;
1494 cyssFlangeCDisks->DefineSection(4, sCyssFlangeCHmin2, rmin, rmax);
1495 cyssFlangeCDisks->DefineSection(5, sCyssFlangeCHmax2, rmin, rmax);
1496 rmin = sCyssFlangeCDmin3 / 2;
1497 cyssFlangeCDisks->DefineSection(6, sCyssFlangeCHmax2, rmin, rmax);
1498 cyssFlangeCDisks->DefineSection(7, sCyssFlangeCHmin3, rmin, rmax);
1499 rmax = sCyssFlangeCDWallOut / 2;
1500 cyssFlangeCDisks->DefineSection(8, sCyssFlangeCHmin3, rmin, rmax);
1501 cyssFlangeCDisks->DefineSection(9, sCyssFlangeCHmax3, rmin, rmax);
1502 rmin = sCyssFlangeCDWallIn / 2;
1503 cyssFlangeCDisks->DefineSection(10, sCyssFlangeCHmax3, rmin, rmax);
1504 cyssFlangeCDisks->DefineSection(11, sCyssFlangeCTotH, rmin, rmax);
1505
1506 TGeoPcon* cyssFlangeCExt = new TGeoPcon("cflangecext", 180, 180, 4);
1507
1508 rmin = sCyssFlangeCDmax3 / 2;
1509 rmax = sCyssFlangeCDExt / 2;
1510 cyssFlangeCExt->DefineSection(0, 0, rmin, rmax);
1511 cyssFlangeCExt->DefineSection(1, sCyssFlangeCExtThick, rmin, rmax);
1512 rmax = sCyssFlangeCDWallOut / 2;
1513 cyssFlangeCExt->DefineSection(2, sCyssFlangeCExtThick, rmin, rmax);
1514 cyssFlangeCExt->DefineSection(3, sCyssFlangeCHmin3, rmin, rmax);
1515
1516 TString cyssFlangeCComposite = Form("cyssflangecdisks+cflangecext");
1517
1518 // The flange holes
1519 rmax = sHoles22Dia / 2;
1520 zlen = sCyssFlangeCTotH / 2;
1521 TGeoTube* hole22 = new TGeoTube("hole22", 0, rmax, 1.1 * zlen);
1522
1523 for (Int_t j = 0; j < 3; j++) {
1524 ypos = sHolesDdist[j] / 2;
1525 TGeoTranslation* holeCTr = new TGeoTranslation(Form("holeCTr%d", j), 0, -ypos, zlen);
1526 holeCTr->RegisterYourself();
1527 cyssFlangeCComposite += Form("-hole22:holeCTr%d", j);
1528
1529 xpos = TMath::Sin(sHoles22Phi * TMath::DegToRad()) * sHolesDdist[j] / 2;
1530 ypos = TMath::Cos(sHoles22Phi * TMath::DegToRad()) * sHolesDdist[j] / 2;
1531 TGeoTranslation* holeLTr = new TGeoTranslation(Form("holeLTr%d", j), xpos, -ypos, zlen);
1532 holeLTr->RegisterYourself();
1533 cyssFlangeCComposite += Form("-hole22:holeLTr%d", j);
1534
1535 TGeoTranslation* holeRTr = new TGeoTranslation(Form("holeRTr%d", j), -xpos, -ypos, zlen);
1536 holeRTr->RegisterYourself();
1537 cyssFlangeCComposite += Form("-hole22:holeRTr%d", j);
1538 }
1539
1540 rmax = sHoles30Dia / 2;
1541 TGeoTube* hole30 = new TGeoTube("hole30", 0, rmax, zlen);
1542
1543 for (Int_t k = 0; k < 3; k++) {
1544 Double_t phi = (k + 1) * sHoles30Phi;
1545 for (Int_t j = 0; j < 3; j++) {
1546 xpos = TMath::Sin(phi * TMath::DegToRad()) * sHolesDdist[j] / 2;
1547 ypos = TMath::Cos(phi * TMath::DegToRad()) * sHolesDdist[j] / 2;
1548
1549 TGeoTranslation* holeLTr = new TGeoTranslation(Form("holeLTr%d%d", k, j), xpos, -ypos, zlen);
1550 holeLTr->RegisterYourself();
1551 cyssFlangeCComposite += Form("-hole30:holeLTr%d%d", k, j);
1552
1553 TGeoTranslation* holeRTr = new TGeoTranslation(Form("holeRTr%d%d", k, j), -xpos, -ypos, zlen);
1554 holeRTr->RegisterYourself();
1555 cyssFlangeCComposite += Form("-hole30:holeRTr%d%d", k, j);
1556 }
1557 }
1558
1559 rmax = sHoles12Dia / 2;
1560 TGeoTube* hole12 = new TGeoTube("hole12", 0, rmax, 1.1 * zlen);
1561
1562 for (Int_t j = 0; j < 3; j++) {
1563 xpos = TMath::Sin(sHoles12Phi * TMath::DegToRad()) * sHolesDdist[j] / 2;
1564 ypos = TMath::Cos(sHoles12Phi * TMath::DegToRad()) * sHolesDdist[j] / 2;
1565 TGeoTranslation* holeLTr = new TGeoTranslation(Form("holeLTrM%d", j), xpos, -ypos, zlen);
1566 holeLTr->RegisterYourself();
1567 cyssFlangeCComposite += Form("-hole12:holeLTrM%d", j);
1568
1569 TGeoTranslation* holeRTr = new TGeoTranslation(Form("holeRTrM%d", j), -xpos, -ypos, zlen);
1570 holeRTr->RegisterYourself();
1571 cyssFlangeCComposite += Form("-hole12:holeRTrM%d", j);
1572 }
1573
1574 TGeoBBox* notch = new TGeoBBox("notch", sCyssFlangeCNotchW / 2, (sCyssFlangeCDWallOut - sCyssFlangeCDWallIn), sCyssFlangeCNotchH);
1575
1576 ypos = (sCyssFlangeCDWallIn + sCyssFlangeCDWallOut) / 4;
1577 TGeoTranslation* notchTr = new TGeoTranslation("notchTr", 0, -ypos, sCyssFlangeCTotH);
1578 notchTr->RegisterYourself();
1579
1580 cyssFlangeCComposite += "-notch:notchTr";
1581
1582 // The final flange shape
1583 TGeoCompositeShape* cyssFlangeCSh = new TGeoCompositeShape(cyssFlangeCComposite.Data());
1584
1585 // We have all shapes: now create the real volumes
1586 TGeoMedium* medAlu = mgr->GetMedium(Form("%s_ALUMINUM$", GetDetName()));
1587
1588 TGeoVolume* cyssFlangeCVol = new TGeoVolume("IBCYSSFlangeC", cyssFlangeCSh, medAlu);
1589 cyssFlangeCVol->SetLineColor(kCyan);
1590 cyssFlangeCVol->SetFillColor(kCyan);
1591
1592 // Finally return the flange volume
1593 return cyssFlangeCVol;
1594}
1595
1596void V3Services::obEndWheelSideA(const Int_t iLay, TGeoVolume* mother, const TGeoManager* mgr)
1597{
1598 //
1599 // Creates the single End Wheel on Side A
1600 // for a given layer of the Middle and Outer Barrels
1601 // (Layer 3: ALICE-W3-01-Side_A, Layer 4: ALICE-W4-01-Side_A,
1602 // Layer 5: ALICE-W5-01-Side_A Layer 6: ALICE-W6-01-Side_A)
1603 //
1604 // Input:
1605 // iLay : the layer number (0,1: Middle, 2,3: Outer)
1606 // endWheel : the volume where to place the current created wheel
1607 // mgr : the GeoManager (used only to get the proper material)
1608 //
1609 // Output:
1610 //
1611 // Return:
1612 //
1613 // Created: 24 Sep 2019 Mario Sitta
1614 // Updated: 27 Sep 2019 Mario Sitta
1615 //
1616
1617 // The support ring
1618 static const Double_t sOBWheelTotZlen = 55.0 * sMm;
1619 static const Double_t sOBWheelSuppZlen = 35.0 * sMm;
1620
1621 static const Double_t sOBWheelSuppRmin[4] = {204.0 * sMm, 254.0 * sMm, 352.5 * sMm, 402.0 * sMm};
1622 static const Double_t sOBWheelSuppRmax[4] = {241.0 * sMm, 291.0 * sMm, 389.0 * sMm, 448.5 * sMm};
1623
1624 // The support blocks
1625 static const Double_t sOBWheelShelfWide[4] = {56.05 * sMm, 55.15 * sMm, 54.10 * sMm, 53.81 * sMm}; // TO BE CHECKED
1626 static const Double_t sOBWheelShelfHoleZpos = 48.0 * sMm;
1627
1628 static const Double_t sOBWheelShelfRpos[4] = {213.0 * sMm, 262.5 * sMm, 361.0 * sMm, 410.5 * sMm};
1629 static const Double_t sOBWheelShelfPhi0[4] = {0.0, 0.0, 0.0, 0.0}; // Deg
1630
1631 // Local variables
1632 Double_t xlen, ylen, zlen;
1633 Double_t rmin, rmax, phimin, dphi;
1634 Double_t xpos, ypos, zpos;
1635
1636 // The Support Wheel is physically a single piece, a hollow ring
1637 // plus the stave support shelves
1638 // For the sake of simplicity we build it up with four TGeoTube's
1639 // one per each wall of the ring (inner, outer, lower, upper) plus
1640 // as many TGeoBBox's as needed for the shelves
1641
1642 // The inner ring
1643 TGeoTube* innerRingSh = new TGeoTube(sOBWheelSuppRmin[iLay], sOBWheelSuppRmax[iLay], sOBWheelThickness / 2);
1644
1645 // The outer ring
1646 TGeoTube* outerRingSh = new TGeoTube(sOBWheelSuppRmin[iLay], sOBWheelSuppRmax[iLay], sOBWheelThickness / 2);
1647
1648 // The lower ring
1649 rmax = sOBWheelSuppRmin[iLay] + sOBWheelThickness;
1650 zlen = sOBWheelSuppZlen - 2 * sOBWheelThickness;
1651 TGeoTube* lowerRingSh = new TGeoTube(sOBWheelSuppRmin[iLay], rmax, zlen / 2);
1652
1653 // The upper ring
1654 rmin = sOBWheelSuppRmax[iLay] - sOBWheelThickness;
1655 TGeoTube* upperRingSh = new TGeoTube(rmin, sOBWheelSuppRmax[iLay], zlen / 2);
1656
1657 // The shelf support
1658 xlen = sOBWheelShelfWide[iLay];
1659 ylen = 2 * sOBWheelThickness;
1660 zlen = sOBWheelTotZlen - sOBWheelSuppZlen;
1661 TGeoBBox* shelfSh = new TGeoBBox(xlen / 2, ylen / 2, zlen / 2);
1662
1663 // We have all shapes: now create the real volumes
1664 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
1665
1666 Int_t nLay = iLay + sNumberInnerLayers;
1667
1668 TGeoVolume* ringInnerVol = new TGeoVolume(Form("OBEndWheelAInnerRing%d", nLay), innerRingSh, medCarbon);
1669 ringInnerVol->SetFillColor(kBlue);
1670 ringInnerVol->SetLineColor(kBlue);
1671
1672 TGeoVolume* ringOuterVol = new TGeoVolume(Form("OBEndWheelAOuterRing%d", nLay), outerRingSh, medCarbon);
1673 ringOuterVol->SetFillColor(kBlue);
1674 ringOuterVol->SetLineColor(kBlue);
1675
1676 TGeoVolume* ringLowerVol = new TGeoVolume(Form("OBEndWheelALowerRing%d", nLay), lowerRingSh, medCarbon);
1677 ringLowerVol->SetFillColor(kBlue);
1678 ringLowerVol->SetLineColor(kBlue);
1679
1680 TGeoVolume* ringUpperVol = new TGeoVolume(Form("OBEndWheelAUpperRing%d", nLay), upperRingSh, medCarbon);
1681 ringUpperVol->SetFillColor(kBlue);
1682 ringUpperVol->SetLineColor(kBlue);
1683
1684 TGeoVolume* shelfVol = new TGeoVolume(Form("OBEndWheelAShelf%d", nLay), shelfSh, medCarbon);
1685 shelfVol->SetFillColor(kBlue);
1686 shelfVol->SetLineColor(kBlue);
1687
1688 // Finally put everything in the mother volume
1689 // In blueprints the Z position is given wrt the shelf holes
1690 // First the ring
1691 if (iLay < sNumberMiddlLayers) {
1692 zpos = sMBWheelsZpos + sOBWheelShelfHoleZpos;
1693 } else {
1694 zpos = sOBWheelsZpos + sOBWheelShelfHoleZpos;
1695 }
1696
1697 zpos -= outerRingSh->GetDz();
1698 mother->AddNode(ringOuterVol, 1, new TGeoTranslation(0, 0, zpos));
1699
1700 zpos -= (outerRingSh->GetDz() + lowerRingSh->GetDz());
1701 mother->AddNode(ringLowerVol, 1, new TGeoTranslation(0, 0, zpos));
1702 mother->AddNode(ringUpperVol, 1, new TGeoTranslation(0, 0, zpos));
1703
1704 zpos -= (lowerRingSh->GetDz() + innerRingSh->GetDz());
1705 mother->AddNode(ringInnerVol, 1, new TGeoTranslation(0, 0, zpos));
1706
1707 // Then the support blocks
1708 Int_t numberOfStaves = GeometryTGeo::Instance()->getNumberOfStaves(nLay);
1709 Double_t alpha = 360. / numberOfStaves;
1710
1711 rmin = sOBWheelShelfRpos[iLay] + shelfSh->GetDY();
1712 zpos -= (innerRingSh->GetDz() + shelfSh->GetDZ());
1713
1714 for (Int_t j = 0; j < numberOfStaves; j++) { // As in V3Layer::createLayer
1715 Double_t phi = j * alpha + sOBWheelShelfPhi0[iLay];
1716 xpos = rmin * cosD(phi);
1717 ypos = rmin * sinD(phi);
1718 phi += 90;
1719 mother->AddNode(shelfVol, j, new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", phi, 0, 0)));
1720 }
1721}
1722
1723void V3Services::mbEndWheelSideC(const Int_t iLay, TGeoVolume* mother, const TGeoManager* mgr)
1724{
1725 //
1726 // Creates the single End Wheel on Side C
1727 // for a given layer of the Middle Barrel
1728 // (wheels on Side C are very different for Middle and Outer Barrels,
1729 // so we cannot use a single method for both as for Side A)
1730 // (Layer 3: ALICE-W3-04-Side_C, Layer 4: ALICE-W4-05-Side_C)
1731 //
1732 // Input:
1733 // iLay : the layer number (0,1: Middle, 2,3: Outer)
1734 // endWheel : the volume where to place the current created wheel
1735 // mgr : the GeoManager (used only to get the proper material)
1736 //
1737 // Output:
1738 //
1739 // Return:
1740 //
1741 // Created: 26 Sep 2019 Mario Sitta
1742 //
1743
1744 // The support ring
1745 static const Double_t sOBWheelTotZlen[2] = {63.0 * sMm, 55.0 * sMm};
1746 static const Double_t sOBWheelSuppZlen[2] = {43.0 * sMm, 35.0 * sMm};
1747
1748 static const Double_t sOBWheelSuppRmin[2] = {200.5 * sMm, 254.0 * sMm};
1749 static const Double_t sOBWheelSuppRmax[2] = {237.5 * sMm, 291.0 * sMm};
1750 static const Double_t sOBWheelFlangeR[2] = {255.0 * sMm, 239.5 * sMm};
1751 static const Double_t sOBWheelFlangeZlen = 8.0 * sMm;
1752
1753 // The support blocks
1754 static const Double_t sOBWheelShelfWide[2] = {56.05 * sMm, 55.15 * sMm}; // TO BE CHECKED
1755 static const Double_t sOBWheelShelfHoleZpos[2] = {56.0 * sMm, 48.0 * sMm};
1756
1757 static const Double_t sOBWheelShelfRpos[2] = {213.0 * sMm, 262.5 * sMm};
1758 static const Double_t sOBWheelShelfPhi0[2] = {0.0, 0.0}; // Deg
1759
1760 // Local variables
1761 Double_t xlen, ylen, zlen;
1762 Double_t rmin, rmax, phimin, dphi;
1763 Double_t xpos, ypos, zpos;
1764 Int_t nsect;
1765
1766 // The Support Wheel is physically a single piece, a hollow ring
1767 // with a flange plus the stave support shelves
1768 // Unfortunately the flange is on opposite sides on the two layers
1769 // (externally to the ring for layer 3, internally for layer 4)
1770 // For the sake of simplicity we build it up with three TGeoTube's and
1771 // one TGeoPcon for each wall of the ring (inner, outer, lower, upper)
1772 // plus as many TGeoBBox's as needed for the shelves
1773
1774 // The inner ring
1775 TGeoTube* innerRingSh = new TGeoTube(sOBWheelSuppRmin[iLay], sOBWheelSuppRmax[iLay], sOBWheelThickness / 2);
1776
1777 // The outer ring with the flange
1778 if (iLay == 0) {
1779 nsect = 6;
1780 } else {
1781 nsect = 4;
1782 }
1783
1784 TGeoPcon* outerRingSh = new TGeoPcon(0, 360, nsect);
1785
1786 if (iLay == 0) {
1787 rmin = sOBWheelSuppRmax[0] - 2 * sOBWheelThickness;
1788 outerRingSh->DefineSection(0, 0., rmin, sOBWheelFlangeR[0]);
1789 outerRingSh->DefineSection(1, 2 * sOBWheelThickness, rmin, sOBWheelFlangeR[0]);
1790 outerRingSh->DefineSection(2, 2 * sOBWheelThickness, rmin, sOBWheelSuppRmax[0]);
1791 outerRingSh->DefineSection(3, sOBWheelFlangeZlen, rmin, sOBWheelSuppRmax[0]);
1792 outerRingSh->DefineSection(4, sOBWheelFlangeZlen, sOBWheelSuppRmin[0], sOBWheelSuppRmax[0]);
1793 zlen = sOBWheelFlangeZlen + sOBWheelThickness;
1794 outerRingSh->DefineSection(5, zlen, sOBWheelSuppRmin[0], sOBWheelSuppRmax[0]);
1795 } else {
1796 outerRingSh->DefineSection(0, 0., sOBWheelFlangeR[1], sOBWheelSuppRmax[1]);
1797 outerRingSh->DefineSection(1, sOBWheelThickness, sOBWheelFlangeR[1], sOBWheelSuppRmax[1]);
1798 rmax = sOBWheelSuppRmin[1] + sOBWheelThickness;
1799 outerRingSh->DefineSection(2, sOBWheelThickness, sOBWheelFlangeR[1], rmax);
1800 outerRingSh->DefineSection(3, 2 * sOBWheelThickness, sOBWheelFlangeR[1], rmax);
1801 }
1802
1803 // The lower ring
1804 if (iLay == 0) {
1805 zlen = sOBWheelSuppZlen[iLay] - sOBWheelFlangeZlen - 2 * sOBWheelThickness;
1806 } else {
1807 zlen = sOBWheelSuppZlen[iLay] - sOBWheelThickness - outerRingSh->GetZ(nsect - 1);
1808 }
1809
1810 rmax = sOBWheelSuppRmin[iLay] + sOBWheelThickness;
1811 TGeoTube* lowerRingSh = new TGeoTube(sOBWheelSuppRmin[iLay], rmax, zlen / 2);
1812
1813 // The upper ring
1814 if (iLay == 1) { // For odd layers the upper and lower rings length is the same
1815 zlen = sOBWheelSuppZlen[iLay] - 2 * sOBWheelThickness;
1816 }
1817
1818 rmin = sOBWheelSuppRmax[iLay] - sOBWheelThickness;
1819 TGeoTube* upperRingSh = new TGeoTube(rmin, sOBWheelSuppRmax[iLay], zlen / 2);
1820
1821 // The shelf support
1822 xlen = sOBWheelShelfWide[iLay];
1823 ylen = 2 * sOBWheelThickness;
1824 zlen = sOBWheelTotZlen[iLay] - sOBWheelSuppZlen[iLay];
1825 TGeoBBox* shelfSh = new TGeoBBox(xlen / 2, ylen / 2, zlen / 2);
1826
1827 // We have all shapes: now create the real volumes
1828 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
1829
1830 Int_t nLay = iLay + sNumberInnerLayers;
1831
1832 TGeoVolume* ringInnerVol = new TGeoVolume(Form("OBEndWheelCInnerRing%d", nLay), innerRingSh, medCarbon);
1833 ringInnerVol->SetFillColor(kBlue);
1834 ringInnerVol->SetLineColor(kBlue);
1835
1836 TGeoVolume* ringOuterVol = new TGeoVolume(Form("OBEndWheelCOuterRing%d", nLay), outerRingSh, medCarbon);
1837 ringOuterVol->SetFillColor(kBlue);
1838 ringOuterVol->SetLineColor(kBlue);
1839
1840 TGeoVolume* ringLowerVol = new TGeoVolume(Form("OBEndWheelCLowerRing%d", nLay), lowerRingSh, medCarbon);
1841 ringLowerVol->SetFillColor(kBlue);
1842 ringLowerVol->SetLineColor(kBlue);
1843
1844 TGeoVolume* ringUpperVol = new TGeoVolume(Form("OBEndWheelCUpperRing%d", nLay), upperRingSh, medCarbon);
1845 ringUpperVol->SetFillColor(kBlue);
1846 ringUpperVol->SetLineColor(kBlue);
1847
1848 TGeoVolume* shelfVol = new TGeoVolume(Form("OBEndWheelCShelf%d", nLay), shelfSh, medCarbon);
1849 shelfVol->SetFillColor(kBlue);
1850 shelfVol->SetLineColor(kBlue);
1851
1852 // Finally put everything in the mother volume
1853 // In blueprints the Z position is given wrt the shelf holes
1854 // First the ring
1855 zpos = sMBWheelsZpos + sOBWheelShelfHoleZpos[iLay] - sOBWheelSuppZlen[iLay];
1856
1857 zpos += innerRingSh->GetDz();
1858 mother->AddNode(ringInnerVol, 1, new TGeoTranslation(0, 0, -zpos));
1859
1860 zpos += (innerRingSh->GetDz() + upperRingSh->GetDz());
1861 mother->AddNode(ringUpperVol, 1, new TGeoTranslation(0, 0, -zpos));
1862
1863 zpos += (-upperRingSh->GetDz() + lowerRingSh->GetDz());
1864 mother->AddNode(ringLowerVol, 1, new TGeoTranslation(0, 0, -zpos));
1865
1866 zpos += (lowerRingSh->GetDz() + outerRingSh->GetZ(nsect - 1));
1867 mother->AddNode(ringOuterVol, 1, new TGeoTranslation(0, 0, -zpos));
1868
1869 // Then the support blocks
1870 Int_t numberOfStaves = GeometryTGeo::Instance()->getNumberOfStaves(nLay);
1871 Double_t alpha = 360. / numberOfStaves;
1872
1873 rmin = sOBWheelShelfRpos[iLay] + shelfSh->GetDY();
1874 zpos = sMBWheelsZpos + sOBWheelShelfHoleZpos[iLay] - sOBWheelSuppZlen[iLay];
1875 zpos -= shelfSh->GetDZ();
1876
1877 for (Int_t j = 0; j < numberOfStaves; j++) { // As in V3Layer::createLayer
1878 Double_t phi = j * alpha + sOBWheelShelfPhi0[iLay];
1879 xpos = rmin * cosD(phi);
1880 ypos = rmin * sinD(phi);
1881 phi += 90;
1882 mother->AddNode(shelfVol, j, new TGeoCombiTrans(xpos, ypos, -zpos, new TGeoRotation("", phi, 0, 0)));
1883 }
1884}
1885
1886void V3Services::obEndWheelSideC(const Int_t iLay, TGeoVolume* mother, const TGeoManager* mgr)
1887{
1888 //
1889 // Creates the single End Wheel on Side C
1890 // for a given layer of the Outer Barrel
1891 // (wheels on Side C are very different for Middle and Outer Barrels,
1892 // so we cannot use a single method for both as for Side A)
1893 // (Layer 5: ALICE-W5-04-Side_C, Layer 6: ALICE-W6-04-Side_C)
1894 //
1895 // Input:
1896 // iLay : the layer number (0,1: Middle, 2,3: Outer)
1897 // endWheel : the volume where to place the current created wheel
1898 // mgr : the GeoManager (used only to get the proper material)
1899 //
1900 // Output:
1901 //
1902 // Return:
1903 //
1904 // Created: 07 Oct 2019 Mario Sitta
1905 //
1906
1907 // The support ring
1908 static const Double_t sOBWheelTotZlen[2] = {37.0 * sMm, 35.0 * sMm};
1909
1910 static const Double_t sOBWheelSuppRmin = 354.0 * sMm;
1911 static const Double_t sOBWheelSuppRmax[2] = {389.5 * sMm, 448.5 * sMm};
1912 static const Double_t sOBWheelIntFlangeR[2] = {335.0 * sMm, 393.0 * sMm};
1913 static const Double_t sOBWheelExtFlangeR = 409.0 * sMm;
1914 static const Double_t sOBWheelIntFlangeZ = 4.0 * sMm; // TO BE CHECKED!
1915
1916 static const Double_t sOBWheelShelfRpos[2] = {361.0 * sMm, 410.5 * sMm};
1917 static const Double_t sOBWheelShelfHoleZpos[2] = {28.0 * sMm, 26.0 * sMm};
1918
1919 // Local variables
1920 Double_t xlen, ylen, zlen;
1921 Double_t rmin, rmax, phimin, dphi;
1922 Double_t xpos, ypos, zpos;
1923 Int_t nsect;
1924
1925 // The Support Wheels are physically a single piece, a hollow ring
1926 // with one or two flanges
1927 // For the sake of simplicity we build it up with a TGeoTube for the
1928 // external wall and a TGeoPcon for the remaining of the ring for layer 6
1929 // and with two TGeoPcon's for layer 5
1930
1931 // The upper ring: a Pcon for Layer 5, a Tube for Layer 6
1932 TGeoShape* upperRingSh;
1933
1934 rmin = sOBWheelSuppRmax[iLay] - sOBWheelThickness;
1935 if (iLay == 0) {
1936 nsect = 4;
1937 TGeoPcon* ring = new TGeoPcon(0, 360, nsect);
1938 ring->DefineSection(0, sOBWheelThickness, rmin, sOBWheelExtFlangeR);
1939 ring->DefineSection(1, 2 * sOBWheelThickness, rmin, sOBWheelExtFlangeR);
1940 ring->DefineSection(2, 2 * sOBWheelThickness, rmin, sOBWheelSuppRmax[iLay]);
1941 zlen = sOBWheelTotZlen[iLay] - sOBWheelThickness;
1942 ring->DefineSection(3, zlen, rmin, sOBWheelSuppRmax[iLay]);
1943 upperRingSh = (TGeoShape*)ring;
1944 } else {
1945 zlen = sOBWheelTotZlen[iLay] - 2 * sOBWheelThickness;
1946 TGeoTube* ring = new TGeoTube(rmin, sOBWheelSuppRmax[iLay], zlen / 2);
1947 upperRingSh = (TGeoShape*)ring;
1948 }
1949
1950 // The lower ring: a Pcon
1951 TGeoPcon* lowerRingSh;
1952
1953 if (iLay == 0) {
1954 nsect = 14;
1955 lowerRingSh = new TGeoPcon(0, 360, nsect);
1956 lowerRingSh->DefineSection(0, 0., sOBWheelSuppRmin, sOBWheelExtFlangeR);
1957 lowerRingSh->DefineSection(1, sOBWheelThickness, sOBWheelSuppRmin, sOBWheelExtFlangeR);
1958 rmax = sOBWheelSuppRmin + sOBWheelThickness;
1959 lowerRingSh->DefineSection(2, sOBWheelThickness, sOBWheelSuppRmin, rmax);
1960 lowerRingSh->DefineSection(3, sOBWheelIntFlangeZ, sOBWheelSuppRmin, rmax);
1961 lowerRingSh->DefineSection(4, sOBWheelIntFlangeZ, sOBWheelIntFlangeR[iLay], rmax);
1962 zpos = sOBWheelIntFlangeZ + 2 * sOBWheelThickness;
1963 lowerRingSh->DefineSection(5, zpos, sOBWheelIntFlangeR[iLay], rmax);
1964 lowerRingSh->DefineSection(6, zpos, sOBWheelSuppRmin, rmax);
1965 zpos += sOBWheelIntFlangeZ;
1966 lowerRingSh->DefineSection(7, zpos, sOBWheelSuppRmin, rmax);
1967 rmax = sOBWheelShelfRpos[iLay] + sOBWheelThickness;
1968 lowerRingSh->DefineSection(8, zpos, sOBWheelSuppRmin, rmax);
1969 zpos += sOBWheelThickness;
1970 lowerRingSh->DefineSection(9, zpos, sOBWheelSuppRmin, rmax);
1971 lowerRingSh->DefineSection(10, zpos, sOBWheelShelfRpos[iLay], rmax);
1972 zpos = sOBWheelTotZlen[iLay] - sOBWheelThickness;
1973 lowerRingSh->DefineSection(11, zpos, sOBWheelShelfRpos[iLay], rmax);
1974 lowerRingSh->DefineSection(12, zpos, sOBWheelShelfRpos[iLay], sOBWheelSuppRmax[iLay]);
1975 lowerRingSh->DefineSection(13, sOBWheelTotZlen[iLay], sOBWheelShelfRpos[iLay], sOBWheelSuppRmax[iLay]);
1976 } else {
1977 nsect = 10;
1978 lowerRingSh = new TGeoPcon(0, 360, nsect);
1979 lowerRingSh->DefineSection(0, 0., sOBWheelShelfRpos[iLay], sOBWheelSuppRmax[iLay]);
1980 lowerRingSh->DefineSection(1, sOBWheelThickness, sOBWheelShelfRpos[iLay], sOBWheelSuppRmax[iLay]);
1981 rmax = sOBWheelShelfRpos[iLay] + sOBWheelThickness;
1982 lowerRingSh->DefineSection(2, sOBWheelThickness, sOBWheelShelfRpos[iLay], rmax);
1983 lowerRingSh->DefineSection(3, sOBWheelIntFlangeZ, sOBWheelShelfRpos[iLay], rmax);
1984 lowerRingSh->DefineSection(4, sOBWheelIntFlangeZ, sOBWheelIntFlangeR[iLay], rmax);
1985 zpos = sOBWheelIntFlangeZ + 2 * sOBWheelThickness;
1986 lowerRingSh->DefineSection(5, zpos, sOBWheelIntFlangeR[iLay], rmax);
1987 lowerRingSh->DefineSection(6, zpos, sOBWheelShelfRpos[iLay], rmax);
1988 zpos = sOBWheelTotZlen[iLay] - sOBWheelThickness;
1989 lowerRingSh->DefineSection(7, zpos, sOBWheelShelfRpos[iLay], rmax);
1990 lowerRingSh->DefineSection(8, zpos, sOBWheelShelfRpos[iLay], sOBWheelSuppRmax[iLay]);
1991 lowerRingSh->DefineSection(9, sOBWheelTotZlen[iLay], sOBWheelShelfRpos[iLay], sOBWheelSuppRmax[iLay]);
1992 }
1993
1994 // We have all shapes: now create the real volumes
1995 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
1996
1997 Int_t nLay = iLay + sNumberInnerLayers + sNumberMiddlLayers;
1998
1999 TGeoVolume* ringUpperVol = new TGeoVolume(Form("OBEndWheelCUpperRing%d", nLay), upperRingSh, medCarbon);
2000 ringUpperVol->SetFillColor(kBlue);
2001 ringUpperVol->SetLineColor(kBlue);
2002
2003 TGeoVolume* ringLowerVol = new TGeoVolume(Form("OBEndWheelCLowerRing%d", nLay), lowerRingSh, medCarbon);
2004 ringLowerVol->SetFillColor(kBlue);
2005 ringLowerVol->SetLineColor(kBlue);
2006
2007 // Finally put everything in the mother volume
2008 // In blueprints the Z position is given wrt the shelf holes
2009 zpos = sOBWheelsZpos + sOBWheelShelfHoleZpos[iLay];
2010
2011 mother->AddNode(ringLowerVol, 1, new TGeoTranslation(0, 0, -zpos));
2012
2013 if (iLay == 1) {
2014 zpos -= (sOBWheelThickness + (static_cast<TGeoTube*>(upperRingSh))->GetDz());
2015 }
2016 mother->AddNode(ringUpperVol, 1, new TGeoTranslation(0, 0, -zpos));
2017}
2018
2019void V3Services::obConeSideA(TGeoVolume* mother, const TGeoManager* mgr)
2020{
2021 //
2022 // Creates the Cone structure on Side A of the Outer Barrel
2023 // (ALICE-W4-04-Cone_4A)
2024 //
2025 // Input:
2026 // mother : the volume where to place the current created cone
2027 // mgr : the GeoManager (used only to get the proper material)
2028 //
2029 // Output:
2030 //
2031 // Return:
2032 //
2033 // Created: 03 Feb 2020 Mario Sitta
2034 //
2035
2036 static const Double_t sOBConeATotZlen = 350.0 * sMm;
2037 static const Double_t sOBConeAStartCyl2 = 170.0 * sMm;
2038 static const Double_t sOBConeAEndCyl1 = 160.8 * sMm;
2039 static const Double_t sOBConeAThinCylZ = 36.0 * sMm;
2040
2041 static const Double_t sOBConeAIntR = 291.5 * sMm;
2042 static const Double_t sOBConeAExtR = 302.5 * sMm;
2043
2044 static const Double_t sOBConeARingExtR = 339.5 * sMm;
2045 static const Double_t sOBConeARingZlen = 55.0 * sMm;
2046 static const Double_t sOBConeARingZout = 35.0 * sMm;
2047
2048 static const Double_t sOBConeAThickAll = 2.0 * sMm;
2049 static const Double_t sOBConeAThickThin = 1.0 * sMm;
2050
2051 static const Double_t sOBConeAReinfZIn = 1.0 * sMm;
2052 static const Double_t sOBConeAReinfRIn = 301.6 * sMm;
2053
2054 static const Double_t sOBConeAReinfThick = 6.5 * sMm;
2055
2056 static const Int_t sOBConeARibNVert = 8;
2057
2058 // Local variables
2059 Double_t rmin, rmax, zlen;
2060 Double_t xpos, ypos, zpos;
2061
2062 // The OB Cone on Side A is physically a single piece.
2063 // It is implemented using two Pcon plus a Xtru for the reinforcements
2064
2065 Double_t phi = sOBConeAReinfThick / sOBConeAIntR;
2066 phi *= TMath::RadToDeg();
2067
2068 // The main cone: a Pcon
2069 TGeoPcon* obConeSh = new TGeoPcon(phi, 180 - 2 * phi, 10);
2070
2071 rmin = sOBConeAIntR;
2072 rmax = sOBConeAReinfRIn;
2073 obConeSh->DefineSection(0, 0., rmin, rmax);
2074 obConeSh->DefineSection(1, sOBConeAReinfZIn, rmin, rmax);
2075 rmax = rmin + sOBConeAThickThin;
2076 obConeSh->DefineSection(2, sOBConeAReinfZIn, rmin, rmax);
2077 obConeSh->DefineSection(3, sOBConeAThinCylZ, rmin, rmax);
2078 rmax = rmin + sOBConeAThickAll;
2079 obConeSh->DefineSection(4, sOBConeAThinCylZ, rmin, rmax);
2080 zlen = sOBConeATotZlen - sOBConeAStartCyl2;
2081 obConeSh->DefineSection(5, zlen, rmin, rmax);
2082 rmin = sOBConeAExtR;
2083 rmax = rmin + sOBConeAThickAll;
2084 zlen = sOBConeATotZlen - sOBConeAEndCyl1;
2085 obConeSh->DefineSection(6, zlen, rmin, rmax);
2086 zlen = sOBConeATotZlen - sOBConeAThickAll;
2087 obConeSh->DefineSection(7, zlen, rmin, rmax);
2088 rmax = sOBConeARingExtR;
2089 obConeSh->DefineSection(8, zlen, rmin, rmax);
2090 obConeSh->DefineSection(9, sOBConeATotZlen, rmin, rmax);
2091
2092 // The external ring: a Pcon
2093 TGeoPcon* obConeRingSh = new TGeoPcon(phi, 180 - 2 * phi, 6);
2094
2095 rmin = obConeSh->GetRmax(7);
2096 rmax = rmin + sOBConeAThickAll;
2097 obConeRingSh->DefineSection(0, 0., rmin, rmax);
2098 zlen = sOBConeARingZlen - sOBConeARingZout;
2099 obConeRingSh->DefineSection(1, zlen, rmin, rmax);
2100 rmax = sOBConeARingExtR;
2101 obConeRingSh->DefineSection(2, zlen, rmin, rmax);
2102 zlen += sOBConeAThickAll;
2103 obConeRingSh->DefineSection(3, zlen, rmin, rmax);
2104 rmin = rmax - sOBConeAThickAll;
2105 obConeRingSh->DefineSection(4, zlen, rmin, rmax);
2106 zlen = sOBConeARingZlen - sOBConeAThickAll;
2107 obConeRingSh->DefineSection(5, zlen, rmin, rmax);
2108
2109 // The reinforcement rib: a Xtru
2110 Double_t xr[sOBConeARibNVert], yr[sOBConeARibNVert];
2111
2112 xr[0] = 0;
2113 yr[0] = 0;
2114 xr[1] = obConeSh->GetRmax(0) - obConeSh->GetRmin(0);
2115 yr[1] = yr[0];
2116 xr[2] = xr[1];
2117 yr[2] = obConeSh->GetZ(5);
2118 xr[7] = xr[0];
2119 yr[7] = yr[2];
2120 xr[6] = obConeSh->GetRmin(6) - obConeSh->GetRmin(5);
2121 yr[6] = obConeSh->GetZ(6);
2122 xr[3] = xr[6] + (xr[1] - xr[0]);
2123 yr[3] = yr[6];
2124 xr[5] = xr[6];
2125 yr[5] = sOBConeATotZlen - sOBConeARingZout + sOBConeAThickAll;
2126 xr[4] = xr[3];
2127 yr[4] = yr[5];
2128
2129 TGeoXtru* obConeRibSh = new TGeoXtru(2);
2130 obConeRibSh->DefinePolygon(sOBConeARibNVert, xr, yr);
2131 obConeRibSh->DefineSection(0, 0);
2132 obConeRibSh->DefineSection(1, sOBConeAThickAll);
2133
2134 // We have all shapes: now create the real volumes
2135 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
2136
2137 TGeoVolume* obConeVol = new TGeoVolume("OBConeSideA", obConeSh, medCarbon);
2138 obConeVol->SetFillColor(kBlue);
2139 obConeVol->SetLineColor(kBlue);
2140
2141 TGeoVolume* obConeRingVol = new TGeoVolume("OBConeRingSideA", obConeRingSh, medCarbon);
2142 obConeRingVol->SetFillColor(kBlue);
2143 obConeRingVol->SetLineColor(kBlue);
2144
2145 TGeoVolume* obConeRibVol = new TGeoVolume("OBConeRibSideA", obConeRibSh, medCarbon);
2146 obConeRibVol->SetFillColor(kBlue);
2147 obConeRibVol->SetLineColor(kBlue);
2148
2149 // Finally put everything in the mother volume
2150 zpos = sOBConesZpos - sOBConeATotZlen;
2151
2152 mother->AddNode(obConeVol, 1, new TGeoTranslation(0, 0, zpos));
2153 mother->AddNode(obConeVol, 2, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 180, 0, 0)));
2154
2155 zpos = sOBConesZpos - sOBConeARingZlen;
2156
2157 mother->AddNode(obConeRingVol, 1, new TGeoTranslation(0, 0, zpos));
2158 mother->AddNode(obConeRingVol, 2, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 180, 0, 0)));
2159
2160 xpos = obConeSh->GetRmin(0);
2161 ypos = sOBConeAReinfThick;
2162 zpos = sOBConesZpos - sOBConeATotZlen;
2163
2164 mother->AddNode(obConeRibVol, 1, new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", 0, 90, 0)));
2165 mother->AddNode(obConeRibVol, 4, new TGeoCombiTrans(-xpos, -ypos, zpos, new TGeoRotation("", 0, -90, 180)));
2166
2167 ypos = sOBConeAReinfThick - sOBConeAThickAll;
2168
2169 mother->AddNode(obConeRibVol, 3, new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("", 0, -90, -180)));
2170 mother->AddNode(obConeRibVol, 4, new TGeoCombiTrans(xpos, -ypos, zpos, new TGeoRotation("", 0, 90, 0)));
2171}
2172
2173void V3Services::obConeTraysSideA(TGeoVolume* mother, const TGeoManager* mgr)
2174{
2175 //
2176 // Creates the Cone Trays on Side A of the Outer Barrel
2177 // (ALICE-W3-08-vassoio+ALICE-W5-08_vassoio)
2178 //
2179 // Input:
2180 // mother : the volume where to place the current created cone
2181 // mgr : the GeoManager (used only to get the proper material)
2182 //
2183 // Output:
2184 //
2185 // Return:
2186 //
2187 // Created: 05 Feb 2020 Mario Sitta
2188 //
2189
2190 static const Double_t sOBTrayZlen[2] = {112.0 * sMm, 115.0 * sMm};
2191 static const Double_t sOBTrayRmin[2] = {222.0 * sMm, 370.0 * sMm};
2192 static const Double_t sOBTrayRmax[2] = {240.0 * sMm, 386.0 * sMm};
2193
2194 static const Double_t sOBTrayZpos[2] = {181.0 * sMm, 20.0 * sMm};
2195
2196 static const Double_t sOBTrayThick = 2.0 * sMm;
2197
2198 static const Double_t sOBTrayReinfWide[2] = {27.0 * sMm, 24.0 * sMm};
2199 static const Double_t sOBTrayReinfYpos = 6.0 * sMm;
2200
2201 // Local variables
2202 Double_t rmin, rmax, zlen;
2203 Double_t xpos, ypos, zpos;
2204
2205 // Each OB Tray on Side A is physically a single piece.
2206 // It is implemented using a Pcon plus a BBox for the reinforcements
2207
2208 TGeoPcon* obTraySh[2];
2209 TGeoBBox* obTrayRibSh[2];
2210
2211 for (Int_t j = 0; j < 2; j++) {
2212 Double_t phi = (sOBTrayReinfYpos + sOBTrayThick) / sOBTrayRmin[j];
2213 phi *= TMath::RadToDeg();
2214
2215 // The main body: a Pcon
2216 obTraySh[j] = new TGeoPcon(180 + phi, 180 - 2 * phi, 4);
2217
2218 rmin = sOBTrayRmin[j];
2219 rmax = sOBTrayRmax[j];
2220 obTraySh[j]->DefineSection(0, 0., rmin, rmax);
2221 obTraySh[j]->DefineSection(1, sOBTrayThick, rmin, rmax);
2222 rmin = rmax - sOBTrayThick;
2223 obTraySh[j]->DefineSection(2, sOBTrayThick, rmin, rmax);
2224 obTraySh[j]->DefineSection(3, sOBTrayZlen[j], rmin, rmax);
2225
2226 // The reinforcement rib: a BBox
2227 obTrayRibSh[j] = new TGeoBBox(sOBTrayReinfWide[j] / 2,
2228 sOBTrayThick / 2,
2229 sOBTrayZlen[j] / 2);
2230 } // for (j = 0,1)
2231
2232 // We have all shapes: now create the real volumes
2233 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
2234
2235 TGeoVolume *obTrayVol[2], *obTrayRibVol[2];
2236
2237 for (Int_t j = 0; j < 2; j++) {
2238 obTrayVol[j] = new TGeoVolume(Form("OBConeTray%d", j), obTraySh[j], medCarbon);
2239 obTrayVol[j]->SetFillColor(kBlue);
2240 obTrayVol[j]->SetLineColor(kBlue);
2241
2242 obTrayRibVol[j] = new TGeoVolume(Form("OBConeTrayRib%d", j), obTrayRibSh[j], medCarbon);
2243 obTrayRibVol[j]->SetFillColor(kBlue);
2244 obTrayRibVol[j]->SetLineColor(kBlue);
2245 }
2246
2247 // Finally put everything in the mother volume
2248
2249 for (Int_t j = 0; j < 2; j++) {
2250 if (j == 0) {
2251 zpos = sOBConesZpos - sOBTrayZpos[j] - sOBTrayZlen[j];
2252 } else {
2253 zpos = sOBConesZpos + sOBTrayZpos[j];
2254 }
2255
2256 mother->AddNode(obTrayVol[j], 1, new TGeoTranslation(0, 0, zpos));
2257 mother->AddNode(obTrayVol[j], 2, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 180, 0, 0)));
2258
2259 xpos = obTraySh[j]->GetRmin(0) + obTrayRibSh[j]->GetDX();
2260 ypos = sOBTrayReinfYpos + obTrayRibSh[j]->GetDY();
2261 zpos += obTrayRibSh[j]->GetDZ();
2262
2263 mother->AddNode(obTrayRibVol[j], 1, new TGeoTranslation(xpos, -ypos, zpos));
2264 mother->AddNode(obTrayRibVol[j], 2, new TGeoTranslation(-xpos, -ypos, zpos));
2265 mother->AddNode(obTrayRibVol[j], 3, new TGeoTranslation(xpos, ypos, zpos));
2266 mother->AddNode(obTrayRibVol[j], 4, new TGeoTranslation(-xpos, ypos, zpos));
2267 }
2268}
2269
2270void V3Services::obConeSideC(TGeoVolume* mother, const TGeoManager* mgr)
2271{
2272 //
2273 // Creates the Cone structure on Side C of the Outer Barrel
2274 // (ALICE-W4-06-Cone_4C)
2275 //
2276 // Input:
2277 // mother : the volume where to place the current created cone
2278 // mgr : the GeoManager (used only to get the proper material)
2279 //
2280 // Output:
2281 //
2282 // Return:
2283 //
2284 // Created: 26 Jan 2020 Mario Sitta
2285 //
2286
2287 static const Double_t sOBConeCTotZlen = 332.5 * sMm;
2288 static const Double_t sOBConeCStartCyl2 = 132.8 * sMm;
2289 static const Double_t sOBConeCEndCyl1 = 82.4 * sMm;
2290 static const Double_t sOBConeCThinCylZ = 36.0 * sMm;
2291
2292 static const Double_t sOBConeCIntR = 291.5 * sMm;
2293 static const Double_t sOBConeCExtR = 315.0 * sMm;
2294
2295 static const Double_t sOBConeCRingExtR = 333.0 * sMm;
2296 static const Double_t sOBConeCRingZlen = 61.0 * sMm;
2297 static const Double_t sOBConeCRingZout = 42.0 * sMm;
2298
2299 static const Double_t sOBConeCThickAll = 2.0 * sMm;
2300 static const Double_t sOBConeCThickThin = 1.0 * sMm;
2301
2302 static const Double_t sOBConeCReinfZIn = 2.0 * sMm;
2303 static const Double_t sOBConeCReinfRIn = 301.6 * sMm;
2304 static const Double_t sOBConeCReinfROut = 351.5 * sMm;
2305
2306 static const Double_t sOBConeCReinfThick = 6.5 * sMm;
2307
2308 static const Int_t sOBConeCRibNVert = 8;
2309
2310 // Local variables
2311 Double_t rmin, rmax, zlen;
2312 Double_t xpos, ypos, zpos;
2313
2314 // The OB Cone on Side C is physically a single piece.
2315 // It is implemented using two Pcon plus a Xtru for the reinforcements
2316
2317 Double_t phi = sOBConeCReinfThick / sOBConeCIntR;
2318 phi *= TMath::RadToDeg();
2319
2320 // The main cone: a Pcon
2321 TGeoPcon* obConeSh = new TGeoPcon(phi, 180 - 2 * phi, 10);
2322
2323 rmin = sOBConeCExtR;
2324 rmax = sOBConeCReinfROut;
2325 obConeSh->DefineSection(0, 0., rmin, rmax);
2326 obConeSh->DefineSection(1, sOBConeCThickAll, rmin, rmax);
2327 rmax = rmin + sOBConeCThickAll;
2328 obConeSh->DefineSection(2, sOBConeCThickAll, rmin, rmax);
2329 obConeSh->DefineSection(3, sOBConeCEndCyl1, rmin, rmax);
2330 rmin = sOBConeCIntR;
2331 rmax = rmin + sOBConeCThickAll;
2332 obConeSh->DefineSection(4, sOBConeCStartCyl2, rmin, rmax);
2333 zlen = sOBConeCTotZlen - sOBConeCThinCylZ;
2334 obConeSh->DefineSection(5, zlen, rmin, rmax);
2335 rmax = rmin + sOBConeCThickThin;
2336 obConeSh->DefineSection(6, zlen, rmin, rmax);
2337 zlen = sOBConeCTotZlen - sOBConeCReinfZIn;
2338 obConeSh->DefineSection(7, zlen, rmin, rmax);
2339 rmax = sOBConeCReinfRIn;
2340 obConeSh->DefineSection(8, zlen, rmin, rmax);
2341 obConeSh->DefineSection(9, sOBConeCTotZlen, rmin, rmax);
2342
2343 // The external ring: a Pcon
2344 TGeoPcon* obConeRingSh = new TGeoPcon(phi, 180 - 2 * phi, 8);
2345
2346 rmin = sOBConeCRingExtR - sOBConeCThickAll;
2347 rmax = sOBConeCReinfROut;
2348 obConeRingSh->DefineSection(0, 0., rmin, rmax);
2349 obConeRingSh->DefineSection(1, sOBConeCThickAll, rmin, rmax);
2350 rmax = sOBConeCRingExtR;
2351 obConeRingSh->DefineSection(2, sOBConeCThickAll, rmin, rmax);
2352 zlen = sOBConeCRingZout - sOBConeCThickAll;
2353 obConeRingSh->DefineSection(3, zlen, rmin, rmax);
2354 rmin = sOBConeCExtR + sOBConeCThickAll;
2355 obConeRingSh->DefineSection(4, zlen, rmin, rmax);
2356 obConeRingSh->DefineSection(5, sOBConeCRingZout, rmin, rmax);
2357 rmax = rmin + sOBConeCThickAll;
2358 obConeRingSh->DefineSection(6, sOBConeCRingZout, rmin, rmax);
2359 obConeRingSh->DefineSection(7, sOBConeCRingZlen, rmin, rmax);
2360
2361 // The reinforcement rib: a Xtru
2362 Double_t xr[sOBConeCRibNVert], yr[sOBConeCRibNVert];
2363
2364 xr[0] = 0;
2365 yr[0] = 0;
2366 xr[1] = obConeSh->GetRmax(9) - obConeSh->GetRmin(9);
2367 yr[1] = yr[0];
2368 xr[2] = xr[1];
2369 yr[2] = obConeSh->GetZ(9) - obConeSh->GetZ(4);
2370 xr[7] = xr[0];
2371 yr[7] = yr[2];
2372 xr[6] = obConeSh->GetRmin(3) - obConeSh->GetRmin(4);
2373 yr[6] = obConeSh->GetZ(9) - obConeSh->GetZ(3);
2374 xr[3] = xr[6] + (xr[1] - xr[0]);
2375 yr[3] = yr[6];
2376 xr[5] = xr[6];
2377 yr[5] = sOBConeCTotZlen - sOBConeCRingZout;
2378 xr[4] = xr[3];
2379 yr[4] = yr[5];
2380
2381 TGeoXtru* obConeRibSh = new TGeoXtru(2);
2382 obConeRibSh->DefinePolygon(sOBConeCRibNVert, xr, yr);
2383 obConeRibSh->DefineSection(0, 0);
2384 obConeRibSh->DefineSection(1, sOBConeCThickAll);
2385
2386 // We have all shapes: now create the real volumes
2387 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_M55J6K$", GetDetName())); // TO BE CHECKED
2388
2389 TGeoVolume* obConeVol = new TGeoVolume("OBConeSideC", obConeSh, medCarbon);
2390 obConeVol->SetFillColor(kBlue);
2391 obConeVol->SetLineColor(kBlue);
2392
2393 TGeoVolume* obConeRingVol = new TGeoVolume("OBConeRingSideC", obConeRingSh, medCarbon);
2394 obConeRingVol->SetFillColor(kBlue);
2395 obConeRingVol->SetLineColor(kBlue);
2396
2397 TGeoVolume* obConeRibVol = new TGeoVolume("OBConeRibSideC", obConeRibSh, medCarbon);
2398 obConeRibVol->SetFillColor(kBlue);
2399 obConeRibVol->SetLineColor(kBlue);
2400
2401 // Finally put everything in the mother volume
2402 zpos = sOBConesZpos;
2403
2404 mother->AddNode(obConeVol, 1, new TGeoTranslation(0, 0, -zpos));
2405 mother->AddNode(obConeVol, 2, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 180, 0, 0)));
2406
2407 zpos -= sOBConeCThickAll;
2408
2409 mother->AddNode(obConeRingVol, 1, new TGeoTranslation(0, 0, -zpos));
2410 mother->AddNode(obConeRingVol, 2, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 180, 0, 0)));
2411
2412 xpos = obConeSh->GetRmin(9);
2413 ypos = sOBConeCReinfThick;
2414 zpos = sOBConesZpos - obConeSh->GetZ(9);
2415
2416 mother->AddNode(obConeRibVol, 1, new TGeoCombiTrans(xpos, -ypos, -zpos, new TGeoRotation("", 0, -90, 0)));
2417 mother->AddNode(obConeRibVol, 2, new TGeoCombiTrans(-xpos, ypos, -zpos, new TGeoRotation("", 0, 90, 180)));
2418
2419 ypos = sOBConeCReinfThick - sOBConeCThickAll;
2420
2421 mother->AddNode(obConeRibVol, 3, new TGeoCombiTrans(xpos, ypos, -zpos, new TGeoRotation("", 0, -90, 0)));
2422 mother->AddNode(obConeRibVol, 4, new TGeoCombiTrans(-xpos, -ypos, -zpos, new TGeoRotation("", 0, 90, 180)));
2423}
2424
2425void V3Services::obCYSS11(TGeoVolume* mother, const TGeoManager* mgr)
2426{
2427 //
2428 // Creates the CYSS element 11 with all its sub-elements
2429 // OB CYSS 11 : ALIITSUP0564 (the whole assembly)
2430 // OB CYSS 12 : ALIITSUP0565 (the outermost cylinder)
2431 // OB CYSS 13 : ALIITSUP0566 (the intermediate cylinder)
2432 // OB CYSS 14 : ALIITSUP0567 (the innermost cylinder)
2433 //
2434 // Input:
2435 // mother : the volume where to place the current created cylinder
2436 // mgr : the GeoManager (used only to get the proper material)
2437 //
2438 // Output:
2439 //
2440 // Return:
2441 //
2442 // Created: 02 Mar 2020 Mario Sitta
2443 // Updated: 30 Nov 2022 Mario Sitta Fix materials and thicknesses
2444 //
2445
2446 static const Double_t sOBCYSS14Zlen = 1556.8 * sMm;
2447 static const Double_t sOBCYSS14DInt = 898.0 * sMm;
2448 static const Double_t sOBCYSS14DExt = 902.0 * sMm;
2449 static const Double_t sOBCYSS14PhiCut = 4.0 * sMm;
2450
2451 static const Double_t sOBCYSS13Zlen = 1481.0 * sMm;
2452 static const Double_t sOBCYSS13DInt = sOBCYSS14DExt;
2453 static const Double_t sOBCYSS13DExt = 918.0 * sMm;
2454 static const Double_t sOBCYSS13PhiCut = 10.55 * sMm;
2455
2456 static const Double_t sOBCYSS12Zlen = 1520.6 * sMm;
2457 static const Double_t sOBCYSS12DInt = sOBCYSS13DExt;
2458 static const Double_t sOBCYSS12DExt = 922.0 * sMm;
2459 static const Double_t sOBCYSS12PhiCut = 4.0 * sMm;
2460
2461 static const Double_t sOBCYSS20Zlen = 1500.6 * sMm;
2462 static const Double_t sOBCYSS20Width = 7.1 * sMm;
2463 static const Double_t sOBCYSS20Height = 6.35 * sMm;
2464
2465 // Local variables
2466 Double_t rmin, rmax, phi;
2467 Double_t xpos, ypos, zpos;
2468
2469 // The OB CYSS is made by three cylinders plus other elements
2470 // (rings, bars, etc) fixed together
2471
2472 // The three cylinders
2473 rmin = sOBCYSS14DInt / 2;
2474 rmax = sOBCYSS14DExt / 2;
2475
2476 phi = sOBCYSS14PhiCut / rmin;
2477 phi *= TMath::RadToDeg();
2478
2479 TGeoTubeSeg* obCyss14Sh = new TGeoTubeSeg(rmin, rmax, sOBCYSS14Zlen / 2, phi, 180. - phi);
2480
2481 //
2482 rmin = sOBCYSS13DInt / 2;
2483 rmax = sOBCYSS13DExt / 2;
2484
2485 phi = sOBCYSS13PhiCut / rmin;
2486 phi *= TMath::RadToDeg();
2487
2488 TGeoTubeSeg* obCyss13Sh = new TGeoTubeSeg(rmin, rmax, sOBCYSS13Zlen / 2, phi, 180. - phi);
2489
2490 //
2491 rmin = sOBCYSS12DInt / 2;
2492 rmax = sOBCYSS12DExt / 2;
2493
2494 phi = sOBCYSS12PhiCut / rmin;
2495 phi *= TMath::RadToDeg();
2496
2497 TGeoTubeSeg* obCyss12Sh = new TGeoTubeSeg(rmin, rmax, sOBCYSS12Zlen / 2, phi, 180. - phi);
2498
2499 // The middle bar
2500 TGeoBBox* obCyss20Sh = new TGeoBBox(sOBCYSS20Width / 2, sOBCYSS20Height / 2, sOBCYSS20Zlen / 2);
2501
2502 // We have all shapes: now create the real volumes
2503 TGeoMedium* medRist = mgr->GetMedium(Form("%s_RIST110$", GetDetName()));
2504 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_AS4C200$", GetDetName()));
2505
2506 TGeoVolume* obCyss14Vol = new TGeoVolume("OBCYSS14", obCyss14Sh, medCarbon);
2507 obCyss14Vol->SetFillColor(kBlue);
2508 obCyss14Vol->SetLineColor(kBlue);
2509
2510 TGeoVolume* obCyss13Vol = new TGeoVolume("OBCYSS13", obCyss13Sh, medRist);
2511 obCyss13Vol->SetFillColor(kBlue);
2512 obCyss13Vol->SetLineColor(kBlue);
2513
2514 TGeoVolume* obCyss12Vol = new TGeoVolume("OBCYSS12", obCyss12Sh, medCarbon);
2515 obCyss12Vol->SetFillColor(kBlue);
2516 obCyss12Vol->SetLineColor(kBlue);
2517
2518 TGeoVolume* obCyss20Vol = new TGeoVolume("OBCYSS20", obCyss20Sh, medCarbon);
2519 obCyss20Vol->SetFillColor(kYellow);
2520 obCyss20Vol->SetLineColor(kYellow);
2521
2522 // Finally put everything in the mother volume
2523 mother->AddNode(obCyss14Vol, 1, nullptr);
2524 mother->AddNode(obCyss14Vol, 2, new TGeoRotation("", 180, 0, 0));
2525
2526 mother->AddNode(obCyss13Vol, 1, nullptr);
2527 mother->AddNode(obCyss13Vol, 2, new TGeoRotation("", 180, 0, 0));
2528
2529 mother->AddNode(obCyss12Vol, 1, nullptr);
2530 mother->AddNode(obCyss12Vol, 2, new TGeoRotation("", 180, 0, 0));
2531
2532 xpos = (obCyss13Sh->GetRmin() + obCyss13Sh->GetRmax()) / 2;
2533 ypos = sOBCYSS13PhiCut - obCyss20Sh->GetDY();
2534 mother->AddNode(obCyss20Vol, 1, new TGeoTranslation(xpos, ypos, 0));
2535 mother->AddNode(obCyss20Vol, 2, new TGeoTranslation(-xpos, ypos, 0));
2536 mother->AddNode(obCyss20Vol, 3, new TGeoTranslation(xpos, -ypos, 0));
2537 mother->AddNode(obCyss20Vol, 4, new TGeoTranslation(-xpos, -ypos, 0));
2538}
2539
2540void V3Services::ibConvWire(TGeoVolume* mother, const TGeoManager* mgr)
2541{
2542 //
2543 // Creates the 1mm wire for Gamma Conversion studies and its supports
2544 // Blueprints (from EDMS) : ALIITSUP0949 (the whole assembly)
2545 // ALIITSUP0469 (the actual wire)
2546 // ALIITSUP0466 (each tension screw)
2547 // ALIITSUP0918 (the inner support plate)
2548 // ALIITSUP0914 (the outer support plate)
2549 //
2550 // Input:
2551 // mother : the volume where to place the current created cylinder
2552 // mgr : the GeoManager (used only to get the proper material)
2553 //
2554 // Output:
2555 //
2556 // Return:
2557 //
2558 // Created: 28 Sep 2022 Mario Sitta
2559 //
2560
2561 // The wire itself
2562 static const Double_t sIBGWireLength = 492.0 * sMm;
2563 static const Double_t sIBGWireDiam = 1.0 * sMm;
2564
2565 static const Double_t sIBGWireXPosIn = 55.1 * sMm;
2566 static const Double_t sIBGWireXPosOut = 148.6 * sMm;
2567 static const Double_t sIBGWireYPos = 14.0 * sMm;
2568 static const Double_t sIBGWireZPos = 68.25 * sMm;
2569 static const Double_t sIBGWirePhiPos = 10.9; // Deg
2570 static const Double_t sIBGWireThetaPos = 8.7; // Deg
2571
2572 // The inner wire support
2573 static const Double_t sIBGWireIntSuppBaseCentWid = 11.54 * sMm;
2574 static const Double_t sIBGWireIntSuppBaseCentHi = 11.3 * sMm;
2575 static const Double_t sIBGWireIntSuppBaseCentThik = 3.9 * sMm;
2576
2577 static const Double_t sIBGWireIntSuppZpos = 171.5 * sMm;
2578 static const Double_t sIBGWireIntSuppXDist = 116.2 * sMm;
2579
2580 // The outer wire support
2581 static const Double_t sIBGWireOutSuppLength = 26.5 * sMm;
2582 static const Double_t sIBGWireOutSuppThick = 3.0 * sMm;
2583
2584 static const Double_t sIBGWireOutSuppHoleXpos = 16.0 * sMm;
2585 static const Double_t sIBGWireOutSuppXDist = 292.0 * sMm;
2586 static const Double_t sIBGWireOutSuppYpos = 1.0 * sMm;
2587 static const Double_t sIBGWireOutSuppZpos = 312.9 * sMm;
2588
2589 // Local variables
2590 Double_t xpos, ypos, zpos;
2591
2592 // The wire: a Tube
2593 TGeoTube* ibWireSh = new TGeoTube(0, sIBGWireDiam / 2, sIBGWireLength / 2);
2594
2595 // Create the support shapes
2596 TGeoCompositeShape* ibWireIntSuppLeftSh = ibConvWireIntSupport(kTRUE);
2597 TGeoCompositeShape* ibWireIntSuppRightSh = ibConvWireIntSupport(kFALSE);
2598 TGeoCompositeShape* ibWireOutSuppSh = ibConvWireOutSupport();
2599
2600 // We have all shapes: now create the real volumes
2601 TGeoMedium* medAl = mgr->GetMedium(Form("%s_ALUMINUM$", GetDetName()));
2602 TGeoMedium* medTungsten = mgr->GetMedium(Form("%s_TUNGSTEN$", GetDetName()));
2603
2604 TGeoVolume* ibWireVol = new TGeoVolume("IBGammaConvWire", ibWireSh, medTungsten);
2605 ibWireVol->SetFillColor(kGray);
2606 ibWireVol->SetLineColor(kGray);
2607
2608 TGeoVolume* ibWireIntSuppLeftVol = new TGeoVolume("IBGammaConvWireInnerSupportLeft", ibWireIntSuppLeftSh, medAl);
2609 ibWireIntSuppLeftVol->SetFillColor(kRed);
2610 ibWireIntSuppLeftVol->SetLineColor(kRed);
2611
2612 TGeoVolume* ibWireIntSuppRightVol = new TGeoVolume("IBGammaConvWireInnerSupportRight", ibWireIntSuppRightSh, medAl);
2613 ibWireIntSuppRightVol->SetFillColor(kRed);
2614 ibWireIntSuppRightVol->SetLineColor(kRed);
2615
2616 TGeoVolume* ibWireOutSuppVol = new TGeoVolume("IBGammaConvWireOuterSupport", ibWireOutSuppSh, medAl);
2617 ibWireOutSuppVol->SetFillColor(kRed);
2618 ibWireOutSuppVol->SetLineColor(kRed);
2619
2620 // Finally put everything in the mother volume
2621 xpos = (sIBGWireXPosIn + sIBGWireXPosOut) / 2;
2622 ypos = sIBGWireYPos;
2623 zpos = sIBGWireZPos;
2624 mother->AddNode(ibWireVol, 1, new TGeoCombiTrans(xpos, -ypos, zpos, new TGeoRotation("", 90 - sIBGWireThetaPos, sIBGWirePhiPos, 0)));
2625 mother->AddNode(ibWireVol, 2, new TGeoCombiTrans(-xpos, -ypos, zpos, new TGeoRotation("", 90 + sIBGWireThetaPos, -sIBGWirePhiPos, 0)));
2626
2627 xpos = sIBGWireIntSuppXDist / 2 - sIBGWireIntSuppBaseCentWid / 2;
2628 ypos = sIBGWireIntSuppBaseCentHi / 2;
2629 zpos = sIBGWireIntSuppZpos + sIBGWireIntSuppBaseCentThik;
2630 mother->AddNode(ibWireIntSuppLeftVol, 1, new TGeoTranslation(xpos, -ypos, -zpos));
2631 mother->AddNode(ibWireIntSuppRightVol, 1, new TGeoTranslation(-xpos, -ypos, -zpos));
2632
2633 xpos = sIBGWireOutSuppXDist / 2 - sIBGWireOutSuppHoleXpos;
2634 ypos = -sIBGWireOutSuppLength - sIBGWireOutSuppYpos;
2635 zpos = sIBGWireOutSuppZpos - sIBGWireOutSuppThick;
2636 mother->AddNode(ibWireOutSuppVol, 1, new TGeoTranslation(xpos, ypos, zpos));
2637
2638 zpos = sIBGWireOutSuppZpos;
2639 mother->AddNode(ibWireOutSuppVol, 2, new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("", 180, 180, 0)));
2640}
2641
2642TGeoCompositeShape* V3Services::ibConvWireIntSupport(const Bool_t left)
2643{
2644 //
2645 // Creates the shape of the internal support of the Inner Barrel Gamma
2646 // Conversion wire: being pretty complicate, we devote a dedicate method
2647 // for it; the shape is a bit simplified but the total material budget
2648 // is preserved
2649 // The left and right supports are specular (or better, chiral), so we
2650 // cannot create one volume and place two copies one of them rotated,
2651 // but we have to create two different (specular) copies
2652 // Blueprints (from EDMS) : ALIITSUP0918, ALIITSUP0919
2653 //
2654 // Input:
2655 // left : if true create the left copy, otherwise the right copy
2656 //
2657 // Output:
2658 //
2659 // Return:
2660 // The support shape as a TGeoCompositeShape
2661 //
2662 // Created: 01 Oct 2022 Mario Sitta
2663 //
2664
2665 // The outer wire support
2666 static const Double_t sIBGWireIntSuppBaseFullWid = 19.5 * sMm;
2667 static const Double_t sIBGWireIntSuppBaseFullSpan = 18.5 * sMm;
2668 static const Double_t sIBGWireIntSuppBaseOutSpan = 2.5 * sMm;
2669 static const Double_t sIBGWireIntSuppBaseCentWid = 11.94 * sMm;
2670 static const Double_t sIBGWireIntSuppBaseCentHi = 11.3 * sMm;
2671 static const Double_t sIBGWireIntSuppBaseCentThik = 3.9 * sMm;
2672 static const Double_t sIBGWireIntSuppFingerLen = 9.6 * sMm;
2673 static const Double_t sIBGWireIntSuppFingerWid = 4.8 * sMm;
2674 static const Double_t sIBGWireIntSuppFingerShift = 1.4 * sMm;
2675 static const Double_t sIBGWireIntSuppFingerThik = 8.1 * sMm;
2676 static const Double_t sIBGWireIntSuppFingerPhi = 15.0; // Deg
2677 static const Double_t sIBGWireIntSuppSpikyWid = 10.0 * sMm;
2678 static const Double_t sIBGWireIntSuppSpikyHi = 12.6 * sMm;
2679 static const Double_t sIBGWireIntSuppSpikyXin = 2.5 * sMm;
2680 static const Double_t sIBGWireIntSuppSpikyYin = 9.2 * sMm;
2681 static const Double_t sIBGWireIntSuppSpikyThik = 3.0 * sMm;
2682
2683 // Local variables
2684 Double_t xtru[11], ytru[11];
2685 Double_t xlen, ylen, zlen;
2686 Double_t xpos, ypos, zpos, phirot;
2687
2688 Int_t shapeId = 0;
2689 if (left) {
2690 shapeId = 1;
2691 }
2692 // The outer wire support parts:
2693 // - the central part: a BBox
2694 xlen = (sIBGWireIntSuppBaseCentWid + sIBGWireIntSuppFingerShift) / 2;
2695 ylen = sIBGWireIntSuppBaseCentHi / 2;
2696 zlen = sIBGWireIntSuppBaseCentThik / 2;
2697 TGeoBBox* intSuppCent = new TGeoBBox(xlen, ylen, zlen);
2698 intSuppCent->SetName(Form("suppcent%d", shapeId));
2699
2700 // - the lateral part: a Xtru
2701 xtru[0] = 0;
2702 ytru[0] = 0;
2703 xtru[1] = sIBGWireIntSuppBaseFullWid - sIBGWireIntSuppBaseCentWid;
2704 ytru[1] = ytru[0];
2705 xtru[2] = xtru[1] + sIBGWireIntSuppFingerLen * TMath::Cos(sIBGWireIntSuppFingerPhi * TMath::DegToRad());
2706 ytru[2] = sIBGWireIntSuppFingerLen * TMath::Sin(sIBGWireIntSuppFingerPhi * TMath::DegToRad());
2707 xtru[3] = xtru[2] - sIBGWireIntSuppFingerWid * TMath::Sin(sIBGWireIntSuppFingerPhi * TMath::DegToRad());
2708 ytru[3] = ytru[2] + sIBGWireIntSuppFingerWid * TMath::Cos(sIBGWireIntSuppFingerPhi * TMath::DegToRad());
2709 xtru[4] = xtru[1];
2710 ytru[4] = ytru[3] - sIBGWireIntSuppFingerLen * TMath::Sin(sIBGWireIntSuppFingerPhi * TMath::DegToRad());
2711 xtru[5] = sIBGWireIntSuppBaseOutSpan;
2712 ytru[5] = sIBGWireIntSuppBaseCentHi;
2713 xtru[6] = -sIBGWireIntSuppFingerShift;
2714 ytru[6] = ytru[5];
2715
2716 TGeoXtru* intSuppFing = new TGeoXtru(2);
2717 intSuppFing->DefinePolygon(7, xtru, ytru);
2718 intSuppFing->DefineSection(0, 0);
2719 intSuppFing->DefineSection(1, sIBGWireIntSuppFingerThik);
2720 intSuppFing->SetName(Form("suppfinger%d", shapeId));
2721
2722 ypos = -intSuppCent->GetDY();
2723 if (left) {
2724 xpos = -intSuppCent->GetDX();
2725 zpos = -intSuppCent->GetDZ() + sIBGWireIntSuppFingerThik;
2726 phirot = 180;
2727 } else {
2728 xpos = intSuppCent->GetDX();
2729 zpos = -intSuppCent->GetDZ();
2730 phirot = 0;
2731 }
2732 TGeoCombiTrans* intSuppFingMat = new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", phirot, phirot, 0));
2733 intSuppFingMat->SetName(Form("suppfingermat%d", shapeId));
2734 intSuppFingMat->RegisterYourself();
2735
2736 // - the spiky part: a Xtru
2737 xtru[0] = 0;
2738 ytru[0] = 0;
2739 xtru[1] = sIBGWireIntSuppBaseCentWid;
2740 ytru[1] = ytru[0];
2741 xtru[2] = xtru[1];
2742 ytru[2] = sIBGWireIntSuppBaseCentHi;
2743 xtru[3] = xtru[2] - (sIBGWireIntSuppBaseFullSpan - sIBGWireIntSuppSpikyWid - sIBGWireIntSuppBaseOutSpan);
2744 ytru[3] = ytru[2];
2745 xtru[4] = xtru[3];
2746 ytru[4] = ytru[3] + sIBGWireIntSuppSpikyHi;
2747 xtru[5] = xtru[4] - (sIBGWireIntSuppSpikyWid - sIBGWireIntSuppSpikyXin) / 2;
2748 ytru[5] = ytru[4] - (sIBGWireIntSuppSpikyHi - sIBGWireIntSuppSpikyYin);
2749 xtru[6] = xtru[5];
2750 ytru[6] = ytru[3];
2751 xtru[7] = xtru[6] - sIBGWireIntSuppSpikyXin;
2752 ytru[7] = ytru[6];
2753 xtru[8] = xtru[7];
2754 ytru[8] = ytru[5];
2755 xtru[9] = xtru[8] - (sIBGWireIntSuppSpikyWid - sIBGWireIntSuppSpikyXin) / 2;
2756 ytru[9] = ytru[4];
2757 xtru[10] = xtru[9];
2758 ytru[10] = ytru[3];
2759
2760 TGeoXtru* intSuppSpiky = new TGeoXtru(2);
2761 intSuppSpiky->DefinePolygon(11, xtru, ytru);
2762 intSuppSpiky->DefineSection(0, 0);
2763 intSuppSpiky->DefineSection(1, sIBGWireIntSuppSpikyThik);
2764 intSuppSpiky->SetName(Form("suppspiky%d", shapeId));
2765
2766 ypos = -intSuppCent->GetDY();
2767 if (left) {
2768 xpos = intSuppCent->GetDX();
2769 zpos = intSuppCent->GetDZ() - sIBGWireIntSuppSpikyThik;
2770 phirot = 180;
2771 } else {
2772 xpos = -intSuppCent->GetDX();
2773 zpos = -intSuppCent->GetDZ() - sIBGWireIntSuppSpikyThik;
2774 phirot = 0;
2775 }
2776 TGeoCombiTrans* intSuppSpikyMat = new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", phirot, phirot, 0));
2777 intSuppSpikyMat->SetName(Form("suppspikymat%d", shapeId));
2778 intSuppSpikyMat->RegisterYourself();
2779
2780 // The actual wire outer support: a CompositeShape
2781 TString compoShape = Form("suppcent%d", shapeId);
2782 compoShape += Form("+suppfinger%d:suppfingermat%d", shapeId, shapeId);
2783 compoShape += Form("+suppspiky%d:suppspikymat%d", shapeId, shapeId);
2784 TGeoCompositeShape* supportShape = new TGeoCompositeShape(compoShape);
2785
2786 // Finally return the support shape
2787 return supportShape;
2788}
2789
2790TGeoCompositeShape* V3Services::ibConvWireOutSupport()
2791{
2792 //
2793 // Creates the shape of the external support of the Inner Barrel Gamma
2794 // Conversion wire: being pretty complicate, we devote a dedicate method
2795 // for it; the shape is a bit simplified but the total material budget
2796 // is preserved
2797 // Blueprints (from EDMS) : ALIITSUP0914
2798 //
2799 // Input:
2800 //
2801 // Output:
2802 //
2803 // Return:
2804 // The support shape as a TGeoCompositeShape
2805 //
2806 // Created: 30 Sep 2022 Mario Sitta
2807 //
2808
2809 // The outer wire support
2810 static const Double_t sIBGWireOutSuppWideIn = 22.5 * sMm;
2811 static const Double_t sIBGWireOutSuppWideOut = 24.0 * sMm;
2812 static const Double_t sIBGWireOutSuppWideTot = 31.0 * sMm;
2813 static const Double_t sIBGWireOutSuppLenIn = 8.0 * sMm;
2814 static const Double_t sIBGWireOutSuppLenOut = 9.3 * sMm;
2815 static const Double_t sIBGWireOutSuppLength = 26.5 * sMm;
2816 static const Double_t sIBGWireOutSuppLenToSide = 10.5 * sMm;
2817 static const Double_t sIBGWireOutSuppThick = 3.0 * sMm;
2818 static const Double_t sIBGWireOutSuppPhi = 30.0; // Deg
2819 static const Double_t sIBGWireOutSuppLenToPlate = 16.3 * sMm;
2820 static const Double_t sIBGWireOutSuppWidToPlate = 27.75 * sMm;
2821 static const Double_t sIBGWireOutSuppPlateWid = 17.0 * sMm;
2822
2823 // Local variables
2824 Double_t xtru[8], ytru[8], xyarb[16];
2825 Double_t xlen, ylen, zlen;
2826 Double_t xpos, ypos, zpos;
2827
2828 // The outer wire support parts:
2829 // - the base: a Xtru
2830 xtru[0] = 0;
2831 ytru[0] = 0;
2832 xtru[1] = sIBGWireOutSuppWideIn;
2833 ytru[1] = ytru[0];
2834 xtru[2] = xtru[1];
2835 xtru[3] = sIBGWireOutSuppWideOut;
2836 ytru[3] = sIBGWireOutSuppLenToSide;
2837 ytru[2] = ytru[3] - (xtru[3] - xtru[2]) * TMath::Tan((90 - sIBGWireOutSuppPhi) * TMath::DegToRad());
2838 xtru[4] = xtru[3];
2839 ytru[4] = sIBGWireOutSuppLength - sIBGWireOutSuppLenIn;
2840 xtru[5] = xtru[2];
2841 ytru[5] = ytru[4];
2842 xtru[6] = xtru[5];
2843 ytru[6] = sIBGWireOutSuppLength;
2844 xtru[7] = xtru[0];
2845 ytru[7] = ytru[6];
2846
2847 TGeoXtru* ibWireOutSuppBase = new TGeoXtru(2);
2848 ibWireOutSuppBase->DefinePolygon(8, xtru, ytru);
2849 ibWireOutSuppBase->DefineSection(0, 0);
2850 ibWireOutSuppBase->DefineSection(1, sIBGWireOutSuppThick);
2851 ibWireOutSuppBase->SetName("ibwireoutsuppbase");
2852
2853 // - the inclined side: an Arb8
2854 zlen = ibWireOutSuppBase->GetY(4) - ibWireOutSuppBase->GetY(3);
2855 ylen = zlen * TMath::Tan(sIBGWireOutSuppPhi * TMath::DegToRad());
2856
2857 xyarb[0] = sIBGWireOutSuppThick / 2;
2858 xyarb[1] = 0;
2859
2860 xyarb[2] = -sIBGWireOutSuppThick / 2;
2861 xyarb[3] = 0;
2862
2863 xyarb[4] = xyarb[2];
2864 xyarb[5] = 0.0;
2865
2866 xyarb[6] = xyarb[0];
2867 xyarb[7] = 0.0;
2868
2869 xyarb[8] = sIBGWireOutSuppPlateWid / 2;
2870 xyarb[9] = 0;
2871
2872 xyarb[10] = -sIBGWireOutSuppPlateWid / 2;
2873 xyarb[11] = 0;
2874
2875 xyarb[12] = xyarb[10];
2876 xyarb[13] = ylen;
2877
2878 xyarb[14] = xyarb[8];
2879 xyarb[15] = ylen;
2880
2881 TGeoArb8* ibWireOutSuppArb = new TGeoArb8(zlen / 2, xyarb);
2882 ibWireOutSuppArb->SetName("ibwireoutsupparb");
2883
2884 xpos = ibWireOutSuppBase->GetX(3);
2885 ypos = (ibWireOutSuppBase->GetY(3) + ibWireOutSuppBase->GetY(4)) / 2;
2886 zpos = sIBGWireOutSuppThick / 2;
2887 TGeoCombiTrans* ibOutSuppArbMat = new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", 0, -90, -90));
2888 ibOutSuppArbMat->SetName("iboutsupparbmat");
2889 ibOutSuppArbMat->RegisterYourself();
2890
2891 // - the vertical plate: a BBox
2892 xlen = sIBGWireOutSuppWideTot - sIBGWireOutSuppWidToPlate;
2893 ylen = sIBGWireOutSuppLength + sIBGWireOutSuppLenOut - ibWireOutSuppBase->GetY(4);
2894 zlen = sIBGWireOutSuppPlateWid;
2895 TGeoBBox* ibWireOutSuppPlate = new TGeoBBox(xlen / 2, ylen / 2, zlen / 2);
2896 ibWireOutSuppPlate->SetName("ibwireoutsuppplate");
2897
2898 xpos += (xyarb[15] - ibWireOutSuppPlate->GetDX());
2899 ypos += (ibWireOutSuppArb->GetDz() + ibWireOutSuppPlate->GetDY());
2900 TGeoTranslation* ibOutSuppPlateMat = new TGeoTranslation(xpos, ypos, zpos);
2901 ibOutSuppPlateMat->SetName("iboutsuppplatemat");
2902 ibOutSuppPlateMat->RegisterYourself();
2903
2904 // The actual wire outer support: a CompositeShape
2905 TGeoCompositeShape* supportShape = new TGeoCompositeShape("ibwireoutsuppbase+ibwireoutsupparb:iboutsupparbmat+ibwireoutsuppplate:iboutsuppplatemat");
2906
2907 // Finally return the support shape
2908 return supportShape;
2909}
2910
2911void V3Services::createAllITSServices(TGeoVolume* mother, const TGeoManager* mgr)
2912{
2913 //
2914 // Steering method to creates the ITS services: tubes, cables and the like
2915 //
2916 // Input:
2917 // motherVolume : the volume hosting the supports
2918 // mgr : the GeoManager (used only to get the proper material)
2919 //
2920 // Output:
2921 //
2922 // Return:
2923 //
2924 // Created: 12 Apr 2023 Mario Sitta First version (very roughly)
2925 //
2926
2927 // The present version is very rough: all services are approximated
2928 // as cylinders/cones with a proper thickness to guess the total
2929 // material budget (original code by A.Morsch)
2930 // (some figures are hardcoded)
2931
2932 // Inner Barrel
2933 static const Double_t sIBServicesZIn = 35.0 * sCm;
2934 static const Double_t sIBServicesZMid = 44.0 * sCm;
2935 static const Double_t sIBServicesZOut = 253.45 * sCm;
2936
2937 static const Double_t sIBServicesR1max = 13.3 * sCm;
2938 static const Double_t sIBServicesR2max = 43.53 * sCm;
2939
2940 static const Double_t sIBServicesCarbonThick = 0.2 * sCm;
2941 static const Double_t sIBServicesCopperThick = 0.018 * sCm;
2942 static const Double_t sIBServicesPolymerThick = 0.42 * sCm;
2943
2944 // Outer Barrel
2945 static const Double_t sOBServicesZIn = 83.0 * sCm;
2946 static const Double_t sOBServicesZOut = 248.00 * sCm;
2947
2948 static const Double_t sOBServicesRmax = 47.2 * sCm;
2949
2950 static const Double_t sOBServicesTotalThick = 4.42 * sCm;
2951 static const Double_t sOBServicesCarbonThick = 0.25 * sCm;
2952 static const Double_t sOBServicesCopperThick = 0.23 * sCm;
2953 static const Double_t sOBServicesPolymerThick = 3.8 * sCm;
2954
2955 static const Double_t sBeamPipeSupportRHole = 28.2 * sMm;
2956 static const Double_t sBeamPipeSupportZPos = 182.1 * sCm;
2957 static const Double_t sBeamPipeSupportXIB = 32.5 * sCm;
2958
2959 // Local variables
2960 Double_t rmin, rmax, zlen, xpos, zpos;
2961
2962 // The hole where the Beam Pipe Support should pass
2963 zlen = 0.9 * sOBServicesTotalThick;
2964 TGeoTube* obBPSuppHole = new TGeoTube(0, sBeamPipeSupportRHole, zlen);
2965 obBPSuppHole->SetName("bpSuppHole");
2966
2967 // The Outer Barrel services as CompositeShape's (to avoid fake overlaps
2968 // with the Beam Pipe Support on Side A) with a Pcon as basic shape
2969 // Carbon
2970 TGeoPcon* ibCarbonCon = new TGeoPcon(0., 360., 3);
2971 rmin = sIBServicesR1max - (sIBServicesCarbonThick + 1.8 * 0.462);
2972 ibCarbonCon->DefineSection(0, sIBServicesZIn, rmin, sIBServicesR1max);
2973 ibCarbonCon->DefineSection(1, sIBServicesZMid, rmin, sIBServicesR1max);
2974 rmin = sIBServicesR2max - (sIBServicesCarbonThick + 0.462 / 1.8);
2975 ibCarbonCon->DefineSection(2, sIBServicesZOut, rmin, sIBServicesR2max);
2976 ibCarbonCon->SetName("ibCarbonCon");
2977
2978 xpos = sBeamPipeSupportXIB;
2979 zpos = sBeamPipeSupportZPos;
2980 TGeoCombiTrans* ibHoleMatL = new TGeoCombiTrans(xpos, 0, zpos, new TGeoRotation("", 90, 90, -90));
2981 ibHoleMatL->SetName("ibHoleMatL");
2982 ibHoleMatL->RegisterYourself();
2983
2984 TGeoCombiTrans* ibHoleMatR = new TGeoCombiTrans(-xpos, 0, zpos, new TGeoRotation("", 90, 90, -90));
2985 ibHoleMatR->SetName("ibHoleMatR");
2986 ibHoleMatR->RegisterYourself();
2987
2988 TGeoCompositeShape* ibCarbonSh = new TGeoCompositeShape("ibCarbonCon-bpSuppHole:ibHoleMatL-bpSuppHole:ibHoleMatR");
2989
2990 // Copper
2991 TGeoPcon* ibCopperCon = new TGeoPcon(0., 360., 3);
2992 rmin = ibCarbonCon->GetRmin(0);
2993 rmax = ibCarbonCon->GetRmax(0) - sIBServicesCarbonThick;
2994 ibCopperCon->DefineSection(0, sIBServicesZIn, rmin, rmax);
2995 ibCopperCon->DefineSection(1, sIBServicesZMid, rmin, rmax);
2996 rmin = ibCarbonCon->GetRmin(2);
2997 rmax = ibCarbonCon->GetRmax(2) - sIBServicesCarbonThick;
2998 ibCopperCon->DefineSection(2, sIBServicesZOut, rmin, rmax);
2999 ibCopperCon->SetName("ibCopperCon");
3000
3001 TGeoCompositeShape* ibCopperSh = new TGeoCompositeShape("ibCopperCon-bpSuppHole:ibHoleMatL-bpSuppHole:ibHoleMatR");
3002
3003 // Polymer
3004 TGeoPcon* ibPolyCon = new TGeoPcon(0., 360., 3);
3005 rmin = ibCarbonCon->GetRmin(0);
3006 rmax = ibCopperCon->GetRmax(0) - sIBServicesCopperThick * 1.8;
3007 ibPolyCon->DefineSection(0, sIBServicesZIn, rmin, rmax);
3008 ibPolyCon->DefineSection(1, sIBServicesZMid, rmin, rmax);
3009 rmin = ibCopperCon->GetRmin(2);
3010 rmax = ibCopperCon->GetRmax(2) - sIBServicesCopperThick / 1.8;
3011 ibPolyCon->DefineSection(2, sIBServicesZOut, rmin, rmax);
3012 ibPolyCon->SetName("ibPolyCon");
3013
3014 TGeoCompositeShape* ibPolySh = new TGeoCompositeShape("ibPolyCon-bpSuppHole:ibHoleMatL-bpSuppHole:ibHoleMatR");
3015
3016 // Water
3017 TGeoPcon* ibWaterCon = new TGeoPcon(0., 360., 3);
3018 rmin = ibCarbonCon->GetRmin(0);
3019 rmax = ibPolyCon->GetRmax(0) - sIBServicesPolymerThick * 1.8;
3020 ibWaterCon->DefineSection(0, sIBServicesZIn, rmin, rmax);
3021 ibWaterCon->DefineSection(1, sIBServicesZMid, rmin, rmax);
3022 rmin = ibPolyCon->GetRmin(2);
3023 rmax = ibPolyCon->GetRmax(2) - sIBServicesPolymerThick / 1.8;
3024 ibWaterCon->DefineSection(2, sIBServicesZOut, rmin, rmax);
3025 ibWaterCon->SetName("ibWaterCon");
3026
3027 TGeoCompositeShape* ibWaterSh = new TGeoCompositeShape("ibWaterCon-bpSuppHole:ibHoleMatL-bpSuppHole:ibHoleMatR");
3028
3029 // The Outer Barrel services as CompositeShape's (to avoid fake overlaps
3030 // with the Beam Pipe Support on Side A) with a Tube as basic shape
3031 // Carbon
3032 rmin = sOBServicesRmax - sOBServicesTotalThick;
3033 zlen = sOBServicesZOut - sOBServicesZIn;
3034 TGeoTube* obCarbonTub = new TGeoTube(rmin, sOBServicesRmax, zlen / 2);
3035 obCarbonTub->SetName("obCarbonTub");
3036
3037 xpos = (rmin + sOBServicesRmax) / 2;
3038 zpos = sBeamPipeSupportZPos - (sOBServicesZIn + zlen / 2);
3039 TGeoCombiTrans* obHoleMatL = new TGeoCombiTrans(xpos, 0, zpos, new TGeoRotation("", 90, 90, -90));
3040 obHoleMatL->SetName("obHoleMatL");
3041 obHoleMatL->RegisterYourself();
3042
3043 TGeoCombiTrans* obHoleMatR = new TGeoCombiTrans(-xpos, 0, zpos, new TGeoRotation("", 90, 90, -90));
3044 obHoleMatR->SetName("obHoleMatR");
3045 obHoleMatR->RegisterYourself();
3046
3047 TGeoCompositeShape* obCarbonSh = new TGeoCompositeShape("obCarbonTub-bpSuppHole:obHoleMatL-bpSuppHole:obHoleMatR");
3048
3049 // Copper
3050 rmax = sOBServicesRmax - sOBServicesCarbonThick;
3051 TGeoTube* obCopperTub = new TGeoTube(rmin, rmax, zlen / 2);
3052 obCopperTub->SetName("obCopperTub");
3053
3054 TGeoCompositeShape* obCopperSh = new TGeoCompositeShape("obCopperTub-bpSuppHole:obHoleMatL-bpSuppHole:obHoleMatR");
3055
3056 // Polymer
3057 rmax -= sOBServicesCopperThick;
3058 TGeoTube* obPolyTub = new TGeoTube(rmin, rmax, zlen / 2);
3059 obPolyTub->SetName("obPolyTub");
3060
3061 TGeoCompositeShape* obPolySh = new TGeoCompositeShape("obPolyTub-bpSuppHole:obHoleMatL-bpSuppHole:obHoleMatR");
3062
3063 // Water
3064 rmax -= sOBServicesPolymerThick;
3065 TGeoTube* obWaterTub = new TGeoTube(rmin, rmax, zlen / 2);
3066 obWaterTub->SetName("obWaterTub");
3067
3068 TGeoCompositeShape* obWaterSh = new TGeoCompositeShape("obWaterTub-bpSuppHole:obHoleMatL-bpSuppHole:obHoleMatR");
3069
3070 // We have all shapes: now create the real volumes
3071 TGeoMedium* medCarbon = mgr->GetMedium(Form("%s_C4SERVICES$", GetDetName()));
3072 TGeoMedium* medCopper = mgr->GetMedium(Form("%s_COPPER$", GetDetName()));
3073 TGeoMedium* medPolymer = mgr->GetMedium(Form("%s_POLY4SERVICES$", GetDetName()));
3074 TGeoMedium* medWater = mgr->GetMedium(Form("%s_WATER$", GetDetName()));
3075
3076 TGeoVolume* ibCarbonVol = new TGeoVolume("ITSServicesCarbonIB", ibCarbonSh, medCarbon);
3077 ibCarbonVol->SetFillColor(kGray);
3078 ibCarbonVol->SetLineColor(kGray);
3079
3080 TGeoVolume* ibCopperVol = new TGeoVolume("ITSServicesCopperIB", ibCopperSh, medCopper);
3081 ibCopperVol->SetFillColor(kRed);
3082 ibCopperVol->SetLineColor(kRed);
3083
3084 TGeoVolume* ibPolyVol = new TGeoVolume("ITSServicesPolymerIB", ibPolySh, medPolymer);
3085 ibPolyVol->SetFillColor(kYellow);
3086 ibPolyVol->SetLineColor(kYellow);
3087
3088 TGeoVolume* ibWaterVol = new TGeoVolume("ITSServicesWaterIB", ibWaterSh, medWater);
3089 ibWaterVol->SetFillColor(kBlue);
3090 ibWaterVol->SetLineColor(kBlue);
3091
3092 TGeoVolume* obCarbonVol = new TGeoVolume("ITSServicesCarbonOB", obCarbonSh, medCarbon);
3093 obCarbonVol->SetFillColor(kGray);
3094 obCarbonVol->SetLineColor(kGray);
3095
3096 TGeoVolume* obCopperVol = new TGeoVolume("ITSServicesCopperOB", obCopperSh, medCopper);
3097 obCopperVol->SetFillColor(kRed);
3098 obCopperVol->SetLineColor(kRed);
3099
3100 TGeoVolume* obPolyVol = new TGeoVolume("ITSServicesPolymerOB", obPolySh, medPolymer);
3101 obPolyVol->SetFillColor(kYellow);
3102 obPolyVol->SetLineColor(kYellow);
3103
3104 TGeoVolume* obWaterVol = new TGeoVolume("ITSServicesWaterOB", obWaterSh, medWater);
3105 obWaterVol->SetFillColor(kBlue);
3106 obWaterVol->SetLineColor(kBlue);
3107
3108 // Finally place all volumes
3109 mother->AddNode(ibCarbonVol, 1, new TGeoTranslation(0., 30., 0.));
3110 ibCarbonVol->AddNode(ibCopperVol, 1, nullptr);
3111 ibCopperVol->AddNode(ibPolyVol, 1, nullptr);
3112 ibPolyVol->AddNode(ibWaterVol, 1, nullptr);
3113
3114 zpos = sOBServicesZIn + zlen / 2;
3115 mother->AddNode(obCarbonVol, 1, new TGeoTranslation(0., 30., zpos));
3116 obCarbonVol->AddNode(obCopperVol, 1, nullptr);
3117 obCopperVol->AddNode(obPolyVol, 1, nullptr);
3118 obPolyVol->AddNode(obWaterVol, 1, nullptr);
3119}
3120
3121void V3Services::obConvWire(TGeoVolume* mother, const TGeoManager* mgr)
3122{
3123 //
3124 // Creates the 1mm wire for Gamma Conversion studies and its supports
3125 // Blueprints (from EDMS) : ALIITSUP0870 (the whole assembly)
3126 // ALIITSUP0869 (the actual wire)
3127 // ALIITSUP0868 (each tension screw)
3128 // ALIITSUP0866 (the support plate)
3129 // ALIITSUP0867 (each wire holder)
3130 //
3131 // Input:
3132 // mother : the volume where to place the current created cylinder
3133 // mgr : the GeoManager (used only to get the proper material)
3134 //
3135 // Output:
3136 //
3137 // Return:
3138 //
3139 // Created: 08 Sep 2022 Mario Sitta
3140 //
3141
3142 // The wire
3143 static const Double_t sOBGWireOverallLen = 1014.0 * sMm;
3144 static const Double_t sOBGWireDout = 1.0 * sMm;
3145
3146 // The wire support
3147 static const Double_t sOBGWireSuppLenTot = 55.0 * sMm;
3148 static const Double_t sOBGWireSuppLenWide = (16.5 + 18.0) * sMm;
3149 static const Double_t sOBGWireSuppLenNarrow = 3.5 * sMm;
3150 static const Double_t sOBGWireSuppWideMin = 15.0 * sMm;
3151 static const Double_t sOBGWireSuppWideMax = 20.0 * sMm;
3152 static const Double_t sOBGWireSuppThick = 1.8 * sMm;
3153 static const Double_t sOBGWireSuppBulgeH = 5.0 * sMm;
3154 static const Double_t sOBGWireSuppBulgeD = 5.9 * sMm;
3155 static const Double_t sOBGWireSuppBulgeYdist = 21.0 * sMm;
3156 static const Double_t sOBGWireSuppHoleYpos = 16.5 * sMm;
3157 static const Double_t sOBGWireSuppCylDmin = 3.1 * sMm;
3158 static const Double_t sOBGWireSuppCylDmax = 6.0 * sMm;
3159
3160 static const Double_t sOBGWireSuppZpos = 487.5 * sMm;
3161 static const Double_t sOBGWireSuppXtrans = 4.8 * sMm;
3162 static const Double_t sOBGWireSuppYtrans = 4.7 * sMm;
3163
3164 // The wire screw
3165 static const Double_t sOBGWireScrewDout = 3.0 * sMm;
3166 static const Double_t sOBGWireScrewLen = 37.0 * sMm;
3167
3168 // Local variables
3169 Double_t xtru[8], ytru[8];
3170 Double_t zlen, radius;
3171 Double_t xpos, ypos, zpos;
3172
3173 // The wire: a Tube
3174 zlen = sOBGWireOverallLen - 2 * sOBGWireScrewLen;
3175 TGeoTube* obWireSh = new TGeoTube(0, sOBGWireDout / 2, zlen / 2);
3176
3177 // The wire support parts:
3178 // - the base: a Xtru
3179 zpos = sOBGWireSuppLenTot - 0.5 * sOBGWireSuppCylDmax - sOBGWireSuppLenNarrow;
3180
3181 xtru[0] = sOBGWireSuppWideMax / 2;
3182 ytru[0] = 0.;
3183 xtru[1] = xtru[0];
3184 ytru[1] = sOBGWireSuppLenWide;
3185 xtru[2] = sOBGWireSuppWideMin / 2;
3186 ytru[2] = zpos;
3187 xtru[3] = xtru[2];
3188 ytru[3] = ytru[2] + sOBGWireSuppLenNarrow;
3189 for (Int_t j = 0; j < 4; j++) {
3190 xtru[4 + j] = -xtru[3 - j];
3191 ytru[4 + j] = ytru[3 - j];
3192 }
3193
3194 TGeoXtru* obWireSuppBase = new TGeoXtru(2);
3195 obWireSuppBase->DefinePolygon(8, xtru, ytru);
3196 obWireSuppBase->DefineSection(0, 0);
3197 obWireSuppBase->DefineSection(1, sOBGWireSuppThick);
3198 obWireSuppBase->SetName("obwiresuppbase");
3199
3200 // - the screw bulge: a Tube
3201 TGeoTube* obWireSuppBulge = new TGeoTube(0, sOBGWireSuppBulgeD / 2, sOBGWireSuppBulgeH / 2);
3202 obWireSuppBulge->SetName("obwiresuppbulge");
3203
3204 ypos = sOBGWireSuppHoleYpos - 0.5 * sOBGWireSuppBulgeYdist;
3205 zpos = sOBGWireSuppThick + obWireSuppBulge->GetDz();
3206 TGeoTranslation* obWireSuppBulgeMat1 = new TGeoTranslation(0, ypos, zpos);
3207 obWireSuppBulgeMat1->SetName("obwiresuppbulgemat1");
3208 obWireSuppBulgeMat1->RegisterYourself();
3209
3210 ypos = sOBGWireSuppHoleYpos + 0.5 * sOBGWireSuppBulgeYdist;
3211 TGeoTranslation* obWireSuppBulgeMat2 = new TGeoTranslation(0, ypos, zpos);
3212 obWireSuppBulgeMat2->SetName("obwiresuppbulgemat2");
3213 obWireSuppBulgeMat2->RegisterYourself();
3214
3215 // - the terminal cylinder: a Tube
3216 TGeoTube* obWireSuppCyl = new TGeoTube(0, sOBGWireSuppCylDmax / 2, xtru[3]);
3217 obWireSuppCyl->SetName("obwiresuppcyl");
3218
3219 ypos = ytru[3];
3220 zpos = obWireSuppCyl->GetRmax();
3221 TGeoCombiTrans* obWireSuppCylMat = new TGeoCombiTrans(0, ypos, zpos, new TGeoRotation("", 90, 90, 0));
3222 obWireSuppCylMat->SetName("obwiresuppcylmat");
3223 obWireSuppCylMat->RegisterYourself();
3224
3225 // - the terminal cylinder hole: a Tube
3226 TGeoTube* obWireSuppCylHol = new TGeoTube(0, sOBGWireSuppCylDmin / 2, 1.05 * xtru[3]);
3227 obWireSuppCylHol->SetName("obwiresuppcylhol");
3228
3229 TGeoCombiTrans* obWireSuppCylHolMat = new TGeoCombiTrans(0, ypos, zpos, new TGeoRotation("", 90, 90, 0));
3230 obWireSuppCylHolMat->SetName("obwiresuppcylholmat");
3231 obWireSuppCylHolMat->RegisterYourself();
3232
3233 // The actual wire support: a CompositeShape
3234 TGeoCompositeShape* obWireSuppSh = new TGeoCompositeShape("obwiresuppbase+obwiresuppbulge:obwiresuppbulgemat1+obwiresuppbulge:obwiresuppbulgemat2+obwiresuppcyl:obwiresuppcylmat-obwiresuppcylhol:obwiresuppcylholmat");
3235
3236 // The wire screw: a Tube
3237 TGeoTube* obWireScrewSh = new TGeoTube(0, sOBGWireScrewDout / 2, sOBGWireScrewLen / 2);
3238
3239 // We have all shapes: now create the real volumes
3240 TGeoMedium* medTungsten = mgr->GetMedium(Form("%s_TUNGSTEN$", GetDetName()));
3241 TGeoMedium* medTitanium = mgr->GetMedium(Form("%s_TITANIUM$", GetDetName()));
3242 TGeoMedium* medBrass = mgr->GetMedium(Form("%s_BRASS$", GetDetName()));
3243
3244 TGeoVolume* obWireVol = new TGeoVolume("OBGammaConvWire", obWireSh, medTungsten);
3245 obWireVol->SetFillColor(kGray);
3246 obWireVol->SetLineColor(kGray);
3247
3248 TGeoVolume* obWireSuppVol = new TGeoVolume("OBGammaConvWireSupport", obWireSuppSh, medTitanium);
3249 obWireSuppVol->SetFillColor(kRed);
3250 obWireSuppVol->SetLineColor(kRed);
3251
3252 TGeoVolume* obWireScrewVol = new TGeoVolume("OBGammaConvWireScrew", obWireScrewSh, medBrass);
3253 obWireScrewVol->SetFillColor(kYellow);
3254 obWireScrewVol->SetLineColor(kYellow);
3255
3256 // To simplify a lot the overall placing we put everything in a Assembly
3257 TGeoVolumeAssembly* obGammaConvWire = new TGeoVolumeAssembly("OBGammaConversionWire");
3258
3259 zpos = sOBGWireSuppZpos;
3260 obGammaConvWire->AddNode(obWireSuppVol, 1, new TGeoCombiTrans(0, 0, zpos, new TGeoRotation("", 90, 90, 90)));
3261 obGammaConvWire->AddNode(obWireSuppVol, 2, new TGeoCombiTrans(0, 0, -zpos, new TGeoRotation("", 90, 90, 90)));
3262
3263 xpos = obWireSuppCyl->GetRmax();
3264 ypos = ytru[3]; // The same as the hole in the support
3265 zpos = 0.5 * sOBGWireOverallLen - obWireScrewSh->GetDz();
3266 obGammaConvWire->AddNode(obWireScrewVol, 1, new TGeoTranslation(xpos, -ypos, zpos));
3267 obGammaConvWire->AddNode(obWireScrewVol, 2, new TGeoTranslation(xpos, -ypos, -zpos));
3268
3269 obGammaConvWire->AddNode(obWireVol, 1, new TGeoTranslation(xpos, -ypos, 0));
3270
3271 // Finally put everything in the mother volume
3272 TGeoVolume* obConeVol = gGeoManager->GetVolume("OBConeSideA");
3273 if (!obConeVol) { // Should never happen, OB cones are created before us
3274 LOG(error) << "OBConeSideA not defined in geometry, using default radius";
3275 radius = 292.5 * sMm;
3276 } else {
3277 radius = (static_cast<TGeoPcon*>(obConeVol->GetShape()))->GetRmax(2);
3278 }
3279
3280 xpos = radius - sOBGWireSuppXtrans;
3281 ypos = sOBGWireSuppLenTot + sOBGWireSuppYtrans;
3282 mother->AddNode(obGammaConvWire, 1, new TGeoCombiTrans(xpos, ypos, 0, new TGeoRotation("", 15, 0, 0)));
3283}
Creates an ALPIDE chip in simulation.
int32_t i
Definition of the GeometryTGeo class.
uint32_t j
Definition RawData.h:0
Definition of the V11Geometry class.
ClassImp(V3Services)
Definition of the V3Services class.
int getNumberOfStaves(int lay) const
static GeometryTGeo * Instance()
void insidePoint(const TGeoPcon *p, Int_t i1, Int_t i2, Int_t i3, Double_t Cthick, TGeoPcon *q, Int_t j1, Bool_t max) const
Double_t cosD(Double_t deg) const
Cosine function.
Definition V11Geometry.h:91
const char * GetDetName() const
Get detector name.
Definition V11Geometry.h:58
Double_t sinD(Double_t deg) const
Definition V11Geometry.h:85
static const Double_t sMm
Convert mm to TGeom's cm.
Double_t yFrom2Points(Double_t x0, Double_t y0, Double_t x1, Double_t y1, Double_t x) const
static const Double_t sCm
Convert cm to TGeom's cm.
This class defines the Geometry for the Services of the ITS Upgrade using TGeo.
Definition V3Services.h:39
~V3Services() override
Default destructor.
void createMBEndWheelsSideC(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
TGeoVolume * createCYSSAssembly(const TGeoManager *mgr=gGeoManager)
TGeoVolume * createIBEndWheelsSideC(const TGeoManager *mgr=gGeoManager)
void createOBConeSideA(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createMBEndWheelsSideA(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createOBCYSSCylinder(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createIBGammaConvWire(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createOBConeSideC(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createOBEndWheelsSideC(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createOBEndWheelsSideA(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
void createAllITSServices(TGeoVolume *motherVolume, const TGeoManager *mgr=gGeoManager)
void createOBGammaConvWire(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
TGeoVolume * createIBEndWheelsSideA(const TGeoManager *mgr=gGeoManager)
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
const GLfloat * m
Definition glcorearb.h:4066
GLuint GLfloat GLfloat GLfloat GLfloat y1
Definition glcorearb.h:5034
GLuint GLfloat GLfloat GLfloat x1
Definition glcorearb.h:5034
GLuint const GLchar * name
Definition glcorearb.h:781
const float3 float float x2
Definition MathUtils.h:42
const float3 float float float float float y3
Definition MathUtils.h:42
const float3 float float float float x3
Definition MathUtils.h:42
const float3 float float float y2
Definition MathUtils.h:42
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"