Skip to content

Commit f9f6b09

Browse files
authored
[ALICE3] oTOF: fix missing tilt shift for overlaps (#15159)
1 parent 5250f03 commit f9f6b09

File tree

1 file changed

+9
-14
lines changed
  • Detectors/Upgrades/ALICE3/IOTOF/simulation/src

1 file changed

+9
-14
lines changed

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

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,14 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
155155
case kBarrelSegmented: {
156156
// First we create the volume for the whole layer, which will be used as mother volume for the segments
157157
const double avgRadius = 0.5 * (mInnerRadius + mOuterRadius);
158-
const double staveSizeX = mStaves.second; // cm
159-
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
160-
const double staveSizeZ = mZLength; // cm
161-
const double rMargin = 0.2; // cm, a small margin to avoid layer extrusion by sub-volumes
162-
const double deltaForTilt = rMargin + 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
158+
const double staveSizeX = mStaves.second; // cm
159+
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
160+
const double staveSizeZ = mZLength; // cm
161+
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
163162
TGeoTube* layer = new TGeoTube(mInnerRadius - deltaForTilt, mOuterRadius + deltaForTilt, mZLength / 2);
164163
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
165164
setLayerStyle(layerVol);
166165

167-
LOGP(info, "iTOF kBarrelSegmented layout: stave tilt angle {}, layer tube rMin {}, rMax {}", mTiltAngle, mInnerRadius - deltaForTilt, mOuterRadius + deltaForTilt);
168-
169166
// Now we create the volume for a single stave
170167
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5, staveSizeZ * 0.5);
171168
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medAir);
@@ -290,17 +287,15 @@ void OTOFLayer::createLayer(TGeoVolume* motherVolume)
290287
case kBarrelSegmented: {
291288
// First we create the volume for the whole layer, which will be used as mother volume for the segments
292289
const double avgRadius = 0.5 * (mInnerRadius + mOuterRadius);
293-
const double rMargin = 0.8; // cm, a small margin to avoid layer extrusion by sub-volumes
294-
TGeoTube* layer = new TGeoTube(mInnerRadius - rMargin, mOuterRadius + rMargin, 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);
295295
TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
296296
setLayerStyle(layerVol);
297297

298-
LOGP(info, "oTOF kBarrelSegmented layout: stave tilt angle {}, layer tube rMin {}, rMax {}", mTiltAngle, mInnerRadius - rMargin, mOuterRadius + rMargin);
299-
300298
// Now we create the volume for a single stave
301-
const double staveSizeX = mStaves.second; // cm
302-
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
303-
const double staveSizeZ = mZLength; // cm
304299
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5, staveSizeZ * 0.5);
305300
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medAir);
306301
setStaveStyle(staveVol);

0 commit comments

Comments
 (0)