20#include <fairlogger/Logger.h>
26#include <TGeoManager.h>
27#include <TGeoMatrix.h>
30#include <TGeoVolume.h>
32#include <TGeoCompositeShape.h>
44const Double_t V3Cage::sCageYInBarrel = 30. * sCm;
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;
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;
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};
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;
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;
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;
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;
201 Double_t zunit, xpos, ypos, zpos;
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);
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)));
215 zunit = (sCageCoverZLength + sCageCoverRibZLength) / 2.;
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)));
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)));
229 zpos += sCageCoverZLength / 2;
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)));
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)));
241 zpos += sCageECCableCrosTotZ / 2;
242 mother->AddNode(cageEndCap, 1,
new TGeoTranslation(0, sCageYInBarrel, -zpos));
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)));
250 ypos = sCageYInBarrel - sBPSuppLowCollTailHei / 2;
251 zpos = sBPSuppZPos + sBPSuppCollarBeamWid / 2;
252 mother->AddNode(cageBPSupport, 1,
new TGeoTranslation(0, ypos, zpos));
257TGeoVolume* V3Cage::createCageCover(
const TGeoManager* mgr)
274 static const Int_t coverFoldNVert = 6;
276 Double_t xvert[coverFoldNVert], yvert[coverFoldNVert];
277 Double_t halfBase, zlen,
alpha;
279 zlen = 0.5 * sCageCoverZLength;
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);
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);
293 xvert[0] = sCageCoverXBaseExt / 2.;
294 yvert[0] = sCageCoverYBaseHeight + sCageCoverSheetThick;
295 xvert[1] = sCageCoverXWidth / 2.;
298 yvert[2] = sCageCoverYBaseHeight;
299 xvert[3] = sCageCoverXBaseInt / 2.;
302 yvert[4] = TMath::Sqrt(sCageCoverRint * sCageCoverRint - sCageCoverXBaseInt * sCageCoverXBaseInt / 4) + sCageCoverSheetThick;
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);
313 TGeoBBox* cutfold =
new TGeoBBox(
"cutFold", xvert[1] - xvert[0], yvert[5] - yvert[1], 1.05 * zlen);
316 TGeoRotation* rotfold =
new TGeoRotation(
"rotFold", 180, 180, 0);
317 rotfold->RegisterYourself();
319 TGeoTranslation* cutbox1 =
new TGeoTranslation(
"cutBox1", xvert[1], yvert[5], 0);
320 cutbox1->RegisterYourself();
322 TGeoTranslation* cutbox2 =
new TGeoTranslation(
"cutBox2", -xvert[1], yvert[5], 0);
323 cutbox2->RegisterYourself();
326 TGeoCompositeShape* coverSh =
new TGeoCompositeShape(
"coverSheet-cutFold:cutBox1-cutFold:cutBox2+coverFold+coverFold:rotFold");
329 TGeoMedium* medRohacell = mgr->GetMedium(Form(
"%s_ROHACELL$",
GetDetName()));
330 TGeoMedium* medPrepreg = mgr->GetMedium(Form(
"%s_M46J6K$",
GetDetName()));
332 TGeoVolume* coverVol =
new TGeoVolume(
"CageCover", coverSh, medPrepreg);
333 coverVol->SetFillColor(kBlue);
334 coverVol->SetLineColor(kBlue);
336 TGeoVolume* coverCoreVol =
new TGeoVolume(
"CageCoverCore", coreSh, medRohacell);
337 coverCoreVol->SetFillColor(kYellow);
338 coverCoreVol->SetLineColor(kYellow);
340 coverVol->AddNode(coverCoreVol, 1,
nullptr);
346TGeoVolume* V3Cage::createCageCoverRib(
const TGeoManager* mgr)
363 static const Int_t ribFoldNVert = 3;
365 Double_t xvert[ribFoldNVert], yvert[ribFoldNVert];
366 Double_t halfBase, zlen,
alpha;
368 zlen = 0.5 * sCageCoverRibZLength;
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);
376 xvert[0] = sCageCoverRibXWidth / 2.;
377 yvert[0] = sCageCoverRibYBaseHi;
378 xvert[1] = sCageCoverRibXBaseInt / 2.;
381 yvert[2] = yvert[1] + sCageCoverRibFoldHi;
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);
390 TGeoRotation* rotfold =
new TGeoRotation(
"rotRibFold", 180, 180, 0);
391 rotfold->RegisterYourself();
394 TGeoCompositeShape* ribSh =
new TGeoCompositeShape(
"coverRibMain+coverRibFold+coverRibFold:rotRibFold");
397 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
399 TGeoVolume* ribVol =
new TGeoVolume(
"CageCoverRib", ribSh, medAl);
400 ribVol->SetFillColor(kGray);
401 ribVol->SetLineColor(kGray);
407TGeoVolume* V3Cage::createCageSidePanel(
const TGeoManager* mgr)
426 Double_t xlen, ylen, zlen;
427 Double_t xpos, ypos, zpos;
430 TGeoVolumeAssembly* sidePanelVol =
new TGeoVolumeAssembly(
"CageSidePanel");
433 TGeoCompositeShape* inFoilSh = createCageSidePanelCoreFoil(sCageSidePanelFoilThick,
"foil");
436 xlen = sCageSidePanelFoilThick / 2;
437 ylen = sCageSidePanelWidth / 2;
438 zlen = sCageSidePanelLength / 2;
439 TGeoBBox* outFoilSh =
new TGeoBBox(xlen, ylen, zlen);
442 TGeoCompositeShape* coreSh = createCageSidePanelCoreFoil(sCageSidePanelCoreThick,
"core");
445 TGeoCompositeShape* rail1Sh = createCageSidePanelRail(sCageSidePanelRail1Len, 1);
448 TGeoCompositeShape* rail2Sh = createCageSidePanelRail(sCageSidePanelRail2Len, 2);
451 TGeoCompositeShape* rail3Sh = createCageSidePanelRail(sCageSidePanelRail3Len, 3);
454 xlen = sCageSidePanelCoreThick / 2;
455 ylen = sCageSidePanelMidBarWid / 2;
456 zlen = (sCageSidePanelLength - sCageSidePanelRail3Len - sCageSidePanelSidBarWid) / 2;
457 TGeoBBox* midBarSh =
new TGeoBBox(xlen, ylen, zlen);
460 xlen = sCageSidePanelCoreThick / 2;
461 ylen = sCageSidePanelWidth / 2;
462 zlen = sCageSidePanelSidBarWid / 2;
463 TGeoBBox* sidBarSh =
new TGeoBBox(xlen, ylen, zlen);
467 xlen = sCageSidePanelGuidThik2 / 2;
468 ylen = sCageSidePanelGuideInHi / 2;
469 zlen = sCageSidePanelGuideLen / 2;
470 TGeoBBox* guideVert =
new TGeoBBox(xlen, ylen, zlen);
471 guideVert->SetName(
"guidevert");
474 xlen = sCageSidePanelGuideWide / 2;
475 ylen = sCageSidePanelGuidThik1 / 2;
476 TGeoBBox* guideHor =
new TGeoBBox(xlen, ylen, zlen);
477 guideHor->SetName(
"guidehor");
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();
485 TGeoTranslation* guideHorMat2 =
new TGeoTranslation(xpos, -ypos, 0);
486 guideHorMat2->SetName(
"guidehormat2");
487 guideHorMat2->RegisterYourself();
490 TGeoCompositeShape* guideSh =
new TGeoCompositeShape(
"guidevert+guidehor:guidehormat1+guidehor:guidehormat2");
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()));
497 TGeoVolume* inFoilVol =
new TGeoVolume(
"CageSidePanelInFoil", inFoilSh, medFabric);
498 inFoilVol->SetFillColor(kBlue);
499 inFoilVol->SetLineColor(kBlue);
501 TGeoVolume* outFoilVol =
new TGeoVolume(
"CageSidePanelOutFoil", outFoilSh, medFabric);
502 outFoilVol->SetFillColor(kBlue);
503 outFoilVol->SetLineColor(kBlue);
505 TGeoVolume* coreVol =
new TGeoVolume(
"CageSidePanelCore", coreSh, medFoam);
506 coreVol->SetFillColor(kYellow);
507 coreVol->SetLineColor(kYellow);
509 TGeoVolume* rail1Vol =
new TGeoVolume(
"CageSidePanelRail1st", rail1Sh, medAlAlloy);
510 rail1Vol->SetFillColor(kGray);
511 rail1Vol->SetLineColor(kGray);
513 TGeoVolume* rail2Vol =
new TGeoVolume(
"CageSidePanelRail2nd", rail2Sh, medAlAlloy);
514 rail2Vol->SetFillColor(kGray);
515 rail2Vol->SetLineColor(kGray);
517 TGeoVolume* rail3Vol =
new TGeoVolume(
"CageSidePanelRail3rd", rail3Sh, medAlAlloy);
518 rail3Vol->SetFillColor(kGray);
519 rail3Vol->SetLineColor(kGray);
521 TGeoVolume* midBarVol =
new TGeoVolume(
"CageSidePanelMiddleBar", midBarSh, medAlAlloy);
522 midBarVol->SetFillColor(kGray);
523 midBarVol->SetLineColor(kGray);
525 TGeoVolume* sidBarVol =
new TGeoVolume(
"CageSidePanelSideBar", sidBarSh, medAlAlloy);
526 sidBarVol->SetFillColor(kGray);
527 sidBarVol->SetLineColor(kGray);
529 TGeoVolume* guideVol =
new TGeoVolume(
"CageSidePanelGuide", guideSh, medFabric);
530 guideVol->SetFillColor(kViolet);
531 guideVol->SetLineColor(kViolet);
534 sidePanelVol->AddNode(coreVol, 1,
nullptr);
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));
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));
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));
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));
560 zpos = sCageSidePanelLength / 2 - midBarSh->GetDZ() - sCageSidePanelSidBarWid;
561 sidePanelVol->AddNode(midBarVol, 1,
new TGeoTranslation(0, 0, -zpos));
563 zpos = sCageSidePanelLength / 2 - sidBarSh->GetDZ();
564 sidePanelVol->AddNode(sidBarVol, 1,
new TGeoTranslation(0, 0, -zpos));
566 xpos = sCageSidePanelCoreThick / 2 + sCageSidePanelFoilThick + sCageSidePanelGuidThik2 / 2;
567 zpos = (sCageSidePanelLength - sCageSidePanelGuideLen) / 2;
568 sidePanelVol->AddNode(guideVol, 1,
new TGeoTranslation(xpos, 0, -zpos));
574TGeoCompositeShape* V3Cage::createCageSidePanelCoreFoil(
const Double_t xthick,
const char* shpref)
594 Double_t xlen, ylen, zlen;
599 ylen = sCageSidePanelWidth / 2;
600 zlen = sCageSidePanelLength / 2;
601 TGeoBBox* bodySh =
new TGeoBBox(xlen, ylen, zlen);
602 bodySh->SetName(Form(
"%sbodyshape", shpref));
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));
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();
624 zlen = sCageSidePanelRail2Len;
625 TGeoBBox* rail2Sh =
new TGeoBBox(xlen, ylen, zlen);
626 rail2Sh->SetName(Form(
"%smedrail", shpref));
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();
638 zlen = sCageSidePanelRail3Len;
639 TGeoBBox* rail3Sh =
new TGeoBBox(xlen, ylen, zlen);
640 rail3Sh->SetName(Form(
"%sshortrail", shpref));
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();
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");
660 zpos = sCageSidePanelRail3Len / 2;
661 TGeoTranslation* midBarMat =
new TGeoTranslation(0, 0, -zpos);
662 midBarMat->SetName(
"midbarmat");
663 midBarMat->RegisterYourself();
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");
672 zpos = sCageSidePanelLength / 2;
673 TGeoTranslation* sidBarMat =
new TGeoTranslation(0, 0, -zpos);
674 sidBarMat->SetName(
"sidebarmat");
675 sidBarMat->RegisterYourself();
678 TString compoShape = Form(
"%sbodyshape", shpref);
679 for (Int_t
j = 0;
j < 4;
j++) {
680 compoShape += Form(
"-%slongrail:longrailmat%d", shpref,
j);
682 for (Int_t
j = 0;
j < 2;
j++) {
683 compoShape += Form(
"-%smedrail:medrailmat%d", shpref,
j);
685 for (Int_t
j = 0;
j < 6;
j++) {
686 compoShape += Form(
"-%sshortrail:shortrailmat%d", shpref,
j);
690 if (strcmp(shpref,
"core") == 0) {
691 compoShape +=
"-midbar:midbarmat-sidebar:sidebarmat";
694 TGeoCompositeShape* corefoilSh =
new TGeoCompositeShape(compoShape);
700TGeoCompositeShape* V3Cage::createCageSidePanelRail(
const Double_t zlength,
const Int_t
index)
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));
730 xlen = sCageSidePanelRailSpan / 2;
731 ylen = sCageSidePanelRailHThik / 2;
732 TGeoBBox* railHor =
new TGeoBBox(xlen, ylen, zlength / 2);
733 railHor->SetName(Form(
"railhor%d",
index));
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();
742 TGeoTranslation* railHorMat2 =
new TGeoTranslation(xpos, -ypos, 0);
743 railHorMat2->SetName(
"railhormat2");
744 railHorMat2->RegisterYourself();
747 TString compoShape = Form(
"railvert%d",
index);
748 compoShape += Form(
"+railhor%d:railhormat1",
index);
749 compoShape += Form(
"+railhor%d:railhormat2",
index);
751 TGeoCompositeShape* railSh =
new TGeoCompositeShape(compoShape);
757TGeoVolume* V3Cage::createCageEndCap(
const TGeoManager* mgr)
774 Double_t rmin, rmid, rmax;
775 Double_t xlen, ylen, zlen;
776 Double_t xpos, ypos, zpos;
779 TGeoVolumeAssembly* endCapVol =
new TGeoVolumeAssembly(
"CageEndCap");
782 rmin = sCageEndCapDint / 2;
783 rmax = sCageEndCapDext / 2;
784 zlen = sCageEndCapFabThick / 2;
786 TGeoTube* baseFabric =
new TGeoTube(rmin, rmax, zlen);
787 baseFabric->SetName(
"endCapBaseFabric");
790 zlen = sCageEndCapFoamThick / 2;
792 TGeoTube* baseFoam =
new TGeoTube(rmin, rmax, zlen);
793 baseFoam->SetName(
"endCapBaseFoam");
796 xlen = (sCageEndCapDext - sCageEndCapXWidth) / 2;
799 TGeoBBox* sideCut =
new TGeoBBox(xlen, ylen, 2 * zlen);
800 sideCut->SetName(
"endCapBoxCut");
802 TGeoTube* sideHole =
new TGeoTube(0, sCageEndCapSideHoleR, 2 * zlen);
803 sideHole->SetName(
"endCapSideHole");
805 xlen = sCageEndCapCableCutWid / 2;
806 ylen = rmax - sCageEndCapCableCutR;
808 TGeoBBox* cableCut =
new TGeoBBox(xlen, ylen, 2 * zlen);
809 cableCut->SetName(
"endCapCableCut");
814 TGeoTranslation* boxCutTr1 =
new TGeoTranslation(
"boxCutTr1", xpos, 0, 0);
815 boxCutTr1->RegisterYourself();
817 TGeoTranslation* boxCutTr2 =
new TGeoTranslation(
"boxCutTr2", -xpos, 0, 0);
818 boxCutTr2->RegisterYourself();
820 xpos = sCageEndCapSideHoleX / 2;
822 TGeoTranslation* sidHolTr1 =
new TGeoTranslation(
"sideHoleTr1", xpos, 0, 0);
823 sidHolTr1->RegisterYourself();
825 TGeoTranslation* sidHolTr2 =
new TGeoTranslation(
"sideHoleTr2", -xpos, 0, 0);
826 sidHolTr2->RegisterYourself();
828 xpos = rmax * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
829 ypos = rmax * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad());
831 TGeoCombiTrans* cableMat1 =
new TGeoCombiTrans(xpos, ypos, 0,
new TGeoRotation(
"", -sCageEndCapCableCutPhi, 0, 0));
832 cableMat1->SetName(
"cableMat1");
833 cableMat1->RegisterYourself();
835 TGeoCombiTrans* cableMat2 =
new TGeoCombiTrans(-xpos, ypos, 0,
new TGeoRotation(
"", sCageEndCapCableCutPhi, 0, 0));
836 cableMat2->SetName(
"cableMat2");
837 cableMat2->RegisterYourself();
839 TGeoCombiTrans* cableMat3 =
new TGeoCombiTrans(xpos, -ypos, 0,
new TGeoRotation(
"", -180 + sCageEndCapCableCutPhi, 0, 0));
840 cableMat3->SetName(
"cableMat3");
841 cableMat3->RegisterYourself();
843 TGeoCombiTrans* cableMat4 =
new TGeoCombiTrans(-xpos, -ypos, 0,
new TGeoRotation(
"", 180 - sCageEndCapCableCutPhi, 0, 0));
844 cableMat4->SetName(
"cableMat4");
845 cableMat4->RegisterYourself();
848 TGeoCompositeShape* fabricSh =
new TGeoCompositeShape(
"endCapBaseFabric-endCapBoxCut:boxCutTr1-endCapBoxCut:boxCutTr2-endCapSideHole:sideHoleTr1-endCapSideHole:sideHoleTr2-endCapCableCut:cableMat1-endCapCableCut:cableMat2-endCapCableCut:cableMat3-endCapCableCut:cableMat4");
851 TGeoCompositeShape* foamSh =
new TGeoCompositeShape(
"endCapBaseFoam-endCapBoxCut:boxCutTr1-endCapBoxCut:boxCutTr2-endCapSideHole:sideHoleTr1-endCapSideHole:sideHoleTr2-endCapCableCut:cableMat1-endCapCableCut:cableMat2-endCapCableCut:cableMat3-endCapCableCut:cableMat4");
857 TGeoPcon* rndCrosSh =
new TGeoPcon(0, 360, 6);
859 rmin = sCageECRoundCrossDmin / 2;
860 rmid = sCageECRoundCrossDmid / 2;
861 rmax = sCageECRoundCrossDmax / 2;
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);
871 TGeoCompositeShape* cblCrosSh = createCageEndCapCableCross(mgr);
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()));
878 TGeoVolume* fabVol =
new TGeoVolume(
"CageEndCapFabric", fabricSh, medFabric);
879 fabVol->SetFillColor(kBlue);
880 fabVol->SetLineColor(kBlue);
882 TGeoVolume* foamVol =
new TGeoVolume(
"CageEndCapFoam", foamSh, medFoam);
883 foamVol->SetFillColor(kYellow);
884 foamVol->SetLineColor(kYellow);
886 TGeoVolume* rndCrosVol =
new TGeoVolume(
"CageEndCapRoundCross", rndCrosSh, medAl);
887 rndCrosVol->SetFillColor(kGray);
888 rndCrosVol->SetLineColor(kGray);
890 TGeoVolume* cblCrosVol =
new TGeoVolume(
"CageEndCapCableCross", cblCrosSh, medAl);
891 cblCrosVol->SetFillColor(kGray);
892 cblCrosVol->SetLineColor(kGray);
895 endCapVol->AddNode(foamVol, 1,
nullptr);
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));
901 endCapVol->AddNode(rndCrosVol, 1,
nullptr);
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)));
915TGeoCompositeShape* V3Cage::createCageEndCapCableCross(
const TGeoManager* mgr)
933 Double_t rmin, rmid, rmax;
934 Double_t xlen, ylen, zlen;
935 Double_t xpos, ypos, zpos;
938 TString crossShape =
"";
941 xlen = sCageECCableCrosInXWid / 2;
942 ylen = sCageECCableCrosInThik / 2;
943 zlen = sCageECCableCrosInZLen / 2;
944 TGeoBBox* cabCrosLow =
new TGeoBBox(xlen, ylen, zlen);
945 cabCrosLow->SetName(
"CabCrosLow");
947 TGeoTranslation* matCrosLow =
new TGeoTranslation(
"MatCrosLow", 0, ylen, 0);
948 matCrosLow->RegisterYourself();
950 crossShape =
"CabCrosLow:MatCrosLow";
953 xlen = (sCageECCableCrosInXWid + 2 * (sCageECCableCrosSidWid - sCageECCableCrosInThik)) / 2;
954 ylen = sCageECCableCrosSidWid / 2;
955 zlen = (sCageECCableCrosTotZ - sCageECCableCrosInZLen) / 4;
956 TGeoBBox* cabCrosSide =
new TGeoBBox(xlen, ylen, zlen);
957 cabCrosSide->SetName(
"CabCrosSide");
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();
966 crossShape +=
"+CabCrosSide:MatCrosSid1+CabCrosSide:MatCrosSid2";
970 rmax = sCageEndCapDext / 2;
971 xlen = sCageECCableCrosInXWid / 2;
973 Double_t apothem = TMath::Sqrt(rmax * rmax - xlen * xlen);
974 Double_t sagitta = rmax - apothem;
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");
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();
989 crossShape +=
"+CabCrosLateral:MatCrosLat1+CabCrosLateral:MatCrosLat2";
992 xlen = sCageECCableCrosSidWid / 2;
993 zlen = cabCrosSide->GetDZ();
994 TGeoBBox* cabCrosLatSide =
new TGeoBBox(xlen, ylen, zlen);
995 cabCrosLatSide->SetName(
"CabCrosLatSide");
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();
1008 crossShape +=
"+CabCrosLatSide:MatCrosLatSid1+CabCrosLatSide:MatCrosLatSid2+CabCrosLatSide:MatCrosLatSid3+CabCrosLatSide:MatCrosLatSid4";
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");
1018 ypos = -rmax + sCageECCableCrosTotHi;
1019 TGeoTranslation* matCrosRnd =
new TGeoTranslation(
"MatCrosRound", 0, ypos, 0);
1020 matCrosRnd->RegisterYourself();
1022 crossShape +=
"+CabCrosRoundTop:MatCrosRound";
1026 TGeoCompositeShape* cableCross =
new TGeoCompositeShape(crossShape.Data());
1031TGeoVolume* V3Cage::createBeamPipeSupport(
const TGeoManager* mgr)
1051 Double_t xv[nv], yv[nv];
1052 Double_t xpos, ypos, zpos;
1055 TGeoVolumeAssembly* bpSuppVol =
new TGeoVolumeAssembly(
"CageBeamPipeSupport");
1058 TGeoCompositeShape* lowCollarSh = createBPSuppLowerCollar();
1061 TGeoCompositeShape* upCollarSh = createBPSuppUpperCollar();
1064 TGeoCompositeShape* collarBeamSh = createBPSuppCollarBeam();
1067 TGeoCompositeShape* bracketSh = createBPSuppBracket();
1070 TGeoCompositeShape* clampSh = createBPSuppClamp();
1073 TGeoTube* bushSh =
new TGeoTube(0.5 * sBPSuppCollarBushD, 0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppBracketWidth);
1076 TGeoBBox* shimSh =
new TGeoBBox(0.5 * sBPSuppClampShimWid, 0.5 * sBPSuppClampShimThick, 0.5 * sBPSuppClampShimLen);
1079 TGeoTube* m4ScrewSh =
new TGeoTube(0, 0.5 * sBPSuppCollarM4Diam, 0.5 * sBPSuppCollarM4High);
1082 TGeoTube* m5ScrewSh =
new TGeoTube(0, 0.5 * sBPSuppClampM5Diam, 0.5 * sBPSuppClampM5High);
1085 TGeoCone* insHeadSh =
new TGeoCone(0.5 * sBPSuppClampInsH, 0, 0.5 * sBPSuppClampInsDmin, 0, 0.5 * sBPSuppClampInsDmax);
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()));
1094 Color_t kTitanium = kGray + 1;
1096 TGeoVolume* lowCollarVol =
new TGeoVolume(
"BPSupportLowerCollar", lowCollarSh, medTitanium);
1097 lowCollarVol->SetFillColor(kTitanium);
1098 lowCollarVol->SetLineColor(kTitanium);
1100 TGeoVolume* upCollarVol =
new TGeoVolume(
"BPSupportUpperCollar", upCollarSh, medTitanium);
1101 upCollarVol->SetFillColor(kTitanium);
1102 upCollarVol->SetLineColor(kTitanium);
1104 TGeoVolume* bushVol =
new TGeoVolume(
"BPSupportCollarBushing", bushSh, medVespel);
1105 bushVol->SetFillColor(kGreen);
1106 bushVol->SetLineColor(kGreen);
1108 TGeoVolume* collarBeamVol =
new TGeoVolume(
"BPSupportCollarBeam", collarBeamSh, medCFRP);
1109 collarBeamVol->SetFillColor(kBlue);
1110 collarBeamVol->SetLineColor(kBlue);
1112 TGeoVolume* bracketVol =
new TGeoVolume(
"BPSupportBracket", bracketSh, medTitanium);
1113 bracketVol->SetFillColor(kTitanium);
1114 bracketVol->SetLineColor(kTitanium);
1116 TGeoVolume* clampVol =
new TGeoVolume(
"BPSupportClamp", clampSh, medTitanium);
1117 clampVol->SetFillColor(kTitanium);
1118 clampVol->SetLineColor(kTitanium);
1120 TGeoVolume* shimVol =
new TGeoVolume(
"BPSupportClampShim", shimSh, medBrass);
1121 shimVol->SetFillColor(kOrange - 4);
1122 shimVol->SetLineColor(kOrange - 4);
1124 TGeoVolume* m4ScrewVol =
new TGeoVolume(
"BPSupportCollarScrew", m4ScrewSh, medTitanium);
1125 m4ScrewVol->SetFillColor(kTitanium);
1126 m4ScrewVol->SetLineColor(kTitanium);
1128 TGeoVolume* m5ScrewVol =
new TGeoVolume(
"BPSupportClampScrew", m5ScrewSh, medSteel);
1129 m5ScrewVol->SetFillColor(kGray);
1130 m5ScrewVol->SetLineColor(kGray);
1132 TGeoVolume* insHeadVol =
new TGeoVolume(
"BPSupportClampInsert", insHeadSh, medSteel);
1133 insHeadVol->SetFillColor(kGray);
1134 insHeadVol->SetLineColor(kGray);
1137 bpSuppVol->AddNode(lowCollarVol, 1,
nullptr);
1139 ypos = sBPSuppLowCollTailHei / 2;
1140 bpSuppVol->AddNode(upCollarVol, 1,
new TGeoTranslation(0, ypos, 0));
1142 bpSuppVol->AddNode(bushVol, 1,
new TGeoTranslation(0, ypos, 0));
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)));
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)));
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)));
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));
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)));
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)));
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)));
1190TGeoCompositeShape* V3Cage::createBPSuppLowerCollar()
1207 const Int_t nv = 12;
1208 Double_t xv[nv], yv[nv], xy8[16];
1210 Double_t xpos, ypos;
1213 Double_t totlen = (sBPSuppLowerCollarLen - sBPSuppCollarIntD) / 2;
1214 Double_t xtail = (sBPSuppLowCollHolDist - sBPSuppCollarIntD) / 2;
1215 Double_t taillen = sBPSuppLowerCollarTlX - sBPSuppCollarIntD / 2;
1218 yv[0] = -sBPSuppCollarBeamHei / 2;
1219 xv[1] = totlen - xtail;
1221 xv[2] = totlen - taillen;
1222 yv[2] = -sBPSuppLowCollTailHei / 2;
1226 yv[4] = sBPSuppLowCollTailHei / 2;
1234 yv[8] = sBPSuppBracketInHei / 2;
1235 xv[9] = sBPSuppBracketInLen;
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");
1250 zlen = sBPSuppBracketWidth / 2 + 0.001;
1251 TGeoTube* brktcenthole =
new TGeoTube(0, sBPSuppBrktCentHoleD / 2, zlen);
1252 brktcenthole->SetName(
"latBrackCentHole");
1254 xpos = totlen - xtail;
1255 TGeoTranslation* brktcenthmat =
new TGeoTranslation(xpos, 0, 0);
1256 brktcenthmat->SetName(
"latCentHoleMat");
1257 brktcenthmat->RegisterYourself();
1263 xy8[2] = -sBPSuppBrktLatHoleW;
1264 xy8[3] = -sBPSuppBrktLatHoleH / 2;
1269 for (Int_t
i = 0;
i < 8;
i++) {
1270 xy8[8 +
i] = xy8[
i];
1272 TGeoArb8* brktlathole =
new TGeoArb8(zlen, xy8);
1273 brktlathole->SetName(
"latBrackLatHole");
1275 xpos = totlen - taillen;
1276 TGeoTranslation* brktlathmat =
new TGeoTranslation(xpos, 0, 0);
1277 brktlathmat->SetName(
"latLatHoleMat");
1278 brktlathmat->RegisterYourself();
1281 TGeoCompositeShape* latbrkt =
new TGeoCompositeShape(
"latBrackBody-latBrackCentHole:latCentHoleMat-latBrackLatHole:latLatHoleMat");
1282 latbrkt->SetName(
"lateralBracket");
1285 xpos = sBPSuppLowerCollarLen / 2;
1286 TGeoTranslation* latmat1 =
new TGeoTranslation(-xpos, 0, 0);
1287 latmat1->SetName(
"latBrackMat1");
1288 latmat1->RegisterYourself();
1290 TGeoCombiTrans* latmat2 =
new TGeoCombiTrans(xpos, 0, 0,
new TGeoRotation(
"", 90, 180, -90));
1291 latmat2->SetName(
"latBrackMat2");
1292 latmat2->RegisterYourself();
1295 TGeoTubeSeg* collar =
new TGeoTubeSeg(0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppCollarExtD, 0.5 * sBPSuppBracketWidth, 180, 360);
1296 collar->SetName(
"lowerCollar");
1298 ypos = brktlat->GetY(4);
1299 TGeoTranslation* collmat =
new TGeoTranslation(0, ypos, 0);
1300 collmat->SetName(
"lowerCollMat");
1301 collmat->RegisterYourself();
1305 TGeoCompositeShape* collarShape =
new TGeoCompositeShape(
"lowerCollar:lowerCollMat+lateralBracket:latBrackMat1+lateralBracket:latBrackMat2");
1310TGeoCompositeShape* V3Cage::createBPSuppUpperCollar()
1327 Double_t xpos, ypos;
1330 xlen = (sBPSuppUpperCollarLen - sBPSuppCollarIntD) / 2;
1331 TGeoBBox* plate =
new TGeoBBox(0.5 * xlen, 0.5 * sBPSuppUpperCollarHei, 0.5 * sBPSuppBracketWidth);
1332 plate->SetName(
"lateralPlate");
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();
1340 TGeoTranslation* latplmat2 =
new TGeoTranslation(-xpos, ypos, 0);
1341 latplmat2->SetName(
"lateralPlateMat2");
1342 latplmat2->RegisterYourself();
1345 TGeoTubeSeg* collar =
new TGeoTubeSeg(0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppCollarExtD, 0.5 * sBPSuppBracketWidth, 0, 180);
1346 collar->SetName(
"upperCollar");
1350 TGeoCompositeShape* collarShape =
new TGeoCompositeShape(
"upperCollar+lateralPlate:lateralPlateMat1+lateralPlate:lateralPlateMat2");
1355TGeoCompositeShape* V3Cage::createBPSuppCollarBeam()
1373 Double_t xv[nv], yv[nv];
1374 Double_t xlen, xwid, ylen, zlen;
1378 xlen = (sBPSuppCollarBeamLen - 2 * sBPSuppBracketInLen) / 2;
1379 xwid = (sBPSuppCollarBeamWid - sBPSuppBracketWidth) / 2;
1381 yv[0] = -sBPSuppBracketWidth / 2;
1382 xv[1] = xv[0] + xwid;
1383 yv[1] = -sBPSuppCollarBeamWid / 2;
1388 for (Int_t
i = 0;
i < 4;
i++) {
1389 xv[4 +
i] = xv[3 -
i];
1390 yv[4 +
i] = -yv[3 -
i];
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);
1401 xlen = sBPSuppBracketInLen / 2;
1402 ylen = sBPSuppBracketWidth / 2;
1403 zlen = sBPSuppBracketInHei / 2;
1404 TGeoBBox* colins =
new TGeoBBox(
"collarInsert", xlen, ylen, zlen);
1406 xpos = colcent->GetX(0) - colins->GetDX();
1407 TGeoTranslation* insmat1 =
new TGeoTranslation(-xpos, 0, 0);
1408 insmat1->SetName(
"colInsMat1");
1409 insmat1->RegisterYourself();
1411 TGeoTranslation* insmat2 =
new TGeoTranslation(xpos, 0, 0);
1412 insmat2->SetName(
"colInsMat2");
1413 insmat2->RegisterYourself();
1417 TGeoCompositeShape* beamShape =
new TGeoCompositeShape(
"collarCentral+collarInsert:colInsMat1+collarInsert:colInsMat2");
1422TGeoCompositeShape* V3Cage::createBPSuppBracket()
1439 const Int_t nv = 12;
1440 Double_t xv[nv], yv[nv];
1446 yv[0] = -sBPSuppCollarBeamHei / 2;
1447 xv[1] = sBPSuppBracketTotLen - sBPSuppBrktCentHoleX;
1449 xv[2] = sBPSuppBracketTotLen - sBPSuppBracketTailLen;
1451 xv[3] = sBPSuppBracketTotLen;
1454 yv[4] = sBPSuppBracketTailHei;
1462 yv[8] = sBPSuppBracketInHei / 2;
1463 xv[9] = sBPSuppBracketInLen;
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");
1478 zlen = sBPSuppBracketWidth / 2 + 0.001;
1479 TGeoTube* brktcenthole =
new TGeoTube(0, sBPSuppBrktCentHoleD / 2, zlen);
1480 brktcenthole->SetName(
"bracketCentHole");
1482 xpos = sBPSuppBracketTotLen - sBPSuppBrktCentHoleX;
1483 TGeoTranslation* brktcenthmat =
new TGeoTranslation(xpos, -sBPSuppBrktHolesY, 0);
1484 brktcenthmat->SetName(
"bracketCentHMat");
1485 brktcenthmat->RegisterYourself();
1488 TGeoTube* brktlathole =
new TGeoTube(0, sBPSuppBrktLatHoleD / 2, zlen);
1489 brktlathole->SetName(
"bracketLatHole");
1491 xpos = sBPSuppBracketTotLen - sBPSuppBrktLatHoleX;
1492 TGeoTranslation* brktlathmat =
new TGeoTranslation(xpos, sBPSuppBrktHolesY, 0);
1493 brktlathmat->SetName(
"bracketLatHMat");
1494 brktlathmat->RegisterYourself();
1498 TGeoCompositeShape* bracketShape =
new TGeoCompositeShape(
"bracketBody-bracketCentHole:bracketCentHMat-bracketLatHole:bracketLatHMat");
1500 return bracketShape;
1503TGeoCompositeShape* V3Cage::createBPSuppClamp()
1520 Double_t xlen, ylen, zlen;
1521 Double_t xpos, ypos;
1524 xlen = sBPSuppClampLatThick / 2;
1525 ylen = sBPSuppClampTotHei / 2;
1526 zlen = sBPSuppClampTotLen / 2;
1527 TGeoBBox* clampwall =
new TGeoBBox(xlen, ylen, zlen);
1528 clampwall->SetName(
"clampWall");
1530 xpos = -clampwall->GetDX();
1531 ypos = clampwall->GetDY() - sBPSuppClampShelfHei;
1532 TGeoTranslation* clampwallmat =
new TGeoTranslation(xpos, ypos, 0);
1533 clampwallmat->SetName(
"clampWallMat");
1534 clampwallmat->RegisterYourself();
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");
1543 xpos = clampshelf->GetDX();
1544 ypos = -clampshelf->GetDY();
1545 TGeoTranslation* clampshelfmat =
new TGeoTranslation(xpos, ypos, 0);
1546 clampshelfmat->SetName(
"clampShelfMat");
1547 clampshelfmat->RegisterYourself();
1552 TGeoCompositeShape* clampShape =
new TGeoCompositeShape(
"clampWall:clampWallMat+clampShelf:clampShelfMat");
1557TGeoVolume* V3Cage::createCageClosingCross(
const TGeoManager* mgr)
1575 Double_t xv[nv], yv[nv];
1576 Double_t xlen, ylen, zlen;
1577 Double_t xpos, ypos;
1584 xv[1] = (sCageCrossXWidthTot - sCageCrossXWidthInt) / 2;
1587 yv[2] = (sCageCrossYHeightTot - sCageCrossYHeightInt) / 2;
1588 xv[3] = (sCageCrossXWidthExt - sCageCrossXWidthInt) / 2;
1591 yv[4] = yv[3] + sCageCrossYHeightInt;
1595 yv[6] = sCageCrossYHeightTot;
1599 zlen = sCageCrossZLength / 2;
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);
1608 xpos = sCageCrossXWidthInt / 2;
1609 TGeoTranslation* vpostmat1 =
new TGeoTranslation(
"vertpostmat1", xpos, 0, 0);
1610 vpostmat1->RegisterYourself();
1612 TGeoCombiTrans* vpostmat2 =
new TGeoCombiTrans(-xpos, 0, 0,
new TGeoRotation(
"", 90, 180, -90));
1613 vpostmat2->SetName(
"vertpostmat2");
1614 vpostmat2->RegisterYourself();
1616 compoShape = Form(
"crossvertpost:vertpostmat1+crossvertpost:vertpostmat2");
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);
1625 Double_t
phi = sCageCrossBarPhi / 2;
1626 ypos = sCageCrossYHeightTot - sCageCrossYMid;
1628 TGeoCombiTrans* xpostmat1 =
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", phi, 0, 0));
1629 xpostmat1->SetName(
"oblqpostmat1");
1630 xpostmat1->RegisterYourself();
1632 TGeoCombiTrans* xpostmat2 =
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", -phi, 0, 0));
1633 xpostmat2->SetName(
"oblqpostmat2");
1634 xpostmat2->RegisterYourself();
1636 compoShape += Form(
"+crossoblqpost:oblqpostmat1+crossoblqpost:oblqpostmat2");
1639 TGeoCompositeShape* closCrossSh =
new TGeoCompositeShape(compoShape);
1642 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
1644 TGeoVolume* closCrossVol =
new TGeoVolume(
"CageClosingCross", closCrossSh, medAl);
1645 closCrossVol->SetFillColor(kGray);
1646 closCrossVol->SetLineColor(kGray);
1649 return closCrossVol;
Definition of the GeometryTGeo class.
Definition of the V11Geometry class.
Definition of the V3Cage class.
const char * GetDetName() const
Get detector name.
This class defines the Geometry for the Cage of the ITS Upgrade using TGeo.
~V3Cage() override
Default destructor.
void createAndPlaceCage(TGeoVolume *mother, const TGeoManager *mgr=gGeoManager)
GLfloat GLfloat GLfloat alpha
GLuint const GLchar * name