Project
Loading...
Searching...
No Matches
V3Cage.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
15
19
20#include <fairlogger/Logger.h> // for LOG
21
22#include <TGeoArb8.h> // for TGeoArb8
23#include <TGeoBBox.h> // for TGeoBBox
24#include <TGeoCone.h> // for TGeoConeSeg, TGeoCone
25#include <TGeoPcon.h> // for TGeoPcon
26#include <TGeoManager.h> // for TGeoManager, gGeoManager
27#include <TGeoMatrix.h> // for TGeoCombiTrans, TGeoRotation, etc
28// #include <TGeoTrd1.h> // for TGeoTrd1
29#include <TGeoTube.h> // for TGeoTube, TGeoTubeSeg
30#include <TGeoVolume.h> // for TGeoVolume, TGeoVolumeAssembly
31#include <TGeoXtru.h> // for TGeoXtru
32#include <TGeoCompositeShape.h> // for TGeoCompositeShape
33#include <TMathBase.h> // for Abs
34#include <TMath.h> // for Sin, RadToDeg, DegToRad, Cos, Tan, etc
35
36#include <cstdio> // for snprintf
37
38class TGeoMedium;
39
40using namespace TMath;
41using namespace o2::its;
42
43// Parameters
44const Double_t V3Cage::sCageYInBarrel = 30. * sCm; // This is hardcoded in Detector.cxx
45
46// Cover element (each)
47const Double_t V3Cage::sCageCoverZLength = 586.0 * sMm;
48const Double_t V3Cage::sCageCoverRint = 540.0 * sMm;
49const Double_t V3Cage::sCageCoverRext = 550.0 * sMm;
50const Double_t V3Cage::sCageCoverXWidth = 982.0 * sMm;
51const Double_t V3Cage::sCageCoverXBaseInt = 944.0 * sMm;
52const Double_t V3Cage::sCageCoverXBaseExt = 948.0 * sMm;
53const Double_t V3Cage::sCageCoverYBaseHeight = 245.0 * sMm;
54const Double_t V3Cage::sCageCoverCoreRint = 541.0 * sMm;
55const Double_t V3Cage::sCageCoverCoreRext = 549.0 * sMm;
56const Double_t V3Cage::sCageCoverSheetThick = 2 * sMm;
57const Double_t V3Cage::sCageCoverRibZLength = 25.0 * sMm;
58const Double_t V3Cage::sCageCoverRibRint = 540.0 * sMm;
59const Double_t V3Cage::sCageCoverRibRext = 548.0 * sMm;
60const Double_t V3Cage::sCageCoverRibXWidth = 984.8 * sMm;
61const Double_t V3Cage::sCageCoverRibXBaseInt = 944.0 * sMm;
62const Double_t V3Cage::sCageCoverRibYBaseHi = 245.0 * sMm;
63const Double_t V3Cage::sCageCoverRibFoldHi = 31.5 * sMm;
64
65const Double_t V3Cage::sCageSidePanelLength = 3457.0 * sMm;
66const Double_t V3Cage::sCageSidePanelWidth = 490.0 * sMm;
67const Double_t V3Cage::sCageSidePanelFoilThick = 1.0 * sMm;
68const Double_t V3Cage::sCageSidePanelCoreThick = 20.0 * sMm;
69const Double_t V3Cage::sCageSidePanelXDist = 988.0 * sMm;
70const Double_t V3Cage::sCageSidePanelRail1Len = 3320.0 * sMm;
71const Double_t V3Cage::sCageSidePanelRail2Len = 1550.0 * sMm;
72const Double_t V3Cage::sCageSidePanelRail3Len = 302.0 * sMm;
73const Double_t V3Cage::sCageSidePanelRailWidth = 25.0 * sMm;
74const Double_t V3Cage::sCageSidePanelRailSpan = 20.0 * sMm;
75const Double_t V3Cage::sCageSidePanelRailHThik = 5.0 * sMm;
76const Double_t V3Cage::sCageSidePanelRailVThik = 2.5 * sMm;
77const Double_t V3Cage::sCageSidePanelGuideLen = 3587.0 * sMm;
78const Double_t V3Cage::sCageSidePanelGuideInHi = 204.0 * sMm;
79const Double_t V3Cage::sCageSidePanelGuideWide = 44.0 * sMm;
80const Double_t V3Cage::sCageSidePanelGuidThik1 = 6.0 * sMm;
81const Double_t V3Cage::sCageSidePanelGuidThik2 = 8.0 * sMm;
82const Double_t V3Cage::sCageSidePanelMidBarWid = 15.0 * sMm;
83const Double_t V3Cage::sCageSidePanelSidBarWid = 15.0 * sMm;
84
85const Double_t V3Cage::sCageSidePanelRail1Ypos[2] = {226.5 * sMm, 147.5 * sMm};
86const Double_t V3Cage::sCageSidePanelRail2Ypos = 74.5 * sMm;
87const Double_t V3Cage::sCageSidePanelRail3Ypos[3] = {180.0 * sMm, 107.0 * sMm, 24.0 * sMm};
88
89const Double_t V3Cage::sCageEndCapDext = 1096.0 * sMm;
90const Double_t V3Cage::sCageEndCapDint = 304.0 * sMm;
91const Double_t V3Cage::sCageEndCapFoamThick = 8.0 * sMm;
92const Double_t V3Cage::sCageEndCapFabThick = 1.0 * sMm;
93const Double_t V3Cage::sCageEndCapXWidth = 988.0 * sMm;
94const Double_t V3Cage::sCageEndCapSideHoleR = 32.0 * sMm;
95const Double_t V3Cage::sCageEndCapSideHoleX = 532.0 * sMm;
96const Double_t V3Cage::sCageEndCapCableCutWid = 268.0 * sMm;
97const Double_t V3Cage::sCageEndCapCableCutR = 408.5 * sMm;
98const Double_t V3Cage::sCageEndCapCableCutPhi = 25.0; // Deg
99const Double_t V3Cage::sCageECRoundCrossDmin = 300 * sMm;
100const Double_t V3Cage::sCageECRoundCrossDmid = 303 * sMm;
101const Double_t V3Cage::sCageECRoundCrossDmax = 312 * sMm;
102const Double_t V3Cage::sCageECRoundCrossZext = 6 * sMm;
103const Double_t V3Cage::sCageECRoundCrossZint = 5 * sMm;
104const Double_t V3Cage::sCageECCableCrosTotHi = 139.0 * sMm;
105const Double_t V3Cage::sCageECCableCrosTotZ = 12 * sMm;
106const Double_t V3Cage::sCageECCableCrosInXWid = 266.8 * sMm;
107const Double_t V3Cage::sCageECCableCrosInThik = 4 * sMm;
108const Double_t V3Cage::sCageECCableCrosInZLen = 10.2 * sMm;
109const Double_t V3Cage::sCageECCableCrosSidWid = 8 * sMm;
110
111const Double_t V3Cage::sBPSuppCollarIntD = 53 * sMm;
112const Double_t V3Cage::sBPSuppCollarExtD = 57 * sMm;
113const Double_t V3Cage::sBPSuppCollarBushD = 52 * sMm;
114const Double_t V3Cage::sBPSuppUpperCollarLen = 78 * sMm;
115const Double_t V3Cage::sBPSuppUpperCollarHei = 4 * sMm;
116const Double_t V3Cage::sBPSuppLowerCollarLen = 151 * sMm;
117const Double_t V3Cage::sBPSuppLowerCollarTlX = 40.5 * sMm;
118const Double_t V3Cage::sBPSuppLowCollHolDist = 100 * sMm;
119const Double_t V3Cage::sBPSuppLowCollTailHei = 6 * sMm;
120const Double_t V3Cage::sBPSuppCollarBeamLen = 370 * sMm;
121const Double_t V3Cage::sBPSuppCollarBeamWid = 40 * sMm;
122const Double_t V3Cage::sBPSuppCollarBeamHei = 12 * sMm;
123const Double_t V3Cage::sBPSuppBracketTotLen = 57 * sMm;
124const Double_t V3Cage::sBPSuppBracketWidth = 25 * sMm;
125const Double_t V3Cage::sBPSuppBracketInLen = 20 * sMm;
126const Double_t V3Cage::sBPSuppBracketInHei = 8 * sMm;
127const Double_t V3Cage::sBPSuppBracketTailLen = 18.5 * sMm;
128const Double_t V3Cage::sBPSuppBracketTailHei = 3 * sMm;
129const Double_t V3Cage::sBPSuppBrktCentHoleX = 31.5 * sMm;
130const Double_t V3Cage::sBPSuppBrktCentHoleD = 6 * sMm;
131const Double_t V3Cage::sBPSuppBrktLatHoleX = 24.5 * sMm;
132const Double_t V3Cage::sBPSuppBrktLatHoleD = 3.2 * sMm;
133const Double_t V3Cage::sBPSuppBrktLatHoleW = 4 * sMm;
134const Double_t V3Cage::sBPSuppBrktLatHoleH = 2.5 * sMm;
135const Double_t V3Cage::sBPSuppBrktHolesY = 0.5 * sMm;
136const Double_t V3Cage::sBPSuppCollarM4High = 2.2 * sMm;
137const Double_t V3Cage::sBPSuppCollarM4Diam = 7.5 * sMm;
138const Double_t V3Cage::sBPSuppCollarM4XDist = 68 * sMm;
139const Double_t V3Cage::sBPSuppCollarM4ZPos = 7 * sMm;
140const Double_t V3Cage::sBPSuppClampTotLen = 55 * sMm;
141const Double_t V3Cage::sBPSuppClampTotWid = 23 * sMm;
142const Double_t V3Cage::sBPSuppClampTotHei = 13 * sMm;
143const Double_t V3Cage::sBPSuppClampLatThick = 5 * sMm;
144const Double_t V3Cage::sBPSuppClampShelfLen = 25 * sMm;
145const Double_t V3Cage::sBPSuppClampShelfHei = 4.5 * sMm;
146const Double_t V3Cage::sBPSuppClampsXDist = 944 * sMm;
147const Double_t V3Cage::sBPSuppClampInsDmin = 7 * sMm;
148const Double_t V3Cage::sBPSuppClampInsDmax = 11 * sMm;
149const Double_t V3Cage::sBPSuppClampInsH = 2.9 * sMm;
150const Double_t V3Cage::sBPSuppClampInsXPos = 15 * sMm;
151const Double_t V3Cage::sBPSuppClampInsZPos = 7 * sMm;
152const Double_t V3Cage::sBPSuppClampShimLen = 26 * sMm;
153const Double_t V3Cage::sBPSuppClampShimWid = 15 * sMm;
154const Double_t V3Cage::sBPSuppClampShimThick = 2.5 * sMm;
155const Double_t V3Cage::sBPSuppClampM5High = 2.7 * sMm;
156const Double_t V3Cage::sBPSuppClampM5Diam = 8.5 * sMm;
157const Double_t V3Cage::sBPSuppClampM5ZPos = 20 * sMm;
158const Double_t V3Cage::sBPSuppZPos = 1801 * sMm;
159
160const Double_t V3Cage::sCageCrossXWidthTot = 973 * sMm;
161const Double_t V3Cage::sCageCrossXWidthExt = 944 * sMm;
162const Double_t V3Cage::sCageCrossXWidthInt = 904 * sMm;
163const Double_t V3Cage::sCageCrossYHeightTot = 244 * sMm;
164const Double_t V3Cage::sCageCrossYHeightInt = 220 * sMm;
165const Double_t V3Cage::sCageCrossYMid = (126 + 5.5) * sMm;
166const Double_t V3Cage::sCageCrossZLength = 8 * sMm;
167const Double_t V3Cage::sCageCrossBarThick = 20 * sMm;
168const Double_t V3Cage::sCageCrossBarPhi = 25; // Deg
169
171
173 : V11Geometry()
174{
175}
176
178 : V11Geometry(0, name)
179{
180}
181
182V3Cage::~V3Cage() = default;
183
184void V3Cage::createAndPlaceCage(TGeoVolume* mother, const TGeoManager* mgr)
185{
186 //
187 // Creates the Cage elements and place them into the mother volume
188 //
189 // Input:
190 // mother : the mother volume hosting the whole Cage
191 // mgr : the GeoManager (used only to get the proper material)
192 //
193 // Output:
194 //
195 // Return:
196 //
197 // Created: 22 Apr 2022 Mario Sitta
198 //
199
200 // Local variables
201 Double_t zunit, xpos, ypos, zpos;
202
203 // Create the cover elements
204 TGeoVolume* cageCover = createCageCover(mgr);
205 TGeoVolume* cageCoverRib = createCageCoverRib(mgr);
206 TGeoVolume* cageEndCap = createCageEndCap(mgr);
207 TGeoVolume* cageSidePanel = createCageSidePanel(mgr);
208 TGeoVolume* cageBPSupport = createBeamPipeSupport(mgr);
209 TGeoVolume* cageClosingCross = createCageClosingCross(mgr);
210
211 // Now place all elements
212 mother->AddNode(cageCover, 1, new TGeoTranslation(0, sCageYInBarrel, 0));
213 mother->AddNode(cageCover, 2, new TGeoCombiTrans(0, sCageYInBarrel, 0, new TGeoRotation("", 180, 0, 0)));
214
215 zunit = (sCageCoverZLength + sCageCoverRibZLength) / 2.;
216
217 zpos = zunit;
218 mother->AddNode(cageCoverRib, 1, new TGeoTranslation(0, sCageYInBarrel, zpos));
219 mother->AddNode(cageCoverRib, 2, new TGeoCombiTrans(0, sCageYInBarrel, zpos, new TGeoRotation("", 180, 0, 0)));
220 mother->AddNode(cageCoverRib, 3, new TGeoTranslation(0, sCageYInBarrel, -zpos));
221 mother->AddNode(cageCoverRib, 4, new TGeoCombiTrans(0, sCageYInBarrel, -zpos, new TGeoRotation("", 180, 0, 0)));
222
223 zpos = 2 * zunit;
224 mother->AddNode(cageCover, 3, new TGeoTranslation(0, sCageYInBarrel, zpos));
225 mother->AddNode(cageCover, 4, new TGeoCombiTrans(0, sCageYInBarrel, zpos, new TGeoRotation("", 180, 0, 0)));
226 mother->AddNode(cageCover, 5, new TGeoTranslation(0, sCageYInBarrel, -zpos));
227 mother->AddNode(cageCover, 6, new TGeoCombiTrans(0, sCageYInBarrel, -zpos, new TGeoRotation("", 180, 0, 0)));
228
229 zpos += sCageCoverZLength / 2;
230
231 Double_t zposSP = -zpos + sCageSidePanelLength / 2;
232 xpos = sCageSidePanelXDist / 2 - sCageSidePanelCoreThick / 2 - sCageSidePanelFoilThick;
233 mother->AddNode(cageSidePanel, 1, new TGeoTranslation(xpos, sCageYInBarrel, zposSP));
234 mother->AddNode(cageSidePanel, 2, new TGeoCombiTrans(-xpos, sCageYInBarrel, zposSP, new TGeoRotation("", 180, 0, 0)));
235
236 Double_t zposCC = -zpos + sCageSidePanelLength + sCageCrossZLength / 2;
237 mother->AddNode(cageClosingCross, 1, new TGeoTranslation(0, sCageYInBarrel, zposCC));
238 mother->AddNode(cageClosingCross, 2, new TGeoCombiTrans(0, sCageYInBarrel, zposCC, new TGeoRotation("", 0, 180, 0)));
239
240 // The end cap is only on C side
241 zpos += sCageECCableCrosTotZ / 2;
242 mother->AddNode(cageEndCap, 1, new TGeoTranslation(0, sCageYInBarrel, -zpos));
243
244 // Third ribs are only on A side
245 zpos = 3 * zunit;
246 mother->AddNode(cageCoverRib, 5, new TGeoTranslation(0, sCageYInBarrel, zpos));
247 mother->AddNode(cageCoverRib, 6, new TGeoCombiTrans(0, sCageYInBarrel, zpos, new TGeoRotation("", 180, 0, 0)));
248
249 // The Beam Pipe Support on A side
250 ypos = sCageYInBarrel - sBPSuppLowCollTailHei / 2;
251 zpos = sBPSuppZPos + sBPSuppCollarBeamWid / 2;
252 mother->AddNode(cageBPSupport, 1, new TGeoTranslation(0, ypos, zpos));
253
254 return;
255}
256
257TGeoVolume* V3Cage::createCageCover(const TGeoManager* mgr)
258{
259 //
260 // Creates a Cage cover element (from drawings ALIITSUP0226, ALIITSUP0225)
261 //
262 // Input:
263 // mgr : the GeoManager (used only to get the proper material)
264 //
265 // Output:
266 //
267 // Return:
268 // The cover as a TGeoVolume
269 //
270 // Created: 22 Apr 2022 Mario Sitta
271 //
272
273 // Local variables
274 static const Int_t coverFoldNVert = 6;
275
276 Double_t xvert[coverFoldNVert], yvert[coverFoldNVert];
277 Double_t halfBase, zlen, alpha;
278
279 zlen = 0.5 * sCageCoverZLength;
280
281 // The cover core: a TGeoTubeSeg
282 halfBase = 0.5 * sCageCoverXBaseInt - sCageCoverSheetThick;
283 alpha = TMath::ACos(halfBase / sCageCoverCoreRext) * TMath::RadToDeg();
284 TGeoTubeSeg* coreSh = new TGeoTubeSeg("coverCore", sCageCoverCoreRint, sCageCoverCoreRext, zlen, alpha, 180. - alpha);
285
286 // The upper and lower sheets: a TGeoTubeSeg
287 // (as a whole volume - will become a sheet when the core is inserted inside)
288 halfBase = 0.5 * sCageCoverXBaseInt;
289 alpha = TMath::ACos(halfBase / sCageCoverRint) * TMath::RadToDeg();
290 TGeoTubeSeg* sheet = new TGeoTubeSeg("coverSheet", sCageCoverRint, sCageCoverCoreRext, zlen, alpha, 180. - alpha);
291
292 // The lateral fold: a Xtru
293 xvert[0] = sCageCoverXBaseExt / 2.;
294 yvert[0] = sCageCoverYBaseHeight + sCageCoverSheetThick;
295 xvert[1] = sCageCoverXWidth / 2.;
296 yvert[1] = yvert[0];
297 xvert[2] = xvert[1];
298 yvert[2] = sCageCoverYBaseHeight;
299 xvert[3] = sCageCoverXBaseInt / 2.;
300 yvert[3] = yvert[2];
301 xvert[4] = xvert[3];
302 yvert[4] = TMath::Sqrt(sCageCoverRint * sCageCoverRint - sCageCoverXBaseInt * sCageCoverXBaseInt / 4) + sCageCoverSheetThick;
303 xvert[5] = xvert[0];
304 yvert[5] = yvert[4];
305
306 TGeoXtru* fold = new TGeoXtru(2);
307 fold->SetName("coverFold");
308 fold->DefinePolygon(coverFoldNVert, xvert, yvert);
309 fold->DefineSection(0, -zlen);
310 fold->DefineSection(1, zlen);
311
312 // A BBox to cut away the curved portion above the fold
313 TGeoBBox* cutfold = new TGeoBBox("cutFold", xvert[1] - xvert[0], yvert[5] - yvert[1], 1.05 * zlen);
314
315 // Some matrices to create the composite shape
316 TGeoRotation* rotfold = new TGeoRotation("rotFold", 180, 180, 0);
317 rotfold->RegisterYourself();
318
319 TGeoTranslation* cutbox1 = new TGeoTranslation("cutBox1", xvert[1], yvert[5], 0);
320 cutbox1->RegisterYourself();
321
322 TGeoTranslation* cutbox2 = new TGeoTranslation("cutBox2", -xvert[1], yvert[5], 0);
323 cutbox2->RegisterYourself();
324
325 // The cover shape: a CompositeShape
326 TGeoCompositeShape* coverSh = new TGeoCompositeShape("coverSheet-cutFold:cutBox1-cutFold:cutBox2+coverFold+coverFold:rotFold");
327
328 // We have all shapes: now create the real volumes
329 TGeoMedium* medRohacell = mgr->GetMedium(Form("%s_ROHACELL$", GetDetName()));
330 TGeoMedium* medPrepreg = mgr->GetMedium(Form("%s_M46J6K$", GetDetName()));
331
332 TGeoVolume* coverVol = new TGeoVolume("CageCover", coverSh, medPrepreg);
333 coverVol->SetFillColor(kBlue);
334 coverVol->SetLineColor(kBlue);
335
336 TGeoVolume* coverCoreVol = new TGeoVolume("CageCoverCore", coreSh, medRohacell);
337 coverCoreVol->SetFillColor(kYellow);
338 coverCoreVol->SetLineColor(kYellow);
339
340 coverVol->AddNode(coverCoreVol, 1, nullptr);
341
342 // Finally return the cover volume
343 return coverVol;
344}
345
346TGeoVolume* V3Cage::createCageCoverRib(const TGeoManager* mgr)
347{
348 //
349 // Creates a Cage cover rib element (from drawing ALIITSUP0228)
350 //
351 // Input:
352 // mgr : the GeoManager (used only to get the proper material)
353 //
354 // Output:
355 //
356 // Return:
357 // The cover rib as a TGeoVolume
358 //
359 // Created: 22 Apr 2022 Mario Sitta
360 //
361
362 // Local variables
363 static const Int_t ribFoldNVert = 3;
364
365 Double_t xvert[ribFoldNVert], yvert[ribFoldNVert];
366 Double_t halfBase, zlen, alpha;
367
368 zlen = 0.5 * sCageCoverRibZLength;
369
370 // The rib main segment: a TGeoTubeSeg
371 halfBase = 0.5 * sCageCoverRibXBaseInt;
372 alpha = TMath::ACos(halfBase / sCageCoverRibRint) * TMath::RadToDeg();
373 TGeoTubeSeg* mainSh = new TGeoTubeSeg("coverRibMain", sCageCoverRibRint, sCageCoverRibRext, zlen, alpha, 180. - alpha);
374
375 // The lateral fold: a Xtru
376 xvert[0] = sCageCoverRibXWidth / 2.;
377 yvert[0] = sCageCoverRibYBaseHi;
378 xvert[1] = sCageCoverRibXBaseInt / 2.;
379 yvert[1] = yvert[0];
380 xvert[2] = xvert[1];
381 yvert[2] = yvert[1] + sCageCoverRibFoldHi;
382
383 TGeoXtru* fold = new TGeoXtru(2);
384 fold->SetName("coverRibFold");
385 fold->DefinePolygon(ribFoldNVert, xvert, yvert);
386 fold->DefineSection(0, -zlen);
387 fold->DefineSection(1, zlen);
388
389 // Some matrices to create the composite shape
390 TGeoRotation* rotfold = new TGeoRotation("rotRibFold", 180, 180, 0);
391 rotfold->RegisterYourself();
392
393 // The cover rib shape: a CompositeShape
394 TGeoCompositeShape* ribSh = new TGeoCompositeShape("coverRibMain+coverRibFold+coverRibFold:rotRibFold");
395
396 // We have all shapes: now create the real volume
397 TGeoMedium* medAl = mgr->GetMedium(Form("%s_ALUMINUM$", GetDetName()));
398
399 TGeoVolume* ribVol = new TGeoVolume("CageCoverRib", ribSh, medAl);
400 ribVol->SetFillColor(kGray);
401 ribVol->SetLineColor(kGray);
402
403 // Finally return the cover rib volume
404 return ribVol;
405}
406
407TGeoVolume* V3Cage::createCageSidePanel(const TGeoManager* mgr)
408{
409 //
410 // Creates the Cage Side Panel (from drawings ALIITSUP0247, ALIITSUP0248,
411 // ALIITSUP0243, ALIITSUP0244, ALIITSUP0280, ALIITSUP0245)
412 //
413 // Input:
414 // mgr : the GeoManager (used only to get the proper material)
415 //
416 // Output:
417 //
418 // Return:
419 // The side panel as a TGeoVolumeAssembly
420 //
421 // Created: 30 Sep 2022 Mario Sitta
422 // Updated: 20 May 2023 Mario Sitta Mid and side bars added
423 //
424
425 // Local variables
426 Double_t xlen, ylen, zlen;
427 Double_t xpos, ypos, zpos;
428
429 // The TGeoVolumeAssembly holding all elements
430 TGeoVolumeAssembly* sidePanelVol = new TGeoVolumeAssembly("CageSidePanel");
431
432 // The inner foil: a TGeoCompositeShape
433 TGeoCompositeShape* inFoilSh = createCageSidePanelCoreFoil(sCageSidePanelFoilThick, "foil");
434
435 // The outer foil: a BBox (each)
436 xlen = sCageSidePanelFoilThick / 2;
437 ylen = sCageSidePanelWidth / 2;
438 zlen = sCageSidePanelLength / 2;
439 TGeoBBox* outFoilSh = new TGeoBBox(xlen, ylen, zlen);
440
441 // The intermediate core layer: a TGeoCompositeShape
442 TGeoCompositeShape* coreSh = createCageSidePanelCoreFoil(sCageSidePanelCoreThick, "core");
443
444 // The longest rails
445 TGeoCompositeShape* rail1Sh = createCageSidePanelRail(sCageSidePanelRail1Len, 1);
446
447 // The intermediate rails
448 TGeoCompositeShape* rail2Sh = createCageSidePanelRail(sCageSidePanelRail2Len, 2);
449
450 // The shortest rails
451 TGeoCompositeShape* rail3Sh = createCageSidePanelRail(sCageSidePanelRail3Len, 3);
452
453 // The middle bar: a BBox
454 xlen = sCageSidePanelCoreThick / 2;
455 ylen = sCageSidePanelMidBarWid / 2;
456 zlen = (sCageSidePanelLength - sCageSidePanelRail3Len - sCageSidePanelSidBarWid) / 2;
457 TGeoBBox* midBarSh = new TGeoBBox(xlen, ylen, zlen);
458
459 // The side bar: a BBox
460 xlen = sCageSidePanelCoreThick / 2;
461 ylen = sCageSidePanelWidth / 2;
462 zlen = sCageSidePanelSidBarWid / 2;
463 TGeoBBox* sidBarSh = new TGeoBBox(xlen, ylen, zlen);
464
465 // The elements of the guide:
466 // - the vertical part: a BBox
467 xlen = sCageSidePanelGuidThik2 / 2;
468 ylen = sCageSidePanelGuideInHi / 2;
469 zlen = sCageSidePanelGuideLen / 2;
470 TGeoBBox* guideVert = new TGeoBBox(xlen, ylen, zlen);
471 guideVert->SetName("guidevert");
472
473 // - the horizontal part: a BBox
474 xlen = sCageSidePanelGuideWide / 2;
475 ylen = sCageSidePanelGuidThik1 / 2;
476 TGeoBBox* guideHor = new TGeoBBox(xlen, ylen, zlen);
477 guideHor->SetName("guidehor");
478
479 xpos = (sCageSidePanelGuideWide - sCageSidePanelGuidThik2) / 2;
480 ypos = (sCageSidePanelGuidThik1 + sCageSidePanelGuideInHi) / 2;
481 TGeoTranslation* guideHorMat1 = new TGeoTranslation(xpos, ypos, 0);
482 guideHorMat1->SetName("guidehormat1");
483 guideHorMat1->RegisterYourself();
484
485 TGeoTranslation* guideHorMat2 = new TGeoTranslation(xpos, -ypos, 0);
486 guideHorMat2->SetName("guidehormat2");
487 guideHorMat2->RegisterYourself();
488
489 // The actual guide: a CompositeShape
490 TGeoCompositeShape* guideSh = new TGeoCompositeShape("guidevert+guidehor:guidehormat1+guidehor:guidehormat2");
491
492 // We have all shapes: now create the real volume
493 TGeoMedium* medFabric = mgr->GetMedium(Form("%s_M46J6K$", GetDetName()));
494 TGeoMedium* medFoam = mgr->GetMedium(Form("%s_ROHACELL$", GetDetName()));
495 TGeoMedium* medAlAlloy = mgr->GetMedium(Form("%s_ENAW7075$", GetDetName()));
496
497 TGeoVolume* inFoilVol = new TGeoVolume("CageSidePanelInFoil", inFoilSh, medFabric);
498 inFoilVol->SetFillColor(kBlue);
499 inFoilVol->SetLineColor(kBlue);
500
501 TGeoVolume* outFoilVol = new TGeoVolume("CageSidePanelOutFoil", outFoilSh, medFabric);
502 outFoilVol->SetFillColor(kBlue);
503 outFoilVol->SetLineColor(kBlue);
504
505 TGeoVolume* coreVol = new TGeoVolume("CageSidePanelCore", coreSh, medFoam);
506 coreVol->SetFillColor(kYellow);
507 coreVol->SetLineColor(kYellow);
508
509 TGeoVolume* rail1Vol = new TGeoVolume("CageSidePanelRail1st", rail1Sh, medAlAlloy);
510 rail1Vol->SetFillColor(kGray);
511 rail1Vol->SetLineColor(kGray);
512
513 TGeoVolume* rail2Vol = new TGeoVolume("CageSidePanelRail2nd", rail2Sh, medAlAlloy);
514 rail2Vol->SetFillColor(kGray);
515 rail2Vol->SetLineColor(kGray);
516
517 TGeoVolume* rail3Vol = new TGeoVolume("CageSidePanelRail3rd", rail3Sh, medAlAlloy);
518 rail3Vol->SetFillColor(kGray);
519 rail3Vol->SetLineColor(kGray);
520
521 TGeoVolume* midBarVol = new TGeoVolume("CageSidePanelMiddleBar", midBarSh, medAlAlloy);
522 midBarVol->SetFillColor(kGray);
523 midBarVol->SetLineColor(kGray);
524
525 TGeoVolume* sidBarVol = new TGeoVolume("CageSidePanelSideBar", sidBarSh, medAlAlloy);
526 sidBarVol->SetFillColor(kGray);
527 sidBarVol->SetLineColor(kGray);
528
529 TGeoVolume* guideVol = new TGeoVolume("CageSidePanelGuide", guideSh, medFabric);
530 guideVol->SetFillColor(kViolet);
531 guideVol->SetLineColor(kViolet);
532
533 // Then build up the panel
534 sidePanelVol->AddNode(coreVol, 1, nullptr);
535
536 xpos = (sCageSidePanelCoreThick + sCageSidePanelFoilThick) / 2;
537 sidePanelVol->AddNode(inFoilVol, 1, new TGeoTranslation(-xpos, 0, 0));
538 sidePanelVol->AddNode(outFoilVol, 1, new TGeoTranslation(xpos, 0, 0));
539
540 xpos = (sCageSidePanelCoreThick - sCageSidePanelRailVThik) / 2;
541 zpos = (sCageSidePanelLength - sCageSidePanelRail1Len) / 2;
542 for (Int_t j = 0; j < 2; j++) {
543 ypos = sCageSidePanelRail1Ypos[j];
544 sidePanelVol->AddNode(rail1Vol, j + 1, new TGeoTranslation(xpos, ypos, zpos));
545 sidePanelVol->AddNode(rail1Vol, j + 3, new TGeoTranslation(xpos, -ypos, zpos));
546 }
547
548 zpos = (sCageSidePanelLength - sCageSidePanelRail2Len) / 2;
549 ypos = sCageSidePanelRail2Ypos;
550 sidePanelVol->AddNode(rail2Vol, 1, new TGeoTranslation(xpos, ypos, zpos));
551 sidePanelVol->AddNode(rail2Vol, 2, new TGeoTranslation(xpos, -ypos, zpos));
552
553 zpos = (sCageSidePanelLength - sCageSidePanelRail3Len) / 2;
554 for (Int_t j = 0; j < 3; j++) {
555 ypos = sCageSidePanelRail3Ypos[j];
556 sidePanelVol->AddNode(rail3Vol, j + 1, new TGeoTranslation(xpos, ypos, zpos));
557 sidePanelVol->AddNode(rail3Vol, j + 4, new TGeoTranslation(xpos, -ypos, zpos));
558 }
559
560 zpos = sCageSidePanelLength / 2 - midBarSh->GetDZ() - sCageSidePanelSidBarWid;
561 sidePanelVol->AddNode(midBarVol, 1, new TGeoTranslation(0, 0, -zpos));
562
563 zpos = sCageSidePanelLength / 2 - sidBarSh->GetDZ();
564 sidePanelVol->AddNode(sidBarVol, 1, new TGeoTranslation(0, 0, -zpos));
565
566 xpos = sCageSidePanelCoreThick / 2 + sCageSidePanelFoilThick + sCageSidePanelGuidThik2 / 2;
567 zpos = (sCageSidePanelLength - sCageSidePanelGuideLen) / 2;
568 sidePanelVol->AddNode(guideVol, 1, new TGeoTranslation(xpos, 0, -zpos));
569
570 // Finally return the side panel volume
571 return sidePanelVol;
572}
573
574TGeoCompositeShape* V3Cage::createCageSidePanelCoreFoil(const Double_t xthick, const char* shpref)
575{
576 //
577 // Creates the shape of the core and the internal foil of the
578 // Cage Side Panel, which contain proper cuts to host the rails
579 //
580 // Input:
581 // xthick : the shape thickness along X
582 // shpref : prefix of the shape name
583 //
584 // Output:
585 //
586 // Return:
587 // The side panel core or foil as a TGeoCompositeShape
588 //
589 // Created: 07 Oct 2022 Mario Sitta
590 // Updated: 20 May 2023 Mario Sitta Mid and side bars added
591 //
592
593 // Local variables
594 Double_t xlen, ylen, zlen;
595 Double_t ypos, zpos;
596
597 // The main body: a BBox
598 xlen = xthick / 2;
599 ylen = sCageSidePanelWidth / 2;
600 zlen = sCageSidePanelLength / 2;
601 TGeoBBox* bodySh = new TGeoBBox(xlen, ylen, zlen);
602 bodySh->SetName(Form("%sbodyshape", shpref));
603
604 // The hole for the longest rails (approx): a BBox
605 xlen = 1.1 * xthick / 2;
606 ylen = sCageSidePanelRailWidth / 2;
607 zlen = sCageSidePanelRail1Len;
608 TGeoBBox* rail1Sh = new TGeoBBox(xlen, ylen, zlen);
609 rail1Sh->SetName(Form("%slongrail", shpref));
610
611 zpos = sCageSidePanelLength / 2;
612 TGeoTranslation* rail1Mat[4];
613 for (Int_t j = 0; j < 2; j++) {
614 ypos = sCageSidePanelRail1Ypos[j];
615 rail1Mat[j] = new TGeoTranslation(0, ypos, zpos);
616 rail1Mat[j]->SetName(Form("longrailmat%d", j));
617 rail1Mat[j]->RegisterYourself();
618 rail1Mat[j + 2] = new TGeoTranslation(0, -ypos, zpos);
619 rail1Mat[j + 2]->SetName(Form("longrailmat%d", j + 2));
620 rail1Mat[j + 2]->RegisterYourself();
621 }
622
623 // The hole for the intermediate rails (approx): a BBox
624 zlen = sCageSidePanelRail2Len;
625 TGeoBBox* rail2Sh = new TGeoBBox(xlen, ylen, zlen);
626 rail2Sh->SetName(Form("%smedrail", shpref));
627
628 ypos = sCageSidePanelRail2Ypos;
629 TGeoTranslation* rail2Mat[2];
630 rail2Mat[0] = new TGeoTranslation(0, ypos, zpos);
631 rail2Mat[0]->SetName("medrailmat0");
632 rail2Mat[0]->RegisterYourself();
633 rail2Mat[1] = new TGeoTranslation(0, -ypos, zpos);
634 rail2Mat[1]->SetName("medrailmat1");
635 rail2Mat[1]->RegisterYourself();
636
637 // The hole for the shortest rails (approx): a BBox
638 zlen = sCageSidePanelRail3Len;
639 TGeoBBox* rail3Sh = new TGeoBBox(xlen, ylen, zlen);
640 rail3Sh->SetName(Form("%sshortrail", shpref));
641
642 TGeoTranslation* rail3Mat[6];
643 for (Int_t j = 0; j < 3; j++) {
644 ypos = sCageSidePanelRail3Ypos[j];
645 rail3Mat[j] = new TGeoTranslation(0, ypos, zpos);
646 rail3Mat[j]->SetName(Form("shortrailmat%d", j));
647 rail3Mat[j]->RegisterYourself();
648 rail3Mat[j + 3] = new TGeoTranslation(0, -ypos, zpos);
649 rail3Mat[j + 3]->SetName(Form("shortrailmat%d", j + 3));
650 rail3Mat[j + 3]->RegisterYourself();
651 }
652
653 // The hole for the middle bar: a BBox
654 xlen = 1.1 * sCageSidePanelCoreThick / 2;
655 ylen = sCageSidePanelMidBarWid / 2;
656 zlen = (sCageSidePanelLength - sCageSidePanelRail3Len) / 2;
657 TGeoBBox* midBarHol = new TGeoBBox(xlen, ylen, zlen);
658 midBarHol->SetName("midbar");
659
660 zpos = sCageSidePanelRail3Len / 2;
661 TGeoTranslation* midBarMat = new TGeoTranslation(0, 0, -zpos);
662 midBarMat->SetName("midbarmat");
663 midBarMat->RegisterYourself();
664
665 // The hole for the side bar: a BBox
666 xlen = 1.1 * sCageSidePanelCoreThick / 2;
667 ylen = 1.1 * sCageSidePanelWidth / 2;
668 zlen = sCageSidePanelSidBarWid;
669 TGeoBBox* sidBarHol = new TGeoBBox(xlen, ylen, zlen);
670 sidBarHol->SetName("sidebar");
671
672 zpos = sCageSidePanelLength / 2;
673 TGeoTranslation* sidBarMat = new TGeoTranslation(0, 0, -zpos);
674 sidBarMat->SetName("sidebarmat");
675 sidBarMat->RegisterYourself();
676
677 // The actual shape: a CompositeShape
678 TString compoShape = Form("%sbodyshape", shpref);
679 for (Int_t j = 0; j < 4; j++) {
680 compoShape += Form("-%slongrail:longrailmat%d", shpref, j);
681 }
682 for (Int_t j = 0; j < 2; j++) {
683 compoShape += Form("-%smedrail:medrailmat%d", shpref, j);
684 }
685 for (Int_t j = 0; j < 6; j++) {
686 compoShape += Form("-%sshortrail:shortrailmat%d", shpref, j);
687 }
688
689 // The mid and side bar holes are present only in the core shape
690 if (strcmp(shpref, "core") == 0) {
691 compoShape += "-midbar:midbarmat-sidebar:sidebarmat";
692 }
693
694 TGeoCompositeShape* corefoilSh = new TGeoCompositeShape(compoShape);
695
696 // Now return the shape
697 return corefoilSh;
698}
699
700TGeoCompositeShape* V3Cage::createCageSidePanelRail(const Double_t zlength, const Int_t index)
701{
702 //
703 // Creates the shape of a Cage Side Panel rail
704 // (slightly approximated as a linear structure)
705 //
706 // Input:
707 // zlength : the rail length along Z
708 // index : an integer to distinguish subvolume names
709 //
710 // Output:
711 //
712 // Return:
713 // The side panel rail as a TGeoCompositeShape
714 //
715 // Created: 08 Oct 2022 Mario Sitta
716 //
717
718 // Local variables
719 Double_t xlen, ylen;
720 Double_t xpos, ypos;
721
722 // The elements of the rail:
723 // - the vertical part: a BBox
724 xlen = sCageSidePanelRailVThik / 2;
725 ylen = (sCageSidePanelRailWidth - 2 * sCageSidePanelRailHThik) / 2;
726 TGeoBBox* railVert = new TGeoBBox(xlen, ylen, zlength / 2);
727 railVert->SetName(Form("railvert%d", index));
728
729 // - the horizontal part: a BBox
730 xlen = sCageSidePanelRailSpan / 2;
731 ylen = sCageSidePanelRailHThik / 2;
732 TGeoBBox* railHor = new TGeoBBox(xlen, ylen, zlength / 2);
733 railHor->SetName(Form("railhor%d", index));
734
735 // The relative matrices
736 xpos = (sCageSidePanelRailVThik - sCageSidePanelRailSpan) / 2;
737 ypos = (sCageSidePanelRailWidth - sCageSidePanelRailHThik) / 2;
738 TGeoTranslation* railHorMat1 = new TGeoTranslation(xpos, ypos, 0);
739 railHorMat1->SetName("railhormat1");
740 railHorMat1->RegisterYourself();
741
742 TGeoTranslation* railHorMat2 = new TGeoTranslation(xpos, -ypos, 0);
743 railHorMat2->SetName("railhormat2");
744 railHorMat2->RegisterYourself();
745
746 // The actual guide: a CompositeShape
747 TString compoShape = Form("railvert%d", index);
748 compoShape += Form("+railhor%d:railhormat1", index);
749 compoShape += Form("+railhor%d:railhormat2", index);
750
751 TGeoCompositeShape* railSh = new TGeoCompositeShape(compoShape);
752
753 // Now return the shape
754 return railSh;
755}
756
757TGeoVolume* V3Cage::createCageEndCap(const TGeoManager* mgr)
758{
759 //
760 // Creates the Cage End Cap (from drawings ALIITSUP0235, ALIITSUP0229)
761 //
762 // Input:
763 // mgr : the GeoManager (used only to get the proper material)
764 //
765 // Output:
766 //
767 // Return:
768 // The end cap as a TGeoVolumeAssembly
769 //
770 // Created: 30 Jun 2022 Mario Sitta
771 //
772
773 // Local variables
774 Double_t rmin, rmid, rmax;
775 Double_t xlen, ylen, zlen;
776 Double_t xpos, ypos, zpos;
777
778 // The TGeoVolumeAssembly holding all elements
779 TGeoVolumeAssembly* endCapVol = new TGeoVolumeAssembly("CageEndCap");
780
781 // The basic fabric disk: a Tube
782 rmin = sCageEndCapDint / 2;
783 rmax = sCageEndCapDext / 2;
784 zlen = sCageEndCapFabThick / 2;
785
786 TGeoTube* baseFabric = new TGeoTube(rmin, rmax, zlen);
787 baseFabric->SetName("endCapBaseFabric");
788
789 // The basic foam disk: a Tube
790 zlen = sCageEndCapFoamThick / 2;
791
792 TGeoTube* baseFoam = new TGeoTube(rmin, rmax, zlen);
793 baseFoam->SetName("endCapBaseFoam");
794
795 // Common cut-out shapes
796 xlen = (sCageEndCapDext - sCageEndCapXWidth) / 2;
797 ylen = 0.6 * rmax;
798
799 TGeoBBox* sideCut = new TGeoBBox(xlen, ylen, 2 * zlen);
800 sideCut->SetName("endCapBoxCut");
801
802 TGeoTube* sideHole = new TGeoTube(0, sCageEndCapSideHoleR, 2 * zlen);
803 sideHole->SetName("endCapSideHole");
804
805 xlen = sCageEndCapCableCutWid / 2;
806 ylen = rmax - sCageEndCapCableCutR;
807
808 TGeoBBox* cableCut = new TGeoBBox(xlen, ylen, 2 * zlen);
809 cableCut->SetName("endCapCableCut");
810
811 // Some matrices to create the composite shapes
812 xpos = rmax;
813
814 TGeoTranslation* boxCutTr1 = new TGeoTranslation("boxCutTr1", xpos, 0, 0);
815 boxCutTr1->RegisterYourself();
816
817 TGeoTranslation* boxCutTr2 = new TGeoTranslation("boxCutTr2", -xpos, 0, 0);
818 boxCutTr2->RegisterYourself();
819
820 xpos = sCageEndCapSideHoleX / 2;
821
822 TGeoTranslation* sidHolTr1 = new TGeoTranslation("sideHoleTr1", xpos, 0, 0);
823 sidHolTr1->RegisterYourself();
824
825 TGeoTranslation* sidHolTr2 = new TGeoTranslation("sideHoleTr2", -xpos, 0, 0);
826 sidHolTr2->RegisterYourself();
827
828 xpos = rmax * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
829 ypos = rmax * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad());
830
831 TGeoCombiTrans* cableMat1 = new TGeoCombiTrans(xpos, ypos, 0, new TGeoRotation("", -sCageEndCapCableCutPhi, 0, 0));
832 cableMat1->SetName("cableMat1");
833 cableMat1->RegisterYourself();
834
835 TGeoCombiTrans* cableMat2 = new TGeoCombiTrans(-xpos, ypos, 0, new TGeoRotation("", sCageEndCapCableCutPhi, 0, 0));
836 cableMat2->SetName("cableMat2");
837 cableMat2->RegisterYourself();
838
839 TGeoCombiTrans* cableMat3 = new TGeoCombiTrans(xpos, -ypos, 0, new TGeoRotation("", -180 + sCageEndCapCableCutPhi, 0, 0));
840 cableMat3->SetName("cableMat3");
841 cableMat3->RegisterYourself();
842
843 TGeoCombiTrans* cableMat4 = new TGeoCombiTrans(-xpos, -ypos, 0, new TGeoRotation("", 180 - sCageEndCapCableCutPhi, 0, 0));
844 cableMat4->SetName("cableMat4");
845 cableMat4->RegisterYourself();
846
847 // The external fabric panel (each): a CompositeShape
848 TGeoCompositeShape* fabricSh = new TGeoCompositeShape("endCapBaseFabric-endCapBoxCut:boxCutTr1-endCapBoxCut:boxCutTr2-endCapSideHole:sideHoleTr1-endCapSideHole:sideHoleTr2-endCapCableCut:cableMat1-endCapCableCut:cableMat2-endCapCableCut:cableMat3-endCapCableCut:cableMat4");
849
850 // The internal foam panel: a CompositeShape
851 TGeoCompositeShape* foamSh = new TGeoCompositeShape("endCapBaseFoam-endCapBoxCut:boxCutTr1-endCapBoxCut:boxCutTr2-endCapSideHole:sideHoleTr1-endCapSideHole:sideHoleTr2-endCapCableCut:cableMat1-endCapCableCut:cableMat2-endCapCableCut:cableMat3-endCapCableCut:cableMat4");
852
853 // The round crossing ring: a Pcon (ALIITSUP0281)
854 // (in real world it is made of two rimmed rings placed face-to-face;
855 // for simplicity and to spare volumes it is implemented as a single
856 // Pcon encompassing both rings as mounted in the final setup)
857 TGeoPcon* rndCrosSh = new TGeoPcon(0, 360, 6);
858
859 rmin = sCageECRoundCrossDmin / 2;
860 rmid = sCageECRoundCrossDmid / 2;
861 rmax = sCageECRoundCrossDmax / 2;
862
863 rndCrosSh->DefineSection(0, -sCageECRoundCrossZext, rmin, rmax);
864 rndCrosSh->DefineSection(1, -sCageECRoundCrossZint, rmin, rmax);
865 rndCrosSh->DefineSection(2, -sCageECRoundCrossZint, rmin, rmid);
866 rndCrosSh->DefineSection(3, sCageECRoundCrossZint, rmin, rmid);
867 rndCrosSh->DefineSection(4, sCageECRoundCrossZint, rmin, rmax);
868 rndCrosSh->DefineSection(5, sCageECRoundCrossZext, rmin, rmax);
869
870 // The (weirdly shaped) cable crossing: a CompositeShape
871 TGeoCompositeShape* cblCrosSh = createCageEndCapCableCross(mgr);
872
873 // We have all shapes: now create the real volume
874 TGeoMedium* medFabric = mgr->GetMedium(Form("%s_M46J6K$", GetDetName()));
875 TGeoMedium* medFoam = mgr->GetMedium(Form("%s_ROHACELL$", GetDetName()));
876 TGeoMedium* medAl = mgr->GetMedium(Form("%s_ALUMINUM$", GetDetName()));
877
878 TGeoVolume* fabVol = new TGeoVolume("CageEndCapFabric", fabricSh, medFabric);
879 fabVol->SetFillColor(kBlue);
880 fabVol->SetLineColor(kBlue);
881
882 TGeoVolume* foamVol = new TGeoVolume("CageEndCapFoam", foamSh, medFoam);
883 foamVol->SetFillColor(kYellow);
884 foamVol->SetLineColor(kYellow);
885
886 TGeoVolume* rndCrosVol = new TGeoVolume("CageEndCapRoundCross", rndCrosSh, medAl);
887 rndCrosVol->SetFillColor(kGray);
888 rndCrosVol->SetLineColor(kGray);
889
890 TGeoVolume* cblCrosVol = new TGeoVolume("CageEndCapCableCross", cblCrosSh, medAl);
891 cblCrosVol->SetFillColor(kGray);
892 cblCrosVol->SetLineColor(kGray);
893
894 // Then build up the end cap
895 endCapVol->AddNode(foamVol, 1, nullptr);
896
897 zpos = (sCageEndCapFoamThick + sCageEndCapFabThick) / 2;
898 endCapVol->AddNode(fabVol, 1, new TGeoTranslation(0, 0, zpos));
899 endCapVol->AddNode(fabVol, 2, new TGeoTranslation(0, 0, -zpos));
900
901 endCapVol->AddNode(rndCrosVol, 1, nullptr);
902
903 rmax = sCageEndCapDext / 2 - sCageECCableCrosTotHi;
904 xpos = rmax * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
905 ypos = rmax * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad());
906 endCapVol->AddNode(cblCrosVol, 1, new TGeoCombiTrans(xpos, ypos, 0, new TGeoRotation("", -sCageEndCapCableCutPhi, 0, 0)));
907 endCapVol->AddNode(cblCrosVol, 2, new TGeoCombiTrans(-xpos, ypos, 0, new TGeoRotation("", sCageEndCapCableCutPhi, 0, 0)));
908 endCapVol->AddNode(cblCrosVol, 3, new TGeoCombiTrans(xpos, -ypos, 0, new TGeoRotation("", -180 + sCageEndCapCableCutPhi, 0, 0)));
909 endCapVol->AddNode(cblCrosVol, 4, new TGeoCombiTrans(-xpos, -ypos, 0, new TGeoRotation("", 180 - sCageEndCapCableCutPhi, 0, 0)));
910
911 // Finally return the end cap volume
912 return endCapVol;
913}
914
915TGeoCompositeShape* V3Cage::createCageEndCapCableCross(const TGeoManager* mgr)
916{
917 //
918 // Creates the Cable Crossing frame for the Cage End Cap (ALIITSUP0282)
919 // Since it is pretty cumbersome, we create it in a separate method
920 //
921 // Input:
922 // mgr : the GeoManager (used only to get the proper material)
923 //
924 // Output:
925 //
926 // Return:
927 // The cable crossing frame as a TGeoCompositeShape
928 //
929 // Created: 01 Jul 2022 Mario Sitta
930 //
931
932 // Local variables
933 Double_t rmin, rmid, rmax;
934 Double_t xlen, ylen, zlen;
935 Double_t xpos, ypos, zpos;
936
937 // The string holding the complex crossing cable structure
938 TString crossShape = "";
939
940 // The inner lower part: a BBox and its matrix
941 xlen = sCageECCableCrosInXWid / 2;
942 ylen = sCageECCableCrosInThik / 2;
943 zlen = sCageECCableCrosInZLen / 2;
944 TGeoBBox* cabCrosLow = new TGeoBBox(xlen, ylen, zlen);
945 cabCrosLow->SetName("CabCrosLow");
946
947 TGeoTranslation* matCrosLow = new TGeoTranslation("MatCrosLow", 0, ylen, 0);
948 matCrosLow->RegisterYourself();
949
950 crossShape = "CabCrosLow:MatCrosLow";
951
952 // The side wall of lower part: a BBox and its two matrices
953 xlen = (sCageECCableCrosInXWid + 2 * (sCageECCableCrosSidWid - sCageECCableCrosInThik)) / 2;
954 ylen = sCageECCableCrosSidWid / 2;
955 zlen = (sCageECCableCrosTotZ - sCageECCableCrosInZLen) / 4; // We have 2 sides
956 TGeoBBox* cabCrosSide = new TGeoBBox(xlen, ylen, zlen);
957 cabCrosSide->SetName("CabCrosSide");
958
959 ypos = 2 * cabCrosLow->GetDY() - cabCrosSide->GetDY();
960 zpos = cabCrosLow->GetDZ() + cabCrosSide->GetDZ();
961 TGeoTranslation* matCrosSid1 = new TGeoTranslation("MatCrosSid1", 0, ypos, zpos);
962 matCrosSid1->RegisterYourself();
963 TGeoTranslation* matCrosSid2 = new TGeoTranslation("MatCrosSid2", 0, ypos, -zpos);
964 matCrosSid2->RegisterYourself();
965
966 crossShape += "+CabCrosSide:MatCrosSid1+CabCrosSide:MatCrosSid2";
967
968 // The inner lateral part: a BBox and its two matrices
969 // (in blueprint the lateral height is not specified, we have to compute it)
970 rmax = sCageEndCapDext / 2;
971 xlen = sCageECCableCrosInXWid / 2;
972
973 Double_t apothem = TMath::Sqrt(rmax * rmax - xlen * xlen);
974 Double_t sagitta = rmax - apothem;
975
976 xlen = sCageECCableCrosInThik / 2;
977 ylen = (sCageECCableCrosTotHi - sagitta - sCageECCableCrosInThik) / 2;
978 zlen = sCageECCableCrosInZLen / 2;
979 TGeoBBox* cabCrosLat = new TGeoBBox(xlen, ylen, zlen);
980 cabCrosLat->SetName("CabCrosLateral");
981
982 xpos = 0.5 * sCageECCableCrosInXWid - cabCrosLat->GetDX();
983 ypos = cabCrosLat->GetDY() + sCageECCableCrosInThik;
984 TGeoTranslation* matCrosLat1 = new TGeoTranslation("MatCrosLat1", xpos, ypos, 0);
985 matCrosLat1->RegisterYourself();
986 TGeoTranslation* matCrosLat2 = new TGeoTranslation("MatCrosLat2", -xpos, ypos, 0);
987 matCrosLat2->RegisterYourself();
988
989 crossShape += "+CabCrosLateral:MatCrosLat1+CabCrosLateral:MatCrosLat2";
990
991 // The side wall of lateral part: a BBox and its four matrices
992 xlen = sCageECCableCrosSidWid / 2;
993 zlen = cabCrosSide->GetDZ();
994 TGeoBBox* cabCrosLatSide = new TGeoBBox(xlen, ylen, zlen);
995 cabCrosLatSide->SetName("CabCrosLatSide");
996
997 xpos = cabCrosSide->GetDX() - cabCrosLatSide->GetDX();
998 zpos = cabCrosLat->GetDZ() + cabCrosLatSide->GetDZ();
999 TGeoTranslation* matCrosLatSid1 = new TGeoTranslation("MatCrosLatSid1", xpos, ypos, zpos);
1000 matCrosLatSid1->RegisterYourself();
1001 TGeoTranslation* matCrosLatSid2 = new TGeoTranslation("MatCrosLatSid2", xpos, ypos, -zpos);
1002 matCrosLatSid2->RegisterYourself();
1003 TGeoTranslation* matCrosLatSid3 = new TGeoTranslation("MatCrosLatSid3", -xpos, ypos, zpos);
1004 matCrosLatSid3->RegisterYourself();
1005 TGeoTranslation* matCrosLatSid4 = new TGeoTranslation("MatCrosLatSid4", -xpos, ypos, -zpos);
1006 matCrosLatSid4->RegisterYourself();
1007
1008 crossShape += "+CabCrosLatSide:MatCrosLatSid1+CabCrosLatSide:MatCrosLatSid2+CabCrosLatSide:MatCrosLatSid3+CabCrosLatSide:MatCrosLatSid4";
1009
1010 // The top rounded part: a TubeSeg and its matrix
1011 xlen = sCageECCableCrosInXWid / 2;
1012 Double_t phi = TMath::ASin(xlen / rmax) * TMath::RadToDeg();
1013 rmin = rmax - sCageECCableCrosSidWid;
1014 zlen = sCageECCableCrosTotZ / 2;
1015 TGeoTubeSeg* cabCrosRnd = new TGeoTubeSeg(rmin, rmax, zlen, 90 - phi, 90 + phi);
1016 cabCrosRnd->SetName("CabCrosRoundTop");
1017
1018 ypos = -rmax + sCageECCableCrosTotHi;
1019 TGeoTranslation* matCrosRnd = new TGeoTranslation("MatCrosRound", 0, ypos, 0);
1020 matCrosRnd->RegisterYourself();
1021
1022 crossShape += "+CabCrosRoundTop:MatCrosRound";
1023
1024 // Finally create and return the cable crossing shape
1025 // (the origin of its reference system is below the lower face of cabCrosLow)
1026 TGeoCompositeShape* cableCross = new TGeoCompositeShape(crossShape.Data());
1027
1028 return cableCross;
1029}
1030
1031TGeoVolume* V3Cage::createBeamPipeSupport(const TGeoManager* mgr)
1032{
1033 //
1034 // Creates the Beam Pipe Support inside the Cage on the A side
1035 // (from drawings ALIITSUP1064, ALIITSUP1059, ALIITSUP1057, ALIITSUP1058,
1036 // ALIITSUP1056, ALIITSUP0823, ALIITSUP0273, ALIITSUP1060, ALIITSUP1062)
1037 //
1038 // Input:
1039 // mgr : the GeoManager (used only to get the proper material)
1040 //
1041 // Output:
1042 //
1043 // Return:
1044 // The beam pipe support as a TGeoVolumeAssembly
1045 //
1046 // Created: 03 Jun 2023 Mario Sitta
1047 //
1048
1049 // Local variables
1050 const Int_t nv = 8;
1051 Double_t xv[nv], yv[nv];
1052 Double_t xpos, ypos, zpos;
1053
1054 // The TGeoVolumeAssembly holding all elements
1055 TGeoVolumeAssembly* bpSuppVol = new TGeoVolumeAssembly("CageBeamPipeSupport");
1056
1057 // The lower collar
1058 TGeoCompositeShape* lowCollarSh = createBPSuppLowerCollar();
1059
1060 // The upper collar
1061 TGeoCompositeShape* upCollarSh = createBPSuppUpperCollar();
1062
1063 // Each one of the collar beams
1064 TGeoCompositeShape* collarBeamSh = createBPSuppCollarBeam();
1065
1066 // Each one of the lateral brackets
1067 TGeoCompositeShape* bracketSh = createBPSuppBracket();
1068
1069 // Each one of the lateral clamps
1070 TGeoCompositeShape* clampSh = createBPSuppClamp();
1071
1072 // The Vespel bushing: a Tube
1073 TGeoTube* bushSh = new TGeoTube(0.5 * sBPSuppCollarBushD, 0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppBracketWidth);
1074
1075 // The clamp shim: a BBox
1076 TGeoBBox* shimSh = new TGeoBBox(0.5 * sBPSuppClampShimWid, 0.5 * sBPSuppClampShimThick, 0.5 * sBPSuppClampShimLen);
1077
1078 // The M4 screw head: a Tube
1079 TGeoTube* m4ScrewSh = new TGeoTube(0, 0.5 * sBPSuppCollarM4Diam, 0.5 * sBPSuppCollarM4High);
1080
1081 // The M5 screw head: a Tube
1082 TGeoTube* m5ScrewSh = new TGeoTube(0, 0.5 * sBPSuppClampM5Diam, 0.5 * sBPSuppClampM5High);
1083
1084 // The threaded insert head: a Cone
1085 TGeoCone* insHeadSh = new TGeoCone(0.5 * sBPSuppClampInsH, 0, 0.5 * sBPSuppClampInsDmin, 0, 0.5 * sBPSuppClampInsDmax);
1086
1087 // We have all the shapes: now create the real volumes
1088 TGeoMedium* medCFRP = mgr->GetMedium(Form("%s_CFRP$", GetDetName()));
1089 TGeoMedium* medTitanium = mgr->GetMedium(Form("%s_TITANIUM$", GetDetName()));
1090 TGeoMedium* medSteel = mgr->GetMedium(Form("%s_INOX304$", GetDetName()));
1091 TGeoMedium* medBrass = mgr->GetMedium(Form("%s_BRASS$", GetDetName()));
1092 TGeoMedium* medVespel = mgr->GetMedium(Form("%s_VESPEL$", GetDetName()));
1093
1094 Color_t kTitanium = kGray + 1; // Darker gray
1095
1096 TGeoVolume* lowCollarVol = new TGeoVolume("BPSupportLowerCollar", lowCollarSh, medTitanium);
1097 lowCollarVol->SetFillColor(kTitanium);
1098 lowCollarVol->SetLineColor(kTitanium);
1099
1100 TGeoVolume* upCollarVol = new TGeoVolume("BPSupportUpperCollar", upCollarSh, medTitanium);
1101 upCollarVol->SetFillColor(kTitanium);
1102 upCollarVol->SetLineColor(kTitanium);
1103
1104 TGeoVolume* bushVol = new TGeoVolume("BPSupportCollarBushing", bushSh, medVespel);
1105 bushVol->SetFillColor(kGreen);
1106 bushVol->SetLineColor(kGreen);
1107
1108 TGeoVolume* collarBeamVol = new TGeoVolume("BPSupportCollarBeam", collarBeamSh, medCFRP);
1109 collarBeamVol->SetFillColor(kBlue);
1110 collarBeamVol->SetLineColor(kBlue);
1111
1112 TGeoVolume* bracketVol = new TGeoVolume("BPSupportBracket", bracketSh, medTitanium);
1113 bracketVol->SetFillColor(kTitanium);
1114 bracketVol->SetLineColor(kTitanium);
1115
1116 TGeoVolume* clampVol = new TGeoVolume("BPSupportClamp", clampSh, medTitanium);
1117 clampVol->SetFillColor(kTitanium);
1118 clampVol->SetLineColor(kTitanium);
1119
1120 TGeoVolume* shimVol = new TGeoVolume("BPSupportClampShim", shimSh, medBrass);
1121 shimVol->SetFillColor(kOrange - 4); // Brownish
1122 shimVol->SetLineColor(kOrange - 4);
1123
1124 TGeoVolume* m4ScrewVol = new TGeoVolume("BPSupportCollarScrew", m4ScrewSh, medTitanium);
1125 m4ScrewVol->SetFillColor(kTitanium);
1126 m4ScrewVol->SetLineColor(kTitanium);
1127
1128 TGeoVolume* m5ScrewVol = new TGeoVolume("BPSupportClampScrew", m5ScrewSh, medSteel);
1129 m5ScrewVol->SetFillColor(kGray);
1130 m5ScrewVol->SetLineColor(kGray);
1131
1132 TGeoVolume* insHeadVol = new TGeoVolume("BPSupportClampInsert", insHeadSh, medSteel);
1133 insHeadVol->SetFillColor(kGray);
1134 insHeadVol->SetLineColor(kGray);
1135
1136 // Then build up the beam support
1137 bpSuppVol->AddNode(lowCollarVol, 1, nullptr);
1138
1139 ypos = sBPSuppLowCollTailHei / 2;
1140 bpSuppVol->AddNode(upCollarVol, 1, new TGeoTranslation(0, ypos, 0));
1141
1142 bpSuppVol->AddNode(bushVol, 1, new TGeoTranslation(0, ypos, 0));
1143
1144 xpos = sBPSuppCollarM4XDist / 2;
1145 ypos += (sBPSuppUpperCollarHei + m4ScrewSh->GetDz());
1146 zpos = sBPSuppCollarM4ZPos;
1147 bpSuppVol->AddNode(m4ScrewVol, 1, new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", 0, 90, 0)));
1148 bpSuppVol->AddNode(m4ScrewVol, 2, new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("", 0, 90, 0)));
1149 bpSuppVol->AddNode(m4ScrewVol, 3, new TGeoCombiTrans(xpos, ypos, -zpos, new TGeoRotation("", 0, 90, 0)));
1150 bpSuppVol->AddNode(m4ScrewVol, 4, new TGeoCombiTrans(-xpos, ypos, -zpos, new TGeoRotation("", 0, 90, 0)));
1151
1152 xpos = sBPSuppLowerCollarLen / 2 - sBPSuppBracketInLen + sBPSuppCollarBeamLen / 2;
1153 bpSuppVol->AddNode(collarBeamVol, 1, new TGeoCombiTrans(xpos, 0, 0, new TGeoRotation("", 0, 90, 0)));
1154 bpSuppVol->AddNode(collarBeamVol, 2, new TGeoCombiTrans(-xpos, 0, 0, new TGeoRotation("", 0, 90, 0)));
1155
1156 xpos += (sBPSuppCollarBeamLen / 2 - sBPSuppBracketInLen);
1157 bpSuppVol->AddNode(bracketVol, 1, new TGeoTranslation(xpos, 0, 0));
1158 bpSuppVol->AddNode(bracketVol, 2, new TGeoCombiTrans(-xpos, 0, 0, new TGeoRotation("", 90, 180, -90)));
1159
1160 xpos = 0.5 * sBPSuppClampsXDist - sBPSuppClampTotWid + shimSh->GetDX();
1161 ypos = -shimSh->GetDY();
1162 bpSuppVol->AddNode(shimVol, 1, new TGeoTranslation(xpos, ypos, 0));
1163 bpSuppVol->AddNode(shimVol, 2, new TGeoTranslation(-xpos, ypos, 0));
1164
1165 xpos = 0.5 * sBPSuppClampsXDist - sBPSuppClampLatThick;
1166 ypos -= shimSh->GetDY();
1167 bpSuppVol->AddNode(clampVol, 1, new TGeoTranslation(-xpos, ypos, 0));
1168 bpSuppVol->AddNode(clampVol, 2, new TGeoCombiTrans(xpos, ypos, 0, new TGeoRotation("", 90, 180, -90)));
1169
1170 xpos -= m5ScrewSh->GetDz();
1171 ypos += (0.5 * sBPSuppClampTotHei - sBPSuppClampShelfHei);
1172 zpos = sBPSuppClampM5ZPos;
1173 bpSuppVol->AddNode(m5ScrewVol, 1, new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", 90, 90, -90)));
1174 bpSuppVol->AddNode(m5ScrewVol, 2, new TGeoCombiTrans(xpos, ypos, -zpos, new TGeoRotation("", 90, 90, -90)));
1175 bpSuppVol->AddNode(m5ScrewVol, 3, new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("", 90, 90, -90)));
1176 bpSuppVol->AddNode(m5ScrewVol, 4, new TGeoCombiTrans(-xpos, ypos, -zpos, new TGeoRotation("", 90, 90, -90)));
1177
1178 xpos = 0.5 * sBPSuppClampsXDist - sBPSuppClampInsXPos;
1179 ypos = sBPSuppBracketTailHei + insHeadSh->GetDz();
1180 zpos = sBPSuppClampInsZPos;
1181 bpSuppVol->AddNode(insHeadVol, 1, new TGeoCombiTrans(xpos, ypos, zpos, new TGeoRotation("", 0, 90, 0)));
1182 bpSuppVol->AddNode(insHeadVol, 2, new TGeoCombiTrans(-xpos, ypos, zpos, new TGeoRotation("", 0, 90, 0)));
1183 bpSuppVol->AddNode(insHeadVol, 3, new TGeoCombiTrans(xpos, ypos, -zpos, new TGeoRotation("", 0, 90, 0)));
1184 bpSuppVol->AddNode(insHeadVol, 4, new TGeoCombiTrans(-xpos, ypos, -zpos, new TGeoRotation("", 0, 90, 0)));
1185
1186 // Finally return the beam pipe support volume
1187 return bpSuppVol;
1188}
1189
1190TGeoCompositeShape* V3Cage::createBPSuppLowerCollar()
1191{
1192 //
1193 // Creates the lower collar which actually supports the Beam Pipe
1194 // (ALIITSUP1056)
1195 //
1196 // Input:
1197 //
1198 // Output:
1199 //
1200 // Return:
1201 // The lower collar as a TGeoCompositeShape
1202 //
1203 // Created: 06 Jun 2023 Mario Sitta
1204 //
1205
1206 // Local variables
1207 const Int_t nv = 12;
1208 Double_t xv[nv], yv[nv], xy8[16];
1209 Double_t zlen;
1210 Double_t xpos, ypos;
1211
1212 // The lateral bracket: a Xtru
1213 Double_t totlen = (sBPSuppLowerCollarLen - sBPSuppCollarIntD) / 2;
1214 Double_t xtail = (sBPSuppLowCollHolDist - sBPSuppCollarIntD) / 2;
1215 Double_t taillen = sBPSuppLowerCollarTlX - sBPSuppCollarIntD / 2;
1216
1217 xv[0] = 0;
1218 yv[0] = -sBPSuppCollarBeamHei / 2;
1219 xv[1] = totlen - xtail;
1220 yv[1] = yv[0];
1221 xv[2] = totlen - taillen;
1222 yv[2] = -sBPSuppLowCollTailHei / 2;
1223 xv[3] = totlen;
1224 yv[3] = yv[2];
1225 xv[4] = xv[3];
1226 yv[4] = sBPSuppLowCollTailHei / 2;
1227 xv[5] = xv[2];
1228 yv[5] = yv[4];
1229 xv[6] = xv[1];
1230 yv[6] = -yv[1];
1231 xv[7] = xv[0];
1232 yv[7] = yv[6];
1233 xv[8] = xv[7];
1234 yv[8] = sBPSuppBracketInHei / 2;
1235 xv[9] = sBPSuppBracketInLen;
1236 yv[9] = yv[8];
1237 xv[10] = xv[9];
1238 yv[10] = -yv[9];
1239 xv[11] = xv[0];
1240 yv[11] = yv[10];
1241
1242 zlen = sBPSuppBracketWidth / 2;
1243 TGeoXtru* brktlat = new TGeoXtru(2);
1244 brktlat->DefinePolygon(nv, xv, yv);
1245 brktlat->DefineSection(0, -zlen);
1246 brktlat->DefineSection(1, zlen);
1247 brktlat->SetName("latBrackBody");
1248
1249 // The central hole in lateral bracket: a Tube
1250 zlen = sBPSuppBracketWidth / 2 + 0.001;
1251 TGeoTube* brktcenthole = new TGeoTube(0, sBPSuppBrktCentHoleD / 2, zlen);
1252 brktcenthole->SetName("latBrackCentHole");
1253
1254 xpos = totlen - xtail;
1255 TGeoTranslation* brktcenthmat = new TGeoTranslation(xpos, 0, 0);
1256 brktcenthmat->SetName("latCentHoleMat");
1257 brktcenthmat->RegisterYourself();
1258
1259 // The lateral hole in lateral bracket: an Arb8
1260 // (array of vertices is in the form (x0, y0, x1, y1, ..., x7, y7) )
1261 xy8[0] = 0;
1262 xy8[1] = 0;
1263 xy8[2] = -sBPSuppBrktLatHoleW;
1264 xy8[3] = -sBPSuppBrktLatHoleH / 2;
1265 xy8[4] = xy8[2];
1266 xy8[5] = -xy8[3];
1267 xy8[6] = xy8[0];
1268 xy8[7] = xy8[1];
1269 for (Int_t i = 0; i < 8; i++) { // The opposite face
1270 xy8[8 + i] = xy8[i];
1271 }
1272 TGeoArb8* brktlathole = new TGeoArb8(zlen, xy8);
1273 brktlathole->SetName("latBrackLatHole");
1274
1275 xpos = totlen - taillen;
1276 TGeoTranslation* brktlathmat = new TGeoTranslation(xpos, 0, 0);
1277 brktlathmat->SetName("latLatHoleMat");
1278 brktlathmat->RegisterYourself();
1279
1280 // The lateral bracket: a CompositeShape
1281 TGeoCompositeShape* latbrkt = new TGeoCompositeShape("latBrackBody-latBrackCentHole:latCentHoleMat-latBrackLatHole:latLatHoleMat");
1282 latbrkt->SetName("lateralBracket");
1283
1284 // The lateral bracket matrices
1285 xpos = sBPSuppLowerCollarLen / 2;
1286 TGeoTranslation* latmat1 = new TGeoTranslation(-xpos, 0, 0);
1287 latmat1->SetName("latBrackMat1");
1288 latmat1->RegisterYourself();
1289
1290 TGeoCombiTrans* latmat2 = new TGeoCombiTrans(xpos, 0, 0, new TGeoRotation("", 90, 180, -90));
1291 latmat2->SetName("latBrackMat2");
1292 latmat2->RegisterYourself();
1293
1294 // The collar: a TubeSeg
1295 TGeoTubeSeg* collar = new TGeoTubeSeg(0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppCollarExtD, 0.5 * sBPSuppBracketWidth, 180, 360);
1296 collar->SetName("lowerCollar");
1297
1298 ypos = brktlat->GetY(4); // The upper face of the tail
1299 TGeoTranslation* collmat = new TGeoTranslation(0, ypos, 0);
1300 collmat->SetName("lowerCollMat");
1301 collmat->RegisterYourself();
1302
1303 // Finally create and return the lower collar
1304 // (the origin of its reference system is at its center)
1305 TGeoCompositeShape* collarShape = new TGeoCompositeShape("lowerCollar:lowerCollMat+lateralBracket:latBrackMat1+lateralBracket:latBrackMat2");
1306
1307 return collarShape;
1308}
1309
1310TGeoCompositeShape* V3Cage::createBPSuppUpperCollar()
1311{
1312 //
1313 // Creates the upper collar of the Beam Pipe Support (ALIITSUP0823)
1314 //
1315 // Input:
1316 //
1317 // Output:
1318 //
1319 // Return:
1320 // The upper collar as a TGeoCompositeShape
1321 //
1322 // Created: 07 Jun 2023 Mario Sitta
1323 //
1324
1325 // Local variables
1326 Double_t xlen;
1327 Double_t xpos, ypos;
1328
1329 // The lateral plate: a BBox
1330 xlen = (sBPSuppUpperCollarLen - sBPSuppCollarIntD) / 2;
1331 TGeoBBox* plate = new TGeoBBox(0.5 * xlen, 0.5 * sBPSuppUpperCollarHei, 0.5 * sBPSuppBracketWidth);
1332 plate->SetName("lateralPlate");
1333
1334 xpos = sBPSuppUpperCollarLen / 2 - plate->GetDX();
1335 ypos = plate->GetDY();
1336 TGeoTranslation* latplmat1 = new TGeoTranslation(xpos, ypos, 0);
1337 latplmat1->SetName("lateralPlateMat1");
1338 latplmat1->RegisterYourself();
1339
1340 TGeoTranslation* latplmat2 = new TGeoTranslation(-xpos, ypos, 0);
1341 latplmat2->SetName("lateralPlateMat2");
1342 latplmat2->RegisterYourself();
1343
1344 // The collar: a TubeSeg
1345 TGeoTubeSeg* collar = new TGeoTubeSeg(0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppCollarExtD, 0.5 * sBPSuppBracketWidth, 0, 180);
1346 collar->SetName("upperCollar");
1347
1348 // Finally create and return the upper collar
1349 // (the origin of its reference system is at its center)
1350 TGeoCompositeShape* collarShape = new TGeoCompositeShape("upperCollar+lateralPlate:lateralPlateMat1+lateralPlate:lateralPlateMat2");
1351
1352 return collarShape;
1353}
1354
1355TGeoCompositeShape* V3Cage::createBPSuppCollarBeam()
1356{
1357 //
1358 // Creates the collar beam (i.e. the lateral support bar) of the
1359 // Beam Pipe Support (ALIITSUP1057)
1360 //
1361 // Input:
1362 //
1363 // Output:
1364 //
1365 // Return:
1366 // The collar beam as a TGeoCompositeShape
1367 //
1368 // Created: 03 Jun 2023 Mario Sitta
1369 //
1370
1371 // Local variables
1372 const Int_t nv = 8;
1373 Double_t xv[nv], yv[nv];
1374 Double_t xlen, xwid, ylen, zlen;
1375 Double_t xpos;
1376
1377 // The central part: a Xtru
1378 xlen = (sBPSuppCollarBeamLen - 2 * sBPSuppBracketInLen) / 2;
1379 xwid = (sBPSuppCollarBeamWid - sBPSuppBracketWidth) / 2;
1380 xv[0] = -xlen;
1381 yv[0] = -sBPSuppBracketWidth / 2;
1382 xv[1] = xv[0] + xwid;
1383 yv[1] = -sBPSuppCollarBeamWid / 2;
1384 xv[2] = -xv[1];
1385 yv[2] = yv[1];
1386 xv[3] = -xv[0];
1387 yv[3] = yv[0];
1388 for (Int_t i = 0; i < 4; i++) { // Reflect the lower half to the upper half
1389 xv[4 + i] = xv[3 - i];
1390 yv[4 + i] = -yv[3 - i];
1391 }
1392
1393 zlen = sBPSuppCollarBeamHei / 2;
1394 TGeoXtru* colcent = new TGeoXtru(2);
1395 colcent->SetName("collarCentral");
1396 colcent->DefinePolygon(nv, xv, yv);
1397 colcent->DefineSection(0, -zlen);
1398 colcent->DefineSection(1, zlen);
1399
1400 // Each bracket insert: a BBox
1401 xlen = sBPSuppBracketInLen / 2;
1402 ylen = sBPSuppBracketWidth / 2;
1403 zlen = sBPSuppBracketInHei / 2;
1404 TGeoBBox* colins = new TGeoBBox("collarInsert", xlen, ylen, zlen);
1405
1406 xpos = colcent->GetX(0) - colins->GetDX();
1407 TGeoTranslation* insmat1 = new TGeoTranslation(-xpos, 0, 0);
1408 insmat1->SetName("colInsMat1");
1409 insmat1->RegisterYourself();
1410
1411 TGeoTranslation* insmat2 = new TGeoTranslation(xpos, 0, 0);
1412 insmat2->SetName("colInsMat2");
1413 insmat2->RegisterYourself();
1414
1415 // Finally create and return the collar beam
1416 // (the origin of its reference system is at its center)
1417 TGeoCompositeShape* beamShape = new TGeoCompositeShape("collarCentral+collarInsert:colInsMat1+collarInsert:colInsMat2");
1418
1419 return beamShape;
1420}
1421
1422TGeoCompositeShape* V3Cage::createBPSuppBracket()
1423{
1424 //
1425 // Creates the lateral Titanium bracket of the Beam Pipe Support
1426 // (ALIITSUP1058)
1427 //
1428 // Input:
1429 //
1430 // Output:
1431 //
1432 // Return:
1433 // The bracket as a TGeoCompositeShape
1434 //
1435 // Created: 04 Jun 2023 Mario Sitta
1436 //
1437
1438 // Local variables
1439 const Int_t nv = 12;
1440 Double_t xv[nv], yv[nv];
1441 Double_t zlen;
1442 Double_t xpos;
1443
1444 // The main body: a Xtru
1445 xv[0] = 0;
1446 yv[0] = -sBPSuppCollarBeamHei / 2;
1447 xv[1] = sBPSuppBracketTotLen - sBPSuppBrktCentHoleX;
1448 yv[1] = yv[0];
1449 xv[2] = sBPSuppBracketTotLen - sBPSuppBracketTailLen;
1450 yv[2] = 0;
1451 xv[3] = sBPSuppBracketTotLen;
1452 yv[3] = yv[2];
1453 xv[4] = xv[3];
1454 yv[4] = sBPSuppBracketTailHei;
1455 xv[5] = xv[2];
1456 yv[5] = yv[4];
1457 xv[6] = xv[1];
1458 yv[6] = -yv[1];
1459 xv[7] = xv[0];
1460 yv[7] = yv[6];
1461 xv[8] = xv[7];
1462 yv[8] = sBPSuppBracketInHei / 2;
1463 xv[9] = sBPSuppBracketInLen;
1464 yv[9] = yv[8];
1465 xv[10] = xv[9];
1466 yv[10] = -yv[9];
1467 xv[11] = xv[0];
1468 yv[11] = yv[10];
1469
1470 zlen = sBPSuppBracketWidth / 2;
1471 TGeoXtru* brktbody = new TGeoXtru(2);
1472 brktbody->DefinePolygon(nv, xv, yv);
1473 brktbody->DefineSection(0, -zlen);
1474 brktbody->DefineSection(1, zlen);
1475 brktbody->SetName("bracketBody");
1476
1477 // The central hole: a Tube
1478 zlen = sBPSuppBracketWidth / 2 + 0.001;
1479 TGeoTube* brktcenthole = new TGeoTube(0, sBPSuppBrktCentHoleD / 2, zlen);
1480 brktcenthole->SetName("bracketCentHole");
1481
1482 xpos = sBPSuppBracketTotLen - sBPSuppBrktCentHoleX;
1483 TGeoTranslation* brktcenthmat = new TGeoTranslation(xpos, -sBPSuppBrktHolesY, 0);
1484 brktcenthmat->SetName("bracketCentHMat");
1485 brktcenthmat->RegisterYourself();
1486
1487 // The lateral hole: a Tube
1488 TGeoTube* brktlathole = new TGeoTube(0, sBPSuppBrktLatHoleD / 2, zlen);
1489 brktlathole->SetName("bracketLatHole");
1490
1491 xpos = sBPSuppBracketTotLen - sBPSuppBrktLatHoleX;
1492 TGeoTranslation* brktlathmat = new TGeoTranslation(xpos, sBPSuppBrktHolesY, 0);
1493 brktlathmat->SetName("bracketLatHMat");
1494 brktlathmat->RegisterYourself();
1495
1496 // Finally create and return the bracket
1497 // (the origin of its reference system is opposite to its tail)
1498 TGeoCompositeShape* bracketShape = new TGeoCompositeShape("bracketBody-bracketCentHole:bracketCentHMat-bracketLatHole:bracketLatHMat");
1499
1500 return bracketShape;
1501}
1502
1503TGeoCompositeShape* V3Cage::createBPSuppClamp()
1504{
1505 //
1506 // Creates the lateral Titanium clamp holding the Beam Pipe Support
1507 // to the ITS Cage (ALIITSUP1060)
1508 //
1509 // Input:
1510 //
1511 // Output:
1512 //
1513 // Return:
1514 // The clamp as a TGeoCompositeShape
1515 //
1516 // Created: 08 Jun 2023 Mario Sitta
1517 //
1518
1519 // Local variables
1520 Double_t xlen, ylen, zlen;
1521 Double_t xpos, ypos;
1522
1523 // The vertical wall: a BBox
1524 xlen = sBPSuppClampLatThick / 2;
1525 ylen = sBPSuppClampTotHei / 2;
1526 zlen = sBPSuppClampTotLen / 2;
1527 TGeoBBox* clampwall = new TGeoBBox(xlen, ylen, zlen);
1528 clampwall->SetName("clampWall");
1529
1530 xpos = -clampwall->GetDX();
1531 ypos = clampwall->GetDY() - sBPSuppClampShelfHei;
1532 TGeoTranslation* clampwallmat = new TGeoTranslation(xpos, ypos, 0);
1533 clampwallmat->SetName("clampWallMat");
1534 clampwallmat->RegisterYourself();
1535
1536 // The horizontal shelf: a BBox
1537 xlen = (sBPSuppClampTotWid - sBPSuppClampLatThick) / 2;
1538 ylen = sBPSuppClampShelfHei / 2;
1539 zlen = sBPSuppClampShelfLen / 2;
1540 TGeoBBox* clampshelf = new TGeoBBox(xlen, ylen, zlen);
1541 clampshelf->SetName("clampShelf");
1542
1543 xpos = clampshelf->GetDX();
1544 ypos = -clampshelf->GetDY();
1545 TGeoTranslation* clampshelfmat = new TGeoTranslation(xpos, ypos, 0);
1546 clampshelfmat->SetName("clampShelfMat");
1547 clampshelfmat->RegisterYourself();
1548
1549 // Finally create and return the clamp
1550 // (the origin of its reference system is at the conjunction
1551 // of the vertical wall with the horizontal shelf)
1552 TGeoCompositeShape* clampShape = new TGeoCompositeShape("clampWall:clampWallMat+clampShelf:clampShelfMat");
1553
1554 return clampShape;
1555}
1556
1557TGeoVolume* V3Cage::createCageClosingCross(const TGeoManager* mgr)
1558{
1559 //
1560 // Creates the Cage Closing Cross (from drawings ALIITSUP0242)
1561 //
1562 // Input:
1563 // mgr : the GeoManager (used only to get the proper material)
1564 //
1565 // Output:
1566 //
1567 // Return:
1568 // The closing cross as a TGeoVolume
1569 //
1570 // Created: 29 May 2023 Mario Sitta
1571 //
1572
1573 // Local variables
1574 const Int_t nv = 8;
1575 Double_t xv[nv], yv[nv];
1576 Double_t xlen, ylen, zlen;
1577 Double_t xpos, ypos;
1578
1579 TString compoShape;
1580
1581 // A single vertical post: a Xtru
1582 xv[0] = 0.;
1583 yv[0] = 0.;
1584 xv[1] = (sCageCrossXWidthTot - sCageCrossXWidthInt) / 2;
1585 yv[1] = yv[0];
1586 xv[2] = xv[1];
1587 yv[2] = (sCageCrossYHeightTot - sCageCrossYHeightInt) / 2;
1588 xv[3] = (sCageCrossXWidthExt - sCageCrossXWidthInt) / 2;
1589 yv[3] = yv[2];
1590 xv[4] = xv[3];
1591 yv[4] = yv[3] + sCageCrossYHeightInt;
1592 xv[5] = xv[2];
1593 yv[5] = yv[4];
1594 xv[6] = xv[5];
1595 yv[6] = sCageCrossYHeightTot;
1596 xv[7] = xv[0];
1597 yv[7] = yv[6];
1598
1599 zlen = sCageCrossZLength / 2;
1600
1601 TGeoXtru* vpost = new TGeoXtru(2);
1602 vpost->SetName("crossvertpost");
1603 vpost->DefinePolygon(nv, xv, yv);
1604 vpost->DefineSection(0, -zlen);
1605 vpost->DefineSection(1, zlen);
1606
1607 // The vertical post matrices
1608 xpos = sCageCrossXWidthInt / 2;
1609 TGeoTranslation* vpostmat1 = new TGeoTranslation("vertpostmat1", xpos, 0, 0);
1610 vpostmat1->RegisterYourself();
1611
1612 TGeoCombiTrans* vpostmat2 = new TGeoCombiTrans(-xpos, 0, 0, new TGeoRotation("", 90, 180, -90));
1613 vpostmat2->SetName("vertpostmat2");
1614 vpostmat2->RegisterYourself();
1615
1616 compoShape = Form("crossvertpost:vertpostmat1+crossvertpost:vertpostmat2");
1617
1618 // A single oblique post: a BBox
1619 Double_t leg = vpost->GetY(4);
1620 xlen = TMath::Sqrt(sCageCrossXWidthInt * sCageCrossXWidthInt + leg * leg) / 2;
1621 ylen = sCageCrossBarThick / 2;
1622 TGeoBBox* xpost = new TGeoBBox("crossoblqpost", xlen, ylen, zlen);
1623
1624 // The oblique post matrices
1625 Double_t phi = sCageCrossBarPhi / 2;
1626 ypos = sCageCrossYHeightTot - sCageCrossYMid;
1627
1628 TGeoCombiTrans* xpostmat1 = new TGeoCombiTrans(0, ypos, 0, new TGeoRotation("", phi, 0, 0));
1629 xpostmat1->SetName("oblqpostmat1");
1630 xpostmat1->RegisterYourself();
1631
1632 TGeoCombiTrans* xpostmat2 = new TGeoCombiTrans(0, ypos, 0, new TGeoRotation("", -phi, 0, 0));
1633 xpostmat2->SetName("oblqpostmat2");
1634 xpostmat2->RegisterYourself();
1635
1636 compoShape += Form("+crossoblqpost:oblqpostmat1+crossoblqpost:oblqpostmat2");
1637
1638 // The actual closing cross shape: a CompositeShape
1639 TGeoCompositeShape* closCrossSh = new TGeoCompositeShape(compoShape);
1640
1641 // We have the shape: now create the real volume
1642 TGeoMedium* medAl = mgr->GetMedium(Form("%s_ALUMINUM$", GetDetName()));
1643
1644 TGeoVolume* closCrossVol = new TGeoVolume("CageClosingCross", closCrossSh, medAl);
1645 closCrossVol->SetFillColor(kGray);
1646 closCrossVol->SetLineColor(kGray);
1647
1648 // Finally return the closing cross volume
1649 return closCrossVol;
1650}
int32_t i
int16_t Color_t
Definition GPUQA.h:32
uint8_t leg
Definition of the GeometryTGeo class.
uint32_t j
Definition RawData.h:0
Definition of the V11Geometry class.
ClassImp(V3Cage)
Definition of the V3Cage class.
const char * GetDetName() const
Get detector name.
Definition V11Geometry.h:58
This class defines the Geometry for the Cage of the ITS Upgrade using TGeo.
Definition V3Cage.h:38
~V3Cage() override
Default destructor.
void createAndPlaceCage(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
Definition V3Cage.cxx:184
GLfloat GLfloat GLfloat alpha
Definition glcorearb.h:279
GLuint index
Definition glcorearb.h:781
GLuint const GLchar * name
Definition glcorearb.h:781