From b71f4875bfa6598e546de6d2ea93a2ba27373b90 Mon Sep 17 00:00:00 2001 From: Naseem b Date: Mon, 30 Nov 2026 17:28:41 +0900 Subject: [PATCH 1/3] ALICE3: flat-lane small disks from current paving scheme --- .../include/FT3Simulation/FT3Module.h | 13 +- .../FT3Simulation/FT3ModuleConstants.h | 126 +++++++++-- .../TRKFT3/FT3/simulation/src/Detector.cxx | 19 +- .../TRKFT3/FT3/simulation/src/FT3Layer.cxx | 35 +++- .../TRKFT3/FT3/simulation/src/FT3Module.cxx | 195 +++++++++++++++--- 5 files changed, 318 insertions(+), 70 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h index a0abf221eb35b..a3c209b0fdfb0 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h @@ -59,6 +59,12 @@ class FT3Module double Rout, double z_offset_local, const Constants::StaveConfig& staveConfig, TGeoVolume* motherVolume); + // Middle disks (StaveConfig::isFlatCorrugated): flat lanes on two z planes, built + // straight from the tabulated fills, with no triangular carbon staves + void create_layout_flatLanes( + int layerNumber, int direction, double z_offset_local, + const Constants::StaveConfig& staveConfig, TGeoVolume* motherVolume); + // Walk every stave of a layer, create its volumes and work out where its // modules go, leaving the positions in y_positionsPosNeg void build_staves_exact( @@ -124,9 +130,14 @@ class FT3Module TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight); + // Continuous carbon strip (flat plate) that the modules of one fill of a flat lane are glued to + void addLaneCarbonStripVolume( + TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, + unsigned fill_idx, double x_mid, double y_mid, double z_mid, double halfLength); + void addSingleSensorVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, unsigned volume_count, double active_x_mid, double y_mid, double z_mid, bool isLeft); }; -#endif // FT3MODULE_H +#endif // FT3MODULE_H \ No newline at end of file diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h index f06d8d50c86b3..f55c4f81f46c5 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h @@ -124,6 +124,9 @@ const double staveMaterialBudget = // for the eff. thickness, we use the CarbonFiber X0 = 27 cm from FT3Materials.h const double effectiveCarbonThickness_Stave = staveMaterialBudget * 27.0; // ~187 um +// Carbon base the modules of the flat middle disks are glued to. +// Taken from the stave value above until the thickness of the flat plate is known. +const double flatLaneCarbonBaseThickness = effectiveCarbonThickness_Stave; const double staveOpeningAngle = 60 * TMath::DegToRad(); const double sinTheta = TMath::Sin(staveOpeningAngle / 2); const double cosTheta = TMath::Cos(staveOpeningAngle / 2); @@ -211,6 +214,19 @@ struct StaveConfig { * split by the beam pipe. */ const std::vector>& exactStaveFills; + /* + * Flat corrugated lanes (middle disks) instead of triangular staves: every stave is a + * flat lane of modules on one of two z planes, corrugationDepth apart (staveOnFront picks + * the plane: true is the plane closer to the interaction point), and neighbouring lanes + * overlap in x. For such a config staveTriangleHeight and z_offsetStave do not apply. + * laneSensorGap and laneStackGap are the gaps used to place the modules of a flat lane: + * between sensors inside a stack, and between stacks along the lane. + * All of these default to the triangular-stave behaviour used by the large disks. + */ + const bool isFlatCorrugated = false; + const double corrugationDepth = 0.; + const double laneSensorGap = sensor1x2_gap; + const double laneStackGap = moduleGap; }; namespace OT_StavePositions @@ -292,28 +308,94 @@ const std::vector> exactStaveFills = { namespace ML_StavePositions { -// Use prelim numbers for now, these will change! TODO +/* + * Middle disks: flat corrugated lanes instead of triangular staves. + * Rin 9, Rout 37 cm, nearest corner of an active area is at 9.87 cm and the furthest at 36.35 cm, or 9.72 and + * 36.49 cm with the inactive rims of the sensors), 20 lanes of Nx2 + * modules of 23.5 x 29 mm active sensors, 0.2 mm between all sensors (so the stack gap + * equals the sensor gap), 644 sensors per disk. Lanes alternate between two z planes + * 6 mm apart (747 and 753 mm for a disk centred on 750 mm), with a lane pitch of 34.475 mm + * (overlap in x) except for the two innermost lanes, 37.8 mm apart. The six lanes that + * the beam pipe cuts (IDs +-1, +-2, +-3) have two fills. + * + * Sensors face the interaction point on both planes; see FT3Module::create_layout_flatLanes. + */ +const double sensorGap = 0.02; // between the L and R sensors of a 1x2 module and between stacked modules +const double stackGap = 0.02; // same as sensorGap in this layout +const double corrugationDepth = 0.6; // distance between the two sensor planes +/* + * Cut lanes are built as two pieces on +-y_midpoint. The flat-lane builder reads the + * positions from exactStaveFills and does not use these two tables, they are kept + * consistent with the layout for the code that does. + */ const std::map> staveID_to_y_midpoint = { - {-3, {19.1, true}}, - {-2, {21.8, true}}, - {-1, {22.5, true}}, - {1, {22.5, true}}, - {2, {21.8, true}}, - {3, {19.1, true}}}; + {-3, {20.7895, true}}, + {-2, {21.291, true}}, + {-1, {21.6417, true}}, + {1, {21.6417, true}}, + {2, {21.291, true}}, + {3, {20.7895, true}}}; +// Length of one piece for a cut lane, otherwise the whole lane, in lane order. const std::vector y_lengths = { - 30.5, 44.5, 53.6, 60.0, 64.6, 29.5, 25.8, 25.0, - 25.0, 25.8, 29.5, 64.6, 60.0, 53.6, 44.5, 30.5}; -const unsigned nStaves = 16; // y_lengths, staveOnFront and exactStaveFills follow this -const double x_midpoint_spacing = 4.5; -const std::vector x_midpoints = makeStaveXMidpoints(nStaves, x_midpoint_spacing); -const double maxToleranceInner = 0.; // default not allowed inwards -const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation -const std::vector staveOnFront = makeStaveOnFront(nStaves); -// TODO: fill from the disk optimiser output, see OT_StavePositions above. -const std::vector> exactStaveFills = {}; + 17.5, 32.1, 43.78, 49.62, + 55.46, 61.3, 64.22, 26.26, + 23.34, 23.34, 23.34, 23.34, + 26.26, 64.22, 61.3, 55.46, + 49.62, 43.78, 32.1, 17.5}; +const unsigned nStaves = 20; // y_lengths, x_midpoints, staveOnFront and exactStaveFills follow this +const double x_midpoint_spacing = 3.4475; +// Lane pitch is x_midpoint_spacing except between the two innermost lanes (+-1.89 cm), so the midpoints are tabulated +const std::vector x_midpoints = { + -32.9175, -29.47, -26.0225, -22.575, + -19.1275, -15.68, -12.2325, -8.785, + -5.3375, -1.89, 1.89, 5.3375, + 8.785, 12.2325, 15.68, 19.1275, + 22.575, 26.0225, 29.47, 32.9175}; +const double maxToleranceInner = 0.; // the sensors stay inside the nominal radii +const double maxToleranceOuter = 0.; +/* + * Front = the plane closer to the interaction point, as in the triangular-stave builder: for a + * forward disk that is the 747 mm plane (the outward-facing lanes); the other lanes are on the + * 753 mm plane (the inward-facing lanes). The first lane starts on the front plane and the + * lanes then alternate. + */ +const std::vector staveOnFront = [] { + std::vector onFront(nStaves); + for (unsigned i = 0; i < nStaves; i++) { + onFront[i] = (i % 2 == 0); + } + return onFront; +}(); +/* + * One entry per lane in x_midpoints order, one fill per piece. yStart is the bottom edge of the + * lowest sensor; the modules follow upwards, 0.2 mm apart, so every fill is a single stack. + */ +const std::vector> exactStaveFills = { + {{-8.75, {6}}}, // ID -10 (753 mm) + {{-16.05, {11}}}, // ID -9 (747 mm) + {{-21.89, {15}}}, // ID -8 (753 mm) + {{-24.81, {17}}}, // ID -7 (747 mm) + {{-27.73, {19}}}, // ID -6 (753 mm) + {{-30.65, {21}}}, // ID -5 (747 mm) + {{-32.11, {22}}}, // ID -4 (753 mm) + {{-33.9195, {9}}, {7.6595, {9}}}, // ID -3 (747 mm) + {{-32.961, {8}}, {9.621, {8}}}, // ID -2 (753 mm) + {{-33.3117, {8}}, {9.9717, {8}}}, // ID -1 (747 mm) + {{-33.3117, {8}}, {9.9717, {8}}}, // ID +1 (753 mm) + {{-32.961, {8}}, {9.621, {8}}}, // ID +2 (747 mm) + {{-33.9195, {9}}, {7.6595, {9}}}, // ID +3 (753 mm) + {{-32.11, {22}}}, // ID +4 (747 mm) + {{-30.65, {21}}}, // ID +5 (753 mm) + {{-27.73, {19}}}, // ID +6 (747 mm) + {{-24.81, {17}}}, // ID +7 (753 mm) + {{-21.89, {15}}}, // ID +8 (747 mm) + {{-16.05, {11}}}, // ID +9 (753 mm) + {{-8.75, {6}}}, // ID +10 (747 mm) +}; } // namespace ML_StavePositions -// Get stave configuration based on tracker type +// Get stave configuration based on tracker type: the inner (middle) disks are flat corrugated +// lanes, the outer disks are triangular staves inline StaveConfig getStaveConfig(bool isInnerDisk) { if (isInnerDisk) { @@ -326,7 +408,11 @@ inline StaveConfig getStaveConfig(bool isInnerDisk) ML_StavePositions::maxToleranceInner, ML_StavePositions::maxToleranceOuter, ML_StavePositions::staveOnFront, - ML_StavePositions::exactStaveFills}; + ML_StavePositions::exactStaveFills, + true, // isFlatCorrugated: the middle disks are the small disks + ML_StavePositions::corrugationDepth, + ML_StavePositions::sensorGap, + ML_StavePositions::stackGap}; } else { return StaveConfig{ false, // isML @@ -377,4 +463,4 @@ inline double eosCardEnvelopeExtension(bool isML) } // namespace o2::ft3::ModuleConstants -#endif // FT3MODULECONSTANTS_H +#endif // FT3MODULECONSTANTS_H \ No newline at end of file diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx index 8407482dbd4ec..f73632b1a60dd 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx @@ -254,8 +254,9 @@ void Detector::buildFT3ScopingV3() { // Build the FT3 detector according to v3 layout // https://indico.cern.ch/event/1596309/contributions/6728167/attachments/3190117/5677220/2025-12-10-AW-ALICE3planning.pdf - // Middle disks inner radius 10 cm - // Outer disks inner radius 20 cm + // Middle disks (layers 0-2), flat corrugated lanes: Rin 9 cm, Rout 37 cm + // (ML_StavePositions in FT3ModuleConstants.h) + // Outer disks (layers 3-5) inner radius 20 cm LOG(info) << "Building FT3 Detector: v3 scoping version"; @@ -263,16 +264,16 @@ void Detector::buildFT3ScopingV3() const float sensorThickness = 30.e-4; const float layersx2X0 = 1.e-2; using LayerConfig = std::array; // {z_layer, r_in, r_out, Layerx2X0} - const std::array layersConfigCSide{LayerConfig{77., 10.0, 35., layersx2X0}, - LayerConfig{100., 10.0, 35., layersx2X0}, - LayerConfig{122., 10.0, 35., layersx2X0}, + const std::array layersConfigCSide{LayerConfig{77., 9.0, 37., layersx2X0}, + LayerConfig{100., 9.0, 37., layersx2X0}, + LayerConfig{122., 9.0, 37., layersx2X0}, LayerConfig{150., 20.0, 68.f, layersx2X0}, LayerConfig{180., 20.0, 68.f, layersx2X0}, LayerConfig{220., 20.0, 68.f, layersx2X0}}; - const std::array layersConfigASide{LayerConfig{77., 10.0, 35., layersx2X0}, - LayerConfig{100., 10.0, 35., layersx2X0}, - LayerConfig{122., 10.0, 35., layersx2X0}, + const std::array layersConfigASide{LayerConfig{77., 9.0, 37., layersx2X0}, + LayerConfig{100., 9.0, 37., layersx2X0}, + LayerConfig{122., 9.0, 37., layersx2X0}, LayerConfig{150., 20.0, 68.f, layersx2X0}, LayerConfig{180., 20.0, 68.f, layersx2X0}, LayerConfig{220., 20.0, 68.f, layersx2X0}}; @@ -669,4 +670,4 @@ Hit* Detector::addHit(int trackID, int detID, const TVector3& startPos, const TV return &(mHits->back()); } -ClassImp(o2::ft3::Detector); +ClassImp(o2::ft3::Detector); \ No newline at end of file diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx index c6d186a0d7536..de99435530b06 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx @@ -205,7 +205,10 @@ void FT3Layer::createReferenceCircles(TGeoVolume* motherVolume, const std::strin motherVolume->AddNode(innerCircleVol, 1, new TGeoTranslation(0, 0, z_position)); motherVolume->AddNode(outerCircleVol, 1, new TGeoTranslation(0, 0, z_position)); - motherVolume->AddNode(outerCircleEdgeVol, 1, new TGeoTranslation(0, 0, z_position)); + // the outer edge circle marks the OT tolerance, outside the small-disk air volume + if (!mIsMiddleLayer) { + motherVolume->AddNode(outerCircleEdgeVol, 1, new TGeoTranslation(0, 0, z_position)); + } } void FT3Layer::createLayer(TGeoVolume* motherVolume) @@ -366,7 +369,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) LOG(info) << "Inserting " << layerVol->GetName() << " inside " << motherVolume->GetName(); motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans); } else if (ft3Params.layoutFT3 == kSegmented || - (ft3Params.layoutFT3 == kSegmentedStaveOTOnly && mIsMiddleLayer)) { + (ft3Params.layoutFT3 == kSegmentedStaveOTOnly && mIsMiddleLayer)) { FT3Module module; // layer structure @@ -393,7 +396,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) LOG(info) << "Inserting " << layerVol->GetName() << " (Rmin=" << mInnerRadius << ", Rmax=" << mOuterRadius << ", z=" << mZ << "cm) inside " << motherVolume->GetName(); motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans); } else if (ft3Params.layoutFT3 == kSegmentedStave || - ft3Params.layoutFT3 == kSegmentedStaveOTOnly) { + ft3Params.layoutFT3 == kSegmentedStaveOTOnly) { FT3Module module; // layer structure @@ -404,13 +407,24 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) TGeoMedium* medAir = getMedium(Materials::MaterialID::Air); TGeoVolume* layerVol = nullptr; - // set up stave config, differs between ML and OT disks + // set up stave config: middle disks (flat lanes), OT disks (triangular staves) const Constants::StaveConfig& staveConfig = Constants::getStaveConfig(mIsMiddleLayer); // need a thicker air layer to encompass the staves (4.5cm high, 1.2cm offsets) // stave face is at z=0 (or +-z_offset_stave), meaning that volumes are at // ~-+1cm < z < ~+-6cm, the +- referring forward/backward discs + // Middle layers (small disks): flat corrugated lanes, so two sensor planes corrugationDepth apart, + // each with its sensor materials (silicon, glue, carbon base) behind it, centred on the layer. + // The corrugated sheet is not included yet. + const double flatLayerThickness = + staveConfig.corrugationDepth + + 2 * (o2::ft3::ModuleConstants::siliconThickness + + o2::ft3::ModuleConstants::epoxyThickness + + o2::ft3::ModuleConstants::flatLaneCarbonBaseThickness) + + 0.5; // add some extra room to ensure all volumes are encapsulated + double z_layer_thickness = // need to shift internally with this + mIsMiddleLayer ? flatLayerThickness : o2::ft3::ModuleConstants::staveHeight + o2::ft3::ModuleConstants::z_offsetStave(staveConfig.x_midpoint_spacing) + o2::ft3::ModuleConstants::siliconThickness + @@ -420,17 +434,20 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) 0.5; // add some extra room to ensure all volumes are encapsulated // shift stave volumes into layer volume, since nominal z_{stave face} = 0 - double z_local_offset = z_layer_thickness / 2.0; + // (the flat small-disk lanes are symmetric about the layer centre, so no shift there) + double z_local_offset = mIsMiddleLayer ? 0. : z_layer_thickness / 2.0; // ensure staves fully encapsulated in the layer volume, // but don't cross out of max nominal radii of 38.5cm & 71.5cm respectively (3.5cm tolerance) // Allow 3, 9cm outward, inward for OT: + // Middle disks: no tolerance in or out, the lanes sit inside the nominal radii double innerRadiusForAirTube = mIsMiddleLayer ? mInnerRadius : mInnerRadius - 9.0; - double outerRadiusForAirTube = mIsMiddleLayer ? mOuterRadius + 2.5 : mOuterRadius + 3.0; + double outerRadiusForAirTube = mIsMiddleLayer ? mOuterRadius : mOuterRadius + 3.0; // MvL: try 70.5 // 2.5 cm tolerance instead const double rInEnv = innerRadiusForAirTube - 0.2; const double rOutEnv = outerRadiusForAirTube; const double H0 = z_layer_thickness / 2; - if (ft3Params.addDiskEosCards) { + // (the small disks have no end-of-stave cards yet, so they keep the plain envelope) + if (ft3Params.addDiskEosCards && !mIsMiddleLayer) { // Extend the envelope DOWNSTREAM only (away from the IP) with a union, so the // end-of-stave cards fit without growing toward the IP / the neighbouring disk. const double ext = o2::ft3::ModuleConstants::eosCardEnvelopeExtension(mIsMiddleLayer); @@ -455,7 +472,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) // need the -0.5 added to local offset to ensure all sensor modules are inside the layer module.createModule_staveGeo(0., mLayerNumber, mDirection, mInnerRadius, - mOuterRadius, z_local_offset, staveConfig, layerVol); + mOuterRadius, z_local_offset, staveConfig, layerVol); // Finally put everything in the mother volume auto* FwdDiskRotation = new TGeoRotation("FwdDiskRotation", 0, 0, 180); // need to shift outwards always, so + forwards and - backwards @@ -468,4 +485,4 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) } else { LOG(fatal) << "Unknown FT3 layout option: " << static_cast(ft3Params.layoutFT3); } -} +} \ No newline at end of file diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx index 3e3318bbecd5f..56cadc421c8da 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx @@ -254,9 +254,9 @@ void FT3Module::addStaveVolume( if (absAllowedYRange.first < 0 || absAllowedYRange.second < 0 || absAllowedYRange.first >= absAllowedYRange.second) { LOG(error) << "Invalid allowed y range in addStaveVolume(): (" - << absAllowedYRange.first << ", " << absAllowedYRange.second - << "). Both values must be non-negative and the first " - << "value must be less than the second value."; + << absAllowedYRange.first << ", " << absAllowedYRange.second + << "). Both values must be non-negative and the first " + << "value must be less than the second value."; return; } // Set the lower and upper y values of the stave: @@ -348,7 +348,7 @@ void FT3Module::addDetectorVolume( { TGeoManager* geoManager = gGeoManager; TGeoVolume* volume = geoManager->MakeBox(volumeName.c_str(), med, x_half_length, - y_half_length, z_half_length); + y_half_length, z_half_length); volume->SetLineColor(color); volume->SetFillColorAlpha(color, 0.4); if (rotX == 0.) { @@ -365,9 +365,9 @@ void FT3Module::addDetectorVolume( volume, volume_count, new TGeoCombiTrans("", - x_mid, - y_mid, - z_mid, + x_mid, + y_mid, + z_mid, new TGeoRotation("", 0., rotX, 0.)) // TGeoCombiTrans ); // addNode } @@ -428,6 +428,25 @@ void FT3Module::addNx2KaptonVolume( (moduleHeight + Constants::moduleGap) / 2, Constants::kaptonThickness / 2); } +/* + * This function adds the carbon strip of a flat (middle disk) lane. It is the flat + * carbon plate the modules of one fill are glued to: one continuous box, as wide as the + * stave (the same as the FPC layers), that runs under all stacks of the fill, so it also + * covers the gaps between the modules and between the stacks. halfLength is half the + * length of the strip in y. + */ +void FT3Module::addLaneCarbonStripVolume( + TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, + unsigned fill_idx, double x_mid, double y_mid, double z_mid, double halfLength) +{ + std::string carbon_name = "FT3CarbonStrip_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(fill_idx); + addDetectorVolume( + motherVolume, carbon_name, Materials::materials.at(Materials::MaterialID::CarbonFiber).colour, + getMedium(Materials::MaterialID::CarbonFiber), fill_idx, + x_mid, y_mid, z_mid, + Constants::staveWidth / 2, halfLength, Constants::flatLaneCarbonBaseThickness / 2); +} + /* * This function adds a single sensor (currently 2.5x2.9cm) to the given mother volume * at the given (x,y,z) position of the module. @@ -464,10 +483,10 @@ void FT3Module::addSingleSensorVolume( // INACTIVE STRIP ON LEFT OR RIGHT double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2) - : (active_x_mid + Constants::active_width / 2 + Constants::inactive_width / 2); + : (active_x_mid + Constants::active_width / 2 + Constants::inactive_width / 2); std::string sensor_inactive_name = "FT3Sensor_Inactive_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count); sensor = geoManager->MakeBox(sensor_inactive_name.c_str(), siliconMed, Constants::inactive_width / 2, - Constants::single_sensor_height / 2, Constants::siliconThickness / 2); + Constants::single_sensor_height / 2, Constants::siliconThickness / 2); addDetectorVolume( motherVolume, sensor_inactive_name, Materials::SiInactiveColor, siliconMed, volume_count, inactive_x_mid, y_mid, z_mid, @@ -506,12 +525,12 @@ void FT3Module::addEndOfStaveCard( const Constants::EosCardParams& c = Constants::getEosCardParams(isML); if (cuThickness * c.nCopperLayers >= c.thickness) { LOG(fatal) << "FT3 disk EoS card: Cu " << cuThickness << " cm x " << c.nCopperLayers - << " planes does not fit in the " << c.thickness << " cm card"; + << " planes does not fit in the " << c.thickness << " cm card"; } // FR4 board (x = width, y = thickness, z = length) TGeoVolume* cardVol = gGeoManager->MakeBox(name.c_str(), getMedium(Materials::MaterialID::FR4), - c.width / 2, c.thickness / 2, c.length / 2); + c.width / 2, c.thickness / 2, c.length / 2); cardVol->SetLineColor(kGreen + 3); // copper planes spread over the thickness (y), outermost two flush with the faces @@ -581,14 +600,14 @@ void FT3Module::add_stave_volumes( // absAllowedYRange.second, exact leaves it unbounded (DBL_MAX), so take the // smaller of the geometric end and the radial clamp. const double yTip = std::min(y_midpoint + staveConfig.y_lengths[i_stave] / 2, - absAllowedYRange.second); + absAllowedYRange.second); // Per-stave sensor silicon z in the layer frame, reconstructed from the // carbon-face offset exactly as the sensor-placement loop does, so the card // starts right after the sensors. const double z_offset_to_silicon = z_offset_to_stave_face + - Constants::epoxyThickness + Constants::kaptonThickness + - Constants::copperThickness + Constants::epoxyThickness + - Constants::siliconThickness / 2; + Constants::epoxyThickness + Constants::kaptonThickness + + Constants::copperThickness + Constants::epoxyThickness + + Constants::siliconThickness / 2; const double zOffMult = (direction == 1) ? -1.0 : 1.0; double zStaveShiftSensors = 0.0; if (!staveConfig.staveOnFront[i_stave]) { @@ -597,7 +616,7 @@ void FT3Module::add_stave_volumes( } const double zSensor = z_offset_to_silicon * zOffMult + zStaveShiftSensors; const std::string cardBase = "FT3_EOSdiskCard_" + std::to_string(direction) + "_" + - std::to_string(layerNumber) + "_" + std::to_string(i_stave); + std::to_string(layerNumber) + "_" + std::to_string(i_stave); addEndOfStaveCard(motherVolume, cardBase + "_pos", direction, (*staveVolumeCount)++, staveConfig.x_midpoints[i_stave], +yTip, zSensor, isML, cuT); // split stave: the mirror piece reaches the outer radius at -y, give it a card too @@ -652,7 +671,7 @@ void FT3Module::build_staves_exact( * care that some of those edges are negative. */ y_positionsPosNeg.emplace_back(fill_stave_exact(staveConfig.exactStaveFills[i_stave]), - PositionTypes{}); + PositionTypes{}); std::map nSensorStackCount; for (const auto& [y_bottom, kSensorStack] : y_positionsPosNeg.back().first) { @@ -761,7 +780,7 @@ void FT3Module::build_staves_greedy( } if (absAllowedYRange.second <= 0) { LOG(warning) << "For stave " << i_stave << " in layer " << layerNumber - << " with direction " << direction << ": no space to place sensors after applying tolerances, skipping stave."; + << " with direction " << direction << ": no space to place sensors after applying tolerances, skipping stave."; continue; } @@ -794,13 +813,127 @@ void FT3Module::build_staves_greedy( LOG(info) << totalModuleInfoStr; } +/* + * Middle disks: flat corrugated lanes. + * + * There is no carbon shell per stave as for the large disks. Each lane is a flat + * strip of Nx2 modules on one of two z planes, corrugationDepth apart. Lanes alternate + * between the planes and neighbouring lanes overlap in x. + * + * staveOnFront picks the plane: true is the plane closer to the interaction point + * (the near plane), false the one further away. The sensors of all lanes face the + * interaction point, with the glue and the carbon base behind the silicon, away from it: + * + * near plane, outward-facing lane (module on the outer side of the plate): + * IP <-- | SILICON | GLUE | CARBON BASE | --> towards the middle + * far plane, inward-facing lane (module on the inner side of the rear plate): + * IP <-- | SILICON | GLUE | CARBON BASE | --> away from the middle + * + * so the far-plane materials stick out a little beyond the far plane, where the rear + * plate is. + * + * The module positions are read straight from exactStaveFills and placed with the + * lane's own gaps (laneSensorGap, laneStackGap), which differ from the large-disk + * constants that Constants::getStackHeight and fill_stave_exact use. + * + * The carbon base is one continuous strip per fill (the flat plate of the lane), not one box + * per module. + * + * Not built yet: the corrugated carbon material and the end-of-stave cards. The carbon base + * thickness is provisional. + */ +void FT3Module::create_layout_flatLanes( + int layerNumber, int direction, double z_offset_local, + const Constants::StaveConfig& staveConfig, TGeoVolume* motherVolume) +{ + LOG(debug) << "FT3Module: create_layout_flatLanes - Direction " + << direction << ", Layer " << layerNumber; + + const unsigned nLanes = staveConfig.x_midpoints.size(); + if (staveConfig.exactStaveFills.size() != nLanes || staveConfig.staveOnFront.size() != nLanes) { + LOG(fatal) << "FT3 flat-lane disk needs one tabulated fill and one front/back flag per lane, got " + << staveConfig.exactStaveFills.size() << " fills and " << staveConfig.staveOnFront.size() + << " flags for " << nLanes << " lanes"; + } + + const double sensorGap = staveConfig.laneSensorGap; + const double stackGap = staveConfig.laneStackGap; + const double halfDepth = staveConfig.corrugationDepth / 2; + + // unit z vector pointing towards the interaction point (forward disks sit at +z) + const double towardsIP = (direction == 1) ? -1.0 : 1.0; + // the glue and the carbon base sit behind the silicon, away from the interaction point + const double behind = -towardsIP; + + // distance from the silicon mid-plane to the middle of each material behind it + const double dGlue = Constants::siliconThickness / 2 + Constants::epoxyThickness / 2; + const double dCarbon = Constants::siliconThickness / 2 + Constants::epoxyThickness + + Constants::flatLaneCarbonBaseThickness / 2; + + unsigned nModulesTotal = 0; + for (unsigned i_lane = 0; i_lane < nLanes; i_lane++) { + const double x_mid = staveConfig.x_midpoints[i_lane]; + const bool onNearPlane = staveConfig.staveOnFront[i_lane]; + // mid-plane of the silicon, in the frame of the layer volume (the layer is shifted + // away from the interaction point by z_offset_local, which is 0 for flat disks) + const double z_si = towardsIP * ((onNearPlane ? halfDepth : -halfDepth) + z_offset_local); + + unsigned sensor_count = 0; // reset for each lane + unsigned fill_idx = 0; + for (const auto& fill : staveConfig.exactStaveFills[i_lane]) { + // yStart is the bottom edge of the first sensor of the fill + double y_bottom = fill.yStart; + for (unsigned nSensorsInStack : fill.stackHeights) { + double y_mid = y_bottom + Constants::sensor1x2_height / 2; + for (unsigned i_sens = 0; i_sens < nSensorsInStack; i_sens++) { + // (1) Silicon sensors: left and right of the 1x2 + addSingleSensorVolume( + motherVolume, layerNumber, direction, i_lane, sensor_count, + x_mid - sensorGap / 2 - Constants::active_width / 2, y_mid, z_si, true); + addSingleSensorVolume( + motherVolume, layerNumber, direction, i_lane, sensor_count + 1, + x_mid + sensorGap / 2 + Constants::active_width / 2, y_mid, z_si, false); + // (2) Epoxy glue layer between silicon and the carbon base + addNx2GlueVolume( + motherVolume, layerNumber, direction, i_lane, sensor_count, + x_mid, y_mid, z_si + behind * dGlue, Constants::sensor1x2_height, "SiCarbon"); + y_mid += Constants::sensor1x2_height + sensorGap; + sensor_count += 2; // same count for each material in the glued stack + nModulesTotal++; + } + // next stack starts a stack gap above the top of this one + y_bottom += nSensorsInStack * Constants::single_sensor_height + + (nSensorsInStack - 1) * sensorGap + stackGap; + } + // (3) Carbon base: one strip under the whole fill, from the bottom of its first stack to + // the top of its last one (y_bottom is now one stack gap above the top) + // The glue reaches half a module gap beyond the first and the last module (as the FPC does + // on the large disks), so the strip does as well. + const double y_lo = fill.yStart - Constants::moduleGap / 2; + const double y_hi = y_bottom - stackGap + Constants::moduleGap / 2; + addLaneCarbonStripVolume( + motherVolume, layerNumber, direction, i_lane, fill_idx, + x_mid, (y_lo + y_hi) / 2, z_si + behind * dCarbon, (y_hi - y_lo) / 2); + fill_idx++; + } + } + LOG(info) << "Flat-lane layout for layer " << layerNumber << " in direction " << direction + << ": " << nLanes << " lanes, " << nModulesTotal << " 1x2 modules"; +} + void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction, - double Rin, double Rout, double z_offset_local, - const Constants::StaveConfig& staveConfig, - TGeoVolume* motherVolume) + double Rin, double Rout, double z_offset_local, + const Constants::StaveConfig& staveConfig, + TGeoVolume* motherVolume) { LOG(debug) << "FT3Module: create_layout_staveGeo - Direction " - << direction << ", Layer " << layerNumber; + << direction << ", Layer " << layerNumber; + + // Middle disks: flat lanes on two z planes, no triangular carbon staves + if (staveConfig.isFlatCorrugated) { + create_layout_flatLanes(layerNumber, direction, z_offset_local, staveConfig, motherVolume); + return; + } auto& ft3Params = o2::ft3::FT3BaseParam::Instance(); @@ -864,7 +997,7 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction */ if (ft3Params.useExactStavePlacement && !staveConfig.exactStaveFills.empty()) { build_staves_exact(motherVolume, layerNumber, direction, staveConfig, staveLegs, - z_offset_to_stave_face, y_positionsPosNeg, staveVolumeCount); + z_offset_to_stave_face, y_positionsPosNeg, staveVolumeCount); } else { build_staves_greedy(motherVolume, layerNumber, direction, Rin, Rout, staveConfig, staveLegs, z_offset_to_stave_face, y_positionsPosNeg, @@ -897,7 +1030,7 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction if (!staveConfig.staveOnFront[i_stave]) { // in forward direction, shifting backwards means +z shift z_stave_shift = (direction == 1) ? Constants::z_offsetStave(staveConfig.x_midpoint_spacing) - : -Constants::z_offsetStave(staveConfig.x_midpoint_spacing); + : -Constants::z_offsetStave(staveConfig.x_midpoint_spacing); } unsigned sensor_count = 0; // reset for each stave @@ -1120,13 +1253,13 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double // logic for placement - x positions with complete overlap if (face == "front") { X_positions = {-63.4, -60.9, -54.2, -51.7, -45.0, -42.5, -35.8, -33.3, -26.6, -24.1, -17.4, -14.9, - -8.2, -5.7, 1.0, 3.5, 10.2, 12.7, 19.4, 21.9, 28.6, 31.1, 37.8, 40.3, 47.0, 49.5, - 56.2, 58.7, 65.4}; + -8.2, -5.7, 1.0, 3.5, 10.2, 12.7, 19.4, 21.9, 28.6, 31.1, 37.8, 40.3, 47.0, 49.5, + 56.2, 58.7, 65.4}; justSkipped1 = {1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}; } else if (face == "back") { X_positions = {-65.5, -58.8, -56.3, -49.6, -47.1, -40.4, -37.9, -31.2, -28.7, -22.0, -19.5, -12.8, - -10.3, -3.6, -1.1, 5.6, 8.1, 14.8, 17.3, 24.0, 26.5, 33.2, 35.7, 42.4, 44.9, - 51.6, 54.1, 60.8, 63.3}; + -10.3, -3.6, -1.1, 5.6, 8.1, 14.8, 17.3, 24.0, 26.5, 33.2, 35.7, 42.4, 44.9, + 51.6, 54.1, 60.8, 63.3}; justSkipped1 = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}; } } else { @@ -1627,8 +1760,8 @@ void FT3Module::createModule_staveGeo(double mZ, int layerNumber, int direction, TGeoVolume* motherVolume) { LOG(debug) << "FT3Module: createModule_staveGeo - Layer " << layerNumber - << " at z=" << mZ << ", Direction " << direction; + << " at z=" << mZ << ", Direction " << direction; create_layout_staveGeo(mZ, layerNumber, direction, Rin, Rout, - z_offset_local, staveConfig, motherVolume); + z_offset_local, staveConfig, motherVolume); LOG(debug) << "FT3Module: done createModule_staveGeo"; -} +} \ No newline at end of file From 82d8eb0e95ed5022fcd572a084d7b83b5dcae57f Mon Sep 17 00:00:00 2001 From: Naseem b Date: Tue, 1 Dec 2026 16:48:26 +0900 Subject: [PATCH 2/3] Including the middle disk carbon corrugated structure, with silicon sensor on FPC, and EoS cards --- .../include/FT3Simulation/FT3Module.h | 17 +- .../FT3Simulation/FT3ModuleConstants.h | 38 +- .../TRKFT3/FT3/simulation/src/Detector.cxx | 2 +- .../TRKFT3/FT3/simulation/src/FT3Layer.cxx | 29 +- .../TRKFT3/FT3/simulation/src/FT3Module.cxx | 447 ++++++++++++++---- 5 files changed, 418 insertions(+), 115 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h index a3c209b0fdfb0..6f29884f293bd 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h @@ -130,10 +130,19 @@ class FT3Module TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight); - // Continuous carbon strip (flat plate) that the modules of one fill of a flat lane are glued to - void addLaneCarbonStripVolume( - TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned fill_idx, double x_mid, double y_mid, double z_mid, double halfLength); + // Box of one material for the flat lanes (glue, FPC copper and kapton, carbon plate, flat of the + // corrugated sheet). Half lengths are in x, y, z of the layer. + void addLaneBox( + TGeoVolume* motherVolume, const std::string& name, Materials::MaterialID material, + unsigned volume_count, double x_mid, double y_mid, double z_mid, + double x_half_length, double y_half_length, double z_half_length); + + // Wall of the corrugated sheet: a slanted slab between two flats, extruded along y from y_lo to + // y_hi. xa, xb are the x of its two vertical end faces and zLo/zHi the z of its two surfaces there. + void addLaneSheetWall( + TGeoVolume* motherVolume, const std::string& name, unsigned volume_count, + double xa, double zaLo, double zaHi, double xb, double zbLo, double zbHi, + double y_lo, double y_hi); void addSingleSensorVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h index f55c4f81f46c5..c0655806afe3f 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h @@ -124,15 +124,38 @@ const double staveMaterialBudget = // for the eff. thickness, we use the CarbonFiber X0 = 27 cm from FT3Materials.h const double effectiveCarbonThickness_Stave = staveMaterialBudget * 27.0; // ~187 um -// Carbon base the modules of the flat middle disks are glued to. -// Taken from the stave value above until the thickness of the flat plate is known. -const double flatLaneCarbonBaseThickness = effectiveCarbonThickness_Stave; +/* + * Flat (middle) disks. Every lane is a flat stack, from the silicon backwards (away from the IP): + * silicon | glue | FPC (copper, then kapton) | glue | carbon plate | glue | corrugated sheet + * The plate is one continuous strip per fill, wider than the FPC by flatLaneOverhang on each + * side. The overhang of the plate rests, through a layer of glue, on the flats of one + * continuous corrugated carbon sheet that runs across all lanes (see FT3Module::create_layout_flatLanes). + * The FPC (and its two layers of glue) is a module wide, 54.4 mm: the silicon with its periphery, plus the + * 2.1 mm bond area on each side. The flats of the sheet reach under the overhang of the plate, through + * the same depth as the FPC, so the FPC must end before them. + */ +// The FPC and the sensors are the same on all disks, so the flat lanes use the same copper and kapton as the staves +const double flatLaneFpcCopperThickness = copperThickness; +const double flatLaneFpcKaptonThickness = kaptonThickness; +const double flatLaneFpcThickness = flatLaneFpcCopperThickness + flatLaneFpcKaptonThickness; // 360 um +const double flatLaneGlueThickness = epoxyThickness; // between all layers of the stack +const double flatLaneCarbonBaseThickness = 0.06; // the plate: 0.6 mm +const double flatLaneSheetThickness = 0.06; // the corrugated sheet: 0.6 mm +const double flatLaneOverhang = 0.29; // plate beyond the FPC, each side (2.9 mm) +const double flatLaneSheetReach = 0.06; // the flats of the sheet reach this far under the overhang +const double flatLaneSheetMinClearance = 0.005; // the sheet must stay 50 um clear of the silicon +// distance from the silicon back face to the front face of the plate (towards the sheet side) +const double flatLaneStackToPlate = 2 * flatLaneGlueThickness + flatLaneFpcThickness; +// everything behind the silicon mid-plane, up to the back of the plate +const double flatLaneStackBehindSilicon = siliconThickness / 2 + flatLaneStackToPlate + flatLaneCarbonBaseThickness; const double staveOpeningAngle = 60 * TMath::DegToRad(); const double sinTheta = TMath::Sin(staveOpeningAngle / 2); const double cosTheta = TMath::Cos(staveOpeningAngle / 2); const double alpha = TMath::Pi() / 2 - staveOpeningAngle / 2; // bottom angles const double staveSensorGap = 0.21; // 2.1mm bonding region on each side: 54.4mm stave width const double staveWidth = sensor1x2_width + 2 * staveSensorGap; +const double flatLaneFpcWidth = staveWidth; // FPC and its glue: 54.4 mm +const double flatLanePlateWidth = flatLaneFpcWidth + 2 * flatLaneOverhang; // the plate: 60.2 mm /* * The stave is created from two carbon legs, and the FPC is its face -- being glued * onto carbon wings that stick out: @@ -221,7 +244,7 @@ struct StaveConfig { * overlap in x. For such a config staveTriangleHeight and z_offsetStave do not apply. * laneSensorGap and laneStackGap are the gaps used to place the modules of a flat lane: * between sensors inside a stack, and between stacks along the lane. - * All of these default to the triangular-stave behaviour used by the large disks. + * All of these default to the triangular-stave behaviour used by the outer disks. */ const bool isFlatCorrugated = false; const double corrugationDepth = 0.; @@ -310,7 +333,8 @@ namespace ML_StavePositions { /* * Middle disks: flat corrugated lanes instead of triangular staves. - * Rin 9, Rout 37 cm, nearest corner of an active area is at 9.87 cm and the furthest at 36.35 cm, or 9.72 and + * Layout from the sensor table coords_custom.txt: Rin 9, Rout 37 cm (envelope; the + * nearest corner of an active area is at 9.87 cm and the furthest at 36.35 cm, or 9.72 and * 36.49 cm with the inactive rims of the sensors), 20 lanes of Nx2 * modules of 23.5 x 29 mm active sensors, 0.2 mm between all sensors (so the stack gap * equals the sensor gap), 644 sensors per disk. Lanes alternate between two z planes @@ -395,7 +419,7 @@ const std::vector> exactStaveFills = { } // namespace ML_StavePositions // Get stave configuration based on tracker type: the inner (middle) disks are flat corrugated -// lanes, the outer disks are triangular staves +// lanes (the middle disks), the outer disks are triangular staves inline StaveConfig getStaveConfig(bool isInnerDisk) { if (isInnerDisk) { @@ -409,7 +433,7 @@ inline StaveConfig getStaveConfig(bool isInnerDisk) ML_StavePositions::maxToleranceOuter, ML_StavePositions::staveOnFront, ML_StavePositions::exactStaveFills, - true, // isFlatCorrugated: the middle disks are the small disks + true, // isFlatCorrugated: the middle disks have flat corrugated lanes ML_StavePositions::corrugationDepth, ML_StavePositions::sensorGap, ML_StavePositions::stackGap}; diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx index f73632b1a60dd..067c63cc60a04 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/Detector.cxx @@ -254,7 +254,7 @@ void Detector::buildFT3ScopingV3() { // Build the FT3 detector according to v3 layout // https://indico.cern.ch/event/1596309/contributions/6728167/attachments/3190117/5677220/2025-12-10-AW-ALICE3planning.pdf - // Middle disks (layers 0-2), flat corrugated lanes: Rin 9 cm, Rout 37 cm + // Middle disks (layers 0-2): flat corrugated lanes: Rin 9 cm, Rout 37 cm // (ML_StavePositions in FT3ModuleConstants.h) // Outer disks (layers 3-5) inner radius 20 cm diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx index de99435530b06..56f4c7b7fbc74 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx @@ -205,7 +205,7 @@ void FT3Layer::createReferenceCircles(TGeoVolume* motherVolume, const std::strin motherVolume->AddNode(innerCircleVol, 1, new TGeoTranslation(0, 0, z_position)); motherVolume->AddNode(outerCircleVol, 1, new TGeoTranslation(0, 0, z_position)); - // the outer edge circle marks the OT tolerance, outside the small-disk air volume + // the outer edge circle marks the OT tolerance, outside the middle-disk air volume if (!mIsMiddleLayer) { motherVolume->AddNode(outerCircleEdgeVol, 1, new TGeoTranslation(0, 0, z_position)); } @@ -369,7 +369,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) LOG(info) << "Inserting " << layerVol->GetName() << " inside " << motherVolume->GetName(); motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans); } else if (ft3Params.layoutFT3 == kSegmented || - (ft3Params.layoutFT3 == kSegmentedStaveOTOnly && mIsMiddleLayer)) { + (ft3Params.layoutFT3 == kSegmentedStaveOTOnly && mIsMiddleLayer)) { FT3Module module; // layer structure @@ -396,7 +396,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) LOG(info) << "Inserting " << layerVol->GetName() << " (Rmin=" << mInnerRadius << ", Rmax=" << mOuterRadius << ", z=" << mZ << "cm) inside " << motherVolume->GetName(); motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans); } else if (ft3Params.layoutFT3 == kSegmentedStave || - ft3Params.layoutFT3 == kSegmentedStaveOTOnly) { + ft3Params.layoutFT3 == kSegmentedStaveOTOnly) { FT3Module module; // layer structure @@ -407,20 +407,20 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) TGeoMedium* medAir = getMedium(Materials::MaterialID::Air); TGeoVolume* layerVol = nullptr; - // set up stave config: middle disks (flat lanes), OT disks (triangular staves) + // set up stave config: middle layers (flat lanes), outer disks (triangular staves) const Constants::StaveConfig& staveConfig = Constants::getStaveConfig(mIsMiddleLayer); // need a thicker air layer to encompass the staves (4.5cm high, 1.2cm offsets) // stave face is at z=0 (or +-z_offset_stave), meaning that volumes are at // ~-+1cm < z < ~+-6cm, the +- referring forward/backward discs - // Middle layers (small disks): flat corrugated lanes, so two sensor planes corrugationDepth apart, - // each with its sensor materials (silicon, glue, carbon base) behind it, centred on the layer. - // The corrugated sheet is not included yet. + // Middle layers: flat corrugated lanes, so two sensor planes corrugationDepth apart, + // each with its glue, FPC and carbon plate behind it, centred on the layer. The corrugated sheet + // lies between the two planes, so it needs no extra room; the end-of-stave cards are added through + // the envelope extension below. const double flatLayerThickness = staveConfig.corrugationDepth + - 2 * (o2::ft3::ModuleConstants::siliconThickness + - o2::ft3::ModuleConstants::epoxyThickness + - o2::ft3::ModuleConstants::flatLaneCarbonBaseThickness) + + 2 * o2::ft3::ModuleConstants::flatLaneStackBehindSilicon + + o2::ft3::ModuleConstants::siliconThickness + // front half of the silicon on each plane 0.5; // add some extra room to ensure all volumes are encapsulated double z_layer_thickness = // need to shift internally with this @@ -434,20 +434,19 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) 0.5; // add some extra room to ensure all volumes are encapsulated // shift stave volumes into layer volume, since nominal z_{stave face} = 0 - // (the flat small-disk lanes are symmetric about the layer centre, so no shift there) + // (the flat middle-disk lanes are symmetric about the layer centre, so no shift there) double z_local_offset = mIsMiddleLayer ? 0. : z_layer_thickness / 2.0; // ensure staves fully encapsulated in the layer volume, // but don't cross out of max nominal radii of 38.5cm & 71.5cm respectively (3.5cm tolerance) // Allow 3, 9cm outward, inward for OT: - // Middle disks: no tolerance in or out, the lanes sit inside the nominal radii + // Middle layers: no tolerance in or out, the lanes sit inside the nominal radii for now double innerRadiusForAirTube = mIsMiddleLayer ? mInnerRadius : mInnerRadius - 9.0; double outerRadiusForAirTube = mIsMiddleLayer ? mOuterRadius : mOuterRadius + 3.0; // MvL: try 70.5 // 2.5 cm tolerance instead const double rInEnv = innerRadiusForAirTube - 0.2; const double rOutEnv = outerRadiusForAirTube; const double H0 = z_layer_thickness / 2; - // (the small disks have no end-of-stave cards yet, so they keep the plain envelope) - if (ft3Params.addDiskEosCards && !mIsMiddleLayer) { + if (ft3Params.addDiskEosCards) { // Extend the envelope DOWNSTREAM only (away from the IP) with a union, so the // end-of-stave cards fit without growing toward the IP / the neighbouring disk. const double ext = o2::ft3::ModuleConstants::eosCardEnvelopeExtension(mIsMiddleLayer); @@ -472,7 +471,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) // need the -0.5 added to local offset to ensure all sensor modules are inside the layer module.createModule_staveGeo(0., mLayerNumber, mDirection, mInnerRadius, - mOuterRadius, z_local_offset, staveConfig, layerVol); + mOuterRadius, z_local_offset, staveConfig, layerVol); // Finally put everything in the mother volume auto* FwdDiskRotation = new TGeoRotation("FwdDiskRotation", 0, 0, 180); // need to shift outwards always, so + forwards and - backwards diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx index 56cadc421c8da..d625d4ff0b1b1 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx @@ -254,9 +254,9 @@ void FT3Module::addStaveVolume( if (absAllowedYRange.first < 0 || absAllowedYRange.second < 0 || absAllowedYRange.first >= absAllowedYRange.second) { LOG(error) << "Invalid allowed y range in addStaveVolume(): (" - << absAllowedYRange.first << ", " << absAllowedYRange.second - << "). Both values must be non-negative and the first " - << "value must be less than the second value."; + << absAllowedYRange.first << ", " << absAllowedYRange.second + << "). Both values must be non-negative and the first " + << "value must be less than the second value."; return; } // Set the lower and upper y values of the stave: @@ -348,7 +348,7 @@ void FT3Module::addDetectorVolume( { TGeoManager* geoManager = gGeoManager; TGeoVolume* volume = geoManager->MakeBox(volumeName.c_str(), med, x_half_length, - y_half_length, z_half_length); + y_half_length, z_half_length); volume->SetLineColor(color); volume->SetFillColorAlpha(color, 0.4); if (rotX == 0.) { @@ -365,9 +365,9 @@ void FT3Module::addDetectorVolume( volume, volume_count, new TGeoCombiTrans("", - x_mid, - y_mid, - z_mid, + x_mid, + y_mid, + z_mid, new TGeoRotation("", 0., rotX, 0.)) // TGeoCombiTrans ); // addNode } @@ -429,22 +429,56 @@ void FT3Module::addNx2KaptonVolume( } /* - * This function adds the carbon strip of a flat (middle disk) lane. It is the flat - * carbon plate the modules of one fill are glued to: one continuous box, as wide as the - * stave (the same as the FPC layers), that runs under all stacks of the fill, so it also - * covers the gaps between the modules and between the stacks. halfLength is half the - * length of the strip in y. + * Box of one material for the flat (middle disk) lanes: glue, FPC copper and kapton, the carbon + * plate, and the flats of the corrugated sheet. Unlike the outer-disk helpers above, the width is a + * parameter, since the plate, the FPC and the glue of a flat lane are wider than a triangular stave. */ -void FT3Module::addLaneCarbonStripVolume( - TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned fill_idx, double x_mid, double y_mid, double z_mid, double halfLength) +void FT3Module::addLaneBox( + TGeoVolume* motherVolume, const std::string& name, Materials::MaterialID material, + unsigned volume_count, double x_mid, double y_mid, double z_mid, + double x_half_length, double y_half_length, double z_half_length) { - std::string carbon_name = "FT3CarbonStrip_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(fill_idx); addDetectorVolume( - motherVolume, carbon_name, Materials::materials.at(Materials::MaterialID::CarbonFiber).colour, - getMedium(Materials::MaterialID::CarbonFiber), fill_idx, - x_mid, y_mid, z_mid, - Constants::staveWidth / 2, halfLength, Constants::flatLaneCarbonBaseThickness / 2); + motherVolume, name, Materials::materials.at(material).colour, getMedium(material), volume_count, + x_mid, y_mid, z_mid, x_half_length, y_half_length, z_half_length); +} + +/* + * One wall of the corrugated sheet: a slab that goes from one flat to the next. Its cross section in + * the xz plane is a quadrilateral with vertical end faces at x = xa and x = xb, which are the edges of + * the two flats, so that it joins them face to face without overlap. The z of its two surfaces at + * each end are the surfaces of the flat there. It is extruded along y from y_lo to y_hi. + */ +void FT3Module::addLaneSheetWall( + TGeoVolume* motherVolume, const std::string& name, unsigned volume_count, + double xa, double zaLo, double zaHi, double xb, double zbLo, double zbHi, + double y_lo, double y_hi) +{ + // The extruded shape is lifted into the xz plane with RotateX(-90), as for the staves: local y + // becomes -z, local z (the extrusion) becomes y. So the polygon is drawn in (x, -z). + std::vector vx = {xa, xb, xb, xa}; + std::vector vy = {-zaLo, -zbLo, -zbHi, -zaHi}; + double area2 = 0; // twice the signed area: positive for counter-clockwise + for (unsigned i = 0; i < 4; i++) { + const unsigned j = (i + 1) % 4; + area2 += vx[i] * vy[j] - vx[j] * vy[i]; + } + if (area2 > 0) { // TGeoXtru wants the vertices clockwise + std::reverse(vx.begin(), vx.end()); + std::reverse(vy.begin(), vy.end()); + } + TGeoXtru* shape = new TGeoXtru(2); + shape->SetName((name + "_shape").c_str()); + shape->DefinePolygon(4, vx.data(), vy.data()); + shape->DefineSection(0, 0); + shape->DefineSection(1, y_hi - y_lo); + const Materials::MaterialID mat = Materials::MaterialID::CarbonFiber; + TGeoVolume* vol = new TGeoVolume(name.c_str(), shape, getMedium(mat)); + vol->SetLineColor(Materials::materials.at(mat).colour); + vol->SetFillColorAlpha(Materials::materials.at(mat).colour, 0.4); + TGeoRotation* rot = new TGeoRotation(); + rot->RotateX(-90); + motherVolume->AddNode(vol, volume_count, new TGeoCombiTrans(0., y_lo, 0., rot)); } /* @@ -483,10 +517,10 @@ void FT3Module::addSingleSensorVolume( // INACTIVE STRIP ON LEFT OR RIGHT double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2) - : (active_x_mid + Constants::active_width / 2 + Constants::inactive_width / 2); + : (active_x_mid + Constants::active_width / 2 + Constants::inactive_width / 2); std::string sensor_inactive_name = "FT3Sensor_Inactive_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count); sensor = geoManager->MakeBox(sensor_inactive_name.c_str(), siliconMed, Constants::inactive_width / 2, - Constants::single_sensor_height / 2, Constants::siliconThickness / 2); + Constants::single_sensor_height / 2, Constants::siliconThickness / 2); addDetectorVolume( motherVolume, sensor_inactive_name, Materials::SiInactiveColor, siliconMed, volume_count, inactive_x_mid, y_mid, z_mid, @@ -525,12 +559,12 @@ void FT3Module::addEndOfStaveCard( const Constants::EosCardParams& c = Constants::getEosCardParams(isML); if (cuThickness * c.nCopperLayers >= c.thickness) { LOG(fatal) << "FT3 disk EoS card: Cu " << cuThickness << " cm x " << c.nCopperLayers - << " planes does not fit in the " << c.thickness << " cm card"; + << " planes does not fit in the " << c.thickness << " cm card"; } // FR4 board (x = width, y = thickness, z = length) TGeoVolume* cardVol = gGeoManager->MakeBox(name.c_str(), getMedium(Materials::MaterialID::FR4), - c.width / 2, c.thickness / 2, c.length / 2); + c.width / 2, c.thickness / 2, c.length / 2); cardVol->SetLineColor(kGreen + 3); // copper planes spread over the thickness (y), outermost two flush with the faces @@ -600,14 +634,14 @@ void FT3Module::add_stave_volumes( // absAllowedYRange.second, exact leaves it unbounded (DBL_MAX), so take the // smaller of the geometric end and the radial clamp. const double yTip = std::min(y_midpoint + staveConfig.y_lengths[i_stave] / 2, - absAllowedYRange.second); + absAllowedYRange.second); // Per-stave sensor silicon z in the layer frame, reconstructed from the // carbon-face offset exactly as the sensor-placement loop does, so the card // starts right after the sensors. const double z_offset_to_silicon = z_offset_to_stave_face + - Constants::epoxyThickness + Constants::kaptonThickness + - Constants::copperThickness + Constants::epoxyThickness + - Constants::siliconThickness / 2; + Constants::epoxyThickness + Constants::kaptonThickness + + Constants::copperThickness + Constants::epoxyThickness + + Constants::siliconThickness / 2; const double zOffMult = (direction == 1) ? -1.0 : 1.0; double zStaveShiftSensors = 0.0; if (!staveConfig.staveOnFront[i_stave]) { @@ -616,7 +650,7 @@ void FT3Module::add_stave_volumes( } const double zSensor = z_offset_to_silicon * zOffMult + zStaveShiftSensors; const std::string cardBase = "FT3_EOSdiskCard_" + std::to_string(direction) + "_" + - std::to_string(layerNumber) + "_" + std::to_string(i_stave); + std::to_string(layerNumber) + "_" + std::to_string(i_stave); addEndOfStaveCard(motherVolume, cardBase + "_pos", direction, (*staveVolumeCount)++, staveConfig.x_midpoints[i_stave], +yTip, zSensor, isML, cuT); // split stave: the mirror piece reaches the outer radius at -y, give it a card too @@ -671,7 +705,7 @@ void FT3Module::build_staves_exact( * care that some of those edges are negative. */ y_positionsPosNeg.emplace_back(fill_stave_exact(staveConfig.exactStaveFills[i_stave]), - PositionTypes{}); + PositionTypes{}); std::map nSensorStackCount; for (const auto& [y_bottom, kSensorStack] : y_positionsPosNeg.back().first) { @@ -780,7 +814,7 @@ void FT3Module::build_staves_greedy( } if (absAllowedYRange.second <= 0) { LOG(warning) << "For stave " << i_stave << " in layer " << layerNumber - << " with direction " << direction << ": no space to place sensors after applying tolerances, skipping stave."; + << " with direction " << direction << ": no space to place sensors after applying tolerances, skipping stave."; continue; } @@ -814,78 +848,125 @@ void FT3Module::build_staves_greedy( } /* - * Middle disks: flat corrugated lanes. - * - * There is no carbon shell per stave as for the large disks. Each lane is a flat - * strip of Nx2 modules on one of two z planes, corrugationDepth apart. Lanes alternate - * between the planes and neighbouring lanes overlap in x. + * Flat lanes of the middle disks, built straight from the tabulated fills: every lane is a + * strip of Nx2 modules on one of two z planes, corrugationDepth apart. Lanes alternate between the + * planes and neighbouring lanes overlap in x. * - * staveOnFront picks the plane: true is the plane closer to the interaction point - * (the near plane), false the one further away. The sensors of all lanes face the - * interaction point, with the glue and the carbon base behind the silicon, away from it: + * staveOnFront picks the plane: true is the plane closer to the interaction point (the near + * plane), false the one further away. The sensors of all lanes face the interaction point, with + * everything else behind the silicon, away from it. Behind the silicon of every module: * - * near plane, outward-facing lane (module on the outer side of the plate): - * IP <-- | SILICON | GLUE | CARBON BASE | --> towards the middle - * far plane, inward-facing lane (module on the inner side of the rear plate): - * IP <-- | SILICON | GLUE | CARBON BASE | --> away from the middle + * IP <-- | SILICON | GLUE | FPC (Cu, kapton) | GLUE | CARBON PLATE | GLUE | SHEET flat * - * so the far-plane materials stick out a little beyond the far plane, where the rear - * plate is. + * The FPC and its glue are flatLaneFpcWidth wide (54.4 mm, as on the outer disks) and cover one module each (with half a module gap on + * each side); the plate is one continuous strip per fill that runs under all modules of the fill and + * is flatLaneOverhang wider than the FPC on each side. For the far plane this means that + * the materials stick out a little beyond the far plane, where the rear plate is. * - * The module positions are read straight from exactStaveFills and placed with the - * lane's own gaps (laneSensorGap, laneStackGap), which differ from the large-disk - * constants that Constants::getStackHeight and fill_stave_exact use. + * The corrugated sheet is one continuous carbon sheet across all lanes. Its flats are centred in + * the gap between two plates of the same plane (so on the lane of the other plane) and + * reach flatLaneSheetReach under the overhang of those plates, to which they are glued. + * They sit on the side of the plates that faces the middle of the disk, and + * walls (slanted slabs) join the flat of one lane to the next. The sheet never touches a + * module: the flats lie in the gaps between the modules of a plane, and the walls pass in front of + * the modules of the far plane with a clearance that is checked below. Each piece of the sheet + * follows the y range of the lanes it supports or connects, so it stops with them. * - * The carbon base is one continuous strip per fill (the flat plate of the lane), not one box - * per module. + * The module positions are read straight from exactStaveFills and placed with the lane's own gaps + * (laneSensorGap, laneStackGap), which differ from the outer-disk constants that + * Constants::getStackHeight and fill_stave_exact use. * - * Not built yet: the corrugated carbon material and the end-of-stave cards. The carbon base - * thickness is provisional. + * With FT3Base.addDiskEosCards, each lane gets one end-of-stave card at its top (+y) tip, and the + * lanes that the beam pipe cuts in two get a second one at the bottom (-y) tip of their lower piece. */ void FT3Module::create_layout_flatLanes( int layerNumber, int direction, double z_offset_local, const Constants::StaveConfig& staveConfig, TGeoVolume* motherVolume) { LOG(debug) << "FT3Module: create_layout_flatLanes - Direction " - << direction << ", Layer " << layerNumber; + << direction << ", Layer " << layerNumber; const unsigned nLanes = staveConfig.x_midpoints.size(); if (staveConfig.exactStaveFills.size() != nLanes || staveConfig.staveOnFront.size() != nLanes) { LOG(fatal) << "FT3 flat-lane disk needs one tabulated fill and one front/back flag per lane, got " - << staveConfig.exactStaveFills.size() << " fills and " << staveConfig.staveOnFront.size() - << " flags for " << nLanes << " lanes"; + << staveConfig.exactStaveFills.size() << " fills and " << staveConfig.staveOnFront.size() + << " flags for " << nLanes << " lanes"; + } + for (unsigned i = 1; i < nLanes; i++) { + if (staveConfig.x_midpoints[i] <= staveConfig.x_midpoints[i - 1] || + staveConfig.staveOnFront[i] == staveConfig.staveOnFront[i - 1]) { + LOG(fatal) << "FT3 flat-lane disk needs lanes ordered in x that alternate between the two planes"; + } } + auto& ft3Params = o2::ft3::FT3BaseParam::Instance(); const double sensorGap = staveConfig.laneSensorGap; const double stackGap = staveConfig.laneStackGap; const double halfDepth = staveConfig.corrugationDepth / 2; + const double si = Constants::siliconThickness; + const double glue = Constants::flatLaneGlueThickness; + const double cu = Constants::flatLaneFpcCopperThickness; + const double kap = Constants::flatLaneFpcKaptonThickness; + const double plate = Constants::flatLaneCarbonBaseThickness; + const double sheet = Constants::flatLaneSheetThickness; + const double plateHalfWidth = Constants::flatLanePlateWidth / 2; + const double fpcHalfWidth = Constants::flatLaneFpcWidth / 2; + const double moduleHalfWidth = Constants::sensor1x2_width / 2; + const double reach = Constants::flatLaneSheetReach; + if (fpcHalfWidth > plateHalfWidth - reach || fpcHalfWidth < moduleHalfWidth) { + LOG(fatal) << "FT3 flat-lane disk: the FPC must be wider than the module and end before the flats of the sheet"; + } + // unit z vector pointing towards the interaction point (forward disks sit at +z) const double towardsIP = (direction == 1) ? -1.0 : 1.0; - // the glue and the carbon base sit behind the silicon, away from the interaction point + // everything but the silicon sits behind it, away from the interaction point const double behind = -towardsIP; - - // distance from the silicon mid-plane to the middle of each material behind it - const double dGlue = Constants::siliconThickness / 2 + Constants::epoxyThickness / 2; - const double dCarbon = Constants::siliconThickness / 2 + Constants::epoxyThickness + - Constants::flatLaneCarbonBaseThickness / 2; + // Depth t is the distance from the near plane towards the far plane, behind the interaction point, so + // the silicon of the near plane is at t = -halfDepth and that of the far plane at +halfDepth. + // z in the layer frame is behind * (t - z_offset_local); the layer is shifted away from the + // interaction point by z_offset_local, which is 0 for flat disks. + auto zOf = [&](double t) { return behind * (t - z_offset_local); }; + + // silicon mid-plane of the far plane (in the layer frame). The end-of-stave cards of all lanes start + // behind it, so that the cards of the near-plane lanes clear the modules of the far-plane lanes, + // which overlap them in x + const double z_far_si = towardsIP * (-halfDepth + z_offset_local); + + // distances from the silicon mid-plane to the middle of each material behind it + const double dGlueSiFpc = si / 2 + glue / 2; + const double dCopper = si / 2 + glue + cu / 2; + const double dKapton = si / 2 + glue + cu + kap / 2; + const double dGlueFpcPlate = si / 2 + glue + cu + kap + glue / 2; + const double dPlateFront = si / 2 + Constants::flatLaneStackToPlate; // front face of the plate + const double dPlate = dPlateFront + plate / 2; + const double dPlateBack = dPlateFront + plate; + + const std::string tag = std::to_string(direction) + "_" + std::to_string(layerNumber) + "_"; + using Interval = std::pair; + std::vector> plateY(nLanes); // y range of the plate of every fill of every lane + std::vector laneX(nLanes); unsigned nModulesTotal = 0; for (unsigned i_lane = 0; i_lane < nLanes; i_lane++) { const double x_mid = staveConfig.x_midpoints[i_lane]; + laneX[i_lane] = x_mid; const bool onNearPlane = staveConfig.staveOnFront[i_lane]; - // mid-plane of the silicon, in the frame of the layer volume (the layer is shifted - // away from the interaction point by z_offset_local, which is 0 for flat disks) - const double z_si = towardsIP * ((onNearPlane ? halfDepth : -halfDepth) + z_offset_local); + // t of the silicon mid-plane + const double t_si = onNearPlane ? -halfDepth : halfDepth; + const double z_si = zOf(t_si); unsigned sensor_count = 0; // reset for each lane unsigned fill_idx = 0; + double y_tip = -1e9; // top end of the lane + double y_bottomTip = 1e9; // bottom end of the lane for (const auto& fill : staveConfig.exactStaveFills[i_lane]) { // yStart is the bottom edge of the first sensor of the fill double y_bottom = fill.yStart; for (unsigned nSensorsInStack : fill.stackHeights) { double y_mid = y_bottom + Constants::sensor1x2_height / 2; for (unsigned i_sens = 0; i_sens < nSensorsInStack; i_sens++) { + const std::string mod = tag + std::to_string(i_lane) + "_" + std::to_string(sensor_count); // (1) Silicon sensors: left and right of the 1x2 addSingleSensorVolume( motherVolume, layerNumber, direction, i_lane, sensor_count, @@ -893,10 +974,20 @@ void FT3Module::create_layout_flatLanes( addSingleSensorVolume( motherVolume, layerNumber, direction, i_lane, sensor_count + 1, x_mid + sensorGap / 2 + Constants::active_width / 2, y_mid, z_si, false); - // (2) Epoxy glue layer between silicon and the carbon base - addNx2GlueVolume( - motherVolume, layerNumber, direction, i_lane, sensor_count, - x_mid, y_mid, z_si + behind * dGlue, Constants::sensor1x2_height, "SiCarbon"); + // The FPC layers and the glue cover the module and, as on the outer disks, reach half a + // module gap into the gap on each side, so that those of neighbouring modules touch + const double hy = (Constants::sensor1x2_height + Constants::moduleGap) / 2; + // (2) glue between silicon and FPC + addLaneBox(motherVolume, "FT3glue_SiFPC_" + mod, Materials::MaterialID::Epoxy, sensor_count, + x_mid, y_mid, z_si + behind * dGlueSiFpc, fpcHalfWidth, hy, glue / 2); + // (3) FPC: copper, then kapton + addLaneBox(motherVolume, "FT3Copper_" + mod, Materials::MaterialID::Copper, sensor_count, + x_mid, y_mid, z_si + behind * dCopper, fpcHalfWidth, hy, cu / 2); + addLaneBox(motherVolume, "FT3Kapton_" + mod, Materials::MaterialID::Kapton, sensor_count, + x_mid, y_mid, z_si + behind * dKapton, fpcHalfWidth, hy, kap / 2); + // (4) glue between FPC and plate + addLaneBox(motherVolume, "FT3glue_FPCPlate_" + mod, Materials::MaterialID::Epoxy, sensor_count, + x_mid, y_mid, z_si + behind * dGlueFpcPlate, fpcHalfWidth, hy, glue / 2); y_mid += Constants::sensor1x2_height + sensorGap; sensor_count += 2; // same count for each material in the glued stack nModulesTotal++; @@ -905,29 +996,209 @@ void FT3Module::create_layout_flatLanes( y_bottom += nSensorsInStack * Constants::single_sensor_height + (nSensorsInStack - 1) * sensorGap + stackGap; } - // (3) Carbon base: one strip under the whole fill, from the bottom of its first stack to - // the top of its last one (y_bottom is now one stack gap above the top) - // The glue reaches half a module gap beyond the first and the last module (as the FPC does - // on the large disks), so the strip does as well. + // (5) Carbon plate: one strip under the whole fill, from the bottom of its first stack to + // the top of its last one (y_bottom is now one stack gap above the top). The glue reaches + // half a module gap beyond the first and the last module, so the plate does as well. const double y_lo = fill.yStart - Constants::moduleGap / 2; const double y_hi = y_bottom - stackGap + Constants::moduleGap / 2; - addLaneCarbonStripVolume( - motherVolume, layerNumber, direction, i_lane, fill_idx, - x_mid, (y_lo + y_hi) / 2, z_si + behind * dCarbon, (y_hi - y_lo) / 2); + addLaneBox(motherVolume, "FT3CarbonStrip_" + tag + std::to_string(i_lane) + "_" + std::to_string(fill_idx), + Materials::MaterialID::CarbonFiber, fill_idx, x_mid, (y_lo + y_hi) / 2, + z_si + behind * dPlate, plateHalfWidth, (y_hi - y_lo) / 2, plate / 2); + plateY[i_lane].emplace_back(y_lo, y_hi); + y_tip = std::max(y_tip, y_hi); + y_bottomTip = std::min(y_bottomTip, y_lo); fill_idx++; } + // (6) End-of-stave card at the top (+y) tip of the lane, one per lane. Same card as on the outer + // disks (Constants::getEosCardParams), starting z_far_si + zGap behind the far plane. A lane that the + // beam pipe cuts in two (two fills) is not connected through the hole, so its lower piece needs a + // card as well, at its bottom (-y) tip. + if (ft3Params.addDiskEosCards) { + const std::string cardName = "FT3_EOSdiskCard_" + tag + std::to_string(i_lane); + addEndOfStaveCard(motherVolume, cardName + "_pos", direction, i_lane, x_mid, y_tip, z_far_si, + true, ft3Params.ft3EosCardCuThicknessML); + if (staveConfig.exactStaveFills[i_lane].size() > 1) { + addEndOfStaveCard(motherVolume, cardName + "_neg", direction, nLanes + i_lane, x_mid, y_bottomTip, z_far_si, + true, ft3Params.ft3EosCardCuThicknessML); + } + } + } + + // (7) The corrugated sheet. Edges of the flat of every lane: it runs from under the overhang of the + // plate of the previous lane to under that of the next one (the outermost lanes mirror their one + // neighbour about their own x). + std::vector flatLeft(nLanes), flatRight(nLanes); + for (unsigned k = 0; k < nLanes; k++) { + double l = (k > 0) ? laneX[k - 1] + plateHalfWidth - reach : 0.; + double r = (k + 1 < nLanes) ? laneX[k + 1] - plateHalfWidth + reach : 0.; + if (k == 0) { + l = 2 * laneX[k] - r; + } + if (k + 1 == nLanes) { + r = 2 * laneX[k] - l; + } + flatLeft[k] = l; + flatRight[k] = r; + if (r <= l) { + LOG(fatal) << "FT3 flat-lane disk: the plates next to lane " << k << " are too wide for a sheet flat between them"; + } + } + // depth range of the flat of a lane: it is of the other plane than the lane itself. The flat in the + // far plane sits on the middle side of the far plates (smaller t), the one in the near plane on + // the middle side of the near plates (larger t), each a glue layer away from the plate. + auto flatT = [&](unsigned k) -> Interval { + if (staveConfig.staveOnFront[k]) { // lane on the near plane: its flat supports far plates + const double hi = halfDepth + dPlateFront - glue; + return {hi - sheet, hi}; + } + const double lo = -halfDepth + dPlateBack + glue; + return {lo, lo + sheet}; + }; + auto mergeIntervals = [](std::vector v) { + std::sort(v.begin(), v.end()); + std::vector out; + for (const auto& iv : v) { + if (!out.empty() && iv.first <= out.back().second + 1e-9) { + out.back().second = std::max(out.back().second, iv.second); + } else { + out.push_back(iv); + } + } + return out; + }; + auto yOfLanes = [&](std::initializer_list lanes) { + std::vector v; + for (int l : lanes) { + if (l >= 0 && l < static_cast(nLanes)) { + v.insert(v.end(), plateY[l].begin(), plateY[l].end()); + } + } + return mergeIntervals(v); + }; + + // The sheet is cut to the annulus the plates occupy (inner and outer radius of the plate + // corners), so it does not stick out of the disk at the outer lanes or into the hole of the beam pipe. + // A piece spanning [xlo, xhi] is clipped conservatively: to the outer circle at its largest |x|, and + // outside the inner circle at its smallest |x|. + double rPlateIn = 1e9, rPlateOut = 0; + for (unsigned l = 0; l < nLanes; l++) { + for (const auto& y : plateY[l]) { + const double x0 = laneX[l] - plateHalfWidth, x1 = laneX[l] + plateHalfWidth; + const double nx = (x0 <= 0 && x1 >= 0) ? 0. : std::min(std::fabs(x0), std::fabs(x1)); + const double ny = (y.first <= 0 && y.second >= 0) ? 0. : std::min(std::fabs(y.first), std::fabs(y.second)); + rPlateIn = std::min(rPlateIn, std::hypot(nx, ny)); + rPlateOut = std::max(rPlateOut, std::hypot(std::max(std::fabs(x0), std::fabs(x1)), std::max(std::fabs(y.first), std::fabs(y.second)))); + } + } + auto clipToDisk = [&](const std::vector& in, double xlo, double xhi) { + const double xMax = std::max(std::fabs(xlo), std::fabs(xhi)); + const double xMin = (xlo <= 0 && xhi >= 0) ? 0. : std::min(std::fabs(xlo), std::fabs(xhi)); + const double yOut = rPlateOut > xMax ? std::sqrt(rPlateOut * rPlateOut - xMax * xMax) : 0.; + const double yIn = rPlateIn > xMin ? std::sqrt(rPlateIn * rPlateIn - xMin * xMin) : 0.; + std::vector out; + for (const auto& iv : in) { + const double lo = std::max(iv.first, -yOut), hi = std::min(iv.second, yOut); + if (hi <= lo) { + continue; + } + // remove (-yIn, yIn) + if (lo < -yIn) { + out.emplace_back(lo, std::min(hi, -yIn)); + } + if (hi > yIn) { + out.emplace_back(std::max(lo, yIn), hi); + } + } + return out; + }; + + unsigned nSheetPieces = 0; + for (unsigned k = 0; k < nLanes; k++) { + const Interval t = flatT(k); + const double zMid = zOf((t.first + t.second) / 2); + unsigned piece = 0; + // flat: lies on the plates of lanes k-1 and k+1 + std::vector flatY = clipToDisk(yOfLanes({static_cast(k) - 1, static_cast(k) + 1}), flatLeft[k], flatRight[k]); + for (const auto& y : flatY) { + addLaneBox(motherVolume, "FT3SheetFlat_" + tag + std::to_string(k) + "_" + std::to_string(piece++), + Materials::MaterialID::CarbonFiber, nSheetPieces++, + (flatLeft[k] + flatRight[k]) / 2, (y.first + y.second) / 2, zMid, + (flatRight[k] - flatLeft[k]) / 2, (y.second - y.first) / 2, sheet / 2); + } + // glue between the plates of lanes k-1, k+1 and the flat, under their overhang, where they touch + const double tGlueLo = staveConfig.staveOnFront[k] ? halfDepth + dPlateFront - glue : -halfDepth + dPlateBack; + for (int j : {static_cast(k) - 1, static_cast(k) + 1}) { + if (j < 0 || j >= static_cast(nLanes)) { + continue; + } + const double xa = (j < static_cast(k)) ? laneX[j] + plateHalfWidth - reach : laneX[j] - plateHalfWidth; + unsigned fillIdx = 0; + for (const auto& y : plateY[j]) { + for (const auto& f : flatY) { + const double ylo = std::max(y.first, f.first), yhi = std::min(y.second, f.second); + if (yhi <= ylo) { + continue; + } + addLaneBox(motherVolume, "FT3glue_PlateSheet_" + tag + std::to_string(k) + "_" + std::to_string(j) + "_" + std::to_string(fillIdx++), + Materials::MaterialID::Epoxy, nSheetPieces++, xa + reach / 2, (ylo + yhi) / 2, + zOf(tGlueLo + glue / 2), reach / 2, (yhi - ylo) / 2, glue / 2); + } + } + } + } + // walls: from the right edge of the flat of lane k to the left edge of the flat of lane k+1 + double minClearance = 1e9; + for (unsigned k = 0; k + 1 < nLanes; k++) { + const double xa = flatRight[k], xb = flatLeft[k + 1]; + if (xb <= xa) { + LOG(fatal) << "FT3 flat-lane disk: no room for a sheet wall between lanes " << k << " and " << k + 1; + } + const Interval ta = flatT(k), tb = flatT(k + 1); + unsigned piece = 0; + for (const auto& y : clipToDisk(yOfLanes({static_cast(k), static_cast(k) + 1}), xa, xb)) { + addLaneSheetWall(motherVolume, "FT3SheetWall_" + tag + std::to_string(k) + "_" + std::to_string(piece++), nSheetPieces++, + xa, zOf(ta.first), zOf(ta.second), xb, zOf(tb.first), zOf(tb.second), y.first, y.second); + } + // clearance of this wall to the far-plane modules it passes: it must stay in front of (towards the + // middle from) the silicon, and in front of the glue under the silicon where the FPC sticks out + // beyond the silicon + for (unsigned j = 0; j < nLanes; j++) { + if (staveConfig.staveOnFront[j]) { + continue; + } + for (const auto& [halfWidth, frontFace] : {std::pair{moduleHalfWidth, halfDepth - si / 2}, + std::pair{fpcHalfWidth, halfDepth + si / 2}}) { + const double lo = std::max(xa, laneX[j] - halfWidth); + const double hi = std::min(xb, laneX[j] + halfWidth); + if (hi < lo) { + continue; // the wall does not pass this module + } + for (double xe : {lo, hi}) { + const double f = (xe - xa) / (xb - xa); + const double tTop = ta.second + f * (tb.second - ta.second); // side of the wall facing the far plane + minClearance = std::min(minClearance, frontFace - tTop); + } + } + } + } + if (minClearance < Constants::flatLaneSheetMinClearance) { + LOG(fatal) << "FT3 flat-lane disk: the corrugated sheet comes within " << minClearance + << " cm of the silicon of the far plane (needs " << Constants::flatLaneSheetMinClearance + << "); reduce flatLaneSheetReach or the thickness of the FPC"; } LOG(info) << "Flat-lane layout for layer " << layerNumber << " in direction " << direction - << ": " << nLanes << " lanes, " << nModulesTotal << " 1x2 modules"; + << ": " << nLanes << " lanes, " << nModulesTotal << " 1x2 modules, " << nSheetPieces + << " pieces of corrugated sheet and glue, closest approach of the sheet to the far-plane silicon and FPC " + << minClearance * 10 << " mm"; } void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction, - double Rin, double Rout, double z_offset_local, - const Constants::StaveConfig& staveConfig, - TGeoVolume* motherVolume) + double Rin, double Rout, double z_offset_local, + const Constants::StaveConfig& staveConfig, + TGeoVolume* motherVolume) { LOG(debug) << "FT3Module: create_layout_staveGeo - Direction " - << direction << ", Layer " << layerNumber; + << direction << ", Layer " << layerNumber; // Middle disks: flat lanes on two z planes, no triangular carbon staves if (staveConfig.isFlatCorrugated) { @@ -997,7 +1268,7 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction */ if (ft3Params.useExactStavePlacement && !staveConfig.exactStaveFills.empty()) { build_staves_exact(motherVolume, layerNumber, direction, staveConfig, staveLegs, - z_offset_to_stave_face, y_positionsPosNeg, staveVolumeCount); + z_offset_to_stave_face, y_positionsPosNeg, staveVolumeCount); } else { build_staves_greedy(motherVolume, layerNumber, direction, Rin, Rout, staveConfig, staveLegs, z_offset_to_stave_face, y_positionsPosNeg, @@ -1030,7 +1301,7 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction if (!staveConfig.staveOnFront[i_stave]) { // in forward direction, shifting backwards means +z shift z_stave_shift = (direction == 1) ? Constants::z_offsetStave(staveConfig.x_midpoint_spacing) - : -Constants::z_offsetStave(staveConfig.x_midpoint_spacing); + : -Constants::z_offsetStave(staveConfig.x_midpoint_spacing); } unsigned sensor_count = 0; // reset for each stave @@ -1253,13 +1524,13 @@ void FT3Module::create_layout(double mZ, int layerNumber, int direction, double // logic for placement - x positions with complete overlap if (face == "front") { X_positions = {-63.4, -60.9, -54.2, -51.7, -45.0, -42.5, -35.8, -33.3, -26.6, -24.1, -17.4, -14.9, - -8.2, -5.7, 1.0, 3.5, 10.2, 12.7, 19.4, 21.9, 28.6, 31.1, 37.8, 40.3, 47.0, 49.5, - 56.2, 58.7, 65.4}; + -8.2, -5.7, 1.0, 3.5, 10.2, 12.7, 19.4, 21.9, 28.6, 31.1, 37.8, 40.3, 47.0, 49.5, + 56.2, 58.7, 65.4}; justSkipped1 = {1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}; } else if (face == "back") { X_positions = {-65.5, -58.8, -56.3, -49.6, -47.1, -40.4, -37.9, -31.2, -28.7, -22.0, -19.5, -12.8, - -10.3, -3.6, -1.1, 5.6, 8.1, 14.8, 17.3, 24.0, 26.5, 33.2, 35.7, 42.4, 44.9, - 51.6, 54.1, 60.8, 63.3}; + -10.3, -3.6, -1.1, 5.6, 8.1, 14.8, 17.3, 24.0, 26.5, 33.2, 35.7, 42.4, 44.9, + 51.6, 54.1, 60.8, 63.3}; justSkipped1 = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}; } } else { @@ -1760,8 +2031,8 @@ void FT3Module::createModule_staveGeo(double mZ, int layerNumber, int direction, TGeoVolume* motherVolume) { LOG(debug) << "FT3Module: createModule_staveGeo - Layer " << layerNumber - << " at z=" << mZ << ", Direction " << direction; + << " at z=" << mZ << ", Direction " << direction; create_layout_staveGeo(mZ, layerNumber, direction, Rin, Rout, - z_offset_local, staveConfig, motherVolume); + z_offset_local, staveConfig, motherVolume); LOG(debug) << "FT3Module: done createModule_staveGeo"; } \ No newline at end of file From 906ed52c373710b9fb9e5de0f6c7ea84f534da23 Mon Sep 17 00:00:00 2001 From: Naseem b Date: Tue, 1 Dec 2026 16:57:58 +0900 Subject: [PATCH 3/3] Apply clang-format --- .../FT3Simulation/FT3ModuleConstants.h | 48 +++++++++---------- .../TRKFT3/FT3/simulation/src/FT3Layer.cxx | 15 ++---- .../TRKFT3/FT3/simulation/src/FT3Module.cxx | 2 +- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h index c0655806afe3f..6f699f2f460cc 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h @@ -138,12 +138,12 @@ const double effectiveCarbonThickness_Stave = staveMaterialBudget * 27.0; // ~18 const double flatLaneFpcCopperThickness = copperThickness; const double flatLaneFpcKaptonThickness = kaptonThickness; const double flatLaneFpcThickness = flatLaneFpcCopperThickness + flatLaneFpcKaptonThickness; // 360 um -const double flatLaneGlueThickness = epoxyThickness; // between all layers of the stack -const double flatLaneCarbonBaseThickness = 0.06; // the plate: 0.6 mm -const double flatLaneSheetThickness = 0.06; // the corrugated sheet: 0.6 mm -const double flatLaneOverhang = 0.29; // plate beyond the FPC, each side (2.9 mm) -const double flatLaneSheetReach = 0.06; // the flats of the sheet reach this far under the overhang -const double flatLaneSheetMinClearance = 0.005; // the sheet must stay 50 um clear of the silicon +const double flatLaneGlueThickness = epoxyThickness; // between all layers of the stack +const double flatLaneCarbonBaseThickness = 0.06; // the plate: 0.6 mm +const double flatLaneSheetThickness = 0.06; // the corrugated sheet: 0.6 mm +const double flatLaneOverhang = 0.29; // plate beyond the FPC, each side (2.9 mm) +const double flatLaneSheetReach = 0.06; // the flats of the sheet reach this far under the overhang +const double flatLaneSheetMinClearance = 0.005; // the sheet must stay 50 um clear of the silicon // distance from the silicon back face to the front face of the plate (towards the sheet side) const double flatLaneStackToPlate = 2 * flatLaneGlueThickness + flatLaneFpcThickness; // everything behind the silicon mid-plane, up to the back of the plate @@ -154,8 +154,8 @@ const double cosTheta = TMath::Cos(staveOpeningAngle / 2); const double alpha = TMath::Pi() / 2 - staveOpeningAngle / 2; // bottom angles const double staveSensorGap = 0.21; // 2.1mm bonding region on each side: 54.4mm stave width const double staveWidth = sensor1x2_width + 2 * staveSensorGap; -const double flatLaneFpcWidth = staveWidth; // FPC and its glue: 54.4 mm -const double flatLanePlateWidth = flatLaneFpcWidth + 2 * flatLaneOverhang; // the plate: 60.2 mm +const double flatLaneFpcWidth = staveWidth; // FPC and its glue: 54.4 mm +const double flatLanePlateWidth = flatLaneFpcWidth + 2 * flatLaneOverhang; // the plate: 60.2 mm /* * The stave is created from two carbon legs, and the FPC is its face -- being glued * onto carbon wings that stick out: @@ -395,26 +395,26 @@ const std::vector staveOnFront = [] { * lowest sensor; the modules follow upwards, 0.2 mm apart, so every fill is a single stack. */ const std::vector> exactStaveFills = { - {{-8.75, {6}}}, // ID -10 (753 mm) - {{-16.05, {11}}}, // ID -9 (747 mm) - {{-21.89, {15}}}, // ID -8 (753 mm) - {{-24.81, {17}}}, // ID -7 (747 mm) - {{-27.73, {19}}}, // ID -6 (753 mm) - {{-30.65, {21}}}, // ID -5 (747 mm) - {{-32.11, {22}}}, // ID -4 (753 mm) + {{-8.75, {6}}}, // ID -10 (753 mm) + {{-16.05, {11}}}, // ID -9 (747 mm) + {{-21.89, {15}}}, // ID -8 (753 mm) + {{-24.81, {17}}}, // ID -7 (747 mm) + {{-27.73, {19}}}, // ID -6 (753 mm) + {{-30.65, {21}}}, // ID -5 (747 mm) + {{-32.11, {22}}}, // ID -4 (753 mm) {{-33.9195, {9}}, {7.6595, {9}}}, // ID -3 (747 mm) - {{-32.961, {8}}, {9.621, {8}}}, // ID -2 (753 mm) + {{-32.961, {8}}, {9.621, {8}}}, // ID -2 (753 mm) {{-33.3117, {8}}, {9.9717, {8}}}, // ID -1 (747 mm) {{-33.3117, {8}}, {9.9717, {8}}}, // ID +1 (753 mm) - {{-32.961, {8}}, {9.621, {8}}}, // ID +2 (747 mm) + {{-32.961, {8}}, {9.621, {8}}}, // ID +2 (747 mm) {{-33.9195, {9}}, {7.6595, {9}}}, // ID +3 (753 mm) - {{-32.11, {22}}}, // ID +4 (747 mm) - {{-30.65, {21}}}, // ID +5 (753 mm) - {{-27.73, {19}}}, // ID +6 (747 mm) - {{-24.81, {17}}}, // ID +7 (753 mm) - {{-21.89, {15}}}, // ID +8 (747 mm) - {{-16.05, {11}}}, // ID +9 (753 mm) - {{-8.75, {6}}}, // ID +10 (747 mm) + {{-32.11, {22}}}, // ID +4 (747 mm) + {{-30.65, {21}}}, // ID +5 (753 mm) + {{-27.73, {19}}}, // ID +6 (747 mm) + {{-24.81, {17}}}, // ID +7 (753 mm) + {{-21.89, {15}}}, // ID +8 (747 mm) + {{-16.05, {11}}}, // ID +9 (753 mm) + {{-8.75, {6}}}, // ID +10 (747 mm) }; } // namespace ML_StavePositions diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx index 56f4c7b7fbc74..fa426c09b75c6 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx @@ -421,17 +421,10 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) staveConfig.corrugationDepth + 2 * o2::ft3::ModuleConstants::flatLaneStackBehindSilicon + o2::ft3::ModuleConstants::siliconThickness + // front half of the silicon on each plane - 0.5; // add some extra room to ensure all volumes are encapsulated - - double z_layer_thickness = // need to shift internally with this - mIsMiddleLayer ? flatLayerThickness : - o2::ft3::ModuleConstants::staveHeight + - o2::ft3::ModuleConstants::z_offsetStave(staveConfig.x_midpoint_spacing) + - o2::ft3::ModuleConstants::siliconThickness + - o2::ft3::ModuleConstants::copperThickness + - o2::ft3::ModuleConstants::kaptonThickness + - o2::ft3::ModuleConstants::epoxyThickness * 2 + - 0.5; // add some extra room to ensure all volumes are encapsulated + 0.5; // add some extra room to ensure all volumes are encapsulated + + double z_layer_thickness = // need to shift internally with this + mIsMiddleLayer ? flatLayerThickness : o2::ft3::ModuleConstants::staveHeight + o2::ft3::ModuleConstants::z_offsetStave(staveConfig.x_midpoint_spacing) + o2::ft3::ModuleConstants::siliconThickness + o2::ft3::ModuleConstants::copperThickness + o2::ft3::ModuleConstants::kaptonThickness + o2::ft3::ModuleConstants::epoxyThickness * 2 + 0.5; // add some extra room to ensure all volumes are encapsulated // shift stave volumes into layer volume, since nominal z_{stave face} = 0 // (the flat middle-disk lanes are symmetric about the layer centre, so no shift there) diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx index d625d4ff0b1b1..ea8948c8121f1 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx @@ -958,7 +958,7 @@ void FT3Module::create_layout_flatLanes( unsigned sensor_count = 0; // reset for each lane unsigned fill_idx = 0; - double y_tip = -1e9; // top end of the lane + double y_tip = -1e9; // top end of the lane double y_bottomTip = 1e9; // bottom end of the lane for (const auto& fill : staveConfig.exactStaveFills[i_lane]) { // yStart is the bottom edge of the first sensor of the fill