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 13f1a45981e22..a0abf221eb35b 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3Module.h @@ -64,24 +64,24 @@ class FT3Module void build_staves_exact( TGeoVolume* motherVolume, int layerNumber, int direction, const Constants::StaveConfig& staveConfig, - const std::array, 4>& staveTriangles, - double z_offset_to_carbon_face, + const std::array, 2>& staveLegs, + double z_offset_to_stave_face, std::vector& y_positionsPosNeg, unsigned& staveVolumeCount); void build_staves_greedy( TGeoVolume* motherVolume, int layerNumber, int direction, double Rin, double Rout, const Constants::StaveConfig& staveConfig, - const std::array, 4>& staveTriangles, - double z_offset_to_carbon_face, + const std::array, 2>& staveLegs, + double z_offset_to_stave_face, std::vector& y_positionsPosNeg, unsigned& staveVolumeCount); // Shared by both: one stave's carbon shell, plus its mirror where needed void add_stave_volumes( TGeoVolume* motherVolume, int layerNumber, int direction, const Constants::StaveConfig& staveConfig, unsigned i_stave, - const std::array, 4>& staveTriangles, - double z_offset_to_carbon_face, std::pair& absAllowedYRange, + const std::array, 2>& staveLegs, + double z_offset_to_stave_face, std::pair& absAllowedYRange, double y_midpoint, bool mirrorStaveAroundX, unsigned* staveVolumeCount); // FR4 + Cu end-of-stave card at the outer-radius tip of a disk stave. One card @@ -103,7 +103,7 @@ class FT3Module void addStaveVolume( TGeoVolume* motherVolume, std::string volumeName, int direction, unsigned* volume_count, double staveLength, - std::array, 4> staveTriangles, + std::array, 2> staveLegs, std::pair& absAllowedYRange, double x_mid, double y_mid, double z_stave_shift_forward); void addDetectorVolume( @@ -111,18 +111,18 @@ class FT3Module unsigned volume_count, double x_mid, double y_mid, double z_mid, double x_half_length, double y_half_length, double z_half_length, double rotX = 0); - void add2x1GlueVolume( + void addNx2GlueVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned volume_count, double x_mid, double y_mid, double z_mid, + unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight, std::string element_glued_to); - void add2x1CopperVolume( + void addNx2CopperVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned volume_count, double x_mid, double y_mid, double z_mid); + unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight); - void add2x1KaptonVolume( + void addNx2KaptonVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned volume_count, double x_mid, double y_mid, double z_mid); + unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight); 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 6dc265fd3e030..f06d8d50c86b3 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h @@ -24,43 +24,45 @@ namespace o2::ft3::ModuleConstants { /* CURRENT STATUS: - * 25x29mm sensors, 2mm inactive on one side - * Most granular layout is 2x1 sensors, where the one on the right has the inactive region + * 25x29mm sensors, 1.5mm inactive on one side + * Most granular layout is 1x2 sensors, where the one on the right has the inactive region * on the right, and the one on the left has the inactive region on the left. - * When stacking 2x1 modules, there is a 0.2mm gap between them. By default, we assume this + * Sensors are 0.2mm apart everywhere: between the L&R sensors of a 1x2, between + * neighbouring 1x2 rows within a stack, and between neighbouring stacks, the last of + * which is carried as 0.1mm at each end of a stack. By default, we assume the stack * gap to be ABOVE the most recently placed module. * * |<- 25mm ->||<- 25mm ->| * _______________________ - * ------------------------ 0.15mm gap above + * ------------------------ 0.1mm gap above * | | || | | * | | || | | * | | || | | * | | || | | 29mm sensor height * | | || | | * | | || | | - * ------------------------ 0.15mm gap below + * ------------------------ 0.1mm gap below * ^ * | - * 0.15mm gap in the middle + * 0.2mm gap in the middle */ // First set all layout constants for the rest of the function const double single_sensor_width = 2.5; const double single_sensor_height = 2.9; const double inactive_width = 0.15; -const double sensor2x1_gap = 0.015; // gap between L&R sensors in 2x1, and between sensors in a stack -const double stackGap = 0.035; // gap between 2xN module stacks +const double sensor1x2_gap = 0.020; // gap between L&R sensors in 1x2, and between sensors in a stack +const double moduleGap = 0.020; // gap between 2xN module stacks const double active_width = single_sensor_width - inactive_width; const double active_height = single_sensor_height; -const double sensor2x1_width = 2 * single_sensor_width + sensor2x1_gap; -const double sensor2x1_height = single_sensor_height; +const double sensor1x2_width = 2 * single_sensor_width + sensor1x2_gap; +const double sensor1x2_height = single_sensor_height; const std::vector kSensorsPerStack = {4, 2, 1}; inline const double getStackHeight(unsigned nSensorsPerStack) { - return nSensorsPerStack * sensor2x1_height + - (nSensorsPerStack - 1) * sensor2x1_gap; + return nSensorsPerStack * sensor1x2_height + + (nSensorsPerStack - 1) * sensor1x2_gap; } // small helper function to get 1-indexed stave ID, counting from the middle outwards, @@ -106,35 +108,64 @@ const double siliconThickness = 0.01; const double copperThickness = 0.006; const double kaptonThickness = 0.03; const double epoxyThickness = 0.0012; +// To get the effective carbon thickness we add the areal densities of +// (1) 40um Graphite (84g/m^2) +// (2) 30um Carbon Fibre UMS40 weave (19g/m^2) +// (3) 2x100um Carbon Fibre HS40 (2x65g/m^2) +// (4) 200um PEI Foam (42g/m^2) +// (5) 2x100um Carbon Fibre HS40 (2x65g/m^2) +// Does not cover the whole stave, so (3) and (5) are combined as just one layer +// (6) 30um Carbon Fibre UMS40 Weave (19g/m^2) +// Material budget x/X0 = sum(sigma_i / X0_i), with sigma_i the areal densities +// above (1 g/m^2 = 1e-4 g/cm^2) and X0_i in g/cm^2 (PDG: carbon 42.7, PEI ~41). +const double staveMaterialBudget = + (84. + 19. + 2 * 65. + 19.) * 1e-4 / 42.7 // graphite + carbon fibre + + 42. * 1e-4 / 41.; // PEI foam +// for the eff. thickness, we use the CarbonFiber X0 = 27 cm from FT3Materials.h +const double effectiveCarbonThickness_Stave = staveMaterialBudget * 27.0; // ~187 um -const double effectiveCarbonThickness_Stave = 0.02; // foam + shell 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.1025; // 1025µm padding on each side: 52.2mm stave width -const double staveWidth = sensor2x1_width + 2 * staveSensorGap; -const double staveTriangleHeight = staveWidth / 2.0 / tan(staveOpeningAngle / 2.0); +const double staveSensorGap = 0.21; // 2.1mm bonding region on each side: 54.4mm stave width +const double staveWidth = sensor1x2_width + 2 * staveSensorGap; /* - * Now describe the offset of every other stave in z to avoid overlaps - * ______ ______ - * \ /______\ / | <-- z_offsetStave - * \ / \ / \ / - * \/ \ / \/ - * \/ + * The stave is created from two carbon legs, and the FPC is its face -- being glued + * onto carbon wings that stick out: + * _ _ <-- wings + * \ / + * \ / <-- legs + * \/ */ +const double staveLegLength = 3.76; +const double staveLegHalfSpan = staveLegLength * sinTheta; // foot, from x = 0 +const double staveHeight = staveLegLength * cosTheta; // apex, behind the face +/* + * Now describe the offset of every other stave in z to avoid overlaps. The + * horizontal bars are the FPC faces, the Vs the legs behind them. + * ________ ________ + * \ /________\ / | <-- z_offsetStave + * \ / \ / \ / + * \/ \ / \/ + * \/ + */ +const double staveFaceThickness = 0.05; // more than combined thickness of FCP (~470um) +const double staveStackThickness = staveFaceThickness + effectiveCarbonThickness_Stave; + // If midpoint spacing becomes non constant, this becomes a function -// TODO: add some tolerance to avoid overlaps? inline const double z_offsetStave(double x_midpoint_spacing) { - return staveTriangleHeight * - (2 - x_midpoint_spacing / (sensor2x1_width / 2 + staveSensorGap)); + const double legSlope = staveHeight / staveLegHalfSpan; + const double faceOverhang = staveWidth / 2 + staveLegHalfSpan - x_midpoint_spacing; + return TMath::Max(legSlope * faceOverhang + staveStackThickness, staveStackThickness); } /* * One uninterrupted fill of 2xN modules along a stave. * * yStart is the y of the BOTTOM edge of the first module; modules follow - * upwards, each separated from the previous one by stackGap. Nothing is + * upwards, each separated from the previous one by moduleGap. Nothing is * mirrored: the layout is symmetric about the y-axis (stave +-ID) but NOT * about the x-axis, so every fill states its own y explicitly. * @@ -189,72 +220,73 @@ namespace OT_StavePositions * Do NOT add any zero midpoints, this is taken off separately. */ const std::map> staveID_to_y_midpoint = { - {-4, {35.659, true}}, - {-3, {41.735, true}}, - {-2, {42.882, true}}, - {-1, {43.761, true}}, - {1, {43.761, true}}, - {2, {42.882, true}}, - {3, {41.735, true}}, - {4, {35.659, true}}}; + {-4, {37.463, true}}, + {-3, {40.103, true}}, + {-2, {41.576, true}}, + {-1, {44.147, true}}, + {1, {44.147, true}}, + {2, {41.576, true}}, + {3, {40.103, true}}, + {4, {37.463, true}}}; /* * Length of one stave piece: for a stave in staveID_to_y_midpoint that is one * of its two pieces, otherwise the whole stave centred on y=0. Trimmed to the - * modules in exactStaveFills, rounded up to the nearest 10 um. + * modules in exactStaveFills, which the carbon overhangs by 100 um at each end, + * rounded up to the nearest 10 um. */ const std::vector y_lengths = { - 32.225, 58.401, 73.016, 87.611, - 99.29, 108.055, 113.886, 119.736, - 125.566, 128.481, 61.336, 49.655, - 49.656, 46.818, 46.818, 49.656, - 49.655, 61.336, 128.481, 125.566, - 119.736, 113.886, 108.055, 99.29, - 87.611, 73.016, 58.401, 32.225}; -const unsigned nStaves = 28; // y_lengths, staveOnFront and exactStaveFills follow this -const double x_midpoint_spacing = 4.92; + 35.06, 58.42, 75.94, 87.62, + 96.38, 105.14, 113.9, 119.74, + 122.66, 128.5, 131.667, 58.42, + 55.5, 52.58, 49.66, 49.66, + 52.58, 55.5, 58.42, 131.667, + 128.5, 122.66, 119.74, 113.9, + 105.14, 96.38, 87.62, 75.94, + 58.42, 35.06}; +const unsigned nStaves = 30; // y_lengths, staveOnFront and exactStaveFills follow this +const double x_midpoint_spacing = 4.52; const std::vector x_midpoints = makeStaveXMidpoints(nStaves, x_midpoint_spacing); -const double maxToleranceInner = 9.; // close but not directly at 10cm yet -const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation +const double maxToleranceInner = 5.; // intrusion the tiling below was solved with +const double maxToleranceOuter = 2.5; // extrusion the tiling below was solved with const std::vector staveOnFront = makeStaveOnFront(nStaves); /* - * From the disk optimiser: Rin 20, Rout 68, stave width 5.22, overlap 0.30, - * intrusion and extrusion <= 2 with 6 exception staves at 9 and 3, giving - * 99.37% filling with staves and 93.48% with active silicon. One entry per - * stave in x_midpoints order; a stave cut in two by the beam pipe has one - * fill either side of the hole. + * From the disk optimiser: stave width 5.44cm, overlap 0.92cm, with intrusion + * <= 5cm and extrusion <= 2.5cm * * yStart is the bottom of the first SENSOR, which is half a module gap above * the bottom of the module the optimiser reports. */ const std::vector> exactStaveFills = { - {{-15.9953, {4, 4, 3}}}, // ID -14 - {{-29.1825, {4, 4, 4, 4, 4}}}, // ID -13 - {{-36.49, {4, 4, 4, 4, 3, 3, 3}}}, // ID -12 - {{-43.7875, {4, 4, 4, 4, 4, 4, 3, 3}}}, // ID -11 - {{-49.6275, {4, 4, 4, 4, 4, 4, 4, 3, 3}}}, // ID -10 - {{-54.01, {4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID -9 - {{-56.925, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3}}}, // ID -8 - {{-59.85, {4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID -7 - {{-62.765, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3}}}, // ID -6 - {{-64.2225, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}}}, // ID -5 - {{-66.3087, {4, 4, 4, 3, 3, 3}}, {5.0087, {4, 4, 4, 3, 3, 3}}}, // ID -4 - {{-66.545, {4, 4, 3, 3, 3}}, {16.925, {4, 4, 3, 3, 3}}}, // ID -3 - {{-67.6917, {4, 4, 3, 3, 3}}, {18.0717, {4, 4, 3, 3, 3}}}, // ID -2 - {{-67.0542, {4, 4, 4, 4}}, {20.4669, {4, 4, 4, 4}}}, // ID -1 - {{-67.1519, {4, 4, 4, 4}}, {20.3692, {4, 4, 4, 4}}}, // ID +1 - {{-67.6917, {4, 4, 3, 3, 3}}, {18.0717, {4, 4, 3, 3, 3}}}, // ID +2 - {{-66.545, {4, 4, 3, 3, 3}}, {16.925, {4, 4, 3, 3, 3}}}, // ID +3 - {{-66.3087, {4, 4, 4, 3, 3, 3}}, {5.0087, {4, 4, 4, 3, 3, 3}}}, // ID +4 - {{-64.2225, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}}}, // ID +5 - {{-62.765, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3}}}, // ID +6 - {{-59.85, {4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID +7 - {{-56.925, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3}}}, // ID +8 - {{-54.01, {4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID +9 - {{-49.6275, {4, 4, 4, 4, 4, 4, 4, 3, 3}}}, // ID +10 - {{-43.7875, {4, 4, 4, 4, 4, 4, 3, 3}}}, // ID +11 - {{-36.49, {4, 4, 4, 4, 3, 3, 3}}}, // ID +12 - {{-29.1825, {4, 4, 4, 4, 4}}}, // ID +13 - {{-16.0947, {4, 4, 3}}}, // ID +14 + {{-17.51, {4, 4, 4}}}, // ID -15 + {{-29.19, {4, 4, 4, 4, 4}}}, // ID -14 + {{-37.95, {4, 4, 4, 4, 4, 3, 3}}}, // ID -13 + {{-43.79, {4, 4, 4, 4, 4, 4, 3, 3}}}, // ID -12 + {{-48.17, {4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID -11 + {{-52.55, {4, 4, 4, 4, 4, 4, 4, 4, 4}}}, // ID -10 + {{-56.93, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3}}}, // ID -9 + {{-59.85, {4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID -8 + {{-61.31, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3}}}, // ID -7 + {{-64.23, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}}}, // ID -6 + {{-65.8132, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID -5 + {{-66.6534, {4, 4, 4, 4, 4}}, {8.2734, {4, 4, 4, 4, 4}}}, // ID -4 + {{-67.8333, {4, 4, 4, 4, 3}}, {12.3733, {4, 4, 4, 4, 3}}}, // ID -3 + {{-67.8462, {4, 4, 4, 3, 3}}, {15.3062, {4, 4, 4, 3, 3}}}, // ID -2 + {{-68.9569, {4, 4, 3, 3, 3}}, {19.3369, {4, 4, 3, 3, 3}}}, // ID -1 + {{-68.9569, {4, 4, 3, 3, 3}}, {19.3369, {4, 4, 3, 3, 3}}}, // ID +1 + {{-67.8462, {4, 4, 4, 3, 3}}, {15.3062, {4, 4, 4, 3, 3}}}, // ID +2 + {{-67.8333, {4, 4, 4, 4, 3}}, {12.3733, {4, 4, 4, 4, 3}}}, // ID +3 + {{-66.6534, {4, 4, 4, 4, 4}}, {8.2734, {4, 4, 4, 4, 4}}}, // ID +4 + {{-65.5668, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID +5 + {{-64.23, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}}}, // ID +6 + {{-61.31, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3}}}, // ID +7 + {{-59.85, {4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID +8 + {{-56.93, {4, 4, 4, 4, 4, 4, 4, 4, 4, 3}}}, // ID +9 + {{-52.55, {4, 4, 4, 4, 4, 4, 4, 4, 4}}}, // ID +10 + {{-48.17, {4, 4, 4, 4, 4, 4, 3, 3, 3}}}, // ID +11 + {{-43.79, {4, 4, 4, 4, 4, 4, 3, 3}}}, // ID +12 + {{-37.95, {4, 4, 4, 4, 4, 3, 3}}}, // ID +13 + {{-29.19, {4, 4, 4, 4, 4}}}, // ID +14 + {{-17.51, {4, 4, 4}}}, // ID +15 }; } // namespace OT_StavePositions @@ -325,9 +357,10 @@ struct EosCardParams { }; // NOTE on width: a card spanning the full z-range must be narrower than the // clearance to the staggered neighbour stave, whose carbon triangle is -// staveWidth/2 (= 2.61 cm) half-wide: half-width < x_midpoint_spacing - staveWidth/2. -// That is tightest on the ML disks (4.5 - 2.61 = 1.89 cm), so width = 3.4 cm -// (half 1.7 cm) clears both ML and OT (OT spacing 4.92 cm) neighbours. +// staveWidth/2 (= 2.72 cm) half-wide: half-width < x_midpoint_spacing - staveWidth/2. +// That is tightest on the ML disks (4.5 - 2.72 = 1.78 cm), so width = 3.4 cm +// (half 1.7 cm) clears both ML and OT (OT spacing 4.52 cm) neighbours, the ML +// one by only 0.8 mm. // Large (OT) disks constexpr EosCardParams eosCardOT{12.0, 3.4, 0.15, 4, 0.0122, 0.2}; // Small (ML) disks @@ -344,4 +377,4 @@ inline double eosCardEnvelopeExtension(bool isML) } // namespace o2::ft3::ModuleConstants -#endif // FT3MODULECONSTANTS_H \ No newline at end of file +#endif // FT3MODULECONSTANTS_H diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx index 48cf5428fab38..c6d186a0d7536 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Layer.cxx @@ -411,7 +411,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume) // stave face is at z=0 (or +-z_offset_stave), meaning that volumes are at // ~-+1cm < z < ~+-6cm, the +- referring forward/backward discs double z_layer_thickness = // need to shift internally with this - o2::ft3::ModuleConstants::staveTriangleHeight + + o2::ft3::ModuleConstants::staveHeight + o2::ft3::ModuleConstants::z_offsetStave(staveConfig.x_midpoint_spacing) + o2::ft3::ModuleConstants::siliconThickness + o2::ft3::ModuleConstants::copperThickness + diff --git a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx index abeff29569096..3e3318bbecd5f 100644 --- a/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx +++ b/Detectors/Upgrades/ALICE3/TRKFT3/FT3/simulation/src/FT3Module.cxx @@ -54,7 +54,7 @@ std::pair calculate_y_range( // Stave is completely on the left of inner radius min_y_abs = 0; max_y_abs = calculate_y_circle(x_left, Rout); - } else if (x_left < -Constants::sensor2x1_width) { + } else if (x_left < -Constants::sensor1x2_width) { // Stave is completely on the left, but within inner radius min_y_abs = calculate_y_circle(x_right, Rin); max_y_abs = calculate_y_circle(x_left, Rout); @@ -96,7 +96,7 @@ void FT3Module::fill_stave_greedy(PosNegPositionTypes& y_positions, unsigned kSe // start with upper half of the stave, then mirror to the bottom half // add the height of kSensorStack sensors + the gaps in between them double sensorStackHeight = Constants::getStackHeight(kSensorStack); - double sensorAbsStackYShift = sensorStackHeight + Constants::stackGap; + double sensorAbsStackYShift = sensorStackHeight + Constants::moduleGap; // in case a big tolerance is given, cut on the given range instead double max_sensor_y_abs = std::min(absAllowedYRange.second, y_ranges.first.second); @@ -105,7 +105,7 @@ void FT3Module::fill_stave_greedy(PosNegPositionTypes& y_positions, unsigned kSe // either start at given value (adjusted for tolerance), or at last placed sensors if (!y_positions.first.empty()) { // sensors already placed double previousStackHeight = Constants::getStackHeight(y_positions.first.back().second); - y_top = y_positions.first.back().first + previousStackHeight + Constants::stackGap; + y_top = y_positions.first.back().first + previousStackHeight + Constants::moduleGap; } else if (absAllowedYRange.first > 0) { // there is a minimum inner value --> start at the max of the two y_top = std::max(absAllowedYRange.first, y_ranges.first.first); @@ -125,7 +125,7 @@ void FT3Module::fill_stave_greedy(PosNegPositionTypes& y_positions, unsigned kSe if (!y_positions.second.empty()) { // subtract instead to move further down double previousStackHeight = Constants::getStackHeight(y_positions.second.back().second); - y_bottom = y_positions.second.back().first - previousStackHeight - Constants::stackGap; + y_bottom = y_positions.second.back().first - previousStackHeight - Constants::moduleGap; } else if (absAllowedYRange.first > 0) { // there is a minimum inner value --> start at the min of the two y_bottom = std::min(-absAllowedYRange.first, y_ranges.second.first); @@ -161,67 +161,82 @@ PositionTypes FT3Module::fill_stave_exact(const std::vector |________\ /________| <- Wing + * 4 5\\ //7 8 + * \\ // + * \\ // + * \\ // + * \\ // + * \\ // + * \1/ + * 6 * - * [x_outer, z_outer, x_inner, z_inner], each of which has three values + * Returns: [x, z], each of which has ten values */ -std::array, 4> buildStaveTriangle(int direction) +std::array, 2> buildStaveLegs(int direction) { // Set some constants for readability - double d = Constants::effectiveCarbonThickness_Stave; - double H = Constants::staveTriangleHeight; + const double d = Constants::effectiveCarbonThickness_Stave; + const double H = Constants::staveHeight; + const double xFoot = Constants::staveLegHalfSpan; + const double xWing = Constants::staveWidth / 2; + // the legs run BEHIND the face, away from the sensors + const double s = (direction == 1) ? -1.0 : 1.0; + /* - * Inner and outer vertices of the stave cross section triangle - * all vertices are at y_mid, we simply extend the triangle into y dir. - * We work in the local coordinate system of the stave, but still - * call the coordinates x and z for readability. - * - * 1. Get all local coordinates of the two triangle vertices - * 2. Extrude a volume from the subtracted triangle cross section area - * 3. Rotate the volume around the x-axis since it is by default in xy, - * and extruded in z. Rotate by -90 for xz -> xy, otherwise xz -> x(-y) - * 4. Translate the volume to the given position (arguments) - * + * The inner surface of a leg is its outer surface moved d towards the inside + * of the V. Cut flat at the face, that moves the foot d / cos(theta) inwards + * along the face; on the axis the two inner surfaces meet d / sin(theta) + * short of the outer apex. Both follow from the leg standing at theta = + * staveOpeningAngle / 2 to the stave axis. */ - std::array xv_inner, xv_outer, zv_inner, zv_outer; - // calculate the coordinates of the triangle vertices - // Top/bottom vertex (apex) - xv_outer[0] = 0; - zv_outer[0] = (direction == 1) ? -H - : H; - ; - // right - xv_outer[1] = Constants::sensor2x1_width / 2 + Constants::staveSensorGap; - zv_outer[1] = 0; - // left - xv_outer[2] = -xv_outer[1]; - zv_outer[2] = 0; - - // now get inner vertices, shifted inwards by effective carbon thickness - xv_inner[0] = xv_outer[0]; - double z_shift_inner = d / Constants::sinTheta; - zv_inner[0] = (direction == 1) ? zv_outer[0] + z_shift_inner - : zv_outer[0] - z_shift_inner; - // face vertices, first right - zv_inner[1] = (direction == 1) ? zv_outer[1] - d - : zv_outer[1] + d; - double x_shift_abs = d / TMath::Tan(Constants::alpha / 2); - xv_inner[1] = xv_outer[1] - x_shift_abs; - // left - zv_inner[2] = zv_inner[1]; - xv_inner[2] = -xv_inner[1]; - - return {xv_outer, zv_outer, xv_inner, zv_inner}; + const double footInset = d / Constants::cosTheta; + const double apexInset = d / Constants::sinTheta; + const double wingRoot = xFoot - d * Constants::sinTheta / Constants::cosTheta; + + std::array xv, zv; + // inner surface: right foot -> apex -> left foot + xv[0] = xFoot - footInset; + zv[0] = 0; + xv[1] = 0; + zv[1] = s * (H - apexInset); + xv[2] = -xv[0]; + zv[2] = 0; + // left wing, outer surface back over the apex, right wing + xv[3] = -xWing; + zv[3] = 0; + xv[4] = -xWing; + zv[4] = s * d; + xv[5] = -wingRoot; + zv[5] = s * d; + xv[6] = 0; + zv[6] = s * H; + xv[7] = wingRoot; + zv[7] = s * d; + xv[8] = xWing; + zv[8] = s * d; + xv[9] = xWing; + zv[9] = 0; + + return {xv, zv}; } /* @@ -231,7 +246,7 @@ std::array, 4> buildStaveTriangle(int direction) void FT3Module::addStaveVolume( TGeoVolume* motherVolume, std::string volumeName, int direction, unsigned* volume_count, double staveLength, - std::array, 4> staveTriangles, + std::array, 2> staveLegs, std::pair& absAllowedYRange, double x_mid, double y_mid, double z_stave_shift_forward) { @@ -274,21 +289,12 @@ void FT3Module::addStaveVolume( * Note also that we first need to check if the length is allowed given the inner * and outer radius of the layer. */ - TGeoXtru* staveFull = new TGeoXtru(2); - staveFull->SetName((volumeName + "_Xtru_outer").c_str()); - staveFull->DefinePolygon(3, staveTriangles[0].data(), staveTriangles[1].data()); - staveFull->DefineSection(0, 0); - staveFull->DefineSection(1, staveLengthToUse); - - TGeoXtru* staveInner = new TGeoXtru(2); - staveInner->SetName((volumeName + "_Xtru_inner").c_str()); - staveInner->DefinePolygon(3, staveTriangles[2].data(), staveTriangles[3].data()); - staveInner->DefineSection(0, 0); - staveInner->DefineSection(1, staveLengthToUse); - - TGeoCompositeShape* staveShape = new TGeoCompositeShape( - (volumeName + "_shape").c_str(), - Form("%s - %s", staveFull->GetName(), staveInner->GetName())); + TGeoXtru* staveShape = new TGeoXtru(2); + staveShape->SetName((volumeName + "_shape").c_str()); + staveShape->DefinePolygon(10, staveLegs[0].data(), staveLegs[1].data()); + staveShape->DefineSection(0, 0); + staveShape->DefineSection(1, staveLengthToUse); + TGeoVolume* staveVolume = new TGeoVolume( (volumeName).c_str(), staveShape, @@ -369,60 +375,66 @@ void FT3Module::addDetectorVolume( /* * This function adds a glue volume between two element layers, - * immediately for a whole 2x1 layout, under both the active and inactive region. + * immediately for a whole Nx2 module, under both the active and inactive region. */ -void FT3Module::add2x1GlueVolume( +void FT3Module::addNx2GlueVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned volume_count, double x_mid, double y_mid, double z_mid, + unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight, std::string element_glued_to) { std::string glue_name = "FT3glue_" + element_glued_to + "_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count); + // Note that the FPC has to extend into the gap between two modules, + // hence we add moduleGap to the height addDetectorVolume( motherVolume, glue_name, Materials::materials.at(Materials::MaterialID::Epoxy).colour, getMedium(Materials::MaterialID::Epoxy), volume_count, - x_mid, y_mid, z_mid, - Constants::sensor2x1_width / 2, Constants::sensor2x1_height / 2, Constants::epoxyThickness / 2); + x_mid, y_mid, z_mid, Constants::staveWidth / 2, + (moduleHeight + Constants::moduleGap) / 2, Constants::epoxyThickness / 2); } /* * This function adds a copper volume onto which the silicon sensor is glued. - * As with the glue, this is a whole 2x1 layout volume. + * As with the glue, this is a whole Nx2 module volume. */ -void FT3Module::add2x1CopperVolume( +void FT3Module::addNx2CopperVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned volume_count, double x_mid, double y_mid, double z_mid) + unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight) { std::string copper_name = "FT3Copper_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count); + // Note that the FPC has to extend into the gap between two modules, + // hence we add moduleGap to the height addDetectorVolume( motherVolume, copper_name, Materials::materials.at(Materials::MaterialID::Copper).colour, getMedium(Materials::MaterialID::Copper), volume_count, - x_mid, y_mid, z_mid, - Constants::sensor2x1_width / 2, Constants::sensor2x1_height / 2, Constants::copperThickness / 2); + x_mid, y_mid, z_mid, Constants::staveWidth / 2, + (moduleHeight + Constants::moduleGap) / 2, Constants::copperThickness / 2); } /* * This function adds a kapton volume behind the copper, which represents the ??? - * As with copper and glue, this is a whole 2x1 layout volume. + * As with copper and glue, this is a whole Nx2 module volume. */ -void FT3Module::add2x1KaptonVolume( +void FT3Module::addNx2KaptonVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, - unsigned volume_count, double x_mid, double y_mid, double z_mid) + unsigned volume_count, double x_mid, double y_mid, double z_mid, double moduleHeight) { std::string kapton_name = "FT3Kapton_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count); + // Note that the FPC has to extend into the gap between two modules, + // hence we add moduleGap to the height addDetectorVolume( motherVolume, kapton_name, Materials::materials.at(Materials::MaterialID::Kapton).colour, getMedium(Materials::MaterialID::Kapton), volume_count, - x_mid, y_mid, z_mid, - Constants::sensor2x1_width / 2, Constants::sensor2x1_height / 2, Constants::kaptonThickness / 2); + x_mid, y_mid, z_mid, Constants::staveWidth / 2, + (moduleHeight + Constants::moduleGap) / 2, Constants::kaptonThickness / 2); } /* - * This function adds a single sensor (currently 2.5x3.2cm) to the given mother volume + * 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. * - * Because the sensor has an inactive region of 2mm on one side, we also add a + * Because the sensor has an inactive region of 1.5mm on one side, we also add a * separate volume for the inactive region, which will be either on the left or - * or right dependent on the if the sensor is on the left or right in a 2x1 layout. + * or right dependent on the if the sensor is on the left or right in a 1x2 layout. * See FT3Module.h for more details on the layout. * * Arguments: @@ -432,7 +444,7 @@ void FT3Module::add2x1KaptonVolume( * x_mid: the x position of the center of the sensor volume * y_mid: the y position of the center of the sensor volume * z_mid: the z position of the center of the sensor volume - * isLeft: whether the sensor is on the left or right in the 2x1 layout + * isLeft: whether the sensor is on the left or right in the 1x2 layout */ void FT3Module::addSingleSensorVolume( TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx, @@ -530,27 +542,27 @@ void FT3Module::addEndOfStaveCard( void FT3Module::add_stave_volumes( TGeoVolume* motherVolume, int layerNumber, int direction, const Constants::StaveConfig& staveConfig, unsigned i_stave, - const std::array, 4>& staveTriangles, - double z_offset_to_carbon_face, std::pair& absAllowedYRange, + const std::array, 2>& staveLegs, + double z_offset_to_stave_face, std::pair& absAllowedYRange, double y_midpoint, bool mirrorStaveAroundX, unsigned* staveVolumeCount) { // Get whether the stave is shifted backward or not before creating double z_stave_shift_abs = staveConfig.staveOnFront[i_stave] ? 0 : Constants::z_offsetStave(staveConfig.x_midpoint_spacing); double z_stave_shift_forward = // move staves more inward to fit in layer volume - -z_offset_to_carbon_face + z_stave_shift_abs; + -z_offset_to_stave_face + z_stave_shift_abs; std::string stave_volume_name = "FT3_Stave_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(i_stave); addStaveVolume( motherVolume, stave_volume_name, direction, staveVolumeCount, - staveConfig.y_lengths[i_stave], staveTriangles, absAllowedYRange, + staveConfig.y_lengths[i_stave], staveLegs, absAllowedYRange, staveConfig.x_midpoints[i_stave], y_midpoint, z_stave_shift_forward); // Now create the mirrored stave if (mirrorStaveAroundX) { addStaveVolume( motherVolume, stave_volume_name + "_mirrored", direction, staveVolumeCount, - staveConfig.y_lengths[i_stave], staveTriangles, absAllowedYRange, + staveConfig.y_lengths[i_stave], staveLegs, absAllowedYRange, staveConfig.x_midpoints[i_stave], -y_midpoint, z_stave_shift_forward); } @@ -573,7 +585,7 @@ void FT3Module::add_stave_volumes( // 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_carbon_face + + const double z_offset_to_silicon = z_offset_to_stave_face + Constants::epoxyThickness + Constants::kaptonThickness + Constants::copperThickness + Constants::epoxyThickness + Constants::siliconThickness / 2; @@ -609,8 +621,8 @@ void FT3Module::add_stave_volumes( void FT3Module::build_staves_exact( TGeoVolume* motherVolume, int layerNumber, int direction, const Constants::StaveConfig& staveConfig, - const std::array, 4>& staveTriangles, - double z_offset_to_carbon_face, + const std::array, 2>& staveLegs, + double z_offset_to_stave_face, std::vector& y_positionsPosNeg, unsigned& staveVolumeCount) { @@ -630,7 +642,7 @@ void FT3Module::build_staves_exact( std::pair absAllowedYRange = {0., std::numeric_limits::max()}; add_stave_volumes(motherVolume, layerNumber, direction, staveConfig, i_stave, - staveTriangles, z_offset_to_carbon_face, absAllowedYRange, + staveLegs, z_offset_to_stave_face, absAllowedYRange, y_midpoint, mirrorStaveAroundX, &staveVolumeCount); /* @@ -673,8 +685,8 @@ void FT3Module::build_staves_exact( void FT3Module::build_staves_greedy( TGeoVolume* motherVolume, int layerNumber, int direction, double Rin, double Rout, const Constants::StaveConfig& staveConfig, - const std::array, 4>& staveTriangles, - double z_offset_to_carbon_face, + const std::array, 2>& staveLegs, + double z_offset_to_stave_face, std::vector& y_positionsPosNeg, unsigned& staveVolumeCount) { auto& ft3Params = o2::ft3::FT3BaseParam::Instance(); @@ -696,8 +708,8 @@ void FT3Module::build_staves_greedy( * Have a gap around y=0, so sensors are not placed there. * This means the stave is perfectly mirrored around the x-axis. */ - PositionRangeType y_ranges = {{Constants::stackGap / 2, stave_half_length}, - {-Constants::stackGap / 2, -stave_half_length}}; + PositionRangeType y_ranges = {{Constants::moduleGap / 2, stave_half_length}, + {-Constants::moduleGap / 2, -stave_half_length}}; if (staveMidpointAndMirror(staveConfig, staveID, y_midpoint, mirrorStaveAroundX)) { // there is a defined midpoint for this stave, use this for starting points y_ranges.first = {y_midpoint - stave_half_length, y_midpoint + stave_half_length}; @@ -755,7 +767,7 @@ void FT3Module::build_staves_greedy( // Create the stave volumes and fill the y positions where to put sensors on the stave add_stave_volumes(motherVolume, layerNumber, direction, staveConfig, i_stave, - staveTriangles, z_offset_to_carbon_face, absAllowedYRange, + staveLegs, z_offset_to_stave_face, absAllowedYRange, y_midpoint, mirrorStaveAroundX, &staveVolumeCount); // now add the sensor positions on the stave @@ -798,8 +810,12 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction * then glue & materials towards the stave. Depending on direction, * the distance from the center will be mirrored. * - * | SILICON SENSOR | GLUE | COPPER | KAPTON | GLUE | CARBON STAVE | - * ----------------------------------------------------------------> z + * | SILICON SENSOR | GLUE | COPPER | KAPTON | GLUE | + * --------------------------------------------------> z + * + * The FPC is the face of the stave: nothing carbon lies across the front, and + * the two legs rise from the back of this stack. The trailing GLUE is the + * layer that used to bond the FPC to a carbon plate; it is kept for now. * * Naturally, this will be mirrored for layers in the backwards direction, * such that the face of the sensors always face the interaction region. @@ -815,27 +831,27 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction double totalSensorMaterialThickness = Constants::epoxyThickness + Constants::kaptonThickness + Constants::copperThickness + Constants::epoxyThickness + Constants::siliconThickness; - double z_offset_to_carbon_face = z_offset_local - totalSensorMaterialThickness - 0.1; + double z_offset_to_stave_face = z_offset_local - totalSensorMaterialThickness - 0.1; double z_offset_to_glue_Ka = - z_offset_to_carbon_face + Constants::epoxyThickness / 2; + z_offset_to_stave_face + Constants::epoxyThickness / 2; double z_offset_to_kapton = - z_offset_to_carbon_face + Constants::epoxyThickness + + z_offset_to_stave_face + Constants::epoxyThickness + Constants::kaptonThickness / 2; double z_offset_to_copper = - z_offset_to_carbon_face + Constants::epoxyThickness + + z_offset_to_stave_face + Constants::epoxyThickness + Constants::kaptonThickness + Constants::copperThickness / 2; double z_offset_to_glue_Si = - z_offset_to_carbon_face + Constants::epoxyThickness + Constants::kaptonThickness + + z_offset_to_stave_face + Constants::epoxyThickness + Constants::kaptonThickness + Constants::copperThickness + Constants::epoxyThickness / 2; double z_offset_to_silicon = - z_offset_to_carbon_face + Constants::epoxyThickness + + z_offset_to_stave_face + Constants::epoxyThickness + Constants::kaptonThickness + Constants::copperThickness + Constants::epoxyThickness + Constants::siliconThickness / 2; // initialise all y_positions, vector over all staves/columns std::vector y_positionsPosNeg; // stave triangle cross sections are the same for every stave (direction based) - std::array, 4> staveTriangles = buildStaveTriangle(direction); + std::array, 2> staveLegs = buildStaveLegs(direction); unsigned staveVolumeCount = 0; /* * Either read the module positions out of the tabulated layout, or work them @@ -847,11 +863,11 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction * the parameter is set, so that the discs which do have one can use it. */ if (ft3Params.useExactStavePlacement && !staveConfig.exactStaveFills.empty()) { - build_staves_exact(motherVolume, layerNumber, direction, staveConfig, staveTriangles, - z_offset_to_carbon_face, y_positionsPosNeg, staveVolumeCount); + build_staves_exact(motherVolume, layerNumber, direction, staveConfig, staveLegs, + z_offset_to_stave_face, y_positionsPosNeg, staveVolumeCount); } else { build_staves_greedy(motherVolume, layerNumber, direction, Rin, Rout, staveConfig, - staveTriangles, z_offset_to_carbon_face, y_positionsPosNeg, + staveLegs, z_offset_to_stave_face, y_positionsPosNeg, staveVolumeCount); } @@ -893,43 +909,48 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction : y_positionsPosNeg[i_stave].second; // define starting midpoint: y = y_start +- distance to middle of sensor for (unsigned i_y_pos = 0; i_y_pos < positions.size(); i_y_pos++) { - double y_mid = positions[i_y_pos].first + y_sign * Constants::sensor2x1_height / 2; + // place FCP layers for the whole module, with gaps included and then sensors on top (z) + double moduleHeight = Constants::getStackHeight(positions[i_y_pos].second); + double y_mid_module = positions[i_y_pos].first + y_sign * moduleHeight / 2; + // ------------ (2) Epoxy glue layer between silicon and copper (FPC) ------------ + addNx2GlueVolume( + motherVolume, layerNumber, direction, i_stave, sensor_count, + x_mid, y_mid_module, z_offset_to_glue_Si * z_offset_multiplier + z_stave_shift, + moduleHeight, "SiCu"); + // ------------ (3) Copper layer (FPC) ------------ + addNx2CopperVolume( + motherVolume, layerNumber, direction, i_stave, sensor_count, + x_mid, y_mid_module, z_offset_to_copper * z_offset_multiplier + z_stave_shift, + moduleHeight); + // ------------ (4) Kapton layer (FPC) ------------ + addNx2KaptonVolume( + motherVolume, layerNumber, direction, i_stave, sensor_count, + x_mid, y_mid_module, z_offset_to_kapton * z_offset_multiplier + z_stave_shift, + moduleHeight); + // ------------ (5) Epoxy glue layer between stave and Kapton ------------ + // TODO: THIS WILL BE REMOVED SOON! THE STAVE FACE IS THE PCB + addNx2GlueVolume( + motherVolume, layerNumber, direction, i_stave, sensor_count, + x_mid, y_mid_module, z_offset_to_glue_Ka * z_offset_multiplier + z_stave_shift, + moduleHeight, "CarbonKapton"); + + // increment to next sensor: (height + gap of one sensor) + double y_mid_sensor = positions[i_y_pos].first + y_sign * Constants::sensor1x2_height / 2; for (unsigned i_sens = 0; i_sens < positions[i_y_pos].second; i_sens++) { TGeoVolume* sensor; // ------------ (1) Silicon sensor ------------ - // left single sensor of the 2x1: place right edge half of sensor gap from center + // left single sensor of the 1x2: place right edge half of sensor gap from center double z_mid = z_offset_to_silicon * z_offset_multiplier + z_stave_shift; addSingleSensorVolume( motherVolume, layerNumber, direction, i_stave, sensor_count, - x_mid - Constants::sensor2x1_gap / 2 - Constants::active_width / 2, - y_mid, z_mid, true); - // right single sensor of the 2x1: place left edge half of sensor gap from center + x_mid - Constants::sensor1x2_gap / 2 - Constants::active_width / 2, + y_mid_sensor, z_mid, true); + // right single sensor of the 1x2: place left edge half of sensor gap from center addSingleSensorVolume( motherVolume, layerNumber, direction, i_stave, sensor_count + 1, - x_mid + Constants::sensor2x1_gap / 2 + Constants::active_width / 2, - y_mid, z_mid, false); - // ------------ (2) Epoxy glue layer between silicon and copper (FPC) ------------ - z_mid = z_offset_to_glue_Si * z_offset_multiplier + z_stave_shift; - add2x1GlueVolume( - motherVolume, layerNumber, direction, i_stave, sensor_count, - x_mid, y_mid, z_mid, "SiCu"); - // ------------ (3) Copper layer (FPC) ------------ - z_mid = z_offset_to_copper * z_offset_multiplier + z_stave_shift; - add2x1CopperVolume( - motherVolume, layerNumber, direction, i_stave, sensor_count, - x_mid, y_mid, z_mid); - // ------------ (4) Kapton layer (FPC) ------------ - z_mid = z_offset_to_kapton * z_offset_multiplier + z_stave_shift; - add2x1KaptonVolume( - motherVolume, layerNumber, direction, i_stave, sensor_count, - x_mid, y_mid, z_mid); - // ------------ (5) Epoxy glue layer between stave and Kapton ------------ - z_mid = z_offset_to_glue_Ka * z_offset_multiplier + z_stave_shift; - add2x1GlueVolume( - motherVolume, layerNumber, direction, i_stave, sensor_count, - x_mid, y_mid, z_mid, "CarbonKapton"); - // increment to next sensor: (height + gap of one sensor) - y_mid += y_sign * (Constants::sensor2x1_height + Constants::sensor2x1_gap); + x_mid + Constants::sensor1x2_gap / 2 + Constants::active_width / 2, + y_mid_sensor, z_mid, false); + y_mid_sensor += y_sign * (Constants::sensor1x2_height + Constants::sensor1x2_gap); sensor_count += 2; // same count for each material in the glued stack of materials } // sensors in stack } // for y_sign (writing of positive or negative y positions)