22#include <fairlogger/Logger.h>
28#include <TGeoManager.h>
29#include <TGeoMatrix.h>
32#include <TGeoVolume.h>
34#include <TGeoCompositeShape.h>
48const Int_t V3Layer::sNumberOfInnerLayers = 3;
51const Int_t V3Layer::sIBChipsPerRow = 9;
52const Int_t V3Layer::sIBNChipRows = 1;
53const Double_t V3Layer::sIBChipZGap = 150.0 * sMicron;
55const Double_t V3Layer::sIBModuleZLength = 27.12 * sCm;
56const Double_t V3Layer::sIBFPCWiderXPlus = 950.0 * sMicron;
57const Double_t V3Layer::sIBFPCWiderXNeg = 400.0 * sMicron;
58const Double_t V3Layer::sIBFlexCableAlThick = 25.0 * sMicron;
59const Double_t V3Layer::sIBFPCAlGNDWidth = (4.1 + 11.15) * sMm;
60const Double_t V3Layer::sIBFPCAlAnodeWidth1 = 13.0 * sMm;
61const Double_t V3Layer::sIBFPCAlAnodeWidth2 = 14.7 * sMm;
62const Double_t V3Layer::sIBFlexCableKapThick = 75.0 * sMicron;
63const Double_t V3Layer::sIBFlexCablePolyThick = 20.0 * sMicron;
64const Double_t V3Layer::sIBFlexCapacitorXWid = 0.2 * sMm;
65const Double_t V3Layer::sIBFlexCapacitorYHi = 0.2 * sMm;
66const Double_t V3Layer::sIBFlexCapacitorZLen = 0.4 * sMm;
67const Double_t V3Layer::sIBColdPlateWidth = 15.4 * sMm;
68const Double_t V3Layer::sIBColdPlateZLen = 290.0 * sMm;
69const Double_t V3Layer::sIBGlueThick = 50.0 * sMicron;
70const Double_t V3Layer::sIBCarbonFleeceThick = 20.0 * sMicron;
71const Double_t V3Layer::sIBCarbonPaperThick = 30.0 * sMicron;
72const Double_t V3Layer::sIBCarbonPaperWidth = 12.5 * sMm;
73const Double_t V3Layer::sIBCarbonPaperZLen = 280.0 * sMm;
74const Double_t V3Layer::sIBK13D2UThick = 70.0 * sMicron;
75const Double_t V3Layer::sIBCoolPipeInnerD = 1.024 * sMm;
76const Double_t V3Layer::sIBCoolPipeThick = 25.4 * sMicron;
77const Double_t V3Layer::sIBCoolPipeXDist = 5.0 * sMm;
78const Double_t V3Layer::sIBCoolPipeZLen = 302.0 * sMm;
79const Double_t V3Layer::sIBTopVertexWidth1 = 0.258 * sMm;
80const Double_t V3Layer::sIBTopVertexWidth2 = 0.072 * sCm;
81const Double_t V3Layer::sIBTopVertexHeight = 0.04 * sCm;
82const Double_t V3Layer::sIBTopVertexAngle = 60.0;
83const Double_t V3Layer::sIBSideVertexWidth = 0.05 * sCm;
84const Double_t V3Layer::sIBSideVertexHeight = 0.074 * sCm;
85const Double_t V3Layer::sIBTopFilamentSide = 0.04 * sCm;
86const Double_t V3Layer::sIBTopFilamentAlpha = 109.8;
87const Double_t V3Layer::sIBTopFilamentInterZ = 15.0 * sMm;
88const Double_t V3Layer::sIBEndSupportThick = 0.149 * sMm;
89const Double_t V3Layer::sIBEndSupportZLen = 2.5 * sMm;
90const Double_t V3Layer::sIBEndSupportXUp = 1.0 * sMm;
91const Double_t V3Layer::sIBEndSupportOpenPhi = 120.0;
93const Double_t V3Layer::sIBConnectorXWidth = 10.0 * sMm;
94const Double_t V3Layer::sIBConnectorYTot = 4.7 * sMm;
95const Double_t V3Layer::sIBConnectBlockZLen = 16.5 * sMm;
96const Double_t V3Layer::sIBConnBodyYHeight = 2.5 * sMm;
97const Double_t V3Layer::sIBConnTailYShift = 0.9 * sMm;
98const Double_t V3Layer::sIBConnTailYMid = 2.5 * sMm;
99const Double_t V3Layer::sIBConnTailZLen = 2.5 * sMm;
100const Double_t V3Layer::sIBConnTailOpenPhi = 120.0;
101const Double_t V3Layer::sIBConnRoundHoleD = 2.0 * sMm;
102const Double_t V3Layer::sIBConnRoundHoleZ = (9.0 - 4.0) * sMm;
103const Double_t V3Layer::sIBConnSquareHoleX = 2.0 * sMm;
104const Double_t V3Layer::sIBConnSquareHoleZ = 2.8 * sMm;
105const Double_t V3Layer::sIBConnSquareHoleZPos = 9.0 * sMm;
106const Double_t V3Layer::sIBConnInsertHoleD = 2.0 * sMm;
107const Double_t V3Layer::sIBConnInsertHoleZPos = 9.0 * sMm;
108const Double_t V3Layer::sIBConnTubeHole1D = 1.6 * sMm;
109const Double_t V3Layer::sIBConnTubeHole1ZLen = 3.0 * sMm;
110const Double_t V3Layer::sIBConnTubeHole1ZLen2 = 2.7 * sMm;
111const Double_t V3Layer::sIBConnTubeHole2D = 1.2 * sMm;
112const Double_t V3Layer::sIBConnTubeHole3XPos = 1.0 * sMm;
113const Double_t V3Layer::sIBConnTubeHole3ZPos = 14.5 * sMm;
114const Double_t V3Layer::sIBConnTubesXDist = 5.0 * sMm;
115const Double_t V3Layer::sIBConnTubesYPos = 1.25 * sMm;
116const Double_t V3Layer::sIBConnInsertD = 2.0 * sMm;
117const Double_t V3Layer::sIBConnInsertHeight = 2.3 * sMm;
118const Double_t V3Layer::sIBConnSideHole1D = 1.0 * sMm;
119const Double_t V3Layer::sIBConnSideHole1YPos = 1.25 * sMm;
120const Double_t V3Layer::sIBConnSideHole1ZPos = 11.5 * sMm;
121const Double_t V3Layer::sIBConnSideHole1XWid = 1.0 * sMm;
122const Double_t V3Layer::sIBConnSideHole2YPos = 1.25 * sMm;
123const Double_t V3Layer::sIBConnSideHole2ZPos = 11.0 * sMm;
124const Double_t V3Layer::sIBConnSideHole2XWid = 1.0 * sMm;
125const Double_t V3Layer::sIBConnSideHole2YWid = 1.0 * sMm;
126const Double_t V3Layer::sIBConnSideHole2ZWid = 1.0 * sMm;
127const Double_t V3Layer::sIBConnectAFitExtD = 1.65 * sMm;
128const Double_t V3Layer::sIBConnectAFitIntD = 1.19 * sMm;
129const Double_t V3Layer::sIBConnectAFitZLen = 12.5 * sMm;
130const Double_t V3Layer::sIBConnectAFitZOut = 10.0 * sMm;
131const Double_t V3Layer::sIBConnPlugInnerD = 0.8 * sMm;
132const Double_t V3Layer::sIBConnPlugTotLen = 1.7 * sMm;
133const Double_t V3Layer::sIBConnPlugInnerLen = 1.0 * sMm;
135const Double_t V3Layer::sIBStaveHeight = 0.5 * sCm;
138const Int_t V3Layer::sOBChipsPerRow = 7;
139const Int_t V3Layer::sOBNChipRows = 2;
141const Double_t V3Layer::sOBChipThickness = 100.0 * sMicron;
143const Double_t V3Layer::sOBHalfStaveWidth = 3.01 * sCm;
144const Double_t V3Layer::sOBModuleGap = 200.0 * sMicron;
145const Double_t V3Layer::sOBChipXGap = 150.0 * sMicron;
146const Double_t V3Layer::sOBChipZGap = 150.0 * sMicron;
147const Double_t V3Layer::sOBFlexCableXWidth = 3.3 * sCm;
148const Double_t V3Layer::sOBFlexCableAlThick = 0.005 * sCm;
149const Double_t V3Layer::sOBFlexCableKapThick = 75.0 * sMicron;
150const Double_t V3Layer::sOBFPCSoldMaskThick = 30.0 * sMicron;
151const Double_t V3Layer::sOBFPCCopperThick = 18.0 * sMicron;
152const Double_t V3Layer::sOBFPCCuAreaFracGnd = 0.954;
153const Double_t V3Layer::sOBFPCCuAreaFracSig = 0.617;
154const Double_t V3Layer::sOBGlueFPCThick = 50 * sMicron;
155const Double_t V3Layer::sOBGlueColdPlThick = 80 * sMicron;
156const Double_t V3Layer::sOBPowerBusXWidth = 3.04 * sCm;
157const Double_t V3Layer::sOBPowerBusAlThick = 100.0 * sMicron;
158const Double_t V3Layer::sOBPowerBusAlFrac = 0.90;
159const Double_t V3Layer::sOBPowerBusDielThick = 50.0 * sMicron;
160const Double_t V3Layer::sOBPowerBusKapThick = 27.5 * sMicron;
161const Double_t V3Layer::sOBBiasBusXWidth = 7.7 * sMm;
162const Double_t V3Layer::sOBBiasBusAlThick = 25.0 * sMicron;
163const Double_t V3Layer::sOBBiasBusAlFrac = 0.90;
164const Double_t V3Layer::sOBBiasBusDielThick = 50.0 * sMicron;
165const Double_t V3Layer::sOBBiasBusKapThick = 25.0 * sMicron;
166const Double_t V3Layer::sOBColdPlateXWidth = 3.04 * sCm;
167const Double_t V3Layer::sOBColdPlateZLenML = 87.55 * sCm;
168const Double_t V3Layer::sOBColdPlateZLenOL = 150.15 * sCm;
169const Double_t V3Layer::sOBColdPlateThick = 0.012 * sCm;
170const Double_t V3Layer::sOBHalfStaveYPos = 2.067 * sCm;
171const Double_t V3Layer::sOBHalfStaveYTrans = 3.6 * sMm;
172const Double_t V3Layer::sOBHalfStaveXOverlap = 7.2 * sMm;
173const Double_t V3Layer::sOBGraphiteFoilThick = 30.0 * sMicron;
174const Double_t V3Layer::sOBCarbonFleeceThick = 20.0 * sMicron;
175const Double_t V3Layer::sOBCoolTubeInnerD = 2.05 * sMm;
176const Double_t V3Layer::sOBCoolTubeThick = 32.0 * sMicron;
177const Double_t V3Layer::sOBCoolTubeXDist = 10.0 * sMm;
179const Double_t V3Layer::sOBCPConnectorXWidth = 16.0 * sMm;
180const Double_t V3Layer::sOBCPConnBlockZLen = 15.0 * sMm;
181const Double_t V3Layer::sOBCPConnBlockYHei = 3.6 * sMm;
182const Double_t V3Layer::sOBCPConnHollowZLen = 3.0 * sMm;
183const Double_t V3Layer::sOBCPConnHollowYHei = 0.9 * sMm;
184const Double_t V3Layer::sOBCPConnSquareHoleX = 4.0 * sMm;
185const Double_t V3Layer::sOBCPConnSquareHoleZ = 5.0 * sMm;
186const Double_t V3Layer::sOBCPConnSqrHoleZPos = 4.0 * sMm;
187const Double_t V3Layer::sOBCPConnSqrInsertRZ = 3.5 * sMm;
188const Double_t V3Layer::sOBCPConnRoundHoleD = 4.0 * sMm;
189const Double_t V3Layer::sOBCPConnRndHoleZPos = 7.0 * sMm;
190const Double_t V3Layer::sOBCPConnTubesXDist = 10.0 * sMm;
191const Double_t V3Layer::sOBCPConnTubesYPos = 1.8 * sMm;
192const Double_t V3Layer::sOBCPConnTubeHole1D = 2.6 * sMm;
193const Double_t V3Layer::sOBCPConnTubeHole1Z = 3.5 * sMm;
194const Double_t V3Layer::sOBCPConnTubeHole2D = 2.2 * sMm;
195const Double_t V3Layer::sOBCPConnFitHoleD = 2.8 * sMm;
196const Double_t V3Layer::sOBCPConnTubeHole3XP = 1.0 * sMm;
197const Double_t V3Layer::sOBCPConnTubeHole3ZP = 2.0 * sMm;
198const Double_t V3Layer::sOBCPConnInstZThick = 1.0 * sMm;
199const Double_t V3Layer::sOBCPConnInsertYHei = 3.4 * sMm;
200const Double_t V3Layer::sOBCPConnAFitExtD = 2.8 * sMm;
201const Double_t V3Layer::sOBCPConnAFitThick = 0.3 * sMm;
202const Double_t V3Layer::sOBCPConnAFitZLen = 17.0 * sMm;
203const Double_t V3Layer::sOBCPConnAFitZIn = 3.0 * sMm;
204const Double_t V3Layer::sOBCPConnPlugInnerD = 0.8 * sMm;
205const Double_t V3Layer::sOBCPConnPlugTotLen = 1.7 * sMm;
206const Double_t V3Layer::sOBCPConnPlugThick = 0.5 * sMm;
208const Double_t V3Layer::sOBSpaceFrameZLen[2] = {900.0 * sMm, 1526.0 * sMm};
209const Int_t V3Layer::sOBSpaceFrameNUnits[2] = {23, 39};
210const Double_t V3Layer::sOBSpaceFrameUnitLen = 39.1 * sMm;
211const Double_t V3Layer::sOBSpaceFrameWidth = 42.44 * sMm;
212const Double_t V3Layer::sOBSpaceFrameHeight = 36.45 * sMm;
213const Double_t V3Layer::sOBSpaceFrameTopVL = 4.0 * sMm;
214const Double_t V3Layer::sOBSpaceFrameTopVH = 0.35 * sMm;
215const Double_t V3Layer::sOBSpaceFrameSideVL = 4.5 * sMm;
216const Double_t V3Layer::sOBSpaceFrameSideVH = 0.35 * sMm;
217const Double_t V3Layer::sOBSpaceFrameVAlpha = 60.0;
218const Double_t V3Layer::sOBSpaceFrameVBeta = 68.0;
219const Double_t V3Layer::sOBSFrameBaseRibDiam = 1.33 * sMm;
220const Double_t V3Layer::sOBSFrameBaseRibPhi = 54.0;
221const Double_t V3Layer::sOBSFrameSideRibDiam = 1.25 * sMm;
222const Double_t V3Layer::sOBSFrameSideRibPhi = 70.0;
223const Double_t V3Layer::sOBSFrameULegLen = 14.2 * sMm;
224const Double_t V3Layer::sOBSFrameULegWidth = 1.5 * sMm;
225const Double_t V3Layer::sOBSFrameULegHeight1 = 6.3 * sMm;
226const Double_t V3Layer::sOBSFrameULegHeight2 = 2.7 * sMm;
227const Double_t V3Layer::sOBSFrameULegThick = 0.3 * sMm;
228const Double_t V3Layer::sOBSFrameULegXPos = 12.9 * sMm;
229const Double_t V3Layer::sOBSFrameConnWidth = 42.0 * sMm;
230const Double_t V3Layer::sOBSFrameConnTotLen = 29.0 * sMm;
231const Double_t V3Layer::sOBSFrameConnTotHei = 4.8 * sMm;
232const Double_t V3Layer::sOBSFrameConnTopLen = 14.0 * sMm;
233const Double_t V3Layer::sOBSFrameConnInsWide = 36.869 * sMm;
234const Double_t V3Layer::sOBSFrameConnInsBase = 39.6 * sMm;
235const Double_t V3Layer::sOBSFrameConnInsHei = 2.8 * sMm;
236const Double_t V3Layer::sOBSFrameConnHoleZPos = 7.0 * sMm;
237const Double_t V3Layer::sOBSFrameConnHoleZDist = 15.0 * sMm;
238const Double_t V3Layer::sOBSFrameConnTopHoleD = 3.0 * sMm;
239const Double_t V3Layer::sOBSFrConnTopHoleXDist = 24.0 * sMm;
240const Double_t V3Layer::sOBSFrameConnAHoleWid = 4.0 * sMm;
241const Double_t V3Layer::sOBSFrameConnAHoleLen = 5.0 * sMm;
242const Double_t V3Layer::sOBSFrConnASideHoleD = 3.0 * sMm;
243const Double_t V3Layer::sOBSFrConnASideHoleL = 2.5 * sMm;
244const Double_t V3Layer::sOBSFrConnASideHoleY = 2.3 * sMm;
245const Double_t V3Layer::sOBSFrameConnCHoleZPos = 3.0 * sMm;
246const Double_t V3Layer::sOBSFrConnCHoleXDist = 32.0 * sMm;
247const Double_t V3Layer::sOBSFrConnCTopHoleD = 4.0 * sMm;
248const Double_t V3Layer::sOBSFrameConnInsHoleD = 5.0 * sMm;
249const Double_t V3Layer::sOBSFrameConnInsHoleX = 25.8 * sMm;
253#define SQ(A) (A) * (A)
270 mStaveModel(kIBModelDummy),
294 mStaveModel(kIBModelDummy),
307 std::string volumeName;
310 TGeoVolume* layerVolume =
new TGeoVolumeAssembly(volumeName.c_str());
314 TGeoVolume* halfBarrel;
318 halfBarrel = createHalfBarrelTurbo();
320 halfBarrel = createHalfBarrel();
323 layerVolume->AddNode(halfBarrel, 0,
nullptr);
324 layerVolume->AddNode(halfBarrel, 1,
new TGeoRotation(
"", 180, 0, 0));
328 motherVolume->AddNode(layerVolume, 1,
nullptr);
334TGeoVolume* V3Layer::createHalfBarrel()
336 const Int_t nameLen = 30;
337 char volumeName[nameLen];
338 Double_t xpos, ypos, zpos;
342 if (mLayerRadius <= 0) {
343 LOG(fatal) <<
"Wrong layer radius " << mLayerRadius;
346 if (mNumberOfStaves <= 0) {
347 LOG(fatal) <<
"Wrong number of staves " << mNumberOfStaves;
350 if (mNumberOfChips <= 0) {
351 LOG(fatal) <<
"Wrong number of chips " << mNumberOfChips;
354 if (mLayerNumber >= sNumberOfInnerLayers && mNumberOfModules <= 0) {
355 LOG(fatal) <<
"Wrong number of modules " << mNumberOfModules;
358 if (mChipThickness <= 0) {
359 LOG(fatal) <<
"Chip thickness wrong or not set " << mChipThickness;
362 if (mSensorThickness <= 0) {
363 LOG(fatal) <<
"Sensor thickness wrong or not set " << mSensorThickness;
366 if (mSensorThickness > mChipThickness) {
367 LOG(fatal) <<
"Sensor thickness " << mSensorThickness <<
" is greater than chip thickness " << mChipThickness;
371 alpha = (360. / (2 * mNumberOfStaves)) * DegToRad();
376 TGeoVolume* halfBarrelVolume =
new TGeoVolumeAssembly(volumeName);
377 halfBarrelVolume->SetUniqueID(mChipTypeID);
380 halfBarrelVolume->SetVisibility(kTRUE);
381 halfBarrelVolume->SetLineColor(1);
383 TGeoVolume* stavVol = createStave();
386 alpha = 360. / mNumberOfStaves;
387 Double_t
r = mLayerRadius + (
static_cast<TGeoBBox*
>(stavVol->GetShape()))->GetDY();
389 for (Int_t
j = 0;
j < mNumberOfStaves / 2;
j++) {
391 xpos =
r *
cosD(phi);
392 ypos =
r *
sinD(phi);
395 halfBarrelVolume->AddNode(stavVol,
j,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", phi, 0, 0)));
400 return halfBarrelVolume;
403TGeoVolume* V3Layer::createHalfBarrelTurbo()
405 const Int_t nameLen = 30;
406 char volumeName[nameLen];
407 Double_t xpos, ypos, zpos;
411 if (mStaveWidth <= 0) {
412 LOG(fatal) <<
"Wrong stave width " << mStaveWidth;
415 if (
Abs(mStaveTilt) > 45) {
416 LOG(warning) <<
"Stave tilt angle (" << mStaveTilt <<
") greater than 45deg";
420 TGeoVolume* halfBarrelVolume =
new TGeoVolumeAssembly(volumeName);
421 halfBarrelVolume->SetUniqueID(mChipTypeID);
422 halfBarrelVolume->SetVisibility(kTRUE);
423 halfBarrelVolume->SetLineColor(1);
424 TGeoVolume* stavVol = createStave();
427 alpha = 360. / mNumberOfStaves;
428 Double_t
r = mLayerRadius ;
430 for (Int_t
j = 0;
j < mNumberOfStaves / 2;
j++) {
432 xpos =
r *
cosD(phi);
433 ypos =
r *
sinD(phi);
436 halfBarrelVolume->AddNode(stavVol,
j,
437 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", phi - mStaveTilt, 0, 0)));
441 return halfBarrelVolume;
444TGeoVolume* V3Layer::createStave(
const TGeoManager* )
468 const Int_t nameLen = 30;
469 char volumeName[nameLen];
471 Double_t xpos, ypos, ymod;
475 TGeoVolume* staveVol =
new TGeoVolumeAssembly(volumeName);
476 staveVol->SetVisibility(kTRUE);
477 staveVol->SetLineColor(2);
479 TGeoVolume* mechStaveVol =
nullptr;
482 if (mLayerNumber < sNumberOfInnerLayers) {
483 ymod = createStaveInnerB(staveVol);
484 ypos = ymod - mChipThickness;
489 mechStaveVol = createStaveStructInnerB();
493 ypos += (
static_cast<TGeoBBox*
>(mechStaveVol->GetShape()))->GetDY();
495 staveVol->AddNode(mechStaveVol, 1,
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", 0, 0, 180)));
498 TGeoVolume* hstaveVol = createStaveOuterB();
500 staveVol->AddNode(hstaveVol, 0);
503 xpos = (
static_cast<TGeoBBox*
>(hstaveVol->GetShape()))->GetDX() - sOBHalfStaveXOverlap / 2;
505 ypos = sOBHalfStaveYPos;
506 staveVol->AddNode(hstaveVol, 0,
new TGeoTranslation(-xpos, ypos + sOBHalfStaveYTrans, 0));
507 staveVol->AddNode(hstaveVol, 1,
new TGeoTranslation(xpos, ypos, 0));
509 mechStaveVol = createSpaceFrameOuterB();
512 if (mBuildLevel < 6) {
513 staveVol->AddNode(mechStaveVol, 1,
514 new TGeoCombiTrans(0, -sOBSFrameULegHeight2, 0,
new TGeoRotation(
"", 180, 0, 0)));
520 staveVol->GetShape()->ComputeBBox();
526Double_t V3Layer::createStaveInnerB(TGeoVolume* mother,
const TGeoManager* mgr)
528 Double_t xtot, ytot, ztot, xchip, zchip, ymod;
529 Double_t xpos, ypos, zpos;
531 const Int_t nameLen = 30;
532 char chipName[nameLen], sensName[nameLen], volumeName[nameLen];
535 if (mBuildLevel < 6) {
545 ymod = 0.5 * mChipThickness;
549 xchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDX();
550 zchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDZ();
552 mIBModuleZLength = 2 * zchip * sIBChipsPerRow + (sIBChipsPerRow - 1) * sIBChipZGap;
554 xtot = xchip + (sIBFPCWiderXPlus + sIBFPCWiderXNeg) / 2;
555 ztot = mIBModuleZLength / 2;
558 TGeoVolume* ibModule = createModuleInnerB(xchip, zchip);
563 ypos = ymod - mChipThickness;
565 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
566 zpos = ztot -
j * (2 * zchip + sIBChipZGap) - zchip;
567 mother->AddNode(chipVol,
j,
new TGeoCombiTrans(0, ypos, zpos,
new TGeoRotation(
"", 0, 180, 180)));
574 Double_t yvol = (
static_cast<TGeoBBox*
>(ibModule->GetShape()))->GetDY();
575 xpos = 0.5 * (xtot - xchip);
576 ypos += (ymod + yvol);
577 mother->AddNode(ibModule, 1,
new TGeoTranslation(xpos, ypos, 0));
585TGeoVolume* V3Layer::createModuleInnerB(
const Double_t xchip,
const Double_t zchip,
const TGeoManager* mgr)
603 Double_t xtot, ytot, ztot;
604 Double_t xpos, ypos, zpos;
605 const Int_t nameLen = 30;
606 char volumeName[nameLen];
609 xtot = xchip + (sIBFPCWiderXPlus + sIBFPCWiderXNeg) / 2;
610 ztot = mIBModuleZLength / 2;
612 TGeoBBox* glue =
new TGeoBBox(xchip, sIBGlueThick / 2, ztot);
613 TGeoBBox* kapCable =
new TGeoBBox(xtot, sIBFlexCableKapThick / 2, ztot);
615 TGeoVolume* aluGndCableVol = createIBFPCAlGnd(xtot, ztot);
616 TGeoVolume* aluAnodeCableVol = createIBFPCAlAnode(xtot, ztot);
619 Double_t ygnd = (
static_cast<TGeoBBox*
>(aluGndCableVol->GetShape()))->GetDY();
620 Double_t yano = (
static_cast<TGeoBBox*
>(aluAnodeCableVol->GetShape()))->GetDY();
622 ytot = sIBGlueThick / 2 + ygnd + sIBFlexCableKapThick / 2 + yano + sIBFlexCapacitorYHi / 2;
624 TGeoBBox*
module = new TGeoBBox(xtot, ytot, ztot);
627 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
628 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
629 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE_IBFPC$",
GetDetName()));
631 snprintf(volumeName, nameLen,
"ServicesContainer%d", mLayerNumber);
632 TGeoVolume* modVol =
new TGeoVolume(volumeName, module, medAir);
634 TGeoVolume* glueVol =
new TGeoVolume(
"FPCGlue", glue, medGlue);
635 glueVol->SetLineColor(kBlack);
636 glueVol->SetFillColor(kBlack);
638 TGeoVolume* kapCableVol =
new TGeoVolume(
"FPCKapton", kapCable, medKapton);
639 kapCableVol->SetLineColor(kBlue);
640 kapCableVol->SetFillColor(kBlue);
643 xpos = -xtot + xchip + sIBFPCWiderXNeg;
644 ypos = -ytot + glue->GetDY();
645 if (mBuildLevel < 2) {
646 modVol->AddNode(glueVol, 1,
new TGeoTranslation(xpos, ypos, 0));
648 ypos += glue->GetDY();
650 if (mBuildLevel < 4) {
652 modVol->AddNode(aluGndCableVol, 1,
new TGeoTranslation(0, ypos, 0));
654 ypos += (ygnd + kapCable->GetDY());
655 modVol->AddNode(kapCableVol, 1,
new TGeoTranslation(0, ypos, 0));
657 ypos += (kapCable->GetDY() + yano);
658 modVol->AddNode(aluAnodeCableVol, 1,
new TGeoTranslation(0, ypos, 0));
664 createIBCapacitors(modVol, zchip, ypos);
670void V3Layer::createIBCapacitors(TGeoVolume* modvol, Double_t zchip, Double_t yzero,
const TGeoManager* mgr)
682 const Double_t xGroup1A = 4265.9 *
sMicron;
683 const Double_t zGroup1A[2] = {-7142.9 *
sMicron, 7594.1 *
sMicron};
684 const Double_t xGroup1B = 690.9 *
sMicron;
685 const Double_t zGroup1B = -7142.9 *
sMicron;
686 const Double_t xGroup2 = 6300.0 *
sMicron;
687 const Double_t zGroup2 = 15075.0 *
sMicron;
688 const Double_t xGroup3 = 5575.0 *
sMicron;
689 const Double_t zGroup3 = 131900.0 *
sMicron;
694 const Int_t nGroup5A = 5, nGroup5B = 4;
695 const Double_t xGroup5A[2] = {1400.0 *
sMicron, 1350.0 *
sMicron};
698 const Double_t xGroup5B = 1100.0 *
sMicron;
701 const Int_t nResist = 2;
702 const Double_t xResist = -7975.0 *
sMicron;
703 const Double_t zResist[nResist] = {114403.0 *
sMicron, 119222.0 *
sMicron};
705 Double_t xpos, ypos, zpos;
708 TGeoVolume *capacitor, *resistor;
713 capacitor = mgr->GetVolume(
"IBFPCCapacitor");
716 TGeoBBox* capsh =
new TGeoBBox(sIBFlexCapacitorXWid / 2, sIBFlexCapacitorYHi / 2, sIBFlexCapacitorZLen / 2);
718 TGeoMedium* medCeramic = mgr->GetMedium(Form(
"%s_CERAMIC$",
GetDetName()));
720 capacitor =
new TGeoVolume(
"IBFPCCapacitor", capsh, medCeramic);
721 capacitor->SetLineColor(kBlack);
722 capacitor->SetFillColor(kBlack);
724 TGeoBBox* ressh =
new TGeoBBox(sIBFlexCapacitorXWid / 2,
725 sIBFlexCapacitorYHi / 2,
726 sIBFlexCapacitorZLen / 2);
728 resistor =
new TGeoVolume(
"IBFPCResistor", ressh, medCeramic);
729 resistor->SetLineColor(kBlack);
730 resistor->SetFillColor(kBlack);
732 resistor = mgr->GetVolume(
"IBFPCResistor");
736 ypos = yzero + sIBFlexCapacitorYHi / 2;
739 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
740 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1A[0];
741 modvol->AddNode(capacitor, 2 *
j + 1,
new TGeoTranslation(-xpos, ypos, -zpos));
742 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1A[1];
743 modvol->AddNode(capacitor, 2 *
j + 2,
new TGeoTranslation(-xpos, ypos, -zpos));
746 nCapacitors = 2 * sIBChipsPerRow;
748 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
749 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1B;
750 modvol->AddNode(capacitor,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
753 nCapacitors += sIBChipsPerRow;
756 for (Int_t
j = 0;
j < sIBChipsPerRow - 1;
j++) {
757 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup2;
758 modvol->AddNode(capacitor,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
761 nCapacitors += (sIBChipsPerRow - 1);
764 modvol->AddNode(capacitor, 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
767 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
768 if (
j == (sIBChipsPerRow - 1)) {
773 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup4[
j];
774 modvol->AddNode(capacitor,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
777 nCapacitors += sIBChipsPerRow;
778 for (Int_t
j = 0;
j < nGroup5A;
j++) {
785 modvol->AddNode(capacitor,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
788 nCapacitors += nGroup5A;
790 for (Int_t
j = 0;
j < nGroup5B;
j++) {
792 modvol->AddNode(capacitor,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
797 for (Int_t
j = 0;
j < nResist;
j++) {
799 modvol->AddNode(resistor,
j + 1,
new TGeoTranslation(-xpos, ypos, -zpos));
803TGeoVolume* V3Layer::createIBFPCAlGnd(
const Double_t xcable,
const Double_t zcable,
const TGeoManager* mgr)
814 ytot = sIBFlexCablePolyThick + sIBFlexCableAlThick;
815 TGeoBBox* coverlay =
new TGeoBBox(xcable, ytot / 2, zcable);
816 TGeoBBox* aluminum =
new TGeoBBox(xcable, sIBFlexCableAlThick / 2, zcable);
819 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
820 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
822 TGeoVolume* coverlayVol =
new TGeoVolume(
"FPCCoverlayGround", coverlay, medKapton);
823 coverlayVol->SetLineColor(kBlue);
824 coverlayVol->SetFillColor(kBlue);
826 TGeoVolume* aluminumVol =
new TGeoVolume(
"FPCAluminumGround", aluminum, medAluminum);
827 aluminumVol->SetLineColor(kCyan);
828 aluminumVol->SetFillColor(kCyan);
830 ypos = coverlay->GetDY() - aluminum->GetDY();
831 if (mBuildLevel < 1) {
832 coverlayVol->AddNode(aluminumVol, 1,
new TGeoTranslation(0, ypos, 0));
838TGeoVolume* V3Layer::createIBFPCAlAnode(
const Double_t xcable,
const Double_t zcable,
const TGeoManager* mgr)
849 Double_t xtru[4], ytru[4];
852 ytot = sIBFlexCablePolyThick + sIBFlexCableAlThick;
853 TGeoBBox* coverlay =
new TGeoBBox(xcable, ytot / 2, zcable);
856 xtru[0] = -sIBFPCAlAnodeWidth2 / 2;
858 xtru[1] = sIBFPCAlAnodeWidth2 / 2;
860 xtru[2] = xtru[0] + sIBFPCAlAnodeWidth1;
865 TGeoXtru* aluminum =
new TGeoXtru(2);
866 aluminum->DefinePolygon(4, xtru, ytru);
867 aluminum->DefineSection(0, -sIBFlexCableAlThick / 2);
868 aluminum->DefineSection(1, sIBFlexCableAlThick / 2);
871 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
872 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
874 TGeoVolume* coverlayVol =
new TGeoVolume(
"FPCCoverlayAnode", coverlay, medKapton);
875 coverlayVol->SetLineColor(kBlue);
876 coverlayVol->SetFillColor(kBlue);
878 TGeoVolume* aluminumVol =
new TGeoVolume(
"FPCAluminumAnode", aluminum, medAluminum);
879 aluminumVol->SetLineColor(kCyan);
880 aluminumVol->SetFillColor(kCyan);
882 ypos = -coverlay->GetDY() + aluminum->GetZ(1);
883 if (mBuildLevel < 1) {
884 coverlayVol->AddNode(aluminumVol, 1,
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", 0, -90, 0)));
890TGeoVolume* V3Layer::createStaveStructInnerB(
const TGeoManager* mgr)
901 TGeoVolume* mechStavVol =
nullptr;
903 switch (mStaveModel) {
905 mechStavVol = createStaveModelInnerBDummy(mgr);
912 LOG(fatal) <<
"Stave model " << mStaveModel <<
" obsolete and no longer supported";
915 mechStavVol = createStaveModelInnerB4(mgr);
918 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
924TGeoVolume* V3Layer::createStaveModelInnerBDummy(
const TGeoManager*)
const
940TGeoVolume* V3Layer::createStaveModelInnerB4(
const TGeoManager* mgr)
962 const Double_t xstave = sIBColdPlateWidth / 2;
964 Double_t layerHeight = 0.;
966 Double_t rPipeMin = sIBCoolPipeInnerD / 2;
967 Double_t rPipeMax = rPipeMin + sIBCoolPipeThick;
970 Double_t xv[nv], yv[nv];
971 Double_t xlen, ylen, zlen, ztot;
972 Double_t xpos, ypos, zpos, ylay, yposPipe;
973 Double_t beta, gamma, theta;
976 ztot = sIBColdPlateZLen / 2;
978 TGeoBBox* glue =
new TGeoBBox(xstave, sIBGlueThick / 2, ztot);
980 TGeoBBox* fleecbot =
new TGeoBBox(xstave, sIBCarbonFleeceThick / 2, ztot);
982 TGeoBBox* cfplate =
new TGeoBBox(xstave, sIBK13D2UThick / 2, ztot);
984 TGeoTube* pipe =
new TGeoTube(rPipeMin, rPipeMax, sIBCoolPipeZLen / 2);
986 TGeoTube* water =
new TGeoTube(0., rPipeMin, sIBCoolPipeZLen / 2);
988 TGeoTubeSeg* cpaptub =
new TGeoTubeSeg(rPipeMax, rPipeMax + sIBCarbonPaperThick, sIBCarbonPaperZLen / 2, 0, 180);
990 TGeoBBox* cpapvert =
new TGeoBBox(sIBCarbonPaperThick / 2, pipe->GetRmax() / 2, sIBCarbonPaperZLen / 2);
992 xlen = sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick;
993 TGeoBBox* cpapmid =
new TGeoBBox(xlen, sIBCarbonPaperThick / 2, sIBCarbonPaperZLen / 2);
995 xlen = sIBCarbonPaperWidth / 2 - sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick;
996 TGeoBBox* cpaplr =
new TGeoBBox(xlen / 2, sIBCarbonPaperThick / 2, sIBCarbonPaperZLen / 2);
998 TGeoTubeSeg* fleecpipe =
new TGeoTubeSeg(cpaptub->GetRmax(), cpaptub->GetRmax() + sIBCarbonFleeceThick, ztot, 0, 180);
1000 TGeoBBox* fleecvert =
new TGeoBBox(sIBCarbonFleeceThick / 2, (pipe->GetRmax() - sIBCarbonPaperThick) / 2, ztot);
1002 xlen = sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick - sIBCarbonFleeceThick;
1003 TGeoBBox* fleecmid =
new TGeoBBox(xlen, sIBCarbonFleeceThick / 2, ztot);
1005 xlen = xstave - sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick - sIBCarbonFleeceThick;
1006 TGeoBBox* fleeclr =
new TGeoBBox(xlen / 2, sIBCarbonFleeceThick / 2, ztot);
1009 layerHeight = 2 * (glue->GetDY() + fleecbot->GetDY() + cfplate->GetDY() + cpaplr->GetDY() + fleeclr->GetDY());
1012 TGeoTrd1* topv =
new TGeoTrd1(sIBTopVertexWidth1 / 2, sIBTopVertexWidth2 / 2, ztot, sIBTopVertexHeight / 2);
1016 xv[1] = sIBSideVertexWidth;
1019 yv[2] = sIBSideVertexHeight;
1021 TGeoXtru* sidev =
new TGeoXtru(2);
1022 sidev->DefinePolygon(3, xv, yv);
1023 sidev->DefineSection(0, -ztot);
1024 sidev->DefineSection(1, ztot);
1026 xv[0] = sIBEndSupportXUp / 2;
1027 yv[0] = sIBStaveHeight - sIBEndSupportThick;
1028 xv[1] = xstave - sIBSideVertexWidth;
1029 yv[1] = layerHeight + sIBSideVertexHeight;
1031 yv[2] = layerHeight;
1034 xv[4] = xstave + sIBEndSupportThick;
1038 xv[6] = xv[1] + sIBEndSupportThick *
sinD(sIBEndSupportOpenPhi / 2);
1039 yv[6] = yv[1] + sIBEndSupportThick *
cosD(sIBEndSupportOpenPhi / 2);
1041 yv[7] = sIBStaveHeight;
1042 for (Int_t
i = 0;
i < nv / 2;
i++) {
1043 xv[8 +
i] = -xv[7 -
i];
1044 yv[8 +
i] = yv[7 -
i];
1047 TGeoXtru* endsupp =
new TGeoXtru(2);
1048 endsupp->DefinePolygon(16, xv, yv);
1049 endsupp->DefineSection(0, -sIBEndSupportZLen / 2);
1050 endsupp->DefineSection(1, sIBEndSupportZLen / 2);
1052 xlen = TMath::Sqrt((yv[7] - yv[6]) * (yv[7] - yv[6]) + (xv[7] - xv[6]) * (xv[7] - xv[6]) +
1053 sIBTopFilamentInterZ * sIBTopFilamentInterZ / 4);
1054 theta = TMath::ATan((yv[7] - yv[6]) / (xv[7] - xv[6])) * TMath::RadToDeg();
1055 TGeoBBox* topfil =
new TGeoBBox(xlen / 2, sIBTopFilamentSide / 2, sIBTopFilamentSide / 2);
1058 xv[0] = xstave + sIBTopFilamentSide;
1061 yv[1] = layerHeight + sIBSideVertexHeight + topfil->GetDZ();
1063 xv[2] = sIBEndSupportXUp / 2;
1064 yv[2] = sIBStaveHeight + sIBTopFilamentSide /
sinD(-theta);
1065 for (Int_t
i = 0;
i < 3;
i++) {
1066 xv[3 +
i] = -xv[2 -
i];
1067 yv[3 +
i] = yv[2 -
i];
1070 TGeoXtru* mechStruct =
new TGeoXtru(2);
1071 mechStruct->DefinePolygon(6, xv, yv);
1072 mechStruct->SetName(
"mechStruct");
1073 mechStruct->DefineSection(0, -ztot);
1074 mechStruct->DefineSection(1, ztot);
1077 zlen = sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut;
1078 TGeoBBox* connAside =
new TGeoBBox(
"connAsideIB", sIBConnectorXWidth / 2, sIBConnBodyYHeight / 2, zlen / 2);
1080 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1081 TGeoBBox* connCside =
new TGeoBBox(
"connCsideIB", sIBConnectorXWidth / 2, sIBConnBodyYHeight / 2, zlen / 2);
1084 yposPipe = 2 * glue->GetDY() + 2 * fleecbot->GetDY() + 2 * cfplate->GetDY() + pipe->GetRmax();
1085 ypos = connAside->GetDY() - sIBConnTubesYPos + yposPipe;
1086 zpos = ztot + connAside->GetDZ();
1087 TGeoTranslation* transAside =
new TGeoTranslation(
"transAsideIB", 0, ypos, zpos);
1088 transAside->RegisterYourself();
1090 ypos = connCside->GetDY() - sIBConnTubesYPos + yposPipe;
1091 zpos = ztot + connCside->GetDZ();
1092 TGeoTranslation* transCside =
new TGeoTranslation(
"transCsideIB", 0, ypos, -zpos);
1093 transCside->RegisterYourself();
1095 TGeoCompositeShape* mechStavSh =
1096 new TGeoCompositeShape(
"mechStruct+connAsideIB:transAsideIB+connCsideIB:transCsideIB");
1100 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1101 TGeoMedium* medWater = mgr->GetMedium(Form(
"%s_WATER$",
GetDetName()));
1102 TGeoMedium* medM55J6K = mgr->GetMedium(Form(
"%s_M55J6K$",
GetDetName()));
1103 TGeoMedium* medM60J3K = mgr->GetMedium(Form(
"%s_M60J3K$",
GetDetName()));
1104 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
1105 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE$",
GetDetName()));
1106 TGeoMedium* medK13D2U2k = mgr->GetMedium(Form(
"%s_K13D2U2k$",
GetDetName()));
1107 TGeoMedium* medFGS003 = mgr->GetMedium(Form(
"%s_FGS003$",
GetDetName()));
1108 TGeoMedium* medCarbonFleece = mgr->GetMedium(Form(
"%s_CarbonFleece$",
GetDetName()));
1110 const Int_t nameLen = 30;
1111 char volname[nameLen];
1113 TGeoVolume* mechStavVol =
new TGeoVolume(volname, mechStavSh, medAir);
1114 mechStavVol->SetLineColor(12);
1115 mechStavVol->SetFillColor(12);
1116 mechStavVol->SetVisibility(kFALSE);
1118 TGeoVolume* glueVol =
new TGeoVolume(
"Glue", glue, medGlue);
1119 glueVol->SetLineColor(kBlack);
1120 glueVol->SetFillColor(kBlack);
1122 TGeoVolume* fleecbotVol =
new TGeoVolume(
"CarbonFleeceBottom", fleecbot, medCarbonFleece);
1123 fleecbotVol->SetFillColor(kViolet);
1124 fleecbotVol->SetLineColor(kViolet);
1126 TGeoVolume* cfplateVol =
new TGeoVolume(
"CFPlate", cfplate, medK13D2U2k);
1127 cfplateVol->SetFillColor(5);
1128 cfplateVol->SetLineColor(5);
1130 TGeoVolume* pipeVol =
new TGeoVolume(
"PolyimidePipe", pipe, medKapton);
1131 pipeVol->SetFillColor(35);
1132 pipeVol->SetLineColor(35);
1134 TGeoVolume* waterVol =
new TGeoVolume(
"Water", water, medWater);
1135 waterVol->SetFillColor(4);
1136 waterVol->SetLineColor(4);
1138 TGeoVolume* cpaptubVol =
new TGeoVolume(
"ThermasolPipeCover", cpaptub, medFGS003);
1139 cpaptubVol->SetFillColor(2);
1140 cpaptubVol->SetLineColor(2);
1142 TGeoVolume* cpapvertVol =
new TGeoVolume(
"ThermasolVertical", cpapvert, medFGS003);
1143 cpapvertVol->SetFillColor(2);
1144 cpapvertVol->SetLineColor(2);
1146 TGeoVolume* cpapmidVol =
new TGeoVolume(
"ThermasolMiddle", cpapmid, medFGS003);
1147 cpapmidVol->SetFillColor(2);
1148 cpapmidVol->SetLineColor(2);
1150 TGeoVolume* cpaplrVol =
new TGeoVolume(
"ThermasolLeftRight", cpaplr, medFGS003);
1151 cpaplrVol->SetFillColor(2);
1152 cpaplrVol->SetLineColor(2);
1154 TGeoVolume* fleecpipeVol =
new TGeoVolume(
"CarbonFleecePipeCover", fleecpipe, medCarbonFleece);
1155 fleecpipeVol->SetFillColor(28);
1156 fleecpipeVol->SetLineColor(28);
1158 TGeoVolume* fleecvertVol =
new TGeoVolume(
"CarbonFleeceVertical", fleecvert, medCarbonFleece);
1159 fleecvertVol->SetFillColor(28);
1160 fleecvertVol->SetLineColor(28);
1162 TGeoVolume* fleecmidVol =
new TGeoVolume(
"CarbonFleeceMiddle", fleecmid, medCarbonFleece);
1163 fleecmidVol->SetFillColor(28);
1164 fleecmidVol->SetLineColor(28);
1166 TGeoVolume* fleeclrVol =
new TGeoVolume(
"CarbonFleeceLeftRight", fleeclr, medCarbonFleece);
1167 fleeclrVol->SetFillColor(28);
1168 fleeclrVol->SetLineColor(28);
1170 TGeoVolume* topvVol =
new TGeoVolume(
"TopVertex", topv, medM55J6K);
1171 topvVol->SetFillColor(12);
1172 topvVol->SetLineColor(12);
1174 TGeoVolume* sidevVol =
new TGeoVolume(
"SideVertex", sidev, medM55J6K);
1175 sidevVol->SetFillColor(12);
1176 sidevVol->SetLineColor(12);
1178 TGeoVolume* topfilVol =
new TGeoVolume(
"TopFilament", topfil, medM60J3K);
1179 topfilVol->SetFillColor(12);
1180 topfilVol->SetLineColor(12);
1182 TGeoVolume* endsuppVol =
new TGeoVolume(
"EndSupport", endsupp, medM55J6K);
1183 endsuppVol->SetFillColor(12);
1184 endsuppVol->SetLineColor(12);
1187 ypos = glue->GetDY();
1188 if (mBuildLevel < 2) {
1189 mechStavVol->AddNode(glueVol, 1,
new TGeoTranslation(0, ypos, 0));
1192 ypos += (glue->GetDY() + fleecbot->GetDY());
1193 if (mBuildLevel < 5) {
1194 mechStavVol->AddNode(fleecbotVol, 1,
new TGeoTranslation(0, ypos, 0));
1197 ypos += (fleecbot->GetDY() + cfplate->GetDY());
1198 if (mBuildLevel < 5) {
1199 mechStavVol->AddNode(cfplateVol, 1,
new TGeoTranslation(0, ypos, 0));
1202 ylay = ypos + cfplate->GetDY();
1204 xpos = sIBCoolPipeXDist / 2;
1205 ypos = ylay + pipe->GetRmax();
1207 if (mBuildLevel < 4) {
1208 mechStavVol->AddNode(pipeVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1209 mechStavVol->AddNode(pipeVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1212 if (mBuildLevel < 3) {
1213 mechStavVol->AddNode(waterVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1214 mechStavVol->AddNode(waterVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1217 if (mBuildLevel < 5) {
1218 mechStavVol->AddNode(cpaptubVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1219 mechStavVol->AddNode(cpaptubVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1221 mechStavVol->AddNode(fleecpipeVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1222 mechStavVol->AddNode(fleecpipeVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1224 xpos = sIBCoolPipeXDist / 2 - pipe->GetRmax() - cpapvert->GetDX();
1225 ypos = ylay + cpapvert->GetDY();
1226 mechStavVol->AddNode(cpapvertVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1227 mechStavVol->AddNode(cpapvertVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1229 xpos = sIBCoolPipeXDist / 2 + pipe->GetRmax() + cpapvert->GetDX();
1230 mechStavVol->AddNode(cpapvertVol, 3,
new TGeoTranslation(-xpos, ypos, 0));
1231 mechStavVol->AddNode(cpapvertVol, 4,
new TGeoTranslation(xpos, ypos, 0));
1233 ypos = ylay + sIBCarbonPaperThick / 2;
1234 mechStavVol->AddNode(cpapmidVol, 1,
new TGeoTranslation(0, ypos, 0));
1236 xpos = xstave - cpaplr->GetDX();
1237 mechStavVol->AddNode(cpaplrVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1238 mechStavVol->AddNode(cpaplrVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1240 xpos = sIBCoolPipeXDist / 2 - pipe->GetRmax() - 2 * cpapvert->GetDX() - fleecvert->GetDX();
1241 ypos = ylay + sIBCarbonPaperThick + fleecvert->GetDY();
1242 mechStavVol->AddNode(fleecvertVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1243 mechStavVol->AddNode(fleecvertVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1245 xpos = sIBCoolPipeXDist / 2 + pipe->GetRmax() + 2 * cpapvert->GetDX() + fleecvert->GetDX();
1246 mechStavVol->AddNode(fleecvertVol, 3,
new TGeoTranslation(-xpos, ypos, 0));
1247 mechStavVol->AddNode(fleecvertVol, 4,
new TGeoTranslation(xpos, ypos, 0));
1249 ypos = ylay + sIBCarbonPaperThick + sIBCarbonFleeceThick / 2;
1250 mechStavVol->AddNode(fleecmidVol, 1,
new TGeoTranslation(0, ypos, 0));
1252 xpos = xstave - fleeclr->GetDX();
1253 mechStavVol->AddNode(fleeclrVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1254 mechStavVol->AddNode(fleeclrVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1257 ylay += (sIBCarbonPaperThick + sIBCarbonFleeceThick);
1259 if (mBuildLevel < 5) {
1260 ypos = sIBStaveHeight - sIBEndSupportThick - topv->GetDz();
1261 mechStavVol->AddNode(topvVol, 1,
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", 0, -90, 0)));
1263 xpos = xstave - sidev->GetX(1);
1265 mechStavVol->AddNode(sidevVol, 1,
new TGeoTranslation(xpos, ypos, 0));
1266 mechStavVol->AddNode(sidevVol, 2,
new TGeoCombiTrans(-xpos, ypos, 0,
new TGeoRotation(
"", 90, 180, -90)));
1268 zpos = ztot - endsupp->GetZ(1);
1269 mechStavVol->AddNode(endsuppVol, 1,
new TGeoTranslation(0, 0, zpos));
1270 mechStavVol->AddNode(endsuppVol, 2,
new TGeoTranslation(0, 0, -zpos));
1272 gamma = 180. - sIBTopFilamentAlpha;
1273 xpos = xstave / 2 + topfil->GetDZ();
1274 ypos = (endsupp->GetY(7) + endsupp->GetY(6)) / 2;
1275 Int_t nFilamentGroups = (Int_t)(2 * (ztot - sIBEndSupportZLen) / sIBTopFilamentInterZ);
1277 for (
int i = 0;
i < nFilamentGroups;
i++) {
1279 zpos = -(ztot - sIBEndSupportZLen) +
i * sIBTopFilamentInterZ + sIBTopFilamentInterZ / 4;
1280 mechStavVol->AddNode(topfilVol,
i * 4 + 1,
1281 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 + theta, gamma / 2, -90)));
1283 mechStavVol->AddNode(topfilVol,
i * 4 + 2,
1284 new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 - theta, -gamma / 2, -90)));
1286 zpos += sIBTopFilamentInterZ / 2;
1287 mechStavVol->AddNode(topfilVol,
i * 4 + 3,
1288 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 + theta, -gamma / 2, -90)));
1290 mechStavVol->AddNode(topfilVol,
i * 4 + 4,
1291 new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 - theta, gamma / 2, -90)));
1296 TGeoVolume *connectorASide, *connectorCSide;
1300 connectorASide = mgr->GetVolume(
"IBConnectorASide");
1302 if (!connectorASide) {
1303 createIBConnectors(mgr);
1304 connectorASide = mgr->GetVolume(
"IBConnectorASide");
1306 connectorCSide = mgr->GetVolume(
"IBConnectorCSide");
1308 ypos = (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDY() - sIBConnTubesYPos +
1310 zpos = ztot + (sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut) / 2;
1311 mechStavVol->AddNode(connectorASide, 1,
new TGeoTranslation(0, ypos, zpos));
1313 zpos = ztot + (sIBConnectBlockZLen - sIBConnTailZLen) / 2;
1314 mechStavVol->AddNode(connectorCSide, 1,
new TGeoCombiTrans(0, ypos, -zpos,
new TGeoRotation(
"", 90, 180, -90)));
1320void V3Layer::createIBConnectors(
const TGeoManager* mgr)
1329 createIBConnectorsASide(mgr);
1330 createIBConnectorsCSide(mgr);
1333void V3Layer::createIBConnectorsASide(
const TGeoManager* mgr)
1346 Double_t xv[nv], yv[nv];
1347 Double_t xlen, ylen, zlen;
1348 Double_t xpos, ypos, zpos;
1351 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1352 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
1353 TGeoMedium* medInox304 = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
1360 xlen = sIBConnectorXWidth;
1361 ylen = sIBConnBodyYHeight;
1362 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1363 TGeoBBox* connBody =
new TGeoBBox(
"connBodyA", xlen / 2, ylen / 2, zlen / 2);
1365 TGeoTube* connRoundHole =
new TGeoTube(
"connRoundHoleA", 0., sIBConnRoundHoleD / 2, sIBConnBodyYHeight / 1.5);
1367 zpos = -connBody->GetDZ() + sIBConnRoundHoleZ;
1368 TGeoCombiTrans* connRoundHoleTrans =
1369 new TGeoCombiTrans(
"roundHoleTransA", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1370 connRoundHoleTrans->RegisterYourself();
1372 xlen = sIBConnSquareHoleX / 2;
1373 ylen = sIBConnBodyYHeight / 1.5;
1374 zlen = sIBConnSquareHoleZ / 2;
1375 TGeoBBox* connSquareHole =
new TGeoBBox(
"connSquareHoleA", xlen, ylen, zlen);
1377 zpos = -connBody->GetDZ() + sIBConnSquareHoleZPos;
1378 TGeoTranslation* connSquareHoleTrans =
new TGeoTranslation(
"squareHoleTransA", 0, 0, zpos);
1379 connSquareHoleTrans->RegisterYourself();
1381 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2HoleA", 0, sIBConnTubeHole2D / 2, connBody->GetDZ());
1383 xpos = sIBConnTubesXDist / 2;
1384 ypos = -connBody->GetDY() + sIBConnTubesYPos;
1386 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"tubes2Trans1A", -xpos, ypos, 0);
1387 connTubes2Trans1->RegisterYourself();
1389 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"tubes2Trans2A", xpos, ypos, 0);
1390 connTubes2Trans2->RegisterYourself();
1392 zlen = sIBConnTubeHole1ZLen - sIBConnTailZLen;
1393 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3HoleA", 0, sIBConnTubeHole1D / 2, zlen);
1395 zpos = connBody->GetDZ();
1396 TGeoTranslation* connTubes3Trans1 =
new TGeoTranslation(
"tubes3Trans1A", -xpos, ypos, -zpos);
1397 connTubes3Trans1->RegisterYourself();
1398 TGeoTranslation* connTubes3Trans2 =
new TGeoTranslation(
"tubes3Trans2A", xpos, ypos, -zpos);
1399 connTubes3Trans2->RegisterYourself();
1401 zlen = sIBConnTubeHole1ZLen2;
1402 TGeoTube* connFitHole =
new TGeoTube(
"fitHoleA", 0, sIBConnectAFitExtD / 2, zlen);
1404 TGeoTranslation* connFitHoleTrans1 =
new TGeoTranslation(
"fitTrans1A", -xpos, ypos, zpos);
1405 connFitHoleTrans1->RegisterYourself();
1406 TGeoTranslation* connFitHoleTrans2 =
new TGeoTranslation(
"fitTrans2A", xpos, ypos, zpos);
1407 connFitHoleTrans2->RegisterYourself();
1409 zlen = sIBConnSideHole1XWid / 1.5;
1410 TGeoTube* sideHole1 =
new TGeoTube(
"sideHole1A", 0, sIBConnSideHole1D / 2, zlen);
1412 xpos = connBody->GetDX() - sIBConnSideHole1XWid + sideHole1->GetDz();
1413 ypos = connBody->GetDY() - sIBConnSideHole1YPos;
1414 zpos = -connBody->GetDZ() + (sIBConnSideHole1ZPos - sIBConnTailZLen);
1415 TGeoCombiTrans* connSideHole1Trans =
1416 new TGeoCombiTrans(
"sideHole1TransA", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1417 connSideHole1Trans->RegisterYourself();
1419 TGeoBBox* sideHole2Box =
1420 new TGeoBBox(
"sideHole2AB", sIBConnSideHole2XWid, sIBConnSideHole2YWid / 2, sIBConnSideHole2ZWid / 2);
1422 xpos = -connBody->GetDX();
1423 ypos = connBody->GetDY() - sIBConnSideHole2YPos;
1424 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + sideHole2Box->GetDZ();
1425 TGeoTranslation* sideHole2BTrans =
new TGeoTranslation(
"sideHole2TransBA", xpos, ypos, zpos);
1426 sideHole2BTrans->RegisterYourself();
1428 TGeoTubeSeg* sideHole2TubeSeg =
1429 new TGeoTubeSeg(
"sideHole2ATS", 0, sIBConnSideHole2YWid / 2, sIBConnSideHole2XWid, 0, 180);
1431 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen);
1432 TGeoCombiTrans* sideHole2TSTrans1 =
1433 new TGeoCombiTrans(
"sideHole2TSTrans1A", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 0));
1434 sideHole2TSTrans1->RegisterYourself();
1436 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + 2 * sideHole2Box->GetDZ();
1437 TGeoCombiTrans* sideHole2TSTrans2 =
1438 new TGeoCombiTrans(
"sideHole2TSTrans2A", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1439 sideHole2TSTrans2->RegisterYourself();
1441 TGeoCompositeShape* connBodySh =
new TGeoCompositeShape(
1442 "connBodyA-connRoundHoleA:roundHoleTransA-connSquareHoleA:squareHoleTransA-tube2HoleA:tubes2Trans1A-tube2HoleA:"
1443 "tubes2Trans2A-fitHoleA:fitTrans1A-fitHoleA:fitTrans2A-tube3HoleA:tubes3Trans1A-tube3HoleA:tubes3Trans2A-"
1444 "sideHole1A:sideHole1TransA-sideHole2AB:sideHole2TransBA-sideHole2ATS:sideHole2TSTrans1A-sideHole2ATS:"
1445 "sideHole2TSTrans2A");
1447 TGeoVolume* connBlockBody =
new TGeoVolume(
"IBConnectorBlockBodyASide", connBodySh, medPEEK);
1448 connBlockBody->SetFillColor(42);
1449 connBlockBody->SetLineColor(42);
1452 xv[0] = sIBConnectorXWidth / 2;
1453 yv[0] = sIBConnTailYShift;
1455 yv[1] = sIBConnTailYMid;
1456 xv[2] = xv[1] - (sIBConnectorYTot - sIBConnTailYMid) /
tanD(90 - sIBConnTailOpenPhi / 2);
1457 yv[2] = sIBConnectorYTot;
1459 for (Int_t
i = 0;
i < 3;
i++) {
1460 xv[3 +
i] = -xv[2 -
i];
1461 yv[3 +
i] = yv[2 -
i];
1464 TGeoXtru* connTail =
new TGeoXtru(2);
1465 connTail->SetName(
"connTailA");
1466 connTail->DefinePolygon(6, xv, yv);
1467 connTail->DefineSection(0, 0);
1468 connTail->DefineSection(1, sIBConnTailZLen);
1470 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1HoleA", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 1.5);
1472 xpos = sIBConnTubesXDist / 2;
1473 ypos = sIBConnTubesYPos;
1474 zpos = connTail->GetZ(1) / 2;
1475 TGeoTranslation* connTubes1Trans1 =
new TGeoTranslation(
"tubes1Trans1A", -xpos, ypos, zpos);
1476 connTubes1Trans1->RegisterYourself();
1477 TGeoTranslation* connTubes1Trans2 =
new TGeoTranslation(
"tubes1Trans2A", xpos, ypos, zpos);
1478 connTubes1Trans2->RegisterYourself();
1480 TGeoCompositeShape* connTailSh =
1481 new TGeoCompositeShape(
"connTailA-tube1HoleA:tubes1Trans1A-tube1HoleA:tubes1Trans2A");
1483 TGeoVolume* connBlockTail =
new TGeoVolume(
"IBConnectorBlockTailASide", connTailSh, medPEEK);
1484 connBlockTail->SetFillColor(42);
1485 connBlockTail->SetLineColor(42);
1488 TGeoTube* connFitSh =
new TGeoTube(sIBConnectAFitIntD / 2, sIBConnectAFitExtD / 2, sIBConnectAFitZLen / 2);
1490 TGeoVolume* connFit =
new TGeoVolume(
"IBConnectorFitting", connFitSh, medInox304);
1491 connFit->SetFillColor(kGray);
1492 connFit->SetLineColor(kGray);
1496 xlen = sIBConnectorXWidth;
1497 ylen = sIBConnBodyYHeight;
1498 zlen = sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut;
1500 TGeoBBox* connBox =
new TGeoBBox(
"connBoxA", xlen / 2, ylen / 2, zlen / 2);
1502 ypos = -sIBConnectorYTot / 2 + connBox->GetDY();
1503 TGeoTranslation* transBodyA =
new TGeoTranslation(
"transBodyA", 0, ypos, 0);
1504 transBodyA->RegisterYourself();
1506 ypos = -sIBConnectorYTot / 2;
1507 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1508 TGeoTranslation* transTailA =
new TGeoTranslation(
"transTailA", 0, ypos, zpos);
1509 transTailA->RegisterYourself();
1511 TGeoTube* connTubeHollow =
new TGeoTube(
"tubeHollowA", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 2);
1513 xpos = sIBConnTubesXDist / 2;
1514 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1515 zpos = -connBox->GetDZ() - connTail->GetZ(1) + sIBConnTubeHole1ZLen / 2;
1516 TGeoTranslation* connTubeHollTrans1 =
new TGeoTranslation(
"tubeHollTrans1A", -xpos, ypos, zpos);
1517 connTubeHollTrans1->RegisterYourself();
1518 TGeoTranslation* connTubeHollTrans2 =
new TGeoTranslation(
"tubeHollTrans2A", xpos, ypos, zpos);
1519 connTubeHollTrans2->RegisterYourself();
1521 zpos = -connBox->GetDZ() + connTubeHole2->GetDz() - 2 * connFitHole->GetDz();
1522 TGeoTranslation* connTubes2Trans1Body =
new TGeoTranslation(
"tubes2Trans1BA", -xpos, ypos, zpos);
1523 connTubes2Trans1Body->RegisterYourself();
1524 TGeoTranslation* connTubes2Trans2Body =
new TGeoTranslation(
"tubes2Trans2BA", xpos, ypos, zpos);
1525 connTubes2Trans2Body->RegisterYourself();
1527 TGeoCompositeShape* connBoxSh =
new TGeoCompositeShape(
1528 "connBoxA:transBodyA-tube2HoleA:tubes2Trans1BA-tube2HoleA:tubes2Trans2BA+connTailA:transTailA-tubeHollowA:tubeHollTrans1A-"
1529 "tubeHollowA:tubeHollTrans2A");
1531 TGeoVolume* connBoxASide =
new TGeoVolume(
"IBConnectorASide", connBoxSh, medAir);
1535 ypos = -sIBConnectorYTot / 2;
1536 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1537 connBoxASide->AddNode(connBlockTail, 1,
new TGeoTranslation(0, ypos, zpos));
1539 ypos = -sIBConnectorYTot / 2 + connBody->GetDY();
1540 zpos = -connBox->GetDZ() + connBody->GetDZ();
1541 connBoxASide->AddNode(connBlockBody, 1,
new TGeoTranslation(0, ypos, zpos));
1543 xpos = sIBConnTubesXDist / 2;
1544 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1545 zpos = connBox->GetDZ() - connFitSh->GetDz();
1546 connBoxASide->AddNode(connFit, 1,
new TGeoTranslation(xpos, ypos, zpos));
1547 connBoxASide->AddNode(connFit, 2,
new TGeoTranslation(-xpos, ypos, zpos));
1550void V3Layer::createIBConnectorsCSide(
const TGeoManager* mgr)
1563 Double_t xv[nv], yv[nv];
1564 Double_t xlen, ylen, zlen;
1565 Double_t xpos, ypos, zpos;
1568 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1569 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
1576 xlen = sIBConnectorXWidth;
1577 ylen = sIBConnBodyYHeight;
1578 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1579 TGeoBBox* connBody =
new TGeoBBox(
"connBodyC", xlen / 2, ylen / 2, zlen / 2);
1581 TGeoTube* connRoundHole =
new TGeoTube(
"connRoundHoleC", 0., sIBConnRoundHoleD / 2, sIBConnBodyYHeight / 1.5);
1583 zpos = -connBody->GetDZ() + sIBConnRoundHoleZ;
1584 TGeoCombiTrans* connRoundHoleTrans =
1585 new TGeoCombiTrans(
"roundHoleTransC", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1586 connRoundHoleTrans->RegisterYourself();
1588 TGeoTube* connInsertHole =
new TGeoTube(
"connInsertHoleC", 0, sIBConnInsertHoleD / 2, sIBConnBodyYHeight / 1.5);
1590 zpos = -connBody->GetDZ() + sIBConnInsertHoleZPos;
1591 TGeoCombiTrans* connInsertHoleTrans =
1592 new TGeoCombiTrans(
"insertHoleTransC", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1593 connInsertHoleTrans->RegisterYourself();
1595 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2HoleC", 0, sIBConnTubeHole2D / 2, connBody->GetDZ());
1597 xpos = sIBConnTubesXDist / 2;
1598 ypos = -connBody->GetDY() + sIBConnTubesYPos;
1599 zpos = sIBConnectBlockZLen - sIBConnTubeHole3ZPos;
1600 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"tubes2Trans1C", -xpos, ypos, -zpos);
1601 connTubes2Trans1->RegisterYourself();
1602 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"tubes2Trans2C", xpos, ypos, -zpos);
1603 connTubes2Trans2->RegisterYourself();
1605 zlen = sIBConnectorXWidth;
1606 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3HoleC", 0, sIBConnTubeHole2D / 2, zlen / 2);
1608 xpos = sIBConnTubeHole3XPos;
1609 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1610 TGeoCombiTrans* connTubes3Trans =
1611 new TGeoCombiTrans(
"tubes3TransC", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90));
1612 connTubes3Trans->RegisterYourself();
1614 zlen = sIBConnTubeHole1ZLen - sIBConnTailZLen;
1615 TGeoTube* connTubeHole4 =
new TGeoTube(
"tube4HoleC", 0, sIBConnTubeHole1D / 2, zlen);
1617 xpos = sIBConnTubesXDist / 2;
1618 zpos = connBody->GetDZ();
1619 TGeoTranslation* connTubes4Trans1 =
new TGeoTranslation(
"tubes4Trans1C", -xpos, ypos, -zpos);
1620 connTubes4Trans1->RegisterYourself();
1621 TGeoTranslation* connTubes4Trans2 =
new TGeoTranslation(
"tubes4Trans2C", xpos, ypos, -zpos);
1622 connTubes4Trans2->RegisterYourself();
1624 zlen = sIBConnSideHole1XWid / 1.5;
1625 TGeoTube* sideHole1 =
new TGeoTube(
"sideHole1C", 0, sIBConnSideHole1D / 2, zlen);
1627 xpos = -connBody->GetDX() + sIBConnSideHole1XWid - sideHole1->GetDz();
1628 ypos = connBody->GetDY() - sIBConnSideHole1YPos;
1629 zpos = -connBody->GetDZ() + (sIBConnSideHole1ZPos - sIBConnTailZLen);
1630 TGeoCombiTrans* connSideHole1Trans =
1631 new TGeoCombiTrans(
"sideHole1TransC", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1632 connSideHole1Trans->RegisterYourself();
1634 TGeoBBox* sideHole2Box =
1635 new TGeoBBox(
"sideHole2CB", sIBConnSideHole2XWid, sIBConnSideHole2YWid / 2, sIBConnSideHole2ZWid / 2);
1637 xpos = connBody->GetDX();
1638 ypos = connBody->GetDY() - sIBConnSideHole2YPos;
1639 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + sideHole2Box->GetDZ();
1640 TGeoTranslation* sideHole2BTrans =
new TGeoTranslation(
"sideHole2TransBC", xpos, ypos, zpos);
1641 sideHole2BTrans->RegisterYourself();
1643 TGeoTubeSeg* sideHole2TubeSeg =
1644 new TGeoTubeSeg(
"sideHole2CTS", 0, sIBConnSideHole2YWid / 2, sIBConnSideHole2XWid, 180, 360);
1646 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen);
1647 TGeoCombiTrans* sideHole2TSTrans1 =
1648 new TGeoCombiTrans(
"sideHole2TSTrans1C", xpos, ypos, zpos,
new TGeoRotation(
"", -90, 90, 0));
1649 sideHole2TSTrans1->RegisterYourself();
1651 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + 2 * sideHole2Box->GetDZ();
1652 TGeoCombiTrans* sideHole2TSTrans2 =
1653 new TGeoCombiTrans(
"sideHole2TSTrans2C", xpos, ypos, zpos,
new TGeoRotation(
"", -90, -90, 0));
1654 sideHole2TSTrans2->RegisterYourself();
1656 TGeoCompositeShape* connBodySh =
new TGeoCompositeShape(
1657 "connBodyC-tube2HoleC:tubes2Trans1C-tube2HoleC:tubes2Trans2C-tube3HoleC:tubes3TransC-tube4HoleC:tubes4Trans1C-"
1658 "tube4HoleC:tubes4Trans2C-sideHole1C:sideHole1TransC-sideHole2CTS:sideHole2TSTrans1C-sideHole2CTS:"
1659 "sideHole2TSTrans2C-sideHole2CB:sideHole2TransBC-connRoundHoleC:roundHoleTransC-connInsertHoleC:insertHoleTransC");
1661 TGeoVolume* connBlockBody =
new TGeoVolume(
"IBConnectorBlockBodyCSide", connBodySh, medPEEK);
1662 connBlockBody->SetFillColor(42);
1663 connBlockBody->SetLineColor(42);
1666 xv[0] = sIBConnectorXWidth / 2;
1667 yv[0] = sIBConnTailYShift;
1669 yv[1] = sIBConnTailYMid;
1670 xv[2] = xv[1] - (sIBConnectorYTot - sIBConnTailYMid) /
tanD(90 - sIBConnTailOpenPhi / 2);
1671 yv[2] = sIBConnectorYTot;
1673 for (Int_t
i = 0;
i < 3;
i++) {
1674 xv[3 +
i] = -xv[2 -
i];
1675 yv[3 +
i] = yv[2 -
i];
1678 TGeoXtru* connTail =
new TGeoXtru(2);
1679 connTail->SetName(
"connTailC");
1680 connTail->DefinePolygon(6, xv, yv);
1681 connTail->DefineSection(0, 0);
1682 connTail->DefineSection(1, sIBConnTailZLen);
1684 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1HoleC", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 1.5);
1686 xpos = sIBConnTubesXDist / 2;
1687 ypos = sIBConnTubesYPos;
1688 zpos = connTail->GetZ(1) / 2;
1689 TGeoTranslation* connTubes1Trans1 =
new TGeoTranslation(
"tubes1Trans1C", -xpos, ypos, zpos);
1690 connTubes1Trans1->RegisterYourself();
1691 TGeoTranslation* connTubes1Trans2 =
new TGeoTranslation(
"tubes1Trans2C", xpos, ypos, zpos);
1692 connTubes1Trans2->RegisterYourself();
1694 TGeoCompositeShape* connTailSh =
1695 new TGeoCompositeShape(
"connTailC-tube1HoleC:tubes1Trans1C-tube1HoleC:tubes1Trans2C");
1697 TGeoVolume* connBlockTail =
new TGeoVolume(
"IBConnectorBlockTailCSide", connTailSh, medPEEK);
1698 connBlockTail->SetFillColor(42);
1699 connBlockTail->SetLineColor(42);
1702 zlen = sIBConnPlugTotLen - sIBConnPlugInnerLen;
1703 TGeoPcon* connPlugSh =
new TGeoPcon(0, 360, 4);
1704 connPlugSh->DefineSection(0, 0., 0., sIBConnTubeHole2D / 2);
1705 connPlugSh->DefineSection(1, zlen, 0., sIBConnTubeHole2D / 2);
1706 connPlugSh->DefineSection(2, zlen, sIBConnPlugInnerD / 2, sIBConnTubeHole2D / 2);
1707 connPlugSh->DefineSection(3, sIBConnPlugTotLen, sIBConnPlugInnerD / 2, sIBConnTubeHole2D / 2);
1709 TGeoVolume* connPlug =
new TGeoVolume(
"IBConnectorPlugC", connPlugSh, medPEEK);
1710 connPlug->SetFillColor(44);
1711 connPlug->SetLineColor(44);
1715 xlen = sIBConnectorXWidth;
1716 ylen = sIBConnBodyYHeight;
1717 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1719 TGeoBBox* connBox =
new TGeoBBox(
"connBoxC", xlen / 2, ylen / 2, zlen / 2);
1721 ypos = -sIBConnectorYTot / 2 + connBox->GetDY();
1722 TGeoTranslation* transBodyC =
new TGeoTranslation(
"transBodyC", 0, ypos, 0);
1723 transBodyC->RegisterYourself();
1725 ypos = -sIBConnectorYTot / 2;
1726 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1727 TGeoTranslation* transTailC =
new TGeoTranslation(
"transTailC", 0, ypos, zpos);
1728 transTailC->RegisterYourself();
1730 TGeoTube* connTubeHollow =
new TGeoTube(
"tubeHollowC", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 2);
1732 xpos = sIBConnTubesXDist / 2;
1733 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1734 zpos = -connBox->GetDZ() - connTail->GetZ(1) + sIBConnTubeHole1ZLen / 2;
1735 TGeoTranslation* connTubeHollTrans1 =
new TGeoTranslation(
"tubeHollTrans1C", -xpos, ypos, zpos);
1736 connTubeHollTrans1->RegisterYourself();
1737 TGeoTranslation* connTubeHollTrans2 =
new TGeoTranslation(
"tubeHollTrans2C", xpos, ypos, zpos);
1738 connTubeHollTrans2->RegisterYourself();
1740 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1741 TGeoTranslation* connTubes2Trans1Body =
new TGeoTranslation(
"tubes2Trans1BC", -xpos, ypos, -zpos);
1742 connTubes2Trans1Body->RegisterYourself();
1743 TGeoTranslation* connTubes2Trans2Body =
new TGeoTranslation(
"tubes2Trans2BC", xpos, ypos, -zpos);
1744 connTubes2Trans2Body->RegisterYourself();
1746 TGeoCompositeShape* connBoxSh =
new TGeoCompositeShape(
1747 "connBoxC:transBodyC-tube2HoleC:tubes2Trans1BC-tube2HoleC:tubes2Trans2BC+connTailC:transTailC-tubeHollowC:tubeHollTrans1C-"
1748 "tubeHollowC:tubeHollTrans2C");
1750 TGeoVolume* connBoxCSide =
new TGeoVolume(
"IBConnectorCSide", connBoxSh, medAir);
1754 ypos = -connBoxSh->GetDY();
1755 zpos = -connBodySh->GetDZ() - connTail->GetZ(1);
1756 connBoxCSide->AddNode(connBlockTail, 1,
new TGeoTranslation(0, ypos, zpos));
1758 ypos = -connBoxSh->GetDY() + connBody->GetDY();
1759 connBoxCSide->AddNode(connBlockBody, 1,
new TGeoTranslation(0, ypos, 0));
1761 xpos = connBox->GetDX();
1762 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1763 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1764 connBoxCSide->AddNode(connPlug, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90)));
1767TGeoVolume* V3Layer::createStaveOuterB(
const TGeoManager* mgr)
1782 TGeoVolume* mechStavVol =
nullptr;
1784 switch (mStaveModel) {
1786 mechStavVol = createStaveModelOuterBDummy(mgr);
1790 LOG(fatal) <<
"Stave model " << mStaveModel <<
" obsolete and no longer supported";
1793 mechStavVol = createStaveModelOuterB2(mgr);
1796 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
1802TGeoVolume* V3Layer::createStaveModelOuterBDummy(
const TGeoManager*)
const
1821TGeoVolume* V3Layer::createStaveModelOuterB2(
const TGeoManager* mgr)
1845 Double_t yFlex1 = sOBFlexCableAlThick;
1846 Double_t yFlex2 = sOBFlexCableKapThick;
1847 Double_t flexOverlap = 5;
1848 Double_t yCFleece = sOBCarbonFleeceThick;
1849 Double_t yGraph = sOBGraphiteFoilThick;
1850 Double_t xHalfSt, yHalfSt;
1852 Double_t xmod, ymod, zmod, ypowbus, zbias;
1853 Double_t xtru[12], ytru[12];
1854 Double_t xpos, ypos, ypos1, zpos ;
1855 Double_t xlen, ylen, zlen;
1856 const Int_t nameLen = 30;
1857 char volname[nameLen];
1859 Double_t rCoolMin, rCoolMax;
1860 rCoolMin = sOBCoolTubeInnerD / 2;
1862 rCoolMax = rCoolMin + sOBCoolTubeThick;
1866 TGeoVolume* moduleVol = createModuleOuterB();
1867 moduleVol->SetVisibility(kTRUE);
1868 xmod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDX();
1869 ymod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDY();
1870 zmod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDZ();
1872 if (mLayerNumber <= 4) {
1873 zlen = sOBColdPlateZLenML / 2;
1875 zlen = sOBColdPlateZLenOL / 2;
1878 xlen = sOBColdPlateXWidth / 2;
1880 TGeoBBox* coldPlate =
new TGeoBBox(
"ColdPlate", xlen, sOBColdPlateThick / 2, zlen);
1882 TGeoBBox* fleeccent =
new TGeoBBox(
"FleeceCent", xlen, yCFleece / 2, zlen);
1884 TGeoTube* coolTube =
new TGeoTube(
"CoolingTube", rCoolMin, rCoolMax, zlen);
1885 TGeoTube* coolWater =
new TGeoTube(
"CoolingWater", 0., rCoolMin, zlen);
1887 xlen = sOBColdPlateXWidth / 2 - sOBCoolTubeXDist / 2 - coolTube->GetRmax();
1888 TGeoBBox* graphlat =
new TGeoBBox(
"GraphLateral", xlen / 2, yGraph / 2, zlen);
1890 xlen = sOBCoolTubeXDist / 2 - coolTube->GetRmax();
1891 TGeoBBox* graphmid =
new TGeoBBox(
"GraphMiddle", xlen, yGraph / 2, zlen);
1893 ylen = coolTube->GetRmax() - yGraph;
1894 TGeoBBox* graphvert =
new TGeoBBox(
"GraphVertical", yGraph / 2, ylen / 2, zlen);
1896 TGeoTubeSeg* graphtub =
new TGeoTubeSeg(
"GraphTube", rCoolMax, rCoolMax + yGraph, zlen, 180., 360.);
1898 xlen = sOBColdPlateXWidth / 2 - sOBCoolTubeXDist / 2 - coolTube->GetRmax() - yGraph;
1899 TGeoBBox* fleeclat =
new TGeoBBox(
"FleecLateral", xlen / 2, yCFleece / 2, zlen);
1901 xlen = sOBCoolTubeXDist / 2 - coolTube->GetRmax() - yGraph;
1902 TGeoBBox* fleecmid =
new TGeoBBox(
"FleecMiddle", xlen, yCFleece / 2, zlen);
1904 ylen = coolTube->GetRmax() - yGraph - yCFleece;
1905 TGeoBBox* fleecvert =
new TGeoBBox(
"FleecVertical", yCFleece / 2, ylen / 2, zlen);
1907 TGeoTubeSeg* fleectub =
1908 new TGeoTubeSeg(
"FleecTube", rCoolMax + yGraph, rCoolMax + yCFleece + yGraph, zlen, 180., 360.);
1914 TGeoVolume* powerBusVol = createOBPowerBiasBuses(zlen);
1915 powerBusVol->SetVisibility(kTRUE);
1916 ypowbus = (
static_cast<TGeoBBox*
>(powerBusVol->GetShape()))->GetDY();
1920 yHalfSt = ypowbus + ymod + coldPlate->GetDY() + 2 * fleeccent->GetDY() + graphlat->GetDY() + fleeclat->GetDY();
1925 ytru[1] = -2 * yHalfSt;
1926 xtru[2] = sOBCoolTubeXDist / 2 + fleectub->GetRmax();
1929 ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax());
1930 xtru[4] = sOBCoolTubeXDist / 2 - fleectub->GetRmax();
1934 for (Int_t
i = 0;
i < 6;
i++) {
1935 xtru[6 +
i] = -xtru[5 -
i];
1936 ytru[6 +
i] = ytru[5 -
i];
1938 TGeoXtru* halfStaveCent =
new TGeoXtru(2);
1939 halfStaveCent->DefinePolygon(12, xtru, ytru);
1940 halfStaveCent->DefineSection(0, -zlen);
1941 halfStaveCent->DefineSection(1, zlen);
1942 snprintf(volname, nameLen,
"staveCentral%d", mLayerNumber);
1943 halfStaveCent->SetName(volname);
1946 TGeoBBox* connAside =
new TGeoBBox(
"connAsideOB", sOBCPConnectorXWidth / 2, sOBCPConnBlockYHei / 2,
1947 (sOBCPConnBlockZLen + sOBCPConnAFitZLen - sOBCPConnAFitZIn) / 2);
1949 TGeoBBox* connCside =
1950 new TGeoBBox(
"connCsideOB", sOBCPConnectorXWidth / 2, sOBCPConnBlockYHei / 2, sOBCPConnBlockZLen / 2);
1953 ypos = 2 * yHalfSt + connAside->GetDY() - sOBCPConnHollowYHei;
1954 zpos = zlen + connAside->GetDZ() - sOBCPConnHollowZLen;
1955 snprintf(volname, nameLen,
"transAsideOB%d", mLayerNumber);
1956 TGeoTranslation* transAside =
new TGeoTranslation(volname, 0, -ypos, zpos);
1957 transAside->RegisterYourself();
1959 zpos = zlen + connCside->GetDZ() - sOBCPConnHollowZLen;
1960 snprintf(volname, nameLen,
"transCsideOB%d", mLayerNumber);
1961 TGeoTranslation* transCside =
new TGeoTranslation(volname, 0, -ypos, -zpos);
1962 transCside->RegisterYourself();
1965 snprintf(componame, 70,
"staveCentral%d+connAsideOB:transAsideOB%d+connCsideOB:transCsideOB%d", mLayerNumber,
1966 mLayerNumber, mLayerNumber);
1968 TGeoCompositeShape* halfStave =
new TGeoCompositeShape(componame);
1972 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
1973 TGeoMedium* medK13D2U120 = mgr->GetMedium(Form(
"%s_K13D2U120$",
GetDetName()));
1974 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
1975 TGeoMedium* medWater = mgr->GetMedium(Form(
"%s_WATER$",
GetDetName()));
1976 TGeoMedium* medCarbonFleece = mgr->GetMedium(Form(
"%s_CarbonFleece$",
GetDetName()));
1977 TGeoMedium* medFGS003 = mgr->GetMedium(Form(
"%s_FGS003$",
GetDetName()));
1978 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1979 TGeoMedium* medTungsten = mgr->GetMedium(Form(
"%s_TUNGSTEN$",
GetDetName()));
1981 TGeoVolume* coldPlateVol =
new TGeoVolume(
"ColdPlateVol", coldPlate, medK13D2U120);
1982 coldPlateVol->SetLineColor(kYellow - 3);
1983 coldPlateVol->SetFillColor(coldPlateVol->GetLineColor());
1984 coldPlateVol->SetFillStyle(4000);
1986 TGeoVolume* fleeccentVol =
new TGeoVolume(
"CarbonFleeceCentral", fleeccent, medCarbonFleece);
1987 fleeccentVol->SetLineColor(kViolet);
1988 fleeccentVol->SetFillColor(fleeccentVol->GetLineColor());
1989 fleeccentVol->SetFillStyle(4000);
1991 TGeoVolume* coolTubeVol =
new TGeoVolume(
"CoolingTubeVol", coolTube, medKapton);
1992 coolTubeVol->SetLineColor(kGray);
1993 coolTubeVol->SetFillColor(coolTubeVol->GetLineColor());
1994 coolTubeVol->SetFillStyle(4000);
1996 TGeoVolume* coolWaterVol;
1997 coolWaterVol =
new TGeoVolume(
"CoolingWaterVol", coolWater, medWater);
1998 coolWaterVol->SetLineColor(kBlue);
1999 coolWaterVol->SetFillColor(coolWaterVol->GetLineColor());
2000 coolWaterVol->SetFillStyle(4000);
2002 TGeoVolume* graphlatVol =
new TGeoVolume(
"GraphiteFoilLateral", graphlat, medFGS003);
2003 graphlatVol->SetLineColor(kGreen);
2004 graphlatVol->SetFillColor(graphlatVol->GetLineColor());
2005 graphlatVol->SetFillStyle(4000);
2007 TGeoVolume* graphmidVol =
new TGeoVolume(
"GraphiteFoilMiddle", graphmid, medFGS003);
2008 graphmidVol->SetLineColor(kGreen);
2009 graphmidVol->SetFillColor(graphmidVol->GetLineColor());
2010 graphmidVol->SetFillStyle(4000);
2012 TGeoVolume* graphvertVol =
new TGeoVolume(
"GraphiteFoilVertical", graphvert, medFGS003);
2013 graphvertVol->SetLineColor(kGreen);
2014 graphvertVol->SetFillColor(graphvertVol->GetLineColor());
2015 graphvertVol->SetFillStyle(4000);
2017 TGeoVolume* graphtubVol =
new TGeoVolume(
"GraphiteFoilPipeCover", graphtub, medFGS003);
2018 graphtubVol->SetLineColor(kGreen);
2019 graphtubVol->SetFillColor(graphtubVol->GetLineColor());
2020 graphtubVol->SetFillStyle(4000);
2022 TGeoVolume* fleeclatVol =
new TGeoVolume(
"CarbonFleeceLateral", fleeclat, medCarbonFleece);
2023 fleeclatVol->SetLineColor(kViolet);
2024 fleeclatVol->SetFillColor(fleeclatVol->GetLineColor());
2025 fleeclatVol->SetFillStyle(4000);
2027 TGeoVolume* fleecmidVol =
new TGeoVolume(
"CarbonFleeceMiddle", fleecmid, medCarbonFleece);
2028 fleecmidVol->SetLineColor(kViolet);
2029 fleecmidVol->SetFillColor(fleecmidVol->GetLineColor());
2030 fleecmidVol->SetFillStyle(4000);
2032 TGeoVolume* fleecvertVol =
new TGeoVolume(
"CarbonFleeceVertical", fleecvert, medCarbonFleece);
2033 fleecvertVol->SetLineColor(kViolet);
2034 fleecvertVol->SetFillColor(fleecvertVol->GetLineColor());
2035 fleecvertVol->SetFillStyle(4000);
2037 TGeoVolume* fleectubVol =
new TGeoVolume(
"CarbonFleecePipeCover", fleectub, medCarbonFleece);
2038 fleectubVol->SetLineColor(kViolet);
2039 fleectubVol->SetFillColor(fleectubVol->GetLineColor());
2040 fleectubVol->SetFillStyle(4000);
2043 TGeoVolume* halfStaveVol =
new TGeoVolume(volname, halfStave, medAir);
2056 zbias = zlen - mNumberOfModules * zmod - (mNumberOfModules - 1) * 0.5 * sOBModuleGap;
2060 halfStaveVol->AddNode(powerBusVol, 1,
new TGeoTranslation(0, ypos, 0));
2062 ypos -= (ypowbus + ymod);
2063 for (Int_t
j = 0;
j < mNumberOfModules;
j++) {
2064 zpos = zlen - zbias -
j * (2 * zmod + sOBModuleGap) - zmod;
2065 halfStaveVol->AddNode(moduleVol,
j,
new TGeoTranslation(0, ypos, zpos));
2071 ypos -= fleeccent->GetDY();
2072 if (mBuildLevel < 6) {
2073 halfStaveVol->AddNode(fleeccentVol, 1,
new TGeoTranslation(0, ypos, 0));
2075 ypos -= fleeccent->GetDY();
2077 ypos -= coldPlate->GetDY();
2078 if (mBuildLevel < 6) {
2079 halfStaveVol->AddNode(coldPlateVol, 1,
new TGeoTranslation(0, ypos, 0));
2081 ypos -= coldPlate->GetDY();
2083 ypos -= fleeccent->GetDY();
2084 if (mBuildLevel < 6) {
2085 halfStaveVol->AddNode(fleeccentVol, 2,
new TGeoTranslation(0, ypos, 0));
2088 xpos = sOBCoolTubeXDist / 2;
2089 ypos1 = ypos - (fleeccent->GetDY() + coolTube->GetRmax());
2090 if (mBuildLevel < 4) {
2091 halfStaveVol->AddNode(coolWaterVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2092 halfStaveVol->AddNode(coolWaterVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2095 if (mBuildLevel < 5) {
2096 halfStaveVol->AddNode(coolTubeVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2097 halfStaveVol->AddNode(coolTubeVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2100 if (mBuildLevel < 6) {
2101 halfStaveVol->AddNode(graphtubVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2102 halfStaveVol->AddNode(graphtubVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2104 halfStaveVol->AddNode(fleectubVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2105 halfStaveVol->AddNode(fleectubVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2108 xpos = sOBColdPlateXWidth / 2 - graphlat->GetDX();
2109 ypos1 = ypos - (fleeccent->GetDY() + graphlat->GetDY());
2110 if (mBuildLevel < 6) {
2111 halfStaveVol->AddNode(graphlatVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2112 halfStaveVol->AddNode(graphlatVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2114 halfStaveVol->AddNode(graphmidVol, 1,
new TGeoTranslation(0, ypos1, 0));
2116 xpos = sOBColdPlateXWidth / 2 - 2 * graphlat->GetDX() + graphvert->GetDX();
2117 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + graphvert->GetDY());
2118 halfStaveVol->AddNode(graphvertVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2119 halfStaveVol->AddNode(graphvertVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2120 xpos = graphmid->GetDX() - graphvert->GetDX();
2121 halfStaveVol->AddNode(graphvertVol, 3,
new TGeoTranslation(-xpos, ypos1, 0));
2122 halfStaveVol->AddNode(graphvertVol, 4,
new TGeoTranslation(xpos, ypos1, 0));
2125 xpos = sOBColdPlateXWidth / 2 - fleeclat->GetDX();
2126 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + fleeclat->GetDY());
2127 if (mBuildLevel < 6) {
2128 halfStaveVol->AddNode(fleeclatVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2129 halfStaveVol->AddNode(fleeclatVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2131 halfStaveVol->AddNode(fleecmidVol, 1,
new TGeoTranslation(0, ypos1, 0));
2133 xpos = sOBColdPlateXWidth / 2 - 2 * fleeclat->GetDX() + fleecvert->GetDX();
2134 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + 2 * fleeclat->GetDY() + fleecvert->GetDY());
2135 halfStaveVol->AddNode(fleecvertVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2136 halfStaveVol->AddNode(fleecvertVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2137 xpos = fleecmid->GetDX() - fleecvert->GetDX();
2138 halfStaveVol->AddNode(fleecvertVol, 3,
new TGeoTranslation(-xpos, ypos1, 0));
2139 halfStaveVol->AddNode(fleecvertVol, 4,
new TGeoTranslation(xpos, ypos1, 0));
2143 TGeoVolume *connectorASide, *connectorCSide;
2147 connectorASide = mgr->GetVolume(
"OBColdPlateConnectorASide");
2149 if (!connectorASide) {
2150 createOBColdPlateConnectors();
2151 connectorASide = mgr->GetVolume(
"OBColdPlateConnectorASide");
2153 connectorCSide = mgr->GetVolume(
"OBColdPlateConnectorCSide");
2155 ypos = 2 * yHalfSt + (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDY() - sOBCPConnHollowYHei;
2156 zpos = zlen + (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDZ() - sOBCPConnHollowZLen;
2157 halfStaveVol->AddNode(connectorASide, 1,
new TGeoCombiTrans(0, -ypos, zpos,
new TGeoRotation(
"", 180, 0, 0)));
2159 zpos = zlen + (
static_cast<TGeoBBox*
>(connectorCSide->GetShape()))->GetDZ() - sOBCPConnHollowZLen;
2160 halfStaveVol->AddNode(connectorCSide, 1,
new TGeoCombiTrans(0, -ypos, -zpos,
new TGeoRotation(
"", 180, 0, 0)));
2163 return halfStaveVol;
2166TGeoVolume* V3Layer::createOBPowerBiasBuses(
const Double_t zcable,
const TGeoManager* mgr)
2184 Double_t xcable, ytot, ypos;
2187 xcable = sOBPowerBusXWidth / 2;
2188 TGeoBBox* gndPB =
new TGeoBBox(xcable, sOBPowerBusAlThick / 2, zcable);
2189 TGeoBBox* dielPB =
new TGeoBBox(xcable, sOBPowerBusDielThick / 2, zcable);
2190 TGeoBBox* kapPB =
new TGeoBBox(xcable, sOBPowerBusKapThick / 2, zcable);
2191 xcable *= sOBPowerBusAlFrac;
2192 TGeoBBox* topPB =
new TGeoBBox(xcable, sOBPowerBusAlThick / 2, zcable);
2194 xcable = sOBBiasBusXWidth / 2;
2195 TGeoBBox* botBB =
new TGeoBBox(xcable, sOBBiasBusAlThick / 2, zcable);
2196 TGeoBBox* dielBB =
new TGeoBBox(xcable, sOBBiasBusDielThick / 2, zcable);
2197 TGeoBBox* kapBB =
new TGeoBBox(xcable, sOBBiasBusKapThick / 2, zcable);
2198 xcable *= sOBBiasBusAlFrac;
2199 TGeoBBox* topBB =
new TGeoBBox(xcable, sOBBiasBusAlThick / 2, zcable);
2202 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
2203 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
2204 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2206 TGeoVolume* gndPBVol =
new TGeoVolume(
"PowerBusGround", gndPB, medAluminum);
2207 gndPBVol->SetLineColor(kCyan);
2208 gndPBVol->SetFillColor(gndPBVol->GetLineColor());
2209 gndPBVol->SetFillStyle(4000);
2211 TGeoVolume* dielPBVol =
new TGeoVolume(
"PowerBusDielectric", dielPB, medKapton);
2212 dielPBVol->SetLineColor(kBlue);
2213 dielPBVol->SetFillColor(dielPBVol->GetLineColor());
2214 dielPBVol->SetFillStyle(4000);
2216 TGeoVolume* kapPBVol =
new TGeoVolume(
"PowerBusKapton", kapPB, medKapton);
2217 kapPBVol->SetLineColor(kBlue);
2218 kapPBVol->SetFillColor(kapPBVol->GetLineColor());
2219 kapPBVol->SetFillStyle(4000);
2221 TGeoVolume* topPBVol =
new TGeoVolume(
"PowerBusTop", topPB, medAluminum);
2222 topPBVol->SetLineColor(kCyan);
2223 topPBVol->SetFillColor(topPBVol->GetLineColor());
2224 topPBVol->SetFillStyle(4000);
2226 TGeoVolume* botBBVol =
new TGeoVolume(
"BiasBusBottom", botBB, medAluminum);
2227 botBBVol->SetLineColor(kCyan);
2228 botBBVol->SetFillColor(botBBVol->GetLineColor());
2229 botBBVol->SetFillStyle(4000);
2231 TGeoVolume* dielBBVol =
new TGeoVolume(
"BiasBusDielectric", dielBB, medKapton);
2232 dielBBVol->SetLineColor(kBlue);
2233 dielBBVol->SetFillColor(dielBBVol->GetLineColor());
2234 dielBBVol->SetFillStyle(4000);
2236 TGeoVolume* kapBBVol =
new TGeoVolume(
"BiasBusKapton", kapBB, medKapton);
2237 kapBBVol->SetLineColor(kBlue);
2238 kapBBVol->SetFillColor(kapBBVol->GetLineColor());
2239 kapBBVol->SetFillStyle(4000);
2241 TGeoVolume* topBBVol =
new TGeoVolume(
"BiasBusTop", topBB, medAluminum);
2242 topBBVol->SetLineColor(kCyan);
2243 topBBVol->SetFillColor(topBBVol->GetLineColor());
2244 topBBVol->SetFillStyle(4000);
2247 xcable = sOBPowerBusXWidth / 2;
2248 ytot = 2 * kapPB->GetDY() + topPB->GetDY() + dielPB->GetDY() + gndPB->GetDY() + 2 * kapBB->GetDY() + topBB->GetDY() + dielBB->GetDY() + botBB->GetDY();
2250 TGeoBBox* pnbBus =
new TGeoBBox(xcable, ytot, zcable);
2252 TGeoVolume* pnbBusVol =
new TGeoVolume(
"OBPowerBiasBus", pnbBus, medAir);
2255 ypos = -pnbBus->GetDY() + kapPB->GetDY();
2256 if (mBuildLevel < 5) {
2257 pnbBusVol->AddNode(kapPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2260 ypos += (kapPB->GetDY() + gndPB->GetDY());
2261 if (mBuildLevel < 2) {
2262 pnbBusVol->AddNode(gndPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2265 ypos += (gndPB->GetDY() + dielPB->GetDY());
2266 if (mBuildLevel < 5) {
2267 pnbBusVol->AddNode(dielPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2270 ypos += (dielPB->GetDY() + topPB->GetDY());
2271 if (mBuildLevel < 2) {
2272 pnbBusVol->AddNode(topPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2275 ypos += (topPB->GetDY() + kapPB->GetDY());
2276 if (mBuildLevel < 5) {
2277 pnbBusVol->AddNode(kapPBVol, 2,
new TGeoTranslation(0, ypos, 0));
2281 ypos += (kapPB->GetDY() + kapBB->GetDY());
2282 if (mBuildLevel < 5) {
2283 pnbBusVol->AddNode(kapBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2286 ypos += (kapBB->GetDY() + botBB->GetDY());
2287 if (mBuildLevel < 2) {
2288 pnbBusVol->AddNode(botBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2291 ypos += (botBB->GetDY() + dielBB->GetDY());
2292 if (mBuildLevel < 5) {
2293 pnbBusVol->AddNode(dielBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2296 ypos += (dielBB->GetDY() + topBB->GetDY());
2297 if (mBuildLevel < 2) {
2298 pnbBusVol->AddNode(topBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2301 ypos += (topBB->GetDY() + kapBB->GetDY());
2302 if (mBuildLevel < 5) {
2303 pnbBusVol->AddNode(kapBBVol, 2,
new TGeoTranslation(0, ypos, 0));
2310void V3Layer::createOBColdPlateConnectors()
2325 createOBColdPlateConnectorsASide();
2326 createOBColdPlateConnectorsCSide();
2329void V3Layer::createOBColdPlateConnectorsASide()
2346 const TGeoManager* mgr = gGeoManager;
2349 const Int_t nv = 16;
2350 Double_t xv[nv], yv[nv];
2351 Double_t xlen, ylen, zlen;
2352 Double_t xpos, ypos, zpos;
2355 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2356 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
2357 TGeoMedium* medInox304 = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
2362 xlen = sOBCPConnectorXWidth;
2363 ylen = sOBCPConnBlockYHei;
2364 zlen = sOBCPConnBlockZLen;
2365 TGeoBBox* connBlock =
new TGeoBBox(
"connBlockA", xlen / 2, ylen / 2, zlen / 2);
2367 xv[0] = sOBCPConnectorXWidth * 0.6;
2368 yv[0] = -sOBCPConnHollowYHei;
2370 yv[1] = sOBCPConnHollowYHei;
2371 xv[2] = sOBCPConnTubesXDist / 2 + sOBCPConnTubeHole1D / 2;
2374 yv[3] = sOBCPConnTubesYPos;
2375 xv[4] = sOBCPConnTubesXDist / 2 - sOBCPConnTubeHole1D / 2;
2380 for (Int_t
i = 0;
i < 6;
i++) {
2381 xv[6 +
i] = -xv[5 -
i];
2382 yv[6 +
i] = yv[5 -
i];
2385 TGeoXtru* connBlockHoll =
new TGeoXtru(2);
2386 connBlockHoll->SetName(
"connBlockHollA");
2387 connBlockHoll->DefinePolygon(12, xv, yv);
2388 connBlockHoll->DefineSection(0, -sOBCPConnHollowZLen);
2389 connBlockHoll->DefineSection(1, sOBCPConnHollowZLen);
2391 ypos = -connBlock->GetDY();
2392 zpos = -connBlock->GetDZ();
2393 TGeoTranslation* transBlockHoll =
new TGeoTranslation(
"transBlockHollA", 0, ypos, zpos);
2394 transBlockHoll->RegisterYourself();
2396 xlen = sOBCPConnSquareHoleX / 2;
2397 ylen = sOBCPConnBlockYHei / 1.5;
2398 zlen = sOBCPConnSquareHoleZ / 2;
2399 TGeoBBox* connSquareHole =
new TGeoBBox(
"connASquareHole", xlen, ylen, zlen);
2402 -connBlock->GetDZ() + (sOBCPConnSqrHoleZPos + connSquareHole->GetDZ());
2403 TGeoTranslation* transSquareHole =
new TGeoTranslation(
"transASquareHole", 0, 0, zpos);
2404 transSquareHole->RegisterYourself();
2406 zlen = sOBCPConnTubeHole1Z;
2407 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1AHole", 0, sOBCPConnTubeHole1D / 2, zlen);
2409 xpos = sOBCPConnTubesXDist / 2;
2410 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2411 zpos = connBlock->GetDZ();
2412 TGeoTranslation* trans1Tube1AHole =
new TGeoTranslation(
"trans1Tube1AHole", -xpos, ypos, -zpos);
2413 trans1Tube1AHole->RegisterYourself();
2414 TGeoTranslation* trans2Tube1AHole =
new TGeoTranslation(
"trans2Tube1AHole", xpos, ypos, -zpos);
2415 trans2Tube1AHole->RegisterYourself();
2417 zlen = sOBCPConnBlockZLen;
2418 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2AHole", 0, sOBCPConnTubeHole2D / 2, zlen);
2420 TGeoTranslation* trans1Tube2AHole =
new TGeoTranslation(
"trans1Tube2AHole", -xpos, ypos, 0);
2421 trans1Tube2AHole->RegisterYourself();
2422 TGeoTranslation* trans2Tube2AHole =
new TGeoTranslation(
"trans2Tube2AHole", xpos, ypos, 0);
2423 trans2Tube2AHole->RegisterYourself();
2425 zlen = sOBCPConnAFitZIn;
2426 TGeoTube* connFitHole =
new TGeoTube(
"fitAHole", 0, sOBCPConnFitHoleD / 2, zlen);
2428 TGeoTranslation* trans1FitAHole =
new TGeoTranslation(
"trans1FitAHole", -xpos, ypos, zpos);
2429 trans1FitAHole->RegisterYourself();
2430 TGeoTranslation* trans2FitAHole =
new TGeoTranslation(
"trans2FitAHole", xpos, ypos, zpos);
2431 trans2FitAHole->RegisterYourself();
2433 TGeoCompositeShape* connBlockSh =
new TGeoCompositeShape(
2434 "connBlockA-connBlockHollA:transBlockHollA-connASquareHole:transASquareHole-tube1AHole:trans1Tube1AHole-tube1AHole:"
2435 "trans2Tube1AHole-tube2AHole:trans1Tube2AHole-tube2AHole:trans2Tube2AHole-fitAHole:trans1FitAHole-fitAHole:"
2438 TGeoVolume* connBlockA =
new TGeoVolume(
"OBColdPlateConnectorBlockASide", connBlockSh, medPEEK);
2439 connBlockA->SetFillColor(42);
2440 connBlockA->SetLineColor(42);
2443 Double_t rmin = sOBCPConnAFitExtD / 2 - sOBCPConnAFitThick;
2444 TGeoTube* connFitSh =
new TGeoTube(rmin, sOBCPConnAFitExtD / 2, sOBCPConnAFitZLen / 2);
2446 TGeoVolume* connFit =
new TGeoVolume(
"OBColdPlateConnectorFitting", connFitSh, medInox304);
2447 connFit->SetFillColor(kGray);
2448 connFit->SetLineColor(kGray);
2452 xlen = sOBCPConnectorXWidth;
2453 ylen = sOBCPConnBlockYHei;
2454 zlen = sOBCPConnBlockZLen + (sOBCPConnAFitZLen - sOBCPConnAFitZIn);
2455 TGeoBBox* connBox =
new TGeoBBox(
"connectorOBCPA", xlen / 2, ylen / 2, zlen / 2);
2457 ypos = -connBox->GetDY();
2458 zpos = -connBox->GetDZ();
2459 TGeoTranslation* transBoxHoll =
new TGeoTranslation(
"transBoxHollA", 0, ypos, zpos);
2460 transBoxHoll->RegisterYourself();
2462 xpos = sOBCPConnTubesXDist / 2;
2463 ypos = -connBox->GetDY() + sOBCPConnTubesYPos;
2464 zpos = connBox->GetDZ();
2465 TGeoTranslation* trans1BoxHole =
new TGeoTranslation(
"trans1BoxAHole", -xpos, ypos, -zpos);
2466 trans1BoxHole->RegisterYourself();
2467 TGeoTranslation* trans2BoxHole =
new TGeoTranslation(
"trans2BoxAHole", xpos, ypos, -zpos);
2468 trans2BoxHole->RegisterYourself();
2470 TGeoCompositeShape* connectSh =
new TGeoCompositeShape(
2471 "connectorOBCPA-connBlockHollA:transBoxHollA-tube1AHole:trans1BoxAHole-tube1AHole:trans2BoxAHole");
2473 TGeoVolume* connectorASide =
new TGeoVolume(
"OBColdPlateConnectorASide", connectSh, medAir);
2476 zpos = -connectSh->GetDZ() + connBlock->GetDZ();
2477 connectorASide->AddNode(connBlockA, 1,
new TGeoTranslation(0, 0, zpos));
2479 xpos = sOBCPConnTubesXDist / 2;
2480 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2481 zpos = connectSh->GetDZ() - connFitSh->GetDz();
2482 connectorASide->AddNode(connFit, 1,
new TGeoTranslation(-xpos, ypos, zpos));
2483 connectorASide->AddNode(connFit, 2,
new TGeoTranslation(xpos, ypos, zpos));
2486void V3Layer::createOBColdPlateConnectorsCSide()
2503 const TGeoManager* mgr = gGeoManager;
2506 const Int_t nv = 16;
2507 Double_t xv[nv], yv[nv];
2508 Double_t xlen, ylen, zlen;
2509 Double_t xpos, ypos, zpos;
2512 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2513 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
2518 xlen = sOBCPConnectorXWidth;
2519 ylen = sOBCPConnBlockYHei;
2520 zlen = sOBCPConnBlockZLen;
2521 TGeoBBox* connBlock =
new TGeoBBox(
"connBlockC", xlen / 2, ylen / 2, zlen / 2);
2523 xv[0] = sOBCPConnectorXWidth * 0.6;
2524 yv[0] = -sOBCPConnHollowYHei;
2526 yv[1] = sOBCPConnHollowYHei;
2527 xv[2] = sOBCPConnTubesXDist / 2 + sOBCPConnTubeHole1D / 2;
2530 yv[3] = sOBCPConnTubesYPos;
2531 xv[4] = sOBCPConnTubesXDist / 2 - sOBCPConnTubeHole1D / 2;
2536 for (Int_t
i = 0;
i < 6;
i++) {
2537 xv[6 +
i] = -xv[5 -
i];
2538 yv[6 +
i] = yv[5 -
i];
2541 TGeoXtru* connBlockHoll =
new TGeoXtru(2);
2542 connBlockHoll->SetName(
"connBlockHollC");
2543 connBlockHoll->DefinePolygon(12, xv, yv);
2544 connBlockHoll->DefineSection(0, -sOBCPConnHollowZLen);
2545 connBlockHoll->DefineSection(1, sOBCPConnHollowZLen);
2547 ypos = -connBlock->GetDY();
2548 zpos = connBlock->GetDZ();
2549 TGeoTranslation* transBlockHoll =
new TGeoTranslation(
"transBlockHollC", 0, ypos, zpos);
2550 transBlockHoll->RegisterYourself();
2552 TGeoTube* connRoundHole =
new TGeoTube(
"connCRoundHole", 0, sOBCPConnRoundHoleD / 2, sOBCPConnBlockYHei / 1.5);
2554 zpos = connBlock->GetDZ() - sOBCPConnRndHoleZPos;
2555 TGeoCombiTrans* transRoundHole =
new TGeoCombiTrans(
"transCRoundHole", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
2556 transRoundHole->RegisterYourself();
2558 zlen = sOBCPConnTubeHole1Z;
2559 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1CHole", 0, sOBCPConnTubeHole1D / 2, zlen);
2561 xpos = sOBCPConnTubesXDist / 2;
2562 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2563 zpos = connBlock->GetDZ();
2564 TGeoTranslation* trans1Tube1AHole =
new TGeoTranslation(
"trans1Tube1CHole", -xpos, ypos, zpos);
2565 trans1Tube1AHole->RegisterYourself();
2566 TGeoTranslation* trans2Tube1AHole =
new TGeoTranslation(
"trans2Tube1CHole", xpos, ypos, zpos);
2567 trans2Tube1AHole->RegisterYourself();
2569 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2CHole", 0, sOBCPConnTubeHole2D / 2, connBlock->GetDZ());
2571 zpos = sOBCPConnTubeHole3ZP;
2572 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"trans1Tube2CHole", -xpos, ypos, zpos);
2573 connTubes2Trans1->RegisterYourself();
2574 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"trans2Tube2CHole", xpos, ypos, zpos);
2575 connTubes2Trans2->RegisterYourself();
2577 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3CHole", 0, sOBCPConnTubeHole2D / 2, connBlock->GetDX());
2579 xpos = -sOBCPConnTubeHole3XP;
2580 zpos = -connBlock->GetDZ() + sOBCPConnTubeHole3ZP;
2581 TGeoCombiTrans* connTubes3Trans =
2582 new TGeoCombiTrans(
"transTube3CHole", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90));
2583 connTubes3Trans->RegisterYourself();
2585 TGeoCompositeShape* connBlockSh =
new TGeoCompositeShape(
2586 "connBlockC-connBlockHollC:transBlockHollC-connCRoundHole:transCRoundHole-tube1CHole:trans1Tube1CHole-tube1CHole:"
2587 "trans2Tube1CHole-tube2CHole:trans1Tube2CHole-tube2CHole:trans2Tube2CHole-tube3CHole:transTube3CHole");
2589 TGeoVolume* connBlockC =
new TGeoVolume(
"OBColdPlateConnectorBlockCSide", connBlockSh, medPEEK);
2590 connBlockC->SetFillColor(42);
2591 connBlockC->SetLineColor(42);
2594 TGeoPcon* connPlugSh =
new TGeoPcon(0, 360, 4);
2595 connPlugSh->DefineSection(0, 0., 0., sOBCPConnTubeHole2D / 2);
2596 connPlugSh->DefineSection(1, sOBCPConnPlugThick, 0., sOBCPConnTubeHole2D / 2);
2597 connPlugSh->DefineSection(2, sOBCPConnPlugThick, sOBCPConnPlugInnerD / 2, sOBCPConnTubeHole2D / 2);
2598 connPlugSh->DefineSection(3, sOBCPConnPlugTotLen, sOBCPConnPlugInnerD / 2, sOBCPConnTubeHole2D / 2);
2600 TGeoVolume* connPlug =
new TGeoVolume(
"OBCPConnectorPlugC", connPlugSh, medPEEK);
2601 connPlug->SetFillColor(44);
2602 connPlug->SetLineColor(44);
2606 xlen = sOBCPConnectorXWidth;
2607 ylen = sOBCPConnBlockYHei;
2608 zlen = sOBCPConnBlockZLen;
2609 TGeoBBox* connBox =
new TGeoBBox(
"connectorOBCPC", xlen / 2, ylen / 2, zlen / 2);
2611 ypos = -connBox->GetDY();
2612 zpos = connBox->GetDZ();
2613 TGeoTranslation* transBoxHoll =
new TGeoTranslation(
"transBoxHollC", 0, ypos, zpos);
2614 transBoxHoll->RegisterYourself();
2616 xpos = sOBCPConnTubesXDist / 2;
2617 ypos = -connBox->GetDY() + sOBCPConnTubesYPos;
2618 zpos = connBox->GetDZ();
2619 TGeoTranslation* trans1BoxHole =
new TGeoTranslation(
"trans1BoxCHole", -xpos, ypos, zpos);
2620 trans1BoxHole->RegisterYourself();
2621 TGeoTranslation* trans2BoxHole =
new TGeoTranslation(
"trans2BoxCHole", xpos, ypos, zpos);
2622 trans2BoxHole->RegisterYourself();
2624 TGeoCompositeShape* connectSh =
new TGeoCompositeShape(
2625 "connectorOBCPC-connBlockHollC:transBoxHollC-tube1CHole:trans1BoxCHole-tube1CHole:trans2BoxCHole");
2627 TGeoVolume* connectorCSide =
new TGeoVolume(
"OBColdPlateConnectorCSide", connectSh, medAir);
2630 connectorCSide->AddNode(connBlockC, 1);
2632 xpos = -connBlock->GetDX();
2633 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2634 zpos = -connBlock->GetDZ() + sOBCPConnTubeHole3ZP;
2635 connectorCSide->AddNode(connPlug, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 90)));
2638TGeoVolume* V3Layer::createSpaceFrameOuterB(
const TGeoManager* mgr)
2640 TGeoVolume* mechStavVol =
nullptr;
2642 switch (mStaveModel) {
2645 mechStavVol = createSpaceFrameOuterBDummy(mgr);
2649 mechStavVol = createSpaceFrameOuterB2(mgr);
2652 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
2659TGeoVolume* V3Layer::createSpaceFrameOuterBDummy(
const TGeoManager*)
const
2676TGeoVolume* V3Layer::createSpaceFrameOuterB2(
const TGeoManager* mgr)
2696 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2698 TGeoVolume *unitVol[2], *next2EndVol[2], *endVol[2];
2699 Double_t *xtru, *ytru;
2700 Double_t zlen, zpos;
2702 const Int_t nameLen = 30;
2703 char volname[nameLen];
2707 unitVol[0] = mgr->GetVolume(
"SpaceFrameUnit0");
2710 createOBSpaceFrameObjects(mgr);
2711 unitVol[0] = mgr->GetVolume(
"SpaceFrameUnit0");
2714 unitVol[1] = mgr->GetVolume(
"SpaceFrameUnit1");
2716 next2EndVol[0] = mgr->GetVolume(
"SpaceFrameNext2EndUnit0");
2717 next2EndVol[1] = mgr->GetVolume(
"SpaceFrameNext2EndUnit1");
2719 endVol[0] = mgr->GetVolume(
"SpaceFrameEndUnit0");
2720 endVol[1] = mgr->GetVolume(
"SpaceFrameEndUnit1");
2724 TGeoXtru* volShape =
static_cast<TGeoXtru*
>(unitVol[0]->GetShape());
2726 nPoints = volShape->GetNvert();
2727 xtru =
new Double_t[nPoints];
2728 ytru =
new Double_t[nPoints];
2730 for (Int_t
i = 0;
i < nPoints;
i++) {
2731 xtru[
i] = volShape->GetX(
i);
2732 ytru[
i] = volShape->GetY(
i);
2735 Int_t nUnits = sOBSpaceFrameNUnits[mLayerNumber / 5];
2736 zlen = (nUnits - 2) * sOBSpaceFrameUnitLen;
2738 TGeoXtru* spaceFrameCentral =
new TGeoXtru(2);
2739 spaceFrameCentral->DefinePolygon(nPoints, xtru, ytru);
2740 spaceFrameCentral->DefineSection(0, -zlen / 2);
2741 spaceFrameCentral->DefineSection(1, zlen / 2);
2742 snprintf(volname, nameLen,
"sframecentral%d", mLayerNumber);
2743 spaceFrameCentral->SetName(volname);
2745 zpos = zlen / 2 + sOBSpaceFrameUnitLen / 2;
2746 snprintf(volname, nameLen,
"endUnit0Trans%d", mLayerNumber);
2747 TGeoCombiTrans* endUnit0Trans =
new TGeoCombiTrans(volname, 0, 0, -zpos,
new TGeoRotation(
"", 90, 180, -90));
2748 endUnit0Trans->RegisterYourself();
2749 snprintf(volname, nameLen,
"endUnit1Trans%d", mLayerNumber);
2750 TGeoTranslation* endUnit1Trans =
new TGeoTranslation(volname, 0, 0, zpos);
2751 endUnit1Trans->RegisterYourself();
2756 char componame[100];
2757 snprintf(componame, 100,
"sframecentral%d+endunitcontainer:endUnit0Trans%d+endunitcontainer:endUnit1Trans%d",
2758 mLayerNumber, mLayerNumber, mLayerNumber);
2760 TGeoCompositeShape* spaceFrame =
new TGeoCompositeShape(componame);
2762 snprintf(volname, nameLen,
"SpaceFrameVolumeLay%d", mLayerNumber);
2763 TGeoVolume* spaceFrameVol =
new TGeoVolume(volname, spaceFrame, medAir);
2764 spaceFrameVol->SetVisibility(kFALSE);
2767 TGeoXtru* frameUnit =
static_cast<TGeoXtru*
>(unitVol[0]->GetShape());
2769 zpos = -spaceFrame->GetDZ() + frameUnit->GetDZ() + sOBSFrameConnTopLen;
2770 spaceFrameVol->AddNode(endVol[0], 1,
new TGeoCombiTrans(0, 0, zpos,
new TGeoRotation(
"", 90, 180, -90)));
2772 zpos += (2 * frameUnit->GetDZ());
2773 spaceFrameVol->AddNode(next2EndVol[0], 1,
new TGeoTranslation(0, 0, zpos));
2775 for (Int_t
i = 2;
i < nUnits - 2;
i++) {
2776 zpos += (2 * frameUnit->GetDZ());
2778 Int_t k =
i -
j * 2;
2779 spaceFrameVol->AddNode(unitVol[k],
j,
new TGeoTranslation(0, 0, zpos));
2782 zpos += (2 * frameUnit->GetDZ());
2783 spaceFrameVol->AddNode(next2EndVol[1], 1,
new TGeoTranslation(0, 0, zpos));
2785 zpos += (2 * frameUnit->GetDZ());
2786 spaceFrameVol->AddNode(endVol[1], 1,
new TGeoTranslation(0, 0, zpos));
2792 return spaceFrameVol;
2795void V3Layer::createOBSpaceFrameObjects(
const TGeoManager* mgr)
2820 TGeoMedium* medCarbon = mgr->GetMedium(Form(
"%s_M55J6K$",
GetDetName()));
2821 TGeoMedium* medF6151B05M = mgr->GetMedium(Form(
"%s_F6151B05M$",
GetDetName()));
2822 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2825 Double_t halfFrameWidth = sOBSpaceFrameWidth / 2;
2826 Double_t triangleHeight = sOBSpaceFrameHeight;
2827 Double_t sframeHeight = triangleHeight + sOBSFrameBaseRibDiam + sOBSFrameULegHeight2 * 2;
2828 Double_t staveLa = sOBSpaceFrameTopVL;
2829 Double_t staveHa = sOBSpaceFrameTopVH;
2830 Double_t staveLb = sOBSpaceFrameSideVL;
2831 Double_t staveHb = sOBSpaceFrameSideVH;
2832 Double_t alphaDeg = sOBSpaceFrameVAlpha;
2833 Double_t alphaRad = alphaDeg * TMath::DegToRad() / 2;
2834 Double_t beta = sOBSpaceFrameVBeta * TMath::DegToRad() / 2;
2835 Double_t sideRibRadius = sOBSFrameSideRibDiam / 2;
2836 Double_t sidePhiDeg = sOBSFrameSideRibPhi;
2837 Double_t sidePhiRad = sidePhiDeg * TMath::DegToRad();
2838 Double_t baseRibRadius = sOBSFrameBaseRibDiam / 2;
2839 Double_t basePhiDeg = sOBSFrameBaseRibPhi;
2840 Double_t basePhiRad = basePhiDeg * TMath::DegToRad();
2841 Double_t ulegHalfLen = sOBSFrameULegLen / 2;
2842 Double_t ulegHalfWidth = sOBSFrameULegWidth / 2;
2843 Double_t ulegHigh1 = sOBSFrameULegHeight1;
2844 Double_t ulegHigh2 = sOBSFrameULegHeight2;
2845 Double_t ulegThick = sOBSFrameULegThick;
2846 Double_t topVFactorEU = 0.60;
2848 Double_t xlen, zlen;
2849 Double_t xpos, ypos, zpos;
2851 Double_t xtru[22], ytru[22];
2853 unitlen = sOBSpaceFrameUnitLen;
2855 xlen = halfFrameWidth + sideRibRadius;
2859 xtru[0] = sOBSFrameULegXPos - ulegHalfLen;
2860 ytru[0] = -(triangleHeight / 2 + baseRibRadius);
2862 ytru[1] = ytru[0] - ulegHigh1;
2863 xtru[2] = xtru[1] + ulegThick;
2866 ytru[3] = ytru[0] - ulegThick;
2867 xtru[7] = sOBSFrameULegXPos + ulegHalfLen;
2871 xtru[5] = xtru[6] - ulegThick;
2878 ytru[9] = 0.9 * ytru[8];
2879 xtru[10] = 0.3 * xtru[8];
2880 ytru[10] = triangleHeight / 2;
2881 for (Int_t
i = 0;
i < 11;
i++) {
2882 xtru[
i + 11] = -xtru[10 -
i];
2883 ytru[
i + 11] = ytru[10 -
i];
2885 ytru[15] = ytru[0] - ulegHigh2;
2886 ytru[16] = ytru[15];
2887 ytru[19] = ytru[15];
2888 ytru[20] = ytru[15];
2893 TGeoXtru* frameUnit =
new TGeoXtru(2);
2894 frameUnit->DefinePolygon(22, xtru, ytru);
2895 frameUnit->DefineSection(0, -unitlen / 2);
2896 frameUnit->DefineSection(1, unitlen / 2);
2898 TGeoXtru* next2EndUnit =
new TGeoXtru(2);
2899 next2EndUnit->DefinePolygon(22, xtru, ytru);
2900 next2EndUnit->DefineSection(0, -unitlen / 2);
2901 next2EndUnit->DefineSection(1, unitlen / 2);
2906 ytru[0] = -(triangleHeight / 2 + baseRibRadius);
2908 ytru[1] = 0.9 * ytru[0];
2909 xtru[2] = 0.3 * xtru[0];
2910 ytru[2] = triangleHeight / 2;
2911 for (Int_t
i = 0;
i < 3;
i++) {
2912 xtru[
i + 3] = -xtru[2 -
i];
2913 ytru[
i + 3] = ytru[2 -
i];
2916 TGeoXtru* endUnitBody =
new TGeoXtru(2);
2917 endUnitBody->SetName(
"endunitbody");
2918 endUnitBody->DefinePolygon(6, xtru, ytru);
2919 endUnitBody->DefineSection(0, -unitlen / 2);
2920 endUnitBody->DefineSection(1, 0.8 * unitlen / 2);
2922 xtru[2] = 0.25 * (3 * xtru[1] + xtru[2]);
2923 ytru[2] = 0.25 * (3 * ytru[1] + ytru[2]);
2924 for (Int_t
i = 0;
i < 3;
i++) {
2925 xtru[
i + 3] = -xtru[2 -
i];
2926 ytru[
i + 3] = ytru[2 -
i];
2929 TGeoXtru* endUnitBodyLow =
new TGeoXtru(2);
2930 endUnitBodyLow->SetName(
"endunitbodylow");
2931 endUnitBodyLow->DefinePolygon(6, xtru, ytru);
2932 endUnitBodyLow->DefineSection(0, 0.8 * unitlen / 2);
2933 endUnitBodyLow->DefineSection(1, unitlen / 2);
2936 xtru[0] = sOBSFrameConnWidth / 2.;
2939 ytru[1] = sOBSFrameConnInsHei;
2940 xtru[2] = xtru[1] - sOBSFrameConnTotHei + sOBSFrameConnInsHei;
2941 ytru[2] = sOBSFrameConnTotHei;
2942 for (Int_t
i = 0;
i < 3;
i++) {
2943 xtru[
i + 3] = -xtru[2 -
i];
2944 ytru[
i + 3] = ytru[2 -
i];
2947 TGeoXtru* endUnitConn =
new TGeoXtru(2);
2948 endUnitConn->SetName(
"endunitconn");
2949 endUnitConn->DefinePolygon(6, xtru, ytru);
2950 endUnitConn->DefineSection(0, 0.);
2951 endUnitConn->DefineSection(1, sOBSFrameConnTopLen);
2956 createStaveSide(
"fakeCornerSide", unitlen / 2., alphaRad, beta, staveLb, staveHb, kFALSE);
2958 ypos = -triangleHeight / 2 + vside->GetY(3);
2959 TGeoTranslation* endUnitConnTrans =
new TGeoTranslation(
"endunitconntrans", 0, ypos, unitlen / 2);
2960 endUnitConnTrans->RegisterYourself();
2962 TGeoCompositeShape* endUnit =
new TGeoCompositeShape(
"endunitbody+endunitbodylow+endunitconn:endunitconntrans");
2963 endUnit->SetName(
"endunitcontainer");
2966 TGeoVolume* unitVol[2];
2967 unitVol[0] =
new TGeoVolume(
"SpaceFrameUnit0", frameUnit, medAir);
2968 unitVol[1] =
new TGeoVolume(
"SpaceFrameUnit1", frameUnit, medAir);
2969 unitVol[0]->SetVisibility(kFALSE);
2970 unitVol[1]->SetVisibility(kFALSE);
2972 TGeoVolume* next2EndVol[2];
2973 next2EndVol[0] =
new TGeoVolume(
"SpaceFrameNext2EndUnit0", next2EndUnit, medAir);
2974 next2EndVol[1] =
new TGeoVolume(
"SpaceFrameNext2EndUnit1", next2EndUnit, medAir);
2975 next2EndVol[0]->SetVisibility(kFALSE);
2976 next2EndVol[1]->SetVisibility(kFALSE);
2978 TGeoVolume* endVol[2];
2979 endVol[0] =
new TGeoVolume(
"SpaceFrameEndUnit0", endUnit, medAir);
2980 endVol[1] =
new TGeoVolume(
"SpaceFrameEndUnit1", endUnit, medAir);
2981 endVol[0]->SetVisibility(kFALSE);
2982 endVol[1]->SetVisibility(kFALSE);
2987 TGeoXtru* cfStavTop =
2988 createStaveSide(
"CFstavTopCornerVolshape", unitlen / 2., alphaRad, beta, staveLa, staveHa, kTRUE);
2990 TGeoVolume* cfStavTopVol =
new TGeoVolume(
"CFstavTopCornerVol", cfStavTop, medCarbon);
2991 cfStavTopVol->SetLineColor(35);
2993 unitVol[0]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
2995 unitVol[1]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
2997 next2EndVol[0]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
2999 next2EndVol[1]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3001 zlen = topVFactorEU * unitlen;
3002 TGeoXtru* cfStavTopEU =
3003 createStaveSide(
"CFstavTopCornerEUVolshape", zlen / 2., alphaRad, beta, staveLa, staveHa, kTRUE);
3005 TGeoVolume* cfStavTopVolEU =
new TGeoVolume(
"CFstavTopCornerEUVol", cfStavTopEU, medCarbon);
3006 cfStavTopVol->SetLineColor(35);
3008 zpos = endUnitBody->GetDZ() - zlen / 2.;
3010 endVol[0]->AddNode(cfStavTopVolEU, 1,
new TGeoTranslation(0, triangleHeight / 2, -zpos));
3012 endVol[1]->AddNode(cfStavTopVolEU, 1,
new TGeoTranslation(0, triangleHeight / 2, -zpos));
3015 TGeoXtru* cfStavSide =
3016 createStaveSide(
"CFstavSideCornerVolshape", unitlen / 2., alphaRad, beta, staveLb, staveHb, kFALSE);
3018 TGeoVolume* cfStavSideVol =
new TGeoVolume(
"CFstavSideCornerVol", cfStavSide, medCarbon);
3019 cfStavSideVol->SetLineColor(35);
3021 unitVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3022 unitVol[0]->AddNode(cfStavSideVol, 2,
3023 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3025 unitVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3026 unitVol[1]->AddNode(cfStavSideVol, 2,
3027 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3029 next2EndVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3030 next2EndVol[0]->AddNode(
3031 cfStavSideVol, 2,
new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3033 next2EndVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3034 next2EndVol[1]->AddNode(
3035 cfStavSideVol, 2,
new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3037 endVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3038 endVol[0]->AddNode(cfStavSideVol, 2,
3039 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3041 endVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3042 endVol[1]->AddNode(cfStavSideVol, 2,
3043 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3047 Double_t ribZProj = triangleHeight / TMath::Tan(sidePhiRad);
3048 Double_t sideRibLen =
3049 TMath::Sqrt(ribZProj * ribZProj + triangleHeight * triangleHeight + halfFrameWidth * halfFrameWidth);
3051 TGeoTubeSeg* sideRib =
new TGeoTubeSeg(0, sideRibRadius, sideRibLen / 2, 0, 180);
3052 TGeoVolume* sideRibVol =
new TGeoVolume(
"CFstavSideBeamVol", sideRib, medCarbon);
3053 sideRibVol->SetLineColor(35);
3055 TGeoCombiTrans* sideTransf[4];
3056 xpos = halfFrameWidth / 2 + 0.8 * staveHa * TMath::Cos(alphaRad / 2);
3057 ypos = -sideRibRadius / 2;
3060 sideTransf[0] =
new TGeoCombiTrans(xpos, ypos, -zpos,
new TGeoRotation(
"", 90 - alphaDeg, -sidePhiDeg, -90));
3061 sideTransf[1] =
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 - alphaDeg, sidePhiDeg, -90));
3062 sideTransf[2] =
new TGeoCombiTrans(-xpos, ypos, -zpos,
new TGeoRotation(
"", 90 + alphaDeg, sidePhiDeg, -90));
3063 sideTransf[3] =
new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 + alphaDeg, -sidePhiDeg, -90));
3065 unitVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3066 unitVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3067 unitVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3068 unitVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3070 unitVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3071 unitVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3072 unitVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3073 unitVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3075 next2EndVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3076 next2EndVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3077 next2EndVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3078 next2EndVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3080 next2EndVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3081 next2EndVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3082 next2EndVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3083 next2EndVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3085 endVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3086 endVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3087 endVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3088 endVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3090 endVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3091 endVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3092 endVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3093 endVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3097 Double_t baseRibLen = 0.98 * 2 * halfFrameWidth / TMath::Sin(basePhiRad);
3099 TGeoTubeSeg* baseRib1 =
new TGeoTubeSeg(0, baseRibRadius, baseRibLen / 2, 0, 180);
3100 TGeoVolume* baseRib1Vol =
new TGeoVolume(
"CFstavBaseBeam1Vol", baseRib1, medCarbon);
3101 baseRib1Vol->SetLineColor(35);
3103 TGeoTubeSeg* baseRib2 =
new TGeoTubeSeg(0, baseRibRadius, halfFrameWidth, 0, 90);
3104 TGeoVolume* baseRib2Vol =
new TGeoVolume(
"CFstavBaseBeam2Vol", baseRib2, medCarbon);
3105 baseRib2Vol->SetLineColor(35);
3107 TGeoTubeSeg* baseEndRib =
new TGeoTubeSeg(0, baseRibRadius, halfFrameWidth, 0, 180);
3108 TGeoVolume* baseEndRibVol =
new TGeoVolume(
"CFstavBaseEndBeamVol", baseEndRib, medCarbon);
3109 baseEndRibVol->SetLineColor(35);
3111 TGeoCombiTrans* baseTransf[6];
3112 ypos = triangleHeight / 2;
3115 baseTransf[0] =
new TGeoCombiTrans(
"", 0, -ypos, -zpos,
new TGeoRotation(
"", 90, 90, 90));
3116 baseTransf[1] =
new TGeoCombiTrans(
"", 0, -ypos, zpos,
new TGeoRotation(
"", -90, 90, -90));
3117 baseTransf[2] =
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", -90, basePhiDeg, -90));
3118 baseTransf[3] =
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", -90, -basePhiDeg, -90));
3119 zpos -= baseEndRib->GetRmax();
3120 baseTransf[4] =
new TGeoCombiTrans(
"", 0, -ypos, -zpos,
new TGeoRotation(
"", 90, 90, 90));
3121 baseTransf[5] =
new TGeoCombiTrans(
"", 0, -ypos, zpos,
new TGeoRotation(
"", 90, 90, 90));
3123 unitVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3124 unitVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3125 unitVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3127 unitVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3128 unitVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3129 unitVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3131 next2EndVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3132 next2EndVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3133 next2EndVol[0]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3135 next2EndVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3136 next2EndVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3137 next2EndVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3139 endVol[0]->AddNode(baseEndRibVol, 1, baseTransf[4]);
3140 endVol[0]->AddNode(baseRib2Vol, 1, baseTransf[1]);
3141 endVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3143 endVol[1]->AddNode(baseEndRibVol, 1, baseTransf[5]);
3144 endVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3145 endVol[1]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3148 ypos = -triangleHeight / 2 + cfStavSide->GetY(3);
3150 createOBSpaceFrameConnector(endVol[0], ypos, zpos, kFALSE);
3151 createOBSpaceFrameConnector(endVol[1], ypos, zpos, kTRUE);
3155 xtru[0] = ulegHalfLen;
3158 ytru[1] = -ulegHigh1;
3159 xtru[2] = xtru[1] - ulegThick;
3162 ytru[3] = ytru[0] - ulegThick;
3163 for (Int_t
i = 0;
i < 4;
i++) {
3164 xtru[
i + 4] = -xtru[3 -
i];
3165 ytru[
i + 4] = ytru[3 -
i];
3168 TGeoXtru* uleg1full =
new TGeoXtru(2);
3169 uleg1full->DefinePolygon(8, xtru, ytru);
3170 uleg1full->DefineSection(0, -ulegHalfWidth);
3171 uleg1full->DefineSection(1, ulegHalfWidth);
3173 TGeoXtru* uleg1half =
new TGeoXtru(2);
3174 uleg1half->DefinePolygon(8, xtru, ytru);
3175 uleg1half->DefineSection(0, -ulegHalfWidth / 2);
3176 uleg1half->DefineSection(1, ulegHalfWidth / 2);
3178 TGeoVolume* uleg1fullVol =
new TGeoVolume(
"CFstavULeg1FullVol", uleg1full, medF6151B05M);
3179 uleg1fullVol->SetLineColor(35);
3181 TGeoVolume* uleg1halfVol =
new TGeoVolume(
"CFstavULeg1HalfVol", uleg1half, medF6151B05M);
3182 uleg1halfVol->SetLineColor(35);
3185 ytru[1] = -ulegHigh2;
3186 ytru[2] = -ulegHigh2;
3187 ytru[5] = -ulegHigh2;
3188 ytru[6] = -ulegHigh2;
3190 TGeoXtru* uleg2full =
new TGeoXtru(2);
3191 uleg2full->DefinePolygon(8, xtru, ytru);
3192 uleg2full->DefineSection(0, -ulegHalfWidth);
3193 uleg2full->DefineSection(1, ulegHalfWidth);
3195 TGeoXtru* uleg2half =
new TGeoXtru(2);
3196 uleg2half->DefinePolygon(8, xtru, ytru);
3197 uleg2half->DefineSection(0, -ulegHalfWidth / 2);
3198 uleg2half->DefineSection(1, ulegHalfWidth / 2);
3200 TGeoVolume* uleg2fullVol =
new TGeoVolume(
"CFstavULeg2FullVol", uleg2full, medF6151B05M);
3201 uleg2fullVol->SetLineColor(35);
3203 TGeoVolume* uleg2halfVol =
new TGeoVolume(
"CFstavULeg2HalfVol", uleg2half, medF6151B05M);
3204 uleg2halfVol->SetLineColor(35);
3206 xpos = sOBSFrameULegXPos;
3207 ypos = triangleHeight / 2 + baseRibRadius;
3208 zpos = unitlen / 2 - uleg1half->GetZ(1);
3210 unitVol[0]->AddNode(uleg1halfVol, 1,
3211 new TGeoTranslation(xpos, -ypos, -zpos));
3212 unitVol[0]->AddNode(uleg1halfVol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
3214 unitVol[1]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3215 unitVol[1]->AddNode(uleg1halfVol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
3217 unitVol[0]->AddNode(uleg2halfVol, 1,
3218 new TGeoTranslation(-xpos, -ypos, -zpos));
3219 unitVol[0]->AddNode(uleg2halfVol, 2,
new TGeoTranslation(-xpos, -ypos, zpos));
3221 unitVol[1]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3222 unitVol[1]->AddNode(uleg2halfVol, 2,
new TGeoTranslation(-xpos, -ypos, zpos));
3224 next2EndVol[0]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, zpos));
3225 next2EndVol[0]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, zpos));
3227 next2EndVol[1]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3228 next2EndVol[1]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3230 zpos = unitlen / 2 - uleg1full->GetZ(1);
3231 next2EndVol[0]->AddNode(uleg1fullVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3232 next2EndVol[0]->AddNode(uleg2fullVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3234 next2EndVol[1]->AddNode(uleg1fullVol, 1,
new TGeoTranslation(xpos, -ypos, zpos));
3235 next2EndVol[1]->AddNode(uleg2fullVol, 1,
new TGeoTranslation(-xpos, -ypos, zpos));
3241void V3Layer::createOBSpaceFrameConnector(TGeoVolume* mother,
const Double_t ymot,
const Double_t zmot,
const Bool_t sideA,
const TGeoManager* mgr)
3261 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
3264 TString connName, compoShape;
3266 Double_t xlen, ylen, zlen;
3267 Double_t xpos, ypos, zpos;
3268 Double_t xtru[6], ytru[6];
3271 ylen = sOBSFrameConnTotHei - sOBSFrameConnInsHei;
3273 xtru[0] = sOBSFrameConnWidth / 2.;
3276 ytru[1] = sOBSFrameConnInsHei;
3277 xtru[2] = xtru[1] - ylen;
3278 ytru[2] = sOBSFrameConnTotHei;
3279 for (Int_t
i = 0;
i < 3;
i++) {
3280 xtru[
i + 3] = -xtru[2 -
i];
3281 ytru[
i + 3] = ytru[2 -
i];
3284 TGeoXtru* topConn =
new TGeoXtru(2);
3285 topConn->SetName(
"connectorTop");
3286 topConn->DefinePolygon(6, xtru, ytru);
3287 topConn->DefineSection(0, 0.);
3288 topConn->DefineSection(1, sOBSFrameConnTopLen);
3291 zlen = sOBSFrameConnTotLen - sOBSFrameConnTopLen;
3293 xtru[0] = sOBSFrameConnInsBase / 2.;
3295 xtru[1] = sOBSFrameConnInsWide / 2.;
3296 ytru[1] = sOBSFrameConnInsHei;
3302 TGeoXtru* insConn =
new TGeoXtru(2);
3303 insConn->SetName(
"connectorIns");
3304 insConn->DefinePolygon(4, xtru, ytru);
3305 insConn->DefineSection(0, -zlen);
3306 insConn->DefineSection(1, 0.);
3309 TGeoTube* topHoleR =
new TGeoTube(
"topholer", 0., sOBSFrameConnTopHoleD / 2., 1.1 * sOBSFrameConnTotHei);
3311 xpos = sOBSFrConnTopHoleXDist / 2.;
3312 ypos = sOBSFrameConnTotHei / 2.;
3313 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos;
3314 TGeoCombiTrans* topHoleR1Trans =
new TGeoCombiTrans(
"topholer1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3315 topHoleR1Trans->RegisterYourself();
3317 TGeoCombiTrans* topHoleR2Trans =
new TGeoCombiTrans(
"topholer2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3318 topHoleR2Trans->RegisterYourself();
3320 xpos = sOBSFrConnCHoleXDist / 2.;
3321 zpos = sOBSFrameConnTopLen - sOBSFrameConnCHoleZPos;
3322 TGeoCombiTrans* topCHoleR1Trans =
new TGeoCombiTrans(
"topcholer1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3323 topCHoleR1Trans->RegisterYourself();
3325 TGeoCombiTrans* topCHoleR2Trans =
new TGeoCombiTrans(
"topcholer2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3326 topCHoleR2Trans->RegisterYourself();
3328 TGeoBBox* topAHole =
new TGeoBBox(
"topahole", sOBSFrameConnAHoleWid / 2., sOBSFrameConnTotHei, sOBSFrameConnAHoleLen / 2.);
3330 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos;
3331 TGeoTranslation* topAHoleTrans =
new TGeoTranslation(
"topaholetr", 0, ypos, zpos);
3332 topAHoleTrans->RegisterYourself();
3334 TGeoTube* topCHole =
new TGeoTube(
"topchole", 0., sOBSFrConnCTopHoleD / 2., sOBSFrameConnTotHei);
3336 TGeoCombiTrans* topCHoleTrans =
new TGeoCombiTrans(
"topcholetr", 0, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3337 topCHoleTrans->RegisterYourself();
3339 TGeoTube* topASide =
new TGeoTube(
"topaside", 0., sOBSFrConnASideHoleD / 2., 1.1 * sOBSFrConnASideHoleL);
3341 zpos = sOBSFrameConnTopLen + topASide->GetDz() - sOBSFrConnASideHoleL;
3342 TGeoTranslation* topASideTrans =
new TGeoTranslation(
"topasidetr", 0, sOBSFrConnASideHoleY, zpos);
3343 topASideTrans->RegisterYourself();
3346 TGeoTube* insHole =
new TGeoTube(
"inshole", 0., sOBSFrameConnInsHoleD / 2., sOBSFrameConnInsHei);
3348 xpos = sOBSFrameConnInsHoleX / 2.;
3349 ypos = sOBSFrameConnInsHei / 2.;
3350 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos - sOBSFrameConnHoleZDist;
3351 TGeoCombiTrans* insHole1Trans =
new TGeoCombiTrans(
"inshole1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3352 insHole1Trans->RegisterYourself();
3354 TGeoCombiTrans* insHole2Trans =
new TGeoCombiTrans(
"inshole2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3355 insHole2Trans->RegisterYourself();
3359 connName =
"OBSFConnectorA";
3360 compoShape =
"(connectorTop-topholer:topholer2tr-topholer:topholer1tr-topahole:topaholetr-topaside:topasidetr)+(connectorIns-inshole:inshole1tr-inshole:inshole2tr)";
3362 connName =
"OBSFConnectorC";
3363 compoShape =
"(connectorTop-topholer:topholer2tr-topholer:topholer1tr-topholer:topcholer1tr-topholer:topcholer2tr-topchole:topcholetr)+(connectorIns-inshole:inshole1tr-inshole:inshole2tr)";
3366 TGeoCompositeShape* obsfConnSh =
new TGeoCompositeShape(compoShape.Data());
3368 TGeoVolume* obsfConnVol =
new TGeoVolume(connName, obsfConnSh, medPEEK);
3371 mother->AddNode(obsfConnVol, 1,
new TGeoTranslation(0, ymot, zmot));
3374TGeoVolume* V3Layer::createModuleOuterB(
const TGeoManager* mgr)
3395 const Int_t nameLen = 30;
3396 char chipName[nameLen], sensName[nameLen], volName[nameLen];
3398 Double_t xGap = sOBChipXGap;
3399 Double_t zGap = sOBChipZGap;
3401 Double_t xchip, ychip, zchip;
3402 Double_t xlen, ylen, zlen;
3403 Double_t xpos, ypos, zpos;
3410 if (mBuildLevel < 7) {
3420 ylen = 0.5 * sOBChipThickness;
3424 xchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDX();
3425 ychip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDY();
3426 zchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDZ();
3428 mOBModuleZLength = 2 * zchip * sOBChipsPerRow + (sOBChipsPerRow - 1) * sOBChipZGap;
3430 zlen = mOBModuleZLength / 2;
3433 xlen = (4 * xchip + xGap) / 2;
3434 ylen = sOBGlueFPCThick / 2;
3435 TGeoBBox* glueFPC =
new TGeoBBox(
"GlueFPC", xlen, ylen, zlen);
3437 ylen = sOBGlueColdPlThick / 2;
3438 TGeoBBox* glueCP =
new TGeoBBox(
"GlueCP", xlen, ylen, zlen);
3441 xlen = sOBFlexCableXWidth / 2;
3442 ylen = sOBFlexCableKapThick / 2;
3443 TGeoBBox* flexKap =
new TGeoBBox(
"MidFlexKap", xlen, ylen, zlen);
3445 TGeoVolume* cuGndCableVol = createOBFPCCuGnd(zlen);
3446 TGeoVolume* cuSignalCableVol = createOBFPCCuSig(zlen);
3449 Double_t ygnd = (
static_cast<TGeoBBox*
>(cuGndCableVol->GetShape()))->GetDY();
3450 Double_t ysig = (
static_cast<TGeoBBox*
>(cuSignalCableVol->GetShape()))->GetDY();
3452 xlen = (
static_cast<TGeoBBox*
>(cuGndCableVol->GetShape()))->GetDX();
3453 ylen = glueCP->GetDY() + ychip + glueFPC->GetDY() + ysig + flexKap->GetDY() + ygnd;
3454 TGeoBBox*
module = new TGeoBBox("OBModule", xlen, ylen, zlen);
3458 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
3459 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE$",
GetDetName()));
3460 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3462 TGeoVolume* glueFPCVol =
new TGeoVolume(
"GlueFPCVol", glueFPC, medGlue);
3463 glueFPCVol->SetLineColor(kBlack);
3464 glueFPCVol->SetFillColor(glueFPCVol->GetLineColor());
3465 glueFPCVol->SetFillStyle(4000);
3467 TGeoVolume* glueCPVol =
new TGeoVolume(
"GlueColdPlVol", glueCP, medGlue);
3468 glueCPVol->SetLineColor(kBlack);
3469 glueCPVol->SetFillColor(glueCPVol->GetLineColor());
3470 glueCPVol->SetFillStyle(4000);
3472 TGeoVolume* flexKapVol =
new TGeoVolume(
"FPCMidKapVol", flexKap, medKapton);
3473 flexKapVol->SetLineColor(kGreen);
3474 flexKapVol->SetFillColor(flexKapVol->GetLineColor());
3475 flexKapVol->SetFillStyle(4000);
3478 TGeoVolume* modVol =
new TGeoVolume(volName, module, medAir);
3479 modVol->SetVisibility(kTRUE);
3482 ypos = -
module->GetDY() + glueCP->GetDY();
3484 if (mBuildLevel < 3) {
3485 modVol->AddNode(glueCPVol, 1,
new TGeoTranslation(0, ypos, 0));
3488 xpos = xchip + xGap / 2;
3489 ypos += (ychip + glueCP->GetDY());
3495 for (Int_t k = 0; k < sOBChipsPerRow; k++)
3497 zpos =
module->GetDZ() - zchip - k * (2 * zchip + zGap);
3498 modVol->AddNode(chipVol, k,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 0, 180, 180)));
3499 mHierarchy[
kChip] += 1;
3502 for (Int_t k = 0; k < sOBChipsPerRow; k++)
3504 zpos = -
module->GetDZ() + zchip + k * (2 * zchip + zGap);
3505 modVol->AddNode(chipVol, k + sOBChipsPerRow,
new TGeoTranslation(-xpos, ypos, zpos));
3506 mHierarchy[
kChip] += 1;
3509 ypos += (ychip + glueFPC->GetDY());
3510 if (mBuildLevel < 3) {
3511 modVol->AddNode(glueFPCVol, 1,
new TGeoTranslation(0, ypos, 0));
3513 ypos += glueFPC->GetDY();
3515 if (mBuildLevel < 5) {
3517 modVol->AddNode(cuSignalCableVol, 1,
new TGeoTranslation(0, ypos, 0));
3519 ypos += (ysig + flexKap->GetDY());
3520 modVol->AddNode(flexKapVol, 1,
new TGeoTranslation(0, ypos, 0));
3522 ypos += (flexKap->GetDY() + ygnd);
3523 modVol->AddNode(cuGndCableVol, 1,
new TGeoTranslation(0, ypos, 0));
3530TGeoVolume* V3Layer::createOBFPCCuGnd(
const Double_t zcable,
const TGeoManager* mgr)
3547 Double_t xcable, ytot, ypos;
3550 xcable = sOBFlexCableXWidth / 2;
3551 ytot = sOBFPCSoldMaskThick + sOBFPCCopperThick;
3552 TGeoBBox* soldmask =
new TGeoBBox(xcable, ytot / 2, zcable);
3553 xcable *= sOBFPCCuAreaFracGnd;
3554 TGeoBBox* copper =
new TGeoBBox(xcable, sOBFPCCopperThick / 2, zcable);
3557 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3558 TGeoMedium* medCopper = mgr->GetMedium(Form(
"%s_COPPER$",
GetDetName()));
3560 TGeoVolume* soldmaskVol =
new TGeoVolume(
"FPCGndSolderMask", soldmask, medKapton);
3561 soldmaskVol->SetLineColor(kBlue);
3562 soldmaskVol->SetFillColor(kBlue);
3564 TGeoVolume* copperVol =
new TGeoVolume(
"FPCCopperGround", copper, medCopper);
3565 copperVol->SetLineColor(kCyan);
3566 copperVol->SetFillColor(kCyan);
3568 ypos = -soldmask->GetDY() + copper->GetDY();
3569 if (mBuildLevel < 1) {
3570 soldmaskVol->AddNode(copperVol, 1,
new TGeoTranslation(0, ypos, 0));
3576TGeoVolume* V3Layer::createOBFPCCuSig(
const Double_t zcable,
const TGeoManager* mgr)
3593 Double_t xcable, ytot, ypos;
3596 xcable = sOBFlexCableXWidth / 2;
3597 ytot = sOBFPCSoldMaskThick + sOBFPCCopperThick;
3598 TGeoBBox* soldmask =
new TGeoBBox(xcable, ytot / 2, zcable);
3599 xcable *= sOBFPCCuAreaFracSig;
3600 TGeoBBox* copper =
new TGeoBBox(xcable, sOBFPCCopperThick / 2, zcable);
3603 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3604 TGeoMedium* medCopper = mgr->GetMedium(Form(
"%s_COPPER$",
GetDetName()));
3606 TGeoVolume* soldmaskVol =
new TGeoVolume(
"FPCSigSolderMask", soldmask, medKapton);
3607 soldmaskVol->SetLineColor(kBlue);
3608 soldmaskVol->SetFillColor(kBlue);
3610 TGeoVolume* copperVol =
new TGeoVolume(
"FPCCopperSignal", copper, medCopper);
3611 copperVol->SetLineColor(kCyan);
3612 copperVol->SetFillColor(kCyan);
3614 ypos = soldmask->GetDY() - copper->GetDY();
3615 if (mBuildLevel < 1) {
3616 soldmaskVol->AddNode(copperVol, 1,
new TGeoTranslation(0, ypos, 0));
3622Double_t V3Layer::radiusOmTurboContainer()
3624 Double_t
rr, delta,
z, lstav, rstav;
3626 if (mChipThickness > 89.) {
3630 rstav = mLayerRadius + 0.5 * mChipThickness;
3631 delta = (0.5 * mChipThickness) /
cosD(mStaveTilt);
3632 z = (0.5 * mChipThickness) *
tanD(mStaveTilt);
3635 lstav = (0.5 * mStaveWidth) -
z;
3637 if ((
rr *
sinD(mStaveTilt) < lstav)) {
3638 return (
rr *
cosD(mStaveTilt));
3646 if (mLayerNumber < sNumberOfInnerLayers) {
3649 mNumberOfModules = u;
3650 mNumberOfChips = sOBChipsPerRow;
3659 LOG(error) <<
"Not a Turbo layer";
3668 LOG(error) <<
"Not a Turbo layer";
3672TGeoXtru* V3Layer::createStaveSide(
const char*
name, Double_t dz, Double_t
alpha, Double_t beta, Double_t L, Double_t H,
3689 Double_t xv[nv], yv[nv];
3691 TGeoXtru* cfStavSide =
new TGeoXtru(2);
3692 cfStavSide->SetName(
name);
3694 Double_t theta = TMath::PiOver2() - beta;
3695 Double_t gamma = beta -
alpha;
3700 xv[2] = L * TMath::Sin(
alpha);
3701 yv[2] = -L * TMath::Cos(
alpha);
3702 xv[1] = xv[2] - H * TMath::Cos(
alpha);
3703 yv[1] = yv[2] - H * TMath::Sin(
alpha);
3705 yv[0] = yv[1] + TMath::Tan(theta) * xv[1];
3711 Double_t
m = -TMath::Tan(
alpha),
n = TMath::Tan(gamma);
3714 xv[1] = -L * TMath::Cos(2 *
alpha);
3715 yv[1] = L * TMath::Sin(2 *
alpha);
3716 xv[2] = xv[1] - H * TMath::Sin(2 *
alpha);
3717 yv[2] = yv[1] - H * TMath::Cos(2 *
alpha);
3722 xv[3] = (yv[4] -
n * xv[4]) / (
m -
n);
3726 cfStavSide->DefinePolygon(nv, xv, yv);
3727 cfStavSide->DefineSection(0, -dz);
3728 cfStavSide->DefineSection(1, dz);
3733TGeoCombiTrans* V3Layer::createCombiTrans(
const char*
name, Double_t dy, Double_t dz, Double_t dphi, Bool_t planeSym)
3735 TGeoTranslation
t1(dy *
cosD(90. + dphi), dy *
sinD(90. + dphi), dz);
3736 TGeoRotation r1(
"", 0., 0., dphi);
3737 TGeoRotation r2(
"", 90, 180, -90 - dphi);
3739 TGeoCombiTrans* combiTrans1 =
new TGeoCombiTrans(
name);
3740 combiTrans1->SetTranslation(
t1);
3742 combiTrans1->SetRotation(r1);
3744 combiTrans1->SetRotation(r2);
3749void V3Layer::addTranslationToCombiTrans(TGeoCombiTrans* ct, Double_t dx, Double_t dy, Double_t dz)
const
3752 const Double_t*
vect = ct->GetTranslation();
3753 Double_t newVect[3] = {
vect[0] + dx,
vect[1] + dy,
vect[2] + dz};
3754 ct->SetTranslation(newVect);
Creates an ALPIDE chip in simulation.
Definition of the GeometryTGeo class.
Definition of the SegmentationAlpide class.
Definition of the V3Layer class.
static const char * getITSLayerPattern()
static const char * getITSSensorPattern()
static const char * getITSHalfBarrelPattern()
static const char * getITSChipPattern()
static const char * getITSModulePattern()
static const char * getITSHalfStavePattern()
static const char * getITSStavePattern()
Double_t cosD(Double_t deg) const
Cosine function.
const char * GetDetName() const
Get detector name.
Double_t sinD(Double_t deg) const
Double_t tanD(Double_t deg) const
Tangent function.
static const Double_t sMicron
Convert micron to TGeom's cm.
void setStaveWidth(Double_t w)
void setStaveTilt(Double_t t)
void setNumberOfUnits(Int_t u)
virtual void createLayer(TGeoVolume *motherVolume)
~V3Layer() override
Default destructor.
static TGeoVolume * createChip(Double_t yc, Double_t ys, char const *chipName="AlpideChip", char const *sensName="AlpideSensor", Bool_t dummy=kFALSE, const TGeoManager *mgr=gGeoManager)
GLfloat GLfloat GLfloat alpha
GLdouble GLdouble GLdouble GLdouble top
GLuint const GLchar * name
GLubyte GLubyte GLubyte GLubyte w
GLdouble GLdouble GLdouble z
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
value_T gpu::gpustd::array< value_T, 7 > & vect
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"