From 706ddd0c4204d1235a7d5e6e54b85ec992d38630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 25 Mar 2026 21:40:33 +0100 Subject: [PATCH 1/6] [ALICE3] IOTOF: Adjust layer radius calculations for stave tilt --- .../ALICE3/IOTOF/simulation/src/Layer.cxx | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx index 0d0983958c46f..66d0b2959c8bd 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx @@ -155,11 +155,13 @@ 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 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); + 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 + const double radiusMax = std::sqrt(avgRadius * avgRadius + 0.25 * staveSizeX * staveSizeX + 0.25 * staveSizeY * staveSizeY + avgRadius * 2. * deltaForTilt); // we increase the outer radius to account for the tilt of the staves + const double radiusMin = std::sqrt(avgRadius * avgRadius + 0.25 * staveSizeX * staveSizeX + 0.25 * staveSizeY * staveSizeY - avgRadius * 2. * deltaForTilt); // we decrease the inner radius to account for the tilt of the staves + TGeoTube* layer = new TGeoTube(radiusMin, radiusMax, mZLength / 2); TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir); setLayerStyle(layerVol); @@ -287,11 +289,13 @@ 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 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); + 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 + const double radiusMax = std::sqrt(avgRadius * avgRadius + 0.25 * staveSizeX * staveSizeX + 0.25 * staveSizeY * staveSizeY + avgRadius * 2. * deltaForTilt); // we increase the outer radius to account for the tilt of the staves + const double radiusMin = std::sqrt(avgRadius * avgRadius + 0.25 * staveSizeX * staveSizeX + 0.25 * staveSizeY * staveSizeY - avgRadius * 2. * deltaForTilt); // we decrease the inner radius to account for the tilt of the staves + TGeoTube* layer = new TGeoTube(radiusMin, radiusMax, mZLength / 2); TGeoVolume* layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir); setLayerStyle(layerVol); @@ -445,4 +449,4 @@ void BTOFLayer::createLayer(TGeoVolume* motherVolume) } } // namespace iotof -} // namespace o2 \ No newline at end of file +} // namespace o2 From 8a2278c8942b33e7fe5e7ac37b3429e1133eeb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 25 Mar 2026 21:51:01 +0100 Subject: [PATCH 2/6] Refactor iTOF and oTOF layer initialization logic --- .../Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx index 9b097a0243597..73e4518ed70f7 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx @@ -96,12 +96,12 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str } if (itof) { // iTOF const std::string name = GeometryTGeo::getITOFLayerPattern(); - const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case - const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm + const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case + const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm const double staveTiltAngle = itofSegmented ? 10.0 : 0.0; // degrees - const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case + const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case mITOFLayer = ITOFLayer(name, - dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, ITOFLayer::kBarrelSegmented, + dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel, nStaves, staveWidth, staveTiltAngle, modulesPerStave); } if (otof) { // oTOF @@ -111,7 +111,7 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str const double staveTiltAngle = otofSegmented ? 5.0 : 0.0; // degrees const int modulesPerStave = otofSegmented ? 54 : 0; // number of modules per stave in segmented case mOTOFLayer = OTOFLayer(name, - dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, OTOFLayer::kBarrelSegmented, + dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, otofSegmented ? OTOFLayer::kBarrelSegmented : OTOFLayer::kBarrel, nStaves, staveWidth, staveTiltAngle, modulesPerStave); } if (ftof) { From f6a1b440bc614b8f57ed50a10bab98891bf16a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 25 Mar 2026 21:52:18 +0100 Subject: [PATCH 3/6] Update README.md --- Detectors/Upgrades/ALICE3/IOTOF/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/README.md b/Detectors/Upgrades/ALICE3/IOTOF/README.md index fba4d12252af6..d7a954c4718fe 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/README.md +++ b/Detectors/Upgrades/ALICE3/IOTOF/README.md @@ -23,7 +23,7 @@ Configurables for various sub-detectors are presented in the following Table: | `IOTOFBase.segmentedInnerTOF` | `false` (default), `true` | Use segmented geometry for inner TOF | | `IOTOFBase.segmentedOuterTOF` | `false` (default), `true` | Use segmented geometry for outer TOF | | `IOTOFBase.detectorPattern` | ` ` (default), `v3b`, `v3b1a`, `v3b1b`, `v3b2a`, `v3b2b`, `v3b3` | Optional layout pattern | -| `IOTOFBase.x2x0` | `0.02` (default) | Chip thickness in fractions of the rad. lenght | +| `IOTOFBase.x2x0` | `0.000527` (default) | Chip thickness in fractions of the rad. lenght | For example, a geometry with fully cylindrical tracker barrel (for all layers in VD, ML and OT) can be obtained by From 7863af0c083effc10eac88815665c54e8b8c373c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 25 Mar 2026 21:53:00 +0100 Subject: [PATCH 4/6] Update IOTOFBaseParam.h --- .../ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h b/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h index 91d005415891d..e782bd63c3fcc 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h +++ b/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h @@ -28,7 +28,7 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper std::string detectorPattern = ""; // Layouts of the detector bool segmentedInnerTOF = false; // If the inner TOF layer is segmented bool segmentedOuterTOF = false; // If the outer TOF layer is segmented - float x2x0 = 0.02f; // thickness expressed in radiation length, for all layers for the moment + float x2x0 = 0.000527f; // thickness expressed in radiation length, for all layers for the moment O2ParamDef(IOTOFBaseParam, "IOTOFBase"); }; @@ -36,4 +36,4 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper } // namespace iotof } // end namespace o2 -#endif \ No newline at end of file +#endif From 7550af7ab4c5966c055e2aaf8fe1fad412c42716 Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Wed, 25 Mar 2026 21:53:58 +0100 Subject: [PATCH 5/6] Please consider the following formatting changes (#15221) --- .../ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h | 2 +- Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h b/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h index e782bd63c3fcc..1f1a26b79077e 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h +++ b/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h @@ -28,7 +28,7 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper std::string detectorPattern = ""; // Layouts of the detector bool segmentedInnerTOF = false; // If the inner TOF layer is segmented bool segmentedOuterTOF = false; // If the outer TOF layer is segmented - float x2x0 = 0.000527f; // thickness expressed in radiation length, for all layers for the moment + float x2x0 = 0.000527f; // thickness expressed in radiation length, for all layers for the moment O2ParamDef(IOTOFBaseParam, "IOTOFBase"); }; diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx index 73e4518ed70f7..61720f2172b92 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx @@ -96,10 +96,10 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str } if (itof) { // iTOF const std::string name = GeometryTGeo::getITOFLayerPattern(); - const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case - const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm + const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case + const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm const double staveTiltAngle = itofSegmented ? 10.0 : 0.0; // degrees - const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case + const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case mITOFLayer = ITOFLayer(name, dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel, nStaves, staveWidth, staveTiltAngle, modulesPerStave); From 571386f4b3496082bd807a20b3474bd756f5fd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 25 Mar 2026 21:55:07 +0100 Subject: [PATCH 6/6] Adjust stave tilt angle in iTOF configuration Updated stave tilt angle for segmented iTOF configuration. --- .../Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx index 61720f2172b92..d6417eba22041 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx @@ -96,10 +96,10 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str } if (itof) { // iTOF const std::string name = GeometryTGeo::getITOFLayerPattern(); - const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case - const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm - const double staveTiltAngle = itofSegmented ? 10.0 : 0.0; // degrees - const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case + const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case + const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm + const double staveTiltAngle = itofSegmented ? 3.0 : 0.0; // degrees + const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case mITOFLayer = ITOFLayer(name, dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel, nStaves, staveWidth, staveTiltAngle, modulesPerStave);