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