From cd684f9fd0eac549bf5dd04ca2bf5d8a531f856e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Wed, 4 Mar 2026 10:50:09 +0100 Subject: [PATCH] [ALICE3] Add possibility to set the chip thickness --- .../base/include/IOTOFBase/IOTOFBaseParam.h | 15 +++++------ .../include/IOTOFSimulation/Detector.h | 2 +- .../ALICE3/IOTOF/simulation/src/Detector.cxx | 25 +++++++++++-------- .../ALICE3/IOTOF/simulation/src/Layer.cxx | 2 +- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h b/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h index b74fc6d6869dd..91d005415891d 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h +++ b/Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h @@ -21,13 +21,14 @@ namespace iotof { struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper { - bool enableInnerTOF = true; - bool enableOuterTOF = true; - bool enableForwardTOF = true; - bool enableBackwardTOF = true; - std::string detectorPattern = ""; - bool segmentedInnerTOF = false; // If the inner TOF layer is segmented - bool segmentedOuterTOF = false; // If the outer TOF layer is segmented + bool enableInnerTOF = true; // Enable Inner TOF layer + bool enableOuterTOF = true; // Enable Outer TOF layer + bool enableForwardTOF = true; // Enable Forward TOF layer + bool enableBackwardTOF = true; // Enable Backward TOF layer + 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 O2ParamDef(IOTOFBaseParam, "IOTOFBase"); }; diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/include/IOTOFSimulation/Detector.h b/Detectors/Upgrades/ALICE3/IOTOF/simulation/include/IOTOFSimulation/Detector.h index f3c4e3ddd6276..acf754e1b1fa8 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/include/IOTOFSimulation/Detector.h +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/include/IOTOFSimulation/Detector.h @@ -60,7 +60,7 @@ class Detector : public o2::base::DetImpl return nullptr; } - void configLayers(bool itof = true, bool otof = true, bool ftof = true, bool btof = true, std::string pattern = "", bool itofSegmented = false, bool otofSegmented = false); + void configLayers(bool itof = true, bool otof = true, bool ftof = true, bool btof = true, std::string pattern = "", bool itofSegmented = false, bool otofSegmented = false, const float x2x0 = 0.02f); void configServices(); void createMaterials(); diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx index c056df5fd34ca..d4e34c582bbed 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx @@ -41,7 +41,7 @@ Detector::Detector(bool active) configLayers(iotofPars.enableInnerTOF, iotofPars.enableOuterTOF, iotofPars.enableForwardTOF, iotofPars.enableBackwardTOF, iotofPars.detectorPattern, - iotofPars.segmentedInnerTOF, iotofPars.segmentedOuterTOF); + iotofPars.segmentedInnerTOF, iotofPars.segmentedOuterTOF, iotofPars.x2x0); } Detector::~Detector() @@ -57,12 +57,13 @@ void Detector::ConstructGeometry() createGeometry(); } -void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::string pattern, bool itofSegmented, bool otofSegmented) +void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::string pattern, bool itofSegmented, bool otofSegmented, + const float x2x0) { - float radiusInnerTof = 19.f; - float radiusOuterTof = 85.f; - float lengthInnerTof = 124.f; + const float radiusInnerTof = 19.f; + const float radiusOuterTof = 85.f; + const float lengthInnerTof = 124.f; float lengthOuterTof = 680.f; std::pair radiusRangeDiskTof = {15.f, 100.f}; float zForwardTof = 370.f; @@ -97,23 +98,25 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str } if (itof) { // iTOF mITOFLayer = itofSegmented ? ITOFLayer(std::string{GeometryTGeo::getITOFLayerPattern()}, - radiusInnerTof, 0.f, lengthInnerTof, 0.f, 0.02f, ITOFLayer::kBarrelSegmented, + radiusInnerTof, 0.f, lengthInnerTof, 0.f, x2x0, ITOFLayer::kBarrelSegmented, 24, 5.42, 10.0, 10) : ITOFLayer(std::string{GeometryTGeo::getITOFLayerPattern()}, - radiusInnerTof, 0.f, lengthInnerTof, 0.f, 0.02f, ITOFLayer::kBarrel); + radiusInnerTof, 0.f, lengthInnerTof, 0.f, x2x0, ITOFLayer::kBarrel); } if (otof) { // oTOF mOTOFLayer = otofSegmented ? OTOFLayer(std::string{GeometryTGeo::getOTOFLayerPattern()}, - radiusOuterTof, 0.f, lengthOuterTof, 0.f, 0.02f, OTOFLayer::kBarrelSegmented, + radiusOuterTof, 0.f, lengthOuterTof, 0.f, x2x0, OTOFLayer::kBarrelSegmented, 62, 9.74, 5.0, 54) : OTOFLayer(std::string{GeometryTGeo::getOTOFLayerPattern()}, - radiusOuterTof, 0.f, lengthOuterTof, 0.f, 0.02f, OTOFLayer::kBarrel); + radiusOuterTof, 0.f, lengthOuterTof, 0.f, x2x0, OTOFLayer::kBarrel); } if (ftof) { - mFTOFLayer = FTOFLayer(std::string{GeometryTGeo::getFTOFLayerPattern()}, radiusRangeDiskTof.first, radiusRangeDiskTof.second, 0.f, zForwardTof, 0.02f, FTOFLayer::kDisk); // fTOF + mFTOFLayer = FTOFLayer(std::string{GeometryTGeo::getFTOFLayerPattern()}, + radiusRangeDiskTof.first, radiusRangeDiskTof.second, 0.f, zForwardTof, x2x0, FTOFLayer::kDisk); // fTOF } if (btof) { - mBTOFLayer = BTOFLayer(std::string{GeometryTGeo::getBTOFLayerPattern()}, radiusRangeDiskTof.first, radiusRangeDiskTof.second, 0.f, -zForwardTof, 0.02f, BTOFLayer::kDisk); // bTOF + mBTOFLayer = BTOFLayer(std::string{GeometryTGeo::getBTOFLayerPattern()}, + radiusRangeDiskTof.first, radiusRangeDiskTof.second, 0.f, -zForwardTof, x2x0, BTOFLayer::kDisk); // bTOF } } diff --git a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx index 32a24fc46f94c..1744e4c4510bb 100644 --- a/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx +++ b/Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx @@ -40,7 +40,7 @@ Layer::Layer(std::string layerName, float rInn, float rOut, float zLength, float mModulesPerStave(modulesPerStave), mTiltAngle(staveTiltAngle) { - float Si_X0 = 9.5f; + const float Si_X0 = 9.5f; mChipThickness = mX2X0 * Si_X0; std::string name = ""; switch (layout) {