Project
Loading...
Searching...
No Matches
TRKServices.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
13#include <Framework/Logger.h>
14
15#include <TColor.h>
16#include <TGeoBBox.h>
17#include <TGeoCompositeShape.h>
18#include <TGeoNode.h>
19#include <TGeoTube.h>
20#include <TGeoVolume.h>
21#include <TMath.h>
23#include <TRKBase/Specs.h>
26
27#include <Rtypes.h>
28
29#include <cmath>
30#include <numeric>
31#include <string>
32
33namespace o2
34{
35namespace trk
36{
37
39{
40 int ifield = 2; // ?
41 float fieldm = 10.0; // ?
42
43 // Defines tracking media parameters.
44 float epsil = .1; // Tracking precision,
45 float stemax = -0.01; // Maximum displacement for multiple scat
46 float tmaxfd = -20.; // Maximum angle due to field deflection
47 float deemax = -.3; // Maximum fractional energy loss, DLS
48 float stmin = -.8;
49
51
52 // Ceramic (Aluminium Oxide)
53 float aCer[2] = {26.981538, 15.9994};
54 float zCer[2] = {13., 8.};
55 float wCer[2] = {0.5294, 0.4706}; // Mass %, which makes sense. TODO: check if Mixture needs mass% or comp%
56 float dCer = 3.97;
57
58 // Air
59 float aAir[4] = {12.0107, 14.0067, 15.9994, 39.948};
60 float zAir[4] = {6., 7., 8., 18.};
61 float wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827};
62 float dAir = 1.20479E-3;
63 float dAir1 = 1.20479E-11; // vacuum denisity inside pipe
64
65 // Water
66 float aWater[2] = {1.00794, 15.9994};
67 float zWater[2] = {1., 8.};
68 float wWater[2] = {0.111894, 0.888106};
69 float dWater = 1.0;
70
71 // Fused silica SiO2 https://pdg.lbl.gov/2023/AtomicNuclearProperties/HTML/silicon_dioxide_fused_quartz.html
72 float aSiO2[2] = {28.0855, 15.9990};
73 float zSiO2[2] = {14., 8.};
74 float wSiO2[2] = {0.467, 0.533};
75 float dSiO2 = 2.2;
76
77 // Polyethylene from alice 2 absorber
78 float aPolyethylene[2] = {12.01, 1.};
79 float zPolyethylene[2] = {6., 1.};
80 float wPolyethylene[2] = {.33, .67};
81
82 // Polyurethane [HN-CO-O] from alice 2 mft
83 int nPolyurethane = 4;
84 float aPolyurethane[4] = {1.00794, 14.010, 12.0107, 15.9994};
85 float zPolyurethane[4] = {1.0, 7.0, 6.0, 8.0};
86 float wPolyurethane[4] = {0.017077588, 0.237314387, 0.203327619, 0.542280405};
87 float dPolyurethane = 1.25;
88
89 // Aluminium 5083 - alloy of Mn, Fe, Cu, Mg, Si, Zn, Cr, Ti, Al
90 // Al5083 is considered as material for the iris vacuum vessel
91 // https://www.smithmetal.com/5083.htm
92 float aAl5083[9] = {54.938, 55.845, 63.546, 24.305, 28.086, 65.38, 51.996, 47.867, 26.982};
93 float zAl5083[9] = {25., 26., 29., 12., 14., 30., 24., 22., 13.};
94 // The concentration of certain metals in Al5083 have a range. What will be used for the alloy for the iris vacuum vessel will have to be checked
95 float wAl5083[9] = {0.007, 0.004, 0.001, 0.0445, 0.004, 0.0025, 0.0015, 0.0015, 0.934};
96 float dAl5083 = 2.650;
97
98 // AlBeMet AM162H is a nanocomposite, not an alloy
99 // Considered here as well https://indico.cern.ch/event/1168385/contributions/5355805/attachments/2681743/4652030/Jul%2010%201030-1045%20AM%20(Hawaii)%20M1Or1C-05%20AlBeMet.pdf
100 float aAlBeMet[2] = {26.982, 9.012};
101 float zAlBeMet[2] = {13., 4.};
102 float wAlBeMet[2] = {0.38, 0.62};
103 float dAlBeMet = 2.071;
104
105 matmgr.Mixture("ALICE3_TRKSERVICES", 66, "CERAMIC", aCer, zCer, dCer, 2, wCer); // Ceramic for cold plate
106 matmgr.Mixture("ALICE3_TRKSERVICES", 68, "AIR", aAir, zAir, dAir, 4, wAir); // Air for placeholding cables
107 matmgr.Mixture("ALICE3_TRKSERVICES", 69, "POLYETHYLENE", aPolyethylene, zPolyethylene, .95, 2, wPolyethylene); // Polyethylene for fibers
108 matmgr.Mixture("ALICE3_TRKSERVICES", 70, "POLYURETHANE", aPolyurethane, zPolyurethane, dPolyurethane, nPolyurethane, wPolyurethane); // Polyurethane for cooling pipes
109 matmgr.Mixture("ALICE3_TRKSERVICES", 71, "SILICONDIOXIDE", aSiO2, zSiO2, dSiO2, 2, wSiO2); // Fused silica SiO2
110 matmgr.Mixture("ALICE3_TRKSERVICES", 72, "WATER", aWater, zWater, dWater, 2, wWater); // Water for cooling pipes
111 matmgr.Material("ALICE3_TRKSERVICES", 67, "COPPER", 63.546, 29, 8.96, 1.43, 15.1); // Copper for cables
112 matmgr.Material("ALICE3_TRKSERVICES", 73, "BERYLLIUM", 9.01, 4., 1.848, 35.3, 36.7); // Beryllium - Candidate for IRIS vacuum vessel
113 matmgr.Mixture("ALICE3_TRKSERVICES", 74, "ALUMINIUM5083", aAl5083, zAl5083, dAl5083, 9, wAl5083); // AL5083 - Candidate for IRIS vacuum vessel
114 matmgr.Mixture("ALICE3_TRKSERVICES", 75, "ALUMINIUMBERYLLIUMMETAL", aAlBeMet, zAlBeMet, dAlBeMet, 2, wAlBeMet); // Aluminium-Beryllium metal - Candidate for IRIS vacuum vessel
115 matmgr.Material("ALICE3_TRKSERVICES", 76, "CARBONFIBERM55J6K", 12.0107, 6, 1.92, 22.4, 45.4); // Carbon Fiber M55J
116 matmgr.Mixture("ALICE3_PIPE", 77, "VACUUM", aAir, zAir, dAir1, 4, wAir);
117
118 matmgr.Medium("ALICE3_TRKSERVICES", 1, "CERAMIC", 66, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Ceramic for cold plate
119 matmgr.Medium("ALICE3_TRKSERVICES", 2, "COPPER", 67, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Copper for cables
120 matmgr.Medium("ALICE3_TRKSERVICES", 3, "AIR", 68, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Air for placeholding cables
121 matmgr.Medium("ALICE3_TRKSERVICES", 4, "POLYETHYLENE", 69, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Polyethylene for fibers
122 matmgr.Medium("ALICE3_TRKSERVICES", 5, "POLYURETHANE", 70, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Polyurethane for cooling pipes
123 matmgr.Medium("ALICE3_TRKSERVICES", 6, "SILICONDIOXIDE", 71, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Fused silica SiO2
124 matmgr.Medium("ALICE3_TRKSERVICES", 7, "WATER", 72, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Water for cooling pipes
125 matmgr.Medium("ALICE3_TRKSERVICES", 8, "BERYLLIUM", 73, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Beryllium for IRIS vacuum vessel
126 matmgr.Medium("ALICE3_TRKSERVICES", 9, "ALUMINIUM5083", 74, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Al5083 for IRIS vacuum vessel
127 matmgr.Medium("ALICE3_TRKSERVICES", 10, "ALUMINIUMBERYLLIUMMETAL", 75, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // AlBeMet for IRIS vacuum vessel
128 matmgr.Medium("ALICE3_TRKSERVICES", 11, "CARBONFIBERM55J6K", 76, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Carbon Fiber M55J
129 matmgr.Medium("ALICE3_PIPE", 12, "VACUUM", 77, 0, ifield, fieldm, tmaxfd, stemax, deemax, epsil, stmin); // Vacuum inside the beam pipe
130}
131
132void TRKServices::createServices(TGeoVolume* motherVolume)
133{
134
135 TGeoVolumeAssembly* vol = new TGeoVolumeAssembly(GeometryTGeo::getTRKServiceVolPattern());
136 motherVolume->AddNode(vol, 2, new TGeoTranslation(0, 0., 0));
139 auto& trkPars = TRKBaseParam::Instance();
140 if (trkPars.getLayoutSRV() == kLOISymm) {
141 LOGP(info, "TRK services: LoI version");
145 } else {
146 LOGP(info, "TRK services: Peacock layout");
147 if (trkPars.includeLowServices) {
149 }
153 }
154}
155
157{
158 Double_t pipeRIn = 1.8f;
159 Double_t A3IPLength = 1000.f;
160 Double_t vacuumVesselRIn = 5.6f;
161 Double_t vacuumVesselThickness = 0.08f;
162 Double_t vacuumVesselLength = 76.f;
163
164 // Vacuum for A and C Side
165 Double_t vacuumASideLength = A3IPLength / 2. - vacuumVesselThickness - vacuumVesselLength / 2.;
166 Double_t vacuumCSideLength = A3IPLength / 2. + vacuumVesselLength / 2.;
167
168 // Vacuum tubes
169 TGeoTube* vacuumASide = new TGeoTube("VACUUM_Ash", 0., pipeRIn, vacuumASideLength / 2.);
170 TGeoTube* vacuumCSide = new TGeoTube("VACUUM_Csh", 0., vacuumVesselRIn, vacuumCSideLength / 2.);
171
172 // Vacuum positions
173 TGeoTranslation* posVacuumASide = new TGeoTranslation("VACUUM_ASIDE_POSITION", 0, 0, vacuumVesselLength / 2. + vacuumVesselThickness + vacuumASideLength / 2.);
174 posVacuumASide->RegisterYourself();
175 TGeoTranslation* posVacuumCSide = new TGeoTranslation("VACUUM_CSIDE_POSITION", 0, 0, vacuumVesselLength / 2. - vacuumCSideLength / 2.);
176 posVacuumCSide->RegisterYourself();
177
179 "VACUUM_Ash:VACUUM_ASIDE_POSITION"
180 "+VACUUM_Csh:VACUUM_CSIDE_POSITION";
181}
182
183void TRKServices::excavateFromVacuum(TString shapeToExcavate)
184{
186 mVacuumCompositeFormula += shapeToExcavate;
187}
188
189void TRKServices::registerVacuum(TGeoVolume* motherVolume)
190{
192 const TGeoMedium* kMedVac = matmgr.getTGeoMedium("ALICE3_PIPE_VACUUM");
193
194 TGeoCompositeShape* vacuumComposite = new TGeoCompositeShape("A3IP_VACUUMsh", mVacuumCompositeFormula);
195 TGeoVolume* vacuumVolume = new TGeoVolume("A3IP_VACUUM", vacuumComposite, kMedVac);
196
197 // Add the vacuum to the barrel
198 vacuumVolume->SetLineColor(kAzure + 6);
199 vacuumVolume->SetTransparency(80);
200
201 motherVolume->AddNode(vacuumVolume, 1, new TGeoTranslation(0, 0, 0));
202}
203
204void TRKServices::createOuterDisksServices(TGeoVolume* motherVolume)
205{
206 // This method hardcoes the pink shape for the inner services
208
209 TGeoMedium* medSiO2 = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_SILICONDIOXIDE");
210 TGeoMedium* medPE = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYETHYLENE");
211 TGeoMedium* medCu = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_COPPER");
212 TGeoMedium* medPU = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYURETHANE");
213 TGeoMedium* medH2O = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_WATER");
214
215 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
216 // Create fibers: 2.12mm
217 float siO2FiberThick = 0.5 * 0.212;
218 float peFiberThick = 0.5 * 0.212;
219
220 float rMinInnerServices = 68.5f; // 68.5cm
221 float zLengthInnerServices = 201.f; // 201cm
222 float translation = (int)orientation * (149.f + zLengthInnerServices / 2); // ±149cm
223
224 TGeoTube* outerDisksFiberSIO2 = new TGeoTube("TRK_OUTERDISKS_FIBER_SIO2sh", rMinInnerServices, rMinInnerServices + siO2FiberThick, zLengthInnerServices / 2);
225 TGeoTube* outerDisksFiberPE = new TGeoTube("TRK_OUTERDISKS_FIBER_PEsh", rMinInnerServices + siO2FiberThick, rMinInnerServices + siO2FiberThick + peFiberThick, zLengthInnerServices / 2);
226 rMinInnerServices += siO2FiberThick + peFiberThick;
227 TGeoVolume* outerDisksFiberSIO2Volume = new TGeoVolume("TRK_OUTERDISKS_FIBER_SIO2", outerDisksFiberSIO2, medSiO2);
228 TGeoVolume* outerDisksFiberPEVolume = new TGeoVolume("TRK_OUTERDISKS_FIBER_PE", outerDisksFiberPE, medPE);
229 outerDisksFiberSIO2Volume->SetLineColor(kGray);
230 outerDisksFiberPEVolume->SetLineColor(kGray);
231 auto* combiTrans = new TGeoCombiTrans(0, 0, translation, nullptr);
232 motherVolume->AddNode(outerDisksFiberSIO2Volume, 1, combiTrans);
233 motherVolume->AddNode(outerDisksFiberPEVolume, 1, combiTrans);
234
235 // Create power lines: 11.86mm
236 float cuPowerThick = 0.09 * 1.186;
237 float pePowerThick = 0.91 * 1.186;
238
239 TGeoTube* outerDisksPowerCu = new TGeoTube("TRK_OUTERDISKS_POWER_CUsh", rMinInnerServices, rMinInnerServices + cuPowerThick, zLengthInnerServices / 2);
240 TGeoTube* outerDisksPowerPE = new TGeoTube("TRK_OUTERDISKS_POWER_PEsh", rMinInnerServices + cuPowerThick, rMinInnerServices + cuPowerThick + pePowerThick, zLengthInnerServices / 2);
241 rMinInnerServices += cuPowerThick + pePowerThick;
242 TGeoVolume* outerDisksPowerCuVolume = new TGeoVolume("TRK_OUTERDISKS_POWER_CU", outerDisksPowerCu, medCu);
243 TGeoVolume* outerDisksPowerPEVolume = new TGeoVolume("TRK_OUTERDISKS_POWER_PE", outerDisksPowerPE, medPE);
244 outerDisksPowerCuVolume->SetLineColor(kGray);
245 outerDisksPowerPEVolume->SetLineColor(kGray);
246 motherVolume->AddNode(outerDisksPowerCuVolume, 1, combiTrans);
247 motherVolume->AddNode(outerDisksPowerPEVolume, 1, combiTrans);
248
249 // Create cooling: 6.47mm
250 float puCoolingThick = 0.56 * 0.647;
251 float h2oCoolingThick = 0.44 * 0.647;
252
253 TGeoTube* outerDisksCoolingPU = new TGeoTube("TRK_OUTERDISKS_COOLING_PUsh", rMinInnerServices, rMinInnerServices + puCoolingThick, zLengthInnerServices / 2);
254 TGeoTube* outerDisksCoolingH2O = new TGeoTube("TRK_OUTERDISKS_COOLING_H2Osh", rMinInnerServices + puCoolingThick, rMinInnerServices + puCoolingThick + h2oCoolingThick, zLengthInnerServices / 2);
255 // rMinInnerServices += puCoolingThick + h2oCoolingThick;
256 TGeoVolume* outerDisksCoolingPUVolume = new TGeoVolume("TRK_OUTERDISKS_COOLING_PU", outerDisksCoolingPU, medPU);
257 TGeoVolume* outerDisksCoolingH2OVolume = new TGeoVolume("TRK_OUTERDISKS_COOLING_H2O", outerDisksCoolingH2O, medH2O);
258 outerDisksCoolingPUVolume->SetLineColor(kGray);
259 outerDisksCoolingH2OVolume->SetLineColor(kGray);
260 motherVolume->AddNode(outerDisksCoolingPUVolume, 1, combiTrans);
261 motherVolume->AddNode(outerDisksCoolingH2OVolume, 1, combiTrans);
262 }
263}
264
265void TRKServices::createMiddleServices(TGeoVolume* motherVolume)
266{
267 // This method hardcoes the yellow shape for the middle services
269
270 TGeoMedium* medSiO2 = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_SILICONDIOXIDE");
271 TGeoMedium* medPE = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYETHYLENE");
272 TGeoMedium* medCu = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_COPPER");
273 TGeoMedium* medPU = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYURETHANE");
274 TGeoMedium* medH2O = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_WATER");
275 TGeoMedium* medCFiber = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_CARBONFIBERM55J6K");
276
277 // Create fibers: 3.07mm, 50% SiO2, 50% PE
278 float siO2FiberThick = 0.5 * 0.307;
279 float peFiberThick = 0.5 * 0.307;
280 float puCoolingThick = 0.56 * 0.474;
281 float h2oCoolingThick = 0.44 * 0.474;
282 float cuPowerThick = 0.09 * 1.09;
283 float pePowerThick = 0.91 * 1.09;
284 const float totalThickness = siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick + puCoolingThick + h2oCoolingThick;
285
286 // Carbon Fiber Cylinder support for the middle tracker
287 float rMinMiddleCarbonSupport = 34.8f; // Arbitrary value
288 float rMaxMiddleCarbonSupport = 35.f; // 2 mm of carbon fiber
289 const float zLengthMiddleCarbon = 129.f;
290 TGeoTube* middleBarrelCarbonSupport = new TGeoTube("TRK_MID_CARBONSUPPORTsh", rMinMiddleCarbonSupport, rMaxMiddleCarbonSupport, zLengthMiddleCarbon / 2.);
291 TGeoVolume* middleBarrelCarbonSupportVolume = new TGeoVolume("TRK_MID_CARBONSUPPORT", middleBarrelCarbonSupport, medCFiber);
292 middleBarrelCarbonSupportVolume->SetLineColor(kGray);
293 LOGP(info, "Creating carbon fiber support for Middle Tracker");
294 motherVolume->AddNode(middleBarrelCarbonSupportVolume, 1, nullptr);
295
296 // Get geometry information from TRK which is already present
297 float rMinMiddleServices = 35.f;
298 float rMinMiddleBarrel = rMinMiddleServices;
299 const float zLengthCylinderMiddleServices = 40.5f;
300 const float zLengthMiddleServices = 143.f;
301 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
302 rMinMiddleServices = 35.f;
303 LOGP(info, "Building services for Middle Tracker rminMiddleServices");
304 TGeoTube* middleBarrelFiberSIO2 = new TGeoTube(Form("TRK_MID_FIBER_SIO2sh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleServices, rMinMiddleServices + siO2FiberThick, zLengthCylinderMiddleServices /* + totalThickness*/);
305 rMinMiddleServices += siO2FiberThick;
306 TGeoTube* middleBarrelFiberPE = new TGeoTube(Form("TRK_MID_FIBER_PEsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleServices, rMinMiddleServices + peFiberThick, zLengthCylinderMiddleServices /* + totalThickness*/);
307 rMinMiddleServices += peFiberThick;
308 TGeoVolume* middleBarrelFiberSIO2Volume = new TGeoVolume(Form("TRK_MID_FIBER_SIO2_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelFiberSIO2, medSiO2);
309 TGeoVolume* middleBarrelFiberPEVolume = new TGeoVolume(Form("TRK_MID_FIBER_PE_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelFiberPE, medPE);
310 middleBarrelFiberSIO2Volume->SetLineColor(kGray);
311 middleBarrelFiberPEVolume->SetLineColor(kGray);
312 auto* combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zLengthMiddleServices - zLengthCylinderMiddleServices), nullptr);
313 motherVolume->AddNode(middleBarrelFiberSIO2Volume, 1, combiTrans);
314 motherVolume->AddNode(middleBarrelFiberPEVolume, 1, combiTrans);
315
316 // Create powerlines: 10.9mm, 9% Cu, 91% PE
317 TGeoTube* middleBarrelPowerCu = new TGeoTube(Form("TRK_MID_POWER_CUsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleServices, rMinMiddleServices + cuPowerThick, zLengthCylinderMiddleServices /* + totalThickness*/);
318 rMinMiddleServices += cuPowerThick;
319 TGeoTube* middleBarrelPowerPE = new TGeoTube(Form("TRK_MID_POWER_PEsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleServices, rMinMiddleServices + pePowerThick, zLengthCylinderMiddleServices /* + totalThickness*/);
320 rMinMiddleServices += pePowerThick;
321 TGeoVolume* middleBarrelPowerCuVolume = new TGeoVolume(Form("TRK_MID_POWER_CU_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelPowerCu, medCu);
322 TGeoVolume* middleBarrelPowerPEVolume = new TGeoVolume(Form("TRK_MID_POWER_PE_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelPowerPE, medPE);
323 middleBarrelPowerCuVolume->SetLineColor(kGray);
324 middleBarrelPowerPEVolume->SetLineColor(kGray);
325 motherVolume->AddNode(middleBarrelPowerCuVolume, 1, combiTrans);
326 motherVolume->AddNode(middleBarrelPowerPEVolume, 1, combiTrans);
327
328 // Create cooling pipes: 4.74mm, 56% PU, 44% H2O
329 TGeoTube* middleBarrelCoolingPU = new TGeoTube(Form("TRK_MID_COOLING_PUsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleServices, rMinMiddleServices + puCoolingThick, zLengthCylinderMiddleServices /* + totalThickness*/);
330 rMinMiddleServices += puCoolingThick;
331 TGeoTube* middleBarrelCoolingH2O = new TGeoTube(Form("TRK_MID_COOLING_H2Osh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleServices, rMinMiddleServices + h2oCoolingThick, zLengthCylinderMiddleServices /* + totalThickness*/);
332 rMinMiddleServices = rMinMiddleServices += h2oCoolingThick;
333 TGeoVolume* middleBarrelCoolingPUVolume = new TGeoVolume(Form("TRK_MID_COOLING_PU_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelCoolingPU, medPU);
334 TGeoVolume* middleBarrelCoolingH2OVolume = new TGeoVolume(Form("TRK_MID_COOLING_H2O_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelCoolingH2O, medH2O);
335 middleBarrelCoolingPUVolume->SetLineColor(kGray);
336 middleBarrelCoolingH2OVolume->SetLineColor(kGray);
337 motherVolume->AddNode(middleBarrelCoolingPUVolume, 1, combiTrans);
338 motherVolume->AddNode(middleBarrelCoolingH2OVolume, 1, combiTrans);
339 }
340 // Middle barrel connection disks
341 const float rMinMiddleBarrelDisk = 5.68f;
342 const float rMaxMiddleBarrelDisk = 35.f;
343 const float zLengthMiddleBarrel = 64.5f;
344 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
345 TGeoTube* middleBarrelConnDiskSIO2 = new TGeoTube(Form("TRK_MIDBARCONN_DISK_FIBER_SIO2sh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, siO2FiberThick / 2.);
346 TGeoTube* middleBarrelConnDiskPE = new TGeoTube(Form("TRK_MIDBARCONN_DISK_FIBER_PEsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, peFiberThick / 2.);
347 TGeoVolume* middleBarrelConnDiskSIO2Volume = new TGeoVolume(Form("TRK_MIDBARCONN_DISK_FIBER_SIO2_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelConnDiskSIO2, medSiO2);
348 TGeoVolume* middleBarrelConnDiskPEVolume = new TGeoVolume(Form("TRK_MIDBARCONN_DISK_FIBER_PE_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelConnDiskPE, medPE);
349 middleBarrelConnDiskSIO2Volume->SetLineColor(kGray);
350 middleBarrelConnDiskPEVolume->SetLineColor(kGray);
351 auto* rot = new TGeoRotation("", 0, 0, 180);
352 auto* combiTransSIO2 = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick / 2. + zLengthMiddleBarrel), rot);
353 auto* combiTransPE = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick / 2. + zLengthMiddleBarrel), rot);
354 motherVolume->AddNode(middleBarrelConnDiskSIO2Volume, 1, combiTransSIO2);
355 motherVolume->AddNode(middleBarrelConnDiskPEVolume, 1, combiTransPE);
356
357 TGeoTube* middleBarrelConnDiskCu = new TGeoTube(Form("TRK_MIDBARCONN_DISK_POWER_CUsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, cuPowerThick / 2.);
358 TGeoTube* middleBarrelConnDiskPEPower = new TGeoTube(Form("TRK_MIDBARCONN_DISK_POWER_PEsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, pePowerThick / 2.);
359 TGeoVolume* middleBarrelConnDiskCuVolume = new TGeoVolume(Form("TRK_MIDBARCONN_DISK_POWER_CU_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelConnDiskCu, medCu);
360 TGeoVolume* middleBarrelConnDiskPEPowerVolume = new TGeoVolume(Form("TRK_MIDBARCONN_DISK_POWER_PE_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelConnDiskPEPower, medPE);
361 middleBarrelConnDiskCuVolume->SetLineColor(kGray);
362 middleBarrelConnDiskPEPowerVolume->SetLineColor(kGray);
363 auto* combiTransCu = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick / 2. + zLengthMiddleBarrel), rot);
364 auto* combiTransPEPower = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick / 2. + zLengthMiddleBarrel), rot);
365 motherVolume->AddNode(middleBarrelConnDiskCuVolume, 1, combiTransCu);
366 motherVolume->AddNode(middleBarrelConnDiskPEPowerVolume, 1, combiTransPEPower);
367
368 TGeoTube* middleBarrelConnDiskPU = new TGeoTube(Form("TRK_MIDBARCONN_DISK_PUsh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, puCoolingThick / 2.);
369 TGeoTube* middleBarrelConnDiskH2O = new TGeoTube(Form("TRK_MIDBARCONN_DISK_H2Osh_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, h2oCoolingThick / 2.);
370 TGeoVolume* middleBarrelConnDiskPUVolume = new TGeoVolume(Form("TRK_MIDBARCONN_DISK_PU_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelConnDiskPU, medPU);
371 TGeoVolume* middleBarrelConnDiskH2OVolume = new TGeoVolume(Form("TRK_MIDBARCONN_DISK_H2O_%s", orientation == Orientation::kASide ? "bwd" : "fwd"), middleBarrelConnDiskH2O, medH2O);
372 middleBarrelConnDiskPUVolume->SetLineColor(kGray);
373 middleBarrelConnDiskH2OVolume->SetLineColor(kGray);
374 auto* combiTransPU = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick + puCoolingThick / 2. + zLengthMiddleBarrel), rot);
375 auto* combiTransH2O = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick + puCoolingThick + h2oCoolingThick / 2. + zLengthMiddleBarrel), rot);
376 motherVolume->AddNode(middleBarrelConnDiskPUVolume, 1, combiTransPU);
377 motherVolume->AddNode(middleBarrelConnDiskH2OVolume, 1, combiTransH2O);
378 }
379
380 // Barrel to forward connection disks
381 float rMaxMiddleServicesBarFwd = 74.5f + siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick + puCoolingThick + h2oCoolingThick;
382 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
383 // Create fibers: 3.07mm, 50% SiO2, 50% PE
384 TGeoTube* middleBarFwdFiberSIO2 = new TGeoTube("TRK_MIDBARFWD_FIBER_SIO2sh", rMinMiddleBarrel, rMaxMiddleServicesBarFwd, siO2FiberThick / 2.);
385 TGeoTube* middleBarFwdFiberPE = new TGeoTube("TRK_MIDBARFWD_FIBER_PEsh", rMinMiddleBarrel, rMaxMiddleServicesBarFwd, peFiberThick / 2.);
386 TGeoVolume* middleBarFwdFiberSIO2Volume = new TGeoVolume("TRK_MIDBARFWD_FIBER_SIO2", middleBarFwdFiberSIO2, medSiO2);
387 TGeoVolume* middleBarFwdFiberPEVolume = new TGeoVolume("TRK_MIDBARFWD_FIBER_PE", middleBarFwdFiberPE, medPE);
388 middleBarFwdFiberSIO2Volume->SetLineColor(kGray);
389 middleBarFwdFiberPEVolume->SetLineColor(kGray);
390 auto* rot = new TGeoRotation("", 0, 0, 180);
391 auto* combiTransSIO2 = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick / 2. + zLengthMiddleServices), rot);
392 auto* combiTransPE = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick / 2. + zLengthMiddleServices), rot);
393 motherVolume->AddNode(middleBarFwdFiberSIO2Volume, 1, combiTransSIO2);
394 motherVolume->AddNode(middleBarFwdFiberPEVolume, 1, combiTransPE);
395
396 // Create powerlines: 10.9mm, 9% Cu, 91% PE
397 TGeoTube* middleBarFwdPowerCu = new TGeoTube("TRK_MIDBARFWD_POWER_CUsh", rMinMiddleBarrel, rMaxMiddleServicesBarFwd, cuPowerThick / 2.);
398 TGeoTube* middleBarFwdPowerPE = new TGeoTube("TRK_MIDBARFWD_POWER_PEsh", rMinMiddleBarrel, rMaxMiddleServicesBarFwd, pePowerThick / 2.);
399 TGeoVolume* middleBarFwdPowerCuVolume = new TGeoVolume("TRK_MIDBARFWD_POWER_CU", middleBarFwdPowerCu, medCu);
400 TGeoVolume* middleBarFwdPowerPEVolume = new TGeoVolume("TRK_MIDBARFWD_POWER_PE", middleBarFwdPowerPE, medPE);
401 middleBarFwdPowerCuVolume->SetLineColor(kGray);
402 middleBarFwdPowerPEVolume->SetLineColor(kGray);
403 auto* combiTransCu = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick / 2. + zLengthMiddleServices), rot);
404 auto* combiTransPEPower = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick / 2. + zLengthMiddleServices), rot);
405 motherVolume->AddNode(middleBarFwdPowerCuVolume, 1, combiTransCu);
406 motherVolume->AddNode(middleBarFwdPowerPEVolume, 1, combiTransPEPower);
407
408 // Create cooling pipes: 4.74mm, 56% PU, 44% H2O
409 TGeoTube* middleBarFwdCoolingPU = new TGeoTube("TRK_MIDBARFWD_COOLING_PUsh", rMinMiddleBarrel, rMaxMiddleServicesBarFwd, puCoolingThick / 2.);
410 TGeoTube* middleBarFwdCoolingH2O = new TGeoTube("TRK_MIDBARFWD_COOLING_H2Osh", rMinMiddleBarrel, rMaxMiddleServicesBarFwd, h2oCoolingThick / 2.);
411 TGeoVolume* middleBarFwdCoolingPUVolume = new TGeoVolume("TRK_MIDBARFWD_COOLING_PU", middleBarFwdCoolingPU, medPU);
412 TGeoVolume* middleBarFwdCoolingH2OVolume = new TGeoVolume("TRK_MIDBARFWD_COOLING_H2O", middleBarFwdCoolingH2O, medH2O);
413 middleBarFwdCoolingPUVolume->SetLineColor(kGray);
414 middleBarFwdCoolingH2OVolume->SetLineColor(kGray);
415 auto* combiTransCoolingPU = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick + puCoolingThick / 2. + zLengthMiddleServices), rot);
416 auto* combiTransCoolingH2O = new TGeoCombiTrans(0, 0, (int)orientation * (siO2FiberThick + peFiberThick + cuPowerThick + pePowerThick + puCoolingThick + h2oCoolingThick / 2. + zLengthMiddleServices), rot);
417 motherVolume->AddNode(middleBarFwdCoolingPUVolume, 1, combiTransCoolingPU);
418 motherVolume->AddNode(middleBarFwdCoolingH2OVolume, 1, combiTransCoolingH2O);
419 }
420
421 // Forward part
422 const float zLengthMiddleServicesFwd = 350.f - (143.f + totalThickness);
423
424 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
425 // Create fibers: 3.07mm, 50% SiO2, 50% PE
426 float siO2FiberThick = 0.5 * 0.307;
427 float peFiberThick = 0.5 * 0.307;
428 float rMinMiddleServicesFwd = 74.5f; // 74.5cm
429
430 float translation = (int)orientation * (143.f + totalThickness + zLengthMiddleServicesFwd / 2);
431
432 TGeoTube* middleFwdFiberSIO2 = new TGeoTube("TRK_MIDFWD_FIBER_SIO2sh", rMinMiddleServicesFwd, rMinMiddleServicesFwd + siO2FiberThick, zLengthMiddleServicesFwd / 2);
433 TGeoTube* middleFwdFiberPE = new TGeoTube("TRK_MIDFWD_FIBER_PEsh", rMinMiddleServicesFwd + siO2FiberThick, rMinMiddleServicesFwd + siO2FiberThick + peFiberThick, zLengthMiddleServicesFwd / 2);
434 rMinMiddleServicesFwd += siO2FiberThick + peFiberThick;
435 TGeoVolume* middleFwdFiberSIO2Volume = new TGeoVolume("TRK_MIDFWD_FIBER_SIO2", middleFwdFiberSIO2, medSiO2);
436 TGeoVolume* middleFwdFiberPEVolume = new TGeoVolume("TRK_MIDFWD_FIBER_PE", middleFwdFiberPE, medPE);
437 middleFwdFiberSIO2Volume->SetLineColor(kGray);
438 middleFwdFiberPEVolume->SetLineColor(kGray);
439 auto* combiTrans = new TGeoCombiTrans(0, 0, translation, nullptr);
440 motherVolume->AddNode(middleFwdFiberSIO2Volume, 1, combiTrans);
441 motherVolume->AddNode(middleFwdFiberPEVolume, 1, combiTrans);
442
443 // Create powerlines: 10.9mm, 9% Cu, 91% PE
444 float cuPowerThick = 0.09 * 1.09;
445 float pePowerThick = 0.91 * 1.09;
446
447 TGeoTube* middleFwdPowerCu = new TGeoTube("TRK_MIDFWD_POWER_CUsh", rMinMiddleServicesFwd, rMinMiddleServicesFwd + cuPowerThick, zLengthMiddleServicesFwd / 2);
448 TGeoTube* middleFwdPowerPE = new TGeoTube("TRK_MIDFWD_POWER_PEsh", rMinMiddleServicesFwd + cuPowerThick, rMinMiddleServicesFwd + cuPowerThick + pePowerThick, zLengthMiddleServicesFwd / 2);
449 rMinMiddleServicesFwd += cuPowerThick + pePowerThick;
450 TGeoVolume* middleFwdPowerCuVolume = new TGeoVolume("TRK_MIDFWD_POWER_CU", middleFwdPowerCu, medCu);
451 TGeoVolume* middleFwdPowerPEVolume = new TGeoVolume("TRK_MIDFWD_POWER_PE", middleFwdPowerPE, medPE);
452 middleFwdPowerCuVolume->SetLineColor(kGray);
453 middleFwdPowerPEVolume->SetLineColor(kGray);
454 motherVolume->AddNode(middleFwdPowerCuVolume, 1, combiTrans);
455 motherVolume->AddNode(middleFwdPowerPEVolume, 1, combiTrans);
456
457 // Create cooling pipes: 4.74mm, 56% PU, 44% H2O
458 float puCoolingThick = 0.56 * 0.474;
459 float h2oCoolingThick = 0.44 * 0.474;
460
461 TGeoTube* middleFwdCoolingPU = new TGeoTube("TRK_MIDFWD_COOLING_PUsh", rMinMiddleServicesFwd, rMinMiddleServicesFwd + puCoolingThick, zLengthMiddleServicesFwd / 2);
462 TGeoTube* middleFwdCoolingH2O = new TGeoTube("TRK_MIDFWD_COOLING_H2Osh", rMinMiddleServicesFwd + puCoolingThick, rMinMiddleServicesFwd + puCoolingThick + h2oCoolingThick, zLengthMiddleServicesFwd / 2);
463 // rMinMiddleServicesFwd += puCoolingThick + h2oCoolingThick;
464 TGeoVolume* middleFwdCoolingPUVolume = new TGeoVolume("TRK_MIDFWD_COOLING_PU", middleFwdCoolingPU, medPU);
465 TGeoVolume* middleFwdCoolingH2OVolume = new TGeoVolume("TRK_MIDFWD_COOLING_H2O", middleFwdCoolingH2O, medH2O);
466 middleFwdCoolingPUVolume->SetLineColor(kGray);
467 middleFwdCoolingH2OVolume->SetLineColor(kGray);
468 motherVolume->AddNode(middleFwdCoolingPUVolume, 1, combiTrans);
469 motherVolume->AddNode(middleFwdCoolingH2OVolume, 1, combiTrans);
470 }
471}
472
473void TRKServices::createOuterBarrelServices(TGeoVolume* motherVolume)
474{
475 // This implements a service barrel around the full outer tracker which is probably not needed:
476 // power, data and cooling should be implemented on the staves
477 // Used only for 'LOI' geometry
478
480
481 TGeoMedium* medSiO2 = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_SILICONDIOXIDE");
482 TGeoMedium* medPE = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYETHYLENE");
483 TGeoMedium* medCu = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_COPPER");
484 TGeoMedium* medPU = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYURETHANE");
485 TGeoMedium* medH2O = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_WATER");
486
487 // Fiber 0.269 cm
488 const float siO2FiberThick = 0.5 * 0.269;
489 const float peFiberThick = 0.5 * 0.269;
490 float rMinOuterBarrelServices = ((TGeoTube*)motherVolume->GetNode(Form("%s7_1", GeometryTGeo::getTRKLayerPattern()))->GetVolume()->GetShape())->GetRmax();
491 const float zLengthOuterBarrelServices = 350.f; // 175cm
492
493 TGeoTube* outerBarrelFiberSIO2 = new TGeoTube("TRK_OUTERBARREL_FIBER_SIO2sh", rMinOuterBarrelServices, rMinOuterBarrelServices + siO2FiberThick, zLengthOuterBarrelServices);
494 TGeoTube* outerBarrelFiberPE = new TGeoTube("TRK_OUTERBARREL_FIBER_PEsh", rMinOuterBarrelServices + siO2FiberThick, rMinOuterBarrelServices + siO2FiberThick + peFiberThick, zLengthOuterBarrelServices);
495 rMinOuterBarrelServices += siO2FiberThick + peFiberThick;
496 TGeoVolume* outerBarrelFiberSIO2Volume = new TGeoVolume("TRK_OUTERBARREL_FIBER_SIO2", outerBarrelFiberSIO2, medSiO2);
497 TGeoVolume* outerBarrelFiberPEVolume = new TGeoVolume("TRK_OUTERBARREL_FIBER_PE", outerBarrelFiberPE, medPE);
498 outerBarrelFiberSIO2Volume->SetLineColor(kGray);
499 outerBarrelFiberPEVolume->SetLineColor(kGray);
500 motherVolume->AddNode(outerBarrelFiberSIO2Volume, 1, nullptr);
501 motherVolume->AddNode(outerBarrelFiberPEVolume, 1, nullptr);
502
503 // Power 0.430 cm
504 const float cuPowerThick = 0.09 * 0.430;
505 const float pePowerThick = 0.91 * 0.430;
506
507 TGeoTube* outerBarrelPowerCu = new TGeoTube("TRK_OUTERBARREL_POWER_CUsh", rMinOuterBarrelServices, rMinOuterBarrelServices + cuPowerThick, zLengthOuterBarrelServices);
508 TGeoTube* outerBarrelPowerPE = new TGeoTube("TRK_OUTERBARREL_POWER_PEsh", rMinOuterBarrelServices + cuPowerThick, rMinOuterBarrelServices + cuPowerThick + pePowerThick, zLengthOuterBarrelServices);
509 rMinOuterBarrelServices += cuPowerThick + pePowerThick;
510 TGeoVolume* outerBarrelPowerCuVolume = new TGeoVolume("TRK_OUTERBARREL_POWER_CU", outerBarrelPowerCu, medCu);
511 TGeoVolume* outerBarrelPowerPEVolume = new TGeoVolume("TRK_OUTERBARREL_POWER_PE", outerBarrelPowerPE, medPE);
512 outerBarrelPowerCuVolume->SetLineColor(kGray);
513 outerBarrelPowerPEVolume->SetLineColor(kGray);
514 motherVolume->AddNode(outerBarrelPowerCuVolume, 1, nullptr);
515 motherVolume->AddNode(outerBarrelPowerPEVolume, 1, nullptr);
516
517 // Cooling 1.432 cm
518 const float puCoolingThick = 0.56 * 1.432;
519 const float h2oCoolingThick = 0.44 * 1.432;
520
521 TGeoTube* outerBarrelCoolingPU = new TGeoTube("TRK_OUTERBARREL_COOLING_PUsh", rMinOuterBarrelServices, rMinOuterBarrelServices + puCoolingThick, zLengthOuterBarrelServices);
522 TGeoTube* outerBarrelCoolingH2O = new TGeoTube("TRK_OUTERBARREL_COOLING_H2Osh", rMinOuterBarrelServices + puCoolingThick, rMinOuterBarrelServices + puCoolingThick + h2oCoolingThick, zLengthOuterBarrelServices);
523 // rMinOuterBarrelServices += puCoolingThick + h2oCoolingThick;
524 TGeoVolume* outerBarrelCoolingPUVolume = new TGeoVolume("TRK_OUTERBARREL_COOLING_PU", outerBarrelCoolingPU, medPU);
525 TGeoVolume* outerBarrelCoolingH2OVolume = new TGeoVolume("TRK_OUTERBARREL_COOLING_H2O", outerBarrelCoolingH2O, medH2O);
526 outerBarrelCoolingPUVolume->SetLineColor(kGray);
527 outerBarrelCoolingH2OVolume->SetLineColor(kGray);
528 motherVolume->AddNode(outerBarrelCoolingPUVolume, 1, nullptr);
529 motherVolume->AddNode(outerBarrelCoolingH2OVolume, 1, nullptr);
530}
531
532void TRKServices::createServicesAroundBeamPipe(TGeoVolume* motherVolume)
533{
534 // This method hardcodes the shape for the low services around the beam pipe
536
537 TGeoMedium* medCu = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_COPPER");
538
539 const float tolleranceLowServices = 0.3f;
540
541 // Low services start longitudinally from middle barrel on the C side, while from the middle barrel connection disks on the A side
542 const float zStartASideFirstBlock = 65.265f + tolleranceLowServices;
543 const float zStartCSideFirstBlock = 64.5f + tolleranceLowServices;
544 const float zStartSecondBlock = 150.f;
545 const float zStartThirdBlock = 365.f;
546 const float zEndThirdBlock = 400.f;
547
548 // Low services start radially from IRIS out-vacuum services on the A side, while from beam pipe on the C side
549 const float rInASide = 3.333f + tolleranceLowServices;
550 const float rInCSide = 5.6f + tolleranceLowServices;
551
552 // Low services end radially at the disks inners radius
553 const float rOutFirstBlock = 10.f - tolleranceLowServices;
554 const float rOutSecondBlock = 20.f - tolleranceLowServices;
555 const float rOutThirdBlock = 15.f - tolleranceLowServices;
556
557 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
558 std::string orLabel = orientation == Orientation::kASide ? "A" : "C";
559
560 float zStartLowServices = orientation == Orientation::kASide ? zStartASideFirstBlock : zStartCSideFirstBlock;
561 float rInLowServices = orientation == Orientation::kASide ? rInASide : rInCSide;
562
563 TGeoTube* lowServicesFirstBlock = new TGeoTube(Form("TRK_LOWSERVICES_FIRSTBLOCKsh_%s", orLabel.c_str()), rInLowServices, rOutFirstBlock, (zStartSecondBlock - zStartLowServices) / 2.);
564 TGeoVolume* lowServicesFirstBlockVolume = new TGeoVolume(Form("TRK_LOWSERVICES_FIRSTBLOCK_%s", orLabel.c_str()), lowServicesFirstBlock, medCu);
565 lowServicesFirstBlockVolume->SetLineColor(kGray);
566
567 TGeoTube* lowServicesSecondBlock = new TGeoTube(Form("TRK_LOWSERVICES_SECONDBLOCKsh_%s", orLabel.c_str()), rInLowServices, rOutSecondBlock, (zStartThirdBlock - zStartSecondBlock) / 2.);
568 TGeoVolume* lowServicesSecondBlockVolume = new TGeoVolume(Form("TRK_LOWSERVICES_SECONDBLOCK_%s", orLabel.c_str()), lowServicesSecondBlock, medCu);
569 lowServicesSecondBlockVolume->SetLineColor(kGray);
570
571 TGeoTube* lowServicesThirdBlock = new TGeoTube(Form("TRK_LOWSERVICES_THIRDBLOCKsh_%s", orLabel.c_str()), rInLowServices, rOutThirdBlock, (zEndThirdBlock - zStartThirdBlock) / 2.);
572 TGeoVolume* lowServicesThirdBlockVolume = new TGeoVolume(Form("TRK_LOWSERVICES_THIRDBLOCK_%s", orLabel.c_str()), lowServicesThirdBlock, medCu);
573 lowServicesThirdBlockVolume->SetLineColor(kGray);
574
575 auto* rot = new TGeoRotation("", 0, 0, 180);
576 auto* combiTransFirstBlock = new TGeoCombiTrans(0, 0, (int)orientation * (zStartLowServices + (zStartSecondBlock - zStartLowServices) / 2.), rot);
577 auto* combiTransSecondBlock = new TGeoCombiTrans(0, 0, (int)orientation * (zStartSecondBlock + (zStartThirdBlock - zStartSecondBlock) / 2.), rot);
578 auto* combiTransThirdBlock = new TGeoCombiTrans(0, 0, (int)orientation * (zStartThirdBlock + (zEndThirdBlock - zStartThirdBlock) / 2.), rot);
579
580 motherVolume->AddNode(lowServicesFirstBlockVolume, 1, combiTransFirstBlock);
581 motherVolume->AddNode(lowServicesSecondBlockVolume, 1, combiTransSecondBlock);
582 motherVolume->AddNode(lowServicesThirdBlockVolume, 1, combiTransThirdBlock);
583 }
584}
585
586void TRKServices::createMLServicesPeacock(TGeoVolume* motherVolume)
587{
588 // This method hardcodes the yellow shape for the middle services
590
591 TGeoMedium* medSiO2 = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_SILICONDIOXIDE");
592 TGeoMedium* medPE = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYETHYLENE");
593 TGeoMedium* medCu = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_COPPER");
594 TGeoMedium* medPU = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYURETHANE");
595 TGeoMedium* medH2O = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_WATER");
596 TGeoMedium* medCFiber = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_CARBONFIBERM55J6K");
597
598 // Barrel service constants
599 const int ITBarrelnFiber = 70;
600 const int ITBarrelnPower = 70;
601 float siO2FiberAreaB = ITBarrelnFiber * mFiberArea * mFiberComposition[0];
602 float peFiberAreaB = ITBarrelnFiber * mFiberArea * mFiberComposition[1];
603
604 float puCoolingAreaB = 0;
605 float h2oCoolingAreaB = 0;
606 float cuPowerAreaB = ITBarrelnPower * mPowerBundleArea * mPowerBundleComposition[0];
607 float pePowerAreaB = ITBarrelnPower * mPowerBundleArea * mPowerBundleComposition[1];
608
609 // Disk service constants
610 const int ITDisknFiber = 3 * 24;
611 const int ITDisknPower = 3 * 16;
612 float siO2FiberAreaD = ITDisknFiber * mFiberArea * mFiberComposition[0];
613 float peFiberAreaD = ITDisknFiber * mFiberArea * mFiberComposition[1];
614
615 float puCoolingAreaD = 0;
616 float h2oCoolingAreaD = 0;
617 float cuPowerAreaD = ITDisknPower * mPowerBundleArea * mPowerBundleComposition[0];
618 float pePowerAreaD = ITDisknPower * mPowerBundleArea * mPowerBundleComposition[1];
619
620 // Carbon Fiber Cylinder support for the middle tracker
621 // (from ICD_ALICE3_V3.b.3 drawing: 38.5 cm are allocated for staves and services, + 1 cm for the support; we assume less for the support - to be reconsidered if necessary)
622 float rMaxMiddleCarbonSupport = sMLOTShellRMax; // cm
623 float rMinMiddleCarbonSupport = sMLOTShellRMax - sMLOTShellThickness; // cm, 2 mm of carbon fiber, ~0.88% X/X0
624 const float zLengthMiddleCarbon = 282.f; // cm, to cover the full length of ML barrel and disks, from Corrado's drawing
625 TGeoTube* middleBarrelCarbonSupport = new TGeoTube("TRK_MID_CARBONSUPPORTsh", rMinMiddleCarbonSupport, rMaxMiddleCarbonSupport, zLengthMiddleCarbon / 2.);
626 TGeoVolume* middleBarrelCarbonSupportVolume = new TGeoVolume("TRK_MID_CARBONSUPPORT", middleBarrelCarbonSupport, medCFiber);
627 middleBarrelCarbonSupportVolume->SetLineColor(kGray);
628 LOGP(info, "Creating carbon fiber support for Middle Tracker");
629 motherVolume->AddNode(middleBarrelCarbonSupportVolume, 1, nullptr);
630
631 // Get geometry information from TRK which is already present
632 float rMinMiddleServices = 38.5f; // cm, start radius of the ML services = maximum radius allowed for sensors (35 cm), plus some margin for disk paving with modules
633 const float zMiddleServicesBarrel = 64.5f; // cm, z position of the first barrel ML service disk
634 const float zMiddleServicesBarrelFwdConnection = 143.f; // cm, z position of barrel to forward connection services
635 const float zLengthCylinderMiddleServicesBarrel = zMiddleServicesBarrelFwdConnection - zMiddleServicesBarrel;
636
637 const float zStartServicesForMiddleDisks = 77.0f; // cm, starting z position of ML disk services, assumed to be the same as of the first ML disk
638 const float zLengthCylinderMiddleServicesDisk = zMiddleServicesBarrelFwdConnection - zStartServicesForMiddleDisks;
639
640 // Middle layer barrel services are only on A side
641 LOGP(info, "Building services for barrel Middle Layers");
642
643 // Middle barrel connection disks
644 const float rMinMiddleBarrelDisk = 5.68f;
645 const float rMaxMiddleBarrelDisk = rMinMiddleServices;
646 auto orientation = Orientation::kASide;
647 float diskCircumference = rMaxMiddleBarrelDisk * 3.14; // Use only half circumference
648
649 double zCur = zMiddleServicesBarrel;
650 double dZ = siO2FiberAreaB / diskCircumference / 2.;
651 TGeoTube* middleBarrelConnDiskSIO2 = new TGeoTube("TRK_MIDBARCONN_DISK_FIBER_SIO2sh", rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, dZ);
652 TGeoVolume* middleBarrelConnDiskSIO2Volume = new TGeoVolume("TRK_MIDBARCONN_DISK_FIBER_SIO2", middleBarrelConnDiskSIO2, medSiO2);
653 middleBarrelConnDiskSIO2Volume->SetLineColor(kOrange - 9);
654 auto* rot = new TGeoRotation("", 0, 0, 180); // Why this?
655 auto* combiTransSIO2 = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
656
657 zCur += 2. * dZ;
658 dZ = peFiberAreaB / diskCircumference / 2.;
659 TGeoTube* middleBarrelConnDiskPE = new TGeoTube("TRK_MIDBARCONN_DISK_FIBER_PEsh", rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, dZ);
660 TGeoVolume* middleBarrelConnDiskPEVolume = new TGeoVolume("TRK_MIDBARCONN_DISK_FIBER_PE", middleBarrelConnDiskPE, medPE);
661 middleBarrelConnDiskPEVolume->SetLineColor(kOrange - 9);
662 auto* combiTransPE = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
663
664 motherVolume->AddNode(middleBarrelConnDiskSIO2Volume, 1, combiTransSIO2);
665 motherVolume->AddNode(middleBarrelConnDiskPEVolume, 1, combiTransPE);
666
667 zCur += 2. * dZ;
668 dZ = cuPowerAreaB / diskCircumference / 2.;
669 TGeoTube* middleBarrelConnDiskCu = new TGeoTube("TRK_MIDBARCONN_DISK_POWER_CUsh", rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, dZ);
670 TGeoVolume* middleBarrelConnDiskCuVolume = new TGeoVolume("TRK_MIDBARCONN_DISK_POWER_CU", middleBarrelConnDiskCu, medCu);
671 middleBarrelConnDiskCuVolume->SetLineColor(kOrange - 9);
672 auto* combiTransCu = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
673
674 zCur += 2. * dZ;
675 dZ = pePowerAreaB / diskCircumference / 2.;
676 TGeoTube* middleBarrelConnDiskPEPower = new TGeoTube("TRK_MIDBARCONN_DISK_POWER_PEsh", rMinMiddleBarrelDisk, rMaxMiddleBarrelDisk, dZ);
677 TGeoVolume* middleBarrelConnDiskPEPowerVolume = new TGeoVolume("TRK_MIDBARCONN_DISK_POWER_PE", middleBarrelConnDiskPEPower, medPE);
678 middleBarrelConnDiskPEPowerVolume->SetLineColor(kOrange - 9);
679 auto* combiTransPEPower = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
680 motherVolume->AddNode(middleBarrelConnDiskCuVolume, 1, combiTransCu);
681 motherVolume->AddNode(middleBarrelConnDiskPEPowerVolume, 1, combiTransPEPower);
682
683 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
684 for (int iSide = 0; iSide < 2; iSide++) { // left/right or top/bottom
685 float refAngle = 0;
686 std::string orLabel("A");
687 if (orientation == Orientation::kCSide) {
688 orLabel = "C";
689 refAngle = 90;
690 }
691 // Add ML Disk services
692 // create data fiber volumes
693 double rCur = rMinMiddleServices;
694 double dR = siO2FiberAreaD / (3.14 * rCur);
695 TGeoTubeSeg* middleDiskFiberSIO2 = new TGeoTubeSeg(Form("TRK_MLD_FIBER_SIO2sh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesDisk / 2, -45, 45);
696 TGeoVolume* middleDiskFiberSIO2Volume = new TGeoVolume(Form("TRK_MLD_FIBER_SIO2_%s%d", orLabel.c_str(), iSide), middleDiskFiberSIO2, medSiO2);
697 middleDiskFiberSIO2Volume->SetLineColor(kOrange + 1);
698
699 rCur += dR;
700 dR = peFiberAreaD / (3.14 * rCur);
701 TGeoTubeSeg* middleDiskFiberPE = new TGeoTubeSeg(Form("TRK_MLD_FIBER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesDisk / 2, -45, 45);
702 TGeoVolume* middleDiskFiberPEVolume = new TGeoVolume(Form("TRK_MLD_FIBER_PE_%s%d", orLabel.c_str(), iSide), middleDiskFiberPE, medPE);
703 middleDiskFiberPEVolume->SetLineColor(kOrange + 1);
704 auto* combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zMiddleServicesBarrelFwdConnection - zLengthCylinderMiddleServicesDisk / 2), new TGeoRotation("", refAngle + iSide * 180., 0, 0));
705 motherVolume->AddNode(middleDiskFiberSIO2Volume, 1, combiTrans);
706 motherVolume->AddNode(middleDiskFiberPEVolume, 1, combiTrans);
707
708 // Create powerlines
709 rCur += dR;
710 dR = cuPowerAreaD / (3.14 * rCur);
711 TGeoTubeSeg* middleDiskPowerCu = new TGeoTubeSeg(Form("TRK_MLD_POWER_CUsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesDisk / 2, -45, 45);
712 TGeoVolume* middleDiskPowerCuVolume = new TGeoVolume(Form("TRK_MLD_POWER_CU_%s%d", orLabel.c_str(), iSide), middleDiskPowerCu, medCu);
713 middleDiskPowerCuVolume->SetLineColor(kOrange + 1);
714
715 rCur += dR;
716 dR = pePowerAreaD / (3.14 * rCur);
717 TGeoTubeSeg* middleDiskPowerPE = new TGeoTubeSeg(Form("TRK_MLD_POWER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesDisk / 2, -45, 45);
718 TGeoVolume* middleDiskPowerPEVolume = new TGeoVolume(Form("TRK_MLD_POWER_PE_%s%d", orLabel.c_str(), iSide), middleDiskPowerPE, medPE);
719 middleDiskPowerPEVolume->SetLineColor(kOrange + 1);
720
721 motherVolume->AddNode(middleDiskPowerCuVolume, 1, combiTrans);
722 motherVolume->AddNode(middleDiskPowerPEVolume, 1, combiTrans);
723
724 if (orientation == Orientation::kASide) {
725 // Add Barrel services
726 // create data fiber volumes
727 rCur += dR;
728 dR = siO2FiberAreaB / (3.14 * rCur);
729 TGeoTubeSeg* middleBarrelFiberSIO2 = new TGeoTubeSeg(Form("TRK_MLB_FIBER_SIO2sh_A%d", iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesBarrel / 2, -45, 45);
730 TGeoVolume* middleBarrelFiberSIO2Volume = new TGeoVolume(Form("TRK_MLB_FIBER_SIO2_A%d", iSide), middleBarrelFiberSIO2, medSiO2);
731 middleBarrelFiberSIO2Volume->SetLineColor(kOrange - 9);
732
733 rCur += dR;
734 dR = peFiberAreaB / (3.14 * rCur);
735 TGeoTubeSeg* middleBarrelFiberPE = new TGeoTubeSeg(Form("TRK_MLB_FIBER_PEsh_A%d", iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesBarrel / 2, -45, 45);
736 TGeoVolume* middleBarrelFiberPEVolume = new TGeoVolume(Form("TRK_MLB_FIBER_PE_A%d", iSide), middleBarrelFiberPE, medPE);
737 middleBarrelFiberPEVolume->SetLineColor(kOrange - 9);
738 auto* combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zMiddleServicesBarrelFwdConnection - zLengthCylinderMiddleServicesBarrel / 2), new TGeoRotation(nullptr, refAngle + iSide * 180., 0, 0));
739 motherVolume->AddNode(middleBarrelFiberSIO2Volume, 1, combiTrans);
740 motherVolume->AddNode(middleBarrelFiberPEVolume, 1, combiTrans);
741
742 // Create powerlines
743 rCur += dR;
744 dR = cuPowerAreaB / (3.14 * rCur);
745 TGeoTubeSeg* middleBarrelPowerCu = new TGeoTubeSeg(Form("TRK_MLB_POWER_CUsh_A%d", iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesBarrel / 2, -45, 45);
746 TGeoVolume* middleBarrelPowerCuVolume = new TGeoVolume(Form("TRK_MLB_POWER_CU_A%d", iSide), middleBarrelPowerCu, medCu);
747 middleBarrelPowerCuVolume->SetLineColor(kOrange - 9);
748
749 rCur += dR;
750 dR = pePowerAreaB / (3.14 * rCur);
751 TGeoTubeSeg* middleBarrelPowerPE = new TGeoTubeSeg(Form("TRK_MLB_POWER_PEsh_A%d", iSide), rCur, rCur + dR, zLengthCylinderMiddleServicesBarrel / 2, -45, 45);
752 TGeoVolume* middleBarrelPowerPEVolume = new TGeoVolume(Form("TRK_MLB_POWER_PE_A%d", iSide), middleBarrelPowerPE, medPE);
753 middleBarrelPowerPEVolume->SetLineColor(kOrange - 9);
754
755 motherVolume->AddNode(middleBarrelPowerCuVolume, 1, combiTrans);
756 motherVolume->AddNode(middleBarrelPowerPEVolume, 1, combiTrans);
757
758 // TODO: add cooling ducts/pipes
759 }
760 }
761 }
762
763 // Barrel to forward connection disks
764 // A side: barrel + disk services
765 // C side: only disk services
766 float rMaxMiddleServicesBarFwd = 74.5f; // TODO: add thickness of service barrels
767 float rMinMiddleBarrel = rMinMiddleServices; // min radius of the service disk
768 diskCircumference = rMaxMiddleServicesBarFwd * 3.14; // Only half of the area is used
769 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
770 float refAngle = 0;
771 std::string orLabel("A");
772 if (orientation == Orientation::kCSide) {
773 refAngle = 90;
774 orLabel = "C";
775 }
776 double totalThickness = 0;
777 for (int iSide = 0; iSide < 2; iSide++) {
778 // Create fibers
779 double zCur = zMiddleServicesBarrelFwdConnection; // Change to f
780 double dZ = siO2FiberAreaD / diskCircumference / 2.;
781 totalThickness += 2 * dZ;
782 if (orientation == Orientation::kASide) {
783 dZ += siO2FiberAreaB / diskCircumference / 2.;
784 }
785 TGeoTubeSeg* middleBarFwdFiberSIO2 = new TGeoTubeSeg(Form("TRK_MIDBARFWD_FIBER_SIO2sh_%s%d", orLabel.c_str(), iSide), rMinMiddleBarrel, rMaxMiddleServicesBarFwd, dZ, -45, 45);
786 TGeoVolume* middleBarFwdFiberSIO2Volume = new TGeoVolume(Form("TRK_MIDBARFWD_FIBER_SIO2_%s%d", orLabel.c_str(), iSide), middleBarFwdFiberSIO2, medSiO2);
787 auto* rot = new TGeoRotation("", refAngle + iSide * 180., 0, 180.);
788 auto* combiTransSIO2 = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
789
790 zCur += 2 * dZ;
791 dZ = peFiberAreaD / diskCircumference / 2.;
792 totalThickness += 2 * dZ;
793 if (orientation == Orientation::kASide) {
794 dZ += peFiberAreaB / diskCircumference / 2.;
795 }
796 TGeoTubeSeg* middleBarFwdFiberPE = new TGeoTubeSeg(Form("TRK_MIDBARFWD_FIBER_PEsh_%s%d", orLabel.c_str(), iSide), rMinMiddleBarrel, rMaxMiddleServicesBarFwd, dZ, -45, 45);
797 TGeoVolume* middleBarFwdFiberPEVolume = new TGeoVolume(Form("TRK_MIDBARFWD_FIBER_PE_%s%d", orLabel.c_str(), iSide), middleBarFwdFiberPE, medPE);
798 middleBarFwdFiberSIO2Volume->SetLineColor(kOrange + 1);
799 middleBarFwdFiberPEVolume->SetLineColor(kOrange + 1);
800 auto* combiTransPE = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
801 motherVolume->AddNode(middleBarFwdFiberSIO2Volume, 1, combiTransSIO2);
802 motherVolume->AddNode(middleBarFwdFiberPEVolume, 1, combiTransPE);
803
804 // Create powerlines
805 zCur += 2 * dZ;
806 dZ = cuPowerAreaD / diskCircumference / 2.;
807 totalThickness += 2 * dZ;
808 if (orientation == Orientation::kASide) {
809 dZ += cuPowerAreaB / diskCircumference / 2.;
810 }
811 TGeoTubeSeg* middleBarFwdPowerCu = new TGeoTubeSeg(Form("TRK_MIDBARFWD_POWER_CUsh_%s%d", orLabel.c_str(), iSide), rMinMiddleBarrel, rMaxMiddleServicesBarFwd, dZ, -45, 45);
812 TGeoVolume* middleBarFwdPowerCuVolume = new TGeoVolume(Form("TRK_MIDBARFWD_POWER_CU_%s%d", orLabel.c_str(), iSide), middleBarFwdPowerCu, medCu);
813 auto* combiTransCu = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
814
815 zCur += 2 * dZ;
816 dZ = pePowerAreaD / diskCircumference / 2.;
817 totalThickness += 2 * dZ;
818 if (orientation == Orientation::kASide) {
819 dZ += pePowerAreaB / diskCircumference / 2.;
820 }
821 TGeoTubeSeg* middleBarFwdPowerPE = new TGeoTubeSeg(Form("TRK_MIDBARFWD_POWER_PEsh_%s%d", orLabel.c_str(), iSide), rMinMiddleBarrel, rMaxMiddleServicesBarFwd, dZ, -45, 45);
822 TGeoVolume* middleBarFwdPowerPEVolume = new TGeoVolume(Form("TRK_MIDBARFWD_POWER_PE_%s%d", orLabel.c_str(), iSide), middleBarFwdPowerPE, medPE);
823 middleBarFwdPowerCuVolume->SetLineColor(kOrange + 1);
824 middleBarFwdPowerPEVolume->SetLineColor(kOrange + 1);
825 auto* combiTransPEPower = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), rot);
826 motherVolume->AddNode(middleBarFwdPowerCuVolume, 1, combiTransCu);
827 motherVolume->AddNode(middleBarFwdPowerPEVolume, 1, combiTransPEPower);
828
829 // TODO: add cooling ducts/pipes
830 }
831
832 // Forward part
833 float zLengthMiddleServicesFwd = 350.f - (zMiddleServicesBarrelFwdConnection + totalThickness);
834 float rMinMiddleServicesFwd = 74.5f; // 74.5cm
835
836 for (int iSide = 0; iSide < 2; iSide++) {
837 // Create fibers
838
839 float translation = (int)orientation * (zMiddleServicesBarrelFwdConnection + totalThickness + zLengthMiddleServicesFwd / 2);
840
841 double rCur = rMinMiddleServicesFwd;
842 double dR = siO2FiberAreaD / (3.14 * rCur);
843 if (orientation == Orientation::kASide) {
844 dR += siO2FiberAreaB / (3.14 * rCur);
845 }
846 TGeoTubeSeg* middleFwdFiberSIO2 = new TGeoTubeSeg(Form("TRK_MIDFWD_FIBER_SIO2sh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthMiddleServicesFwd / 2, -45, 45);
847 TGeoVolume* middleFwdFiberSIO2Volume = new TGeoVolume(Form("TRK_MIDFWD_FIBER_SIO2_%s%d", orLabel.c_str(), iSide), middleFwdFiberSIO2, medSiO2);
848 middleFwdFiberSIO2Volume->SetLineColor(kOrange + 1);
849
850 rCur += dR;
851 dR = peFiberAreaD / (3.14 * rCur);
852 if (orientation == Orientation::kASide) {
853 dR += peFiberAreaB / (3.14 * rCur);
854 }
855 TGeoTubeSeg* middleFwdFiberPE = new TGeoTubeSeg(Form("TRK_MIDFWD_FIBER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthMiddleServicesFwd / 2, -45, 45);
856 TGeoVolume* middleFwdFiberPEVolume = new TGeoVolume(Form("TRK_MIDFWD_FIBER_PE_%s%d", orLabel.c_str(), iSide), middleFwdFiberPE, medPE);
857 middleFwdFiberPEVolume->SetLineColor(kOrange + 1);
858
859 auto* rot = new TGeoRotation("", refAngle + iSide * 180., 0, 0.);
860 auto* combiTrans = new TGeoCombiTrans(0, 0, translation, rot);
861 motherVolume->AddNode(middleFwdFiberSIO2Volume, 1, combiTrans);
862 motherVolume->AddNode(middleFwdFiberPEVolume, 1, combiTrans);
863
864 // Create powerlines
865 rCur += dR;
866 dR = cuPowerAreaD / (3.14 * rCur);
867 if (orientation == Orientation::kASide) {
868 dR += cuPowerAreaB / (3.14 * rCur);
869 }
870 TGeoTubeSeg* middleFwdPowerCu = new TGeoTubeSeg(Form("TRK_MIDFWD_POWER_CUsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthMiddleServicesFwd / 2, -45, 45);
871 TGeoVolume* middleFwdPowerCuVolume = new TGeoVolume(Form("TRK_MIDFWD_POWER_CU_%s%d", orLabel.c_str(), iSide), middleFwdPowerCu, medCu);
872 middleFwdPowerCuVolume->SetLineColor(kOrange + 1);
873
874 rCur += dR;
875 dR = pePowerAreaD / (3.14 * rCur);
876 if (orientation == Orientation::kASide) {
877 dR += pePowerAreaB / (3.14 * rCur);
878 }
879 TGeoTubeSeg* middleFwdPowerPE = new TGeoTubeSeg(Form("TRK_MIDFWD_POWER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthMiddleServicesFwd / 2, -45, 45);
880 TGeoVolume* middleFwdPowerPEVolume = new TGeoVolume(Form("TRK_MIDFWD_POWER_PE_%s%d", orLabel.c_str(), iSide), middleFwdPowerPE, medPE);
881 middleFwdPowerPEVolume->SetLineColor(kOrange + 1);
882 motherVolume->AddNode(middleFwdPowerCuVolume, 1, combiTrans);
883 motherVolume->AddNode(middleFwdPowerPEVolume, 1, combiTrans);
884
885 // TODO: add cooling ducts/pipes
886 }
887 }
888}
889
890void TRKServices::createOTBarrelWalls(TGeoVolume* motherVolume)
891{
892 // Closes each OT quarter barrel azimuthally (a wall in the cut plane) and at mid-rapidity
893 // (a half disk at z = 0); radially the two cylindrical shells already do it. Both run
894 // continuously between the shells, through the slots in the layer envelopes.
896 TGeoMedium* medCFiber = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_CARBONFIBERM55J6K");
897
898 // Only the realistic OT barrel is built in quarters with slotted envelopes.
899 if (TRKBaseParam::Instance().getLayoutMLOT() != kSimplifiedRealistic) {
900 LOGP(info, "OT barrel separation walls skipped: they belong to the kSimplifiedRealistic OT barrel");
901 return;
902 }
903
904 const float thickness = TRKBaseParam::Instance().otBarrelWallThickness;
905 if (thickness <= 0.f) {
906 LOGP(info, "OT barrel separation walls disabled (TRKBase.otBarrelWallThickness = {})", thickness);
907 return;
908 }
909
910 const float zWallOuter = 142.0f; // cm, up to the OT barrel service disk
911 const float phiCut = 90.f; // deg, the vertical cut plane, as in TRKOTLayerRealistic::createLayer
912
913 // The wall is a box, so its outer edge is pulled in until the corners, not the face,
914 // sit on the outer shell.
915 const float zLength = zWallOuter - thickness;
916 const float rHiBox = std::sqrt(sOTShellRMin * sOTShellRMin - thickness * thickness / 4.f);
917 const float rMidWall = 0.5 * (sMLOTShellRMax + rHiBox);
918 LOGP(info, "Creating OT barrel separation walls, {} cm of carbon fibre, continuous over r = [{}, {}] cm", thickness, sMLOTShellRMax, rHiBox);
919
920 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
921 const std::string orLabel = (orientation == Orientation::kASide) ? "A" : "C";
922 const int zSign = (int)orientation;
923
924 for (int iSide = 0; iSide < 2; ++iSide) {
925 const double phi = (phiCut + iSide * 180.f) * TMath::DegToRad();
926 TGeoBBox* wallSh = new TGeoBBox(Form("TRK_OT_WALL_PHIsh_%s%d", orLabel.c_str(), iSide),
927 (rHiBox - sMLOTShellRMax) / 2., thickness / 2., zLength / 2.);
928 TGeoVolume* wallVol = new TGeoVolume(Form("TRK_OT_WALL_PHI_%s%d", orLabel.c_str(), iSide), wallSh, medCFiber);
929 wallVol->SetLineColor(kGray);
930 auto* rot = new TGeoRotation("", phiCut + iSide * 180.f, 0, 0);
931 motherVolume->AddNode(wallVol, 1,
932 new TGeoCombiTrans(rMidWall * std::cos(phi), rMidWall * std::sin(phi),
933 zSign * (thickness + zLength / 2.), rot));
934 }
935 }
936
937 // One per azimuthal half and per eta half-barrel, back to back in the gap between them.
938 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
939 const std::string orLabel = (orientation == Orientation::kASide) ? "A" : "C";
940 const int zSign = (int)orientation;
941 for (int iHalf = 0; iHalf < 2; ++iHalf) {
942 TGeoTubeSeg* diskSh = new TGeoTubeSeg(Form("TRK_OT_WALL_Z0sh_%s%d", orLabel.c_str(), iHalf),
943 sMLOTShellRMax, sOTShellRMin, thickness / 2., phiCut + iHalf * 180.f, phiCut + (iHalf + 1) * 180.f);
944 TGeoVolume* diskVol = new TGeoVolume(Form("TRK_OT_WALL_Z0_%s%d", orLabel.c_str(), iHalf), diskSh, medCFiber);
945 diskVol->SetLineColor(kGray);
946 motherVolume->AddNode(diskVol, 1, new TGeoTranslation(0, 0, zSign * thickness / 2.));
947 }
948 }
949}
950
951void TRKServices::createOTServicesPeacock(TGeoVolume* motherVolume)
952{
953 // This implments the service barrels for power + data for the OT barrels and disks
954 // TODO: add cooling
955
957
958 TGeoMedium* medSiO2 = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_SILICONDIOXIDE");
959 TGeoMedium* medPE = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYETHYLENE");
960 TGeoMedium* medCu = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_COPPER");
961 TGeoMedium* medPU = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_POLYURETHANE");
962 TGeoMedium* medH2O = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_WATER");
963 TGeoMedium* medCFiber = matmgr.getTGeoMedium("ALICE3_TRKSERVICES_CARBONFIBERM55J6K");
964
965 // OT Disk service constants
966 const int OTDisknFiber = 3 * 51;
967 const int OTDisknPower = 3 * 34;
968 float siO2FiberAreaD = OTDisknFiber * mFiberArea * mFiberComposition[0];
969 float peFiberAreaD = OTDisknFiber * mFiberArea * mFiberComposition[1];
970
971 float puCoolingAreaD = 0;
972 float h2oCoolingAreaD = 0;
973 float cuPowerAreaD = OTDisknPower * mPowerBundleArea * mPowerBundleComposition[0];
974 float pePowerAreaD = OTDisknPower * mPowerBundleArea * mPowerBundleComposition[1];
975
976 // OT Barrel service constants
977 const int OTBarrelnFiber = 460;
978 const int OTBarrelnPower = 306;
979 float siO2FiberAreaB = OTBarrelnFiber * mFiberArea * mFiberComposition[0];
980 float peFiberAreaB = OTBarrelnFiber * mFiberArea * mFiberComposition[1];
981
982 float puCoolingAreaB = 0;
983 float h2oCoolingAreaB = 0;
984 float cuPowerAreaB = OTBarrelnPower * mPowerBundleArea * mPowerBundleComposition[0];
985 float pePowerAreaB = OTBarrelnPower * mPowerBundleArea * mPowerBundleComposition[1];
986
987 // geometry of service "disk" for OT barrel
988 double rMinOTbarrelServices = 45.0; // cm, radius of first OT barrel layer
989 double rMaxOTbarrelServices = 78.0; // cm, radius of last OT barrel layer
990 double zOTbarrelServices = 142.0; // cm, approximate position of OT services in z
991
992 // geometry of service "tubes" for OT barrel
993 float rMinOuterBarrelTubeServices = rMaxOTbarrelServices; // cm, IA, May 11, 2026: temporary radius (?)
994 float zStartOuterBarrelTubeServices = zOTbarrelServices + 0.8f; // cm, IA, May 11, 2026: start "OT service tubes" close in z to the "OT service disks"
995 float zLengthOuterBarrelTubeServices = 215.f; // cm, IA, May 11, 2026: temporary length (?)
996
997 // geometry of service "tubes" for OT disks
998 float rMinOuterDiskServices = 70.5f; // cm
999 float zStartOuterDiskServices = 149.f; // cm
1000 float zLengthOuterDiskServices = 201.f; // cm
1001
1002 // Carbon Fiber Cylinder support for the middle tracker
1003 float rMinOuterCarbonSupport = sOTShellRMin; // TODO: get more precise location
1004 float rMaxOuterCarbonSupport = sOTShellRMin + sOTShellThickness; // 4 mm of carbon fiber, the only load-bearing wall
1005 const float zLengthOuterCarbon = 280.0f; // Rough guess for now
1006 TGeoTube* outerBarrelCarbonSupport = new TGeoTube("TRK_OT_CARBONSUPPORTsh", rMinOuterCarbonSupport, rMaxOuterCarbonSupport, zLengthOuterCarbon / 2.);
1007 TGeoVolume* outerBarrelCarbonSupportVolume = new TGeoVolume("TRK_OT_CARBONSUPPORT", outerBarrelCarbonSupport, medCFiber);
1008 outerBarrelCarbonSupportVolume->SetLineColor(kGray);
1009 LOGP(info, "Creating carbon fiber support for Outer Tracker");
1010 motherVolume->AddNode(outerBarrelCarbonSupportVolume, 1, nullptr);
1011
1012 for (auto& orientation : {Orientation::kASide, Orientation::kCSide}) {
1013 std::string orLabel = "A";
1014 float refAngle = 0;
1015 if (orientation == Orientation::kCSide) {
1016 orLabel = "C";
1017 refAngle = 90;
1018 }
1019 // TODO: add cables/connections at ends of OT barrels
1020 double zCur = zOTbarrelServices;
1021
1022 double dZ = siO2FiberAreaB / (4 * 3.14 * rMaxOTbarrelServices);
1023 TGeoTube* outerBarrelFiberSIO2 = new TGeoTube(Form("TRK_OUTERBARREL_FIBER_SIO2sh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
1024 TGeoVolume* outerBarrelFiberSIO2Volume = new TGeoVolume(Form("TRK_OUTERBARREL_FIBER_SIO2_%s", orLabel.c_str()), outerBarrelFiberSIO2, medSiO2);
1025 outerBarrelFiberSIO2Volume->SetLineColor(kAzure + 6);
1026 auto* combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
1027 motherVolume->AddNode(outerBarrelFiberSIO2Volume, 1, combiTrans);
1028
1029 zCur += 2 * dZ;
1030 dZ = peFiberAreaB / (4 * 3.14 * rMaxOTbarrelServices);
1031 TGeoTube* outerBarrelFiberPE = new TGeoTube(Form("TRK_OUTERBARREL_FIBER_PEsh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
1032 TGeoVolume* outerBarrelFiberPEVolume = new TGeoVolume(Form("TRK_OUTERBARREL_FIBER_PE_%s", orLabel.c_str()), outerBarrelFiberPE, medPE);
1033 outerBarrelFiberPEVolume->SetLineColor(kAzure + 6);
1034 combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
1035 motherVolume->AddNode(outerBarrelFiberPEVolume, 1, combiTrans);
1036
1037 zCur += 2 * dZ;
1038 dZ = cuPowerAreaB / (4 * 3.14 * rMaxOTbarrelServices);
1039 TGeoTube* outerBarrelPowerCu = new TGeoTube(Form("TRK_OUTERBARREL_POWER_CUsh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
1040 TGeoVolume* outerBarrelPowerCuVolume = new TGeoVolume(Form("TRK_OUTERBARREL_POWER_CU_%s", orLabel.c_str()), outerBarrelPowerCu, medCu);
1041 outerBarrelPowerCuVolume->SetLineColor(kAzure + 6);
1042 combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
1043 motherVolume->AddNode(outerBarrelPowerCuVolume, 1, combiTrans);
1044
1045 zCur += 2 * dZ;
1046 dZ = pePowerAreaB / (4 * 3.14 * rMaxOTbarrelServices);
1047 TGeoTube* outerBarrelPowerPE = new TGeoTube(Form("TRK_OUTERBARREL_POWER_PEsh_%s", orLabel.c_str()), rMinOTbarrelServices, rMaxOTbarrelServices, dZ);
1048 TGeoVolume* outerBarrelPowerPEVolume = new TGeoVolume(Form("TRK_OUTERBARREL_POWER_PE_%s", orLabel.c_str()), outerBarrelPowerPE, medPE);
1049 outerBarrelPowerPEVolume->SetLineColor(kAzure + 6);
1050 combiTrans = new TGeoCombiTrans(0, 0, (int)orientation * (zCur + dZ), nullptr);
1051 motherVolume->AddNode(outerBarrelPowerPEVolume, 1, combiTrans);
1052
1053 for (int iSide = 0; iSide < 2; iSide++) {
1054 // #### OT barrel services, implemented as tubes
1055 // Create fibers for service barrel tubes
1056 double rCur = rMinOuterBarrelTubeServices; // set starting radius for barrel service tube
1057 double dR = siO2FiberAreaB / (3.14 * rCur);
1058 TGeoTubeSeg* outerBarrelTubeFiberSIO2 = new TGeoTubeSeg(Form("TRK_OUTERBARREL_TUBE_FIBER_SIO2sh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterBarrelTubeServices / 2, -45, 45);
1059 TGeoVolume* outerBarrelTubeFiberSIO2Volume = new TGeoVolume(Form("TRK_OUTERBARREL_TUBE_FIBER_SIO2_%s%d", orLabel.c_str(), iSide), outerBarrelTubeFiberSIO2, medSiO2);
1060 outerBarrelTubeFiberSIO2Volume->SetLineColor(kAzure + 6);
1061
1062 rCur += dR;
1063 dR = peFiberAreaB / (3.14 * rCur);
1064 TGeoTubeSeg* outerBarrelTubeFiberPE = new TGeoTubeSeg(Form("TRK_OUTERBARREL_TUBE_FIBER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterBarrelTubeServices / 2, -45, 45);
1065 TGeoVolume* outerBarrelTubeFiberPEVolume = new TGeoVolume(Form("TRK_OUTERBARREL_TUBE_FIBER_PE_%s%d", orLabel.c_str(), iSide), outerBarrelTubeFiberPE, medPE);
1066 outerBarrelTubeFiberPEVolume->SetLineColor(kAzure + 6);
1067
1068 float translation = (int)orientation * (zStartOuterBarrelTubeServices + zLengthOuterBarrelTubeServices / 2);
1069 auto* combiTrans = new TGeoCombiTrans(0, 0, translation, new TGeoRotation("", refAngle + iSide * 180., 0, 0));
1070 motherVolume->AddNode(outerBarrelTubeFiberSIO2Volume, 1, combiTrans);
1071 motherVolume->AddNode(outerBarrelTubeFiberPEVolume, 1, combiTrans);
1072
1073 // Create power lines for service barrel tubes
1074 rCur += dR;
1075 dR = cuPowerAreaB / (3.14 * rCur);
1076 TGeoTubeSeg* outerBarrelTubePowerCu = new TGeoTubeSeg(Form("TRK_OUTERBARREL_TUBE_POWER_CUsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterBarrelTubeServices / 2, -45, 45);
1077 TGeoVolume* outerBarrelTubePowerCuVolume = new TGeoVolume(Form("TRK_OUTERBARREL_TUBE_POWER_CU_%s%d", orLabel.c_str(), iSide), outerBarrelTubePowerCu, medCu);
1078 outerBarrelTubePowerCuVolume->SetLineColor(kAzure + 6);
1079
1080 rCur += dR;
1081 dR = pePowerAreaB / (3.14 * rCur);
1082 TGeoTubeSeg* outerBarrelTubePowerPE = new TGeoTubeSeg(Form("TRK_OUTERBARREL_TUBE_POWER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterBarrelTubeServices / 2, -45, 45);
1083 TGeoVolume* outerBarrelTubePowerPEVolume = new TGeoVolume(Form("TRK_OUTERBARREL_TUBE_POWER_PE_%s%d", orLabel.c_str(), iSide), outerBarrelTubePowerPE, medPE);
1084 outerBarrelTubePowerPEVolume->SetLineColor(kAzure + 6);
1085 motherVolume->AddNode(outerBarrelTubePowerCuVolume, 1, combiTrans);
1086 motherVolume->AddNode(outerBarrelTubePowerPEVolume, 1, combiTrans);
1087
1088 // #### OT disk services, implemented as tubes
1089 // Create fibers for disks
1090 rCur = rMinOuterDiskServices; // set starting radius for disk service tube
1091 dR = siO2FiberAreaD / (3.14 * rCur);
1092 TGeoTubeSeg* outerDisksFiberSIO2 = new TGeoTubeSeg(Form("TRK_OUTERDISKS_FIBER_SIO2sh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterDiskServices / 2, -45, 45);
1093 TGeoVolume* outerDisksFiberSIO2Volume = new TGeoVolume(Form("TRK_OUTERDISKS_FIBER_SIO2_%s%d", orLabel.c_str(), iSide), outerDisksFiberSIO2, medSiO2);
1094 outerDisksFiberSIO2Volume->SetLineColor(kMagenta);
1095
1096 rCur += dR;
1097 dR = peFiberAreaD / (3.14 * rCur);
1098 TGeoTubeSeg* outerDisksFiberPE = new TGeoTubeSeg(Form("TRK_OUTERDISKS_FIBER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterDiskServices / 2, -45, 45);
1099 TGeoVolume* outerDisksFiberPEVolume = new TGeoVolume(Form("TRK_OUTERDISKS_FIBER_PE_%s%d", orLabel.c_str(), iSide), outerDisksFiberPE, medPE);
1100 outerDisksFiberPEVolume->SetLineColor(kMagenta);
1101
1102 translation = (int)orientation * (zStartOuterDiskServices + zLengthOuterDiskServices / 2);
1103 combiTrans = new TGeoCombiTrans(0, 0, translation, new TGeoRotation("", refAngle + iSide * 180., 0, 0));
1104 motherVolume->AddNode(outerDisksFiberSIO2Volume, 1, combiTrans);
1105 motherVolume->AddNode(outerDisksFiberPEVolume, 1, combiTrans);
1106
1107 // Create power lines for disks
1108 rCur += dR;
1109 dR = cuPowerAreaD / (3.14 * rCur);
1110 TGeoTubeSeg* outerDisksPowerCu = new TGeoTubeSeg(Form("TRK_OUTERDISKS_POWER_CUsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterDiskServices / 2, -45, 45);
1111 TGeoVolume* outerDisksPowerCuVolume = new TGeoVolume(Form("TRK_OUTERDISKS_POWER_CU_%s%d", orLabel.c_str(), iSide), outerDisksPowerCu, medCu);
1112 outerDisksPowerCuVolume->SetLineColor(kMagenta + 1);
1113
1114 rCur += dR;
1115 dR = pePowerAreaD / (3.14 * rCur);
1116 TGeoTubeSeg* outerDisksPowerPE = new TGeoTubeSeg(Form("TRK_OUTERDISKS_POWER_PEsh_%s%d", orLabel.c_str(), iSide), rCur, rCur + dR, zLengthOuterDiskServices / 2, -45, 45);
1117 TGeoVolume* outerDisksPowerPEVolume = new TGeoVolume(Form("TRK_OUTERDISKS_POWER_PE_%s%d", orLabel.c_str(), iSide), outerDisksPowerPE, medPE);
1118 outerDisksPowerPEVolume->SetLineColor(kMagenta + 1);
1119 motherVolume->AddNode(outerDisksPowerCuVolume, 1, combiTrans);
1120 motherVolume->AddNode(outerDisksPowerPEVolume, 1, combiTrans);
1121
1122 // TODO: add cooling ducts/pipes
1123 }
1124 }
1125}
1126
1127} // namespace trk
1128} // namespace o2
specs of the ALICE3 TRK
static MaterialManager & Instance()
static const char * getTRKServiceVolPattern()
static const char * getTRKLayerPattern()
TString mVacuumCompositeFormula
Definition TRKServices.h:71
void registerVacuum(TGeoVolume *motherVolume)
void createServicesAroundBeamPipe(TGeoVolume *motherVolume)
void createOTServicesPeacock(TGeoVolume *motherVolume)
void createOuterBarrelServices(TGeoVolume *motherVolume)
float mPowerBundleComposition[2]
Definition TRKServices.h:82
static constexpr float sMLOTShellThickness
Definition TRKServices.h:66
static constexpr float sMLOTShellRMax
Definition TRKServices.h:65
static constexpr float sOTShellThickness
Definition TRKServices.h:68
void createServices(TGeoVolume *motherVolume)
void createMLServicesPeacock(TGeoVolume *motherVolume)
void excavateFromVacuum(TString shapeToExcavate)
void createOTBarrelWalls(TGeoVolume *motherVolume)
static constexpr float sOTShellRMin
Definition TRKServices.h:67
void createOuterDisksServices(TGeoVolume *motherVolume)
float mFiberComposition[2]
Definition TRKServices.h:81
void createMiddleServices(TGeoVolume *motherVolume)
@ kSimplifiedRealistic
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...