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::sIBFlexCapacitor1XWid = 0.5 * sMm;
65const Double_t V3Layer::sIBFlexCapacitor1YHi = 0.5 * sMm;
66const Double_t V3Layer::sIBFlexCapacitor1ZLen = 1.0 * sMm;
67const Double_t V3Layer::sIBFlexCapacitor22XWid = 0.7 * sMm;
68const Double_t V3Layer::sIBFlexCapacitor22YHi = 0.6 * sMm;
69const Double_t V3Layer::sIBFlexCapacitor22ZLen = 1.1 * sMm;
70const Double_t V3Layer::sIBFlexResistorXWid = 0.2 * sMm;
71const Double_t V3Layer::sIBFlexResistorYHi = 0.2 * sMm;
72const Double_t V3Layer::sIBFlexResistorZLen = 0.4 * sMm;
73const Double_t V3Layer::sIBColdPlateWidth = 15.4 * sMm;
74const Double_t V3Layer::sIBColdPlateZLen = 290.0 * sMm;
75const Double_t V3Layer::sIBGlueThick = 50.0 * sMicron;
76const Double_t V3Layer::sIBCarbonFleeceThick = 20.0 * sMicron;
77const Double_t V3Layer::sIBCarbonPaperThick = 30.0 * sMicron;
78const Double_t V3Layer::sIBCarbonPaperWidth = 12.5 * sMm;
79const Double_t V3Layer::sIBCarbonPaperZLen = 280.0 * sMm;
80const Double_t V3Layer::sIBK13D2UThick = 70.0 * sMicron;
81const Double_t V3Layer::sIBCoolPipeInnerD = 1.024 * sMm;
82const Double_t V3Layer::sIBCoolPipeThick = 25.4 * sMicron;
83const Double_t V3Layer::sIBCoolPipeXDist = 5.0 * sMm;
84const Double_t V3Layer::sIBCoolPipeZLen = 302.0 * sMm;
85const Double_t V3Layer::sIBTopVertexWidth1 = 0.258 * sMm;
86const Double_t V3Layer::sIBTopVertexWidth2 = 0.072 * sCm;
87const Double_t V3Layer::sIBTopVertexHeight = 0.04 * sCm;
88const Double_t V3Layer::sIBTopVertexAngle = 60.0;
89const Double_t V3Layer::sIBSideVertexWidth = 0.05 * sCm;
90const Double_t V3Layer::sIBSideVertexHeight = 0.074 * sCm;
91const Double_t V3Layer::sIBTopFilamentSide = 0.04 * sCm;
92const Double_t V3Layer::sIBTopFilamentAlpha = 109.8;
93const Double_t V3Layer::sIBTopFilamentInterZ = 15.0 * sMm;
94const Double_t V3Layer::sIBEndSupportThick = 0.149 * sMm;
95const Double_t V3Layer::sIBEndSupportZLen = 2.5 * sMm;
96const Double_t V3Layer::sIBEndSupportXUp = 1.0 * sMm;
97const Double_t V3Layer::sIBEndSupportOpenPhi = 120.0;
99const Double_t V3Layer::sIBConnectorXWidth = 10.0 * sMm;
100const Double_t V3Layer::sIBConnectorYTot = 4.7 * sMm;
101const Double_t V3Layer::sIBConnectBlockZLen = 16.5 * sMm;
102const Double_t V3Layer::sIBConnBodyYHeight = 2.5 * sMm;
103const Double_t V3Layer::sIBConnTailYShift = 0.9 * sMm;
104const Double_t V3Layer::sIBConnTailYMid = 2.5 * sMm;
105const Double_t V3Layer::sIBConnTailZLen = 2.5 * sMm;
106const Double_t V3Layer::sIBConnTailOpenPhi = 120.0;
107const Double_t V3Layer::sIBConnRoundHoleD = 2.0 * sMm;
108const Double_t V3Layer::sIBConnRoundHoleZ = (9.0 - 4.0) * sMm;
109const Double_t V3Layer::sIBConnSquareHoleX = 2.0 * sMm;
110const Double_t V3Layer::sIBConnSquareHoleZ = 2.8 * sMm;
111const Double_t V3Layer::sIBConnSquareHoleZPos = 9.0 * sMm;
112const Double_t V3Layer::sIBConnInsertHoleD = 2.0 * sMm;
113const Double_t V3Layer::sIBConnInsertHoleZPos = 9.0 * sMm;
114const Double_t V3Layer::sIBConnTubeHole1D = 1.6 * sMm;
115const Double_t V3Layer::sIBConnTubeHole1ZLen = 3.0 * sMm;
116const Double_t V3Layer::sIBConnTubeHole1ZLen2 = 2.7 * sMm;
117const Double_t V3Layer::sIBConnTubeHole2D = 1.2 * sMm;
118const Double_t V3Layer::sIBConnTubeHole3XPos = 1.0 * sMm;
119const Double_t V3Layer::sIBConnTubeHole3ZPos = 14.5 * sMm;
120const Double_t V3Layer::sIBConnTubesXDist = 5.0 * sMm;
121const Double_t V3Layer::sIBConnTubesYPos = 1.25 * sMm;
122const Double_t V3Layer::sIBConnInsertD = 2.0 * sMm;
123const Double_t V3Layer::sIBConnInsertHeight = 2.3 * sMm;
124const Double_t V3Layer::sIBConnSideHole1D = 1.0 * sMm;
125const Double_t V3Layer::sIBConnSideHole1YPos = 1.25 * sMm;
126const Double_t V3Layer::sIBConnSideHole1ZPos = 11.5 * sMm;
127const Double_t V3Layer::sIBConnSideHole1XWid = 1.0 * sMm;
128const Double_t V3Layer::sIBConnSideHole2YPos = 1.25 * sMm;
129const Double_t V3Layer::sIBConnSideHole2ZPos = 11.0 * sMm;
130const Double_t V3Layer::sIBConnSideHole2XWid = 1.0 * sMm;
131const Double_t V3Layer::sIBConnSideHole2YWid = 1.0 * sMm;
132const Double_t V3Layer::sIBConnSideHole2ZWid = 1.0 * sMm;
133const Double_t V3Layer::sIBConnectAFitExtD = 1.65 * sMm;
134const Double_t V3Layer::sIBConnectAFitIntD = 1.19 * sMm;
135const Double_t V3Layer::sIBConnectAFitZLen = 12.5 * sMm;
136const Double_t V3Layer::sIBConnectAFitZOut = 10.0 * sMm;
137const Double_t V3Layer::sIBConnPlugInnerD = 0.8 * sMm;
138const Double_t V3Layer::sIBConnPlugTotLen = 1.7 * sMm;
139const Double_t V3Layer::sIBConnPlugInnerLen = 1.0 * sMm;
141const Double_t V3Layer::sIBStaveHeight = 0.5 * sCm;
144const Int_t V3Layer::sOBChipsPerRow = 7;
145const Int_t V3Layer::sOBNChipRows = 2;
147const Double_t V3Layer::sOBChipThickness = 100.0 * sMicron;
149const Double_t V3Layer::sOBHalfStaveWidth = 3.01 * sCm;
150const Double_t V3Layer::sOBModuleGap = 200.0 * sMicron;
151const Double_t V3Layer::sOBChipXGap = 150.0 * sMicron;
152const Double_t V3Layer::sOBChipZGap = 150.0 * sMicron;
153const Double_t V3Layer::sOBFlexCableXWidth = 3.3 * sCm;
154const Double_t V3Layer::sOBFlexCableAlThick = 0.005 * sCm;
155const Double_t V3Layer::sOBFlexCableKapThick = 75.0 * sMicron;
156const Double_t V3Layer::sOBFPCSoldMaskThick = 30.0 * sMicron;
157const Double_t V3Layer::sOBFPCCopperThick = 18.0 * sMicron;
158const Double_t V3Layer::sOBFPCCuAreaFracGnd = 0.954;
159const Double_t V3Layer::sOBFPCCuAreaFracSig = 0.617;
160const Double_t V3Layer::sOBFPCCapacitorXWid = 0.5 * sMm;
161const Double_t V3Layer::sOBFPCCapacitorYHi = 0.5 * sMm;
162const Double_t V3Layer::sOBFPCCapacitorZLen = 1.0 * sMm;
163const Double_t V3Layer::sOBGlueFPCThick = 50 * sMicron;
164const Double_t V3Layer::sOBGlueColdPlThick = 80 * sMicron;
165const Double_t V3Layer::sOBPowerBusXWidth = 3.04 * sCm;
166const Double_t V3Layer::sOBPowerBusAlThick = 100.0 * sMicron;
167const Double_t V3Layer::sOBPowerBusAlFrac = 0.90;
168const Double_t V3Layer::sOBPowerBusDielThick = 50.0 * sMicron;
169const Double_t V3Layer::sOBPowerBusKapThick = 27.5 * sMicron;
170const Double_t V3Layer::sOBBiasBusXWidth = 7.7 * sMm;
171const Double_t V3Layer::sOBBiasBusAlThick = 25.0 * sMicron;
172const Double_t V3Layer::sOBBiasBusAlFrac = 0.90;
173const Double_t V3Layer::sOBBiasBusDielThick = 50.0 * sMicron;
174const Double_t V3Layer::sOBBiasBusKapThick = 25.0 * sMicron;
175const Double_t V3Layer::sOBColdPlateXWidth = 3.04 * sCm;
176const Double_t V3Layer::sOBColdPlateZLenML = 87.55 * sCm;
177const Double_t V3Layer::sOBColdPlateZLenOL = 150.15 * sCm;
178const Double_t V3Layer::sOBColdPlateThick = 0.012 * sCm;
179const Double_t V3Layer::sOBHalfStaveYPos = 2.067 * sCm;
180const Double_t V3Layer::sOBHalfStaveYTrans = 3.6 * sMm;
181const Double_t V3Layer::sOBHalfStaveXOverlap = 7.2 * sMm;
182const Double_t V3Layer::sOBGraphiteFoilThick = 30.0 * sMicron;
183const Double_t V3Layer::sOBCarbonFleeceThick = 20.0 * sMicron;
184const Double_t V3Layer::sOBCoolTubeInnerD = 2.05 * sMm;
185const Double_t V3Layer::sOBCoolTubeThick = 32.0 * sMicron;
186const Double_t V3Layer::sOBCoolTubeXDist = 10.0 * sMm;
188const Double_t V3Layer::sOBCPConnectorXWidth = 16.0 * sMm;
189const Double_t V3Layer::sOBCPConnBlockZLen = 15.0 * sMm;
190const Double_t V3Layer::sOBCPConnBlockYHei = 3.6 * sMm;
191const Double_t V3Layer::sOBCPConnHollowZLen = 3.0 * sMm;
192const Double_t V3Layer::sOBCPConnHollowYHei = 0.9 * sMm;
193const Double_t V3Layer::sOBCPConnSquareHoleX = 4.0 * sMm;
194const Double_t V3Layer::sOBCPConnSquareHoleZ = 5.0 * sMm;
195const Double_t V3Layer::sOBCPConnSqrHoleZPos = 4.0 * sMm;
196const Double_t V3Layer::sOBCPConnSqrInsertRZ = 3.5 * sMm;
197const Double_t V3Layer::sOBCPConnRoundHoleD = 4.0 * sMm;
198const Double_t V3Layer::sOBCPConnRndHoleZPos = 7.0 * sMm;
199const Double_t V3Layer::sOBCPConnTubesXDist = 10.0 * sMm;
200const Double_t V3Layer::sOBCPConnTubesYPos = 1.8 * sMm;
201const Double_t V3Layer::sOBCPConnTubeHole1D = 2.6 * sMm;
202const Double_t V3Layer::sOBCPConnTubeHole1Z = 3.5 * sMm;
203const Double_t V3Layer::sOBCPConnTubeHole2D = 2.2 * sMm;
204const Double_t V3Layer::sOBCPConnFitHoleD = 2.8 * sMm;
205const Double_t V3Layer::sOBCPConnTubeHole3XP = 1.0 * sMm;
206const Double_t V3Layer::sOBCPConnTubeHole3ZP = 2.0 * sMm;
207const Double_t V3Layer::sOBCPConnInstZThick = 1.0 * sMm;
208const Double_t V3Layer::sOBCPConnInsertYHei = 3.4 * sMm;
209const Double_t V3Layer::sOBCPConnAFitExtD = 2.8 * sMm;
210const Double_t V3Layer::sOBCPConnAFitThick = 0.3 * sMm;
211const Double_t V3Layer::sOBCPConnAFitZLen = 17.0 * sMm;
212const Double_t V3Layer::sOBCPConnAFitZIn = 3.0 * sMm;
213const Double_t V3Layer::sOBCPConnPlugInnerD = 0.8 * sMm;
214const Double_t V3Layer::sOBCPConnPlugTotLen = 1.7 * sMm;
215const Double_t V3Layer::sOBCPConnPlugThick = 0.5 * sMm;
217const Double_t V3Layer::sOBSpaceFrameZLen[2] = {900.0 * sMm, 1526.0 * sMm};
218const Int_t V3Layer::sOBSpaceFrameNUnits[2] = {23, 39};
219const Double_t V3Layer::sOBSpaceFrameUnitLen = 39.1 * sMm;
220const Double_t V3Layer::sOBSpaceFrameWidth = 42.44 * sMm;
221const Double_t V3Layer::sOBSpaceFrameHeight = 36.45 * sMm;
222const Double_t V3Layer::sOBSpaceFrameTopVL = 4.0 * sMm;
223const Double_t V3Layer::sOBSpaceFrameTopVH = 0.35 * sMm;
224const Double_t V3Layer::sOBSpaceFrameSideVL = 4.5 * sMm;
225const Double_t V3Layer::sOBSpaceFrameSideVH = 0.35 * sMm;
226const Double_t V3Layer::sOBSpaceFrameVAlpha = 60.0;
227const Double_t V3Layer::sOBSpaceFrameVBeta = 68.0;
228const Double_t V3Layer::sOBSFrameBaseRibDiam = 1.33 * sMm;
229const Double_t V3Layer::sOBSFrameBaseRibPhi = 54.0;
230const Double_t V3Layer::sOBSFrameSideRibDiam = 1.25 * sMm;
231const Double_t V3Layer::sOBSFrameSideRibPhi = 70.0;
232const Double_t V3Layer::sOBSFrameULegLen = 14.2 * sMm;
233const Double_t V3Layer::sOBSFrameULegWidth = 1.5 * sMm;
234const Double_t V3Layer::sOBSFrameULegHeight1 = 6.3 * sMm;
235const Double_t V3Layer::sOBSFrameULegHeight2 = 2.7 * sMm;
236const Double_t V3Layer::sOBSFrameULegThick = 0.3 * sMm;
237const Double_t V3Layer::sOBSFrameULegXPos = 12.9 * sMm;
238const Double_t V3Layer::sOBSFrameConnWidth = 42.0 * sMm;
239const Double_t V3Layer::sOBSFrameConnTotLen = 29.0 * sMm;
240const Double_t V3Layer::sOBSFrameConnTotHei = 4.8 * sMm;
241const Double_t V3Layer::sOBSFrameConnTopLen = 14.0 * sMm;
242const Double_t V3Layer::sOBSFrameConnInsWide = 36.869 * sMm;
243const Double_t V3Layer::sOBSFrameConnInsBase = 39.6 * sMm;
244const Double_t V3Layer::sOBSFrameConnInsHei = 2.8 * sMm;
245const Double_t V3Layer::sOBSFrameConnHoleZPos = 7.0 * sMm;
246const Double_t V3Layer::sOBSFrameConnHoleZDist = 15.0 * sMm;
247const Double_t V3Layer::sOBSFrameConnTopHoleD = 3.0 * sMm;
248const Double_t V3Layer::sOBSFrConnTopHoleXDist = 24.0 * sMm;
249const Double_t V3Layer::sOBSFrameConnAHoleWid = 4.0 * sMm;
250const Double_t V3Layer::sOBSFrameConnAHoleLen = 5.0 * sMm;
251const Double_t V3Layer::sOBSFrConnASideHoleD = 3.0 * sMm;
252const Double_t V3Layer::sOBSFrConnASideHoleL = 2.5 * sMm;
253const Double_t V3Layer::sOBSFrConnASideHoleY = 2.3 * sMm;
254const Double_t V3Layer::sOBSFrameConnCHoleZPos = 3.0 * sMm;
255const Double_t V3Layer::sOBSFrConnCHoleXDist = 32.0 * sMm;
256const Double_t V3Layer::sOBSFrConnCTopHoleD = 4.0 * sMm;
257const Double_t V3Layer::sOBSFrameConnInsHoleD = 5.0 * sMm;
258const Double_t V3Layer::sOBSFrameConnInsHoleX = 25.8 * sMm;
262#define SQ(A) (A) * (A)
279 mStaveModel(kIBModelDummy),
303 mStaveModel(kIBModelDummy),
316 std::string volumeName;
319 TGeoVolume* layerVolume =
new TGeoVolumeAssembly(volumeName.c_str());
323 TGeoVolume* halfBarrel;
327 halfBarrel = createHalfBarrelTurbo();
329 halfBarrel = createHalfBarrel();
332 layerVolume->AddNode(halfBarrel, 0,
nullptr);
333 layerVolume->AddNode(halfBarrel, 1,
new TGeoRotation(
"", 180, 0, 0));
337 motherVolume->AddNode(layerVolume, 1,
nullptr);
343TGeoVolume* V3Layer::createHalfBarrel()
345 const Int_t nameLen = 30;
346 char volumeName[nameLen];
347 Double_t xpos, ypos, zpos;
351 if (mLayerRadius <= 0) {
352 LOG(fatal) <<
"Wrong layer radius " << mLayerRadius;
355 if (mNumberOfStaves <= 0) {
356 LOG(fatal) <<
"Wrong number of staves " << mNumberOfStaves;
359 if (mNumberOfChips <= 0) {
360 LOG(fatal) <<
"Wrong number of chips " << mNumberOfChips;
363 if (mLayerNumber >= sNumberOfInnerLayers && mNumberOfModules <= 0) {
364 LOG(fatal) <<
"Wrong number of modules " << mNumberOfModules;
367 if (mChipThickness <= 0) {
368 LOG(fatal) <<
"Chip thickness wrong or not set " << mChipThickness;
371 if (mSensorThickness <= 0) {
372 LOG(fatal) <<
"Sensor thickness wrong or not set " << mSensorThickness;
375 if (mSensorThickness > mChipThickness) {
376 LOG(fatal) <<
"Sensor thickness " << mSensorThickness <<
" is greater than chip thickness " << mChipThickness;
380 alpha = (360. / (2 * mNumberOfStaves)) * DegToRad();
385 TGeoVolume* halfBarrelVolume =
new TGeoVolumeAssembly(volumeName);
386 halfBarrelVolume->SetUniqueID(mChipTypeID);
389 halfBarrelVolume->SetVisibility(kTRUE);
390 halfBarrelVolume->SetLineColor(1);
392 TGeoVolume* stavVol = createStave();
395 alpha = 360. / mNumberOfStaves;
396 Double_t
r = mLayerRadius + (
static_cast<TGeoBBox*
>(stavVol->GetShape()))->GetDY();
398 for (Int_t
j = 0;
j < mNumberOfStaves / 2;
j++) {
400 xpos =
r *
cosD(phi);
401 ypos =
r *
sinD(phi);
404 halfBarrelVolume->AddNode(stavVol,
j,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", phi, 0, 0)));
409 return halfBarrelVolume;
412TGeoVolume* V3Layer::createHalfBarrelTurbo()
414 const Int_t nameLen = 30;
415 char volumeName[nameLen];
416 Double_t xpos, ypos, zpos;
420 if (mStaveWidth <= 0) {
421 LOG(fatal) <<
"Wrong stave width " << mStaveWidth;
424 if (
Abs(mStaveTilt) > 45) {
425 LOG(warning) <<
"Stave tilt angle (" << mStaveTilt <<
") greater than 45deg";
429 TGeoVolume* halfBarrelVolume =
new TGeoVolumeAssembly(volumeName);
430 halfBarrelVolume->SetUniqueID(mChipTypeID);
431 halfBarrelVolume->SetVisibility(kTRUE);
432 halfBarrelVolume->SetLineColor(1);
433 TGeoVolume* stavVol = createStave();
436 alpha = 360. / mNumberOfStaves;
437 Double_t
r = mLayerRadius ;
439 for (Int_t
j = 0;
j < mNumberOfStaves / 2;
j++) {
441 xpos =
r *
cosD(phi);
442 ypos =
r *
sinD(phi);
445 halfBarrelVolume->AddNode(stavVol,
j,
446 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", phi - mStaveTilt, 0, 0)));
450 return halfBarrelVolume;
453TGeoVolume* V3Layer::createStave(
const TGeoManager* )
477 const Int_t nameLen = 30;
478 char volumeName[nameLen];
480 Double_t xpos, ypos, ymod;
484 TGeoVolume* staveVol =
new TGeoVolumeAssembly(volumeName);
485 staveVol->SetVisibility(kTRUE);
486 staveVol->SetLineColor(2);
488 TGeoVolume* mechStaveVol =
nullptr;
491 if (mLayerNumber < sNumberOfInnerLayers) {
492 ymod = createStaveInnerB(staveVol);
493 ypos = ymod - mChipThickness;
498 mechStaveVol = createStaveStructInnerB();
502 ypos += (
static_cast<TGeoBBox*
>(mechStaveVol->GetShape()))->GetDY();
504 staveVol->AddNode(mechStaveVol, 1,
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", 0, 0, 180)));
507 TGeoVolume* hstaveVol = createStaveOuterB();
509 staveVol->AddNode(hstaveVol, 0);
512 xpos = (
static_cast<TGeoBBox*
>(hstaveVol->GetShape()))->GetDX() - sOBHalfStaveXOverlap / 2;
514 ypos = sOBHalfStaveYPos;
515 staveVol->AddNode(hstaveVol, 0,
new TGeoTranslation(-xpos, ypos + sOBHalfStaveYTrans, 0));
516 staveVol->AddNode(hstaveVol, 1,
new TGeoTranslation(xpos, ypos, 0));
518 mechStaveVol = createSpaceFrameOuterB();
521 if (mBuildLevel < 6) {
522 staveVol->AddNode(mechStaveVol, 1,
523 new TGeoCombiTrans(0, -sOBSFrameULegHeight2, 0,
new TGeoRotation(
"", 180, 0, 0)));
529 staveVol->GetShape()->ComputeBBox();
535Double_t V3Layer::createStaveInnerB(TGeoVolume* mother,
const TGeoManager* mgr)
537 Double_t xtot, ytot, ztot, xchip, zchip, ymod;
538 Double_t xpos, ypos, zpos;
540 const Int_t nameLen = 30;
541 char chipName[nameLen], sensName[nameLen], volumeName[nameLen];
544 if (mBuildLevel < 6) {
554 ymod = 0.5 * mChipThickness;
558 xchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDX();
559 zchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDZ();
561 mIBModuleZLength = 2 * zchip * sIBChipsPerRow + (sIBChipsPerRow - 1) * sIBChipZGap;
563 xtot = xchip + (sIBFPCWiderXPlus + sIBFPCWiderXNeg) / 2;
564 ztot = mIBModuleZLength / 2;
567 TGeoVolume* ibModule = createModuleInnerB(xchip, zchip);
572 ypos = ymod - mChipThickness;
574 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
575 zpos = ztot -
j * (2 * zchip + sIBChipZGap) - zchip;
576 mother->AddNode(chipVol,
j,
new TGeoCombiTrans(0, ypos, zpos,
new TGeoRotation(
"", 0, 180, 180)));
583 Double_t yvol = (
static_cast<TGeoBBox*
>(ibModule->GetShape()))->GetDY();
584 xpos = 0.5 * (xtot - xchip);
585 ypos += (ymod + yvol);
586 mother->AddNode(ibModule, 1,
new TGeoTranslation(xpos, ypos, 0));
594TGeoVolume* V3Layer::createModuleInnerB(
const Double_t xchip,
const Double_t zchip,
const TGeoManager* mgr)
613 Double_t xtot, ytot, ztot;
614 Double_t ymid, shrinkFactor = 0.73;
615 Double_t xv[5], yv[5];
616 Double_t xpos, ypos, zpos;
617 const Int_t nameLen = 30;
618 char volumeName[nameLen];
621 xtot = xchip + (sIBFPCWiderXPlus + sIBFPCWiderXNeg) / 2;
622 ztot = mIBModuleZLength / 2;
627 TGeoVolume* aluGndCableVol = createIBFPCAlGnd(xtot, ztot);
628 TGeoVolume* aluAnodeCableVol = createIBFPCAlAnode(xtot, ztot);
631 Double_t ygnd = (
static_cast<TGeoBBox*
>(aluGndCableVol->GetShape()))->GetDY();
632 Double_t yano = (
static_cast<TGeoBBox*
>(aluAnodeCableVol->GetShape()))->GetDY();
634 ytot = sIBGlueThick / 2 + ygnd + sIBFlexCableKapThick / 2 + yano + sIBFlexCapacitor22YHi / 2;
635 ymid = sIBGlueThick / 2 + ygnd + sIBFlexCableKapThick / 2 + yano;
640 yv[1] = yv[0] + 6 * ymid;
641 xv[2] = xtot * shrinkFactor;
648 TGeoXtru*
module = new TGeoXtru(2);
649 module->DefinePolygon(6, xv, yv);
650 module->DefinePolygon(5, xv, yv);
651 module->DefineSection(0, -ztot);
652 module->DefineSection(1, ztot);
655 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
656 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
657 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE_IBFPC$",
GetDetName()));
659 snprintf(volumeName, nameLen,
"ServicesContainer%d", mLayerNumber);
660 TGeoVolume* modVol =
new TGeoVolume(volumeName, module, medAir);
662 TGeoVolume* glueVol =
new TGeoVolume(
"FPCGlue", glue, medGlue);
663 glueVol->SetLineColor(kBlack);
664 glueVol->SetFillColor(kBlack);
666 TGeoVolume* kapCableVol =
new TGeoVolume(
"FPCKapton", kapCable, medKapton);
667 kapCableVol->SetLineColor(kBlue);
668 kapCableVol->SetFillColor(kBlue);
671 xpos = -xtot + xchip + sIBFPCWiderXNeg;
672 ypos = -ytot + glue->GetDY();
673 if (mBuildLevel < 2) {
674 modVol->AddNode(glueVol, 1,
new TGeoTranslation(xpos, ypos, 0));
676 ypos += glue->GetDY();
678 if (mBuildLevel < 4) {
680 modVol->AddNode(aluGndCableVol, 1,
new TGeoTranslation(0, ypos, 0));
682 ypos += (ygnd + kapCable->GetDY());
683 modVol->AddNode(kapCableVol, 1,
new TGeoTranslation(0, ypos, 0));
685 ypos += (kapCable->GetDY() + yano);
686 modVol->AddNode(aluAnodeCableVol, 1,
new TGeoTranslation(0, ypos, 0));
692 createIBCapacitors(modVol, zchip, ypos);
698void V3Layer::createIBCapacitors(TGeoVolume* modvol, Double_t zchip, Double_t yzero,
const TGeoManager* mgr)
721 const Double_t xGroup1A = 4265.9 *
sMicron;
722 const Double_t zGroup1A[2] = {-7142.9 *
sMicron, 7594.1 *
sMicron};
723 const Double_t xGroup1B = 690.9 *
sMicron;
724 const Double_t zGroup1B = -7142.9 *
sMicron;
725 const Double_t xGroup2 = 6300.0 *
sMicron;
726 const Double_t zGroup2 = 15075.0 *
sMicron;
727 const Double_t xGroup3 = 5575.0 *
sMicron;
728 const Double_t zGroup3 = 131900.0 *
sMicron;
733 const Int_t nGroup5A = 5, nGroup5B = 4;
734 const Double_t xGroup5A[2] = {1400.0 *
sMicron, 1350.0 *
sMicron};
737 const Double_t xGroup5B = 1100.0 *
sMicron;
740 const Int_t nResist = 2;
741 const Double_t xResist = -7975.0 *
sMicron;
742 const Double_t zResist[nResist] = {114403.0 *
sMicron, 119222.0 *
sMicron};
744 Double_t xpos, ypos, zpos;
747 TGeoVolume *capacitorSmall, *capacitorLarge, *resistor;
754 capacitorSmall = mgr->GetVolume(
"IBFPCCapacitorSmall");
756 if (!capacitorSmall) {
757 TGeoBBox* capSmsh =
new TGeoBBox(sIBFlexCapacitor1XWid / 2, sIBFlexCapacitor1YHi / 2, sIBFlexCapacitor1ZLen / 2);
758 TGeoBBox* capLgsh =
new TGeoBBox(sIBFlexCapacitor22XWid / 2, sIBFlexCapacitor22YHi / 2, sIBFlexCapacitor22ZLen / 2);
760 TGeoMedium* medCeramic = mgr->GetMedium(Form(
"%s_CERAMIC$",
GetDetName()));
762 capacitorSmall =
new TGeoVolume(
"IBFPCCapacitorSmall", capSmsh, medCeramic);
763 capacitorSmall->SetLineColor(kBlack);
764 capacitorSmall->SetFillColor(kBlack);
766 capacitorLarge =
new TGeoVolume(
"IBFPCCapacitorLarge", capLgsh, medCeramic);
767 capacitorLarge->SetLineColor(kBlack);
768 capacitorLarge->SetFillColor(kBlack);
771 sIBFlexResistorYHi / 2,
772 sIBFlexResistorZLen / 2);
774 resistor =
new TGeoVolume(
"IBFPCResistor", ressh, medCeramic);
775 resistor->SetLineColor(kBlack);
776 resistor->SetFillColor(kBlack);
778 capacitorLarge = mgr->GetVolume(
"IBFPCCapacitorLarge");
779 resistor = mgr->GetVolume(
"IBFPCResistor");
783 ypos = yzero + sIBFlexCapacitor22YHi / 2;
786 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
787 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1A[0];
788 modvol->AddNode(capacitorLarge, 2 *
j + 1,
new TGeoTranslation(-xpos, ypos, -zpos));
789 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1A[1];
790 modvol->AddNode(capacitorLarge, 2 *
j + 2,
new TGeoTranslation(-xpos, ypos, -zpos));
793 nCapacitors = 2 * sIBChipsPerRow;
795 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
796 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1B;
797 modvol->AddNode(capacitorLarge,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
800 nCapacitors += sIBChipsPerRow;
801 ypos = yzero + sIBFlexCapacitor1YHi / 2;
804 for (Int_t
j = 0;
j < sIBChipsPerRow - 1;
j++) {
805 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup2;
806 modvol->AddNode(capacitorSmall,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
809 nCapacitors += (sIBChipsPerRow - 1);
812 modvol->AddNode(capacitorSmall, 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
815 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
816 if (
j == (sIBChipsPerRow - 1)) {
821 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup4[
j];
822 modvol->AddNode(capacitorSmall,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
825 nCapacitors += sIBChipsPerRow;
826 ypos = yzero + sIBFlexCapacitor22YHi / 2;
827 for (Int_t
j = 0;
j < nGroup5A;
j++) {
834 modvol->AddNode(capacitorLarge,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
837 nCapacitors += nGroup5A;
839 for (Int_t
j = 0;
j < nGroup5B;
j++) {
841 modvol->AddNode(capacitorLarge,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
846 ypos = yzero + sIBFlexResistorYHi / 2;
847 for (Int_t
j = 0;
j < nResist;
j++) {
849 modvol->AddNode(resistor,
j + 1,
new TGeoTranslation(-xpos, ypos, -zpos));
853TGeoVolume* V3Layer::createIBFPCAlGnd(
const Double_t xcable,
const Double_t zcable,
const TGeoManager* mgr)
864 ytot = sIBFlexCablePolyThick + sIBFlexCableAlThick;
869 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
870 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
872 TGeoVolume* coverlayVol =
new TGeoVolume(
"FPCCoverlayGround", coverlay, medKapton);
873 coverlayVol->SetLineColor(kBlue);
874 coverlayVol->SetFillColor(kBlue);
876 TGeoVolume* aluminumVol =
new TGeoVolume(
"FPCAluminumGround", aluminum, medAluminum);
877 aluminumVol->SetLineColor(kCyan);
878 aluminumVol->SetFillColor(kCyan);
880 ypos = coverlay->GetDY() - aluminum->GetDY();
881 if (mBuildLevel < 1) {
882 coverlayVol->AddNode(aluminumVol, 1,
new TGeoTranslation(0, ypos, 0));
888TGeoVolume* V3Layer::createIBFPCAlAnode(
const Double_t xcable,
const Double_t zcable,
const TGeoManager* mgr)
899 Double_t xtru[4], ytru[4];
902 ytot = sIBFlexCablePolyThick + sIBFlexCableAlThick;
906 xtru[0] = -sIBFPCAlAnodeWidth2 / 2;
908 xtru[1] = sIBFPCAlAnodeWidth2 / 2;
910 xtru[2] = xtru[0] + sIBFPCAlAnodeWidth1;
915 TGeoXtru* aluminum =
new TGeoXtru(2);
916 aluminum->DefinePolygon(4, xtru, ytru);
917 aluminum->DefineSection(0, -sIBFlexCableAlThick / 2);
918 aluminum->DefineSection(1, sIBFlexCableAlThick / 2);
921 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
922 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
924 TGeoVolume* coverlayVol =
new TGeoVolume(
"FPCCoverlayAnode", coverlay, medKapton);
925 coverlayVol->SetLineColor(kBlue);
926 coverlayVol->SetFillColor(kBlue);
928 TGeoVolume* aluminumVol =
new TGeoVolume(
"FPCAluminumAnode", aluminum, medAluminum);
929 aluminumVol->SetLineColor(kCyan);
930 aluminumVol->SetFillColor(kCyan);
932 ypos = -coverlay->GetDY() + aluminum->GetZ(1);
933 if (mBuildLevel < 1) {
934 coverlayVol->AddNode(aluminumVol, 1,
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", 0, -90, 0)));
940TGeoVolume* V3Layer::createStaveStructInnerB(
const TGeoManager* mgr)
951 TGeoVolume* mechStavVol =
nullptr;
953 switch (mStaveModel) {
955 mechStavVol = createStaveModelInnerBDummy(mgr);
962 LOG(fatal) <<
"Stave model " << mStaveModel <<
" obsolete and no longer supported";
965 mechStavVol = createStaveModelInnerB4(mgr);
968 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
974TGeoVolume* V3Layer::createStaveModelInnerBDummy(
const TGeoManager*)
const
990TGeoVolume* V3Layer::createStaveModelInnerB4(
const TGeoManager* mgr)
1012 const Double_t xstave = sIBColdPlateWidth / 2;
1014 Double_t layerHeight = 0.;
1016 Double_t rPipeMin = sIBCoolPipeInnerD / 2;
1017 Double_t rPipeMax = rPipeMin + sIBCoolPipeThick;
1019 const Int_t nv = 16;
1020 Double_t xv[nv], yv[nv];
1021 Double_t xlen, ylen, zlen, ztot;
1022 Double_t xpos, ypos, zpos, ylay, yposPipe;
1023 Double_t beta, gamma, theta;
1026 ztot = sIBColdPlateZLen / 2;
1034 TGeoTube* pipe =
new TGeoTube(rPipeMin, rPipeMax, sIBCoolPipeZLen / 2);
1036 TGeoTube* water =
new TGeoTube(0., rPipeMin, sIBCoolPipeZLen / 2);
1038 TGeoTubeSeg* cpaptub =
new TGeoTubeSeg(rPipeMax, rPipeMax + sIBCarbonPaperThick, sIBCarbonPaperZLen / 2, 0, 180);
1040 TGeoBBox* cpapvert =
new TGeoBBox(sIBCarbonPaperThick / 2, pipe->GetRmax() / 2, sIBCarbonPaperZLen / 2);
1042 xlen = sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick;
1043 TGeoBBox* cpapmid =
new TGeoBBox(xlen, sIBCarbonPaperThick / 2, sIBCarbonPaperZLen / 2);
1045 xlen = sIBCarbonPaperWidth / 2 - sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick;
1046 TGeoBBox* cpaplr =
new TGeoBBox(xlen / 2, sIBCarbonPaperThick / 2, sIBCarbonPaperZLen / 2);
1048 TGeoTubeSeg* fleecpipe =
new TGeoTubeSeg(cpaptub->GetRmax(), cpaptub->GetRmax() + sIBCarbonFleeceThick, ztot, 0, 180);
1050 TGeoBBox* fleecvert =
new TGeoBBox(sIBCarbonFleeceThick / 2, (pipe->GetRmax() - sIBCarbonPaperThick) / 2, ztot);
1052 xlen = sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick - sIBCarbonFleeceThick;
1055 xlen = xstave - sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick - sIBCarbonFleeceThick;
1056 TGeoBBox* fleeclr =
new TGeoBBox(xlen / 2, sIBCarbonFleeceThick / 2, ztot);
1059 layerHeight = 2 * (glue->GetDY() + fleecbot->GetDY() + cfplate->GetDY() + cpaplr->GetDY() + fleeclr->GetDY());
1062 TGeoTrd1* topv =
new TGeoTrd1(sIBTopVertexWidth1 / 2, sIBTopVertexWidth2 / 2, ztot, sIBTopVertexHeight / 2);
1066 xv[1] = sIBSideVertexWidth;
1069 yv[2] = sIBSideVertexHeight;
1071 TGeoXtru* sidev =
new TGeoXtru(2);
1072 sidev->DefinePolygon(3, xv, yv);
1073 sidev->DefineSection(0, -ztot);
1074 sidev->DefineSection(1, ztot);
1076 xv[0] = sIBEndSupportXUp / 2;
1077 yv[0] = sIBStaveHeight - sIBEndSupportThick;
1078 xv[1] = xstave - sIBSideVertexWidth;
1079 yv[1] = layerHeight + sIBSideVertexHeight;
1081 yv[2] = layerHeight;
1084 xv[4] = xstave + sIBEndSupportThick;
1088 xv[6] = xv[1] + sIBEndSupportThick *
sinD(sIBEndSupportOpenPhi / 2);
1089 yv[6] = yv[1] + sIBEndSupportThick *
cosD(sIBEndSupportOpenPhi / 2);
1091 yv[7] = sIBStaveHeight;
1092 for (Int_t
i = 0;
i < nv / 2;
i++) {
1093 xv[8 +
i] = -xv[7 -
i];
1094 yv[8 +
i] = yv[7 -
i];
1097 TGeoXtru* endsupp =
new TGeoXtru(2);
1098 endsupp->DefinePolygon(16, xv, yv);
1099 endsupp->DefineSection(0, -sIBEndSupportZLen / 2);
1100 endsupp->DefineSection(1, sIBEndSupportZLen / 2);
1102 xlen = TMath::Sqrt((yv[7] - yv[6]) * (yv[7] - yv[6]) + (xv[7] - xv[6]) * (xv[7] - xv[6]) +
1103 sIBTopFilamentInterZ * sIBTopFilamentInterZ / 4);
1104 theta = TMath::ATan((yv[7] - yv[6]) / (xv[7] - xv[6])) * TMath::RadToDeg();
1105 TGeoBBox* topfil =
new TGeoBBox(xlen / 2, sIBTopFilamentSide / 2, sIBTopFilamentSide / 2);
1108 xv[0] = xstave + sIBTopFilamentSide;
1111 yv[1] = layerHeight + sIBSideVertexHeight + topfil->GetDZ();
1113 xv[2] = sIBEndSupportXUp / 2;
1114 yv[2] = sIBStaveHeight + sIBTopFilamentSide /
sinD(-theta) - 0.01;
1115 for (Int_t
i = 0;
i < 3;
i++) {
1116 xv[3 +
i] = -xv[2 -
i];
1117 yv[3 +
i] = yv[2 -
i];
1120 TGeoXtru* mechStruct =
new TGeoXtru(2);
1121 mechStruct->DefinePolygon(6, xv, yv);
1122 mechStruct->SetName(
"mechStruct");
1123 mechStruct->DefineSection(0, -ztot);
1124 mechStruct->DefineSection(1, ztot);
1127 zlen = sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut;
1128 TGeoBBox* connAside =
new TGeoBBox(
"connAsideIB", sIBConnectorXWidth / 2, sIBConnBodyYHeight / 2, zlen / 2);
1130 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1131 TGeoBBox* connCside =
new TGeoBBox(
"connCsideIB", sIBConnectorXWidth / 2, sIBConnBodyYHeight / 2, zlen / 2);
1134 yposPipe = 2 * glue->GetDY() + 2 * fleecbot->GetDY() + 2 * cfplate->GetDY() + pipe->GetRmax();
1135 ypos = connAside->GetDY() - sIBConnTubesYPos + yposPipe;
1136 zpos = ztot + connAside->GetDZ();
1137 TGeoTranslation* transAside =
new TGeoTranslation(
"transAsideIB", 0, ypos, zpos);
1138 transAside->RegisterYourself();
1140 ypos = connCside->GetDY() - sIBConnTubesYPos + yposPipe;
1141 zpos = ztot + connCside->GetDZ();
1142 TGeoTranslation* transCside =
new TGeoTranslation(
"transCsideIB", 0, ypos, -zpos);
1143 transCside->RegisterYourself();
1145 TGeoCompositeShape* mechStavSh =
1146 new TGeoCompositeShape(
"mechStruct+connAsideIB:transAsideIB+connCsideIB:transCsideIB");
1150 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1151 TGeoMedium* medWater = mgr->GetMedium(Form(
"%s_WATER$",
GetDetName()));
1152 TGeoMedium* medM55J6K = mgr->GetMedium(Form(
"%s_M55J6K$",
GetDetName()));
1153 TGeoMedium* medM60J3K = mgr->GetMedium(Form(
"%s_M60J3K$",
GetDetName()));
1154 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
1155 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE$",
GetDetName()));
1156 TGeoMedium* medK13D2U2k = mgr->GetMedium(Form(
"%s_K13D2U2k$",
GetDetName()));
1157 TGeoMedium* medFGS003 = mgr->GetMedium(Form(
"%s_FGS003$",
GetDetName()));
1158 TGeoMedium* medCarbonFleece = mgr->GetMedium(Form(
"%s_CarbonFleece$",
GetDetName()));
1160 const Int_t nameLen = 30;
1161 char volname[nameLen];
1163 TGeoVolume* mechStavVol =
new TGeoVolume(volname, mechStavSh, medAir);
1164 mechStavVol->SetLineColor(12);
1165 mechStavVol->SetFillColor(12);
1166 mechStavVol->SetVisibility(kFALSE);
1168 TGeoVolume* glueVol =
new TGeoVolume(
"Glue", glue, medGlue);
1169 glueVol->SetLineColor(kBlack);
1170 glueVol->SetFillColor(kBlack);
1172 TGeoVolume* fleecbotVol =
new TGeoVolume(
"CarbonFleeceBottom", fleecbot, medCarbonFleece);
1173 fleecbotVol->SetFillColor(kViolet);
1174 fleecbotVol->SetLineColor(kViolet);
1176 TGeoVolume* cfplateVol =
new TGeoVolume(
"CFPlate", cfplate, medK13D2U2k);
1177 cfplateVol->SetFillColor(5);
1178 cfplateVol->SetLineColor(5);
1180 TGeoVolume* pipeVol =
new TGeoVolume(
"PolyimidePipe", pipe, medKapton);
1181 pipeVol->SetFillColor(35);
1182 pipeVol->SetLineColor(35);
1184 TGeoVolume* waterVol =
new TGeoVolume(
"Water", water, medWater);
1185 waterVol->SetFillColor(4);
1186 waterVol->SetLineColor(4);
1188 TGeoVolume* cpaptubVol =
new TGeoVolume(
"ThermasolPipeCover", cpaptub, medFGS003);
1189 cpaptubVol->SetFillColor(2);
1190 cpaptubVol->SetLineColor(2);
1192 TGeoVolume* cpapvertVol =
new TGeoVolume(
"ThermasolVertical", cpapvert, medFGS003);
1193 cpapvertVol->SetFillColor(2);
1194 cpapvertVol->SetLineColor(2);
1196 TGeoVolume* cpapmidVol =
new TGeoVolume(
"ThermasolMiddle", cpapmid, medFGS003);
1197 cpapmidVol->SetFillColor(2);
1198 cpapmidVol->SetLineColor(2);
1200 TGeoVolume* cpaplrVol =
new TGeoVolume(
"ThermasolLeftRight", cpaplr, medFGS003);
1201 cpaplrVol->SetFillColor(2);
1202 cpaplrVol->SetLineColor(2);
1204 TGeoVolume* fleecpipeVol =
new TGeoVolume(
"CarbonFleecePipeCover", fleecpipe, medCarbonFleece);
1205 fleecpipeVol->SetFillColor(28);
1206 fleecpipeVol->SetLineColor(28);
1208 TGeoVolume* fleecvertVol =
new TGeoVolume(
"CarbonFleeceVertical", fleecvert, medCarbonFleece);
1209 fleecvertVol->SetFillColor(28);
1210 fleecvertVol->SetLineColor(28);
1212 TGeoVolume* fleecmidVol =
new TGeoVolume(
"CarbonFleeceMiddle", fleecmid, medCarbonFleece);
1213 fleecmidVol->SetFillColor(28);
1214 fleecmidVol->SetLineColor(28);
1216 TGeoVolume* fleeclrVol =
new TGeoVolume(
"CarbonFleeceLeftRight", fleeclr, medCarbonFleece);
1217 fleeclrVol->SetFillColor(28);
1218 fleeclrVol->SetLineColor(28);
1220 TGeoVolume* topvVol =
new TGeoVolume(
"TopVertex", topv, medM55J6K);
1221 topvVol->SetFillColor(12);
1222 topvVol->SetLineColor(12);
1224 TGeoVolume* sidevVol =
new TGeoVolume(
"SideVertex", sidev, medM55J6K);
1225 sidevVol->SetFillColor(12);
1226 sidevVol->SetLineColor(12);
1228 TGeoVolume* topfilVol =
new TGeoVolume(
"TopFilament", topfil, medM60J3K);
1229 topfilVol->SetFillColor(12);
1230 topfilVol->SetLineColor(12);
1232 TGeoVolume* endsuppVol =
new TGeoVolume(
"EndSupport", endsupp, medM55J6K);
1233 endsuppVol->SetFillColor(12);
1234 endsuppVol->SetLineColor(12);
1237 ypos = glue->GetDY();
1238 if (mBuildLevel < 2) {
1239 mechStavVol->AddNode(glueVol, 1,
new TGeoTranslation(0, ypos, 0));
1242 ypos += (glue->GetDY() + fleecbot->GetDY());
1243 if (mBuildLevel < 5) {
1244 mechStavVol->AddNode(fleecbotVol, 1,
new TGeoTranslation(0, ypos, 0));
1247 ypos += (fleecbot->GetDY() + cfplate->GetDY());
1248 if (mBuildLevel < 5) {
1249 mechStavVol->AddNode(cfplateVol, 1,
new TGeoTranslation(0, ypos, 0));
1252 ylay = ypos + cfplate->GetDY();
1254 xpos = sIBCoolPipeXDist / 2;
1255 ypos = ylay + pipe->GetRmax();
1257 if (mBuildLevel < 4) {
1258 mechStavVol->AddNode(pipeVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1259 mechStavVol->AddNode(pipeVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1262 if (mBuildLevel < 3) {
1263 mechStavVol->AddNode(waterVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1264 mechStavVol->AddNode(waterVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1267 if (mBuildLevel < 5) {
1268 mechStavVol->AddNode(cpaptubVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1269 mechStavVol->AddNode(cpaptubVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1271 mechStavVol->AddNode(fleecpipeVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1272 mechStavVol->AddNode(fleecpipeVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1274 xpos = sIBCoolPipeXDist / 2 - pipe->GetRmax() - cpapvert->GetDX();
1275 ypos = ylay + cpapvert->GetDY();
1276 mechStavVol->AddNode(cpapvertVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1277 mechStavVol->AddNode(cpapvertVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1279 xpos = sIBCoolPipeXDist / 2 + pipe->GetRmax() + cpapvert->GetDX();
1280 mechStavVol->AddNode(cpapvertVol, 3,
new TGeoTranslation(-xpos, ypos, 0));
1281 mechStavVol->AddNode(cpapvertVol, 4,
new TGeoTranslation(xpos, ypos, 0));
1283 ypos = ylay + sIBCarbonPaperThick / 2;
1284 mechStavVol->AddNode(cpapmidVol, 1,
new TGeoTranslation(0, ypos, 0));
1286 xpos = xstave - cpaplr->GetDX();
1287 mechStavVol->AddNode(cpaplrVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1288 mechStavVol->AddNode(cpaplrVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1290 xpos = sIBCoolPipeXDist / 2 - pipe->GetRmax() - 2 * cpapvert->GetDX() - fleecvert->GetDX();
1291 ypos = ylay + sIBCarbonPaperThick + fleecvert->GetDY();
1292 mechStavVol->AddNode(fleecvertVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1293 mechStavVol->AddNode(fleecvertVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1295 xpos = sIBCoolPipeXDist / 2 + pipe->GetRmax() + 2 * cpapvert->GetDX() + fleecvert->GetDX();
1296 mechStavVol->AddNode(fleecvertVol, 3,
new TGeoTranslation(-xpos, ypos, 0));
1297 mechStavVol->AddNode(fleecvertVol, 4,
new TGeoTranslation(xpos, ypos, 0));
1299 ypos = ylay + sIBCarbonPaperThick + sIBCarbonFleeceThick / 2;
1300 mechStavVol->AddNode(fleecmidVol, 1,
new TGeoTranslation(0, ypos, 0));
1302 xpos = xstave - fleeclr->GetDX();
1303 mechStavVol->AddNode(fleeclrVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1304 mechStavVol->AddNode(fleeclrVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1307 ylay += (sIBCarbonPaperThick + sIBCarbonFleeceThick);
1309 if (mBuildLevel < 5) {
1310 ypos = sIBStaveHeight - sIBEndSupportThick - topv->GetDz();
1311 mechStavVol->AddNode(topvVol, 1,
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", 0, -90, 0)));
1313 xpos = xstave - sidev->GetX(1);
1315 mechStavVol->AddNode(sidevVol, 1,
new TGeoTranslation(xpos, ypos, 0));
1316 mechStavVol->AddNode(sidevVol, 2,
new TGeoCombiTrans(-xpos, ypos, 0,
new TGeoRotation(
"", 90, 180, -90)));
1318 zpos = ztot - endsupp->GetZ(1);
1319 mechStavVol->AddNode(endsuppVol, 1,
new TGeoTranslation(0, 0, zpos));
1320 mechStavVol->AddNode(endsuppVol, 2,
new TGeoTranslation(0, 0, -zpos));
1322 gamma = 180. - sIBTopFilamentAlpha;
1323 xpos = xstave / 2 + topfil->GetDZ();
1324 ypos = (endsupp->GetY(7) + endsupp->GetY(6)) / 2;
1325 Int_t nFilamentGroups = (Int_t)(2 * (ztot - sIBEndSupportZLen) / sIBTopFilamentInterZ);
1327 for (
int i = 0;
i < nFilamentGroups;
i++) {
1329 zpos = -(ztot - sIBEndSupportZLen) +
i * sIBTopFilamentInterZ + sIBTopFilamentInterZ / 4;
1330 mechStavVol->AddNode(topfilVol,
i * 4 + 1,
1331 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 + theta, gamma / 2, -90)));
1333 mechStavVol->AddNode(topfilVol,
i * 4 + 2,
1334 new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 - theta, -gamma / 2, -90)));
1336 zpos += sIBTopFilamentInterZ / 2;
1337 mechStavVol->AddNode(topfilVol,
i * 4 + 3,
1338 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 + theta, -gamma / 2, -90)));
1340 mechStavVol->AddNode(topfilVol,
i * 4 + 4,
1341 new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 - theta, gamma / 2, -90)));
1346 TGeoVolume *connectorASide, *connectorCSide;
1350 connectorASide = mgr->GetVolume(
"IBConnectorASide");
1352 if (!connectorASide) {
1353 createIBConnectors(mgr);
1354 connectorASide = mgr->GetVolume(
"IBConnectorASide");
1356 connectorCSide = mgr->GetVolume(
"IBConnectorCSide");
1358 ypos = (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDY() - sIBConnTubesYPos +
1360 zpos = ztot + (sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut) / 2;
1361 mechStavVol->AddNode(connectorASide, 1,
new TGeoTranslation(0, ypos, zpos));
1363 zpos = ztot + (sIBConnectBlockZLen - sIBConnTailZLen) / 2;
1364 mechStavVol->AddNode(connectorCSide, 1,
new TGeoCombiTrans(0, ypos, -zpos,
new TGeoRotation(
"", 90, 180, -90)));
1370void V3Layer::createIBConnectors(
const TGeoManager* mgr)
1379 createIBConnectorsASide(mgr);
1380 createIBConnectorsCSide(mgr);
1383void V3Layer::createIBConnectorsASide(
const TGeoManager* mgr)
1396 Double_t xv[nv], yv[nv];
1397 Double_t xlen, ylen, zlen;
1398 Double_t xpos, ypos, zpos;
1401 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1402 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
1403 TGeoMedium* medInox304 = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
1410 xlen = sIBConnectorXWidth;
1411 ylen = sIBConnBodyYHeight;
1412 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1413 TGeoBBox* connBody =
new TGeoBBox(
"connBodyA", xlen / 2, ylen / 2, zlen / 2);
1415 TGeoTube* connRoundHole =
new TGeoTube(
"connRoundHoleA", 0., sIBConnRoundHoleD / 2, sIBConnBodyYHeight / 1.5);
1417 zpos = -connBody->GetDZ() + sIBConnRoundHoleZ;
1418 TGeoCombiTrans* connRoundHoleTrans =
1419 new TGeoCombiTrans(
"roundHoleTransA", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1420 connRoundHoleTrans->RegisterYourself();
1422 xlen = sIBConnSquareHoleX / 2;
1423 ylen = sIBConnBodyYHeight / 1.5;
1424 zlen = sIBConnSquareHoleZ / 2;
1425 TGeoBBox* connSquareHole =
new TGeoBBox(
"connSquareHoleA", xlen, ylen, zlen);
1427 zpos = -connBody->GetDZ() + sIBConnSquareHoleZPos;
1428 TGeoTranslation* connSquareHoleTrans =
new TGeoTranslation(
"squareHoleTransA", 0, 0, zpos);
1429 connSquareHoleTrans->RegisterYourself();
1431 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2HoleA", 0, sIBConnTubeHole2D / 2, connBody->GetDZ());
1433 xpos = sIBConnTubesXDist / 2;
1434 ypos = -connBody->GetDY() + sIBConnTubesYPos;
1436 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"tubes2Trans1A", -xpos, ypos, 0);
1437 connTubes2Trans1->RegisterYourself();
1439 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"tubes2Trans2A", xpos, ypos, 0);
1440 connTubes2Trans2->RegisterYourself();
1442 zlen = sIBConnTubeHole1ZLen - sIBConnTailZLen;
1443 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3HoleA", 0, sIBConnTubeHole1D / 2, zlen);
1445 zpos = connBody->GetDZ();
1446 TGeoTranslation* connTubes3Trans1 =
new TGeoTranslation(
"tubes3Trans1A", -xpos, ypos, -zpos);
1447 connTubes3Trans1->RegisterYourself();
1448 TGeoTranslation* connTubes3Trans2 =
new TGeoTranslation(
"tubes3Trans2A", xpos, ypos, -zpos);
1449 connTubes3Trans2->RegisterYourself();
1451 zlen = sIBConnTubeHole1ZLen2;
1452 TGeoTube* connFitHole =
new TGeoTube(
"fitHoleA", 0, sIBConnectAFitExtD / 2, zlen);
1454 TGeoTranslation* connFitHoleTrans1 =
new TGeoTranslation(
"fitTrans1A", -xpos, ypos, zpos);
1455 connFitHoleTrans1->RegisterYourself();
1456 TGeoTranslation* connFitHoleTrans2 =
new TGeoTranslation(
"fitTrans2A", xpos, ypos, zpos);
1457 connFitHoleTrans2->RegisterYourself();
1459 zlen = sIBConnSideHole1XWid / 1.5;
1460 TGeoTube* sideHole1 =
new TGeoTube(
"sideHole1A", 0, sIBConnSideHole1D / 2, zlen);
1462 xpos = connBody->GetDX() - sIBConnSideHole1XWid + sideHole1->GetDz();
1463 ypos = connBody->GetDY() - sIBConnSideHole1YPos;
1464 zpos = -connBody->GetDZ() + (sIBConnSideHole1ZPos - sIBConnTailZLen);
1465 TGeoCombiTrans* connSideHole1Trans =
1466 new TGeoCombiTrans(
"sideHole1TransA", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1467 connSideHole1Trans->RegisterYourself();
1470 new TGeoBBox(
"sideHole2AB", sIBConnSideHole2XWid, sIBConnSideHole2YWid / 2, sIBConnSideHole2ZWid / 2);
1472 xpos = -connBody->GetDX();
1473 ypos = connBody->GetDY() - sIBConnSideHole2YPos;
1474 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + sideHole2Box->GetDZ();
1475 TGeoTranslation* sideHole2BTrans =
new TGeoTranslation(
"sideHole2TransBA", xpos, ypos, zpos);
1476 sideHole2BTrans->RegisterYourself();
1478 TGeoTubeSeg* sideHole2TubeSeg =
1479 new TGeoTubeSeg(
"sideHole2ATS", 0, sIBConnSideHole2YWid / 2, sIBConnSideHole2XWid, 0, 180);
1481 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen);
1482 TGeoCombiTrans* sideHole2TSTrans1 =
1483 new TGeoCombiTrans(
"sideHole2TSTrans1A", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 0));
1484 sideHole2TSTrans1->RegisterYourself();
1486 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + 2 * sideHole2Box->GetDZ();
1487 TGeoCombiTrans* sideHole2TSTrans2 =
1488 new TGeoCombiTrans(
"sideHole2TSTrans2A", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1489 sideHole2TSTrans2->RegisterYourself();
1491 TGeoCompositeShape* connBodySh =
new TGeoCompositeShape(
1492 "connBodyA-connRoundHoleA:roundHoleTransA-connSquareHoleA:squareHoleTransA-tube2HoleA:tubes2Trans1A-tube2HoleA:"
1493 "tubes2Trans2A-fitHoleA:fitTrans1A-fitHoleA:fitTrans2A-tube3HoleA:tubes3Trans1A-tube3HoleA:tubes3Trans2A-"
1494 "sideHole1A:sideHole1TransA-sideHole2AB:sideHole2TransBA-sideHole2ATS:sideHole2TSTrans1A-sideHole2ATS:"
1495 "sideHole2TSTrans2A");
1497 TGeoVolume* connBlockBody =
new TGeoVolume(
"IBConnectorBlockBodyASide", connBodySh, medPEEK);
1498 connBlockBody->SetFillColor(42);
1499 connBlockBody->SetLineColor(42);
1502 xv[0] = sIBConnectorXWidth / 2;
1503 yv[0] = sIBConnTailYShift;
1505 yv[1] = sIBConnTailYMid;
1506 xv[2] = xv[1] - (sIBConnectorYTot - sIBConnTailYMid) /
tanD(90 - sIBConnTailOpenPhi / 2);
1507 yv[2] = sIBConnectorYTot;
1509 for (Int_t
i = 0;
i < 3;
i++) {
1510 xv[3 +
i] = -xv[2 -
i];
1511 yv[3 +
i] = yv[2 -
i];
1514 TGeoXtru* connTail =
new TGeoXtru(2);
1515 connTail->SetName(
"connTailA");
1516 connTail->DefinePolygon(6, xv, yv);
1517 connTail->DefineSection(0, 0);
1518 connTail->DefineSection(1, sIBConnTailZLen);
1520 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1HoleA", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 1.5);
1522 xpos = sIBConnTubesXDist / 2;
1523 ypos = sIBConnTubesYPos;
1524 zpos = connTail->GetZ(1) / 2;
1525 TGeoTranslation* connTubes1Trans1 =
new TGeoTranslation(
"tubes1Trans1A", -xpos, ypos, zpos);
1526 connTubes1Trans1->RegisterYourself();
1527 TGeoTranslation* connTubes1Trans2 =
new TGeoTranslation(
"tubes1Trans2A", xpos, ypos, zpos);
1528 connTubes1Trans2->RegisterYourself();
1530 TGeoCompositeShape* connTailSh =
1531 new TGeoCompositeShape(
"connTailA-tube1HoleA:tubes1Trans1A-tube1HoleA:tubes1Trans2A");
1533 TGeoVolume* connBlockTail =
new TGeoVolume(
"IBConnectorBlockTailASide", connTailSh, medPEEK);
1534 connBlockTail->SetFillColor(42);
1535 connBlockTail->SetLineColor(42);
1538 TGeoTube* connFitSh =
new TGeoTube(sIBConnectAFitIntD / 2, sIBConnectAFitExtD / 2, sIBConnectAFitZLen / 2);
1540 TGeoVolume* connFit =
new TGeoVolume(
"IBConnectorFitting", connFitSh, medInox304);
1541 connFit->SetFillColor(kGray);
1542 connFit->SetLineColor(kGray);
1546 xlen = sIBConnectorXWidth;
1547 ylen = sIBConnBodyYHeight;
1548 zlen = sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut;
1550 TGeoBBox* connBox =
new TGeoBBox(
"connBoxA", xlen / 2, ylen / 2, zlen / 2);
1552 ypos = -sIBConnectorYTot / 2 + connBox->GetDY();
1553 TGeoTranslation* transBodyA =
new TGeoTranslation(
"transBodyA", 0, ypos, 0);
1554 transBodyA->RegisterYourself();
1556 ypos = -sIBConnectorYTot / 2;
1557 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1558 TGeoTranslation* transTailA =
new TGeoTranslation(
"transTailA", 0, ypos, zpos);
1559 transTailA->RegisterYourself();
1561 TGeoTube* connTubeHollow =
new TGeoTube(
"tubeHollowA", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 2);
1563 xpos = sIBConnTubesXDist / 2;
1564 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1565 zpos = -connBox->GetDZ() - connTail->GetZ(1) + sIBConnTubeHole1ZLen / 2;
1566 TGeoTranslation* connTubeHollTrans1 =
new TGeoTranslation(
"tubeHollTrans1A", -xpos, ypos, zpos);
1567 connTubeHollTrans1->RegisterYourself();
1568 TGeoTranslation* connTubeHollTrans2 =
new TGeoTranslation(
"tubeHollTrans2A", xpos, ypos, zpos);
1569 connTubeHollTrans2->RegisterYourself();
1571 zpos = -connBox->GetDZ() + connTubeHole2->GetDz() - 2 * connFitHole->GetDz();
1572 TGeoTranslation* connTubes2Trans1Body =
new TGeoTranslation(
"tubes2Trans1BA", -xpos, ypos, zpos);
1573 connTubes2Trans1Body->RegisterYourself();
1574 TGeoTranslation* connTubes2Trans2Body =
new TGeoTranslation(
"tubes2Trans2BA", xpos, ypos, zpos);
1575 connTubes2Trans2Body->RegisterYourself();
1577 TGeoCompositeShape* connBoxSh =
new TGeoCompositeShape(
1578 "connBoxA:transBodyA-tube2HoleA:tubes2Trans1BA-tube2HoleA:tubes2Trans2BA+connTailA:transTailA-tubeHollowA:tubeHollTrans1A-"
1579 "tubeHollowA:tubeHollTrans2A");
1581 TGeoVolume* connBoxASide =
new TGeoVolume(
"IBConnectorASide", connBoxSh, medAir);
1585 ypos = -sIBConnectorYTot / 2;
1586 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1587 connBoxASide->AddNode(connBlockTail, 1,
new TGeoTranslation(0, ypos, zpos));
1589 ypos = -sIBConnectorYTot / 2 + connBody->GetDY();
1590 zpos = -connBox->GetDZ() + connBody->GetDZ();
1591 connBoxASide->AddNode(connBlockBody, 1,
new TGeoTranslation(0, ypos, zpos));
1593 xpos = sIBConnTubesXDist / 2;
1594 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1595 zpos = connBox->GetDZ() - connFitSh->GetDz();
1596 connBoxASide->AddNode(connFit, 1,
new TGeoTranslation(xpos, ypos, zpos));
1597 connBoxASide->AddNode(connFit, 2,
new TGeoTranslation(-xpos, ypos, zpos));
1600void V3Layer::createIBConnectorsCSide(
const TGeoManager* mgr)
1613 Double_t xv[nv], yv[nv];
1614 Double_t xlen, ylen, zlen;
1615 Double_t xpos, ypos, zpos;
1618 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1619 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
1626 xlen = sIBConnectorXWidth;
1627 ylen = sIBConnBodyYHeight;
1628 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1629 TGeoBBox* connBody =
new TGeoBBox(
"connBodyC", xlen / 2, ylen / 2, zlen / 2);
1631 TGeoTube* connRoundHole =
new TGeoTube(
"connRoundHoleC", 0., sIBConnRoundHoleD / 2, sIBConnBodyYHeight / 1.5);
1633 zpos = -connBody->GetDZ() + sIBConnRoundHoleZ;
1634 TGeoCombiTrans* connRoundHoleTrans =
1635 new TGeoCombiTrans(
"roundHoleTransC", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1636 connRoundHoleTrans->RegisterYourself();
1638 TGeoTube* connInsertHole =
new TGeoTube(
"connInsertHoleC", 0, sIBConnInsertHoleD / 2, sIBConnBodyYHeight / 1.5);
1640 zpos = -connBody->GetDZ() + sIBConnInsertHoleZPos;
1641 TGeoCombiTrans* connInsertHoleTrans =
1642 new TGeoCombiTrans(
"insertHoleTransC", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1643 connInsertHoleTrans->RegisterYourself();
1645 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2HoleC", 0, sIBConnTubeHole2D / 2, connBody->GetDZ());
1647 xpos = sIBConnTubesXDist / 2;
1648 ypos = -connBody->GetDY() + sIBConnTubesYPos;
1649 zpos = sIBConnectBlockZLen - sIBConnTubeHole3ZPos;
1650 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"tubes2Trans1C", -xpos, ypos, -zpos);
1651 connTubes2Trans1->RegisterYourself();
1652 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"tubes2Trans2C", xpos, ypos, -zpos);
1653 connTubes2Trans2->RegisterYourself();
1655 zlen = sIBConnectorXWidth;
1656 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3HoleC", 0, sIBConnTubeHole2D / 2, zlen / 2);
1658 xpos = sIBConnTubeHole3XPos;
1659 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1660 TGeoCombiTrans* connTubes3Trans =
1661 new TGeoCombiTrans(
"tubes3TransC", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90));
1662 connTubes3Trans->RegisterYourself();
1664 zlen = sIBConnTubeHole1ZLen - sIBConnTailZLen;
1665 TGeoTube* connTubeHole4 =
new TGeoTube(
"tube4HoleC", 0, sIBConnTubeHole1D / 2, zlen);
1667 xpos = sIBConnTubesXDist / 2;
1668 zpos = connBody->GetDZ();
1669 TGeoTranslation* connTubes4Trans1 =
new TGeoTranslation(
"tubes4Trans1C", -xpos, ypos, -zpos);
1670 connTubes4Trans1->RegisterYourself();
1671 TGeoTranslation* connTubes4Trans2 =
new TGeoTranslation(
"tubes4Trans2C", xpos, ypos, -zpos);
1672 connTubes4Trans2->RegisterYourself();
1674 zlen = sIBConnSideHole1XWid / 1.5;
1675 TGeoTube* sideHole1 =
new TGeoTube(
"sideHole1C", 0, sIBConnSideHole1D / 2, zlen);
1677 xpos = -connBody->GetDX() + sIBConnSideHole1XWid - sideHole1->GetDz();
1678 ypos = connBody->GetDY() - sIBConnSideHole1YPos;
1679 zpos = -connBody->GetDZ() + (sIBConnSideHole1ZPos - sIBConnTailZLen);
1680 TGeoCombiTrans* connSideHole1Trans =
1681 new TGeoCombiTrans(
"sideHole1TransC", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1682 connSideHole1Trans->RegisterYourself();
1685 new TGeoBBox(
"sideHole2CB", sIBConnSideHole2XWid, sIBConnSideHole2YWid / 2, sIBConnSideHole2ZWid / 2);
1687 xpos = connBody->GetDX();
1688 ypos = connBody->GetDY() - sIBConnSideHole2YPos;
1689 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + sideHole2Box->GetDZ();
1690 TGeoTranslation* sideHole2BTrans =
new TGeoTranslation(
"sideHole2TransBC", xpos, ypos, zpos);
1691 sideHole2BTrans->RegisterYourself();
1693 TGeoTubeSeg* sideHole2TubeSeg =
1694 new TGeoTubeSeg(
"sideHole2CTS", 0, sIBConnSideHole2YWid / 2, sIBConnSideHole2XWid, 180, 360);
1696 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen);
1697 TGeoCombiTrans* sideHole2TSTrans1 =
1698 new TGeoCombiTrans(
"sideHole2TSTrans1C", xpos, ypos, zpos,
new TGeoRotation(
"", -90, 90, 0));
1699 sideHole2TSTrans1->RegisterYourself();
1701 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + 2 * sideHole2Box->GetDZ();
1702 TGeoCombiTrans* sideHole2TSTrans2 =
1703 new TGeoCombiTrans(
"sideHole2TSTrans2C", xpos, ypos, zpos,
new TGeoRotation(
"", -90, -90, 0));
1704 sideHole2TSTrans2->RegisterYourself();
1706 TGeoCompositeShape* connBodySh =
new TGeoCompositeShape(
1707 "connBodyC-tube2HoleC:tubes2Trans1C-tube2HoleC:tubes2Trans2C-tube3HoleC:tubes3TransC-tube4HoleC:tubes4Trans1C-"
1708 "tube4HoleC:tubes4Trans2C-sideHole1C:sideHole1TransC-sideHole2CTS:sideHole2TSTrans1C-sideHole2CTS:"
1709 "sideHole2TSTrans2C-sideHole2CB:sideHole2TransBC-connRoundHoleC:roundHoleTransC-connInsertHoleC:insertHoleTransC");
1711 TGeoVolume* connBlockBody =
new TGeoVolume(
"IBConnectorBlockBodyCSide", connBodySh, medPEEK);
1712 connBlockBody->SetFillColor(42);
1713 connBlockBody->SetLineColor(42);
1716 xv[0] = sIBConnectorXWidth / 2;
1717 yv[0] = sIBConnTailYShift;
1719 yv[1] = sIBConnTailYMid;
1720 xv[2] = xv[1] - (sIBConnectorYTot - sIBConnTailYMid) /
tanD(90 - sIBConnTailOpenPhi / 2);
1721 yv[2] = sIBConnectorYTot;
1723 for (Int_t
i = 0;
i < 3;
i++) {
1724 xv[3 +
i] = -xv[2 -
i];
1725 yv[3 +
i] = yv[2 -
i];
1728 TGeoXtru* connTail =
new TGeoXtru(2);
1729 connTail->SetName(
"connTailC");
1730 connTail->DefinePolygon(6, xv, yv);
1731 connTail->DefineSection(0, 0);
1732 connTail->DefineSection(1, sIBConnTailZLen);
1734 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1HoleC", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 1.5);
1736 xpos = sIBConnTubesXDist / 2;
1737 ypos = sIBConnTubesYPos;
1738 zpos = connTail->GetZ(1) / 2;
1739 TGeoTranslation* connTubes1Trans1 =
new TGeoTranslation(
"tubes1Trans1C", -xpos, ypos, zpos);
1740 connTubes1Trans1->RegisterYourself();
1741 TGeoTranslation* connTubes1Trans2 =
new TGeoTranslation(
"tubes1Trans2C", xpos, ypos, zpos);
1742 connTubes1Trans2->RegisterYourself();
1744 TGeoCompositeShape* connTailSh =
1745 new TGeoCompositeShape(
"connTailC-tube1HoleC:tubes1Trans1C-tube1HoleC:tubes1Trans2C");
1747 TGeoVolume* connBlockTail =
new TGeoVolume(
"IBConnectorBlockTailCSide", connTailSh, medPEEK);
1748 connBlockTail->SetFillColor(42);
1749 connBlockTail->SetLineColor(42);
1752 zlen = sIBConnPlugTotLen - sIBConnPlugInnerLen;
1753 TGeoPcon* connPlugSh =
new TGeoPcon(0, 360, 4);
1754 connPlugSh->DefineSection(0, 0., 0., sIBConnTubeHole2D / 2);
1755 connPlugSh->DefineSection(1, zlen, 0., sIBConnTubeHole2D / 2);
1756 connPlugSh->DefineSection(2, zlen, sIBConnPlugInnerD / 2, sIBConnTubeHole2D / 2);
1757 connPlugSh->DefineSection(3, sIBConnPlugTotLen, sIBConnPlugInnerD / 2, sIBConnTubeHole2D / 2);
1759 TGeoVolume* connPlug =
new TGeoVolume(
"IBConnectorPlugC", connPlugSh, medPEEK);
1760 connPlug->SetFillColor(44);
1761 connPlug->SetLineColor(44);
1765 xlen = sIBConnectorXWidth;
1766 ylen = sIBConnBodyYHeight;
1767 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1769 TGeoBBox* connBox =
new TGeoBBox(
"connBoxC", xlen / 2, ylen / 2, zlen / 2);
1771 ypos = -sIBConnectorYTot / 2 + connBox->GetDY();
1772 TGeoTranslation* transBodyC =
new TGeoTranslation(
"transBodyC", 0, ypos, 0);
1773 transBodyC->RegisterYourself();
1775 ypos = -sIBConnectorYTot / 2;
1776 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1777 TGeoTranslation* transTailC =
new TGeoTranslation(
"transTailC", 0, ypos, zpos);
1778 transTailC->RegisterYourself();
1780 TGeoTube* connTubeHollow =
new TGeoTube(
"tubeHollowC", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 2);
1782 xpos = sIBConnTubesXDist / 2;
1783 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1784 zpos = -connBox->GetDZ() - connTail->GetZ(1) + sIBConnTubeHole1ZLen / 2;
1785 TGeoTranslation* connTubeHollTrans1 =
new TGeoTranslation(
"tubeHollTrans1C", -xpos, ypos, zpos);
1786 connTubeHollTrans1->RegisterYourself();
1787 TGeoTranslation* connTubeHollTrans2 =
new TGeoTranslation(
"tubeHollTrans2C", xpos, ypos, zpos);
1788 connTubeHollTrans2->RegisterYourself();
1790 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1791 TGeoTranslation* connTubes2Trans1Body =
new TGeoTranslation(
"tubes2Trans1BC", -xpos, ypos, -zpos);
1792 connTubes2Trans1Body->RegisterYourself();
1793 TGeoTranslation* connTubes2Trans2Body =
new TGeoTranslation(
"tubes2Trans2BC", xpos, ypos, -zpos);
1794 connTubes2Trans2Body->RegisterYourself();
1796 TGeoCompositeShape* connBoxSh =
new TGeoCompositeShape(
1797 "connBoxC:transBodyC-tube2HoleC:tubes2Trans1BC-tube2HoleC:tubes2Trans2BC+connTailC:transTailC-tubeHollowC:tubeHollTrans1C-"
1798 "tubeHollowC:tubeHollTrans2C");
1800 TGeoVolume* connBoxCSide =
new TGeoVolume(
"IBConnectorCSide", connBoxSh, medAir);
1804 ypos = -connBoxSh->GetDY();
1805 zpos = -connBodySh->GetDZ() - connTail->GetZ(1);
1806 connBoxCSide->AddNode(connBlockTail, 1,
new TGeoTranslation(0, ypos, zpos));
1808 ypos = -connBoxSh->GetDY() + connBody->GetDY();
1809 connBoxCSide->AddNode(connBlockBody, 1,
new TGeoTranslation(0, ypos, 0));
1811 xpos = connBox->GetDX();
1812 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1813 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1814 connBoxCSide->AddNode(connPlug, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90)));
1817TGeoVolume* V3Layer::createStaveOuterB(
const TGeoManager* mgr)
1832 TGeoVolume* mechStavVol =
nullptr;
1834 switch (mStaveModel) {
1836 mechStavVol = createStaveModelOuterBDummy(mgr);
1840 LOG(fatal) <<
"Stave model " << mStaveModel <<
" obsolete and no longer supported";
1843 mechStavVol = createStaveModelOuterB2(mgr);
1846 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
1852TGeoVolume* V3Layer::createStaveModelOuterBDummy(
const TGeoManager*)
const
1871TGeoVolume* V3Layer::createStaveModelOuterB2(
const TGeoManager* mgr)
1895 Double_t yFlex1 = sOBFlexCableAlThick;
1896 Double_t yFlex2 = sOBFlexCableKapThick;
1897 Double_t flexOverlap = 5;
1898 Double_t yCFleece = sOBCarbonFleeceThick;
1899 Double_t yGraph = sOBGraphiteFoilThick;
1900 Double_t xHalfSt, yHalfSt;
1902 Double_t xmod, ymod, zmod, ypowbus, zbias;
1903 Double_t xtru[12], ytru[12];
1904 Double_t xpos, ypos, ypos1, zpos ;
1905 Double_t xlen, ylen, zlen;
1906 const Int_t nameLen = 30;
1907 char volname[nameLen];
1909 Double_t rCoolMin, rCoolMax;
1910 rCoolMin = sOBCoolTubeInnerD / 2;
1912 rCoolMax = rCoolMin + sOBCoolTubeThick;
1916 TGeoVolume* moduleVol = createModuleOuterB();
1917 moduleVol->SetVisibility(kTRUE);
1918 xmod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDX();
1919 ymod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDY();
1920 zmod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDZ();
1922 if (mLayerNumber <= 4) {
1923 zlen = sOBColdPlateZLenML / 2;
1925 zlen = sOBColdPlateZLenOL / 2;
1928 xlen = sOBColdPlateXWidth / 2;
1930 TGeoBBox* coldPlate =
new TGeoBBox(
"ColdPlate", xlen, sOBColdPlateThick / 2, zlen);
1932 TGeoBBox* fleeccent =
new TGeoBBox(
"FleeceCent", xlen, yCFleece / 2, zlen);
1934 TGeoTube* coolTube =
new TGeoTube(
"CoolingTube", rCoolMin, rCoolMax, zlen);
1935 TGeoTube* coolWater =
new TGeoTube(
"CoolingWater", 0., rCoolMin, zlen);
1937 xlen = sOBColdPlateXWidth / 2 - sOBCoolTubeXDist / 2 - coolTube->GetRmax();
1938 TGeoBBox* graphlat =
new TGeoBBox(
"GraphLateral", xlen / 2, yGraph / 2, zlen);
1940 xlen = sOBCoolTubeXDist / 2 - coolTube->GetRmax();
1943 ylen = coolTube->GetRmax() - yGraph;
1944 TGeoBBox* graphvert =
new TGeoBBox(
"GraphVertical", yGraph / 2, ylen / 2, zlen);
1946 TGeoTubeSeg* graphtub =
new TGeoTubeSeg(
"GraphTube", rCoolMax, rCoolMax + yGraph, zlen, 180., 360.);
1948 xlen = sOBColdPlateXWidth / 2 - sOBCoolTubeXDist / 2 - coolTube->GetRmax() - yGraph;
1949 TGeoBBox* fleeclat =
new TGeoBBox(
"FleecLateral", xlen / 2, yCFleece / 2, zlen);
1951 xlen = sOBCoolTubeXDist / 2 - coolTube->GetRmax() - yGraph;
1952 TGeoBBox* fleecmid =
new TGeoBBox(
"FleecMiddle", xlen, yCFleece / 2, zlen);
1954 ylen = coolTube->GetRmax() - yGraph - yCFleece;
1955 TGeoBBox* fleecvert =
new TGeoBBox(
"FleecVertical", yCFleece / 2, ylen / 2, zlen);
1957 TGeoTubeSeg* fleectub =
1958 new TGeoTubeSeg(
"FleecTube", rCoolMax + yGraph, rCoolMax + yCFleece + yGraph, zlen, 180., 360.);
1964 TGeoVolume* powerBusVol = createOBPowerBiasBuses(zlen);
1965 powerBusVol->SetVisibility(kTRUE);
1966 ypowbus = (
static_cast<TGeoBBox*
>(powerBusVol->GetShape()))->GetDY();
1970 yHalfSt = ypowbus + ymod + coldPlate->GetDY() + 2 * fleeccent->GetDY() + graphlat->GetDY() + fleeclat->GetDY();
1975 ytru[1] = -2 * yHalfSt;
1976 xtru[2] = sOBCoolTubeXDist / 2 + fleectub->GetRmax();
1979 ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax());
1980 xtru[4] = sOBCoolTubeXDist / 2 - fleectub->GetRmax();
1984 for (Int_t
i = 0;
i < 6;
i++) {
1985 xtru[6 +
i] = -xtru[5 -
i];
1986 ytru[6 +
i] = ytru[5 -
i];
1988 TGeoXtru* halfStaveCent =
new TGeoXtru(2);
1989 halfStaveCent->DefinePolygon(12, xtru, ytru);
1990 halfStaveCent->DefineSection(0, -zlen);
1991 halfStaveCent->DefineSection(1, zlen);
1992 snprintf(volname, nameLen,
"staveCentral%d", mLayerNumber);
1993 halfStaveCent->SetName(volname);
1996 TGeoBBox* connAside =
new TGeoBBox(
"connAsideOB", sOBCPConnectorXWidth / 2, sOBCPConnBlockYHei / 2,
1997 (sOBCPConnBlockZLen + sOBCPConnAFitZLen - sOBCPConnAFitZIn) / 2);
2000 new TGeoBBox(
"connCsideOB", sOBCPConnectorXWidth / 2, sOBCPConnBlockYHei / 2, sOBCPConnBlockZLen / 2);
2003 ypos = 2 * yHalfSt + connAside->GetDY() - sOBCPConnHollowYHei;
2004 zpos = zlen + connAside->GetDZ() - sOBCPConnHollowZLen;
2005 snprintf(volname, nameLen,
"transAsideOB%d", mLayerNumber);
2006 TGeoTranslation* transAside =
new TGeoTranslation(volname, 0, -ypos, zpos);
2007 transAside->RegisterYourself();
2009 zpos = zlen + connCside->GetDZ() - sOBCPConnHollowZLen;
2010 snprintf(volname, nameLen,
"transCsideOB%d", mLayerNumber);
2011 TGeoTranslation* transCside =
new TGeoTranslation(volname, 0, -ypos, -zpos);
2012 transCside->RegisterYourself();
2015 snprintf(componame, 70,
"staveCentral%d+connAsideOB:transAsideOB%d+connCsideOB:transCsideOB%d", mLayerNumber,
2016 mLayerNumber, mLayerNumber);
2018 TGeoCompositeShape* halfStave =
new TGeoCompositeShape(componame);
2022 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
2023 TGeoMedium* medK13D2U120 = mgr->GetMedium(Form(
"%s_K13D2U120$",
GetDetName()));
2024 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
2025 TGeoMedium* medWater = mgr->GetMedium(Form(
"%s_WATER$",
GetDetName()));
2026 TGeoMedium* medCarbonFleece = mgr->GetMedium(Form(
"%s_CarbonFleece$",
GetDetName()));
2027 TGeoMedium* medFGS003 = mgr->GetMedium(Form(
"%s_FGS003$",
GetDetName()));
2028 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2029 TGeoMedium* medTungsten = mgr->GetMedium(Form(
"%s_TUNGSTEN$",
GetDetName()));
2031 TGeoVolume* coldPlateVol =
new TGeoVolume(
"ColdPlateVol", coldPlate, medK13D2U120);
2032 coldPlateVol->SetLineColor(kYellow - 3);
2033 coldPlateVol->SetFillColor(coldPlateVol->GetLineColor());
2034 coldPlateVol->SetFillStyle(4000);
2036 TGeoVolume* fleeccentVol =
new TGeoVolume(
"CarbonFleeceCentral", fleeccent, medCarbonFleece);
2037 fleeccentVol->SetLineColor(kViolet);
2038 fleeccentVol->SetFillColor(fleeccentVol->GetLineColor());
2039 fleeccentVol->SetFillStyle(4000);
2041 TGeoVolume* coolTubeVol =
new TGeoVolume(
"CoolingTubeVol", coolTube, medKapton);
2042 coolTubeVol->SetLineColor(kGray);
2043 coolTubeVol->SetFillColor(coolTubeVol->GetLineColor());
2044 coolTubeVol->SetFillStyle(4000);
2046 TGeoVolume* coolWaterVol;
2047 coolWaterVol =
new TGeoVolume(
"CoolingWaterVol", coolWater, medWater);
2048 coolWaterVol->SetLineColor(kBlue);
2049 coolWaterVol->SetFillColor(coolWaterVol->GetLineColor());
2050 coolWaterVol->SetFillStyle(4000);
2052 TGeoVolume* graphlatVol =
new TGeoVolume(
"GraphiteFoilLateral", graphlat, medFGS003);
2053 graphlatVol->SetLineColor(kGreen);
2054 graphlatVol->SetFillColor(graphlatVol->GetLineColor());
2055 graphlatVol->SetFillStyle(4000);
2057 TGeoVolume* graphmidVol =
new TGeoVolume(
"GraphiteFoilMiddle", graphmid, medFGS003);
2058 graphmidVol->SetLineColor(kGreen);
2059 graphmidVol->SetFillColor(graphmidVol->GetLineColor());
2060 graphmidVol->SetFillStyle(4000);
2062 TGeoVolume* graphvertVol =
new TGeoVolume(
"GraphiteFoilVertical", graphvert, medFGS003);
2063 graphvertVol->SetLineColor(kGreen);
2064 graphvertVol->SetFillColor(graphvertVol->GetLineColor());
2065 graphvertVol->SetFillStyle(4000);
2067 TGeoVolume* graphtubVol =
new TGeoVolume(
"GraphiteFoilPipeCover", graphtub, medFGS003);
2068 graphtubVol->SetLineColor(kGreen);
2069 graphtubVol->SetFillColor(graphtubVol->GetLineColor());
2070 graphtubVol->SetFillStyle(4000);
2072 TGeoVolume* fleeclatVol =
new TGeoVolume(
"CarbonFleeceLateral", fleeclat, medCarbonFleece);
2073 fleeclatVol->SetLineColor(kViolet);
2074 fleeclatVol->SetFillColor(fleeclatVol->GetLineColor());
2075 fleeclatVol->SetFillStyle(4000);
2077 TGeoVolume* fleecmidVol =
new TGeoVolume(
"CarbonFleeceMiddle", fleecmid, medCarbonFleece);
2078 fleecmidVol->SetLineColor(kViolet);
2079 fleecmidVol->SetFillColor(fleecmidVol->GetLineColor());
2080 fleecmidVol->SetFillStyle(4000);
2082 TGeoVolume* fleecvertVol =
new TGeoVolume(
"CarbonFleeceVertical", fleecvert, medCarbonFleece);
2083 fleecvertVol->SetLineColor(kViolet);
2084 fleecvertVol->SetFillColor(fleecvertVol->GetLineColor());
2085 fleecvertVol->SetFillStyle(4000);
2087 TGeoVolume* fleectubVol =
new TGeoVolume(
"CarbonFleecePipeCover", fleectub, medCarbonFleece);
2088 fleectubVol->SetLineColor(kViolet);
2089 fleectubVol->SetFillColor(fleectubVol->GetLineColor());
2090 fleectubVol->SetFillStyle(4000);
2093 TGeoVolume* halfStaveVol =
new TGeoVolume(volname, halfStave, medAir);
2106 zbias = zlen - mNumberOfModules * zmod - (mNumberOfModules - 1) * 0.5 * sOBModuleGap;
2110 halfStaveVol->AddNode(powerBusVol, 1,
new TGeoTranslation(0, ypos, 0));
2112 ypos -= (ypowbus + ymod);
2113 for (Int_t
j = 0;
j < mNumberOfModules;
j++) {
2114 zpos = zlen - zbias -
j * (2 * zmod + sOBModuleGap) - zmod;
2115 halfStaveVol->AddNode(moduleVol,
j,
new TGeoTranslation(0, ypos, zpos));
2121 ypos -= fleeccent->GetDY();
2122 if (mBuildLevel < 6) {
2123 halfStaveVol->AddNode(fleeccentVol, 1,
new TGeoTranslation(0, ypos, 0));
2125 ypos -= fleeccent->GetDY();
2127 ypos -= coldPlate->GetDY();
2128 if (mBuildLevel < 6) {
2129 halfStaveVol->AddNode(coldPlateVol, 1,
new TGeoTranslation(0, ypos, 0));
2131 ypos -= coldPlate->GetDY();
2133 ypos -= fleeccent->GetDY();
2134 if (mBuildLevel < 6) {
2135 halfStaveVol->AddNode(fleeccentVol, 2,
new TGeoTranslation(0, ypos, 0));
2138 xpos = sOBCoolTubeXDist / 2;
2139 ypos1 = ypos - (fleeccent->GetDY() + coolTube->GetRmax());
2140 if (mBuildLevel < 4) {
2141 halfStaveVol->AddNode(coolWaterVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2142 halfStaveVol->AddNode(coolWaterVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2145 if (mBuildLevel < 5) {
2146 halfStaveVol->AddNode(coolTubeVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2147 halfStaveVol->AddNode(coolTubeVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2150 if (mBuildLevel < 6) {
2151 halfStaveVol->AddNode(graphtubVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2152 halfStaveVol->AddNode(graphtubVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2154 halfStaveVol->AddNode(fleectubVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2155 halfStaveVol->AddNode(fleectubVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2158 xpos = sOBColdPlateXWidth / 2 - graphlat->GetDX();
2159 ypos1 = ypos - (fleeccent->GetDY() + graphlat->GetDY());
2160 if (mBuildLevel < 6) {
2161 halfStaveVol->AddNode(graphlatVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2162 halfStaveVol->AddNode(graphlatVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2164 halfStaveVol->AddNode(graphmidVol, 1,
new TGeoTranslation(0, ypos1, 0));
2166 xpos = sOBColdPlateXWidth / 2 - 2 * graphlat->GetDX() + graphvert->GetDX();
2167 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + graphvert->GetDY());
2168 halfStaveVol->AddNode(graphvertVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2169 halfStaveVol->AddNode(graphvertVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2170 xpos = graphmid->GetDX() - graphvert->GetDX();
2171 halfStaveVol->AddNode(graphvertVol, 3,
new TGeoTranslation(-xpos, ypos1, 0));
2172 halfStaveVol->AddNode(graphvertVol, 4,
new TGeoTranslation(xpos, ypos1, 0));
2175 xpos = sOBColdPlateXWidth / 2 - fleeclat->GetDX();
2176 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + fleeclat->GetDY());
2177 if (mBuildLevel < 6) {
2178 halfStaveVol->AddNode(fleeclatVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2179 halfStaveVol->AddNode(fleeclatVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2181 halfStaveVol->AddNode(fleecmidVol, 1,
new TGeoTranslation(0, ypos1, 0));
2183 xpos = sOBColdPlateXWidth / 2 - 2 * fleeclat->GetDX() + fleecvert->GetDX();
2184 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + 2 * fleeclat->GetDY() + fleecvert->GetDY());
2185 halfStaveVol->AddNode(fleecvertVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2186 halfStaveVol->AddNode(fleecvertVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2187 xpos = fleecmid->GetDX() - fleecvert->GetDX();
2188 halfStaveVol->AddNode(fleecvertVol, 3,
new TGeoTranslation(-xpos, ypos1, 0));
2189 halfStaveVol->AddNode(fleecvertVol, 4,
new TGeoTranslation(xpos, ypos1, 0));
2193 TGeoVolume *connectorASide, *connectorCSide;
2197 connectorASide = mgr->GetVolume(
"OBColdPlateConnectorASide");
2199 if (!connectorASide) {
2200 createOBColdPlateConnectors();
2201 connectorASide = mgr->GetVolume(
"OBColdPlateConnectorASide");
2203 connectorCSide = mgr->GetVolume(
"OBColdPlateConnectorCSide");
2205 ypos = 2 * yHalfSt + (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDY() - sOBCPConnHollowYHei;
2206 zpos = zlen + (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDZ() - sOBCPConnHollowZLen;
2207 halfStaveVol->AddNode(connectorASide, 1,
new TGeoCombiTrans(0, -ypos, zpos,
new TGeoRotation(
"", 180, 0, 0)));
2209 zpos = zlen + (
static_cast<TGeoBBox*
>(connectorCSide->GetShape()))->GetDZ() - sOBCPConnHollowZLen;
2210 halfStaveVol->AddNode(connectorCSide, 1,
new TGeoCombiTrans(0, -ypos, -zpos,
new TGeoRotation(
"", 180, 0, 0)));
2213 return halfStaveVol;
2216TGeoVolume* V3Layer::createOBPowerBiasBuses(
const Double_t zcable,
const TGeoManager* mgr)
2234 Double_t xcable, ytot, ypos;
2237 xcable = sOBPowerBusXWidth / 2;
2241 xcable *= sOBPowerBusAlFrac;
2244 xcable = sOBBiasBusXWidth / 2;
2248 xcable *= sOBBiasBusAlFrac;
2252 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
2253 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
2254 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2256 TGeoVolume* gndPBVol =
new TGeoVolume(
"PowerBusGround", gndPB, medAluminum);
2257 gndPBVol->SetLineColor(kCyan);
2258 gndPBVol->SetFillColor(gndPBVol->GetLineColor());
2259 gndPBVol->SetFillStyle(4000);
2261 TGeoVolume* dielPBVol =
new TGeoVolume(
"PowerBusDielectric", dielPB, medKapton);
2262 dielPBVol->SetLineColor(kBlue);
2263 dielPBVol->SetFillColor(dielPBVol->GetLineColor());
2264 dielPBVol->SetFillStyle(4000);
2266 TGeoVolume* kapPBVol =
new TGeoVolume(
"PowerBusKapton", kapPB, medKapton);
2267 kapPBVol->SetLineColor(kBlue);
2268 kapPBVol->SetFillColor(kapPBVol->GetLineColor());
2269 kapPBVol->SetFillStyle(4000);
2271 TGeoVolume* topPBVol =
new TGeoVolume(
"PowerBusTop", topPB, medAluminum);
2272 topPBVol->SetLineColor(kCyan);
2273 topPBVol->SetFillColor(topPBVol->GetLineColor());
2274 topPBVol->SetFillStyle(4000);
2276 TGeoVolume* botBBVol =
new TGeoVolume(
"BiasBusBottom", botBB, medAluminum);
2277 botBBVol->SetLineColor(kCyan);
2278 botBBVol->SetFillColor(botBBVol->GetLineColor());
2279 botBBVol->SetFillStyle(4000);
2281 TGeoVolume* dielBBVol =
new TGeoVolume(
"BiasBusDielectric", dielBB, medKapton);
2282 dielBBVol->SetLineColor(kBlue);
2283 dielBBVol->SetFillColor(dielBBVol->GetLineColor());
2284 dielBBVol->SetFillStyle(4000);
2286 TGeoVolume* kapBBVol =
new TGeoVolume(
"BiasBusKapton", kapBB, medKapton);
2287 kapBBVol->SetLineColor(kBlue);
2288 kapBBVol->SetFillColor(kapBBVol->GetLineColor());
2289 kapBBVol->SetFillStyle(4000);
2291 TGeoVolume* topBBVol =
new TGeoVolume(
"BiasBusTop", topBB, medAluminum);
2292 topBBVol->SetLineColor(kCyan);
2293 topBBVol->SetFillColor(topBBVol->GetLineColor());
2294 topBBVol->SetFillStyle(4000);
2297 xcable = sOBPowerBusXWidth / 2;
2298 ytot = 2 * kapPB->GetDY() + topPB->GetDY() + dielPB->GetDY() + gndPB->GetDY() + 2 * kapBB->GetDY() + topBB->GetDY() + dielBB->GetDY() + botBB->GetDY();
2302 TGeoVolume* pnbBusVol =
new TGeoVolume(
"OBPowerBiasBus", pnbBus, medAir);
2305 ypos = -pnbBus->GetDY() + kapPB->GetDY();
2306 if (mBuildLevel < 5) {
2307 pnbBusVol->AddNode(kapPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2310 ypos += (kapPB->GetDY() + gndPB->GetDY());
2311 if (mBuildLevel < 2) {
2312 pnbBusVol->AddNode(gndPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2315 ypos += (gndPB->GetDY() + dielPB->GetDY());
2316 if (mBuildLevel < 5) {
2317 pnbBusVol->AddNode(dielPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2320 ypos += (dielPB->GetDY() + topPB->GetDY());
2321 if (mBuildLevel < 2) {
2322 pnbBusVol->AddNode(topPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2325 ypos += (topPB->GetDY() + kapPB->GetDY());
2326 if (mBuildLevel < 5) {
2327 pnbBusVol->AddNode(kapPBVol, 2,
new TGeoTranslation(0, ypos, 0));
2331 ypos += (kapPB->GetDY() + kapBB->GetDY());
2332 if (mBuildLevel < 5) {
2333 pnbBusVol->AddNode(kapBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2336 ypos += (kapBB->GetDY() + botBB->GetDY());
2337 if (mBuildLevel < 2) {
2338 pnbBusVol->AddNode(botBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2341 ypos += (botBB->GetDY() + dielBB->GetDY());
2342 if (mBuildLevel < 5) {
2343 pnbBusVol->AddNode(dielBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2346 ypos += (dielBB->GetDY() + topBB->GetDY());
2347 if (mBuildLevel < 2) {
2348 pnbBusVol->AddNode(topBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2351 ypos += (topBB->GetDY() + kapBB->GetDY());
2352 if (mBuildLevel < 5) {
2353 pnbBusVol->AddNode(kapBBVol, 2,
new TGeoTranslation(0, ypos, 0));
2360void V3Layer::createOBColdPlateConnectors()
2375 createOBColdPlateConnectorsASide();
2376 createOBColdPlateConnectorsCSide();
2379void V3Layer::createOBColdPlateConnectorsASide()
2396 const TGeoManager* mgr = gGeoManager;
2399 const Int_t nv = 16;
2400 Double_t xv[nv], yv[nv];
2401 Double_t xlen, ylen, zlen;
2402 Double_t xpos, ypos, zpos;
2405 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2406 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
2407 TGeoMedium* medInox304 = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
2412 xlen = sOBCPConnectorXWidth;
2413 ylen = sOBCPConnBlockYHei;
2414 zlen = sOBCPConnBlockZLen;
2415 TGeoBBox* connBlock =
new TGeoBBox(
"connBlockA", xlen / 2, ylen / 2, zlen / 2);
2417 xv[0] = sOBCPConnectorXWidth * 0.6;
2418 yv[0] = -sOBCPConnHollowYHei;
2420 yv[1] = sOBCPConnHollowYHei;
2421 xv[2] = sOBCPConnTubesXDist / 2 + sOBCPConnTubeHole1D / 2;
2424 yv[3] = sOBCPConnTubesYPos;
2425 xv[4] = sOBCPConnTubesXDist / 2 - sOBCPConnTubeHole1D / 2;
2430 for (Int_t
i = 0;
i < 6;
i++) {
2431 xv[6 +
i] = -xv[5 -
i];
2432 yv[6 +
i] = yv[5 -
i];
2435 TGeoXtru* connBlockHoll =
new TGeoXtru(2);
2436 connBlockHoll->SetName(
"connBlockHollA");
2437 connBlockHoll->DefinePolygon(12, xv, yv);
2438 connBlockHoll->DefineSection(0, -sOBCPConnHollowZLen);
2439 connBlockHoll->DefineSection(1, sOBCPConnHollowZLen);
2441 ypos = -connBlock->GetDY();
2442 zpos = -connBlock->GetDZ();
2443 TGeoTranslation* transBlockHoll =
new TGeoTranslation(
"transBlockHollA", 0, ypos, zpos);
2444 transBlockHoll->RegisterYourself();
2446 xlen = sOBCPConnSquareHoleX / 2;
2447 ylen = sOBCPConnBlockYHei / 1.5;
2448 zlen = sOBCPConnSquareHoleZ / 2;
2449 TGeoBBox* connSquareHole =
new TGeoBBox(
"connASquareHole", xlen, ylen, zlen);
2452 -connBlock->GetDZ() + (sOBCPConnSqrHoleZPos + connSquareHole->GetDZ());
2453 TGeoTranslation* transSquareHole =
new TGeoTranslation(
"transASquareHole", 0, 0, zpos);
2454 transSquareHole->RegisterYourself();
2456 zlen = sOBCPConnTubeHole1Z;
2457 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1AHole", 0, sOBCPConnTubeHole1D / 2, zlen);
2459 xpos = sOBCPConnTubesXDist / 2;
2460 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2461 zpos = connBlock->GetDZ();
2462 TGeoTranslation* trans1Tube1AHole =
new TGeoTranslation(
"trans1Tube1AHole", -xpos, ypos, -zpos);
2463 trans1Tube1AHole->RegisterYourself();
2464 TGeoTranslation* trans2Tube1AHole =
new TGeoTranslation(
"trans2Tube1AHole", xpos, ypos, -zpos);
2465 trans2Tube1AHole->RegisterYourself();
2467 zlen = sOBCPConnBlockZLen;
2468 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2AHole", 0, sOBCPConnTubeHole2D / 2, zlen);
2470 TGeoTranslation* trans1Tube2AHole =
new TGeoTranslation(
"trans1Tube2AHole", -xpos, ypos, 0);
2471 trans1Tube2AHole->RegisterYourself();
2472 TGeoTranslation* trans2Tube2AHole =
new TGeoTranslation(
"trans2Tube2AHole", xpos, ypos, 0);
2473 trans2Tube2AHole->RegisterYourself();
2475 zlen = sOBCPConnAFitZIn;
2476 TGeoTube* connFitHole =
new TGeoTube(
"fitAHole", 0, sOBCPConnFitHoleD / 2, zlen);
2478 TGeoTranslation* trans1FitAHole =
new TGeoTranslation(
"trans1FitAHole", -xpos, ypos, zpos);
2479 trans1FitAHole->RegisterYourself();
2480 TGeoTranslation* trans2FitAHole =
new TGeoTranslation(
"trans2FitAHole", xpos, ypos, zpos);
2481 trans2FitAHole->RegisterYourself();
2483 TGeoCompositeShape* connBlockSh =
new TGeoCompositeShape(
2484 "connBlockA-connBlockHollA:transBlockHollA-connASquareHole:transASquareHole-tube1AHole:trans1Tube1AHole-tube1AHole:"
2485 "trans2Tube1AHole-tube2AHole:trans1Tube2AHole-tube2AHole:trans2Tube2AHole-fitAHole:trans1FitAHole-fitAHole:"
2488 TGeoVolume* connBlockA =
new TGeoVolume(
"OBColdPlateConnectorBlockASide", connBlockSh, medPEEK);
2489 connBlockA->SetFillColor(42);
2490 connBlockA->SetLineColor(42);
2493 Double_t rmin = sOBCPConnAFitExtD / 2 - sOBCPConnAFitThick;
2494 TGeoTube* connFitSh =
new TGeoTube(rmin, sOBCPConnAFitExtD / 2, sOBCPConnAFitZLen / 2);
2496 TGeoVolume* connFit =
new TGeoVolume(
"OBColdPlateConnectorFitting", connFitSh, medInox304);
2497 connFit->SetFillColor(kGray);
2498 connFit->SetLineColor(kGray);
2502 xlen = sOBCPConnectorXWidth;
2503 ylen = sOBCPConnBlockYHei;
2504 zlen = sOBCPConnBlockZLen + (sOBCPConnAFitZLen - sOBCPConnAFitZIn);
2505 TGeoBBox* connBox =
new TGeoBBox(
"connectorOBCPA", xlen / 2, ylen / 2, zlen / 2);
2507 ypos = -connBox->GetDY();
2508 zpos = -connBox->GetDZ();
2509 TGeoTranslation* transBoxHoll =
new TGeoTranslation(
"transBoxHollA", 0, ypos, zpos);
2510 transBoxHoll->RegisterYourself();
2512 xpos = sOBCPConnTubesXDist / 2;
2513 ypos = -connBox->GetDY() + sOBCPConnTubesYPos;
2514 zpos = connBox->GetDZ();
2515 TGeoTranslation* trans1BoxHole =
new TGeoTranslation(
"trans1BoxAHole", -xpos, ypos, -zpos);
2516 trans1BoxHole->RegisterYourself();
2517 TGeoTranslation* trans2BoxHole =
new TGeoTranslation(
"trans2BoxAHole", xpos, ypos, -zpos);
2518 trans2BoxHole->RegisterYourself();
2520 TGeoCompositeShape* connectSh =
new TGeoCompositeShape(
2521 "connectorOBCPA-connBlockHollA:transBoxHollA-tube1AHole:trans1BoxAHole-tube1AHole:trans2BoxAHole");
2523 TGeoVolume* connectorASide =
new TGeoVolume(
"OBColdPlateConnectorASide", connectSh, medAir);
2526 zpos = -connectSh->GetDZ() + connBlock->GetDZ();
2527 connectorASide->AddNode(connBlockA, 1,
new TGeoTranslation(0, 0, zpos));
2529 xpos = sOBCPConnTubesXDist / 2;
2530 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2531 zpos = connectSh->GetDZ() - connFitSh->GetDz();
2532 connectorASide->AddNode(connFit, 1,
new TGeoTranslation(-xpos, ypos, zpos));
2533 connectorASide->AddNode(connFit, 2,
new TGeoTranslation(xpos, ypos, zpos));
2536void V3Layer::createOBColdPlateConnectorsCSide()
2553 const TGeoManager* mgr = gGeoManager;
2556 const Int_t nv = 16;
2557 Double_t xv[nv], yv[nv];
2558 Double_t xlen, ylen, zlen;
2559 Double_t xpos, ypos, zpos;
2562 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2563 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
2568 xlen = sOBCPConnectorXWidth;
2569 ylen = sOBCPConnBlockYHei;
2570 zlen = sOBCPConnBlockZLen;
2571 TGeoBBox* connBlock =
new TGeoBBox(
"connBlockC", xlen / 2, ylen / 2, zlen / 2);
2573 xv[0] = sOBCPConnectorXWidth * 0.6;
2574 yv[0] = -sOBCPConnHollowYHei;
2576 yv[1] = sOBCPConnHollowYHei;
2577 xv[2] = sOBCPConnTubesXDist / 2 + sOBCPConnTubeHole1D / 2;
2580 yv[3] = sOBCPConnTubesYPos;
2581 xv[4] = sOBCPConnTubesXDist / 2 - sOBCPConnTubeHole1D / 2;
2586 for (Int_t
i = 0;
i < 6;
i++) {
2587 xv[6 +
i] = -xv[5 -
i];
2588 yv[6 +
i] = yv[5 -
i];
2591 TGeoXtru* connBlockHoll =
new TGeoXtru(2);
2592 connBlockHoll->SetName(
"connBlockHollC");
2593 connBlockHoll->DefinePolygon(12, xv, yv);
2594 connBlockHoll->DefineSection(0, -sOBCPConnHollowZLen);
2595 connBlockHoll->DefineSection(1, sOBCPConnHollowZLen);
2597 ypos = -connBlock->GetDY();
2598 zpos = connBlock->GetDZ();
2599 TGeoTranslation* transBlockHoll =
new TGeoTranslation(
"transBlockHollC", 0, ypos, zpos);
2600 transBlockHoll->RegisterYourself();
2602 TGeoTube* connRoundHole =
new TGeoTube(
"connCRoundHole", 0, sOBCPConnRoundHoleD / 2, sOBCPConnBlockYHei / 1.5);
2604 zpos = connBlock->GetDZ() - sOBCPConnRndHoleZPos;
2605 TGeoCombiTrans* transRoundHole =
new TGeoCombiTrans(
"transCRoundHole", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
2606 transRoundHole->RegisterYourself();
2608 zlen = sOBCPConnTubeHole1Z;
2609 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1CHole", 0, sOBCPConnTubeHole1D / 2, zlen);
2611 xpos = sOBCPConnTubesXDist / 2;
2612 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2613 zpos = connBlock->GetDZ();
2614 TGeoTranslation* trans1Tube1AHole =
new TGeoTranslation(
"trans1Tube1CHole", -xpos, ypos, zpos);
2615 trans1Tube1AHole->RegisterYourself();
2616 TGeoTranslation* trans2Tube1AHole =
new TGeoTranslation(
"trans2Tube1CHole", xpos, ypos, zpos);
2617 trans2Tube1AHole->RegisterYourself();
2619 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2CHole", 0, sOBCPConnTubeHole2D / 2, connBlock->GetDZ());
2621 zpos = sOBCPConnTubeHole3ZP;
2622 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"trans1Tube2CHole", -xpos, ypos, zpos);
2623 connTubes2Trans1->RegisterYourself();
2624 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"trans2Tube2CHole", xpos, ypos, zpos);
2625 connTubes2Trans2->RegisterYourself();
2627 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3CHole", 0, sOBCPConnTubeHole2D / 2, connBlock->GetDX());
2629 xpos = -sOBCPConnTubeHole3XP;
2630 zpos = -connBlock->GetDZ() + sOBCPConnTubeHole3ZP;
2631 TGeoCombiTrans* connTubes3Trans =
2632 new TGeoCombiTrans(
"transTube3CHole", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90));
2633 connTubes3Trans->RegisterYourself();
2635 TGeoCompositeShape* connBlockSh =
new TGeoCompositeShape(
2636 "connBlockC-connBlockHollC:transBlockHollC-connCRoundHole:transCRoundHole-tube1CHole:trans1Tube1CHole-tube1CHole:"
2637 "trans2Tube1CHole-tube2CHole:trans1Tube2CHole-tube2CHole:trans2Tube2CHole-tube3CHole:transTube3CHole");
2639 TGeoVolume* connBlockC =
new TGeoVolume(
"OBColdPlateConnectorBlockCSide", connBlockSh, medPEEK);
2640 connBlockC->SetFillColor(42);
2641 connBlockC->SetLineColor(42);
2644 TGeoPcon* connPlugSh =
new TGeoPcon(0, 360, 4);
2645 connPlugSh->DefineSection(0, 0., 0., sOBCPConnTubeHole2D / 2);
2646 connPlugSh->DefineSection(1, sOBCPConnPlugThick, 0., sOBCPConnTubeHole2D / 2);
2647 connPlugSh->DefineSection(2, sOBCPConnPlugThick, sOBCPConnPlugInnerD / 2, sOBCPConnTubeHole2D / 2);
2648 connPlugSh->DefineSection(3, sOBCPConnPlugTotLen, sOBCPConnPlugInnerD / 2, sOBCPConnTubeHole2D / 2);
2650 TGeoVolume* connPlug =
new TGeoVolume(
"OBCPConnectorPlugC", connPlugSh, medPEEK);
2651 connPlug->SetFillColor(44);
2652 connPlug->SetLineColor(44);
2656 xlen = sOBCPConnectorXWidth;
2657 ylen = sOBCPConnBlockYHei;
2658 zlen = sOBCPConnBlockZLen;
2659 TGeoBBox* connBox =
new TGeoBBox(
"connectorOBCPC", xlen / 2, ylen / 2, zlen / 2);
2661 ypos = -connBox->GetDY();
2662 zpos = connBox->GetDZ();
2663 TGeoTranslation* transBoxHoll =
new TGeoTranslation(
"transBoxHollC", 0, ypos, zpos);
2664 transBoxHoll->RegisterYourself();
2666 xpos = sOBCPConnTubesXDist / 2;
2667 ypos = -connBox->GetDY() + sOBCPConnTubesYPos;
2668 zpos = connBox->GetDZ();
2669 TGeoTranslation* trans1BoxHole =
new TGeoTranslation(
"trans1BoxCHole", -xpos, ypos, zpos);
2670 trans1BoxHole->RegisterYourself();
2671 TGeoTranslation* trans2BoxHole =
new TGeoTranslation(
"trans2BoxCHole", xpos, ypos, zpos);
2672 trans2BoxHole->RegisterYourself();
2674 TGeoCompositeShape* connectSh =
new TGeoCompositeShape(
2675 "connectorOBCPC-connBlockHollC:transBoxHollC-tube1CHole:trans1BoxCHole-tube1CHole:trans2BoxCHole");
2677 TGeoVolume* connectorCSide =
new TGeoVolume(
"OBColdPlateConnectorCSide", connectSh, medAir);
2680 connectorCSide->AddNode(connBlockC, 1);
2682 xpos = -connBlock->GetDX();
2683 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2684 zpos = -connBlock->GetDZ() + sOBCPConnTubeHole3ZP;
2685 connectorCSide->AddNode(connPlug, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 90)));
2688TGeoVolume* V3Layer::createSpaceFrameOuterB(
const TGeoManager* mgr)
2690 TGeoVolume* mechStavVol =
nullptr;
2692 switch (mStaveModel) {
2695 mechStavVol = createSpaceFrameOuterBDummy(mgr);
2699 mechStavVol = createSpaceFrameOuterB2(mgr);
2702 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
2709TGeoVolume* V3Layer::createSpaceFrameOuterBDummy(
const TGeoManager*)
const
2726TGeoVolume* V3Layer::createSpaceFrameOuterB2(
const TGeoManager* mgr)
2746 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2748 TGeoVolume *unitVol[2], *next2EndVol[2], *endVol[2];
2749 Double_t *xtru, *ytru;
2750 Double_t zlen, zpos;
2752 const Int_t nameLen = 30;
2753 char volname[nameLen];
2757 unitVol[0] = mgr->GetVolume(
"SpaceFrameUnit0");
2760 createOBSpaceFrameObjects(mgr);
2761 unitVol[0] = mgr->GetVolume(
"SpaceFrameUnit0");
2764 unitVol[1] = mgr->GetVolume(
"SpaceFrameUnit1");
2766 next2EndVol[0] = mgr->GetVolume(
"SpaceFrameNext2EndUnit0");
2767 next2EndVol[1] = mgr->GetVolume(
"SpaceFrameNext2EndUnit1");
2769 endVol[0] = mgr->GetVolume(
"SpaceFrameEndUnit0");
2770 endVol[1] = mgr->GetVolume(
"SpaceFrameEndUnit1");
2774 TGeoXtru* volShape =
static_cast<TGeoXtru*
>(unitVol[0]->GetShape());
2776 nPoints = volShape->GetNvert();
2777 xtru =
new Double_t[nPoints];
2778 ytru =
new Double_t[nPoints];
2780 for (Int_t
i = 0;
i < nPoints;
i++) {
2781 xtru[
i] = volShape->GetX(
i);
2782 ytru[
i] = volShape->GetY(
i);
2785 Int_t nUnits = sOBSpaceFrameNUnits[mLayerNumber / 5];
2786 zlen = (nUnits - 2) * sOBSpaceFrameUnitLen;
2788 TGeoXtru* spaceFrameCentral =
new TGeoXtru(2);
2789 spaceFrameCentral->DefinePolygon(nPoints, xtru, ytru);
2790 spaceFrameCentral->DefineSection(0, -zlen / 2);
2791 spaceFrameCentral->DefineSection(1, zlen / 2);
2792 snprintf(volname, nameLen,
"sframecentral%d", mLayerNumber);
2793 spaceFrameCentral->SetName(volname);
2795 zpos = zlen / 2 + sOBSpaceFrameUnitLen / 2;
2796 snprintf(volname, nameLen,
"endUnit0Trans%d", mLayerNumber);
2797 TGeoCombiTrans* endUnit0Trans =
new TGeoCombiTrans(volname, 0, 0, -zpos,
new TGeoRotation(
"", 90, 180, -90));
2798 endUnit0Trans->RegisterYourself();
2799 snprintf(volname, nameLen,
"endUnit1Trans%d", mLayerNumber);
2800 TGeoTranslation* endUnit1Trans =
new TGeoTranslation(volname, 0, 0, zpos);
2801 endUnit1Trans->RegisterYourself();
2806 char componame[100];
2807 snprintf(componame, 100,
"sframecentral%d+endunitcontainer:endUnit0Trans%d+endunitcontainer:endUnit1Trans%d",
2808 mLayerNumber, mLayerNumber, mLayerNumber);
2810 TGeoCompositeShape* spaceFrame =
new TGeoCompositeShape(componame);
2812 snprintf(volname, nameLen,
"SpaceFrameVolumeLay%d", mLayerNumber);
2813 TGeoVolume* spaceFrameVol =
new TGeoVolume(volname, spaceFrame, medAir);
2814 spaceFrameVol->SetVisibility(kFALSE);
2817 TGeoXtru* frameUnit =
static_cast<TGeoXtru*
>(unitVol[0]->GetShape());
2819 zpos = -spaceFrame->GetDZ() + frameUnit->GetDZ() + sOBSFrameConnTopLen;
2820 spaceFrameVol->AddNode(endVol[0], 1,
new TGeoCombiTrans(0, 0, zpos,
new TGeoRotation(
"", 90, 180, -90)));
2822 zpos += (2 * frameUnit->GetDZ());
2823 spaceFrameVol->AddNode(next2EndVol[0], 1,
new TGeoTranslation(0, 0, zpos));
2825 for (Int_t
i = 2;
i < nUnits - 2;
i++) {
2826 zpos += (2 * frameUnit->GetDZ());
2828 Int_t k =
i -
j * 2;
2829 spaceFrameVol->AddNode(unitVol[k],
j,
new TGeoTranslation(0, 0, zpos));
2832 zpos += (2 * frameUnit->GetDZ());
2833 spaceFrameVol->AddNode(next2EndVol[1], 1,
new TGeoTranslation(0, 0, zpos));
2835 zpos += (2 * frameUnit->GetDZ());
2836 spaceFrameVol->AddNode(endVol[1], 1,
new TGeoTranslation(0, 0, zpos));
2842 return spaceFrameVol;
2845void V3Layer::createOBSpaceFrameObjects(
const TGeoManager* mgr)
2870 TGeoMedium* medCarbon = mgr->GetMedium(Form(
"%s_M55J6K$",
GetDetName()));
2871 TGeoMedium* medF6151B05M = mgr->GetMedium(Form(
"%s_F6151B05M$",
GetDetName()));
2872 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2875 Double_t halfFrameWidth = sOBSpaceFrameWidth / 2;
2876 Double_t triangleHeight = sOBSpaceFrameHeight;
2877 Double_t sframeHeight = triangleHeight + sOBSFrameBaseRibDiam + sOBSFrameULegHeight2 * 2;
2878 Double_t staveLa = sOBSpaceFrameTopVL;
2879 Double_t staveHa = sOBSpaceFrameTopVH;
2880 Double_t staveLb = sOBSpaceFrameSideVL;
2881 Double_t staveHb = sOBSpaceFrameSideVH;
2882 Double_t alphaDeg = sOBSpaceFrameVAlpha;
2883 Double_t alphaRad = alphaDeg * TMath::DegToRad() / 2;
2884 Double_t beta = sOBSpaceFrameVBeta * TMath::DegToRad() / 2;
2885 Double_t sideRibRadius = sOBSFrameSideRibDiam / 2;
2886 Double_t sidePhiDeg = sOBSFrameSideRibPhi;
2887 Double_t sidePhiRad = sidePhiDeg * TMath::DegToRad();
2888 Double_t baseRibRadius = sOBSFrameBaseRibDiam / 2;
2889 Double_t basePhiDeg = sOBSFrameBaseRibPhi;
2890 Double_t basePhiRad = basePhiDeg * TMath::DegToRad();
2891 Double_t ulegHalfLen = sOBSFrameULegLen / 2;
2892 Double_t ulegHalfWidth = sOBSFrameULegWidth / 2;
2893 Double_t ulegHigh1 = sOBSFrameULegHeight1;
2894 Double_t ulegHigh2 = sOBSFrameULegHeight2;
2895 Double_t ulegThick = sOBSFrameULegThick;
2896 Double_t topVFactorEU = 0.60;
2898 Double_t xlen, zlen;
2899 Double_t xpos, ypos, zpos;
2901 Double_t xtru[22], ytru[22];
2903 unitlen = sOBSpaceFrameUnitLen;
2905 xlen = halfFrameWidth + sideRibRadius;
2909 xtru[0] = sOBSFrameULegXPos - ulegHalfLen;
2910 ytru[0] = -(triangleHeight / 2 + baseRibRadius);
2912 ytru[1] = ytru[0] - ulegHigh1;
2913 xtru[2] = xtru[1] + ulegThick;
2916 ytru[3] = ytru[0] - ulegThick;
2917 xtru[7] = sOBSFrameULegXPos + ulegHalfLen;
2921 xtru[5] = xtru[6] - ulegThick;
2928 ytru[9] = 0.9 * ytru[8];
2929 xtru[10] = 0.3 * xtru[8];
2930 ytru[10] = triangleHeight / 2;
2931 for (Int_t
i = 0;
i < 11;
i++) {
2932 xtru[
i + 11] = -xtru[10 -
i];
2933 ytru[
i + 11] = ytru[10 -
i];
2935 ytru[15] = ytru[0] - ulegHigh2;
2936 ytru[16] = ytru[15];
2937 ytru[19] = ytru[15];
2938 ytru[20] = ytru[15];
2943 TGeoXtru* frameUnit =
new TGeoXtru(2);
2944 frameUnit->DefinePolygon(22, xtru, ytru);
2945 frameUnit->DefineSection(0, -unitlen / 2);
2946 frameUnit->DefineSection(1, unitlen / 2);
2948 TGeoXtru* next2EndUnit =
new TGeoXtru(2);
2949 next2EndUnit->DefinePolygon(22, xtru, ytru);
2950 next2EndUnit->DefineSection(0, -unitlen / 2);
2951 next2EndUnit->DefineSection(1, unitlen / 2);
2956 ytru[0] = -(triangleHeight / 2 + baseRibRadius);
2958 ytru[1] = 0.9 * ytru[0];
2959 xtru[2] = 0.3 * xtru[0];
2960 ytru[2] = triangleHeight / 2;
2961 for (Int_t
i = 0;
i < 3;
i++) {
2962 xtru[
i + 3] = -xtru[2 -
i];
2963 ytru[
i + 3] = ytru[2 -
i];
2966 TGeoXtru* endUnitBody =
new TGeoXtru(2);
2967 endUnitBody->SetName(
"endunitbody");
2968 endUnitBody->DefinePolygon(6, xtru, ytru);
2969 endUnitBody->DefineSection(0, -unitlen / 2);
2970 endUnitBody->DefineSection(1, 0.8 * unitlen / 2);
2972 xtru[2] = 0.25 * (3 * xtru[1] + xtru[2]);
2973 ytru[2] = 0.25 * (3 * ytru[1] + ytru[2]);
2974 for (Int_t
i = 0;
i < 3;
i++) {
2975 xtru[
i + 3] = -xtru[2 -
i];
2976 ytru[
i + 3] = ytru[2 -
i];
2979 TGeoXtru* endUnitBodyLow =
new TGeoXtru(2);
2980 endUnitBodyLow->SetName(
"endunitbodylow");
2981 endUnitBodyLow->DefinePolygon(6, xtru, ytru);
2982 endUnitBodyLow->DefineSection(0, 0.8 * unitlen / 2);
2983 endUnitBodyLow->DefineSection(1, unitlen / 2);
2986 xtru[0] = sOBSFrameConnWidth / 2.;
2989 ytru[1] = sOBSFrameConnInsHei;
2990 xtru[2] = xtru[1] - sOBSFrameConnTotHei + sOBSFrameConnInsHei;
2991 ytru[2] = sOBSFrameConnTotHei;
2992 for (Int_t
i = 0;
i < 3;
i++) {
2993 xtru[
i + 3] = -xtru[2 -
i];
2994 ytru[
i + 3] = ytru[2 -
i];
2997 TGeoXtru* endUnitConn =
new TGeoXtru(2);
2998 endUnitConn->SetName(
"endunitconn");
2999 endUnitConn->DefinePolygon(6, xtru, ytru);
3000 endUnitConn->DefineSection(0, 0.);
3001 endUnitConn->DefineSection(1, sOBSFrameConnTopLen);
3006 createStaveSide(
"fakeCornerSide", unitlen / 2., alphaRad, beta, staveLb, staveHb, kFALSE);
3008 ypos = -triangleHeight / 2 + vside->GetY(3);
3009 TGeoTranslation* endUnitConnTrans =
new TGeoTranslation(
"endunitconntrans", 0, ypos, unitlen / 2);
3010 endUnitConnTrans->RegisterYourself();
3012 TGeoCompositeShape* endUnit =
new TGeoCompositeShape(
"endunitbody+endunitbodylow+endunitconn:endunitconntrans");
3013 endUnit->SetName(
"endunitcontainer");
3016 TGeoVolume* unitVol[2];
3017 unitVol[0] =
new TGeoVolume(
"SpaceFrameUnit0", frameUnit, medAir);
3018 unitVol[1] =
new TGeoVolume(
"SpaceFrameUnit1", frameUnit, medAir);
3019 unitVol[0]->SetVisibility(kFALSE);
3020 unitVol[1]->SetVisibility(kFALSE);
3022 TGeoVolume* next2EndVol[2];
3023 next2EndVol[0] =
new TGeoVolume(
"SpaceFrameNext2EndUnit0", next2EndUnit, medAir);
3024 next2EndVol[1] =
new TGeoVolume(
"SpaceFrameNext2EndUnit1", next2EndUnit, medAir);
3025 next2EndVol[0]->SetVisibility(kFALSE);
3026 next2EndVol[1]->SetVisibility(kFALSE);
3028 TGeoVolume* endVol[2];
3029 endVol[0] =
new TGeoVolume(
"SpaceFrameEndUnit0", endUnit, medAir);
3030 endVol[1] =
new TGeoVolume(
"SpaceFrameEndUnit1", endUnit, medAir);
3031 endVol[0]->SetVisibility(kFALSE);
3032 endVol[1]->SetVisibility(kFALSE);
3037 TGeoXtru* cfStavTop =
3038 createStaveSide(
"CFstavTopCornerVolshape", unitlen / 2., alphaRad, beta, staveLa, staveHa, kTRUE);
3040 TGeoVolume* cfStavTopVol =
new TGeoVolume(
"CFstavTopCornerVol", cfStavTop, medCarbon);
3041 cfStavTopVol->SetLineColor(35);
3043 unitVol[0]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3045 unitVol[1]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3047 next2EndVol[0]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3049 next2EndVol[1]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3051 zlen = topVFactorEU * unitlen;
3052 TGeoXtru* cfStavTopEU =
3053 createStaveSide(
"CFstavTopCornerEUVolshape", zlen / 2., alphaRad, beta, staveLa, staveHa, kTRUE);
3055 TGeoVolume* cfStavTopVolEU =
new TGeoVolume(
"CFstavTopCornerEUVol", cfStavTopEU, medCarbon);
3056 cfStavTopVol->SetLineColor(35);
3058 zpos = endUnitBody->GetDZ() - zlen / 2.;
3060 endVol[0]->AddNode(cfStavTopVolEU, 1,
new TGeoTranslation(0, triangleHeight / 2, -zpos));
3062 endVol[1]->AddNode(cfStavTopVolEU, 1,
new TGeoTranslation(0, triangleHeight / 2, -zpos));
3065 TGeoXtru* cfStavSide =
3066 createStaveSide(
"CFstavSideCornerVolshape", unitlen / 2., alphaRad, beta, staveLb, staveHb, kFALSE);
3068 TGeoVolume* cfStavSideVol =
new TGeoVolume(
"CFstavSideCornerVol", cfStavSide, medCarbon);
3069 cfStavSideVol->SetLineColor(35);
3071 unitVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3072 unitVol[0]->AddNode(cfStavSideVol, 2,
3073 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3075 unitVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3076 unitVol[1]->AddNode(cfStavSideVol, 2,
3077 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3079 next2EndVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3080 next2EndVol[0]->AddNode(
3081 cfStavSideVol, 2,
new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3083 next2EndVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3084 next2EndVol[1]->AddNode(
3085 cfStavSideVol, 2,
new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3087 endVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3088 endVol[0]->AddNode(cfStavSideVol, 2,
3089 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3091 endVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3092 endVol[1]->AddNode(cfStavSideVol, 2,
3093 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3097 Double_t ribZProj = triangleHeight / TMath::Tan(sidePhiRad);
3098 Double_t sideRibLen =
3099 TMath::Sqrt(ribZProj * ribZProj + triangleHeight * triangleHeight + halfFrameWidth * halfFrameWidth);
3101 TGeoTubeSeg* sideRib =
new TGeoTubeSeg(0, sideRibRadius, sideRibLen / 2, 0, 180);
3102 TGeoVolume* sideRibVol =
new TGeoVolume(
"CFstavSideBeamVol", sideRib, medCarbon);
3103 sideRibVol->SetLineColor(35);
3105 TGeoCombiTrans* sideTransf[4];
3106 xpos = halfFrameWidth / 2 + 0.8 * staveHa * TMath::Cos(alphaRad / 2);
3107 ypos = -sideRibRadius / 2;
3110 sideTransf[0] =
new TGeoCombiTrans(xpos, ypos, -zpos,
new TGeoRotation(
"", 90 - alphaDeg, -sidePhiDeg, -90));
3111 sideTransf[1] =
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 - alphaDeg, sidePhiDeg, -90));
3112 sideTransf[2] =
new TGeoCombiTrans(-xpos, ypos, -zpos,
new TGeoRotation(
"", 90 + alphaDeg, sidePhiDeg, -90));
3113 sideTransf[3] =
new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 + alphaDeg, -sidePhiDeg, -90));
3115 unitVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3116 unitVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3117 unitVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3118 unitVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3120 unitVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3121 unitVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3122 unitVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3123 unitVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3125 next2EndVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3126 next2EndVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3127 next2EndVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3128 next2EndVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3130 next2EndVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3131 next2EndVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3132 next2EndVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3133 next2EndVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3135 endVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3136 endVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3137 endVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3138 endVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3140 endVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3141 endVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3142 endVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3143 endVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3147 Double_t baseRibLen = 0.98 * 2 * halfFrameWidth / TMath::Sin(basePhiRad);
3149 TGeoTubeSeg* baseRib1 =
new TGeoTubeSeg(0, baseRibRadius, baseRibLen / 2, 0, 180);
3150 TGeoVolume* baseRib1Vol =
new TGeoVolume(
"CFstavBaseBeam1Vol", baseRib1, medCarbon);
3151 baseRib1Vol->SetLineColor(35);
3153 TGeoTubeSeg* baseRib2 =
new TGeoTubeSeg(0, baseRibRadius, halfFrameWidth, 0, 90);
3154 TGeoVolume* baseRib2Vol =
new TGeoVolume(
"CFstavBaseBeam2Vol", baseRib2, medCarbon);
3155 baseRib2Vol->SetLineColor(35);
3157 TGeoTubeSeg* baseEndRib =
new TGeoTubeSeg(0, baseRibRadius, halfFrameWidth, 0, 180);
3158 TGeoVolume* baseEndRibVol =
new TGeoVolume(
"CFstavBaseEndBeamVol", baseEndRib, medCarbon);
3159 baseEndRibVol->SetLineColor(35);
3161 TGeoCombiTrans* baseTransf[6];
3162 ypos = triangleHeight / 2;
3165 baseTransf[0] =
new TGeoCombiTrans(
"", 0, -ypos, -zpos,
new TGeoRotation(
"", 90, 90, 90));
3166 baseTransf[1] =
new TGeoCombiTrans(
"", 0, -ypos, zpos,
new TGeoRotation(
"", -90, 90, -90));
3167 baseTransf[2] =
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", -90, basePhiDeg, -90));
3168 baseTransf[3] =
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", -90, -basePhiDeg, -90));
3169 zpos -= baseEndRib->GetRmax();
3170 baseTransf[4] =
new TGeoCombiTrans(
"", 0, -ypos, -zpos,
new TGeoRotation(
"", 90, 90, 90));
3171 baseTransf[5] =
new TGeoCombiTrans(
"", 0, -ypos, zpos,
new TGeoRotation(
"", 90, 90, 90));
3173 unitVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3174 unitVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3175 unitVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3177 unitVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3178 unitVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3179 unitVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3181 next2EndVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3182 next2EndVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3183 next2EndVol[0]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3185 next2EndVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3186 next2EndVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3187 next2EndVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3189 endVol[0]->AddNode(baseEndRibVol, 1, baseTransf[4]);
3190 endVol[0]->AddNode(baseRib2Vol, 1, baseTransf[1]);
3191 endVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3193 endVol[1]->AddNode(baseEndRibVol, 1, baseTransf[5]);
3194 endVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3195 endVol[1]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3198 ypos = -triangleHeight / 2 + cfStavSide->GetY(3);
3200 createOBSpaceFrameConnector(endVol[0], ypos, zpos, kFALSE);
3201 createOBSpaceFrameConnector(endVol[1], ypos, zpos, kTRUE);
3205 xtru[0] = ulegHalfLen;
3208 ytru[1] = -ulegHigh1;
3209 xtru[2] = xtru[1] - ulegThick;
3212 ytru[3] = ytru[0] - ulegThick;
3213 for (Int_t
i = 0;
i < 4;
i++) {
3214 xtru[
i + 4] = -xtru[3 -
i];
3215 ytru[
i + 4] = ytru[3 -
i];
3218 TGeoXtru* uleg1full =
new TGeoXtru(2);
3219 uleg1full->DefinePolygon(8, xtru, ytru);
3220 uleg1full->DefineSection(0, -ulegHalfWidth);
3221 uleg1full->DefineSection(1, ulegHalfWidth);
3223 TGeoXtru* uleg1half =
new TGeoXtru(2);
3224 uleg1half->DefinePolygon(8, xtru, ytru);
3225 uleg1half->DefineSection(0, -ulegHalfWidth / 2);
3226 uleg1half->DefineSection(1, ulegHalfWidth / 2);
3228 TGeoVolume* uleg1fullVol =
new TGeoVolume(
"CFstavULeg1FullVol", uleg1full, medF6151B05M);
3229 uleg1fullVol->SetLineColor(35);
3231 TGeoVolume* uleg1halfVol =
new TGeoVolume(
"CFstavULeg1HalfVol", uleg1half, medF6151B05M);
3232 uleg1halfVol->SetLineColor(35);
3235 ytru[1] = -ulegHigh2;
3236 ytru[2] = -ulegHigh2;
3237 ytru[5] = -ulegHigh2;
3238 ytru[6] = -ulegHigh2;
3240 TGeoXtru* uleg2full =
new TGeoXtru(2);
3241 uleg2full->DefinePolygon(8, xtru, ytru);
3242 uleg2full->DefineSection(0, -ulegHalfWidth);
3243 uleg2full->DefineSection(1, ulegHalfWidth);
3245 TGeoXtru* uleg2half =
new TGeoXtru(2);
3246 uleg2half->DefinePolygon(8, xtru, ytru);
3247 uleg2half->DefineSection(0, -ulegHalfWidth / 2);
3248 uleg2half->DefineSection(1, ulegHalfWidth / 2);
3250 TGeoVolume* uleg2fullVol =
new TGeoVolume(
"CFstavULeg2FullVol", uleg2full, medF6151B05M);
3251 uleg2fullVol->SetLineColor(35);
3253 TGeoVolume* uleg2halfVol =
new TGeoVolume(
"CFstavULeg2HalfVol", uleg2half, medF6151B05M);
3254 uleg2halfVol->SetLineColor(35);
3256 xpos = sOBSFrameULegXPos;
3257 ypos = triangleHeight / 2 + baseRibRadius;
3258 zpos = unitlen / 2 - uleg1half->GetZ(1);
3260 unitVol[0]->AddNode(uleg1halfVol, 1,
3261 new TGeoTranslation(xpos, -ypos, -zpos));
3262 unitVol[0]->AddNode(uleg1halfVol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
3264 unitVol[1]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3265 unitVol[1]->AddNode(uleg1halfVol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
3267 unitVol[0]->AddNode(uleg2halfVol, 1,
3268 new TGeoTranslation(-xpos, -ypos, -zpos));
3269 unitVol[0]->AddNode(uleg2halfVol, 2,
new TGeoTranslation(-xpos, -ypos, zpos));
3271 unitVol[1]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3272 unitVol[1]->AddNode(uleg2halfVol, 2,
new TGeoTranslation(-xpos, -ypos, zpos));
3274 next2EndVol[0]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, zpos));
3275 next2EndVol[0]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, zpos));
3277 next2EndVol[1]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3278 next2EndVol[1]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3280 zpos = unitlen / 2 - uleg1full->GetZ(1);
3281 next2EndVol[0]->AddNode(uleg1fullVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3282 next2EndVol[0]->AddNode(uleg2fullVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3284 next2EndVol[1]->AddNode(uleg1fullVol, 1,
new TGeoTranslation(xpos, -ypos, zpos));
3285 next2EndVol[1]->AddNode(uleg2fullVol, 1,
new TGeoTranslation(-xpos, -ypos, zpos));
3291void V3Layer::createOBSpaceFrameConnector(TGeoVolume* mother,
const Double_t ymot,
const Double_t zmot,
const Bool_t sideA,
const TGeoManager* mgr)
3311 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
3314 TString connName, compoShape;
3316 Double_t xlen, ylen, zlen;
3317 Double_t xpos, ypos, zpos;
3318 Double_t xtru[6], ytru[6];
3321 ylen = sOBSFrameConnTotHei - sOBSFrameConnInsHei;
3323 xtru[0] = sOBSFrameConnWidth / 2.;
3326 ytru[1] = sOBSFrameConnInsHei;
3327 xtru[2] = xtru[1] - ylen;
3328 ytru[2] = sOBSFrameConnTotHei;
3329 for (Int_t
i = 0;
i < 3;
i++) {
3330 xtru[
i + 3] = -xtru[2 -
i];
3331 ytru[
i + 3] = ytru[2 -
i];
3334 TGeoXtru* topConn =
new TGeoXtru(2);
3335 topConn->SetName(
"connectorTop");
3336 topConn->DefinePolygon(6, xtru, ytru);
3337 topConn->DefineSection(0, 0.);
3338 topConn->DefineSection(1, sOBSFrameConnTopLen);
3341 zlen = sOBSFrameConnTotLen - sOBSFrameConnTopLen;
3343 xtru[0] = sOBSFrameConnInsBase / 2.;
3345 xtru[1] = sOBSFrameConnInsWide / 2.;
3346 ytru[1] = sOBSFrameConnInsHei;
3352 TGeoXtru* insConn =
new TGeoXtru(2);
3353 insConn->SetName(
"connectorIns");
3354 insConn->DefinePolygon(4, xtru, ytru);
3355 insConn->DefineSection(0, -zlen);
3356 insConn->DefineSection(1, 0.);
3359 TGeoTube* topHoleR =
new TGeoTube(
"topholer", 0., sOBSFrameConnTopHoleD / 2., 1.1 * sOBSFrameConnTotHei);
3361 xpos = sOBSFrConnTopHoleXDist / 2.;
3362 ypos = sOBSFrameConnTotHei / 2.;
3363 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos;
3364 TGeoCombiTrans* topHoleR1Trans =
new TGeoCombiTrans(
"topholer1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3365 topHoleR1Trans->RegisterYourself();
3367 TGeoCombiTrans* topHoleR2Trans =
new TGeoCombiTrans(
"topholer2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3368 topHoleR2Trans->RegisterYourself();
3370 xpos = sOBSFrConnCHoleXDist / 2.;
3371 zpos = sOBSFrameConnTopLen - sOBSFrameConnCHoleZPos;
3372 TGeoCombiTrans* topCHoleR1Trans =
new TGeoCombiTrans(
"topcholer1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3373 topCHoleR1Trans->RegisterYourself();
3375 TGeoCombiTrans* topCHoleR2Trans =
new TGeoCombiTrans(
"topcholer2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3376 topCHoleR2Trans->RegisterYourself();
3378 TGeoBBox* topAHole =
new TGeoBBox(
"topahole", sOBSFrameConnAHoleWid / 2., sOBSFrameConnTotHei, sOBSFrameConnAHoleLen / 2.);
3380 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos;
3381 TGeoTranslation* topAHoleTrans =
new TGeoTranslation(
"topaholetr", 0, ypos, zpos);
3382 topAHoleTrans->RegisterYourself();
3384 TGeoTube* topCHole =
new TGeoTube(
"topchole", 0., sOBSFrConnCTopHoleD / 2., sOBSFrameConnTotHei);
3386 TGeoCombiTrans* topCHoleTrans =
new TGeoCombiTrans(
"topcholetr", 0, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3387 topCHoleTrans->RegisterYourself();
3389 TGeoTube* topASide =
new TGeoTube(
"topaside", 0., sOBSFrConnASideHoleD / 2., 1.1 * sOBSFrConnASideHoleL);
3391 zpos = sOBSFrameConnTopLen + topASide->GetDz() - sOBSFrConnASideHoleL;
3392 TGeoTranslation* topASideTrans =
new TGeoTranslation(
"topasidetr", 0, sOBSFrConnASideHoleY, zpos);
3393 topASideTrans->RegisterYourself();
3396 TGeoTube* insHole =
new TGeoTube(
"inshole", 0., sOBSFrameConnInsHoleD / 2., sOBSFrameConnInsHei);
3398 xpos = sOBSFrameConnInsHoleX / 2.;
3399 ypos = sOBSFrameConnInsHei / 2.;
3400 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos - sOBSFrameConnHoleZDist;
3401 TGeoCombiTrans* insHole1Trans =
new TGeoCombiTrans(
"inshole1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3402 insHole1Trans->RegisterYourself();
3404 TGeoCombiTrans* insHole2Trans =
new TGeoCombiTrans(
"inshole2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3405 insHole2Trans->RegisterYourself();
3409 connName =
"OBSFConnectorA";
3410 compoShape =
"(connectorTop-topholer:topholer2tr-topholer:topholer1tr-topahole:topaholetr-topaside:topasidetr)+(connectorIns-inshole:inshole1tr-inshole:inshole2tr)";
3412 connName =
"OBSFConnectorC";
3413 compoShape =
"(connectorTop-topholer:topholer2tr-topholer:topholer1tr-topholer:topcholer1tr-topholer:topcholer2tr-topchole:topcholetr)+(connectorIns-inshole:inshole1tr-inshole:inshole2tr)";
3416 TGeoCompositeShape* obsfConnSh =
new TGeoCompositeShape(compoShape.Data());
3418 TGeoVolume* obsfConnVol =
new TGeoVolume(connName, obsfConnSh, medPEEK);
3421 mother->AddNode(obsfConnVol, 1,
new TGeoTranslation(0, ymot, zmot));
3424TGeoVolume* V3Layer::createModuleOuterB(
const TGeoManager* mgr)
3446 const Int_t nameLen = 30;
3447 char chipName[nameLen], sensName[nameLen], volName[nameLen];
3449 Double_t xGap = sOBChipXGap;
3450 Double_t
zGap = sOBChipZGap;
3452 Double_t xchip, ychip, zchip;
3453 Double_t xlen, ylen, zlen;
3454 Double_t xpos, ypos, zpos;
3461 if (mBuildLevel < 7) {
3471 ylen = 0.5 * sOBChipThickness;
3475 xchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDX();
3476 ychip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDY();
3477 zchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDZ();
3479 mOBModuleZLength = 2 * zchip * sOBChipsPerRow + (sOBChipsPerRow - 1) * sOBChipZGap;
3481 zlen = mOBModuleZLength / 2;
3484 xlen = (4 * xchip + xGap) / 2;
3485 ylen = sOBGlueFPCThick / 2;
3488 ylen = sOBGlueColdPlThick / 2;
3492 xlen = sOBFlexCableXWidth / 2;
3493 ylen = sOBFlexCableKapThick / 2;
3496 TGeoVolume* cuGndCableVol = createOBFPCCuGnd(zlen);
3497 TGeoVolume* cuSignalCableVol = createOBFPCCuSig(zlen);
3500 Double_t ygnd = (
static_cast<TGeoBBox*
>(cuGndCableVol->GetShape()))->GetDY();
3501 Double_t ysig = (
static_cast<TGeoBBox*
>(cuSignalCableVol->GetShape()))->GetDY();
3503 xlen = (
static_cast<TGeoBBox*
>(cuGndCableVol->GetShape()))->GetDX();
3505 ylen = glueCP->GetDY() + ychip + glueFPC->GetDY() + ysig + flexKap->GetDY() + ygnd + sOBFPCCapacitorYHi / 2;
3506 TGeoBBox*
module = new TGeoBBox("OBModule", xlen, ylen, zlen);
3510 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
3511 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE$",
GetDetName()));
3512 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3514 TGeoVolume* glueFPCVol =
new TGeoVolume(
"GlueFPCVol", glueFPC, medGlue);
3515 glueFPCVol->SetLineColor(kBlack);
3516 glueFPCVol->SetFillColor(glueFPCVol->GetLineColor());
3517 glueFPCVol->SetFillStyle(4000);
3519 TGeoVolume* glueCPVol =
new TGeoVolume(
"GlueColdPlVol", glueCP, medGlue);
3520 glueCPVol->SetLineColor(kBlack);
3521 glueCPVol->SetFillColor(glueCPVol->GetLineColor());
3522 glueCPVol->SetFillStyle(4000);
3524 TGeoVolume* flexKapVol =
new TGeoVolume(
"FPCMidKapVol", flexKap, medKapton);
3525 flexKapVol->SetLineColor(kGreen);
3526 flexKapVol->SetFillColor(flexKapVol->GetLineColor());
3527 flexKapVol->SetFillStyle(4000);
3530 TGeoVolume* modVol =
new TGeoVolume(volName, module, medAir);
3531 modVol->SetVisibility(kTRUE);
3534 ypos = -
module->GetDY() + glueCP->GetDY();
3536 if (mBuildLevel < 3) {
3537 modVol->AddNode(glueCPVol, 1,
new TGeoTranslation(0, ypos, 0));
3540 xpos = xchip + xGap / 2;
3541 ypos += (ychip + glueCP->GetDY());
3547 for (Int_t k = 0; k < sOBChipsPerRow; k++)
3549 zpos =
module->GetDZ() - zchip - k * (2 * zchip + zGap);
3550 modVol->AddNode(chipVol, k,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 0, 180, 180)));
3551 mHierarchy[
kChip] += 1;
3554 for (Int_t k = 0; k < sOBChipsPerRow; k++)
3556 zpos = -
module->GetDZ() + zchip + k * (2 * zchip + zGap);
3557 modVol->AddNode(chipVol, k + sOBChipsPerRow,
new TGeoTranslation(-xpos, ypos, zpos));
3558 mHierarchy[
kChip] += 1;
3561 ypos += (ychip + glueFPC->GetDY());
3562 if (mBuildLevel < 3) {
3563 modVol->AddNode(glueFPCVol, 1,
new TGeoTranslation(0, ypos, 0));
3565 ypos += glueFPC->GetDY();
3567 if (mBuildLevel < 5) {
3569 modVol->AddNode(cuSignalCableVol, 1,
new TGeoTranslation(0, ypos, 0));
3571 ypos += (ysig + flexKap->GetDY());
3572 modVol->AddNode(flexKapVol, 1,
new TGeoTranslation(0, ypos, 0));
3574 ypos += (flexKap->GetDY() + ygnd);
3575 modVol->AddNode(cuGndCableVol, 1,
new TGeoTranslation(0, ypos, 0));
3580 createOBFPCCapacitors(modVol, xlen, zlen, ypos);
3586TGeoVolume* V3Layer::createOBFPCCuGnd(
const Double_t zcable,
const TGeoManager* mgr)
3603 Double_t xcable, ytot, ypos;
3606 xcable = sOBFlexCableXWidth / 2;
3607 ytot = sOBFPCSoldMaskThick + sOBFPCCopperThick;
3609 xcable *= sOBFPCCuAreaFracGnd;
3613 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3614 TGeoMedium* medCopper = mgr->GetMedium(Form(
"%s_COPPER$",
GetDetName()));
3616 TGeoVolume* soldmaskVol =
new TGeoVolume(
"FPCGndSolderMask", soldmask, medKapton);
3617 soldmaskVol->SetLineColor(kBlue);
3618 soldmaskVol->SetFillColor(kBlue);
3620 TGeoVolume* copperVol =
new TGeoVolume(
"FPCCopperGround", copper, medCopper);
3621 copperVol->SetLineColor(kCyan);
3622 copperVol->SetFillColor(kCyan);
3624 ypos = -soldmask->GetDY() + copper->GetDY();
3625 if (mBuildLevel < 1) {
3626 soldmaskVol->AddNode(copperVol, 1,
new TGeoTranslation(0, ypos, 0));
3632TGeoVolume* V3Layer::createOBFPCCuSig(
const Double_t zcable,
const TGeoManager* mgr)
3649 Double_t xcable, ytot, ypos;
3652 xcable = sOBFlexCableXWidth / 2;
3653 ytot = sOBFPCSoldMaskThick + sOBFPCCopperThick;
3655 xcable *= sOBFPCCuAreaFracSig;
3659 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3660 TGeoMedium* medCopper = mgr->GetMedium(Form(
"%s_COPPER$",
GetDetName()));
3662 TGeoVolume* soldmaskVol =
new TGeoVolume(
"FPCSigSolderMask", soldmask, medKapton);
3663 soldmaskVol->SetLineColor(kBlue);
3664 soldmaskVol->SetFillColor(kBlue);
3666 TGeoVolume* copperVol =
new TGeoVolume(
"FPCCopperSignal", copper, medCopper);
3667 copperVol->SetLineColor(kCyan);
3668 copperVol->SetFillColor(kCyan);
3670 ypos = soldmask->GetDY() - copper->GetDY();
3671 if (mBuildLevel < 1) {
3672 soldmaskVol->AddNode(copperVol, 1,
new TGeoTranslation(0, ypos, 0));
3678void V3Layer::createOBFPCCapacitors(TGeoVolume* modvol, Double_t xmodlen, Double_t zmodlen, Double_t yzero,
const TGeoManager* mgr)
3702 const Int_t nGroups = 10;
3703 const Double_t xyCapacitors[nGroups][2] = {
3704 {26.34 *
sMm, 14.02 *
sMm}, {7.16 *
sMm, 18.96 *
sMm}, {26.04 *
sMm, 10.34 *
sMm}, {7.91 *
sMm, 22.67 *
sMm}, {41.36 *
sMm, 18.78 *
sMm}, {41.56 *
sMm, 14.23 *
sMm}, {64.35 *
sMm, 13.54 *
sMm}, {25.95 *
sMm, 19.38 *
sMm}, {64.39 *
sMm, 10.45 *
sMm}, {22.21 *
sMm, 22.63 *
sMm}};
3706 const Double_t deltaYCapacitors = 30 *
sMm;
3708 const Int_t nCapacitors[nGroups] = {7, 7, 7, 7, 5, 5, 5, 7, 5, 7};
3710 const Double_t xyCapacitorSingle[8][2] = {
3711 {14.91 *
sMm, 18.78 *
sMm},
3712 {195.81 *
sMm, 18.78 *
sMm},
3713 {15.11 *
sMm, 14.23 *
sMm},
3714 {196.01 *
sMm, 14.23 *
sMm},
3715 {34.20 *
sMm, 13.54 *
sMm},
3716 {36.59 *
sMm, 10.33 *
sMm},
3717 {7.73 *
sMm, 13.54 *
sMm},
3718 {11.44 *
sMm, 12.13 *
sMm},
3722 Double_t xpos, ypos, zpos;
3725 TGeoVolume* capacitorOB;
3730 capacitorOB = mgr->GetVolume(
"OBFPCCapacitor");
3733 TGeoBBox* capacit =
new TGeoBBox(sOBFPCCapacitorXWid / 2, sOBFPCCapacitorYHi / 2, sOBFPCCapacitorZLen / 2);
3735 TGeoMedium* medCeramic = mgr->GetMedium(Form(
"%s_CERAMIC$",
GetDetName()));
3737 capacitorOB =
new TGeoVolume(
"OBFPCCapacitor", capacit, medCeramic);
3738 capacitorOB->SetLineColor(kBlack);
3739 capacitorOB->SetFillColor(kBlack);
3743 ypos = yzero + sOBFPCCapacitorYHi / 2;
3746 for (Int_t jgrp = 0; jgrp < nGroups; jgrp++) {
3747 xpos = xyCapacitors[jgrp][1] - xmodlen;
3748 for (Int_t jcap = 0; jcap < nCapacitors[jgrp]; jcap++) {
3749 zpos = xyCapacitors[jgrp][0] - zmodlen + jcap * deltaYCapacitors;
3751 modvol->AddNode(capacitorOB, idCapacitor,
new TGeoTranslation(xpos, ypos, zpos));
3756 for (Int_t jcap = 0; jcap < 8; jcap++) {
3757 xpos = xyCapacitorSingle[jcap][1] - xmodlen;
3758 zpos = xyCapacitorSingle[jcap][0] - zmodlen;
3760 modvol->AddNode(capacitorOB, idCapacitor,
new TGeoTranslation(xpos, ypos, zpos));
3766Double_t V3Layer::radiusOmTurboContainer()
3768 Double_t rr, delta,
z, lstav, rstav;
3770 if (mChipThickness > 89.) {
3774 rstav = mLayerRadius + 0.5 * mChipThickness;
3775 delta = (0.5 * mChipThickness) /
cosD(mStaveTilt);
3776 z = (0.5 * mChipThickness) *
tanD(mStaveTilt);
3779 lstav = (0.5 * mStaveWidth) -
z;
3781 if ((rr *
sinD(mStaveTilt) < lstav)) {
3782 return (rr *
cosD(mStaveTilt));
3790 if (mLayerNumber < sNumberOfInnerLayers) {
3793 mNumberOfModules = u;
3794 mNumberOfChips = sOBChipsPerRow;
3803 LOG(error) <<
"Not a Turbo layer";
3812 LOG(error) <<
"Not a Turbo layer";
3816TGeoXtru* V3Layer::createStaveSide(
const char*
name, Double_t dz, Double_t
alpha, Double_t beta, Double_t L, Double_t H,
3833 Double_t xv[nv], yv[nv];
3835 TGeoXtru* cfStavSide =
new TGeoXtru(2);
3836 cfStavSide->SetName(
name);
3838 Double_t theta = TMath::PiOver2() - beta;
3839 Double_t gamma = beta -
alpha;
3844 xv[2] = L * TMath::Sin(
alpha);
3845 yv[2] = -L * TMath::Cos(
alpha);
3846 xv[1] = xv[2] - H * TMath::Cos(
alpha);
3847 yv[1] = yv[2] - H * TMath::Sin(
alpha);
3849 yv[0] = yv[1] + TMath::Tan(theta) * xv[1];
3855 Double_t
m = -TMath::Tan(
alpha),
n = TMath::Tan(gamma);
3858 xv[1] = -L * TMath::Cos(2 *
alpha);
3859 yv[1] = L * TMath::Sin(2 *
alpha);
3860 xv[2] = xv[1] - H * TMath::Sin(2 *
alpha);
3861 yv[2] = yv[1] - H * TMath::Cos(2 *
alpha);
3866 xv[3] = (yv[4] -
n * xv[4]) / (
m -
n);
3870 cfStavSide->DefinePolygon(nv, xv, yv);
3871 cfStavSide->DefineSection(0, -dz);
3872 cfStavSide->DefineSection(1, dz);
3877TGeoCombiTrans* V3Layer::createCombiTrans(
const char*
name, Double_t dy, Double_t dz, Double_t dphi, Bool_t planeSym)
3879 TGeoTranslation
t1(dy *
cosD(90. + dphi), dy *
sinD(90. + dphi), dz);
3880 TGeoRotation r1(
"", 0., 0., dphi);
3881 TGeoRotation r2(
"", 90, 180, -90 - dphi);
3883 TGeoCombiTrans* combiTrans1 =
new TGeoCombiTrans(
name);
3884 combiTrans1->SetTranslation(
t1);
3886 combiTrans1->SetRotation(r1);
3888 combiTrans1->SetRotation(r2);
3893void V3Layer::addTranslationToCombiTrans(TGeoCombiTrans* ct, Double_t dx, Double_t dy, Double_t dz)
const
3896 const Double_t*
vect = ct->GetTranslation();
3897 Double_t newVect[3] = {
vect[0] + dx,
vect[1] + dy,
vect[2] + dz};
3898 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
static const Double_t sMm
Convert mm to TGeom's cm.
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 std::array< value_T, 7 > & vect
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"