From b71f4875bfa6598e546de6d2ea93a2ba27373b90 Mon Sep 17 00:00:00 2001 From: Naseem b Date: Mon, 30 Nov 2026 17:28:41 +0900 Subject: [PATCH] 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