Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class TRKLayer
void createLayer(TGeoVolume* motherVolume);

private:
// TGeo objects outside logical volumes can cause errors. Only used in case of kStaggered and kTurboStaves layouts
static constexpr float mLogicalVolumeThickness = 1;

int mLayerNumber;
std::string mLayerName;
float mInnerRadius;
Expand Down
8 changes: 6 additions & 2 deletions Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKLayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TGeoVolume* TRKLayer::createStave(std::string type, double width)
staveVol->AddNode(chipVol, 1, nullptr);
} else if (type == "staggered") {
double width = mModuleWidth * 2; // Each stave has two modules (based on the LOI design)
stave = new TGeoBBox(width / 2, mChipThickness / 2, mZ / 2);
stave = new TGeoBBox(width / 2, mLogicalVolumeThickness / 2, mZ / 2);
TGeoVolume* chipVolLeft = createChip("flat", mModuleWidth);
TGeoVolume* chipVolRight = createChip("flat", mModuleWidth);
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
Expand Down Expand Up @@ -152,7 +152,11 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
chipName = o2::trk::GeometryTGeo::getTRKChipPattern() + std::to_string(mLayerNumber),
sensName = Form("%s%d", GeometryTGeo::getTRKSensorPattern(), mLayerNumber);

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

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