Skip to content

Commit b3e2e7a

Browse files
altsybeeIgor Altsybeevalibuild
authored
[ALICE3] TRK: adjustments for z and r of services, split OT barrel into two halves (#15395)
* adjustments for service z and r positions, split OT barrel into two halves * reverting back OT stave tilting angle * Please consider the following formatting changes --------- Co-authored-by: Igor Altsybeev <Igor.Altsybeev@cern.ch> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 88fae31 commit b3e2e7a

5 files changed

Lines changed: 65 additions & 45 deletions

File tree

Detectors/Upgrades/ALICE3/FT3/simulation/src/FT3Layer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
459459

460460
// shift stave volumes into layer volume, since nominal z_{stave face} = 0
461461
double z_local_offset = z_layer_thickness / 2.0;
462-
TGeoTube* layer = new TGeoTube(mInnerRadius - 0.2, mOuterRadius + 0.4, z_layer_thickness / 2); // margins to ensure staves are fully encapsulated in the layer volume
462+
TGeoTube* layer = new TGeoTube(mInnerRadius - 0.2, mOuterRadius + 2.5, z_layer_thickness / 2); // margins to ensure staves are fully encapsulated in the layer volume
463463
layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
464464

465465
if (ft3Params.drawReferenceCircles) {

Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
168168
const double deltaForTilt = 0.5 * (std::sin(TMath::DegToRad() * mTiltAngle) * staveSizeX + std::cos(TMath::DegToRad() * mTiltAngle) * staveSizeY); // we increase the size of the layer to account for the tilt of the staves
169169
const double radiusMax = std::sqrt(avgRadius * avgRadius + 0.25 * staveSizeX * staveSizeX + 0.25 * staveSizeY * staveSizeY + avgRadius * 2. * deltaForTilt); // we increase the outer radius to account for the tilt of the staves
170170
const double radiusMin = std::sqrt(avgRadius * avgRadius + 0.25 * staveSizeX * staveSizeX + 0.25 * staveSizeY * staveSizeY - avgRadius * 2. * deltaForTilt); // we decrease the inner radius to account for the tilt of the staves
171-
TGeoTube* layer = new TGeoTube(radiusMin, radiusMax, mZLength / 2);
171+
TGeoTube* layer = new TGeoTube(radiusMin - 0.05, radiusMax + 0.05, mZLength / 2); // cm, small margins to ensure staves are fully encapsulated in the layer volume
172172
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
173173
setLayerStyle(layerVol);
174174

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/TRKLayer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ class TRKOTLayer : public TRKSegmentedLayer
141141
TGeoVolume* createHalfStave();
142142
void createLayer(TGeoVolume* motherVolume) override;
143143

144+
protected:
145+
static constexpr float sGapBetweenOuterTrackerBarrelHalves = 0.8; // cm, gap between the two halves of the OT barrel
146+
144147
private:
145148
static constexpr double sHalfStaveWidth = constants::OT::halfstave::width;
146149
static constexpr double sInStaveOverlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1; // 1.5mm outer-edge + 1mm deadzone + 1mm (true) overlap

Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKLayer.cxx

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,15 @@ TGeoVolume* TRKOTLayer::createHalfStave()
388388
{
389389
TGeoMedium* medSi = gGeoManager->GetMedium("TRK_SILICON$");
390390
std::string halfStaveName = GeometryTGeo::getTRKHalfStavePattern() + std::to_string(mLayerNumber);
391-
TGeoShape* halfStave = new TGeoBBox(sHalfStaveWidth / 2, mChipThickness / 2, mLength / 2);
391+
float lengthHalfBarrel = mLength / 2;
392+
TGeoShape* halfStave = new TGeoBBox(sHalfStaveWidth / 2, mChipThickness / 2, lengthHalfBarrel / 2);
392393
TGeoVolume* halfStaveVol = new TGeoVolume(halfStaveName.c_str(), halfStave, medSi);
393394
halfStaveVol->SetLineColor(kYellow);
394395

395-
for (int iModule = 0; iModule < mNumberOfModules; iModule++) {
396+
int nModulesPerHalfBarrel = mNumberOfModules / 2; // assuming mNumberOfModules is always even, which should be the case given the current specifications
397+
for (int iModule = 0; iModule < nModulesPerHalfBarrel; iModule++) {
396398
TGeoVolume* moduleVol = createModule();
397-
double zPos = -0.5 * mNumberOfModules * sModuleLength + (iModule + 0.5) * sModuleLength;
399+
double zPos = -0.5 * nModulesPerHalfBarrel * sModuleLength + (iModule + 0.5) * sModuleLength;
398400
TGeoCombiTrans* trans = new TGeoCombiTrans();
399401
trans->SetTranslation(0, 0, zPos);
400402
LOGP(debug, "Inserting {} in {} ", moduleVol->GetName(), halfStaveVol->GetName());
@@ -431,35 +433,46 @@ void TRKOTLayer::createLayer(TGeoVolume* motherVolume)
431433

432434
TGeoMedium* medAir = gGeoManager->GetMedium("TRK_AIR$");
433435
// TGeoTube* layer = new TGeoTube(mInnerRadius - 0.333 * sLogicalVolumeThickness, mInnerRadius + 0.667 * sLogicalVolumeThickness, mLength / 2);
434-
TGeoTube* layer = new TGeoTube(rMin, rMax, mLength / 2);
436+
TGeoTube* layer = new TGeoTube(rMin, rMax, (mLength + sGapBetweenOuterTrackerBarrelHalves) / 2);
435437
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
436438
layerVol->SetLineColor(kYellow);
437439

438440
// Compute the number of staves
439-
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / sStaveWidth);
440-
nStaves += nStaves % 2; // Require an even number of staves
441+
int nStavesHalfBarrel = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / sStaveWidth);
442+
nStavesHalfBarrel += nStavesHalfBarrel % 2; // Require an even number of staves
441443

442444
// Nominal average radius used as the placement barycenter for all staves
443445
const double avgRadius = 0.5 * (mInnerRadius + mOuterRadius);
444446

445447
// Compute the size of the overlap region
446-
double theta = 2. * TMath::Pi() / nStaves;
448+
double theta = 2. * TMath::Pi() / nStavesHalfBarrel;
447449
double theta1 = std::atan(sStaveWidth / 2 / mInnerRadius);
448450
double st = std::sin(theta);
449451
double ct = std::cos(theta);
450452
double theta2 = std::atan((mInnerRadius * st - sStaveWidth / 2 * ct) / (mInnerRadius * ct + sStaveWidth / 2 * st));
451453
double overlap = (theta1 - theta2) * mInnerRadius;
452-
LOGP(info, "Creating a layer with {} staves and {} mm overlap", nStaves, overlap * 10);
454+
LOGP(info, "Creating a layer with two half barrels, each with {} staves and {} mm overlap", nStavesHalfBarrel, overlap * 10);
455+
456+
float lengthHalfBarrel = mLength / 2;
457+
int nStaves = nStavesHalfBarrel * 2; // since we now have two half-barrels (separated by a small gap), we double the number of staves
453458

454459
for (int iStave = 0; iStave < nStaves; iStave++) {
455460
TGeoVolume* staveVol = createStave();
461+
int whichHalfBarrel = iStave / nStavesHalfBarrel; // 0 for the first half (negative z), 1 for the second half (positive z)
456462
TGeoCombiTrans* trans = new TGeoCombiTrans();
457463
double phi = theta * iStave;
458464
double phiDeg = phi * TMath::RadToDeg();
459-
TGeoRotation* rot = new TGeoRotation("rot", phiDeg + 90 + mTiltAngle, 0, 0);
465+
// TGeoRotation* rot = new TGeoRotation("rot", phiDeg + 90 + mTiltAngle, 0, 0);
466+
TGeoRotation* rot = new TGeoRotation("rot");
467+
if (whichHalfBarrel == 1) {
468+
rot->RotateY(180.); // degrees, rotate the second half barrel by 180 degrees around Y to achieve the correct staggering orientation
469+
}
470+
rot->RotateZ(phiDeg + 90 + (whichHalfBarrel == 0 ? +1 : -1) * mTiltAngle); // phi in degrees, tilting depends on the half-barrel side
460471
trans->SetRotation(rot);
461472
// trans->SetTranslation(mInnerRadius * std::cos(phi), mInnerRadius * std::sin(phi), 0);
462-
trans->SetTranslation(avgRadius * std::cos(phi), avgRadius * std::sin(phi), 0);
473+
// trans->SetTranslation(avgRadius * std::cos(phi), avgRadius * std::sin(phi), 0);
474+
double zPos = (whichHalfBarrel == 0 ? -1 : 1) * (0.5 * lengthHalfBarrel + sGapBetweenOuterTrackerBarrelHalves / 2);
475+
trans->SetTranslation(avgRadius * std::cos(phi), avgRadius * std::sin(phi), zPos);
463476
LOGP(debug, "Inserting {} in {} ", staveVol->GetName(), layerVol->GetName());
464477
layerVol->AddNode(staveVol, iStave, trans);
465478
}

0 commit comments

Comments
 (0)