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)
711 const Double_t xGroup1A = 4265.9 *
sMicron;
712 const Double_t zGroup1A[2] = {-7142.9 *
sMicron, 7594.1 *
sMicron};
713 const Double_t xGroup1B = 690.9 *
sMicron;
714 const Double_t zGroup1B = -7142.9 *
sMicron;
715 const Double_t xGroup2 = 6300.0 *
sMicron;
716 const Double_t zGroup2 = 15075.0 *
sMicron;
717 const Double_t xGroup3 = 5575.0 *
sMicron;
718 const Double_t zGroup3 = 131900.0 *
sMicron;
723 const Int_t nGroup5A = 5, nGroup5B = 4;
724 const Double_t xGroup5A[2] = {1400.0 *
sMicron, 1350.0 *
sMicron};
727 const Double_t xGroup5B = 1100.0 *
sMicron;
730 const Int_t nResist = 2;
731 const Double_t xResist = -7975.0 *
sMicron;
732 const Double_t zResist[nResist] = {114403.0 *
sMicron, 119222.0 *
sMicron};
734 Double_t xpos, ypos, zpos;
737 TGeoVolume *capacitorSmall, *capacitorLarge, *resistor;
744 capacitorSmall = mgr->GetVolume(
"IBFPCCapacitorSmall");
746 if (!capacitorSmall) {
747 TGeoBBox* capSmsh =
new TGeoBBox(sIBFlexCapacitor1XWid / 2, sIBFlexCapacitor1YHi / 2, sIBFlexCapacitor1ZLen / 2);
748 TGeoBBox* capLgsh =
new TGeoBBox(sIBFlexCapacitor22XWid / 2, sIBFlexCapacitor22YHi / 2, sIBFlexCapacitor22ZLen / 2);
750 TGeoMedium* medCeramic = mgr->GetMedium(Form(
"%s_CERAMIC$",
GetDetName()));
752 capacitorSmall =
new TGeoVolume(
"IBFPCCapacitorSmall", capSmsh, medCeramic);
753 capacitorSmall->SetLineColor(kBlack);
754 capacitorSmall->SetFillColor(kBlack);
756 capacitorLarge =
new TGeoVolume(
"IBFPCCapacitorLarge", capLgsh, medCeramic);
757 capacitorLarge->SetLineColor(kBlack);
758 capacitorLarge->SetFillColor(kBlack);
761 sIBFlexResistorYHi / 2,
762 sIBFlexResistorZLen / 2);
764 resistor =
new TGeoVolume(
"IBFPCResistor", ressh, medCeramic);
765 resistor->SetLineColor(kBlack);
766 resistor->SetFillColor(kBlack);
768 capacitorLarge = mgr->GetVolume(
"IBFPCCapacitorLarge");
769 resistor = mgr->GetVolume(
"IBFPCResistor");
773 ypos = yzero + sIBFlexCapacitor22YHi / 2;
776 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
777 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1A[0];
778 modvol->AddNode(capacitorLarge, 2 *
j + 1,
new TGeoTranslation(-xpos, ypos, -zpos));
779 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1A[1];
780 modvol->AddNode(capacitorLarge, 2 *
j + 2,
new TGeoTranslation(-xpos, ypos, -zpos));
783 nCapacitors = 2 * sIBChipsPerRow;
785 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
786 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup1B;
787 modvol->AddNode(capacitorLarge,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
790 nCapacitors += sIBChipsPerRow;
791 ypos = yzero + sIBFlexCapacitor1YHi / 2;
794 for (Int_t
j = 0;
j < sIBChipsPerRow - 1;
j++) {
795 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup2;
796 modvol->AddNode(capacitorSmall,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
799 nCapacitors += (sIBChipsPerRow - 1);
802 modvol->AddNode(capacitorSmall, 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
805 for (Int_t
j = 0;
j < sIBChipsPerRow;
j++) {
806 if (
j == (sIBChipsPerRow - 1)) {
811 zpos = -mIBModuleZLength / 2 +
j * (2 * zchip + sIBChipZGap) + zchip + zGroup4[
j];
812 modvol->AddNode(capacitorSmall,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
815 nCapacitors += sIBChipsPerRow;
816 ypos = yzero + sIBFlexCapacitor22YHi / 2;
817 for (Int_t
j = 0;
j < nGroup5A;
j++) {
824 modvol->AddNode(capacitorLarge,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
827 nCapacitors += nGroup5A;
829 for (Int_t
j = 0;
j < nGroup5B;
j++) {
831 modvol->AddNode(capacitorLarge,
j + 1 + nCapacitors,
new TGeoTranslation(-xpos, ypos, -zpos));
836 for (Int_t
j = 0;
j < nResist;
j++) {
838 modvol->AddNode(resistor,
j + 1,
new TGeoTranslation(-xpos, ypos, -zpos));
842TGeoVolume* V3Layer::createIBFPCAlGnd(
const Double_t xcable,
const Double_t zcable,
const TGeoManager* mgr)
853 ytot = sIBFlexCablePolyThick + sIBFlexCableAlThick;
858 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
859 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
861 TGeoVolume* coverlayVol =
new TGeoVolume(
"FPCCoverlayGround", coverlay, medKapton);
862 coverlayVol->SetLineColor(kBlue);
863 coverlayVol->SetFillColor(kBlue);
865 TGeoVolume* aluminumVol =
new TGeoVolume(
"FPCAluminumGround", aluminum, medAluminum);
866 aluminumVol->SetLineColor(kCyan);
867 aluminumVol->SetFillColor(kCyan);
869 ypos = coverlay->GetDY() - aluminum->GetDY();
870 if (mBuildLevel < 1) {
871 coverlayVol->AddNode(aluminumVol, 1,
new TGeoTranslation(0, ypos, 0));
877TGeoVolume* V3Layer::createIBFPCAlAnode(
const Double_t xcable,
const Double_t zcable,
const TGeoManager* mgr)
888 Double_t xtru[4], ytru[4];
891 ytot = sIBFlexCablePolyThick + sIBFlexCableAlThick;
895 xtru[0] = -sIBFPCAlAnodeWidth2 / 2;
897 xtru[1] = sIBFPCAlAnodeWidth2 / 2;
899 xtru[2] = xtru[0] + sIBFPCAlAnodeWidth1;
904 TGeoXtru* aluminum =
new TGeoXtru(2);
905 aluminum->DefinePolygon(4, xtru, ytru);
906 aluminum->DefineSection(0, -sIBFlexCableAlThick / 2);
907 aluminum->DefineSection(1, sIBFlexCableAlThick / 2);
910 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
911 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
913 TGeoVolume* coverlayVol =
new TGeoVolume(
"FPCCoverlayAnode", coverlay, medKapton);
914 coverlayVol->SetLineColor(kBlue);
915 coverlayVol->SetFillColor(kBlue);
917 TGeoVolume* aluminumVol =
new TGeoVolume(
"FPCAluminumAnode", aluminum, medAluminum);
918 aluminumVol->SetLineColor(kCyan);
919 aluminumVol->SetFillColor(kCyan);
921 ypos = -coverlay->GetDY() + aluminum->GetZ(1);
922 if (mBuildLevel < 1) {
923 coverlayVol->AddNode(aluminumVol, 1,
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", 0, -90, 0)));
929TGeoVolume* V3Layer::createStaveStructInnerB(
const TGeoManager* mgr)
940 TGeoVolume* mechStavVol =
nullptr;
942 switch (mStaveModel) {
944 mechStavVol = createStaveModelInnerBDummy(mgr);
951 LOG(fatal) <<
"Stave model " << mStaveModel <<
" obsolete and no longer supported";
954 mechStavVol = createStaveModelInnerB4(mgr);
957 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
963TGeoVolume* V3Layer::createStaveModelInnerBDummy(
const TGeoManager*)
const
979TGeoVolume* V3Layer::createStaveModelInnerB4(
const TGeoManager* mgr)
1001 const Double_t xstave = sIBColdPlateWidth / 2;
1003 Double_t layerHeight = 0.;
1005 Double_t rPipeMin = sIBCoolPipeInnerD / 2;
1006 Double_t rPipeMax = rPipeMin + sIBCoolPipeThick;
1008 const Int_t nv = 16;
1009 Double_t xv[nv], yv[nv];
1010 Double_t xlen, ylen, zlen, ztot;
1011 Double_t xpos, ypos, zpos, ylay, yposPipe;
1012 Double_t beta, gamma, theta;
1015 ztot = sIBColdPlateZLen / 2;
1023 TGeoTube* pipe =
new TGeoTube(rPipeMin, rPipeMax, sIBCoolPipeZLen / 2);
1025 TGeoTube* water =
new TGeoTube(0., rPipeMin, sIBCoolPipeZLen / 2);
1027 TGeoTubeSeg* cpaptub =
new TGeoTubeSeg(rPipeMax, rPipeMax + sIBCarbonPaperThick, sIBCarbonPaperZLen / 2, 0, 180);
1029 TGeoBBox* cpapvert =
new TGeoBBox(sIBCarbonPaperThick / 2, pipe->GetRmax() / 2, sIBCarbonPaperZLen / 2);
1031 xlen = sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick;
1032 TGeoBBox* cpapmid =
new TGeoBBox(xlen, sIBCarbonPaperThick / 2, sIBCarbonPaperZLen / 2);
1034 xlen = sIBCarbonPaperWidth / 2 - sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick;
1035 TGeoBBox* cpaplr =
new TGeoBBox(xlen / 2, sIBCarbonPaperThick / 2, sIBCarbonPaperZLen / 2);
1037 TGeoTubeSeg* fleecpipe =
new TGeoTubeSeg(cpaptub->GetRmax(), cpaptub->GetRmax() + sIBCarbonFleeceThick, ztot, 0, 180);
1039 TGeoBBox* fleecvert =
new TGeoBBox(sIBCarbonFleeceThick / 2, (pipe->GetRmax() - sIBCarbonPaperThick) / 2, ztot);
1041 xlen = sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick - sIBCarbonFleeceThick;
1044 xlen = xstave - sIBCoolPipeXDist / 2 - pipe->GetRmax() - sIBCarbonPaperThick - sIBCarbonFleeceThick;
1045 TGeoBBox* fleeclr =
new TGeoBBox(xlen / 2, sIBCarbonFleeceThick / 2, ztot);
1048 layerHeight = 2 * (glue->GetDY() + fleecbot->GetDY() + cfplate->GetDY() + cpaplr->GetDY() + fleeclr->GetDY());
1051 TGeoTrd1* topv =
new TGeoTrd1(sIBTopVertexWidth1 / 2, sIBTopVertexWidth2 / 2, ztot, sIBTopVertexHeight / 2);
1055 xv[1] = sIBSideVertexWidth;
1058 yv[2] = sIBSideVertexHeight;
1060 TGeoXtru* sidev =
new TGeoXtru(2);
1061 sidev->DefinePolygon(3, xv, yv);
1062 sidev->DefineSection(0, -ztot);
1063 sidev->DefineSection(1, ztot);
1065 xv[0] = sIBEndSupportXUp / 2;
1066 yv[0] = sIBStaveHeight - sIBEndSupportThick;
1067 xv[1] = xstave - sIBSideVertexWidth;
1068 yv[1] = layerHeight + sIBSideVertexHeight;
1070 yv[2] = layerHeight;
1073 xv[4] = xstave + sIBEndSupportThick;
1077 xv[6] = xv[1] + sIBEndSupportThick *
sinD(sIBEndSupportOpenPhi / 2);
1078 yv[6] = yv[1] + sIBEndSupportThick *
cosD(sIBEndSupportOpenPhi / 2);
1080 yv[7] = sIBStaveHeight;
1081 for (Int_t
i = 0;
i < nv / 2;
i++) {
1082 xv[8 +
i] = -xv[7 -
i];
1083 yv[8 +
i] = yv[7 -
i];
1086 TGeoXtru* endsupp =
new TGeoXtru(2);
1087 endsupp->DefinePolygon(16, xv, yv);
1088 endsupp->DefineSection(0, -sIBEndSupportZLen / 2);
1089 endsupp->DefineSection(1, sIBEndSupportZLen / 2);
1091 xlen = TMath::Sqrt((yv[7] - yv[6]) * (yv[7] - yv[6]) + (xv[7] - xv[6]) * (xv[7] - xv[6]) +
1092 sIBTopFilamentInterZ * sIBTopFilamentInterZ / 4);
1093 theta = TMath::ATan((yv[7] - yv[6]) / (xv[7] - xv[6])) * TMath::RadToDeg();
1094 TGeoBBox* topfil =
new TGeoBBox(xlen / 2, sIBTopFilamentSide / 2, sIBTopFilamentSide / 2);
1097 xv[0] = xstave + sIBTopFilamentSide;
1100 yv[1] = layerHeight + sIBSideVertexHeight + topfil->GetDZ();
1102 xv[2] = sIBEndSupportXUp / 2;
1103 yv[2] = sIBStaveHeight + sIBTopFilamentSide /
sinD(-theta) - 0.01;
1104 for (Int_t
i = 0;
i < 3;
i++) {
1105 xv[3 +
i] = -xv[2 -
i];
1106 yv[3 +
i] = yv[2 -
i];
1109 TGeoXtru* mechStruct =
new TGeoXtru(2);
1110 mechStruct->DefinePolygon(6, xv, yv);
1111 mechStruct->SetName(
"mechStruct");
1112 mechStruct->DefineSection(0, -ztot);
1113 mechStruct->DefineSection(1, ztot);
1116 zlen = sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut;
1117 TGeoBBox* connAside =
new TGeoBBox(
"connAsideIB", sIBConnectorXWidth / 2, sIBConnBodyYHeight / 2, zlen / 2);
1119 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1120 TGeoBBox* connCside =
new TGeoBBox(
"connCsideIB", sIBConnectorXWidth / 2, sIBConnBodyYHeight / 2, zlen / 2);
1123 yposPipe = 2 * glue->GetDY() + 2 * fleecbot->GetDY() + 2 * cfplate->GetDY() + pipe->GetRmax();
1124 ypos = connAside->GetDY() - sIBConnTubesYPos + yposPipe;
1125 zpos = ztot + connAside->GetDZ();
1126 TGeoTranslation* transAside =
new TGeoTranslation(
"transAsideIB", 0, ypos, zpos);
1127 transAside->RegisterYourself();
1129 ypos = connCside->GetDY() - sIBConnTubesYPos + yposPipe;
1130 zpos = ztot + connCside->GetDZ();
1131 TGeoTranslation* transCside =
new TGeoTranslation(
"transCsideIB", 0, ypos, -zpos);
1132 transCside->RegisterYourself();
1134 TGeoCompositeShape* mechStavSh =
1135 new TGeoCompositeShape(
"mechStruct+connAsideIB:transAsideIB+connCsideIB:transCsideIB");
1139 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1140 TGeoMedium* medWater = mgr->GetMedium(Form(
"%s_WATER$",
GetDetName()));
1141 TGeoMedium* medM55J6K = mgr->GetMedium(Form(
"%s_M55J6K$",
GetDetName()));
1142 TGeoMedium* medM60J3K = mgr->GetMedium(Form(
"%s_M60J3K$",
GetDetName()));
1143 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
1144 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE$",
GetDetName()));
1145 TGeoMedium* medK13D2U2k = mgr->GetMedium(Form(
"%s_K13D2U2k$",
GetDetName()));
1146 TGeoMedium* medFGS003 = mgr->GetMedium(Form(
"%s_FGS003$",
GetDetName()));
1147 TGeoMedium* medCarbonFleece = mgr->GetMedium(Form(
"%s_CarbonFleece$",
GetDetName()));
1149 const Int_t nameLen = 30;
1150 char volname[nameLen];
1152 TGeoVolume* mechStavVol =
new TGeoVolume(volname, mechStavSh, medAir);
1153 mechStavVol->SetLineColor(12);
1154 mechStavVol->SetFillColor(12);
1155 mechStavVol->SetVisibility(kFALSE);
1157 TGeoVolume* glueVol =
new TGeoVolume(
"Glue", glue, medGlue);
1158 glueVol->SetLineColor(kBlack);
1159 glueVol->SetFillColor(kBlack);
1161 TGeoVolume* fleecbotVol =
new TGeoVolume(
"CarbonFleeceBottom", fleecbot, medCarbonFleece);
1162 fleecbotVol->SetFillColor(kViolet);
1163 fleecbotVol->SetLineColor(kViolet);
1165 TGeoVolume* cfplateVol =
new TGeoVolume(
"CFPlate", cfplate, medK13D2U2k);
1166 cfplateVol->SetFillColor(5);
1167 cfplateVol->SetLineColor(5);
1169 TGeoVolume* pipeVol =
new TGeoVolume(
"PolyimidePipe", pipe, medKapton);
1170 pipeVol->SetFillColor(35);
1171 pipeVol->SetLineColor(35);
1173 TGeoVolume* waterVol =
new TGeoVolume(
"Water", water, medWater);
1174 waterVol->SetFillColor(4);
1175 waterVol->SetLineColor(4);
1177 TGeoVolume* cpaptubVol =
new TGeoVolume(
"ThermasolPipeCover", cpaptub, medFGS003);
1178 cpaptubVol->SetFillColor(2);
1179 cpaptubVol->SetLineColor(2);
1181 TGeoVolume* cpapvertVol =
new TGeoVolume(
"ThermasolVertical", cpapvert, medFGS003);
1182 cpapvertVol->SetFillColor(2);
1183 cpapvertVol->SetLineColor(2);
1185 TGeoVolume* cpapmidVol =
new TGeoVolume(
"ThermasolMiddle", cpapmid, medFGS003);
1186 cpapmidVol->SetFillColor(2);
1187 cpapmidVol->SetLineColor(2);
1189 TGeoVolume* cpaplrVol =
new TGeoVolume(
"ThermasolLeftRight", cpaplr, medFGS003);
1190 cpaplrVol->SetFillColor(2);
1191 cpaplrVol->SetLineColor(2);
1193 TGeoVolume* fleecpipeVol =
new TGeoVolume(
"CarbonFleecePipeCover", fleecpipe, medCarbonFleece);
1194 fleecpipeVol->SetFillColor(28);
1195 fleecpipeVol->SetLineColor(28);
1197 TGeoVolume* fleecvertVol =
new TGeoVolume(
"CarbonFleeceVertical", fleecvert, medCarbonFleece);
1198 fleecvertVol->SetFillColor(28);
1199 fleecvertVol->SetLineColor(28);
1201 TGeoVolume* fleecmidVol =
new TGeoVolume(
"CarbonFleeceMiddle", fleecmid, medCarbonFleece);
1202 fleecmidVol->SetFillColor(28);
1203 fleecmidVol->SetLineColor(28);
1205 TGeoVolume* fleeclrVol =
new TGeoVolume(
"CarbonFleeceLeftRight", fleeclr, medCarbonFleece);
1206 fleeclrVol->SetFillColor(28);
1207 fleeclrVol->SetLineColor(28);
1209 TGeoVolume* topvVol =
new TGeoVolume(
"TopVertex", topv, medM55J6K);
1210 topvVol->SetFillColor(12);
1211 topvVol->SetLineColor(12);
1213 TGeoVolume* sidevVol =
new TGeoVolume(
"SideVertex", sidev, medM55J6K);
1214 sidevVol->SetFillColor(12);
1215 sidevVol->SetLineColor(12);
1217 TGeoVolume* topfilVol =
new TGeoVolume(
"TopFilament", topfil, medM60J3K);
1218 topfilVol->SetFillColor(12);
1219 topfilVol->SetLineColor(12);
1221 TGeoVolume* endsuppVol =
new TGeoVolume(
"EndSupport", endsupp, medM55J6K);
1222 endsuppVol->SetFillColor(12);
1223 endsuppVol->SetLineColor(12);
1226 ypos = glue->GetDY();
1227 if (mBuildLevel < 2) {
1228 mechStavVol->AddNode(glueVol, 1,
new TGeoTranslation(0, ypos, 0));
1231 ypos += (glue->GetDY() + fleecbot->GetDY());
1232 if (mBuildLevel < 5) {
1233 mechStavVol->AddNode(fleecbotVol, 1,
new TGeoTranslation(0, ypos, 0));
1236 ypos += (fleecbot->GetDY() + cfplate->GetDY());
1237 if (mBuildLevel < 5) {
1238 mechStavVol->AddNode(cfplateVol, 1,
new TGeoTranslation(0, ypos, 0));
1241 ylay = ypos + cfplate->GetDY();
1243 xpos = sIBCoolPipeXDist / 2;
1244 ypos = ylay + pipe->GetRmax();
1246 if (mBuildLevel < 4) {
1247 mechStavVol->AddNode(pipeVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1248 mechStavVol->AddNode(pipeVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1251 if (mBuildLevel < 3) {
1252 mechStavVol->AddNode(waterVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1253 mechStavVol->AddNode(waterVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1256 if (mBuildLevel < 5) {
1257 mechStavVol->AddNode(cpaptubVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1258 mechStavVol->AddNode(cpaptubVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1260 mechStavVol->AddNode(fleecpipeVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1261 mechStavVol->AddNode(fleecpipeVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1263 xpos = sIBCoolPipeXDist / 2 - pipe->GetRmax() - cpapvert->GetDX();
1264 ypos = ylay + cpapvert->GetDY();
1265 mechStavVol->AddNode(cpapvertVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1266 mechStavVol->AddNode(cpapvertVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1268 xpos = sIBCoolPipeXDist / 2 + pipe->GetRmax() + cpapvert->GetDX();
1269 mechStavVol->AddNode(cpapvertVol, 3,
new TGeoTranslation(-xpos, ypos, 0));
1270 mechStavVol->AddNode(cpapvertVol, 4,
new TGeoTranslation(xpos, ypos, 0));
1272 ypos = ylay + sIBCarbonPaperThick / 2;
1273 mechStavVol->AddNode(cpapmidVol, 1,
new TGeoTranslation(0, ypos, 0));
1275 xpos = xstave - cpaplr->GetDX();
1276 mechStavVol->AddNode(cpaplrVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1277 mechStavVol->AddNode(cpaplrVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1279 xpos = sIBCoolPipeXDist / 2 - pipe->GetRmax() - 2 * cpapvert->GetDX() - fleecvert->GetDX();
1280 ypos = ylay + sIBCarbonPaperThick + fleecvert->GetDY();
1281 mechStavVol->AddNode(fleecvertVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1282 mechStavVol->AddNode(fleecvertVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1284 xpos = sIBCoolPipeXDist / 2 + pipe->GetRmax() + 2 * cpapvert->GetDX() + fleecvert->GetDX();
1285 mechStavVol->AddNode(fleecvertVol, 3,
new TGeoTranslation(-xpos, ypos, 0));
1286 mechStavVol->AddNode(fleecvertVol, 4,
new TGeoTranslation(xpos, ypos, 0));
1288 ypos = ylay + sIBCarbonPaperThick + sIBCarbonFleeceThick / 2;
1289 mechStavVol->AddNode(fleecmidVol, 1,
new TGeoTranslation(0, ypos, 0));
1291 xpos = xstave - fleeclr->GetDX();
1292 mechStavVol->AddNode(fleeclrVol, 1,
new TGeoTranslation(-xpos, ypos, 0));
1293 mechStavVol->AddNode(fleeclrVol, 2,
new TGeoTranslation(xpos, ypos, 0));
1296 ylay += (sIBCarbonPaperThick + sIBCarbonFleeceThick);
1298 if (mBuildLevel < 5) {
1299 ypos = sIBStaveHeight - sIBEndSupportThick - topv->GetDz();
1300 mechStavVol->AddNode(topvVol, 1,
new TGeoCombiTrans(0, ypos, 0,
new TGeoRotation(
"", 0, -90, 0)));
1302 xpos = xstave - sidev->GetX(1);
1304 mechStavVol->AddNode(sidevVol, 1,
new TGeoTranslation(xpos, ypos, 0));
1305 mechStavVol->AddNode(sidevVol, 2,
new TGeoCombiTrans(-xpos, ypos, 0,
new TGeoRotation(
"", 90, 180, -90)));
1307 zpos = ztot - endsupp->GetZ(1);
1308 mechStavVol->AddNode(endsuppVol, 1,
new TGeoTranslation(0, 0, zpos));
1309 mechStavVol->AddNode(endsuppVol, 2,
new TGeoTranslation(0, 0, -zpos));
1311 gamma = 180. - sIBTopFilamentAlpha;
1312 xpos = xstave / 2 + topfil->GetDZ();
1313 ypos = (endsupp->GetY(7) + endsupp->GetY(6)) / 2;
1314 Int_t nFilamentGroups = (Int_t)(2 * (ztot - sIBEndSupportZLen) / sIBTopFilamentInterZ);
1316 for (
int i = 0;
i < nFilamentGroups;
i++) {
1318 zpos = -(ztot - sIBEndSupportZLen) +
i * sIBTopFilamentInterZ + sIBTopFilamentInterZ / 4;
1319 mechStavVol->AddNode(topfilVol,
i * 4 + 1,
1320 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 + theta, gamma / 2, -90)));
1322 mechStavVol->AddNode(topfilVol,
i * 4 + 2,
1323 new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 - theta, -gamma / 2, -90)));
1325 zpos += sIBTopFilamentInterZ / 2;
1326 mechStavVol->AddNode(topfilVol,
i * 4 + 3,
1327 new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 + theta, -gamma / 2, -90)));
1329 mechStavVol->AddNode(topfilVol,
i * 4 + 4,
1330 new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 - theta, gamma / 2, -90)));
1335 TGeoVolume *connectorASide, *connectorCSide;
1339 connectorASide = mgr->GetVolume(
"IBConnectorASide");
1341 if (!connectorASide) {
1342 createIBConnectors(mgr);
1343 connectorASide = mgr->GetVolume(
"IBConnectorASide");
1345 connectorCSide = mgr->GetVolume(
"IBConnectorCSide");
1347 ypos = (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDY() - sIBConnTubesYPos +
1349 zpos = ztot + (sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut) / 2;
1350 mechStavVol->AddNode(connectorASide, 1,
new TGeoTranslation(0, ypos, zpos));
1352 zpos = ztot + (sIBConnectBlockZLen - sIBConnTailZLen) / 2;
1353 mechStavVol->AddNode(connectorCSide, 1,
new TGeoCombiTrans(0, ypos, -zpos,
new TGeoRotation(
"", 90, 180, -90)));
1359void V3Layer::createIBConnectors(
const TGeoManager* mgr)
1368 createIBConnectorsASide(mgr);
1369 createIBConnectorsCSide(mgr);
1372void V3Layer::createIBConnectorsASide(
const TGeoManager* mgr)
1385 Double_t xv[nv], yv[nv];
1386 Double_t xlen, ylen, zlen;
1387 Double_t xpos, ypos, zpos;
1390 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1391 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
1392 TGeoMedium* medInox304 = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
1399 xlen = sIBConnectorXWidth;
1400 ylen = sIBConnBodyYHeight;
1401 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1402 TGeoBBox* connBody =
new TGeoBBox(
"connBodyA", xlen / 2, ylen / 2, zlen / 2);
1404 TGeoTube* connRoundHole =
new TGeoTube(
"connRoundHoleA", 0., sIBConnRoundHoleD / 2, sIBConnBodyYHeight / 1.5);
1406 zpos = -connBody->GetDZ() + sIBConnRoundHoleZ;
1407 TGeoCombiTrans* connRoundHoleTrans =
1408 new TGeoCombiTrans(
"roundHoleTransA", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1409 connRoundHoleTrans->RegisterYourself();
1411 xlen = sIBConnSquareHoleX / 2;
1412 ylen = sIBConnBodyYHeight / 1.5;
1413 zlen = sIBConnSquareHoleZ / 2;
1414 TGeoBBox* connSquareHole =
new TGeoBBox(
"connSquareHoleA", xlen, ylen, zlen);
1416 zpos = -connBody->GetDZ() + sIBConnSquareHoleZPos;
1417 TGeoTranslation* connSquareHoleTrans =
new TGeoTranslation(
"squareHoleTransA", 0, 0, zpos);
1418 connSquareHoleTrans->RegisterYourself();
1420 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2HoleA", 0, sIBConnTubeHole2D / 2, connBody->GetDZ());
1422 xpos = sIBConnTubesXDist / 2;
1423 ypos = -connBody->GetDY() + sIBConnTubesYPos;
1425 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"tubes2Trans1A", -xpos, ypos, 0);
1426 connTubes2Trans1->RegisterYourself();
1428 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"tubes2Trans2A", xpos, ypos, 0);
1429 connTubes2Trans2->RegisterYourself();
1431 zlen = sIBConnTubeHole1ZLen - sIBConnTailZLen;
1432 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3HoleA", 0, sIBConnTubeHole1D / 2, zlen);
1434 zpos = connBody->GetDZ();
1435 TGeoTranslation* connTubes3Trans1 =
new TGeoTranslation(
"tubes3Trans1A", -xpos, ypos, -zpos);
1436 connTubes3Trans1->RegisterYourself();
1437 TGeoTranslation* connTubes3Trans2 =
new TGeoTranslation(
"tubes3Trans2A", xpos, ypos, -zpos);
1438 connTubes3Trans2->RegisterYourself();
1440 zlen = sIBConnTubeHole1ZLen2;
1441 TGeoTube* connFitHole =
new TGeoTube(
"fitHoleA", 0, sIBConnectAFitExtD / 2, zlen);
1443 TGeoTranslation* connFitHoleTrans1 =
new TGeoTranslation(
"fitTrans1A", -xpos, ypos, zpos);
1444 connFitHoleTrans1->RegisterYourself();
1445 TGeoTranslation* connFitHoleTrans2 =
new TGeoTranslation(
"fitTrans2A", xpos, ypos, zpos);
1446 connFitHoleTrans2->RegisterYourself();
1448 zlen = sIBConnSideHole1XWid / 1.5;
1449 TGeoTube* sideHole1 =
new TGeoTube(
"sideHole1A", 0, sIBConnSideHole1D / 2, zlen);
1451 xpos = connBody->GetDX() - sIBConnSideHole1XWid + sideHole1->GetDz();
1452 ypos = connBody->GetDY() - sIBConnSideHole1YPos;
1453 zpos = -connBody->GetDZ() + (sIBConnSideHole1ZPos - sIBConnTailZLen);
1454 TGeoCombiTrans* connSideHole1Trans =
1455 new TGeoCombiTrans(
"sideHole1TransA", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1456 connSideHole1Trans->RegisterYourself();
1459 new TGeoBBox(
"sideHole2AB", sIBConnSideHole2XWid, sIBConnSideHole2YWid / 2, sIBConnSideHole2ZWid / 2);
1461 xpos = -connBody->GetDX();
1462 ypos = connBody->GetDY() - sIBConnSideHole2YPos;
1463 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + sideHole2Box->GetDZ();
1464 TGeoTranslation* sideHole2BTrans =
new TGeoTranslation(
"sideHole2TransBA", xpos, ypos, zpos);
1465 sideHole2BTrans->RegisterYourself();
1467 TGeoTubeSeg* sideHole2TubeSeg =
1468 new TGeoTubeSeg(
"sideHole2ATS", 0, sIBConnSideHole2YWid / 2, sIBConnSideHole2XWid, 0, 180);
1470 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen);
1471 TGeoCombiTrans* sideHole2TSTrans1 =
1472 new TGeoCombiTrans(
"sideHole2TSTrans1A", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 0));
1473 sideHole2TSTrans1->RegisterYourself();
1475 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + 2 * sideHole2Box->GetDZ();
1476 TGeoCombiTrans* sideHole2TSTrans2 =
1477 new TGeoCombiTrans(
"sideHole2TSTrans2A", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1478 sideHole2TSTrans2->RegisterYourself();
1480 TGeoCompositeShape* connBodySh =
new TGeoCompositeShape(
1481 "connBodyA-connRoundHoleA:roundHoleTransA-connSquareHoleA:squareHoleTransA-tube2HoleA:tubes2Trans1A-tube2HoleA:"
1482 "tubes2Trans2A-fitHoleA:fitTrans1A-fitHoleA:fitTrans2A-tube3HoleA:tubes3Trans1A-tube3HoleA:tubes3Trans2A-"
1483 "sideHole1A:sideHole1TransA-sideHole2AB:sideHole2TransBA-sideHole2ATS:sideHole2TSTrans1A-sideHole2ATS:"
1484 "sideHole2TSTrans2A");
1486 TGeoVolume* connBlockBody =
new TGeoVolume(
"IBConnectorBlockBodyASide", connBodySh, medPEEK);
1487 connBlockBody->SetFillColor(42);
1488 connBlockBody->SetLineColor(42);
1491 xv[0] = sIBConnectorXWidth / 2;
1492 yv[0] = sIBConnTailYShift;
1494 yv[1] = sIBConnTailYMid;
1495 xv[2] = xv[1] - (sIBConnectorYTot - sIBConnTailYMid) /
tanD(90 - sIBConnTailOpenPhi / 2);
1496 yv[2] = sIBConnectorYTot;
1498 for (Int_t
i = 0;
i < 3;
i++) {
1499 xv[3 +
i] = -xv[2 -
i];
1500 yv[3 +
i] = yv[2 -
i];
1503 TGeoXtru* connTail =
new TGeoXtru(2);
1504 connTail->SetName(
"connTailA");
1505 connTail->DefinePolygon(6, xv, yv);
1506 connTail->DefineSection(0, 0);
1507 connTail->DefineSection(1, sIBConnTailZLen);
1509 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1HoleA", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 1.5);
1511 xpos = sIBConnTubesXDist / 2;
1512 ypos = sIBConnTubesYPos;
1513 zpos = connTail->GetZ(1) / 2;
1514 TGeoTranslation* connTubes1Trans1 =
new TGeoTranslation(
"tubes1Trans1A", -xpos, ypos, zpos);
1515 connTubes1Trans1->RegisterYourself();
1516 TGeoTranslation* connTubes1Trans2 =
new TGeoTranslation(
"tubes1Trans2A", xpos, ypos, zpos);
1517 connTubes1Trans2->RegisterYourself();
1519 TGeoCompositeShape* connTailSh =
1520 new TGeoCompositeShape(
"connTailA-tube1HoleA:tubes1Trans1A-tube1HoleA:tubes1Trans2A");
1522 TGeoVolume* connBlockTail =
new TGeoVolume(
"IBConnectorBlockTailASide", connTailSh, medPEEK);
1523 connBlockTail->SetFillColor(42);
1524 connBlockTail->SetLineColor(42);
1527 TGeoTube* connFitSh =
new TGeoTube(sIBConnectAFitIntD / 2, sIBConnectAFitExtD / 2, sIBConnectAFitZLen / 2);
1529 TGeoVolume* connFit =
new TGeoVolume(
"IBConnectorFitting", connFitSh, medInox304);
1530 connFit->SetFillColor(kGray);
1531 connFit->SetLineColor(kGray);
1535 xlen = sIBConnectorXWidth;
1536 ylen = sIBConnBodyYHeight;
1537 zlen = sIBConnectBlockZLen - sIBConnTailZLen + sIBConnectAFitZOut;
1539 TGeoBBox* connBox =
new TGeoBBox(
"connBoxA", xlen / 2, ylen / 2, zlen / 2);
1541 ypos = -sIBConnectorYTot / 2 + connBox->GetDY();
1542 TGeoTranslation* transBodyA =
new TGeoTranslation(
"transBodyA", 0, ypos, 0);
1543 transBodyA->RegisterYourself();
1545 ypos = -sIBConnectorYTot / 2;
1546 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1547 TGeoTranslation* transTailA =
new TGeoTranslation(
"transTailA", 0, ypos, zpos);
1548 transTailA->RegisterYourself();
1550 TGeoTube* connTubeHollow =
new TGeoTube(
"tubeHollowA", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 2);
1552 xpos = sIBConnTubesXDist / 2;
1553 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1554 zpos = -connBox->GetDZ() - connTail->GetZ(1) + sIBConnTubeHole1ZLen / 2;
1555 TGeoTranslation* connTubeHollTrans1 =
new TGeoTranslation(
"tubeHollTrans1A", -xpos, ypos, zpos);
1556 connTubeHollTrans1->RegisterYourself();
1557 TGeoTranslation* connTubeHollTrans2 =
new TGeoTranslation(
"tubeHollTrans2A", xpos, ypos, zpos);
1558 connTubeHollTrans2->RegisterYourself();
1560 zpos = -connBox->GetDZ() + connTubeHole2->GetDz() - 2 * connFitHole->GetDz();
1561 TGeoTranslation* connTubes2Trans1Body =
new TGeoTranslation(
"tubes2Trans1BA", -xpos, ypos, zpos);
1562 connTubes2Trans1Body->RegisterYourself();
1563 TGeoTranslation* connTubes2Trans2Body =
new TGeoTranslation(
"tubes2Trans2BA", xpos, ypos, zpos);
1564 connTubes2Trans2Body->RegisterYourself();
1566 TGeoCompositeShape* connBoxSh =
new TGeoCompositeShape(
1567 "connBoxA:transBodyA-tube2HoleA:tubes2Trans1BA-tube2HoleA:tubes2Trans2BA+connTailA:transTailA-tubeHollowA:tubeHollTrans1A-"
1568 "tubeHollowA:tubeHollTrans2A");
1570 TGeoVolume* connBoxASide =
new TGeoVolume(
"IBConnectorASide", connBoxSh, medAir);
1574 ypos = -sIBConnectorYTot / 2;
1575 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1576 connBoxASide->AddNode(connBlockTail, 1,
new TGeoTranslation(0, ypos, zpos));
1578 ypos = -sIBConnectorYTot / 2 + connBody->GetDY();
1579 zpos = -connBox->GetDZ() + connBody->GetDZ();
1580 connBoxASide->AddNode(connBlockBody, 1,
new TGeoTranslation(0, ypos, zpos));
1582 xpos = sIBConnTubesXDist / 2;
1583 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1584 zpos = connBox->GetDZ() - connFitSh->GetDz();
1585 connBoxASide->AddNode(connFit, 1,
new TGeoTranslation(xpos, ypos, zpos));
1586 connBoxASide->AddNode(connFit, 2,
new TGeoTranslation(-xpos, ypos, zpos));
1589void V3Layer::createIBConnectorsCSide(
const TGeoManager* mgr)
1602 Double_t xv[nv], yv[nv];
1603 Double_t xlen, ylen, zlen;
1604 Double_t xpos, ypos, zpos;
1607 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
1608 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
1615 xlen = sIBConnectorXWidth;
1616 ylen = sIBConnBodyYHeight;
1617 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1618 TGeoBBox* connBody =
new TGeoBBox(
"connBodyC", xlen / 2, ylen / 2, zlen / 2);
1620 TGeoTube* connRoundHole =
new TGeoTube(
"connRoundHoleC", 0., sIBConnRoundHoleD / 2, sIBConnBodyYHeight / 1.5);
1622 zpos = -connBody->GetDZ() + sIBConnRoundHoleZ;
1623 TGeoCombiTrans* connRoundHoleTrans =
1624 new TGeoCombiTrans(
"roundHoleTransC", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1625 connRoundHoleTrans->RegisterYourself();
1627 TGeoTube* connInsertHole =
new TGeoTube(
"connInsertHoleC", 0, sIBConnInsertHoleD / 2, sIBConnBodyYHeight / 1.5);
1629 zpos = -connBody->GetDZ() + sIBConnInsertHoleZPos;
1630 TGeoCombiTrans* connInsertHoleTrans =
1631 new TGeoCombiTrans(
"insertHoleTransC", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
1632 connInsertHoleTrans->RegisterYourself();
1634 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2HoleC", 0, sIBConnTubeHole2D / 2, connBody->GetDZ());
1636 xpos = sIBConnTubesXDist / 2;
1637 ypos = -connBody->GetDY() + sIBConnTubesYPos;
1638 zpos = sIBConnectBlockZLen - sIBConnTubeHole3ZPos;
1639 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"tubes2Trans1C", -xpos, ypos, -zpos);
1640 connTubes2Trans1->RegisterYourself();
1641 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"tubes2Trans2C", xpos, ypos, -zpos);
1642 connTubes2Trans2->RegisterYourself();
1644 zlen = sIBConnectorXWidth;
1645 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3HoleC", 0, sIBConnTubeHole2D / 2, zlen / 2);
1647 xpos = sIBConnTubeHole3XPos;
1648 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1649 TGeoCombiTrans* connTubes3Trans =
1650 new TGeoCombiTrans(
"tubes3TransC", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90));
1651 connTubes3Trans->RegisterYourself();
1653 zlen = sIBConnTubeHole1ZLen - sIBConnTailZLen;
1654 TGeoTube* connTubeHole4 =
new TGeoTube(
"tube4HoleC", 0, sIBConnTubeHole1D / 2, zlen);
1656 xpos = sIBConnTubesXDist / 2;
1657 zpos = connBody->GetDZ();
1658 TGeoTranslation* connTubes4Trans1 =
new TGeoTranslation(
"tubes4Trans1C", -xpos, ypos, -zpos);
1659 connTubes4Trans1->RegisterYourself();
1660 TGeoTranslation* connTubes4Trans2 =
new TGeoTranslation(
"tubes4Trans2C", xpos, ypos, -zpos);
1661 connTubes4Trans2->RegisterYourself();
1663 zlen = sIBConnSideHole1XWid / 1.5;
1664 TGeoTube* sideHole1 =
new TGeoTube(
"sideHole1C", 0, sIBConnSideHole1D / 2, zlen);
1666 xpos = -connBody->GetDX() + sIBConnSideHole1XWid - sideHole1->GetDz();
1667 ypos = connBody->GetDY() - sIBConnSideHole1YPos;
1668 zpos = -connBody->GetDZ() + (sIBConnSideHole1ZPos - sIBConnTailZLen);
1669 TGeoCombiTrans* connSideHole1Trans =
1670 new TGeoCombiTrans(
"sideHole1TransC", xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 0));
1671 connSideHole1Trans->RegisterYourself();
1674 new TGeoBBox(
"sideHole2CB", sIBConnSideHole2XWid, sIBConnSideHole2YWid / 2, sIBConnSideHole2ZWid / 2);
1676 xpos = connBody->GetDX();
1677 ypos = connBody->GetDY() - sIBConnSideHole2YPos;
1678 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + sideHole2Box->GetDZ();
1679 TGeoTranslation* sideHole2BTrans =
new TGeoTranslation(
"sideHole2TransBC", xpos, ypos, zpos);
1680 sideHole2BTrans->RegisterYourself();
1682 TGeoTubeSeg* sideHole2TubeSeg =
1683 new TGeoTubeSeg(
"sideHole2CTS", 0, sIBConnSideHole2YWid / 2, sIBConnSideHole2XWid, 180, 360);
1685 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen);
1686 TGeoCombiTrans* sideHole2TSTrans1 =
1687 new TGeoCombiTrans(
"sideHole2TSTrans1C", xpos, ypos, zpos,
new TGeoRotation(
"", -90, 90, 0));
1688 sideHole2TSTrans1->RegisterYourself();
1690 zpos = -connBody->GetDZ() + (sIBConnSideHole2ZPos - sIBConnTailZLen) + 2 * sideHole2Box->GetDZ();
1691 TGeoCombiTrans* sideHole2TSTrans2 =
1692 new TGeoCombiTrans(
"sideHole2TSTrans2C", xpos, ypos, zpos,
new TGeoRotation(
"", -90, -90, 0));
1693 sideHole2TSTrans2->RegisterYourself();
1695 TGeoCompositeShape* connBodySh =
new TGeoCompositeShape(
1696 "connBodyC-tube2HoleC:tubes2Trans1C-tube2HoleC:tubes2Trans2C-tube3HoleC:tubes3TransC-tube4HoleC:tubes4Trans1C-"
1697 "tube4HoleC:tubes4Trans2C-sideHole1C:sideHole1TransC-sideHole2CTS:sideHole2TSTrans1C-sideHole2CTS:"
1698 "sideHole2TSTrans2C-sideHole2CB:sideHole2TransBC-connRoundHoleC:roundHoleTransC-connInsertHoleC:insertHoleTransC");
1700 TGeoVolume* connBlockBody =
new TGeoVolume(
"IBConnectorBlockBodyCSide", connBodySh, medPEEK);
1701 connBlockBody->SetFillColor(42);
1702 connBlockBody->SetLineColor(42);
1705 xv[0] = sIBConnectorXWidth / 2;
1706 yv[0] = sIBConnTailYShift;
1708 yv[1] = sIBConnTailYMid;
1709 xv[2] = xv[1] - (sIBConnectorYTot - sIBConnTailYMid) /
tanD(90 - sIBConnTailOpenPhi / 2);
1710 yv[2] = sIBConnectorYTot;
1712 for (Int_t
i = 0;
i < 3;
i++) {
1713 xv[3 +
i] = -xv[2 -
i];
1714 yv[3 +
i] = yv[2 -
i];
1717 TGeoXtru* connTail =
new TGeoXtru(2);
1718 connTail->SetName(
"connTailC");
1719 connTail->DefinePolygon(6, xv, yv);
1720 connTail->DefineSection(0, 0);
1721 connTail->DefineSection(1, sIBConnTailZLen);
1723 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1HoleC", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 1.5);
1725 xpos = sIBConnTubesXDist / 2;
1726 ypos = sIBConnTubesYPos;
1727 zpos = connTail->GetZ(1) / 2;
1728 TGeoTranslation* connTubes1Trans1 =
new TGeoTranslation(
"tubes1Trans1C", -xpos, ypos, zpos);
1729 connTubes1Trans1->RegisterYourself();
1730 TGeoTranslation* connTubes1Trans2 =
new TGeoTranslation(
"tubes1Trans2C", xpos, ypos, zpos);
1731 connTubes1Trans2->RegisterYourself();
1733 TGeoCompositeShape* connTailSh =
1734 new TGeoCompositeShape(
"connTailC-tube1HoleC:tubes1Trans1C-tube1HoleC:tubes1Trans2C");
1736 TGeoVolume* connBlockTail =
new TGeoVolume(
"IBConnectorBlockTailCSide", connTailSh, medPEEK);
1737 connBlockTail->SetFillColor(42);
1738 connBlockTail->SetLineColor(42);
1741 zlen = sIBConnPlugTotLen - sIBConnPlugInnerLen;
1742 TGeoPcon* connPlugSh =
new TGeoPcon(0, 360, 4);
1743 connPlugSh->DefineSection(0, 0., 0., sIBConnTubeHole2D / 2);
1744 connPlugSh->DefineSection(1, zlen, 0., sIBConnTubeHole2D / 2);
1745 connPlugSh->DefineSection(2, zlen, sIBConnPlugInnerD / 2, sIBConnTubeHole2D / 2);
1746 connPlugSh->DefineSection(3, sIBConnPlugTotLen, sIBConnPlugInnerD / 2, sIBConnTubeHole2D / 2);
1748 TGeoVolume* connPlug =
new TGeoVolume(
"IBConnectorPlugC", connPlugSh, medPEEK);
1749 connPlug->SetFillColor(44);
1750 connPlug->SetLineColor(44);
1754 xlen = sIBConnectorXWidth;
1755 ylen = sIBConnBodyYHeight;
1756 zlen = sIBConnectBlockZLen - sIBConnTailZLen;
1758 TGeoBBox* connBox =
new TGeoBBox(
"connBoxC", xlen / 2, ylen / 2, zlen / 2);
1760 ypos = -sIBConnectorYTot / 2 + connBox->GetDY();
1761 TGeoTranslation* transBodyC =
new TGeoTranslation(
"transBodyC", 0, ypos, 0);
1762 transBodyC->RegisterYourself();
1764 ypos = -sIBConnectorYTot / 2;
1765 zpos = -connBox->GetDZ() - connTail->GetZ(1);
1766 TGeoTranslation* transTailC =
new TGeoTranslation(
"transTailC", 0, ypos, zpos);
1767 transTailC->RegisterYourself();
1769 TGeoTube* connTubeHollow =
new TGeoTube(
"tubeHollowC", 0, sIBConnTubeHole1D / 2, sIBConnTubeHole1ZLen / 2);
1771 xpos = sIBConnTubesXDist / 2;
1772 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1773 zpos = -connBox->GetDZ() - connTail->GetZ(1) + sIBConnTubeHole1ZLen / 2;
1774 TGeoTranslation* connTubeHollTrans1 =
new TGeoTranslation(
"tubeHollTrans1C", -xpos, ypos, zpos);
1775 connTubeHollTrans1->RegisterYourself();
1776 TGeoTranslation* connTubeHollTrans2 =
new TGeoTranslation(
"tubeHollTrans2C", xpos, ypos, zpos);
1777 connTubeHollTrans2->RegisterYourself();
1779 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1780 TGeoTranslation* connTubes2Trans1Body =
new TGeoTranslation(
"tubes2Trans1BC", -xpos, ypos, -zpos);
1781 connTubes2Trans1Body->RegisterYourself();
1782 TGeoTranslation* connTubes2Trans2Body =
new TGeoTranslation(
"tubes2Trans2BC", xpos, ypos, -zpos);
1783 connTubes2Trans2Body->RegisterYourself();
1785 TGeoCompositeShape* connBoxSh =
new TGeoCompositeShape(
1786 "connBoxC:transBodyC-tube2HoleC:tubes2Trans1BC-tube2HoleC:tubes2Trans2BC+connTailC:transTailC-tubeHollowC:tubeHollTrans1C-"
1787 "tubeHollowC:tubeHollTrans2C");
1789 TGeoVolume* connBoxCSide =
new TGeoVolume(
"IBConnectorCSide", connBoxSh, medAir);
1793 ypos = -connBoxSh->GetDY();
1794 zpos = -connBodySh->GetDZ() - connTail->GetZ(1);
1795 connBoxCSide->AddNode(connBlockTail, 1,
new TGeoTranslation(0, ypos, zpos));
1797 ypos = -connBoxSh->GetDY() + connBody->GetDY();
1798 connBoxCSide->AddNode(connBlockBody, 1,
new TGeoTranslation(0, ypos, 0));
1800 xpos = connBox->GetDX();
1801 ypos = -sIBConnectorYTot / 2 + sIBConnTubesYPos;
1802 zpos = connBody->GetDZ() - (sIBConnectBlockZLen - sIBConnTubeHole3ZPos);
1803 connBoxCSide->AddNode(connPlug, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90)));
1806TGeoVolume* V3Layer::createStaveOuterB(
const TGeoManager* mgr)
1821 TGeoVolume* mechStavVol =
nullptr;
1823 switch (mStaveModel) {
1825 mechStavVol = createStaveModelOuterBDummy(mgr);
1829 LOG(fatal) <<
"Stave model " << mStaveModel <<
" obsolete and no longer supported";
1832 mechStavVol = createStaveModelOuterB2(mgr);
1835 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
1841TGeoVolume* V3Layer::createStaveModelOuterBDummy(
const TGeoManager*)
const
1860TGeoVolume* V3Layer::createStaveModelOuterB2(
const TGeoManager* mgr)
1884 Double_t yFlex1 = sOBFlexCableAlThick;
1885 Double_t yFlex2 = sOBFlexCableKapThick;
1886 Double_t flexOverlap = 5;
1887 Double_t yCFleece = sOBCarbonFleeceThick;
1888 Double_t yGraph = sOBGraphiteFoilThick;
1889 Double_t xHalfSt, yHalfSt;
1891 Double_t xmod, ymod, zmod, ypowbus, zbias;
1892 Double_t xtru[12], ytru[12];
1893 Double_t xpos, ypos, ypos1, zpos ;
1894 Double_t xlen, ylen, zlen;
1895 const Int_t nameLen = 30;
1896 char volname[nameLen];
1898 Double_t rCoolMin, rCoolMax;
1899 rCoolMin = sOBCoolTubeInnerD / 2;
1901 rCoolMax = rCoolMin + sOBCoolTubeThick;
1905 TGeoVolume* moduleVol = createModuleOuterB();
1906 moduleVol->SetVisibility(kTRUE);
1907 xmod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDX();
1908 ymod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDY();
1909 zmod = (
static_cast<TGeoBBox*
>(moduleVol->GetShape()))->GetDZ();
1911 if (mLayerNumber <= 4) {
1912 zlen = sOBColdPlateZLenML / 2;
1914 zlen = sOBColdPlateZLenOL / 2;
1917 xlen = sOBColdPlateXWidth / 2;
1919 TGeoBBox* coldPlate =
new TGeoBBox(
"ColdPlate", xlen, sOBColdPlateThick / 2, zlen);
1921 TGeoBBox* fleeccent =
new TGeoBBox(
"FleeceCent", xlen, yCFleece / 2, zlen);
1923 TGeoTube* coolTube =
new TGeoTube(
"CoolingTube", rCoolMin, rCoolMax, zlen);
1924 TGeoTube* coolWater =
new TGeoTube(
"CoolingWater", 0., rCoolMin, zlen);
1926 xlen = sOBColdPlateXWidth / 2 - sOBCoolTubeXDist / 2 - coolTube->GetRmax();
1927 TGeoBBox* graphlat =
new TGeoBBox(
"GraphLateral", xlen / 2, yGraph / 2, zlen);
1929 xlen = sOBCoolTubeXDist / 2 - coolTube->GetRmax();
1932 ylen = coolTube->GetRmax() - yGraph;
1933 TGeoBBox* graphvert =
new TGeoBBox(
"GraphVertical", yGraph / 2, ylen / 2, zlen);
1935 TGeoTubeSeg* graphtub =
new TGeoTubeSeg(
"GraphTube", rCoolMax, rCoolMax + yGraph, zlen, 180., 360.);
1937 xlen = sOBColdPlateXWidth / 2 - sOBCoolTubeXDist / 2 - coolTube->GetRmax() - yGraph;
1938 TGeoBBox* fleeclat =
new TGeoBBox(
"FleecLateral", xlen / 2, yCFleece / 2, zlen);
1940 xlen = sOBCoolTubeXDist / 2 - coolTube->GetRmax() - yGraph;
1941 TGeoBBox* fleecmid =
new TGeoBBox(
"FleecMiddle", xlen, yCFleece / 2, zlen);
1943 ylen = coolTube->GetRmax() - yGraph - yCFleece;
1944 TGeoBBox* fleecvert =
new TGeoBBox(
"FleecVertical", yCFleece / 2, ylen / 2, zlen);
1946 TGeoTubeSeg* fleectub =
1947 new TGeoTubeSeg(
"FleecTube", rCoolMax + yGraph, rCoolMax + yCFleece + yGraph, zlen, 180., 360.);
1953 TGeoVolume* powerBusVol = createOBPowerBiasBuses(zlen);
1954 powerBusVol->SetVisibility(kTRUE);
1955 ypowbus = (
static_cast<TGeoBBox*
>(powerBusVol->GetShape()))->GetDY();
1959 yHalfSt = ypowbus + ymod + coldPlate->GetDY() + 2 * fleeccent->GetDY() + graphlat->GetDY() + fleeclat->GetDY();
1964 ytru[1] = -2 * yHalfSt;
1965 xtru[2] = sOBCoolTubeXDist / 2 + fleectub->GetRmax();
1968 ytru[3] = ytru[2] - (coolTube->GetRmax() + fleectub->GetRmax());
1969 xtru[4] = sOBCoolTubeXDist / 2 - fleectub->GetRmax();
1973 for (Int_t
i = 0;
i < 6;
i++) {
1974 xtru[6 +
i] = -xtru[5 -
i];
1975 ytru[6 +
i] = ytru[5 -
i];
1977 TGeoXtru* halfStaveCent =
new TGeoXtru(2);
1978 halfStaveCent->DefinePolygon(12, xtru, ytru);
1979 halfStaveCent->DefineSection(0, -zlen);
1980 halfStaveCent->DefineSection(1, zlen);
1981 snprintf(volname, nameLen,
"staveCentral%d", mLayerNumber);
1982 halfStaveCent->SetName(volname);
1985 TGeoBBox* connAside =
new TGeoBBox(
"connAsideOB", sOBCPConnectorXWidth / 2, sOBCPConnBlockYHei / 2,
1986 (sOBCPConnBlockZLen + sOBCPConnAFitZLen - sOBCPConnAFitZIn) / 2);
1989 new TGeoBBox(
"connCsideOB", sOBCPConnectorXWidth / 2, sOBCPConnBlockYHei / 2, sOBCPConnBlockZLen / 2);
1992 ypos = 2 * yHalfSt + connAside->GetDY() - sOBCPConnHollowYHei;
1993 zpos = zlen + connAside->GetDZ() - sOBCPConnHollowZLen;
1994 snprintf(volname, nameLen,
"transAsideOB%d", mLayerNumber);
1995 TGeoTranslation* transAside =
new TGeoTranslation(volname, 0, -ypos, zpos);
1996 transAside->RegisterYourself();
1998 zpos = zlen + connCside->GetDZ() - sOBCPConnHollowZLen;
1999 snprintf(volname, nameLen,
"transCsideOB%d", mLayerNumber);
2000 TGeoTranslation* transCside =
new TGeoTranslation(volname, 0, -ypos, -zpos);
2001 transCside->RegisterYourself();
2004 snprintf(componame, 70,
"staveCentral%d+connAsideOB:transAsideOB%d+connCsideOB:transCsideOB%d", mLayerNumber,
2005 mLayerNumber, mLayerNumber);
2007 TGeoCompositeShape* halfStave =
new TGeoCompositeShape(componame);
2011 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
2012 TGeoMedium* medK13D2U120 = mgr->GetMedium(Form(
"%s_K13D2U120$",
GetDetName()));
2013 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
2014 TGeoMedium* medWater = mgr->GetMedium(Form(
"%s_WATER$",
GetDetName()));
2015 TGeoMedium* medCarbonFleece = mgr->GetMedium(Form(
"%s_CarbonFleece$",
GetDetName()));
2016 TGeoMedium* medFGS003 = mgr->GetMedium(Form(
"%s_FGS003$",
GetDetName()));
2017 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2018 TGeoMedium* medTungsten = mgr->GetMedium(Form(
"%s_TUNGSTEN$",
GetDetName()));
2020 TGeoVolume* coldPlateVol =
new TGeoVolume(
"ColdPlateVol", coldPlate, medK13D2U120);
2021 coldPlateVol->SetLineColor(kYellow - 3);
2022 coldPlateVol->SetFillColor(coldPlateVol->GetLineColor());
2023 coldPlateVol->SetFillStyle(4000);
2025 TGeoVolume* fleeccentVol =
new TGeoVolume(
"CarbonFleeceCentral", fleeccent, medCarbonFleece);
2026 fleeccentVol->SetLineColor(kViolet);
2027 fleeccentVol->SetFillColor(fleeccentVol->GetLineColor());
2028 fleeccentVol->SetFillStyle(4000);
2030 TGeoVolume* coolTubeVol =
new TGeoVolume(
"CoolingTubeVol", coolTube, medKapton);
2031 coolTubeVol->SetLineColor(kGray);
2032 coolTubeVol->SetFillColor(coolTubeVol->GetLineColor());
2033 coolTubeVol->SetFillStyle(4000);
2035 TGeoVolume* coolWaterVol;
2036 coolWaterVol =
new TGeoVolume(
"CoolingWaterVol", coolWater, medWater);
2037 coolWaterVol->SetLineColor(kBlue);
2038 coolWaterVol->SetFillColor(coolWaterVol->GetLineColor());
2039 coolWaterVol->SetFillStyle(4000);
2041 TGeoVolume* graphlatVol =
new TGeoVolume(
"GraphiteFoilLateral", graphlat, medFGS003);
2042 graphlatVol->SetLineColor(kGreen);
2043 graphlatVol->SetFillColor(graphlatVol->GetLineColor());
2044 graphlatVol->SetFillStyle(4000);
2046 TGeoVolume* graphmidVol =
new TGeoVolume(
"GraphiteFoilMiddle", graphmid, medFGS003);
2047 graphmidVol->SetLineColor(kGreen);
2048 graphmidVol->SetFillColor(graphmidVol->GetLineColor());
2049 graphmidVol->SetFillStyle(4000);
2051 TGeoVolume* graphvertVol =
new TGeoVolume(
"GraphiteFoilVertical", graphvert, medFGS003);
2052 graphvertVol->SetLineColor(kGreen);
2053 graphvertVol->SetFillColor(graphvertVol->GetLineColor());
2054 graphvertVol->SetFillStyle(4000);
2056 TGeoVolume* graphtubVol =
new TGeoVolume(
"GraphiteFoilPipeCover", graphtub, medFGS003);
2057 graphtubVol->SetLineColor(kGreen);
2058 graphtubVol->SetFillColor(graphtubVol->GetLineColor());
2059 graphtubVol->SetFillStyle(4000);
2061 TGeoVolume* fleeclatVol =
new TGeoVolume(
"CarbonFleeceLateral", fleeclat, medCarbonFleece);
2062 fleeclatVol->SetLineColor(kViolet);
2063 fleeclatVol->SetFillColor(fleeclatVol->GetLineColor());
2064 fleeclatVol->SetFillStyle(4000);
2066 TGeoVolume* fleecmidVol =
new TGeoVolume(
"CarbonFleeceMiddle", fleecmid, medCarbonFleece);
2067 fleecmidVol->SetLineColor(kViolet);
2068 fleecmidVol->SetFillColor(fleecmidVol->GetLineColor());
2069 fleecmidVol->SetFillStyle(4000);
2071 TGeoVolume* fleecvertVol =
new TGeoVolume(
"CarbonFleeceVertical", fleecvert, medCarbonFleece);
2072 fleecvertVol->SetLineColor(kViolet);
2073 fleecvertVol->SetFillColor(fleecvertVol->GetLineColor());
2074 fleecvertVol->SetFillStyle(4000);
2076 TGeoVolume* fleectubVol =
new TGeoVolume(
"CarbonFleecePipeCover", fleectub, medCarbonFleece);
2077 fleectubVol->SetLineColor(kViolet);
2078 fleectubVol->SetFillColor(fleectubVol->GetLineColor());
2079 fleectubVol->SetFillStyle(4000);
2082 TGeoVolume* halfStaveVol =
new TGeoVolume(volname, halfStave, medAir);
2095 zbias = zlen - mNumberOfModules * zmod - (mNumberOfModules - 1) * 0.5 * sOBModuleGap;
2099 halfStaveVol->AddNode(powerBusVol, 1,
new TGeoTranslation(0, ypos, 0));
2101 ypos -= (ypowbus + ymod);
2102 for (Int_t
j = 0;
j < mNumberOfModules;
j++) {
2103 zpos = zlen - zbias -
j * (2 * zmod + sOBModuleGap) - zmod;
2104 halfStaveVol->AddNode(moduleVol,
j,
new TGeoTranslation(0, ypos, zpos));
2110 ypos -= fleeccent->GetDY();
2111 if (mBuildLevel < 6) {
2112 halfStaveVol->AddNode(fleeccentVol, 1,
new TGeoTranslation(0, ypos, 0));
2114 ypos -= fleeccent->GetDY();
2116 ypos -= coldPlate->GetDY();
2117 if (mBuildLevel < 6) {
2118 halfStaveVol->AddNode(coldPlateVol, 1,
new TGeoTranslation(0, ypos, 0));
2120 ypos -= coldPlate->GetDY();
2122 ypos -= fleeccent->GetDY();
2123 if (mBuildLevel < 6) {
2124 halfStaveVol->AddNode(fleeccentVol, 2,
new TGeoTranslation(0, ypos, 0));
2127 xpos = sOBCoolTubeXDist / 2;
2128 ypos1 = ypos - (fleeccent->GetDY() + coolTube->GetRmax());
2129 if (mBuildLevel < 4) {
2130 halfStaveVol->AddNode(coolWaterVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2131 halfStaveVol->AddNode(coolWaterVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2134 if (mBuildLevel < 5) {
2135 halfStaveVol->AddNode(coolTubeVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2136 halfStaveVol->AddNode(coolTubeVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2139 if (mBuildLevel < 6) {
2140 halfStaveVol->AddNode(graphtubVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2141 halfStaveVol->AddNode(graphtubVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2143 halfStaveVol->AddNode(fleectubVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2144 halfStaveVol->AddNode(fleectubVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2147 xpos = sOBColdPlateXWidth / 2 - graphlat->GetDX();
2148 ypos1 = ypos - (fleeccent->GetDY() + graphlat->GetDY());
2149 if (mBuildLevel < 6) {
2150 halfStaveVol->AddNode(graphlatVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2151 halfStaveVol->AddNode(graphlatVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2153 halfStaveVol->AddNode(graphmidVol, 1,
new TGeoTranslation(0, ypos1, 0));
2155 xpos = sOBColdPlateXWidth / 2 - 2 * graphlat->GetDX() + graphvert->GetDX();
2156 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + graphvert->GetDY());
2157 halfStaveVol->AddNode(graphvertVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2158 halfStaveVol->AddNode(graphvertVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2159 xpos = graphmid->GetDX() - graphvert->GetDX();
2160 halfStaveVol->AddNode(graphvertVol, 3,
new TGeoTranslation(-xpos, ypos1, 0));
2161 halfStaveVol->AddNode(graphvertVol, 4,
new TGeoTranslation(xpos, ypos1, 0));
2164 xpos = sOBColdPlateXWidth / 2 - fleeclat->GetDX();
2165 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + fleeclat->GetDY());
2166 if (mBuildLevel < 6) {
2167 halfStaveVol->AddNode(fleeclatVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2168 halfStaveVol->AddNode(fleeclatVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2170 halfStaveVol->AddNode(fleecmidVol, 1,
new TGeoTranslation(0, ypos1, 0));
2172 xpos = sOBColdPlateXWidth / 2 - 2 * fleeclat->GetDX() + fleecvert->GetDX();
2173 ypos1 = ypos - (fleeccent->GetDY() + 2 * graphlat->GetDY() + 2 * fleeclat->GetDY() + fleecvert->GetDY());
2174 halfStaveVol->AddNode(fleecvertVol, 1,
new TGeoTranslation(-xpos, ypos1, 0));
2175 halfStaveVol->AddNode(fleecvertVol, 2,
new TGeoTranslation(xpos, ypos1, 0));
2176 xpos = fleecmid->GetDX() - fleecvert->GetDX();
2177 halfStaveVol->AddNode(fleecvertVol, 3,
new TGeoTranslation(-xpos, ypos1, 0));
2178 halfStaveVol->AddNode(fleecvertVol, 4,
new TGeoTranslation(xpos, ypos1, 0));
2182 TGeoVolume *connectorASide, *connectorCSide;
2186 connectorASide = mgr->GetVolume(
"OBColdPlateConnectorASide");
2188 if (!connectorASide) {
2189 createOBColdPlateConnectors();
2190 connectorASide = mgr->GetVolume(
"OBColdPlateConnectorASide");
2192 connectorCSide = mgr->GetVolume(
"OBColdPlateConnectorCSide");
2194 ypos = 2 * yHalfSt + (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDY() - sOBCPConnHollowYHei;
2195 zpos = zlen + (
static_cast<TGeoBBox*
>(connectorASide->GetShape()))->GetDZ() - sOBCPConnHollowZLen;
2196 halfStaveVol->AddNode(connectorASide, 1,
new TGeoCombiTrans(0, -ypos, zpos,
new TGeoRotation(
"", 180, 0, 0)));
2198 zpos = zlen + (
static_cast<TGeoBBox*
>(connectorCSide->GetShape()))->GetDZ() - sOBCPConnHollowZLen;
2199 halfStaveVol->AddNode(connectorCSide, 1,
new TGeoCombiTrans(0, -ypos, -zpos,
new TGeoRotation(
"", 180, 0, 0)));
2202 return halfStaveVol;
2205TGeoVolume* V3Layer::createOBPowerBiasBuses(
const Double_t zcable,
const TGeoManager* mgr)
2223 Double_t xcable, ytot, ypos;
2226 xcable = sOBPowerBusXWidth / 2;
2230 xcable *= sOBPowerBusAlFrac;
2233 xcable = sOBBiasBusXWidth / 2;
2237 xcable *= sOBBiasBusAlFrac;
2241 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
2242 TGeoMedium* medAluminum = mgr->GetMedium(Form(
"%s_ALUMINUM$",
GetDetName()));
2243 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2245 TGeoVolume* gndPBVol =
new TGeoVolume(
"PowerBusGround", gndPB, medAluminum);
2246 gndPBVol->SetLineColor(kCyan);
2247 gndPBVol->SetFillColor(gndPBVol->GetLineColor());
2248 gndPBVol->SetFillStyle(4000);
2250 TGeoVolume* dielPBVol =
new TGeoVolume(
"PowerBusDielectric", dielPB, medKapton);
2251 dielPBVol->SetLineColor(kBlue);
2252 dielPBVol->SetFillColor(dielPBVol->GetLineColor());
2253 dielPBVol->SetFillStyle(4000);
2255 TGeoVolume* kapPBVol =
new TGeoVolume(
"PowerBusKapton", kapPB, medKapton);
2256 kapPBVol->SetLineColor(kBlue);
2257 kapPBVol->SetFillColor(kapPBVol->GetLineColor());
2258 kapPBVol->SetFillStyle(4000);
2260 TGeoVolume* topPBVol =
new TGeoVolume(
"PowerBusTop", topPB, medAluminum);
2261 topPBVol->SetLineColor(kCyan);
2262 topPBVol->SetFillColor(topPBVol->GetLineColor());
2263 topPBVol->SetFillStyle(4000);
2265 TGeoVolume* botBBVol =
new TGeoVolume(
"BiasBusBottom", botBB, medAluminum);
2266 botBBVol->SetLineColor(kCyan);
2267 botBBVol->SetFillColor(botBBVol->GetLineColor());
2268 botBBVol->SetFillStyle(4000);
2270 TGeoVolume* dielBBVol =
new TGeoVolume(
"BiasBusDielectric", dielBB, medKapton);
2271 dielBBVol->SetLineColor(kBlue);
2272 dielBBVol->SetFillColor(dielBBVol->GetLineColor());
2273 dielBBVol->SetFillStyle(4000);
2275 TGeoVolume* kapBBVol =
new TGeoVolume(
"BiasBusKapton", kapBB, medKapton);
2276 kapBBVol->SetLineColor(kBlue);
2277 kapBBVol->SetFillColor(kapBBVol->GetLineColor());
2278 kapBBVol->SetFillStyle(4000);
2280 TGeoVolume* topBBVol =
new TGeoVolume(
"BiasBusTop", topBB, medAluminum);
2281 topBBVol->SetLineColor(kCyan);
2282 topBBVol->SetFillColor(topBBVol->GetLineColor());
2283 topBBVol->SetFillStyle(4000);
2286 xcable = sOBPowerBusXWidth / 2;
2287 ytot = 2 * kapPB->GetDY() + topPB->GetDY() + dielPB->GetDY() + gndPB->GetDY() + 2 * kapBB->GetDY() + topBB->GetDY() + dielBB->GetDY() + botBB->GetDY();
2291 TGeoVolume* pnbBusVol =
new TGeoVolume(
"OBPowerBiasBus", pnbBus, medAir);
2294 ypos = -pnbBus->GetDY() + kapPB->GetDY();
2295 if (mBuildLevel < 5) {
2296 pnbBusVol->AddNode(kapPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2299 ypos += (kapPB->GetDY() + gndPB->GetDY());
2300 if (mBuildLevel < 2) {
2301 pnbBusVol->AddNode(gndPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2304 ypos += (gndPB->GetDY() + dielPB->GetDY());
2305 if (mBuildLevel < 5) {
2306 pnbBusVol->AddNode(dielPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2309 ypos += (dielPB->GetDY() + topPB->GetDY());
2310 if (mBuildLevel < 2) {
2311 pnbBusVol->AddNode(topPBVol, 1,
new TGeoTranslation(0, ypos, 0));
2314 ypos += (topPB->GetDY() + kapPB->GetDY());
2315 if (mBuildLevel < 5) {
2316 pnbBusVol->AddNode(kapPBVol, 2,
new TGeoTranslation(0, ypos, 0));
2320 ypos += (kapPB->GetDY() + kapBB->GetDY());
2321 if (mBuildLevel < 5) {
2322 pnbBusVol->AddNode(kapBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2325 ypos += (kapBB->GetDY() + botBB->GetDY());
2326 if (mBuildLevel < 2) {
2327 pnbBusVol->AddNode(botBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2330 ypos += (botBB->GetDY() + dielBB->GetDY());
2331 if (mBuildLevel < 5) {
2332 pnbBusVol->AddNode(dielBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2335 ypos += (dielBB->GetDY() + topBB->GetDY());
2336 if (mBuildLevel < 2) {
2337 pnbBusVol->AddNode(topBBVol, 1,
new TGeoTranslation(0, ypos, 0));
2340 ypos += (topBB->GetDY() + kapBB->GetDY());
2341 if (mBuildLevel < 5) {
2342 pnbBusVol->AddNode(kapBBVol, 2,
new TGeoTranslation(0, ypos, 0));
2349void V3Layer::createOBColdPlateConnectors()
2364 createOBColdPlateConnectorsASide();
2365 createOBColdPlateConnectorsCSide();
2368void V3Layer::createOBColdPlateConnectorsASide()
2385 const TGeoManager* mgr = gGeoManager;
2388 const Int_t nv = 16;
2389 Double_t xv[nv], yv[nv];
2390 Double_t xlen, ylen, zlen;
2391 Double_t xpos, ypos, zpos;
2394 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2395 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
2396 TGeoMedium* medInox304 = mgr->GetMedium(Form(
"%s_INOX304$",
GetDetName()));
2401 xlen = sOBCPConnectorXWidth;
2402 ylen = sOBCPConnBlockYHei;
2403 zlen = sOBCPConnBlockZLen;
2404 TGeoBBox* connBlock =
new TGeoBBox(
"connBlockA", xlen / 2, ylen / 2, zlen / 2);
2406 xv[0] = sOBCPConnectorXWidth * 0.6;
2407 yv[0] = -sOBCPConnHollowYHei;
2409 yv[1] = sOBCPConnHollowYHei;
2410 xv[2] = sOBCPConnTubesXDist / 2 + sOBCPConnTubeHole1D / 2;
2413 yv[3] = sOBCPConnTubesYPos;
2414 xv[4] = sOBCPConnTubesXDist / 2 - sOBCPConnTubeHole1D / 2;
2419 for (Int_t
i = 0;
i < 6;
i++) {
2420 xv[6 +
i] = -xv[5 -
i];
2421 yv[6 +
i] = yv[5 -
i];
2424 TGeoXtru* connBlockHoll =
new TGeoXtru(2);
2425 connBlockHoll->SetName(
"connBlockHollA");
2426 connBlockHoll->DefinePolygon(12, xv, yv);
2427 connBlockHoll->DefineSection(0, -sOBCPConnHollowZLen);
2428 connBlockHoll->DefineSection(1, sOBCPConnHollowZLen);
2430 ypos = -connBlock->GetDY();
2431 zpos = -connBlock->GetDZ();
2432 TGeoTranslation* transBlockHoll =
new TGeoTranslation(
"transBlockHollA", 0, ypos, zpos);
2433 transBlockHoll->RegisterYourself();
2435 xlen = sOBCPConnSquareHoleX / 2;
2436 ylen = sOBCPConnBlockYHei / 1.5;
2437 zlen = sOBCPConnSquareHoleZ / 2;
2438 TGeoBBox* connSquareHole =
new TGeoBBox(
"connASquareHole", xlen, ylen, zlen);
2441 -connBlock->GetDZ() + (sOBCPConnSqrHoleZPos + connSquareHole->GetDZ());
2442 TGeoTranslation* transSquareHole =
new TGeoTranslation(
"transASquareHole", 0, 0, zpos);
2443 transSquareHole->RegisterYourself();
2445 zlen = sOBCPConnTubeHole1Z;
2446 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1AHole", 0, sOBCPConnTubeHole1D / 2, zlen);
2448 xpos = sOBCPConnTubesXDist / 2;
2449 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2450 zpos = connBlock->GetDZ();
2451 TGeoTranslation* trans1Tube1AHole =
new TGeoTranslation(
"trans1Tube1AHole", -xpos, ypos, -zpos);
2452 trans1Tube1AHole->RegisterYourself();
2453 TGeoTranslation* trans2Tube1AHole =
new TGeoTranslation(
"trans2Tube1AHole", xpos, ypos, -zpos);
2454 trans2Tube1AHole->RegisterYourself();
2456 zlen = sOBCPConnBlockZLen;
2457 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2AHole", 0, sOBCPConnTubeHole2D / 2, zlen);
2459 TGeoTranslation* trans1Tube2AHole =
new TGeoTranslation(
"trans1Tube2AHole", -xpos, ypos, 0);
2460 trans1Tube2AHole->RegisterYourself();
2461 TGeoTranslation* trans2Tube2AHole =
new TGeoTranslation(
"trans2Tube2AHole", xpos, ypos, 0);
2462 trans2Tube2AHole->RegisterYourself();
2464 zlen = sOBCPConnAFitZIn;
2465 TGeoTube* connFitHole =
new TGeoTube(
"fitAHole", 0, sOBCPConnFitHoleD / 2, zlen);
2467 TGeoTranslation* trans1FitAHole =
new TGeoTranslation(
"trans1FitAHole", -xpos, ypos, zpos);
2468 trans1FitAHole->RegisterYourself();
2469 TGeoTranslation* trans2FitAHole =
new TGeoTranslation(
"trans2FitAHole", xpos, ypos, zpos);
2470 trans2FitAHole->RegisterYourself();
2472 TGeoCompositeShape* connBlockSh =
new TGeoCompositeShape(
2473 "connBlockA-connBlockHollA:transBlockHollA-connASquareHole:transASquareHole-tube1AHole:trans1Tube1AHole-tube1AHole:"
2474 "trans2Tube1AHole-tube2AHole:trans1Tube2AHole-tube2AHole:trans2Tube2AHole-fitAHole:trans1FitAHole-fitAHole:"
2477 TGeoVolume* connBlockA =
new TGeoVolume(
"OBColdPlateConnectorBlockASide", connBlockSh, medPEEK);
2478 connBlockA->SetFillColor(42);
2479 connBlockA->SetLineColor(42);
2482 Double_t rmin = sOBCPConnAFitExtD / 2 - sOBCPConnAFitThick;
2483 TGeoTube* connFitSh =
new TGeoTube(rmin, sOBCPConnAFitExtD / 2, sOBCPConnAFitZLen / 2);
2485 TGeoVolume* connFit =
new TGeoVolume(
"OBColdPlateConnectorFitting", connFitSh, medInox304);
2486 connFit->SetFillColor(kGray);
2487 connFit->SetLineColor(kGray);
2491 xlen = sOBCPConnectorXWidth;
2492 ylen = sOBCPConnBlockYHei;
2493 zlen = sOBCPConnBlockZLen + (sOBCPConnAFitZLen - sOBCPConnAFitZIn);
2494 TGeoBBox* connBox =
new TGeoBBox(
"connectorOBCPA", xlen / 2, ylen / 2, zlen / 2);
2496 ypos = -connBox->GetDY();
2497 zpos = -connBox->GetDZ();
2498 TGeoTranslation* transBoxHoll =
new TGeoTranslation(
"transBoxHollA", 0, ypos, zpos);
2499 transBoxHoll->RegisterYourself();
2501 xpos = sOBCPConnTubesXDist / 2;
2502 ypos = -connBox->GetDY() + sOBCPConnTubesYPos;
2503 zpos = connBox->GetDZ();
2504 TGeoTranslation* trans1BoxHole =
new TGeoTranslation(
"trans1BoxAHole", -xpos, ypos, -zpos);
2505 trans1BoxHole->RegisterYourself();
2506 TGeoTranslation* trans2BoxHole =
new TGeoTranslation(
"trans2BoxAHole", xpos, ypos, -zpos);
2507 trans2BoxHole->RegisterYourself();
2509 TGeoCompositeShape* connectSh =
new TGeoCompositeShape(
2510 "connectorOBCPA-connBlockHollA:transBoxHollA-tube1AHole:trans1BoxAHole-tube1AHole:trans2BoxAHole");
2512 TGeoVolume* connectorASide =
new TGeoVolume(
"OBColdPlateConnectorASide", connectSh, medAir);
2515 zpos = -connectSh->GetDZ() + connBlock->GetDZ();
2516 connectorASide->AddNode(connBlockA, 1,
new TGeoTranslation(0, 0, zpos));
2518 xpos = sOBCPConnTubesXDist / 2;
2519 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2520 zpos = connectSh->GetDZ() - connFitSh->GetDz();
2521 connectorASide->AddNode(connFit, 1,
new TGeoTranslation(-xpos, ypos, zpos));
2522 connectorASide->AddNode(connFit, 2,
new TGeoTranslation(xpos, ypos, zpos));
2525void V3Layer::createOBColdPlateConnectorsCSide()
2542 const TGeoManager* mgr = gGeoManager;
2545 const Int_t nv = 16;
2546 Double_t xv[nv], yv[nv];
2547 Double_t xlen, ylen, zlen;
2548 Double_t xpos, ypos, zpos;
2551 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2552 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
2557 xlen = sOBCPConnectorXWidth;
2558 ylen = sOBCPConnBlockYHei;
2559 zlen = sOBCPConnBlockZLen;
2560 TGeoBBox* connBlock =
new TGeoBBox(
"connBlockC", xlen / 2, ylen / 2, zlen / 2);
2562 xv[0] = sOBCPConnectorXWidth * 0.6;
2563 yv[0] = -sOBCPConnHollowYHei;
2565 yv[1] = sOBCPConnHollowYHei;
2566 xv[2] = sOBCPConnTubesXDist / 2 + sOBCPConnTubeHole1D / 2;
2569 yv[3] = sOBCPConnTubesYPos;
2570 xv[4] = sOBCPConnTubesXDist / 2 - sOBCPConnTubeHole1D / 2;
2575 for (Int_t
i = 0;
i < 6;
i++) {
2576 xv[6 +
i] = -xv[5 -
i];
2577 yv[6 +
i] = yv[5 -
i];
2580 TGeoXtru* connBlockHoll =
new TGeoXtru(2);
2581 connBlockHoll->SetName(
"connBlockHollC");
2582 connBlockHoll->DefinePolygon(12, xv, yv);
2583 connBlockHoll->DefineSection(0, -sOBCPConnHollowZLen);
2584 connBlockHoll->DefineSection(1, sOBCPConnHollowZLen);
2586 ypos = -connBlock->GetDY();
2587 zpos = connBlock->GetDZ();
2588 TGeoTranslation* transBlockHoll =
new TGeoTranslation(
"transBlockHollC", 0, ypos, zpos);
2589 transBlockHoll->RegisterYourself();
2591 TGeoTube* connRoundHole =
new TGeoTube(
"connCRoundHole", 0, sOBCPConnRoundHoleD / 2, sOBCPConnBlockYHei / 1.5);
2593 zpos = connBlock->GetDZ() - sOBCPConnRndHoleZPos;
2594 TGeoCombiTrans* transRoundHole =
new TGeoCombiTrans(
"transCRoundHole", 0, 0, zpos,
new TGeoRotation(
"", 0, 90, 0));
2595 transRoundHole->RegisterYourself();
2597 zlen = sOBCPConnTubeHole1Z;
2598 TGeoTube* connTubeHole1 =
new TGeoTube(
"tube1CHole", 0, sOBCPConnTubeHole1D / 2, zlen);
2600 xpos = sOBCPConnTubesXDist / 2;
2601 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2602 zpos = connBlock->GetDZ();
2603 TGeoTranslation* trans1Tube1AHole =
new TGeoTranslation(
"trans1Tube1CHole", -xpos, ypos, zpos);
2604 trans1Tube1AHole->RegisterYourself();
2605 TGeoTranslation* trans2Tube1AHole =
new TGeoTranslation(
"trans2Tube1CHole", xpos, ypos, zpos);
2606 trans2Tube1AHole->RegisterYourself();
2608 TGeoTube* connTubeHole2 =
new TGeoTube(
"tube2CHole", 0, sOBCPConnTubeHole2D / 2, connBlock->GetDZ());
2610 zpos = sOBCPConnTubeHole3ZP;
2611 TGeoTranslation* connTubes2Trans1 =
new TGeoTranslation(
"trans1Tube2CHole", -xpos, ypos, zpos);
2612 connTubes2Trans1->RegisterYourself();
2613 TGeoTranslation* connTubes2Trans2 =
new TGeoTranslation(
"trans2Tube2CHole", xpos, ypos, zpos);
2614 connTubes2Trans2->RegisterYourself();
2616 TGeoTube* connTubeHole3 =
new TGeoTube(
"tube3CHole", 0, sOBCPConnTubeHole2D / 2, connBlock->GetDX());
2618 xpos = -sOBCPConnTubeHole3XP;
2619 zpos = -connBlock->GetDZ() + sOBCPConnTubeHole3ZP;
2620 TGeoCombiTrans* connTubes3Trans =
2621 new TGeoCombiTrans(
"transTube3CHole", xpos, ypos, zpos,
new TGeoRotation(
"", 90, -90, 90));
2622 connTubes3Trans->RegisterYourself();
2624 TGeoCompositeShape* connBlockSh =
new TGeoCompositeShape(
2625 "connBlockC-connBlockHollC:transBlockHollC-connCRoundHole:transCRoundHole-tube1CHole:trans1Tube1CHole-tube1CHole:"
2626 "trans2Tube1CHole-tube2CHole:trans1Tube2CHole-tube2CHole:trans2Tube2CHole-tube3CHole:transTube3CHole");
2628 TGeoVolume* connBlockC =
new TGeoVolume(
"OBColdPlateConnectorBlockCSide", connBlockSh, medPEEK);
2629 connBlockC->SetFillColor(42);
2630 connBlockC->SetLineColor(42);
2633 TGeoPcon* connPlugSh =
new TGeoPcon(0, 360, 4);
2634 connPlugSh->DefineSection(0, 0., 0., sOBCPConnTubeHole2D / 2);
2635 connPlugSh->DefineSection(1, sOBCPConnPlugThick, 0., sOBCPConnTubeHole2D / 2);
2636 connPlugSh->DefineSection(2, sOBCPConnPlugThick, sOBCPConnPlugInnerD / 2, sOBCPConnTubeHole2D / 2);
2637 connPlugSh->DefineSection(3, sOBCPConnPlugTotLen, sOBCPConnPlugInnerD / 2, sOBCPConnTubeHole2D / 2);
2639 TGeoVolume* connPlug =
new TGeoVolume(
"OBCPConnectorPlugC", connPlugSh, medPEEK);
2640 connPlug->SetFillColor(44);
2641 connPlug->SetLineColor(44);
2645 xlen = sOBCPConnectorXWidth;
2646 ylen = sOBCPConnBlockYHei;
2647 zlen = sOBCPConnBlockZLen;
2648 TGeoBBox* connBox =
new TGeoBBox(
"connectorOBCPC", xlen / 2, ylen / 2, zlen / 2);
2650 ypos = -connBox->GetDY();
2651 zpos = connBox->GetDZ();
2652 TGeoTranslation* transBoxHoll =
new TGeoTranslation(
"transBoxHollC", 0, ypos, zpos);
2653 transBoxHoll->RegisterYourself();
2655 xpos = sOBCPConnTubesXDist / 2;
2656 ypos = -connBox->GetDY() + sOBCPConnTubesYPos;
2657 zpos = connBox->GetDZ();
2658 TGeoTranslation* trans1BoxHole =
new TGeoTranslation(
"trans1BoxCHole", -xpos, ypos, zpos);
2659 trans1BoxHole->RegisterYourself();
2660 TGeoTranslation* trans2BoxHole =
new TGeoTranslation(
"trans2BoxCHole", xpos, ypos, zpos);
2661 trans2BoxHole->RegisterYourself();
2663 TGeoCompositeShape* connectSh =
new TGeoCompositeShape(
2664 "connectorOBCPC-connBlockHollC:transBoxHollC-tube1CHole:trans1BoxCHole-tube1CHole:trans2BoxCHole");
2666 TGeoVolume* connectorCSide =
new TGeoVolume(
"OBColdPlateConnectorCSide", connectSh, medAir);
2669 connectorCSide->AddNode(connBlockC, 1);
2671 xpos = -connBlock->GetDX();
2672 ypos = -connBlock->GetDY() + sOBCPConnTubesYPos;
2673 zpos = -connBlock->GetDZ() + sOBCPConnTubeHole3ZP;
2674 connectorCSide->AddNode(connPlug, 1,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90, 90, 90)));
2677TGeoVolume* V3Layer::createSpaceFrameOuterB(
const TGeoManager* mgr)
2679 TGeoVolume* mechStavVol =
nullptr;
2681 switch (mStaveModel) {
2684 mechStavVol = createSpaceFrameOuterBDummy(mgr);
2688 mechStavVol = createSpaceFrameOuterB2(mgr);
2691 LOG(fatal) <<
"Unknown stave model " << mStaveModel;
2698TGeoVolume* V3Layer::createSpaceFrameOuterBDummy(
const TGeoManager*)
const
2715TGeoVolume* V3Layer::createSpaceFrameOuterB2(
const TGeoManager* mgr)
2735 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2737 TGeoVolume *unitVol[2], *next2EndVol[2], *endVol[2];
2738 Double_t *xtru, *ytru;
2739 Double_t zlen, zpos;
2741 const Int_t nameLen = 30;
2742 char volname[nameLen];
2746 unitVol[0] = mgr->GetVolume(
"SpaceFrameUnit0");
2749 createOBSpaceFrameObjects(mgr);
2750 unitVol[0] = mgr->GetVolume(
"SpaceFrameUnit0");
2753 unitVol[1] = mgr->GetVolume(
"SpaceFrameUnit1");
2755 next2EndVol[0] = mgr->GetVolume(
"SpaceFrameNext2EndUnit0");
2756 next2EndVol[1] = mgr->GetVolume(
"SpaceFrameNext2EndUnit1");
2758 endVol[0] = mgr->GetVolume(
"SpaceFrameEndUnit0");
2759 endVol[1] = mgr->GetVolume(
"SpaceFrameEndUnit1");
2763 TGeoXtru* volShape =
static_cast<TGeoXtru*
>(unitVol[0]->GetShape());
2765 nPoints = volShape->GetNvert();
2766 xtru =
new Double_t[nPoints];
2767 ytru =
new Double_t[nPoints];
2769 for (Int_t
i = 0;
i < nPoints;
i++) {
2770 xtru[
i] = volShape->GetX(
i);
2771 ytru[
i] = volShape->GetY(
i);
2774 Int_t nUnits = sOBSpaceFrameNUnits[mLayerNumber / 5];
2775 zlen = (nUnits - 2) * sOBSpaceFrameUnitLen;
2777 TGeoXtru* spaceFrameCentral =
new TGeoXtru(2);
2778 spaceFrameCentral->DefinePolygon(nPoints, xtru, ytru);
2779 spaceFrameCentral->DefineSection(0, -zlen / 2);
2780 spaceFrameCentral->DefineSection(1, zlen / 2);
2781 snprintf(volname, nameLen,
"sframecentral%d", mLayerNumber);
2782 spaceFrameCentral->SetName(volname);
2784 zpos = zlen / 2 + sOBSpaceFrameUnitLen / 2;
2785 snprintf(volname, nameLen,
"endUnit0Trans%d", mLayerNumber);
2786 TGeoCombiTrans* endUnit0Trans =
new TGeoCombiTrans(volname, 0, 0, -zpos,
new TGeoRotation(
"", 90, 180, -90));
2787 endUnit0Trans->RegisterYourself();
2788 snprintf(volname, nameLen,
"endUnit1Trans%d", mLayerNumber);
2789 TGeoTranslation* endUnit1Trans =
new TGeoTranslation(volname, 0, 0, zpos);
2790 endUnit1Trans->RegisterYourself();
2795 char componame[100];
2796 snprintf(componame, 100,
"sframecentral%d+endunitcontainer:endUnit0Trans%d+endunitcontainer:endUnit1Trans%d",
2797 mLayerNumber, mLayerNumber, mLayerNumber);
2799 TGeoCompositeShape* spaceFrame =
new TGeoCompositeShape(componame);
2801 snprintf(volname, nameLen,
"SpaceFrameVolumeLay%d", mLayerNumber);
2802 TGeoVolume* spaceFrameVol =
new TGeoVolume(volname, spaceFrame, medAir);
2803 spaceFrameVol->SetVisibility(kFALSE);
2806 TGeoXtru* frameUnit =
static_cast<TGeoXtru*
>(unitVol[0]->GetShape());
2808 zpos = -spaceFrame->GetDZ() + frameUnit->GetDZ() + sOBSFrameConnTopLen;
2809 spaceFrameVol->AddNode(endVol[0], 1,
new TGeoCombiTrans(0, 0, zpos,
new TGeoRotation(
"", 90, 180, -90)));
2811 zpos += (2 * frameUnit->GetDZ());
2812 spaceFrameVol->AddNode(next2EndVol[0], 1,
new TGeoTranslation(0, 0, zpos));
2814 for (Int_t
i = 2;
i < nUnits - 2;
i++) {
2815 zpos += (2 * frameUnit->GetDZ());
2817 Int_t k =
i -
j * 2;
2818 spaceFrameVol->AddNode(unitVol[k],
j,
new TGeoTranslation(0, 0, zpos));
2821 zpos += (2 * frameUnit->GetDZ());
2822 spaceFrameVol->AddNode(next2EndVol[1], 1,
new TGeoTranslation(0, 0, zpos));
2824 zpos += (2 * frameUnit->GetDZ());
2825 spaceFrameVol->AddNode(endVol[1], 1,
new TGeoTranslation(0, 0, zpos));
2831 return spaceFrameVol;
2834void V3Layer::createOBSpaceFrameObjects(
const TGeoManager* mgr)
2859 TGeoMedium* medCarbon = mgr->GetMedium(Form(
"%s_M55J6K$",
GetDetName()));
2860 TGeoMedium* medF6151B05M = mgr->GetMedium(Form(
"%s_F6151B05M$",
GetDetName()));
2861 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
2864 Double_t halfFrameWidth = sOBSpaceFrameWidth / 2;
2865 Double_t triangleHeight = sOBSpaceFrameHeight;
2866 Double_t sframeHeight = triangleHeight + sOBSFrameBaseRibDiam + sOBSFrameULegHeight2 * 2;
2867 Double_t staveLa = sOBSpaceFrameTopVL;
2868 Double_t staveHa = sOBSpaceFrameTopVH;
2869 Double_t staveLb = sOBSpaceFrameSideVL;
2870 Double_t staveHb = sOBSpaceFrameSideVH;
2871 Double_t alphaDeg = sOBSpaceFrameVAlpha;
2872 Double_t alphaRad = alphaDeg * TMath::DegToRad() / 2;
2873 Double_t beta = sOBSpaceFrameVBeta * TMath::DegToRad() / 2;
2874 Double_t sideRibRadius = sOBSFrameSideRibDiam / 2;
2875 Double_t sidePhiDeg = sOBSFrameSideRibPhi;
2876 Double_t sidePhiRad = sidePhiDeg * TMath::DegToRad();
2877 Double_t baseRibRadius = sOBSFrameBaseRibDiam / 2;
2878 Double_t basePhiDeg = sOBSFrameBaseRibPhi;
2879 Double_t basePhiRad = basePhiDeg * TMath::DegToRad();
2880 Double_t ulegHalfLen = sOBSFrameULegLen / 2;
2881 Double_t ulegHalfWidth = sOBSFrameULegWidth / 2;
2882 Double_t ulegHigh1 = sOBSFrameULegHeight1;
2883 Double_t ulegHigh2 = sOBSFrameULegHeight2;
2884 Double_t ulegThick = sOBSFrameULegThick;
2885 Double_t topVFactorEU = 0.60;
2887 Double_t xlen, zlen;
2888 Double_t xpos, ypos, zpos;
2890 Double_t xtru[22], ytru[22];
2892 unitlen = sOBSpaceFrameUnitLen;
2894 xlen = halfFrameWidth + sideRibRadius;
2898 xtru[0] = sOBSFrameULegXPos - ulegHalfLen;
2899 ytru[0] = -(triangleHeight / 2 + baseRibRadius);
2901 ytru[1] = ytru[0] - ulegHigh1;
2902 xtru[2] = xtru[1] + ulegThick;
2905 ytru[3] = ytru[0] - ulegThick;
2906 xtru[7] = sOBSFrameULegXPos + ulegHalfLen;
2910 xtru[5] = xtru[6] - ulegThick;
2917 ytru[9] = 0.9 * ytru[8];
2918 xtru[10] = 0.3 * xtru[8];
2919 ytru[10] = triangleHeight / 2;
2920 for (Int_t
i = 0;
i < 11;
i++) {
2921 xtru[
i + 11] = -xtru[10 -
i];
2922 ytru[
i + 11] = ytru[10 -
i];
2924 ytru[15] = ytru[0] - ulegHigh2;
2925 ytru[16] = ytru[15];
2926 ytru[19] = ytru[15];
2927 ytru[20] = ytru[15];
2932 TGeoXtru* frameUnit =
new TGeoXtru(2);
2933 frameUnit->DefinePolygon(22, xtru, ytru);
2934 frameUnit->DefineSection(0, -unitlen / 2);
2935 frameUnit->DefineSection(1, unitlen / 2);
2937 TGeoXtru* next2EndUnit =
new TGeoXtru(2);
2938 next2EndUnit->DefinePolygon(22, xtru, ytru);
2939 next2EndUnit->DefineSection(0, -unitlen / 2);
2940 next2EndUnit->DefineSection(1, unitlen / 2);
2945 ytru[0] = -(triangleHeight / 2 + baseRibRadius);
2947 ytru[1] = 0.9 * ytru[0];
2948 xtru[2] = 0.3 * xtru[0];
2949 ytru[2] = triangleHeight / 2;
2950 for (Int_t
i = 0;
i < 3;
i++) {
2951 xtru[
i + 3] = -xtru[2 -
i];
2952 ytru[
i + 3] = ytru[2 -
i];
2955 TGeoXtru* endUnitBody =
new TGeoXtru(2);
2956 endUnitBody->SetName(
"endunitbody");
2957 endUnitBody->DefinePolygon(6, xtru, ytru);
2958 endUnitBody->DefineSection(0, -unitlen / 2);
2959 endUnitBody->DefineSection(1, 0.8 * unitlen / 2);
2961 xtru[2] = 0.25 * (3 * xtru[1] + xtru[2]);
2962 ytru[2] = 0.25 * (3 * ytru[1] + ytru[2]);
2963 for (Int_t
i = 0;
i < 3;
i++) {
2964 xtru[
i + 3] = -xtru[2 -
i];
2965 ytru[
i + 3] = ytru[2 -
i];
2968 TGeoXtru* endUnitBodyLow =
new TGeoXtru(2);
2969 endUnitBodyLow->SetName(
"endunitbodylow");
2970 endUnitBodyLow->DefinePolygon(6, xtru, ytru);
2971 endUnitBodyLow->DefineSection(0, 0.8 * unitlen / 2);
2972 endUnitBodyLow->DefineSection(1, unitlen / 2);
2975 xtru[0] = sOBSFrameConnWidth / 2.;
2978 ytru[1] = sOBSFrameConnInsHei;
2979 xtru[2] = xtru[1] - sOBSFrameConnTotHei + sOBSFrameConnInsHei;
2980 ytru[2] = sOBSFrameConnTotHei;
2981 for (Int_t
i = 0;
i < 3;
i++) {
2982 xtru[
i + 3] = -xtru[2 -
i];
2983 ytru[
i + 3] = ytru[2 -
i];
2986 TGeoXtru* endUnitConn =
new TGeoXtru(2);
2987 endUnitConn->SetName(
"endunitconn");
2988 endUnitConn->DefinePolygon(6, xtru, ytru);
2989 endUnitConn->DefineSection(0, 0.);
2990 endUnitConn->DefineSection(1, sOBSFrameConnTopLen);
2995 createStaveSide(
"fakeCornerSide", unitlen / 2., alphaRad, beta, staveLb, staveHb, kFALSE);
2997 ypos = -triangleHeight / 2 + vside->GetY(3);
2998 TGeoTranslation* endUnitConnTrans =
new TGeoTranslation(
"endunitconntrans", 0, ypos, unitlen / 2);
2999 endUnitConnTrans->RegisterYourself();
3001 TGeoCompositeShape* endUnit =
new TGeoCompositeShape(
"endunitbody+endunitbodylow+endunitconn:endunitconntrans");
3002 endUnit->SetName(
"endunitcontainer");
3005 TGeoVolume* unitVol[2];
3006 unitVol[0] =
new TGeoVolume(
"SpaceFrameUnit0", frameUnit, medAir);
3007 unitVol[1] =
new TGeoVolume(
"SpaceFrameUnit1", frameUnit, medAir);
3008 unitVol[0]->SetVisibility(kFALSE);
3009 unitVol[1]->SetVisibility(kFALSE);
3011 TGeoVolume* next2EndVol[2];
3012 next2EndVol[0] =
new TGeoVolume(
"SpaceFrameNext2EndUnit0", next2EndUnit, medAir);
3013 next2EndVol[1] =
new TGeoVolume(
"SpaceFrameNext2EndUnit1", next2EndUnit, medAir);
3014 next2EndVol[0]->SetVisibility(kFALSE);
3015 next2EndVol[1]->SetVisibility(kFALSE);
3017 TGeoVolume* endVol[2];
3018 endVol[0] =
new TGeoVolume(
"SpaceFrameEndUnit0", endUnit, medAir);
3019 endVol[1] =
new TGeoVolume(
"SpaceFrameEndUnit1", endUnit, medAir);
3020 endVol[0]->SetVisibility(kFALSE);
3021 endVol[1]->SetVisibility(kFALSE);
3026 TGeoXtru* cfStavTop =
3027 createStaveSide(
"CFstavTopCornerVolshape", unitlen / 2., alphaRad, beta, staveLa, staveHa, kTRUE);
3029 TGeoVolume* cfStavTopVol =
new TGeoVolume(
"CFstavTopCornerVol", cfStavTop, medCarbon);
3030 cfStavTopVol->SetLineColor(35);
3032 unitVol[0]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3034 unitVol[1]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3036 next2EndVol[0]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3038 next2EndVol[1]->AddNode(cfStavTopVol, 1,
new TGeoTranslation(0, triangleHeight / 2, 0));
3040 zlen = topVFactorEU * unitlen;
3041 TGeoXtru* cfStavTopEU =
3042 createStaveSide(
"CFstavTopCornerEUVolshape", zlen / 2., alphaRad, beta, staveLa, staveHa, kTRUE);
3044 TGeoVolume* cfStavTopVolEU =
new TGeoVolume(
"CFstavTopCornerEUVol", cfStavTopEU, medCarbon);
3045 cfStavTopVol->SetLineColor(35);
3047 zpos = endUnitBody->GetDZ() - zlen / 2.;
3049 endVol[0]->AddNode(cfStavTopVolEU, 1,
new TGeoTranslation(0, triangleHeight / 2, -zpos));
3051 endVol[1]->AddNode(cfStavTopVolEU, 1,
new TGeoTranslation(0, triangleHeight / 2, -zpos));
3054 TGeoXtru* cfStavSide =
3055 createStaveSide(
"CFstavSideCornerVolshape", unitlen / 2., alphaRad, beta, staveLb, staveHb, kFALSE);
3057 TGeoVolume* cfStavSideVol =
new TGeoVolume(
"CFstavSideCornerVol", cfStavSide, medCarbon);
3058 cfStavSideVol->SetLineColor(35);
3060 unitVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3061 unitVol[0]->AddNode(cfStavSideVol, 2,
3062 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3064 unitVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3065 unitVol[1]->AddNode(cfStavSideVol, 2,
3066 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3068 next2EndVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3069 next2EndVol[0]->AddNode(
3070 cfStavSideVol, 2,
new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3072 next2EndVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3073 next2EndVol[1]->AddNode(
3074 cfStavSideVol, 2,
new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3076 endVol[0]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3077 endVol[0]->AddNode(cfStavSideVol, 2,
3078 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3080 endVol[1]->AddNode(cfStavSideVol, 1,
new TGeoTranslation(halfFrameWidth, -triangleHeight / 2, 0));
3081 endVol[1]->AddNode(cfStavSideVol, 2,
3082 new TGeoCombiTrans(-halfFrameWidth, -triangleHeight / 2, 0,
new TGeoRotation(
"", 90, 180, -90)));
3086 Double_t ribZProj = triangleHeight / TMath::Tan(sidePhiRad);
3087 Double_t sideRibLen =
3088 TMath::Sqrt(ribZProj * ribZProj + triangleHeight * triangleHeight + halfFrameWidth * halfFrameWidth);
3090 TGeoTubeSeg* sideRib =
new TGeoTubeSeg(0, sideRibRadius, sideRibLen / 2, 0, 180);
3091 TGeoVolume* sideRibVol =
new TGeoVolume(
"CFstavSideBeamVol", sideRib, medCarbon);
3092 sideRibVol->SetLineColor(35);
3094 TGeoCombiTrans* sideTransf[4];
3095 xpos = halfFrameWidth / 2 + 0.8 * staveHa * TMath::Cos(alphaRad / 2);
3096 ypos = -sideRibRadius / 2;
3099 sideTransf[0] =
new TGeoCombiTrans(xpos, ypos, -zpos,
new TGeoRotation(
"", 90 - alphaDeg, -sidePhiDeg, -90));
3100 sideTransf[1] =
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 90 - alphaDeg, sidePhiDeg, -90));
3101 sideTransf[2] =
new TGeoCombiTrans(-xpos, ypos, -zpos,
new TGeoRotation(
"", 90 + alphaDeg, sidePhiDeg, -90));
3102 sideTransf[3] =
new TGeoCombiTrans(-xpos, ypos, zpos,
new TGeoRotation(
"", 90 + alphaDeg, -sidePhiDeg, -90));
3104 unitVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3105 unitVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3106 unitVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3107 unitVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3109 unitVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3110 unitVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3111 unitVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3112 unitVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3114 next2EndVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3115 next2EndVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3116 next2EndVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3117 next2EndVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3119 next2EndVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3120 next2EndVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3121 next2EndVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3122 next2EndVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3124 endVol[0]->AddNode(sideRibVol, 1, sideTransf[0]);
3125 endVol[0]->AddNode(sideRibVol, 2, sideTransf[1]);
3126 endVol[0]->AddNode(sideRibVol, 3, sideTransf[2]);
3127 endVol[0]->AddNode(sideRibVol, 4, sideTransf[3]);
3129 endVol[1]->AddNode(sideRibVol, 1, sideTransf[0]);
3130 endVol[1]->AddNode(sideRibVol, 2, sideTransf[1]);
3131 endVol[1]->AddNode(sideRibVol, 3, sideTransf[2]);
3132 endVol[1]->AddNode(sideRibVol, 4, sideTransf[3]);
3136 Double_t baseRibLen = 0.98 * 2 * halfFrameWidth / TMath::Sin(basePhiRad);
3138 TGeoTubeSeg* baseRib1 =
new TGeoTubeSeg(0, baseRibRadius, baseRibLen / 2, 0, 180);
3139 TGeoVolume* baseRib1Vol =
new TGeoVolume(
"CFstavBaseBeam1Vol", baseRib1, medCarbon);
3140 baseRib1Vol->SetLineColor(35);
3142 TGeoTubeSeg* baseRib2 =
new TGeoTubeSeg(0, baseRibRadius, halfFrameWidth, 0, 90);
3143 TGeoVolume* baseRib2Vol =
new TGeoVolume(
"CFstavBaseBeam2Vol", baseRib2, medCarbon);
3144 baseRib2Vol->SetLineColor(35);
3146 TGeoTubeSeg* baseEndRib =
new TGeoTubeSeg(0, baseRibRadius, halfFrameWidth, 0, 180);
3147 TGeoVolume* baseEndRibVol =
new TGeoVolume(
"CFstavBaseEndBeamVol", baseEndRib, medCarbon);
3148 baseEndRibVol->SetLineColor(35);
3150 TGeoCombiTrans* baseTransf[6];
3151 ypos = triangleHeight / 2;
3154 baseTransf[0] =
new TGeoCombiTrans(
"", 0, -ypos, -zpos,
new TGeoRotation(
"", 90, 90, 90));
3155 baseTransf[1] =
new TGeoCombiTrans(
"", 0, -ypos, zpos,
new TGeoRotation(
"", -90, 90, -90));
3156 baseTransf[2] =
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", -90, basePhiDeg, -90));
3157 baseTransf[3] =
new TGeoCombiTrans(0, -ypos, 0,
new TGeoRotation(
"", -90, -basePhiDeg, -90));
3158 zpos -= baseEndRib->GetRmax();
3159 baseTransf[4] =
new TGeoCombiTrans(
"", 0, -ypos, -zpos,
new TGeoRotation(
"", 90, 90, 90));
3160 baseTransf[5] =
new TGeoCombiTrans(
"", 0, -ypos, zpos,
new TGeoRotation(
"", 90, 90, 90));
3162 unitVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3163 unitVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3164 unitVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3166 unitVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3167 unitVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3168 unitVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3170 next2EndVol[0]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3171 next2EndVol[0]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3172 next2EndVol[0]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3174 next2EndVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3175 next2EndVol[1]->AddNode(baseRib2Vol, 2, baseTransf[1]);
3176 next2EndVol[1]->AddNode(baseRib1Vol, 1, baseTransf[3]);
3178 endVol[0]->AddNode(baseEndRibVol, 1, baseTransf[4]);
3179 endVol[0]->AddNode(baseRib2Vol, 1, baseTransf[1]);
3180 endVol[0]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3182 endVol[1]->AddNode(baseEndRibVol, 1, baseTransf[5]);
3183 endVol[1]->AddNode(baseRib2Vol, 1, baseTransf[0]);
3184 endVol[1]->AddNode(baseRib1Vol, 1, baseTransf[2]);
3187 ypos = -triangleHeight / 2 + cfStavSide->GetY(3);
3189 createOBSpaceFrameConnector(endVol[0], ypos, zpos, kFALSE);
3190 createOBSpaceFrameConnector(endVol[1], ypos, zpos, kTRUE);
3194 xtru[0] = ulegHalfLen;
3197 ytru[1] = -ulegHigh1;
3198 xtru[2] = xtru[1] - ulegThick;
3201 ytru[3] = ytru[0] - ulegThick;
3202 for (Int_t
i = 0;
i < 4;
i++) {
3203 xtru[
i + 4] = -xtru[3 -
i];
3204 ytru[
i + 4] = ytru[3 -
i];
3207 TGeoXtru* uleg1full =
new TGeoXtru(2);
3208 uleg1full->DefinePolygon(8, xtru, ytru);
3209 uleg1full->DefineSection(0, -ulegHalfWidth);
3210 uleg1full->DefineSection(1, ulegHalfWidth);
3212 TGeoXtru* uleg1half =
new TGeoXtru(2);
3213 uleg1half->DefinePolygon(8, xtru, ytru);
3214 uleg1half->DefineSection(0, -ulegHalfWidth / 2);
3215 uleg1half->DefineSection(1, ulegHalfWidth / 2);
3217 TGeoVolume* uleg1fullVol =
new TGeoVolume(
"CFstavULeg1FullVol", uleg1full, medF6151B05M);
3218 uleg1fullVol->SetLineColor(35);
3220 TGeoVolume* uleg1halfVol =
new TGeoVolume(
"CFstavULeg1HalfVol", uleg1half, medF6151B05M);
3221 uleg1halfVol->SetLineColor(35);
3224 ytru[1] = -ulegHigh2;
3225 ytru[2] = -ulegHigh2;
3226 ytru[5] = -ulegHigh2;
3227 ytru[6] = -ulegHigh2;
3229 TGeoXtru* uleg2full =
new TGeoXtru(2);
3230 uleg2full->DefinePolygon(8, xtru, ytru);
3231 uleg2full->DefineSection(0, -ulegHalfWidth);
3232 uleg2full->DefineSection(1, ulegHalfWidth);
3234 TGeoXtru* uleg2half =
new TGeoXtru(2);
3235 uleg2half->DefinePolygon(8, xtru, ytru);
3236 uleg2half->DefineSection(0, -ulegHalfWidth / 2);
3237 uleg2half->DefineSection(1, ulegHalfWidth / 2);
3239 TGeoVolume* uleg2fullVol =
new TGeoVolume(
"CFstavULeg2FullVol", uleg2full, medF6151B05M);
3240 uleg2fullVol->SetLineColor(35);
3242 TGeoVolume* uleg2halfVol =
new TGeoVolume(
"CFstavULeg2HalfVol", uleg2half, medF6151B05M);
3243 uleg2halfVol->SetLineColor(35);
3245 xpos = sOBSFrameULegXPos;
3246 ypos = triangleHeight / 2 + baseRibRadius;
3247 zpos = unitlen / 2 - uleg1half->GetZ(1);
3249 unitVol[0]->AddNode(uleg1halfVol, 1,
3250 new TGeoTranslation(xpos, -ypos, -zpos));
3251 unitVol[0]->AddNode(uleg1halfVol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
3253 unitVol[1]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3254 unitVol[1]->AddNode(uleg1halfVol, 2,
new TGeoTranslation(xpos, -ypos, zpos));
3256 unitVol[0]->AddNode(uleg2halfVol, 1,
3257 new TGeoTranslation(-xpos, -ypos, -zpos));
3258 unitVol[0]->AddNode(uleg2halfVol, 2,
new TGeoTranslation(-xpos, -ypos, zpos));
3260 unitVol[1]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3261 unitVol[1]->AddNode(uleg2halfVol, 2,
new TGeoTranslation(-xpos, -ypos, zpos));
3263 next2EndVol[0]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, zpos));
3264 next2EndVol[0]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, zpos));
3266 next2EndVol[1]->AddNode(uleg1halfVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3267 next2EndVol[1]->AddNode(uleg2halfVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3269 zpos = unitlen / 2 - uleg1full->GetZ(1);
3270 next2EndVol[0]->AddNode(uleg1fullVol, 1,
new TGeoTranslation(xpos, -ypos, -zpos));
3271 next2EndVol[0]->AddNode(uleg2fullVol, 1,
new TGeoTranslation(-xpos, -ypos, -zpos));
3273 next2EndVol[1]->AddNode(uleg1fullVol, 1,
new TGeoTranslation(xpos, -ypos, zpos));
3274 next2EndVol[1]->AddNode(uleg2fullVol, 1,
new TGeoTranslation(-xpos, -ypos, zpos));
3280void V3Layer::createOBSpaceFrameConnector(TGeoVolume* mother,
const Double_t ymot,
const Double_t zmot,
const Bool_t sideA,
const TGeoManager* mgr)
3300 TGeoMedium* medPEEK = mgr->GetMedium(Form(
"%s_PEEKCF30$",
GetDetName()));
3303 TString connName, compoShape;
3305 Double_t xlen, ylen, zlen;
3306 Double_t xpos, ypos, zpos;
3307 Double_t xtru[6], ytru[6];
3310 ylen = sOBSFrameConnTotHei - sOBSFrameConnInsHei;
3312 xtru[0] = sOBSFrameConnWidth / 2.;
3315 ytru[1] = sOBSFrameConnInsHei;
3316 xtru[2] = xtru[1] - ylen;
3317 ytru[2] = sOBSFrameConnTotHei;
3318 for (Int_t
i = 0;
i < 3;
i++) {
3319 xtru[
i + 3] = -xtru[2 -
i];
3320 ytru[
i + 3] = ytru[2 -
i];
3323 TGeoXtru* topConn =
new TGeoXtru(2);
3324 topConn->SetName(
"connectorTop");
3325 topConn->DefinePolygon(6, xtru, ytru);
3326 topConn->DefineSection(0, 0.);
3327 topConn->DefineSection(1, sOBSFrameConnTopLen);
3330 zlen = sOBSFrameConnTotLen - sOBSFrameConnTopLen;
3332 xtru[0] = sOBSFrameConnInsBase / 2.;
3334 xtru[1] = sOBSFrameConnInsWide / 2.;
3335 ytru[1] = sOBSFrameConnInsHei;
3341 TGeoXtru* insConn =
new TGeoXtru(2);
3342 insConn->SetName(
"connectorIns");
3343 insConn->DefinePolygon(4, xtru, ytru);
3344 insConn->DefineSection(0, -zlen);
3345 insConn->DefineSection(1, 0.);
3348 TGeoTube* topHoleR =
new TGeoTube(
"topholer", 0., sOBSFrameConnTopHoleD / 2., 1.1 * sOBSFrameConnTotHei);
3350 xpos = sOBSFrConnTopHoleXDist / 2.;
3351 ypos = sOBSFrameConnTotHei / 2.;
3352 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos;
3353 TGeoCombiTrans* topHoleR1Trans =
new TGeoCombiTrans(
"topholer1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3354 topHoleR1Trans->RegisterYourself();
3356 TGeoCombiTrans* topHoleR2Trans =
new TGeoCombiTrans(
"topholer2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3357 topHoleR2Trans->RegisterYourself();
3359 xpos = sOBSFrConnCHoleXDist / 2.;
3360 zpos = sOBSFrameConnTopLen - sOBSFrameConnCHoleZPos;
3361 TGeoCombiTrans* topCHoleR1Trans =
new TGeoCombiTrans(
"topcholer1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3362 topCHoleR1Trans->RegisterYourself();
3364 TGeoCombiTrans* topCHoleR2Trans =
new TGeoCombiTrans(
"topcholer2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3365 topCHoleR2Trans->RegisterYourself();
3367 TGeoBBox* topAHole =
new TGeoBBox(
"topahole", sOBSFrameConnAHoleWid / 2., sOBSFrameConnTotHei, sOBSFrameConnAHoleLen / 2.);
3369 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos;
3370 TGeoTranslation* topAHoleTrans =
new TGeoTranslation(
"topaholetr", 0, ypos, zpos);
3371 topAHoleTrans->RegisterYourself();
3373 TGeoTube* topCHole =
new TGeoTube(
"topchole", 0., sOBSFrConnCTopHoleD / 2., sOBSFrameConnTotHei);
3375 TGeoCombiTrans* topCHoleTrans =
new TGeoCombiTrans(
"topcholetr", 0, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3376 topCHoleTrans->RegisterYourself();
3378 TGeoTube* topASide =
new TGeoTube(
"topaside", 0., sOBSFrConnASideHoleD / 2., 1.1 * sOBSFrConnASideHoleL);
3380 zpos = sOBSFrameConnTopLen + topASide->GetDz() - sOBSFrConnASideHoleL;
3381 TGeoTranslation* topASideTrans =
new TGeoTranslation(
"topasidetr", 0, sOBSFrConnASideHoleY, zpos);
3382 topASideTrans->RegisterYourself();
3385 TGeoTube* insHole =
new TGeoTube(
"inshole", 0., sOBSFrameConnInsHoleD / 2., sOBSFrameConnInsHei);
3387 xpos = sOBSFrameConnInsHoleX / 2.;
3388 ypos = sOBSFrameConnInsHei / 2.;
3389 zpos = sOBSFrameConnTopLen - sOBSFrameConnHoleZPos - sOBSFrameConnHoleZDist;
3390 TGeoCombiTrans* insHole1Trans =
new TGeoCombiTrans(
"inshole1tr", xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3391 insHole1Trans->RegisterYourself();
3393 TGeoCombiTrans* insHole2Trans =
new TGeoCombiTrans(
"inshole2tr", -xpos, ypos, zpos,
new TGeoRotation(
"", 0, 90, 0));
3394 insHole2Trans->RegisterYourself();
3398 connName =
"OBSFConnectorA";
3399 compoShape =
"(connectorTop-topholer:topholer2tr-topholer:topholer1tr-topahole:topaholetr-topaside:topasidetr)+(connectorIns-inshole:inshole1tr-inshole:inshole2tr)";
3401 connName =
"OBSFConnectorC";
3402 compoShape =
"(connectorTop-topholer:topholer2tr-topholer:topholer1tr-topholer:topcholer1tr-topholer:topcholer2tr-topchole:topcholetr)+(connectorIns-inshole:inshole1tr-inshole:inshole2tr)";
3405 TGeoCompositeShape* obsfConnSh =
new TGeoCompositeShape(compoShape.Data());
3407 TGeoVolume* obsfConnVol =
new TGeoVolume(connName, obsfConnSh, medPEEK);
3410 mother->AddNode(obsfConnVol, 1,
new TGeoTranslation(0, ymot, zmot));
3413TGeoVolume* V3Layer::createModuleOuterB(
const TGeoManager* mgr)
3435 const Int_t nameLen = 30;
3436 char chipName[nameLen], sensName[nameLen], volName[nameLen];
3438 Double_t xGap = sOBChipXGap;
3439 Double_t
zGap = sOBChipZGap;
3441 Double_t xchip, ychip, zchip;
3442 Double_t xlen, ylen, zlen;
3443 Double_t xpos, ypos, zpos;
3450 if (mBuildLevel < 7) {
3460 ylen = 0.5 * sOBChipThickness;
3464 xchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDX();
3465 ychip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDY();
3466 zchip = (
static_cast<TGeoBBox*
>(chipVol->GetShape()))->GetDZ();
3468 mOBModuleZLength = 2 * zchip * sOBChipsPerRow + (sOBChipsPerRow - 1) * sOBChipZGap;
3470 zlen = mOBModuleZLength / 2;
3473 xlen = (4 * xchip + xGap) / 2;
3474 ylen = sOBGlueFPCThick / 2;
3477 ylen = sOBGlueColdPlThick / 2;
3481 xlen = sOBFlexCableXWidth / 2;
3482 ylen = sOBFlexCableKapThick / 2;
3485 TGeoVolume* cuGndCableVol = createOBFPCCuGnd(zlen);
3486 TGeoVolume* cuSignalCableVol = createOBFPCCuSig(zlen);
3489 Double_t ygnd = (
static_cast<TGeoBBox*
>(cuGndCableVol->GetShape()))->GetDY();
3490 Double_t ysig = (
static_cast<TGeoBBox*
>(cuSignalCableVol->GetShape()))->GetDY();
3492 xlen = (
static_cast<TGeoBBox*
>(cuGndCableVol->GetShape()))->GetDX();
3494 ylen = glueCP->GetDY() + ychip + glueFPC->GetDY() + ysig + flexKap->GetDY() + ygnd + sOBFPCCapacitorYHi / 2;
3495 TGeoBBox*
module = new TGeoBBox("OBModule", xlen, ylen, zlen);
3499 TGeoMedium* medAir = mgr->GetMedium(Form(
"%s_AIR$",
GetDetName()));
3500 TGeoMedium* medGlue = mgr->GetMedium(Form(
"%s_GLUE$",
GetDetName()));
3501 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3503 TGeoVolume* glueFPCVol =
new TGeoVolume(
"GlueFPCVol", glueFPC, medGlue);
3504 glueFPCVol->SetLineColor(kBlack);
3505 glueFPCVol->SetFillColor(glueFPCVol->GetLineColor());
3506 glueFPCVol->SetFillStyle(4000);
3508 TGeoVolume* glueCPVol =
new TGeoVolume(
"GlueColdPlVol", glueCP, medGlue);
3509 glueCPVol->SetLineColor(kBlack);
3510 glueCPVol->SetFillColor(glueCPVol->GetLineColor());
3511 glueCPVol->SetFillStyle(4000);
3513 TGeoVolume* flexKapVol =
new TGeoVolume(
"FPCMidKapVol", flexKap, medKapton);
3514 flexKapVol->SetLineColor(kGreen);
3515 flexKapVol->SetFillColor(flexKapVol->GetLineColor());
3516 flexKapVol->SetFillStyle(4000);
3519 TGeoVolume* modVol =
new TGeoVolume(volName, module, medAir);
3520 modVol->SetVisibility(kTRUE);
3523 ypos = -
module->GetDY() + glueCP->GetDY();
3525 if (mBuildLevel < 3) {
3526 modVol->AddNode(glueCPVol, 1,
new TGeoTranslation(0, ypos, 0));
3529 xpos = xchip + xGap / 2;
3530 ypos += (ychip + glueCP->GetDY());
3536 for (Int_t k = 0; k < sOBChipsPerRow; k++)
3538 zpos =
module->GetDZ() - zchip - k * (2 * zchip + zGap);
3539 modVol->AddNode(chipVol, k,
new TGeoCombiTrans(xpos, ypos, zpos,
new TGeoRotation(
"", 0, 180, 180)));
3540 mHierarchy[
kChip] += 1;
3543 for (Int_t k = 0; k < sOBChipsPerRow; k++)
3545 zpos = -
module->GetDZ() + zchip + k * (2 * zchip + zGap);
3546 modVol->AddNode(chipVol, k + sOBChipsPerRow,
new TGeoTranslation(-xpos, ypos, zpos));
3547 mHierarchy[
kChip] += 1;
3550 ypos += (ychip + glueFPC->GetDY());
3551 if (mBuildLevel < 3) {
3552 modVol->AddNode(glueFPCVol, 1,
new TGeoTranslation(0, ypos, 0));
3554 ypos += glueFPC->GetDY();
3556 if (mBuildLevel < 5) {
3558 modVol->AddNode(cuSignalCableVol, 1,
new TGeoTranslation(0, ypos, 0));
3560 ypos += (ysig + flexKap->GetDY());
3561 modVol->AddNode(flexKapVol, 1,
new TGeoTranslation(0, ypos, 0));
3563 ypos += (flexKap->GetDY() + ygnd);
3564 modVol->AddNode(cuGndCableVol, 1,
new TGeoTranslation(0, ypos, 0));
3569 createOBFPCCapacitors(modVol, xlen, zlen, ypos);
3575TGeoVolume* V3Layer::createOBFPCCuGnd(
const Double_t zcable,
const TGeoManager* mgr)
3592 Double_t xcable, ytot, ypos;
3595 xcable = sOBFlexCableXWidth / 2;
3596 ytot = sOBFPCSoldMaskThick + sOBFPCCopperThick;
3598 xcable *= sOBFPCCuAreaFracGnd;
3602 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3603 TGeoMedium* medCopper = mgr->GetMedium(Form(
"%s_COPPER$",
GetDetName()));
3605 TGeoVolume* soldmaskVol =
new TGeoVolume(
"FPCGndSolderMask", soldmask, medKapton);
3606 soldmaskVol->SetLineColor(kBlue);
3607 soldmaskVol->SetFillColor(kBlue);
3609 TGeoVolume* copperVol =
new TGeoVolume(
"FPCCopperGround", copper, medCopper);
3610 copperVol->SetLineColor(kCyan);
3611 copperVol->SetFillColor(kCyan);
3613 ypos = -soldmask->GetDY() + copper->GetDY();
3614 if (mBuildLevel < 1) {
3615 soldmaskVol->AddNode(copperVol, 1,
new TGeoTranslation(0, ypos, 0));
3621TGeoVolume* V3Layer::createOBFPCCuSig(
const Double_t zcable,
const TGeoManager* mgr)
3638 Double_t xcable, ytot, ypos;
3641 xcable = sOBFlexCableXWidth / 2;
3642 ytot = sOBFPCSoldMaskThick + sOBFPCCopperThick;
3644 xcable *= sOBFPCCuAreaFracSig;
3648 TGeoMedium* medKapton = mgr->GetMedium(Form(
"%s_KAPTON(POLYCH2)$",
GetDetName()));
3649 TGeoMedium* medCopper = mgr->GetMedium(Form(
"%s_COPPER$",
GetDetName()));
3651 TGeoVolume* soldmaskVol =
new TGeoVolume(
"FPCSigSolderMask", soldmask, medKapton);
3652 soldmaskVol->SetLineColor(kBlue);
3653 soldmaskVol->SetFillColor(kBlue);
3655 TGeoVolume* copperVol =
new TGeoVolume(
"FPCCopperSignal", copper, medCopper);
3656 copperVol->SetLineColor(kCyan);
3657 copperVol->SetFillColor(kCyan);
3659 ypos = soldmask->GetDY() - copper->GetDY();
3660 if (mBuildLevel < 1) {
3661 soldmaskVol->AddNode(copperVol, 1,
new TGeoTranslation(0, ypos, 0));
3667void V3Layer::createOBFPCCapacitors(TGeoVolume* modvol, Double_t xmodlen, Double_t zmodlen, Double_t yzero,
const TGeoManager* mgr)
3691 const Int_t nGroups = 10;
3692 const Double_t xyCapacitors[nGroups][2] = {
3693 {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}};
3695 const Double_t deltaYCapacitors = 30 *
sMm;
3697 const Int_t nCapacitors[nGroups] = {7, 7, 7, 7, 5, 5, 5, 7, 5, 7};
3699 const Double_t xyCapacitorSingle[8][2] = {
3700 {14.91 *
sMm, 18.78 *
sMm},
3701 {195.81 *
sMm, 18.78 *
sMm},
3702 {15.11 *
sMm, 14.23 *
sMm},
3703 {196.01 *
sMm, 14.23 *
sMm},
3704 {34.20 *
sMm, 13.54 *
sMm},
3705 {36.59 *
sMm, 10.33 *
sMm},
3706 {7.73 *
sMm, 13.54 *
sMm},
3707 {11.44 *
sMm, 12.13 *
sMm},
3711 Double_t xpos, ypos, zpos;
3714 TGeoVolume* capacitorOB;
3719 capacitorOB = mgr->GetVolume(
"OBFPCCapacitor");
3722 TGeoBBox* capacit =
new TGeoBBox(sOBFPCCapacitorXWid / 2, sOBFPCCapacitorYHi / 2, sOBFPCCapacitorZLen / 2);
3724 TGeoMedium* medCeramic = mgr->GetMedium(Form(
"%s_CERAMIC$",
GetDetName()));
3726 capacitorOB =
new TGeoVolume(
"OBFPCCapacitor", capacit, medCeramic);
3727 capacitorOB->SetLineColor(kBlack);
3728 capacitorOB->SetFillColor(kBlack);
3732 ypos = yzero + sOBFPCCapacitorYHi / 2;
3735 for (Int_t jgrp = 0; jgrp < nGroups; jgrp++) {
3736 xpos = xyCapacitors[jgrp][1] - xmodlen;
3737 for (Int_t jcap = 0; jcap < nCapacitors[jgrp]; jcap++) {
3738 zpos = xyCapacitors[jgrp][0] - zmodlen + jcap * deltaYCapacitors;
3740 modvol->AddNode(capacitorOB, idCapacitor,
new TGeoTranslation(xpos, ypos, zpos));
3745 for (Int_t jcap = 0; jcap < 8; jcap++) {
3746 xpos = xyCapacitorSingle[jcap][1] - xmodlen;
3747 zpos = xyCapacitorSingle[jcap][0] - zmodlen;
3749 modvol->AddNode(capacitorOB, idCapacitor,
new TGeoTranslation(xpos, ypos, zpos));
3755Double_t V3Layer::radiusOmTurboContainer()
3757 Double_t rr, delta,
z, lstav, rstav;
3759 if (mChipThickness > 89.) {
3763 rstav = mLayerRadius + 0.5 * mChipThickness;
3764 delta = (0.5 * mChipThickness) /
cosD(mStaveTilt);
3765 z = (0.5 * mChipThickness) *
tanD(mStaveTilt);
3768 lstav = (0.5 * mStaveWidth) -
z;
3770 if ((rr *
sinD(mStaveTilt) < lstav)) {
3771 return (rr *
cosD(mStaveTilt));
3779 if (mLayerNumber < sNumberOfInnerLayers) {
3782 mNumberOfModules = u;
3783 mNumberOfChips = sOBChipsPerRow;
3792 LOG(error) <<
"Not a Turbo layer";
3801 LOG(error) <<
"Not a Turbo layer";
3805TGeoXtru* V3Layer::createStaveSide(
const char*
name, Double_t dz, Double_t
alpha, Double_t beta, Double_t L, Double_t H,
3822 Double_t xv[nv], yv[nv];
3824 TGeoXtru* cfStavSide =
new TGeoXtru(2);
3825 cfStavSide->SetName(
name);
3827 Double_t theta = TMath::PiOver2() - beta;
3828 Double_t gamma = beta -
alpha;
3833 xv[2] = L * TMath::Sin(
alpha);
3834 yv[2] = -L * TMath::Cos(
alpha);
3835 xv[1] = xv[2] - H * TMath::Cos(
alpha);
3836 yv[1] = yv[2] - H * TMath::Sin(
alpha);
3838 yv[0] = yv[1] + TMath::Tan(theta) * xv[1];
3844 Double_t
m = -TMath::Tan(
alpha),
n = TMath::Tan(gamma);
3847 xv[1] = -L * TMath::Cos(2 *
alpha);
3848 yv[1] = L * TMath::Sin(2 *
alpha);
3849 xv[2] = xv[1] - H * TMath::Sin(2 *
alpha);
3850 yv[2] = yv[1] - H * TMath::Cos(2 *
alpha);
3855 xv[3] = (yv[4] -
n * xv[4]) / (
m -
n);
3859 cfStavSide->DefinePolygon(nv, xv, yv);
3860 cfStavSide->DefineSection(0, -dz);
3861 cfStavSide->DefineSection(1, dz);
3866TGeoCombiTrans* V3Layer::createCombiTrans(
const char*
name, Double_t dy, Double_t dz, Double_t dphi, Bool_t planeSym)
3868 TGeoTranslation
t1(dy *
cosD(90. + dphi), dy *
sinD(90. + dphi), dz);
3869 TGeoRotation r1(
"", 0., 0., dphi);
3870 TGeoRotation r2(
"", 90, 180, -90 - dphi);
3872 TGeoCombiTrans* combiTrans1 =
new TGeoCombiTrans(
name);
3873 combiTrans1->SetTranslation(
t1);
3875 combiTrans1->SetRotation(r1);
3877 combiTrans1->SetRotation(r2);
3882void V3Layer::addTranslationToCombiTrans(TGeoCombiTrans* ct, Double_t dx, Double_t dy, Double_t dz)
const
3885 const Double_t*
vect = ct->GetTranslation();
3886 Double_t newVect[3] = {
vect[0] + dx,
vect[1] + dy,
vect[2] + dz};
3887 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"