20#include <TGeoCompositeShape.h>
22#include <TGeoVolume.h>
36 : mLayerNumber(layerNumber), mLayerName(layerName), mInnerRadius(rInn), mLength(
length)
53 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
56 TGeoVolume* sensVol =
new TGeoVolume(sensName.c_str(), sensor, medSi);
57 sensVol->SetLineColor(kYellow);
64 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
67 TGeoVolume* metalVol =
new TGeoVolume(metalName.c_str(), metalStack, medSi);
68 metalVol->SetLineColor(kGray);
75 TGeoMedium* medAir = gGeoManager->GetMedium(
"TRK_AIR$");
77 TGeoVolume* layerVol =
new TGeoVolume(
mLayerName.c_str(),
layer, medAir);
78 layerVol->SetLineColor(kYellow);
81 LOGP(
debug,
"Inserting {} in {} ", sensVol->GetName(), layerVol->GetName());
82 layerVol->AddNode(sensVol, 1,
nullptr);
85 LOGP(
debug,
"Inserting {} in {} ", metalVol->GetName(), layerVol->GetName());
86 layerVol->AddNode(metalVol, 1,
nullptr);
88 LOGP(
debug,
"Inserting {} in {} ", layerVol->GetName(), motherVolume->GetName());
89 motherVolume->AddNode(layerVol, 1,
nullptr);
95 :
TRKCylindricalLayer(layerNumber, layerName, rInn, numberOfModules * sModuleLength, thickOrX2X0,
mode), mTiltAngle(tiltAngle), mNumberOfStaves(numberOfStaves), mNumberOfModules(numberOfModules)
97 assert(numberOfStaves % 2 == 0 &&
"Error: numberOfStaves must be even!");
102 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
105 TGeoVolume* sensVol =
new TGeoVolume(sensName.c_str(), sensor, medSi);
106 sensVol->SetLineColor(kYellow);
113 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
116 TGeoVolume* deadVol =
new TGeoVolume(deadName.c_str(), deadzone, medSi);
117 deadVol->SetLineColor(kGray);
124 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
127 TGeoVolume* metalVol =
new TGeoVolume(metalName.c_str(), metalStack, medSi);
128 metalVol->SetLineColor(kGray);
135 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
138 TGeoVolume* chipVol =
new TGeoVolume(chipName.c_str(), chip, medSi);
139 chipVol->SetLineColor(kYellow);
144 TGeoCombiTrans* transSens =
new TGeoCombiTrans();
145 TGeoCombiTrans* transDead =
new TGeoCombiTrans();
146 TGeoCombiTrans* transMetal =
new TGeoCombiTrans();
152 transMetal->SetTranslation(0, metalY, 0);
154 chipVol->AddNode(sensVol, 1, transSens);
155 chipVol->AddNode(deadVol, 1, transDead);
156 chipVol->AddNode(metalVol, 1, transMetal);
163 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
165 TGeoShape*
module = new TGeoBBox(sModuleWidth / 2, mChipThickness / 2, sModuleLength / 2);
166 TGeoVolume* moduleVol =
new TGeoVolume(moduleName.c_str(), module, medSi);
167 moduleVol->SetLineColor(kYellow);
173 TGeoCombiTrans* transLeft =
new TGeoCombiTrans();
174 transLeft->SetTranslation(xLeft, 0, zLeft);
175 TGeoRotation* rot =
new TGeoRotation();
177 transLeft->SetRotation(rot);
178 LOGP(
debug,
"Inserting {} in {} ", chipVolLeft->GetName(), moduleVol->GetName());
179 moduleVol->AddNode(chipVolLeft, iChip * 2, transLeft);
184 TGeoCombiTrans* transRight =
new TGeoCombiTrans();
185 transRight->SetTranslation(xRight, 0, zRight);
186 LOGP(
debug,
"Inserting {} in {} ", chipVolRight->GetName(), moduleVol->GetName());
187 moduleVol->AddNode(chipVolRight, iChip * 2 + 1, transRight);
196 const float staveSizeX = staveWidth;
207 double u_max = avgRadius * std::sin(
alpha) + staveSizeX / 2.0;
208 double v_max = avgRadius * std::cos(
alpha) + staveSizeY / 2.0;
209 double radiusMax = std::sqrt(u_max * u_max + v_max * v_max);
212 double perpDistance = avgRadius * std::cos(
alpha) - staveSizeY / 2.0;
215 double projDistance = avgRadius * std::sin(
alpha);
218 if (projDistance <= staveSizeX / 2.0) {
221 radiusMin = perpDistance;
224 double u_min = projDistance - staveSizeX / 2.0;
225 radiusMin = std::sqrt(u_min * u_min + perpDistance * perpDistance);
229 const float precisionMargin = 0.05f;
231 return {radiusMin - precisionMargin, radiusMax + precisionMargin};
236TRKMLLayer::TRKMLLayer(
int layerNumber, std::string layerName,
float rInn,
float staggerOffset,
float tiltAngle,
int numberOfStaves,
int numberOfModules,
float thickOrX2X0,
MatBudgetParamMode mode,
int rInnRow,
float phiOffset)
237 :
TRKSegmentedLayer(layerNumber, layerName, rInn, tiltAngle, numberOfStaves, numberOfModules, thickOrX2X0,
mode), mStaggerOffset(staggerOffset), mRInnRow(rInnRow), mPhiOffset(phiOffset)
239 if (mPhiOffset != 0.f) {
240 LOGP(info,
"Layer {}: staves rotated by {} deg about the beam axis (phiOffset)",
mLayerNumber, mPhiOffset);
246 mStaggerOffset = -staggerOffset;
247 LOGP(info,
"Layer {} is flipped: sensor and metal stack positions are switched",
mLayerNumber);
249 if (mRInnRow != 0 && mRInnRow != 1) {
250 LOGP(fatal,
"Layer {}: rInnRow = {}, use 0 (even staves at rInn) or 1 (odd staves at rInn)",
mLayerNumber, mRInnRow);
256 LOGP(info,
"Layer {} (staggered): even staves in the {} row (rInnRow = {})",
mLayerNumber,
mIsFlipped ?
"inner" :
"outer", mRInnRow);
258 LOGP(info,
"Layer {} is not staggered: rInnRow = {} has no effect",
mLayerNumber, mRInnRow);
267 TGeoVolume* staveVol =
new TGeoVolumeAssembly(staveName.c_str());
268 staveVol->SetLineColor(kYellow);
273 TGeoCombiTrans* trans =
new TGeoCombiTrans();
274 trans->SetTranslation(0, 0, zPos);
275 LOGP(
debug,
"Inserting {} in {} ", moduleVol->GetName(), staveVol->GetName());
276 staveVol->AddNode(moduleVol, iModule, trans);
281 TGeoCombiTrans* tCard =
new TGeoCombiTrans();
283 staveVol->AddNode(createEndOfStaveCard(), 0, tCard);
288TGeoVolume* TRKMLLayer::createEndOfStaveCard()
293 TGeoMedium* medFR4 = gGeoManager->GetMedium(
"TRK_FR4$");
294 TGeoMedium* medCu = gGeoManager->GetMedium(
"TRK_COPPER$");
298 TGeoVolume* cardVol =
new TGeoVolume(
name.c_str(), board, medFR4);
299 cardVol->SetLineColor(kGreen + 3);
304 LOGP(fatal,
"TRKBase.mlEosCardCuThickness = {} cm x {} planes does not fit in the {} cm ML end-of-stave card",
308 TGeoVolume* planeVol =
new TGeoVolume((
name +
"_Cu").c_str(), plane, medCu);
309 planeVol->SetLineColor(kOrange + 7);
313 for (
int iPlane = 0; iPlane < nPlanes; iPlane++) {
314 const double y = (nPlanes > 1) ? -span / 2 + iPlane * span / (nPlanes - 1) : 0.;
315 cardVol->AddNode(planeVol, iPlane,
new TGeoTranslation(0,
y, 0));
324 auto [rMin, rMax] = getBoundingRadii(sStaveWidth);
326 TGeoMedium* medAir = gGeoManager->GetMedium(
"TRK_AIR$");
330 TGeoTube*
layer =
new TGeoTube(rMin, rMax, halfLengthZ);
331 TGeoVolume* layerVol =
new TGeoVolume(
mLayerName.c_str(),
layer, medAir);
332 layerVol->SetLineColor(kYellow);
340 const double avgRadiusOuter = avgRadiusInner + mStaggerOffset;
344 double theta1 = std::atan(sStaveWidth / 2 /
mInnerRadius);
345 double st = std::sin(theta);
346 double ct = std::cos(theta);
349 LOGP(info,
"Creating a layer with {} staves and {} mm overlap",
mNumberOfStaves, overlap * 10);
353 TGeoCombiTrans* trans =
new TGeoCombiTrans();
356 double phi = ((
mNumberOfStaves % 4 == 0) ? theta * (iStave + 0.5) : theta * iStave) + mPhiOffset * TMath::DegToRad();
357 double phiDeg = phi * TMath::RadToDeg();
358 TGeoRotation* rot =
new TGeoRotation(
"rot", phiDeg + 90 +
mTiltAngle, 0, 0);
359 trans->SetRotation(rot);
361 float trueRadius = (
mLayerNumber == 3 ||
mLayerNumber == 4) ? (iStave % 2 == mRInnRow ? avgRadiusInner : avgRadiusOuter) : avgRadiusInner;
362 trans->SetTranslation(trueRadius * std::cos(phi), trueRadius * std::sin(phi), 0);
363 LOGP(
debug,
"Inserting {} in {} ", staveVol->GetName(), layerVol->GetName());
364 layerVol->AddNode(staveVol, iStave, trans);
367 LOGP(
debug,
"Inserting {} in {} ", layerVol->GetName(), motherVolume->GetName());
368 motherVolume->AddNode(layerVol, 1,
nullptr);
371std::pair<float, float> TRKMLLayer::getBoundingRadii(
double staveWidth)
const
378 return {defaultRadiusMin, defaultRadiusMax};
393 const float avgRadiusStaggered = avgRadiusInner + mStaggerOffset;
395 const float staveSizeX = staveWidth;
399 const float precisionMargin = 0.05f;
404 float u_max = avgRadiusStaggered * std::sin(
alpha) + staveSizeX / 2.0;
405 float v_max = avgRadiusStaggered * std::cos(
alpha) + staveSizeY / 2.0;
406 float radiusMax = std::sqrt(u_max * u_max + v_max * v_max);
408 return {defaultRadiusMin, radiusMax + precisionMargin};
413 double perpDistance = avgRadiusStaggered * std::cos(
alpha) - staveSizeY / 2.0;
414 double projDistance = avgRadiusStaggered * std::sin(
alpha);
417 if (projDistance <= staveSizeX / 2.0) {
418 newRadiusMin = perpDistance;
420 double u_min = projDistance - staveSizeX / 2.0;
421 newRadiusMin = std::sqrt(u_min * u_min + perpDistance * perpDistance);
424 return {newRadiusMin - precisionMargin, defaultRadiusMax};
431 :
TRKSegmentedLayer(layerNumber, layerName, rInn, tiltAngle, numberOfStaves, numberOfModules, thickOrX2X0,
mode)
437 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
439 float lengthHalfBarrel =
mLength / 2;
441 TGeoVolume* halfStaveVol =
new TGeoVolume(halfStaveName.c_str(), halfStave, medSi);
442 halfStaveVol->SetLineColor(kYellow);
445 for (
int iModule = 0; iModule < nModulesPerHalfBarrel; iModule++) {
447 TGeoCombiTrans* trans =
new TGeoCombiTrans();
448 trans->SetTranslation(0, 0, zPos);
458 TGeoVolume* staveVol =
new TGeoVolumeAssembly(staveName.c_str());
460 TGeoCombiTrans* transLeft =
new TGeoCombiTrans();
461 transLeft->SetTranslation(-(sHalfStaveWidth - sInStaveOverlap) / 2, 0, 0);
464 TGeoCombiTrans* transRight =
new TGeoCombiTrans();
465 transRight->SetTranslation((sHalfStaveWidth - sInStaveOverlap) / 2, 0.2, 0);
473 auto [rMin, rMax] = getBoundingRadii(sStaveWidth);
475 TGeoMedium* medAir = gGeoManager->GetMedium(
"TRK_AIR$");
477 TGeoVolume* layerVol =
new TGeoVolume(
mLayerName.c_str(),
layer, medAir);
478 layerVol->SetLineColor(kYellow);
480 int nStavesHalfBarrel = (int)std::ceil(
mInnerRadius * 2 * TMath::Pi() / sStaveWidth);
481 nStavesHalfBarrel += nStavesHalfBarrel % 2;
484 const double theta = 2. * TMath::Pi() / nStavesHalfBarrel;
485 const float lengthHalfBarrel =
mLength / 2;
486 const int nStaves = nStavesHalfBarrel * 2;
487 LOGP(info,
"Creating OT layer {} with two half-barrels of {} staves each",
mLayerNumber, nStavesHalfBarrel);
489 for (
int iStave = 0; iStave < nStaves; iStave++) {
490 int whichHalfBarrel = iStave / nStavesHalfBarrel;
491 double phi = theta * iStave;
492 TGeoRotation* rot =
new TGeoRotation(
"rot");
493 if (whichHalfBarrel == 1) {
496 rot->RotateZ(phi * TMath::RadToDeg() + 90 + (whichHalfBarrel == 0 ? +1 : -1) *
mTiltAngle);
498 TGeoCombiTrans* trans =
new TGeoCombiTrans();
499 trans->SetRotation(rot);
500 trans->SetTranslation(avgRadius * std::cos(phi), avgRadius * std::sin(phi), zPos);
504 motherVolume->AddNode(layerVol, 1,
nullptr);
507std::pair<float, float> TRKOTLayer::getBoundingRadii(
double staveWidth)
const
510 return {radiusMin - 0.201f, radiusMax};
516 :
TRKSegmentedLayer(layerNumber, layerName, rInn, tiltAngle, numberOfStaves, numberOfModules, thickOrX2X0,
mode)
526 TGeoMedium* medSi = gGeoManager->GetMedium(
"TRK_SILICON$");
529 TGeoVolume* chipVol =
new TGeoVolume(chipName.c_str(), chip, medSi);
530 chipVol->SetLineColor(kYellow);
538TGeoVolume* TRKOTLayerRealistic::createFPC()
540 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_FPC$");
543 vol->SetLineColor(kOrange);
547TGeoVolume* TRKOTLayerRealistic::createColdPlate()
549 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_CARBONFIBER$");
552 vol->SetLineColor(kGray + 2);
556double TRKOTLayerRealistic::getRowHalfLength()
const
562double TRKOTLayerRealistic::getPipeTrim()
const
570TGeoVolume* TRKOTLayerRealistic::createSupportRing(
double rMin,
double rMax,
double phi1,
double phi2,
int id)
573 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_CARBONFIBER$");
577 new TGeoTubeSeg((base +
"_outsh").c_str(), rMin, rMax, dz, phi1, phi2);
578 new TGeoTubeSeg((base +
"_insh").c_str(), rMin +
t, rMax -
t, dz -
t, phi1, phi2);
579 TGeoShape* shape =
new TGeoCompositeShape((base +
"sh").c_str(), (base +
"_outsh-" + base +
"_insh").c_str());
580 TGeoVolume* vol =
new TGeoVolume(base.c_str(), shape, med);
581 vol->SetLineColor(kGray + 2);
585TGeoVolume* TRKOTLayerRealistic::createCoolingPipe()
587 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_CARBONFIBER$");
589 getRowHalfLength() - getPipeTrim() / 2);
591 vol->SetLineColor(kBlue + 2);
595TGeoVolume* TRKOTLayerRealistic::createEndOfStaveCard()
597 TGeoMedium* medFR4 = gGeoManager->GetMedium(
"TRK_FR4$");
598 TGeoMedium* medCu = gGeoManager->GetMedium(
"TRK_COPPER$");
602 TGeoVolume* cardVol =
new TGeoVolume(
name.c_str(), board, medFR4);
603 cardVol->SetLineColor(kGreen + 3);
610 LOGP(fatal,
"TRKBase.otEosCardCuThickness = {} cm x {} planes does not fit in the {} cm end-of-stave card",
614 TGeoVolume* planeVol =
new TGeoVolume((
name +
"_Cu").c_str(), plane, medCu);
615 planeVol->SetLineColor(kOrange + 7);
619 for (
int iPlane = 0; iPlane < nPlanes; iPlane++) {
620 const double y = (nPlanes > 1) ? -span / 2 + iPlane * span / (nPlanes - 1) : 0.;
621 cardVol->AddNode(planeVol, iPlane,
new TGeoTranslation(0,
y, 0));
627void TRKOTLayerRealistic::addConnector(TGeoVolume* moduleVol,
double rMid)
629 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_LCPCU$");
632 TGeoVolume* vol =
new TGeoVolume(
name.c_str(), shape, med);
633 vol->SetLineColor(kBlue);
637 moduleVol->AddNode(vol, 0,
new TGeoTranslation(0, rMid,
z));
640void TRKOTLayerRealistic::addCapacitors(TGeoVolume* moduleVol,
double rMid)
642 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_BATIO3$");
645 TGeoVolume* vol =
new TGeoVolume(
name.c_str(), shape, med);
646 vol->SetLineColor(kCyan);
652 const double dX[5] = {-0.80, +0.80, -0.80, +0.80, 0.0};
653 const double dZ[5] = {-0.95, -0.95, +0.95, +0.95, 0.0};
661 for (
int iZ = 0; iZ < 4; iZ++) {
662 for (
int iX = 0; iX < 2; iX++) {
664 const double x = chipX[iX] + dX[iCap];
665 const double z = chipZ[iZ] + dZ[iCap];
666 if (std::abs(
x) < skipX && std::abs(
z - connZ) < skipZ) {
669 moduleVol->AddNode(vol, capCopy++,
new TGeoTranslation(
x, rMid,
z));
675void TRKOTLayerRealistic::addBrackets(TGeoVolume* moduleVol,
double rMid)
677 TGeoMedium* med = gGeoManager->GetMedium(
"TRK_PEEK$");
680 TGeoVolume* vol =
new TGeoVolume(
name.c_str(), shape, med);
681 vol->SetLineColor(kGreen + 2);
684 moduleVol->AddNode(vol, 0,
new TGeoTranslation(0, rMid, -
z));
685 moduleVol->AddNode(vol, 1,
new TGeoTranslation(0, rMid, +
z));
691 TGeoVolume* moduleVol =
new TGeoVolumeAssembly(modName.c_str());
704 const double chipX[2] = {-0.5 * pitchX, +0.5 * pitchX};
705 const double chipZ[4] = {-1.5 * pitchZ, -0.5 * pitchZ, +0.5 * pitchZ, +1.5 * pitchZ};
707 moduleVol->AddNode(createColdPlate(), 0,
new TGeoTranslation(0, coldPlateMidY, 0));
710 for (
int iZ = 0; iZ < 4; iZ++) {
711 for (
int iX = 0; iX < 2; iX++) {
712 TGeoCombiTrans* trans =
new TGeoCombiTrans();
713 trans->SetTranslation(chipX[iX], 0., chipZ[iZ]);
715 TGeoRotation* rot =
new TGeoRotation();
717 trans->SetRotation(rot);
719 moduleVol->AddNode(
createChip(), chipCopy++, trans);
723 moduleVol->AddNode(createFPC(), 0,
new TGeoTranslation(0, fpcMidY, 0));
724 addConnector(moduleVol, connMidY);
725 addCapacitors(moduleVol, capMidY);
726 addBrackets(moduleVol, bracketMidY);
733 TGeoVolume* rowVol =
new TGeoVolumeAssembly(rowName.c_str());
738 const double rowHalfLen = getRowHalfLength();
740 for (
int iModule = 0; iModule < nModulesPerRow; iModule++) {
741 double zPos = -rowHalfLen + moduleLength / 2 + iModule * step;
742 TGeoCombiTrans* trans =
new TGeoCombiTrans();
743 trans->SetTranslation(0, 0, zPos);
753 TGeoVolume* staveVol =
new TGeoVolumeAssembly(staveName.c_str());
762 TGeoCombiTrans* tRow0 =
new TGeoCombiTrans();
763 tRow0->SetTranslation(-rowOffset / 2, 0, 0);
765 TGeoCombiTrans* tRow1 =
new TGeoCombiTrans();
770 TGeoCombiTrans* tPipe =
new TGeoCombiTrans();
772 staveVol->AddNode(createCoolingPipe(), 0, tPipe);
775 TGeoCombiTrans* tCard =
new TGeoCombiTrans();
778 staveVol->AddNode(createEndOfStaveCard(), 0, tCard);
789 const double lengthHalfBarrel = 2 * getRowHalfLength();
798 const bool hasWalls = wallThickness > 0.;
803 LOGP(fatal,
"TRKBase.otBarrelWallThickness = {} cm leaves no room for the staves in the {} cm gap between the eta half-barrels",
807 auto [rMin, rMax] = getBoundingRadii(staveWidth);
808 TGeoMedium* medAir = gGeoManager->GetMedium(
"TRK_AIR$");
809 TGeoShape*
layer =
nullptr;
811 const std::string tubeName =
mLayerName +
"_envelopesh";
812 const std::string slotName =
mLayerName +
"_wallslotsh";
813 const std::string zSlotName =
mLayerName +
"_midslotsh";
814 new TGeoTube(tubeName.c_str(), rMin, rMax, halfLength);
815 new TGeoBBox(slotName.c_str(), slotHalfWidth, rMax + 1., halfLength + 1.);
816 new TGeoBBox(zSlotName.c_str(), rMax + 1., rMax + 1., zSlotHalfWidth);
817 layer =
new TGeoCompositeShape((
mLayerName +
"sh").c_str(), (tubeName +
"-" + slotName +
"-" + zSlotName).c_str());
819 layer =
new TGeoTube(rMin, rMax, halfLength);
821 TGeoVolume* layerVol =
new TGeoVolume(
mLayerName.c_str(),
layer, medAir);
822 layerVol->SetLineColor(kYellow);
833 const double activeStaveWidth = staveWidth - 2 * edgeDead;
835 if (nStavesHalfBarrel <= 0) {
836 nStavesHalfBarrel = (int)std::ceil(2. + (avgRadius * 2 * TMath::Pi() - 2 * (activeStaveWidth + accGap)) /
838 nStavesHalfBarrel += nStavesHalfBarrel % 2;
840 if (nStavesHalfBarrel % 2) {
841 LOGP(fatal,
"OT layer {}: {} staves per ring, must be even (two azimuthal halves)",
mLayerNumber, nStavesHalfBarrel);
844 const int nHalf = nStavesHalfBarrel / 2;
845 const double thetaGap = (activeStaveWidth + accGap) / avgRadius;
846 const double thetaInt = (2. * TMath::Pi() - 2. * thetaGap) / (nStavesHalfBarrel - 2);
847 const double overlap = activeStaveWidth - avgRadius * thetaInt;
848 LOGP(info,
"Creating realistic OT layer {}: {} staves/half-barrel, internal overlap {} mm, boundary gap {} mm, flipped={}",
851 LOGP(warning,
"OT layer {}: active neighbour overlap {} mm is below the required {} mm",
855 const int nStaves = nStavesHalfBarrel * 2;
857 for (
int iStave = 0; iStave < nStaves; iStave++) {
858 int whichHalfBarrel = iStave / nStavesHalfBarrel;
859 int sInHB = iStave % nStavesHalfBarrel;
860 int azHalf = sInHB / nHalf;
861 int sInAz = sInHB % nHalf;
865 const double phiCut = TMath::Pi() / 2;
866 double phi =
phiCut + azHalf * TMath::Pi() + thetaGap / 2 + sInAz * thetaInt;
868 TGeoRotation* rot =
new TGeoRotation(
"rot");
870 if (whichHalfBarrel == 1) {
876 rot->RotateZ(phi * TMath::RadToDeg() + 90 + (whichHalfBarrel == 0 ? +1 : -1) *
mTiltAngle);
879 TGeoCombiTrans* trans =
new TGeoCombiTrans();
880 trans->SetRotation(rot);
881 trans->SetTranslation(avgRadius * std::cos(phi), avgRadius * std::sin(phi), zPos);
891 const double ringDPhi = TMath::RadToDeg() *
898 for (
int azHalf = 0; azHalf < 2; ++azHalf) {
899 TGeoVolume* ringVol = createSupportRing(ringRMin, ringRMax,
900 90. + 180. * azHalf + ringDPhi,
901 270. + 180. * azHalf - ringDPhi, azHalf);
903 for (
int whichHalfBarrel = 0; whichHalfBarrel < 2; ++whichHalfBarrel) {
904 const double zSign = (whichHalfBarrel == 0) ? -1. : 1.;
905 for (
double zAbs : {zRingMid, zRingEos}) {
906 layerVol->AddNode(ringVol, iRing++,
new TGeoTranslation(0., 0., zSign * zAbs));
911 motherVolume->AddNode(layerVol, 1,
nullptr);
914std::pair<float, float> TRKOTLayerRealistic::getBoundingRadii(
double staveWidth)
const
920 const float outerReach = std::max(pipeOuterReach, ringReach);
921 const float margin = 0.1f;
923 return {radiusMin - connectorReach - margin, radiusMax + outerReach + margin};
925 return {radiusMin - outerReach - margin, radiusMax + connectorReach + margin};
static const TRKBaseParam & Instance()
static const char * getTRKStavePattern()
static const char * getTRKChipPattern()
static const char * getTRKSensorPattern()
static const char * getTRKDeadzonePattern()
static const char * getTRKLayerPattern()
static const char * getTRKHalfStavePattern()
static const char * getTRKMetalStackPattern()
static const char * getTRKModulePattern()
TRKCylindricalLayer()=default
static constexpr float Si_X0
virtual void createLayer(TGeoVolume *motherVolume)
virtual TGeoVolume * createSensor()
virtual TGeoVolume * createMetalStack()
static constexpr double sSensorThickness
void createLayer(TGeoVolume *motherVolume) override
TGeoVolume * createStave() override
TGeoVolume * createModule() override
TRKOTLayerRealistic()=default
TGeoVolume * createChip() override
void createLayer(TGeoVolume *motherVolume) override
TGeoVolume * createHalfStave()
TGeoVolume * createStave() override
TGeoVolume * createHalfStave()
void createLayer(TGeoVolume *motherVolume) override
static constexpr float sGapBetweenOuterTrackerBarrelHalves
TGeoVolume * createStave() override
static constexpr double sChipWidth
TGeoVolume * createMetalStack() override
static constexpr int sHalfNumberOfChips
TGeoVolume * createSensor() override
TRKSegmentedLayer()=default
virtual TGeoVolume * createModule()
static constexpr double sChipLength
virtual TGeoVolume * createChip()
static constexpr double sDeadzoneWidth
static constexpr double sModuleLength
static constexpr double sModuleWidth
TGeoVolume * createDeadzone()
virtual std::pair< float, float > getBoundingRadii(double staveWidth) const
GLfloat GLfloat GLfloat alpha
GLuint const GLchar * name
GLuint GLsizei GLsizei * length
GLenum GLuint GLint GLint layer
GLdouble GLdouble GLdouble z
constexpr int nCopperLayers
constexpr double thickness
constexpr double thickness
constexpr double thickness
constexpr double thickness
constexpr double thickness
constexpr double rLocalOffset
constexpr int nCopperLayers
constexpr double thickness
constexpr double wireBondMargin
constexpr double thickness
constexpr double radialHeight
constexpr double wallThickness
constexpr double zClearance
constexpr double sensorThickness
constexpr double halfBarrelChipGap
constexpr double bracketZDepth
constexpr double interModuleGap
constexpr double rowActiveOverlap
constexpr double connectorZDepth
constexpr double interChipGap
constexpr double rowRadialStagger
constexpr double barrelWallClearance
constexpr double barrelWallSlotMargin
constexpr double barrelHalvesZGap
constexpr double outerEdgeLongSide
constexpr double outerEdgeShortSide
constexpr double interChips
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string to_string(gsl::span< T, Size > span)