Skip to content

Commit 6d792f8

Browse files
authored
[ALICE3] oTOF: fix missing tilt shift for overlaps
1 parent e608207 commit 6d792f8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • Detectors/Upgrades/ALICE3/IOTOF/simulation/src

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,15 @@ void OTOFLayer::createLayer(TGeoVolume* motherVolume)
287287
case kBarrelSegmented: {
288288
// First we create the volume for the whole layer, which will be used as mother volume for the segments
289289
const double avgRadius = 0.5 * (mInnerRadius + mOuterRadius);
290-
TGeoTube* layer = new TGeoTube(mInnerRadius, mOuterRadius, mZLength / 2);
290+
const double staveSizeX = mStaves.second; // cm
291+
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
292+
const double staveSizeZ = mZLength; // cm
293+
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
294+
TGeoTube* layer = new TGeoTube(mInnerRadius - deltaForTilt, mOuterRadius + deltaForTilt, mZLength / 2);
291295
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
292296
setLayerStyle(layerVol);
293297

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

446447
} // namespace iotof
447-
} // namespace o2
448+
} // namespace o2

0 commit comments

Comments
 (0)