Skip to content
Merged
Changes from 1 commit
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
11 changes: 6 additions & 5 deletions Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,15 @@ void OTOFLayer::createLayer(TGeoVolume* motherVolume)
case kBarrelSegmented: {
// First we create the volume for the whole layer, which will be used as mother volume for the segments
const double avgRadius = 0.5 * (mInnerRadius + mOuterRadius);
TGeoTube* layer = new TGeoTube(mInnerRadius, mOuterRadius, mZLength / 2);
const double staveSizeX = mStaves.second; // cm
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
const double staveSizeZ = mZLength; // cm
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
TGeoTube* layer = new TGeoTube(mInnerRadius - deltaForTilt, mOuterRadius + deltaForTilt, mZLength / 2);
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
setLayerStyle(layerVol);

// Now we create the volume for a single stave
const double staveSizeX = mStaves.second; // cm
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
const double staveSizeZ = mZLength; // cm
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5, staveSizeZ * 0.5);
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medAir);
setStaveStyle(staveVol);
Expand Down Expand Up @@ -444,4 +445,4 @@ void BTOFLayer::createLayer(TGeoVolume* motherVolume)
}

} // namespace iotof
} // namespace o2
} // namespace o2
Loading