Skip to content
Open
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
23 changes: 9 additions & 14 deletions Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,14 @@ void ITOFLayer::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);
const double staveSizeX = mStaves.second; // cm
const double staveSizeY = mOuterRadius - mInnerRadius; // cm
const double staveSizeZ = mZLength; // cm
const double rMargin = 0.2; // cm, a small margin to avoid layer extrusion by sub-volumes
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
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);

LOGP(info, "iTOF kBarrelSegmented layout: stave tilt angle {}, layer tube rMin {}, rMax {}", mTiltAngle, mInnerRadius - deltaForTilt, mOuterRadius + deltaForTilt);

// Now we create the volume for a single stave
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5, staveSizeZ * 0.5);
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medAir);
Expand Down Expand Up @@ -290,17 +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);
const double rMargin = 0.8; // cm, a small margin to avoid layer extrusion by sub-volumes
TGeoTube* layer = new TGeoTube(mInnerRadius - rMargin, mOuterRadius + rMargin, 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);

LOGP(info, "oTOF kBarrelSegmented layout: stave tilt angle {}, layer tube rMin {}, rMax {}", mTiltAngle, mInnerRadius - rMargin, mOuterRadius + rMargin);

// 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
Loading