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