Skip to content

Commit dbf8b73

Browse files
Fix the thickness of logical volumes for kTurboStaves and kStaggered configurations of the tracker (#14268)
1 parent 128a030 commit dbf8b73

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class TRKLayer
4545
void createLayer(TGeoVolume* motherVolume);
4646

4747
private:
48+
// TGeo objects outside logical volumes can cause errors. Only used in case of kStaggered and kTurboStaves layouts
49+
static constexpr float mLogicalVolumeThickness = 1;
50+
4851
int mLayerNumber;
4952
std::string mLayerName;
5053
float mInnerRadius;

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ TGeoVolume* TRKLayer::createStave(std::string type, double width)
120120
staveVol->AddNode(chipVol, 1, nullptr);
121121
} else if (type == "staggered") {
122122
double width = mModuleWidth * 2; // Each stave has two modules (based on the LOI design)
123-
stave = new TGeoBBox(width / 2, mChipThickness / 2, mZ / 2);
123+
stave = new TGeoBBox(width / 2, mLogicalVolumeThickness / 2, mZ / 2);
124124
TGeoVolume* chipVolLeft = createChip("flat", mModuleWidth);
125125
TGeoVolume* chipVolRight = createChip("flat", mModuleWidth);
126126
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
@@ -152,7 +152,11 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
152152
chipName = o2::trk::GeometryTGeo::getTRKChipPattern() + std::to_string(mLayerNumber),
153153
sensName = Form("%s%d", GeometryTGeo::getTRKSensorPattern(), mLayerNumber);
154154

155-
TGeoTube* layer = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mZ / 2);
155+
double layerThickness = mChipThickness;
156+
if (mLayout != eLayout::kCylinder) {
157+
layerThickness = mLogicalVolumeThickness;
158+
}
159+
TGeoTube* layer = new TGeoTube(mInnerRadius - 0.333 * layerThickness, mInnerRadius + 0.667 * layerThickness, mZ / 2);
156160

157161
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
158162
layerVol->SetLineColor(kYellow);

0 commit comments

Comments
 (0)