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;
171const Double_t V3Cage::sCageMFTRailZLen = 1874 * sMm;
172const Double_t V3Cage::sCageMFTRailZPos = 6.3 * sMm;
173const Double_t V3Cage::sCageMFTRailTotWidth = 27 * sMm;
174const Double_t V3Cage::sCageMFTRailExtWidth = 24 * sMm;
175const Double_t V3Cage::sCageMFTRailIntWidth = 17.5 * sMm;
176const Double_t V3Cage::sCageMFTRailBaseWidth = 22 * sMm;
177const Double_t V3Cage::sCageMFTRailTotHeight = 8.9 * sMm;
178const Double_t V3Cage::sCageMFTRailExtHeight = 5.9 * sMm;
179const Double_t V3Cage::sCageMFTRailIntHeight = 3.5 * sMm;
180const Double_t V3Cage::sCageMFTRailsXDist = 44 * sMm;
182const Double_t V3Cage::sCageMFTHingeTotWid = 164 * sMm;
183const Double_t V3Cage::sCageMFTHingeIntWid = 141.3 * sMm;
184const Double_t V3Cage::sCageMFTHingeHeight = 8 * sMm;
185const Double_t V3Cage::sCageMFTHingeIntHei = 6 * sMm;
186const Double_t V3Cage::sCageMFTHingeTotLen = 41 * sMm;
187const Double_t V3Cage::sCageMFTHingeIntLen = 28 * sMm;
188const Double_t V3Cage::sCageMFTHingeBulgeWid = 10 * sMm;
189const Double_t V3Cage::sCageMFTHingeBulgeHei = 10 * sMm;
190const Double_t V3Cage::sCageMFTHingeBulgePos = 7 * sMm;
223 Double_t zunit, xpos, ypos, zpos;
226 TGeoVolume* cageCover = createCageCover(mgr);
227 TGeoVolume* cageCoverRib = createCageCoverRib(mgr);
228 TGeoVolume* cageEndCap = createCageEndCap(mgr);
229 TGeoVolume* cageSidePanel = createCageSidePanel(mgr);
230 TGeoVolume* cageBPSupport = createBeamPipeSupport(mgr);
231 TGeoVolume* cageClosingCross = createCageClosingCross(mgr);
234 mother->AddNode(cageCover, 1,
new TGeoTranslation(0, sCageYInBarrel, 0));
235 mother->AddNode(cageCover, 2,
new TGeoCombiTrans(0, sCageYInBarrel, 0,
new TGeoRotation(
"", 180, 0, 0)));
237 zunit = (sCageCoverZLength + sCageCoverRibZLength) / 2.;
240 mother->AddNode(cageCoverRib, 1,
new TGeoTranslation(0, sCageYInBarrel, zpos));
241 mother->AddNode(cageCoverRib, 2,
new TGeoCombiTrans(0, sCageYInBarrel, zpos,
new TGeoRotation(
"", 180, 0, 0)));
242 mother->AddNode(cageCoverRib, 3,
new TGeoTranslation(0, sCageYInBarrel, -zpos));
243 mother->AddNode(cageCoverRib, 4,
new TGeoCombiTrans(0, sCageYInBarrel, -zpos,
new TGeoRotation(
"", 180, 0, 0)));
246 mother->AddNode(cageCover, 3,
new TGeoTranslation(0, sCageYInBarrel, zpos));
247 mother->AddNode(cageCover, 4,
new TGeoCombiTrans(0, sCageYInBarrel, zpos,
new TGeoRotation(
"", 180, 0, 0)));
248 mother->AddNode(cageCover, 5,
new TGeoTranslation(0, sCageYInBarrel, -zpos));
249 mother->AddNode(cageCover, 6,
new TGeoCombiTrans(0, sCageYInBarrel, -zpos,
new TGeoRotation(
"", 180, 0, 0)));
251 zpos += sCageCoverZLength / 2;
253 Double_t zposSP = -zpos + sCageSidePanelLength / 2;
254 xpos = sCageSidePanelXDist / 2 - sCageSidePanelCoreThick / 2 - sCageSidePanelFoilThick;
255 mother->AddNode(cageSidePanel, 1,
new TGeoTranslation(xpos, sCageYInBarrel, zposSP));
256 mother->AddNode(cageSidePanel, 2,
new TGeoCombiTrans(-xpos, sCageYInBarrel, zposSP,
new TGeoRotation(
"", 180, 0, 0)));
258 Double_t zposCC = -zpos + sCageSidePanelLength + sCageCrossZLength / 2;
259 mother->AddNode(cageClosingCross, 1,
new TGeoTranslation(0, sCageYInBarrel, zposCC));
260 mother->AddNode(cageClosingCross, 2,
new TGeoCombiTrans(0, sCageYInBarrel, zposCC,
new TGeoRotation(
"", 0, 180, 0)));
263 zpos += sCageECCableCrosTotZ / 2;
264 mother->AddNode(cageEndCap, 1,
new TGeoTranslation(0, sCageYInBarrel, -zpos));
268 mother->AddNode(cageCoverRib, 5,
new TGeoTranslation(0, sCageYInBarrel, zpos));
269 mother->AddNode(cageCoverRib, 6,
new TGeoCombiTrans(0, sCageYInBarrel, zpos,
new TGeoRotation(
"", 180, 0, 0)));
272 ypos = sCageYInBarrel - sBPSuppLowCollTailHei / 2;
273 zpos = sBPSuppZPos + sBPSuppCollarBeamWid / 2;
274 mother->AddNode(cageBPSupport, 1,
new TGeoTranslation(0, ypos, zpos));
277 createAndPlaceMFTRailsInsideCage(mother, mgr);
282TGeoVolume* V3Cage::createCageCover(
const TGeoManager* mgr)
299 static const Int_t coverFoldNVert = 6;
301 Double_t xvert[coverFoldNVert], yvert[coverFoldNVert];
302 Double_t halfBase, zlen,
alpha;
304 zlen = 0.5 * sCageCoverZLength;
307 halfBase = 0.5 * sCageCoverXBaseInt - sCageCoverSheetThick;
308 alpha = TMath::ACos(halfBase / sCageCoverCoreRext) * TMath::RadToDeg();
309 TGeoTubeSeg* coreSh =
new TGeoTubeSeg(
"coverCore", sCageCoverCoreRint, sCageCoverCoreRext, zlen,
alpha, 180. -
alpha);
313 halfBase = 0.5 * sCageCoverXBaseInt;
314 alpha = TMath::ACos(halfBase / sCageCoverRint) * TMath::RadToDeg();
315 TGeoTubeSeg* sheet =
new TGeoTubeSeg(
"coverSheet", sCageCoverRint, sCageCoverCoreRext, zlen,
alpha, 180. -
alpha);
318 xvert[0] = sCageCoverXBaseExt / 2.;
319 yvert[0] = sCageCoverYBaseHeight + sCageCoverSheetThick;
320 xvert[1] = sCageCoverXWidth / 2.;
323 yvert[2] = sCageCoverYBaseHeight;
324 xvert[3] = sCageCoverXBaseInt / 2.;
327 yvert[4] = TMath::Sqrt(sCageCoverRint * sCageCoverRint - sCageCoverXBaseInt * sCageCoverXBaseInt / 4) + sCageCoverSheetThick;
331 TGeoXtru* fold =
new TGeoXtru(2);
332 fold->SetName(
"coverFold");
333 fold->DefinePolygon(coverFoldNVert, xvert, yvert);
334 fold->DefineSection(0, -zlen);
335 fold->DefineSection(1, zlen);
338 TGeoBBox* cutfold =
new TGeoBBox(
"cutFold", xvert[1] - xvert[0], yvert[5] - yvert[1], 1.05 * zlen);
341 TGeoRotation* rotfold =
new TGeoRotation(
"rotFold", 180, 180, 0);
342 rotfold->RegisterYourself();
344 TGeoTranslation* cutbox1 =
new TGeoTranslation(
"cutBox1", xvert[1], yvert[5], 0);
345 cutbox1->RegisterYourself();
347 TGeoTranslation* cutbox2 =
new TGeoTranslation(
"cutBox2", -xvert[1], yvert[5], 0);
348 cutbox2->RegisterYourself();
351 TGeoCompositeShape* coverSh =
new TGeoCompositeShape(
"coverSheet-cutFold:cutBox1-cutFold:cutBox2+coverFold+coverFold:rotFold");
354 TGeoMedium* medRohacell = mgr->GetMedium(Form(
"%s_ROHACELL$",
GetDetName()));
355 TGeoMedium* medPrepreg = mgr->GetMedium(Form(
"%s_M46J6K$",
GetDetName()));
357 TGeoVolume* coverVol =
new TGeoVolume(
"CageCover", coverSh, medPrepreg);
358 coverVol->SetFillColor(kBlue);
359 coverVol->SetLineColor(kBlue);
361 TGeoVolume* coverCoreVol =
new TGeoVolume(
"CageCoverCore", coreSh, medRohacell);
362 coverCoreVol->SetFillColor(kYellow);
363 coverCoreVol->SetLineColor(kYellow);
365 coverVol->AddNode(coverCoreVol, 1,
nullptr);
371TGeoVolume* V3Cage::createCageCoverRib(
const TGeoManager* mgr)
388 static const Int_t ribFoldNVert = 3;
390 Double_t xvert[ribFoldNVert], yvert[ribFoldNVert];
391 Double_t halfBase, zlen,
alpha;
393 zlen = 0.5 * sCageCoverRibZLength;
396 halfBase = 0.5 * sCageCoverRibXBaseInt;
397 alpha = TMath::ACos(halfBase / sCageCoverRibRint) * TMath::RadToDeg();
398 TGeoTubeSeg* mainSh =
new TGeoTubeSeg(
"coverRibMain", sCageCoverRibRint, sCageCoverRibRext, zlen,
alpha, 180. -
alpha);
401 xvert[0] = sCageCoverRibXWidth / 2.;
402 yvert[0] = sCageCoverRibYBaseHi;
403 xvert[1] = sCageCoverRibXBaseInt / 2.;
406 yvert[2] = yvert[1] + sCageCoverRibFoldHi;
408 TGeoXtru* fold =
new TGeoXtru(2);
409 fold->SetName(
"coverRibFold");
410 fold->DefinePolygon(ribFoldNVert, xvert, yvert);
411 fold->DefineSection(0, -zlen);
412 fold->DefineSection(1, zlen);
415 TGeoRotation* rotfold =
new TGeoRotation(
"rotRibFold", 180, 180, 0);
416 rotfold->RegisterYourself();
419 TGeoCompositeShape* ribSh =
new TGeoCompositeShape(
"coverRibMain+coverRibFold+coverRibFold:rotRibFold");
422 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
424 TGeoVolume* ribVol =
new TGeoVolume(
"CageCoverRib", ribSh, medAl);
425 ribVol->SetFillColor(kGray);
426 ribVol->SetLineColor(kGray);
432TGeoVolume* V3Cage::createCageSidePanel(
const TGeoManager* mgr)
451 Double_t xlen, ylen, zlen;
452 Double_t xpos, ypos, zpos;
455 TGeoVolumeAssembly* sidePanelVol =
new TGeoVolumeAssembly(
"CageSidePanel");
458 TGeoCompositeShape* inFoilSh = createCageSidePanelCoreFoil(sCageSidePanelFoilThick,
"foil");
461 xlen = sCageSidePanelFoilThick / 2;
462 ylen = sCageSidePanelWidth / 2;
463 zlen = sCageSidePanelLength / 2;
464 TGeoBBox* outFoilSh =
new TGeoBBox(xlen, ylen, zlen);
467 TGeoCompositeShape* coreSh = createCageSidePanelCoreFoil(sCageSidePanelCoreThick,
"core");
470 TGeoCompositeShape* rail1Sh = createCageSidePanelRail(sCageSidePanelRail1Len, 1);
473 TGeoCompositeShape* rail2Sh = createCageSidePanelRail(sCageSidePanelRail2Len, 2);
476 TGeoCompositeShape* rail3Sh = createCageSidePanelRail(sCageSidePanelRail3Len, 3);
479 xlen = sCageSidePanelCoreThick / 2;
480 ylen = sCageSidePanelMidBarWid / 2;
481 zlen = (sCageSidePanelLength - sCageSidePanelRail3Len - sCageSidePanelSidBarWid) / 2;
482 TGeoBBox* midBarSh =
new TGeoBBox(xlen, ylen, zlen);
485 xlen = sCageSidePanelCoreThick / 2;
486 ylen = sCageSidePanelWidth / 2;
487 zlen = sCageSidePanelSidBarWid / 2;
488 TGeoBBox* sidBarSh =
new TGeoBBox(xlen, ylen, zlen);
492 xlen = sCageSidePanelGuidThik2 / 2;
493 ylen = sCageSidePanelGuideInHi / 2;
494 zlen = sCageSidePanelGuideLen / 2;
495 TGeoBBox* guideVert =
new TGeoBBox(xlen, ylen, zlen);
496 guideVert->SetName(
"guidevert");
499 xlen = sCageSidePanelGuideWide / 2;
500 ylen = sCageSidePanelGuidThik1 / 2;
501 TGeoBBox* guideHor =
new TGeoBBox(xlen, ylen, zlen);
502 guideHor->SetName(
"guidehor");
504 xpos = (sCageSidePanelGuideWide - sCageSidePanelGuidThik2) / 2;
505 ypos = (sCageSidePanelGuidThik1 + sCageSidePanelGuideInHi) / 2;
506 TGeoTranslation* guideHorMat1 =
new TGeoTranslation(xpos, ypos, 0);
507 guideHorMat1->SetName(
"guidehormat1");
508 guideHorMat1->RegisterYourself();
510 TGeoTranslation* guideHorMat2 =
new TGeoTranslation(xpos, -ypos, 0);
511 guideHorMat2->SetName(
"guidehormat2");
512 guideHorMat2->RegisterYourself();
515 TGeoCompositeShape* guideSh =
new TGeoCompositeShape(
"guidevert+guidehor:guidehormat1+guidehor:guidehormat2");
518 TGeoMedium* medFabric = mgr->GetMedium(Form(
"%s_M46J6K$",
GetDetName()));
519 TGeoMedium* medFoam = mgr->GetMedium(Form(
"%s_ROHACELL$",
GetDetName()));
520 TGeoMedium* medAlAlloy = mgr->GetMedium(Form(
"%s_ENAW7075$",
GetDetName()));
522 TGeoVolume* inFoilVol =
new TGeoVolume(
"CageSidePanelInFoil", inFoilSh, medFabric);
523 inFoilVol->SetFillColor(kBlue);
524 inFoilVol->SetLineColor(kBlue);
526 TGeoVolume* outFoilVol =
new TGeoVolume(
"CageSidePanelOutFoil", outFoilSh, medFabric);
527 outFoilVol->SetFillColor(kBlue);
528 outFoilVol->SetLineColor(kBlue);
530 TGeoVolume* coreVol =
new TGeoVolume(
"CageSidePanelCore", coreSh, medFoam);
531 coreVol->SetFillColor(kYellow);
532 coreVol->SetLineColor(kYellow);
534 TGeoVolume* rail1Vol =
new TGeoVolume(
"CageSidePanelRail1st", rail1Sh, medAlAlloy);
535 rail1Vol->SetFillColor(kGray);
536 rail1Vol->SetLineColor(kGray);
538 TGeoVolume* rail2Vol =
new TGeoVolume(
"CageSidePanelRail2nd", rail2Sh, medAlAlloy);
539 rail2Vol->SetFillColor(kGray);
540 rail2Vol->SetLineColor(kGray);
542 TGeoVolume* rail3Vol =
new TGeoVolume(
"CageSidePanelRail3rd", rail3Sh, medAlAlloy);
543 rail3Vol->SetFillColor(kGray);
544 rail3Vol->SetLineColor(kGray);
546 TGeoVolume* midBarVol =
new TGeoVolume(
"CageSidePanelMiddleBar", midBarSh, medAlAlloy);
547 midBarVol->SetFillColor(kGray);
548 midBarVol->SetLineColor(kGray);
550 TGeoVolume* sidBarVol =
new TGeoVolume(
"CageSidePanelSideBar", sidBarSh, medAlAlloy);
551 sidBarVol->SetFillColor(kGray);
552 sidBarVol->SetLineColor(kGray);
554 TGeoVolume* guideVol =
new TGeoVolume(
"CageSidePanelGuide", guideSh, medFabric);
555 guideVol->SetFillColor(kViolet);
556 guideVol->SetLineColor(kViolet);
559 sidePanelVol->AddNode(coreVol, 1,
nullptr);
561 xpos = (sCageSidePanelCoreThick + sCageSidePanelFoilThick) / 2;
562 sidePanelVol->AddNode(inFoilVol, 1,
new TGeoTranslation(-xpos, 0, 0));
563 sidePanelVol->AddNode(outFoilVol, 1,
new TGeoTranslation(xpos, 0, 0));
565 xpos = (sCageSidePanelCoreThick - sCageSidePanelRailVThik) / 2;
566 zpos = (sCageSidePanelLength - sCageSidePanelRail1Len) / 2;
567 for (Int_t
j = 0;
j < 2;
j++) {
568 ypos = sCageSidePanelRail1Ypos[
j];
569 sidePanelVol->AddNode(rail1Vol,
j + 1,
new TGeoTranslation(xpos, ypos, zpos));
570 sidePanelVol->AddNode(rail1Vol,
j + 3,
new TGeoTranslation(xpos, -ypos, zpos));
573 zpos = (sCageSidePanelLength - sCageSidePanelRail2Len) / 2;
574 ypos = sCageSidePanelRail2Ypos;
575 sidePanelVol->AddNode(rail2Vol, 1,
new TGeoTranslation(xpos, ypos, zpos));
576 sidePanelVol->AddNode(rail2Vol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
578 zpos = (sCageSidePanelLength - sCageSidePanelRail3Len) / 2;
579 for (Int_t
j = 0;
j < 3;
j++) {
580 ypos = sCageSidePanelRail3Ypos[
j];
581 sidePanelVol->AddNode(rail3Vol,
j + 1,
new TGeoTranslation(xpos, ypos, zpos));
582 sidePanelVol->AddNode(rail3Vol,
j + 4,
new TGeoTranslation(xpos, -ypos, zpos));
585 zpos = sCageSidePanelLength / 2 - midBarSh->GetDZ() - sCageSidePanelSidBarWid;
586 sidePanelVol->AddNode(midBarVol, 1,
new TGeoTranslation(0, 0, -zpos));
588 zpos = sCageSidePanelLength / 2 - sidBarSh->GetDZ();
589 sidePanelVol->AddNode(sidBarVol, 1,
new TGeoTranslation(0, 0, -zpos));
591 xpos = sCageSidePanelCoreThick / 2 + sCageSidePanelFoilThick + sCageSidePanelGuidThik2 / 2;
592 zpos = (sCageSidePanelLength - sCageSidePanelGuideLen) / 2;
593 sidePanelVol->AddNode(guideVol, 1,
new TGeoTranslation(xpos, 0, -zpos));
599TGeoCompositeShape* V3Cage::createCageSidePanelCoreFoil(
const Double_t xthick,
const char* shpref)
619 Double_t xlen, ylen, zlen;
624 ylen = sCageSidePanelWidth / 2;
625 zlen = sCageSidePanelLength / 2;
626 TGeoBBox* bodySh =
new TGeoBBox(xlen, ylen, zlen);
627 bodySh->SetName(Form(
"%sbodyshape", shpref));
630 xlen = 1.1 * xthick / 2;
631 ylen = sCageSidePanelRailWidth / 2;
632 zlen = sCageSidePanelRail1Len;
633 TGeoBBox* rail1Sh =
new TGeoBBox(xlen, ylen, zlen);
634 rail1Sh->SetName(Form(
"%slongrail", shpref));
636 zpos = sCageSidePanelLength / 2;
637 TGeoTranslation* rail1Mat[4];
638 for (Int_t
j = 0;
j < 2;
j++) {
639 ypos = sCageSidePanelRail1Ypos[
j];
640 rail1Mat[
j] =
new TGeoTranslation(0, ypos, zpos);
641 rail1Mat[
j]->SetName(Form(
"longrailmat%d",
j));
642 rail1Mat[
j]->RegisterYourself();
643 rail1Mat[
j + 2] =
new TGeoTranslation(0, -ypos, zpos);
644 rail1Mat[
j + 2]->SetName(Form(
"longrailmat%d",
j + 2));
645 rail1Mat[
j + 2]->RegisterYourself();
649 zlen = sCageSidePanelRail2Len;
650 TGeoBBox* rail2Sh =
new TGeoBBox(xlen, ylen, zlen);
651 rail2Sh->SetName(Form(
"%smedrail", shpref));
653 ypos = sCageSidePanelRail2Ypos;
654 TGeoTranslation* rail2Mat[2];
655 rail2Mat[0] =
new TGeoTranslation(0, ypos, zpos);
656 rail2Mat[0]->SetName(
"medrailmat0");
657 rail2Mat[0]->RegisterYourself();
658 rail2Mat[1] =
new TGeoTranslation(0, -ypos, zpos);
659 rail2Mat[1]->SetName(
"medrailmat1");
660 rail2Mat[1]->RegisterYourself();
663 zlen = sCageSidePanelRail3Len;
664 TGeoBBox* rail3Sh =
new TGeoBBox(xlen, ylen, zlen);
665 rail3Sh->SetName(Form(
"%sshortrail", shpref));
667 TGeoTranslation* rail3Mat[6];
668 for (Int_t
j = 0;
j < 3;
j++) {
669 ypos = sCageSidePanelRail3Ypos[
j];
670 rail3Mat[
j] =
new TGeoTranslation(0, ypos, zpos);
671 rail3Mat[
j]->SetName(Form(
"shortrailmat%d",
j));
672 rail3Mat[
j]->RegisterYourself();
673 rail3Mat[
j + 3] =
new TGeoTranslation(0, -ypos, zpos);
674 rail3Mat[
j + 3]->SetName(Form(
"shortrailmat%d",
j + 3));
675 rail3Mat[
j + 3]->RegisterYourself();
679 xlen = 1.1 * sCageSidePanelCoreThick / 2;
680 ylen = sCageSidePanelMidBarWid / 2;
681 zlen = (sCageSidePanelLength - sCageSidePanelRail3Len) / 2;
682 TGeoBBox* midBarHol =
new TGeoBBox(xlen, ylen, zlen);
683 midBarHol->SetName(
"midbar");
685 zpos = sCageSidePanelRail3Len / 2;
686 TGeoTranslation* midBarMat =
new TGeoTranslation(0, 0, -zpos);
687 midBarMat->SetName(
"midbarmat");
688 midBarMat->RegisterYourself();
691 xlen = 1.1 * sCageSidePanelCoreThick / 2;
692 ylen = 1.1 * sCageSidePanelWidth / 2;
693 zlen = sCageSidePanelSidBarWid;
694 TGeoBBox* sidBarHol =
new TGeoBBox(xlen, ylen, zlen);
695 sidBarHol->SetName(
"sidebar");
697 zpos = sCageSidePanelLength / 2;
698 TGeoTranslation* sidBarMat =
new TGeoTranslation(0, 0, -zpos);
699 sidBarMat->SetName(
"sidebarmat");
700 sidBarMat->RegisterYourself();
703 TString compoShape = Form(
"%sbodyshape", shpref);
704 for (Int_t
j = 0;
j < 4;
j++) {
705 compoShape += Form(
"-%slongrail:longrailmat%d", shpref,
j);
707 for (Int_t
j = 0;
j < 2;
j++) {
708 compoShape += Form(
"-%smedrail:medrailmat%d", shpref,
j);
710 for (Int_t
j = 0;
j < 6;
j++) {
711 compoShape += Form(
"-%sshortrail:shortrailmat%d", shpref,
j);
715 if (strcmp(shpref,
"core") == 0) {
716 compoShape +=
"-midbar:midbarmat-sidebar:sidebarmat";
719 TGeoCompositeShape* corefoilSh =
new TGeoCompositeShape(compoShape);
725TGeoCompositeShape* V3Cage::createCageSidePanelRail(
const Double_t zlength,
const Int_t
index)
749 xlen = sCageSidePanelRailVThik / 2;
750 ylen = (sCageSidePanelRailWidth - 2 * sCageSidePanelRailHThik) / 2;
751 TGeoBBox* railVert =
new TGeoBBox(xlen, ylen, zlength / 2);
752 railVert->SetName(Form(
"railvert%d",
index));
755 xlen = sCageSidePanelRailSpan / 2;
756 ylen = sCageSidePanelRailHThik / 2;
757 TGeoBBox* railHor =
new TGeoBBox(xlen, ylen, zlength / 2);
758 railHor->SetName(Form(
"railhor%d",
index));
761 xpos = (sCageSidePanelRailVThik - sCageSidePanelRailSpan) / 2;
762 ypos = (sCageSidePanelRailWidth - sCageSidePanelRailHThik) / 2;
763 TGeoTranslation* railHorMat1 =
new TGeoTranslation(xpos, ypos, 0);
764 railHorMat1->SetName(
"railhormat1");
765 railHorMat1->RegisterYourself();
767 TGeoTranslation* railHorMat2 =
new TGeoTranslation(xpos, -ypos, 0);
768 railHorMat2->SetName(
"railhormat2");
769 railHorMat2->RegisterYourself();
772 TString compoShape = Form(
"railvert%d",
index);
773 compoShape += Form(
"+railhor%d:railhormat1",
index);
774 compoShape += Form(
"+railhor%d:railhormat2",
index);
776 TGeoCompositeShape* railSh =
new TGeoCompositeShape(compoShape);
782TGeoVolume* V3Cage::createCageEndCap(
const TGeoManager* mgr)
799 Double_t rmin, rmid, rmax;
800 Double_t xlen, ylen, zlen;
801 Double_t xpos, ypos, zpos;
804 TGeoVolumeAssembly* endCapVol =
new TGeoVolumeAssembly(
"CageEndCap");
807 rmin = sCageEndCapDint / 2;
808 rmax = sCageEndCapDext / 2;
809 zlen = sCageEndCapFabThick / 2;
811 TGeoTube* baseFabric =
new TGeoTube(rmin, rmax, zlen);
812 baseFabric->SetName(
"endCapBaseFabric");
815 zlen = sCageEndCapFoamThick / 2;
817 TGeoTube* baseFoam =
new TGeoTube(rmin, rmax, zlen);
818 baseFoam->SetName(
"endCapBaseFoam");
821 xlen = (sCageEndCapDext - sCageEndCapXWidth) / 2;
824 TGeoBBox* sideCut =
new TGeoBBox(xlen, ylen, 2 * zlen);
825 sideCut->SetName(
"endCapBoxCut");
827 TGeoTube* sideHole =
new TGeoTube(0, sCageEndCapSideHoleR, 2 * zlen);
828 sideHole->SetName(
"endCapSideHole");
830 xlen = sCageEndCapCableCutWid / 2;
831 ylen = rmax - sCageEndCapCableCutR;
833 TGeoBBox* cableCut =
new TGeoBBox(xlen, ylen, 2 * zlen);
834 cableCut->SetName(
"endCapCableCut");
839 TGeoTranslation* boxCutTr1 =
new TGeoTranslation(
"boxCutTr1", xpos, 0, 0);
840 boxCutTr1->RegisterYourself();
842 TGeoTranslation* boxCutTr2 =
new TGeoTranslation(
"boxCutTr2", -xpos, 0, 0);
843 boxCutTr2->RegisterYourself();
845 xpos = sCageEndCapSideHoleX / 2;
847 TGeoTranslation* sidHolTr1 =
new TGeoTranslation(
"sideHoleTr1", xpos, 0, 0);
848 sidHolTr1->RegisterYourself();
850 TGeoTranslation* sidHolTr2 =
new TGeoTranslation(
"sideHoleTr2", -xpos, 0, 0);
851 sidHolTr2->RegisterYourself();
853 xpos = rmax * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
854 ypos = rmax * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad());
856 TGeoCombiTrans* cableMat1 =
new TGeoCombiTrans(xpos, ypos, 0,
new TGeoRotation(
"", -sCageEndCapCableCutPhi, 0, 0));
857 cableMat1->SetName(
"cableMat1");
858 cableMat1->RegisterYourself();
860 TGeoCombiTrans* cableMat2 =
new TGeoCombiTrans(-xpos, ypos, 0,
new TGeoRotation(
"", sCageEndCapCableCutPhi, 0, 0));
861 cableMat2->SetName(
"cableMat2");
862 cableMat2->RegisterYourself();
864 TGeoCombiTrans* cableMat3 =
new TGeoCombiTrans(xpos, -ypos, 0,
new TGeoRotation(
"", -180 + sCageEndCapCableCutPhi, 0, 0));
865 cableMat3->SetName(
"cableMat3");
866 cableMat3->RegisterYourself();
868 TGeoCombiTrans* cableMat4 =
new TGeoCombiTrans(-xpos, -ypos, 0,
new TGeoRotation(
"", 180 - sCageEndCapCableCutPhi, 0, 0));
869 cableMat4->SetName(
"cableMat4");
870 cableMat4->RegisterYourself();
873 TGeoCompositeShape* fabricSh =
new TGeoCompositeShape(
"endCapBaseFabric-endCapBoxCut:boxCutTr1-endCapBoxCut:boxCutTr2-endCapSideHole:sideHoleTr1-endCapSideHole:sideHoleTr2-endCapCableCut:cableMat1-endCapCableCut:cableMat2-endCapCableCut:cableMat3-endCapCableCut:cableMat4");
876 TGeoCompositeShape* foamSh =
new TGeoCompositeShape(
"endCapBaseFoam-endCapBoxCut:boxCutTr1-endCapBoxCut:boxCutTr2-endCapSideHole:sideHoleTr1-endCapSideHole:sideHoleTr2-endCapCableCut:cableMat1-endCapCableCut:cableMat2-endCapCableCut:cableMat3-endCapCableCut:cableMat4");
882 TGeoPcon* rndCrosSh =
new TGeoPcon(0, 360, 6);
884 rmin = sCageECRoundCrossDmin / 2;
885 rmid = sCageECRoundCrossDmid / 2;
886 rmax = sCageECRoundCrossDmax / 2;
888 rndCrosSh->DefineSection(0, -sCageECRoundCrossZext, rmin, rmax);
889 rndCrosSh->DefineSection(1, -sCageECRoundCrossZint, rmin, rmax);
890 rndCrosSh->DefineSection(2, -sCageECRoundCrossZint, rmin, rmid);
891 rndCrosSh->DefineSection(3, sCageECRoundCrossZint, rmin, rmid);
892 rndCrosSh->DefineSection(4, sCageECRoundCrossZint, rmin, rmax);
893 rndCrosSh->DefineSection(5, sCageECRoundCrossZext, rmin, rmax);
896 TGeoCompositeShape* cblCrosSh = createCageEndCapCableCross(mgr);
899 TGeoMedium* medFabric = mgr->GetMedium(Form(
"%s_M46J6K$",
GetDetName()));
900 TGeoMedium* medFoam = mgr->GetMedium(Form(
"%s_ROHACELL$",
GetDetName()));
901 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
903 TGeoVolume* fabVol =
new TGeoVolume(
"CageEndCapFabric", fabricSh, medFabric);
904 fabVol->SetFillColor(kBlue);
905 fabVol->SetLineColor(kBlue);
907 TGeoVolume* foamVol =
new TGeoVolume(
"CageEndCapFoam", foamSh, medFoam);
908 foamVol->SetFillColor(kYellow);
909 foamVol->SetLineColor(kYellow);
911 TGeoVolume* rndCrosVol =
new TGeoVolume(
"CageEndCapRoundCross", rndCrosSh, medAl);
912 rndCrosVol->SetFillColor(kGray);
913 rndCrosVol->SetLineColor(kGray);
915 TGeoVolume* cblCrosVol =
new TGeoVolume(
"CageEndCapCableCross", cblCrosSh, medAl);
916 cblCrosVol->SetFillColor(kGray);
917 cblCrosVol->SetLineColor(kGray);
920 endCapVol->AddNode(foamVol, 1,
nullptr);
922 zpos = (sCageEndCapFoamThick + sCageEndCapFabThick) / 2;
923 endCapVol->AddNode(fabVol, 1,
new TGeoTranslation(0, 0, zpos));
924 endCapVol->AddNode(fabVol, 2,
new TGeoTranslation(0, 0, -zpos));
926 endCapVol->AddNode(rndCrosVol, 1,
nullptr);
928 rmax = sCageEndCapDext / 2 - sCageECCableCrosTotHi;
929 xpos = rmax * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
930 ypos = rmax * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad());
931 endCapVol->AddNode(cblCrosVol, 1,
new TGeoCombiTrans(xpos, ypos, 0,
new TGeoRotation(
"", -sCageEndCapCableCutPhi, 0, 0)));
932 endCapVol->AddNode(cblCrosVol, 2,
new TGeoCombiTrans(-xpos, ypos, 0,
new TGeoRotation(
"", sCageEndCapCableCutPhi, 0, 0)));
933 endCapVol->AddNode(cblCrosVol, 3,
new TGeoCombiTrans(xpos, -ypos, 0,
new TGeoRotation(
"", -180 + sCageEndCapCableCutPhi, 0, 0)));
934 endCapVol->AddNode(cblCrosVol, 4,
new TGeoCombiTrans(-xpos, -ypos, 0,
new TGeoRotation(
"", 180 - sCageEndCapCableCutPhi, 0, 0)));
940TGeoCompositeShape* V3Cage::createCageEndCapCableCross(
const TGeoManager* mgr)
958 Double_t rmin, rmid, rmax;
959 Double_t xlen, ylen, zlen;
960 Double_t xpos, ypos, zpos;
963 TString crossShape =
"";
966 xlen = sCageECCableCrosInXWid / 2;
967 ylen = sCageECCableCrosInThik / 2;
968 zlen = sCageECCableCrosInZLen / 2;
969 TGeoBBox* cabCrosLow =
new TGeoBBox(xlen, ylen, zlen);
970 cabCrosLow->SetName(
"CabCrosLow");
972 TGeoTranslation* matCrosLow =
new TGeoTranslation(
"MatCrosLow", 0, ylen, 0);
973 matCrosLow->RegisterYourself();
975 crossShape =
"CabCrosLow:MatCrosLow";
978 xlen = (sCageECCableCrosInXWid + 2 * (sCageECCableCrosSidWid - sCageECCableCrosInThik)) / 2;
979 ylen = sCageECCableCrosSidWid / 2;
980 zlen = (sCageECCableCrosTotZ - sCageECCableCrosInZLen) / 4;
981 TGeoBBox* cabCrosSide =
new TGeoBBox(xlen, ylen, zlen);
982 cabCrosSide->SetName(
"CabCrosSide");
984 ypos = 2 * cabCrosLow->GetDY() - cabCrosSide->GetDY();
985 zpos = cabCrosLow->GetDZ() + cabCrosSide->GetDZ();
986 TGeoTranslation* matCrosSid1 =
new TGeoTranslation(
"MatCrosSid1", 0, ypos, zpos);
987 matCrosSid1->RegisterYourself();
988 TGeoTranslation* matCrosSid2 =
new TGeoTranslation(
"MatCrosSid2", 0, ypos, -zpos);
989 matCrosSid2->RegisterYourself();
991 crossShape +=
"+CabCrosSide:MatCrosSid1+CabCrosSide:MatCrosSid2";
995 rmax = sCageEndCapDext / 2;
996 xlen = sCageECCableCrosInXWid / 2;
998 Double_t apothem = TMath::Sqrt(rmax * rmax - xlen * xlen);
999 Double_t sagitta = rmax - apothem;
1001 xlen = sCageECCableCrosInThik / 2;
1002 ylen = (sCageECCableCrosTotHi - sagitta - sCageECCableCrosInThik) / 2;
1003 zlen = sCageECCableCrosInZLen / 2;
1004 TGeoBBox* cabCrosLat =
new TGeoBBox(xlen, ylen, zlen);
1005 cabCrosLat->SetName(
"CabCrosLateral");
1007 xpos = 0.5 * sCageECCableCrosInXWid - cabCrosLat->GetDX();
1008 ypos = cabCrosLat->GetDY() + sCageECCableCrosInThik;
1009 TGeoTranslation* matCrosLat1 =
new TGeoTranslation(
"MatCrosLat1", xpos, ypos, 0);
1010 matCrosLat1->RegisterYourself();
1011 TGeoTranslation* matCrosLat2 =
new TGeoTranslation(
"MatCrosLat2", -xpos, ypos, 0);
1012 matCrosLat2->RegisterYourself();
1014 crossShape +=
"+CabCrosLateral:MatCrosLat1+CabCrosLateral:MatCrosLat2";
1017 xlen = sCageECCableCrosSidWid / 2;
1018 zlen = cabCrosSide->GetDZ();
1019 TGeoBBox* cabCrosLatSide =
new TGeoBBox(xlen, ylen, zlen);
1020 cabCrosLatSide->SetName(
"CabCrosLatSide");
1022 xpos = cabCrosSide->GetDX() - cabCrosLatSide->GetDX();
1023 zpos = cabCrosLat->GetDZ() + cabCrosLatSide->GetDZ();
1024 TGeoTranslation* matCrosLatSid1 =
new TGeoTranslation(
"MatCrosLatSid1", xpos, ypos, zpos);
1025 matCrosLatSid1->RegisterYourself();
1026 TGeoTranslation* matCrosLatSid2 =
new TGeoTranslation(
"MatCrosLatSid2", xpos, ypos, -zpos);
1027 matCrosLatSid2->RegisterYourself();
1028 TGeoTranslation* matCrosLatSid3 =
new TGeoTranslation(
"MatCrosLatSid3", -xpos, ypos, zpos);
1029 matCrosLatSid3->RegisterYourself();
1030 TGeoTranslation* matCrosLatSid4 =
new TGeoTranslation(
"MatCrosLatSid4", -xpos, ypos, -zpos);
1031 matCrosLatSid4->RegisterYourself();
1033 crossShape +=
"+CabCrosLatSide:MatCrosLatSid1+CabCrosLatSide:MatCrosLatSid2+CabCrosLatSide:MatCrosLatSid3+CabCrosLatSide:MatCrosLatSid4";
1036 xlen = sCageECCableCrosInXWid / 2;
1037 Double_t
phi = TMath::ASin(xlen / rmax) * TMath::RadToDeg();
1038 rmin = rmax - sCageECCableCrosSidWid;
1039 zlen = sCageECCableCrosTotZ / 2;
1040 TGeoTubeSeg* cabCrosRnd =
new TGeoTubeSeg(rmin, rmax, zlen, 90 - phi, 90 + phi);
1041 cabCrosRnd->SetName(
"CabCrosRoundTop");
1043 ypos = -rmax + sCageECCableCrosTotHi;
1044 TGeoTranslation* matCrosRnd =
new TGeoTranslation(
"MatCrosRound", 0, ypos, 0);
1045 matCrosRnd->RegisterYourself();
1047 crossShape +=
"+CabCrosRoundTop:MatCrosRound";
1051 TGeoCompositeShape* cableCross =
new TGeoCompositeShape(crossShape.Data());
1056TGeoVolume* V3Cage::createBeamPipeSupport(
const TGeoManager* mgr)
1076 Double_t xv[nv], yv[nv];
1077 Double_t xpos, ypos, zpos;
1080 TGeoVolumeAssembly* bpSuppVol =
new TGeoVolumeAssembly(
"CageBeamPipeSupport");
1083 TGeoCompositeShape* lowCollarSh = createBPSuppLowerCollar();
1086 TGeoCompositeShape* upCollarSh = createBPSuppUpperCollar();
1089 TGeoCompositeShape* collarBeamSh = createBPSuppCollarBeam();
1092 TGeoCompositeShape* bracketSh = createBPSuppBracket();
1095 TGeoCompositeShape* clampSh = createBPSuppClamp();
1098 TGeoTube* bushSh =
new TGeoTube(0.5 * sBPSuppCollarBushD, 0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppBracketWidth);
1101 TGeoBBox* shimSh =
new TGeoBBox(0.5 * sBPSuppClampShimWid, 0.5 * sBPSuppClampShimThick, 0.5 * sBPSuppClampShimLen);
1104 TGeoTube* m4ScrewSh =
new TGeoTube(0, 0.5 * sBPSuppCollarM4Diam, 0.5 * sBPSuppCollarM4High);
1107 TGeoTube* m5ScrewSh =
new TGeoTube(0, 0.5 * sBPSuppClampM5Diam, 0.5 * sBPSuppClampM5High);
1110 TGeoCone* insHeadSh =
new TGeoCone(0.5 * sBPSuppClampInsH, 0, 0.5 * sBPSuppClampInsDmin, 0, 0.5 * sBPSuppClampInsDmax);
1113 TGeoMedium* medCFRP = mgr->GetMedium(Form(
"%s_CFRP$",
GetDetName()));
1114 TGeoMedium* medTitanium = mgr->GetMedium(Form(
"%s_TITANIUM$",
GetDetName()));
1115 TGeoMedium* medSteel = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
1116 TGeoMedium* medBrass = mgr->GetMedium(Form(
"%s_BRASS$",
GetDetName()));
1117 TGeoMedium* medVespel = mgr->GetMedium(Form(
"%s_VESPEL$",
GetDetName()));
1119 Color_t kTitanium = kGray + 1;
1121 TGeoVolume* lowCollarVol =
new TGeoVolume(
"BPSupportLowerCollar", lowCollarSh, medTitanium);
1122 lowCollarVol->SetFillColor(kTitanium);
1123 lowCollarVol->SetLineColor(kTitanium);
1125 TGeoVolume* upCollarVol =
new TGeoVolume(
"BPSupportUpperCollar", upCollarSh, medTitanium);
1126 upCollarVol->SetFillColor(kTitanium);
1127 upCollarVol->SetLineColor(kTitanium);
1129 TGeoVolume* bushVol =
new TGeoVolume(
"BPSupportCollarBushing", bushSh, medVespel);
1130 bushVol->SetFillColor(kGreen);
1131 bushVol->SetLineColor(kGreen);
1133 TGeoVolume* collarBeamVol =
new TGeoVolume(
"BPSupportCollarBeam", collarBeamSh, medCFRP);
1134 collarBeamVol->SetFillColor(kBlue);
1135 collarBeamVol->SetLineColor(kBlue);
1137 TGeoVolume* bracketVol =
new TGeoVolume(
"BPSupportBracket", bracketSh, medTitanium);
1138 bracketVol->SetFillColor(kTitanium);
1139 bracketVol->SetLineColor(kTitanium);
1141 TGeoVolume* clampVol =
new TGeoVolume(
"BPSupportClamp", clampSh, medTitanium);
1142 clampVol->SetFillColor(kTitanium);
1143 clampVol->SetLineColor(kTitanium);
1145 TGeoVolume* shimVol =
new TGeoVolume(
"BPSupportClampShim", shimSh, medBrass);
1146 shimVol->SetFillColor(kOrange - 4);
1147 shimVol->SetLineColor(kOrange - 4);
1149 TGeoVolume* m4ScrewVol =
new TGeoVolume(
"BPSupportCollarScrew", m4ScrewSh, medTitanium);
1150 m4ScrewVol->SetFillColor(kTitanium);
1151 m4ScrewVol->SetLineColor(kTitanium);
1153 TGeoVolume* m5ScrewVol =
new TGeoVolume(
"BPSupportClampScrew", m5ScrewSh, medSteel);
1154 m5ScrewVol->SetFillColor(kGray);
1155 m5ScrewVol->SetLineColor(kGray);
1157 TGeoVolume* insHeadVol =
new TGeoVolume(
"BPSupportClampInsert", insHeadSh, medSteel);
1158 insHeadVol->SetFillColor(kGray);
1159 insHeadVol->SetLineColor(kGray);
1162 bpSuppVol->AddNode(lowCollarVol, 1,
nullptr);
1164 ypos = sBPSuppLowCollTailHei / 2;
1165 bpSuppVol->AddNode(upCollarVol, 1,
new TGeoTranslation(0, ypos, 0));
1167 bpSuppVol->AddNode(bushVol, 1,
new TGeoTranslation(0, ypos, 0));
1169 xpos = sBPSuppCollarM4XDist / 2;
1170 ypos += (sBPSuppUpperCollarHei + m4ScrewSh->GetDz());
1171 zpos = sBPSuppCollarM4ZPos;
1172 bpSuppVol->AddNode(m4ScrewVol, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0)));
1173 bpSuppVol->AddNode(m4ScrewVol, 2,
new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0)));
1174 bpSuppVol->AddNode(m4ScrewVol, 3,
new TGeoCombiTrans(xpos, ypos, -zpos,
new TGeoRotation(
"", 0, 90, 0)));
1175 bpSuppVol->AddNode(m4ScrewVol, 4,
new TGeoCombiTrans(-xpos, ypos, -zpos,
new TGeoRotation(
"", 0, 90, 0)));
1177 xpos = sBPSuppLowerCollarLen / 2 - sBPSuppBracketInLen + sBPSuppCollarBeamLen / 2;
1178 bpSuppVol->AddNode(collarBeamVol, 1,
new TGeoCombiTrans(xpos, 0, 0,
new TGeoRotation(
"", 0, 90, 0)));
1179 bpSuppVol->AddNode(collarBeamVol, 2,
new TGeoCombiTrans(-xpos, 0, 0,
new TGeoRotation(
"", 0, 90, 0)));
1181 xpos += (sBPSuppCollarBeamLen / 2 - sBPSuppBracketInLen);
1182 bpSuppVol->AddNode(bracketVol, 1,
new TGeoTranslation(xpos, 0, 0));
1183 bpSuppVol->AddNode(bracketVol, 2,
new TGeoCombiTrans(-xpos, 0, 0,
new TGeoRotation(
"", 90, 180, -90)));
1185 xpos = 0.5 * sBPSuppClampsXDist - sBPSuppClampTotWid + shimSh->GetDX();
1186 ypos = -shimSh->GetDY();
1187 bpSuppVol->AddNode(shimVol, 1,
new TGeoTranslation(xpos, ypos, 0));
1188 bpSuppVol->AddNode(shimVol, 2,
new TGeoTranslation(-xpos, ypos, 0));
1190 xpos = 0.5 * sBPSuppClampsXDist - sBPSuppClampLatThick;
1191 ypos -= shimSh->GetDY();
1192 bpSuppVol->AddNode(clampVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1193 bpSuppVol->AddNode(clampVol, 2,
new TGeoCombiTrans(xpos, ypos, 0,
new TGeoRotation(
"", 90, 180, -90)));
1195 xpos -= m5ScrewSh->GetDz();
1196 ypos += (0.5 * sBPSuppClampTotHei - sBPSuppClampShelfHei);
1197 zpos = sBPSuppClampM5ZPos;
1198 bpSuppVol->AddNode(m5ScrewVol, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, -90)));
1199 bpSuppVol->AddNode(m5ScrewVol, 2,
new TGeoCombiTrans(xpos, ypos, -zpos,
new TGeoRotation(
"", 90, 90, -90)));
1200 bpSuppVol->AddNode(m5ScrewVol, 3,
new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, -90)));
1201 bpSuppVol->AddNode(m5ScrewVol, 4,
new TGeoCombiTrans(-xpos, ypos, -zpos,
new TGeoRotation(
"", 90, 90, -90)));
1203 xpos = 0.5 * sBPSuppClampsXDist - sBPSuppClampInsXPos;
1204 ypos = sBPSuppBracketTailHei + insHeadSh->GetDz();
1205 zpos = sBPSuppClampInsZPos;
1206 bpSuppVol->AddNode(insHeadVol, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0)));
1207 bpSuppVol->AddNode(insHeadVol, 2,
new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0)));
1208 bpSuppVol->AddNode(insHeadVol, 3,
new TGeoCombiTrans(xpos, ypos, -zpos,
new TGeoRotation(
"", 0, 90, 0)));
1209 bpSuppVol->AddNode(insHeadVol, 4,
new TGeoCombiTrans(-xpos, ypos, -zpos,
new TGeoRotation(
"", 0, 90, 0)));
1215TGeoCompositeShape* V3Cage::createBPSuppLowerCollar()
1232 const Int_t nv = 12;
1233 Double_t xv[nv], yv[nv], xy8[16];
1235 Double_t xpos, ypos;
1238 Double_t totlen = (sBPSuppLowerCollarLen - sBPSuppCollarIntD) / 2;
1239 Double_t xtail = (sBPSuppLowCollHolDist - sBPSuppCollarIntD) / 2;
1240 Double_t taillen = sBPSuppLowerCollarTlX - sBPSuppCollarIntD / 2;
1243 yv[0] = -sBPSuppCollarBeamHei / 2;
1244 xv[1] = totlen - xtail;
1246 xv[2] = totlen - taillen;
1247 yv[2] = -sBPSuppLowCollTailHei / 2;
1251 yv[4] = sBPSuppLowCollTailHei / 2;
1259 yv[8] = sBPSuppBracketInHei / 2;
1260 xv[9] = sBPSuppBracketInLen;
1267 zlen = sBPSuppBracketWidth / 2;
1268 TGeoXtru* brktlat =
new TGeoXtru(2);
1269 brktlat->DefinePolygon(nv, xv, yv);
1270 brktlat->DefineSection(0, -zlen);
1271 brktlat->DefineSection(1, zlen);
1272 brktlat->SetName(
"latBrackBody");
1275 zlen = sBPSuppBracketWidth / 2 + 0.001;
1276 TGeoTube* brktcenthole =
new TGeoTube(0, sBPSuppBrktCentHoleD / 2, zlen);
1277 brktcenthole->SetName(
"latBrackCentHole");
1279 xpos = totlen - xtail;
1280 TGeoTranslation* brktcenthmat =
new TGeoTranslation(xpos, 0, 0);
1281 brktcenthmat->SetName(
"latCentHoleMat");
1282 brktcenthmat->RegisterYourself();
1288 xy8[2] = -sBPSuppBrktLatHoleW;
1289 xy8[3] = -sBPSuppBrktLatHoleH / 2;
1294 for (Int_t
i = 0;
i < 8;
i++) {
1295 xy8[8 +
i] = xy8[
i];
1297 TGeoArb8* brktlathole =
new TGeoArb8(zlen, xy8);
1298 brktlathole->SetName(
"latBrackLatHole");
1300 xpos = totlen - taillen;
1301 TGeoTranslation* brktlathmat =
new TGeoTranslation(xpos, 0, 0);
1302 brktlathmat->SetName(
"latLatHoleMat");
1303 brktlathmat->RegisterYourself();
1306 TGeoCompositeShape* latbrkt =
new TGeoCompositeShape(
"latBrackBody-latBrackCentHole:latCentHoleMat-latBrackLatHole:latLatHoleMat");
1307 latbrkt->SetName(
"lateralBracket");
1310 xpos = sBPSuppLowerCollarLen / 2;
1311 TGeoTranslation* latmat1 =
new TGeoTranslation(-xpos, 0, 0);
1312 latmat1->SetName(
"latBrackMat1");
1313 latmat1->RegisterYourself();
1315 TGeoCombiTrans* latmat2 =
new TGeoCombiTrans(xpos, 0, 0,
new TGeoRotation(
"", 90, 180, -90));
1316 latmat2->SetName(
"latBrackMat2");
1317 latmat2->RegisterYourself();
1320 TGeoTubeSeg* collar =
new TGeoTubeSeg(0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppCollarExtD, 0.5 * sBPSuppBracketWidth, 180, 360);
1321 collar->SetName(
"lowerCollar");
1323 ypos = brktlat->GetY(4);
1324 TGeoTranslation* collmat =
new TGeoTranslation(0, ypos, 0);
1325 collmat->SetName(
"lowerCollMat");
1326 collmat->RegisterYourself();
1330 TGeoCompositeShape* collarShape =
new TGeoCompositeShape(
"lowerCollar:lowerCollMat+lateralBracket:latBrackMat1+lateralBracket:latBrackMat2");
1335TGeoCompositeShape* V3Cage::createBPSuppUpperCollar()
1352 Double_t xpos, ypos;
1355 xlen = (sBPSuppUpperCollarLen - sBPSuppCollarIntD) / 2;
1356 TGeoBBox* plate =
new TGeoBBox(0.5 * xlen, 0.5 * sBPSuppUpperCollarHei, 0.5 * sBPSuppBracketWidth);
1357 plate->SetName(
"lateralPlate");
1359 xpos = sBPSuppUpperCollarLen / 2 - plate->GetDX();
1360 ypos = plate->GetDY();
1361 TGeoTranslation* latplmat1 =
new TGeoTranslation(xpos, ypos, 0);
1362 latplmat1->SetName(
"lateralPlateMat1");
1363 latplmat1->RegisterYourself();
1365 TGeoTranslation* latplmat2 =
new TGeoTranslation(-xpos, ypos, 0);
1366 latplmat2->SetName(
"lateralPlateMat2");
1367 latplmat2->RegisterYourself();
1370 TGeoTubeSeg* collar =
new TGeoTubeSeg(0.5 * sBPSuppCollarIntD, 0.5 * sBPSuppCollarExtD, 0.5 * sBPSuppBracketWidth, 0, 180);
1371 collar->SetName(
"upperCollar");
1375 TGeoCompositeShape* collarShape =
new TGeoCompositeShape(
"upperCollar+lateralPlate:lateralPlateMat1+lateralPlate:lateralPlateMat2");
1380TGeoCompositeShape* V3Cage::createBPSuppCollarBeam()
1398 Double_t xv[nv], yv[nv];
1399 Double_t xlen, xwid, ylen, zlen;
1403 xlen = (sBPSuppCollarBeamLen - 2 * sBPSuppBracketInLen) / 2;
1404 xwid = (sBPSuppCollarBeamWid - sBPSuppBracketWidth) / 2;
1406 yv[0] = -sBPSuppBracketWidth / 2;
1407 xv[1] = xv[0] + xwid;
1408 yv[1] = -sBPSuppCollarBeamWid / 2;
1413 for (Int_t
i = 0;
i < 4;
i++) {
1414 xv[4 +
i] = xv[3 -
i];
1415 yv[4 +
i] = -yv[3 -
i];
1418 zlen = sBPSuppCollarBeamHei / 2;
1419 TGeoXtru* colcent =
new TGeoXtru(2);
1420 colcent->SetName(
"collarCentral");
1421 colcent->DefinePolygon(nv, xv, yv);
1422 colcent->DefineSection(0, -zlen);
1423 colcent->DefineSection(1, zlen);
1426 xlen = sBPSuppBracketInLen / 2;
1427 ylen = sBPSuppBracketWidth / 2;
1428 zlen = sBPSuppBracketInHei / 2;
1429 TGeoBBox* colins =
new TGeoBBox(
"collarInsert", xlen, ylen, zlen);
1431 xpos = colcent->GetX(0) - colins->GetDX();
1432 TGeoTranslation* insmat1 =
new TGeoTranslation(-xpos, 0, 0);
1433 insmat1->SetName(
"colInsMat1");
1434 insmat1->RegisterYourself();
1436 TGeoTranslation* insmat2 =
new TGeoTranslation(xpos, 0, 0);
1437 insmat2->SetName(
"colInsMat2");
1438 insmat2->RegisterYourself();
1442 TGeoCompositeShape* beamShape =
new TGeoCompositeShape(
"collarCentral+collarInsert:colInsMat1+collarInsert:colInsMat2");
1447TGeoCompositeShape* V3Cage::createBPSuppBracket()
1464 const Int_t nv = 12;
1465 Double_t xv[nv], yv[nv];
1471 yv[0] = -sBPSuppCollarBeamHei / 2;
1472 xv[1] = sBPSuppBracketTotLen - sBPSuppBrktCentHoleX;
1474 xv[2] = sBPSuppBracketTotLen - sBPSuppBracketTailLen;
1476 xv[3] = sBPSuppBracketTotLen;
1479 yv[4] = sBPSuppBracketTailHei;
1487 yv[8] = sBPSuppBracketInHei / 2;
1488 xv[9] = sBPSuppBracketInLen;
1495 zlen = sBPSuppBracketWidth / 2;
1496 TGeoXtru* brktbody =
new TGeoXtru(2);
1497 brktbody->DefinePolygon(nv, xv, yv);
1498 brktbody->DefineSection(0, -zlen);
1499 brktbody->DefineSection(1, zlen);
1500 brktbody->SetName(
"bracketBody");
1503 zlen = sBPSuppBracketWidth / 2 + 0.001;
1504 TGeoTube* brktcenthole =
new TGeoTube(0, sBPSuppBrktCentHoleD / 2, zlen);
1505 brktcenthole->SetName(
"bracketCentHole");
1507 xpos = sBPSuppBracketTotLen - sBPSuppBrktCentHoleX;
1508 TGeoTranslation* brktcenthmat =
new TGeoTranslation(xpos, -sBPSuppBrktHolesY, 0);
1509 brktcenthmat->SetName(
"bracketCentHMat");
1510 brktcenthmat->RegisterYourself();
1513 TGeoTube* brktlathole =
new TGeoTube(0, sBPSuppBrktLatHoleD / 2, zlen);
1514 brktlathole->SetName(
"bracketLatHole");
1516 xpos = sBPSuppBracketTotLen - sBPSuppBrktLatHoleX;
1517 TGeoTranslation* brktlathmat =
new TGeoTranslation(xpos, sBPSuppBrktHolesY, 0);
1518 brktlathmat->SetName(
"bracketLatHMat");
1519 brktlathmat->RegisterYourself();
1523 TGeoCompositeShape* bracketShape =
new TGeoCompositeShape(
"bracketBody-bracketCentHole:bracketCentHMat-bracketLatHole:bracketLatHMat");
1525 return bracketShape;
1528TGeoCompositeShape* V3Cage::createBPSuppClamp()
1545 Double_t xlen, ylen, zlen;
1546 Double_t xpos, ypos;
1549 xlen = sBPSuppClampLatThick / 2;
1550 ylen = sBPSuppClampTotHei / 2;
1551 zlen = sBPSuppClampTotLen / 2;
1552 TGeoBBox* clampwall =
new TGeoBBox(xlen, ylen, zlen);
1553 clampwall->SetName(
"clampWall");
1555 xpos = -clampwall->GetDX();
1556 ypos = clampwall->GetDY() - sBPSuppClampShelfHei;
1557 TGeoTranslation* clampwallmat =
new TGeoTranslation(xpos, ypos, 0);
1558 clampwallmat->SetName(
"clampWallMat");
1559 clampwallmat->RegisterYourself();
1562 xlen = (sBPSuppClampTotWid - sBPSuppClampLatThick) / 2;
1563 ylen = sBPSuppClampShelfHei / 2;
1564 zlen = sBPSuppClampShelfLen / 2;
1565 TGeoBBox* clampshelf =
new TGeoBBox(xlen, ylen, zlen);
1566 clampshelf->SetName(
"clampShelf");
1568 xpos = clampshelf->GetDX();
1569 ypos = -clampshelf->GetDY();
1570 TGeoTranslation* clampshelfmat =
new TGeoTranslation(xpos, ypos, 0);
1571 clampshelfmat->SetName(
"clampShelfMat");
1572 clampshelfmat->RegisterYourself();
1577 TGeoCompositeShape* clampShape =
new TGeoCompositeShape(
"clampWall:clampWallMat+clampShelf:clampShelfMat");
1582TGeoVolume* V3Cage::createCageClosingCross(
const TGeoManager* mgr)
1600 Double_t xv[nv], yv[nv];
1601 Double_t xlen, ylen, zlen;
1602 Double_t xpos, ypos;
1609 xv[1] = (sCageCrossXWidthTot - sCageCrossXWidthInt) / 2;
1612 yv[2] = (sCageCrossYHeightTot - sCageCrossYHeightInt) / 2;
1613 xv[3] = (sCageCrossXWidthExt - sCageCrossXWidthInt) / 2;
1616 yv[4] = yv[3] + sCageCrossYHeightInt;
1620 yv[6] = sCageCrossYHeightTot;
1624 zlen = sCageCrossZLength / 2;
1626 TGeoXtru* vpost =
new TGeoXtru(2);
1627 vpost->SetName(
"crossvertpost");
1628 vpost->DefinePolygon(nv, xv, yv);
1629 vpost->DefineSection(0, -zlen);
1630 vpost->DefineSection(1, zlen);
1633 xpos = sCageCrossXWidthInt / 2;
1634 TGeoTranslation* vpostmat1 =
new TGeoTranslation(
"vertpostmat1", xpos, 0, 0);
1635 vpostmat1->RegisterYourself();
1637 TGeoCombiTrans* vpostmat2 =
new TGeoCombiTrans(-xpos, 0, 0,
new TGeoRotation(
"", 90, 180, -90));
1638 vpostmat2->SetName(
"vertpostmat2");
1639 vpostmat2->RegisterYourself();
1641 compoShape = Form(
"crossvertpost:vertpostmat1+crossvertpost:vertpostmat2");
1644 Double_t
leg = vpost->GetY(4);
1645 xlen = TMath::Sqrt(sCageCrossXWidthInt * sCageCrossXWidthInt +
leg *
leg) / 2;
1646 ylen = sCageCrossBarThick / 2;
1647 TGeoBBox* xpost =
new TGeoBBox(
"crossoblqpost", xlen, ylen, zlen);
1650 Double_t
phi = sCageCrossBarPhi / 2;
1651 ypos = sCageCrossYHeightTot - sCageCrossYMid;
1653 TGeoCombiTrans* xpostmat1 =
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", phi, 0, 0));
1654 xpostmat1->SetName(
"oblqpostmat1");
1655 xpostmat1->RegisterYourself();
1657 TGeoCombiTrans* xpostmat2 =
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", -phi, 0, 0));
1658 xpostmat2->SetName(
"oblqpostmat2");
1659 xpostmat2->RegisterYourself();
1661 compoShape += Form(
"+crossoblqpost:oblqpostmat1+crossoblqpost:oblqpostmat2");
1664 TGeoCompositeShape* closCrossSh =
new TGeoCompositeShape(compoShape);
1667 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
1669 TGeoVolume* closCrossVol =
new TGeoVolume(
"CageClosingCross", closCrossSh, medAl);
1670 closCrossVol->SetFillColor(kGray);
1671 closCrossVol->SetLineColor(kGray);
1674 return closCrossVol;
1677void V3Cage::createAndPlaceMFTRailsInsideCage(TGeoVolume* mother,
const TGeoManager* mgr)
1695 Double_t rdist, rpos, xpos, yposup, yposdw, zpos,
alpha;
1696 Double_t xbox, ybox;
1699 TGeoVolume* cageMFTRails = createMFTRailsPair(mother->GetMedium(), mgr);
1702 TGeoVolume* cageMFTRailsHinge = createMFTRailsHinge(mgr);
1705 xbox = (
static_cast<TGeoBBox*
>(cageMFTRails->GetShape()))->GetDX();
1706 ybox = (
static_cast<TGeoBBox*
>(cageMFTRails->GetShape()))->GetDY();
1708 rdist = TMath::Sqrt(sCageCoverRint * sCageCoverRint - xbox * xbox);
1709 rpos = rdist - ybox;
1712 xpos = rpos * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
1713 yposup = rpos * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad()) + sCageYInBarrel;
1714 yposdw = rpos * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad()) - sCageYInBarrel;
1715 zpos = sCageMFTRailZPos;
1717 alpha = -sCageEndCapCableCutPhi + 180;
1718 mother->AddNode(cageMFTRails, 1,
new TGeoCombiTrans(xpos, yposup, zpos,
new TGeoRotation(
"",
alpha, 0, 0)));
1719 alpha = sCageEndCapCableCutPhi + 180;
1720 mother->AddNode(cageMFTRails, 2,
new TGeoCombiTrans(-xpos, yposup, zpos,
new TGeoRotation(
"",
alpha, 0, 0)));
1722 alpha = sCageEndCapCableCutPhi;
1723 mother->AddNode(cageMFTRails, 3,
new TGeoCombiTrans(xpos, -yposdw, zpos,
new TGeoRotation(
"",
alpha, 0, 0)));
1724 alpha = -sCageEndCapCableCutPhi;
1725 mother->AddNode(cageMFTRails, 4,
new TGeoCombiTrans(-xpos, -yposdw, zpos,
new TGeoRotation(
"",
alpha, 0, 0)));
1728 xpos = rdist * TMath::Sin(sCageEndCapCableCutPhi * TMath::DegToRad());
1729 yposup = rdist * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad()) + sCageYInBarrel;
1730 yposdw = rdist * TMath::Cos(sCageEndCapCableCutPhi * TMath::DegToRad()) - sCageYInBarrel;
1731 zpos = (
static_cast<TGeoBBox*
>(cageMFTRails->GetShape()))->GetDZ() + sCageMFTRailZPos;
1733 alpha = sCageEndCapCableCutPhi;
1734 mother->AddNode(cageMFTRailsHinge, 1,
new TGeoCombiTrans(xpos, yposup, zpos,
new TGeoRotation(
"", -
alpha, 0, 0)));
1735 mother->AddNode(cageMFTRailsHinge, 2,
new TGeoCombiTrans(-xpos, yposup, zpos,
new TGeoRotation(
"",
alpha, 0, 0)));
1737 mother->AddNode(cageMFTRailsHinge, 3,
new TGeoCombiTrans(xpos, -yposdw, zpos,
new TGeoRotation(
"", 180 +
alpha, 0, 0)));
1738 mother->AddNode(cageMFTRailsHinge, 4,
new TGeoCombiTrans(-xpos, -yposdw, zpos,
new TGeoRotation(
"", 180 -
alpha, 0, 0)));
1740 zpos = (
static_cast<TGeoBBox*
>(cageMFTRails->GetShape()))->GetDZ() - sCageMFTRailZPos;
1741 mother->AddNode(cageMFTRailsHinge, 5,
new TGeoCombiTrans(xpos, yposup, -zpos,
new TGeoRotation(
"", 90, 180, -90 +
alpha)));
1742 mother->AddNode(cageMFTRailsHinge, 6,
new TGeoCombiTrans(-xpos, yposup, -zpos,
new TGeoRotation(
"", 90, 180, -90 -
alpha)));
1744 mother->AddNode(cageMFTRailsHinge, 7,
new TGeoCombiTrans(xpos, -yposdw, -zpos,
new TGeoRotation(
"", 90, 180, 90 -
alpha)));
1745 mother->AddNode(cageMFTRailsHinge, 8,
new TGeoCombiTrans(-xpos, -yposdw, -zpos,
new TGeoRotation(
"", 90, 180, 90 +
alpha)));
1750TGeoVolume* V3Cage::createMFTRailsPair(
const TGeoMedium* motmed,
const TGeoManager* mgr)
1771 const Int_t nv = 16;
1772 Double_t xv[nv], yv[nv];
1773 Double_t deltah, xlen, ylen, zlen;
1774 Double_t xpos, ypos;
1777 xv[0] = sCageMFTRailBaseWidth / 2;
1780 yv[1] = sCageMFTRailTotHeight - sCageMFTRailExtHeight;
1781 xv[2] = sCageMFTRailTotWidth / 2;
1784 yv[3] = sCageMFTRailTotHeight;
1785 xv[4] = sCageMFTRailIntWidth / 2;
1787 deltah = (sCageMFTRailExtHeight - sCageMFTRailIntHeight) / 2;
1789 yv[5] = yv[4] - deltah;
1790 xv[6] = sCageMFTRailExtWidth / 2;
1793 yv[7] = yv[6] - sCageMFTRailIntHeight;
1795 for (Int_t
i = 8;
i < nv;
i++) {
1796 xv[
i] = -xv[15 -
i];
1800 zlen = sCageMFTRailZLen / 2;
1802 TGeoXtru* mftRailSh =
new TGeoXtru(2);
1803 mftRailSh->SetName(
"mftrailshape");
1804 mftRailSh->DefinePolygon(nv, xv, yv);
1805 mftRailSh->DefineSection(0, -zlen);
1806 mftRailSh->DefineSection(1, zlen);
1809 xlen = 2 * sCageMFTRailTotWidth + sCageMFTRailsXDist;
1810 ylen = sCageMFTRailTotHeight / 2;
1811 zlen = sCageMFTRailZLen / 2;
1812 TGeoBBox* mftRailBoxSh =
new TGeoBBox(xlen / 2, ylen, zlen);
1815 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
1817 TGeoVolume* mftRailVol =
new TGeoVolume(
"MFTRailInsideCage", mftRailSh, medAl);
1818 mftRailVol->SetFillColor(kGray);
1819 mftRailVol->SetLineColor(kGray);
1821 TGeoVolume* mftRailBoxVol =
new TGeoVolume(
"MFTRailPairInsideCage", mftRailBoxSh, motmed);
1825 xpos = mftRailBoxSh->GetDX() - 0.5 * sCageMFTRailTotWidth;
1826 ypos = mftRailBoxSh->GetDY();
1827 mftRailBoxVol->AddNode(mftRailVol, 1,
new TGeoTranslation(xpos, -ypos, 0));
1828 mftRailBoxVol->AddNode(mftRailVol, 2,
new TGeoTranslation(-xpos, -ypos, 0));
1831 return mftRailBoxVol;
1834TGeoVolume* V3Cage::createMFTRailsHinge(
const TGeoManager* mgr)
1853 Double_t xv[nv], yv[nv];
1854 Double_t xlen, ylen, zlen;
1855 Double_t xpos, ypos, zpos;
1860 xv[0] = sCageMFTHingeTotWid / 2;
1863 yv[1] = sCageMFTHingeIntHei;
1864 xv[2] = sCageMFTHingeIntWid / 2;
1865 yv[2] = sCageMFTHingeHeight;
1867 for (Int_t
i = 3;
i < nv;
i++) {
1872 zlen = sCageMFTHingeIntLen / 2;
1874 TGeoXtru* mftHingeBodySh =
new TGeoXtru(2);
1875 mftHingeBodySh->SetName(
"mfthingebodyshape");
1876 mftHingeBodySh->DefinePolygon(nv, xv, yv);
1877 mftHingeBodySh->DefineSection(0, -zlen);
1878 mftHingeBodySh->DefineSection(1, zlen);
1881 xlen = sCageMFTHingeBulgeWid / 2;
1882 ylen = sCageMFTHingeBulgeHei / 2;
1883 zlen = (sCageMFTHingeTotLen - sCageMFTHingeIntLen) / 2;
1884 TGeoBBox* mftHingeBulgeSh =
new TGeoBBox(
"mfthingebulgeshape", xlen, ylen, zlen);
1887 xpos = mftHingeBodySh->GetX(0) - (sCageMFTHingeBulgePos + mftHingeBulgeSh->GetDX());
1888 ypos = mftHingeBodySh->GetY(2) - mftHingeBulgeSh->GetDY();
1889 zpos = mftHingeBodySh->GetZ(1) + mftHingeBulgeSh->GetDZ();
1891 TGeoTranslation* bulgpos1 =
new TGeoTranslation(xpos, ypos, zpos);
1892 bulgpos1->SetName(
"bulge1pos");
1893 bulgpos1->RegisterYourself();
1895 TGeoTranslation* bulgpos2 =
new TGeoTranslation(-xpos, ypos, zpos);
1896 bulgpos2->SetName(
"bulge2pos");
1897 bulgpos2->RegisterYourself();
1899 compoShape = Form(
"mfthingebodyshape+mfthingebulgeshape:bulge1pos+mfthingebulgeshape:bulge2pos");
1901 TGeoCompositeShape* mftRailHingeSh =
new TGeoCompositeShape(compoShape);
1904 TGeoMedium* medAl = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
1906 TGeoVolume* mftRailHingeVol =
new TGeoVolume(
"MFTRailHingeInsideCage", mftRailHingeSh, medAl);
1907 mftRailHingeVol->SetFillColor(kGreen);
1908 mftRailHingeVol->SetLineColor(kGreen);
1911 return mftRailHingeVol;
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