@@ -83,17 +83,14 @@ std::pair<double, double> calculate_y_range(
8383 * y_positions: a pair of vectors, where each vector contains pairs of
8484 * y position and stack height for the positive and negative y positions respectively.
8585 * This argument will be appended with the new sensor positions and stack heights.
86- * Rout: the outer radius of the layer
87- * Rin: the inner radius of the layer
88- * x_left: the x position of the left edge of the sensor to be placed
8986 * kSensorStack: the number of sensors to be stacked on top of each other
9087 * y_ranges: the y positions to start and end placing sensors,
9188 * for positive and negative y respectively
9289 * absAllowedYRange: the absolute y range allowed for placing sensors,
9390 * used to cut placement if they go past allowed tolerances
9491 */
95- void FT3Module::fill_stave_greedy (PosNegPositionTypes& y_positions, double Rin, double Rout ,
96- double x_left, unsigned kSensorStack , PositionRangeType y_ranges,
92+ void FT3Module::fill_stave_greedy (PosNegPositionTypes& y_positions, unsigned kSensorStack ,
93+ PositionRangeType y_ranges,
9794 std::pair<double , double >& absAllowedYRange)
9895{
9996 // start with upper half of the stave, then mirror to the bottom half
@@ -648,10 +645,10 @@ void FT3Module::build_staves_greedy(
648645 * (2) The inner tolerance is large enough to allow stave placement as wished
649646 * a) AND the given stave midpoint is above the inner radius
650647 */
651- double x_left = staveConfig.x_midpoints [i_stave] - Constants::sensor2x1_width / 2 ;
652- double x_right = x_left + Constants::sensor2x1_width ;
648+ double x_left_stave = staveConfig.x_midpoints [i_stave] - Constants::staveWidth / 2 ;
649+ double x_right_stave = x_left_stave + Constants::staveWidth ;
653650 std::pair<double , double > absAllowedYRange =
654- calculate_y_range (x_left, x_right , Rin, Rout);
651+ calculate_y_range (x_left_stave, x_right_stave , Rin, Rout);
655652
656653 /*
657654 * Shift allowed range by tolerance. Note that both values in the range must
@@ -679,9 +676,8 @@ void FT3Module::build_staves_greedy(
679676 // now add the sensor positions on the stave
680677 for (unsigned i_kSens = 0 ; i_kSens < Constants::kSensorsPerStack .size (); i_kSens++) {
681678 unsigned nModulesCurr = y_positionsPosNeg.back ().first .size () + y_positionsPosNeg.back ().second .size ();
682- fill_stave_greedy (y_positionsPosNeg.back (), Rin, Rout, x_left,
683- Constants::kSensorsPerStack [i_kSens], y_ranges,
684- absAllowedYRange);
679+ fill_stave_greedy (y_positionsPosNeg.back (), Constants::kSensorsPerStack [i_kSens],
680+ y_ranges, absAllowedYRange);
685681 unsigned nModulesAdded = y_positionsPosNeg.back ().first .size () + y_positionsPosNeg.back ().second .size () - nModulesCurr;
686682 nSensorStackCountPerStave[i_stave][i_kSens] = nModulesAdded;
687683 nSensorStackTotal[i_kSens] += nModulesAdded;
@@ -820,12 +816,12 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction
820816 double z_mid = z_offset_to_silicon * z_offset_multiplier + z_stave_shift;
821817 addSingleSensorVolume (
822818 motherVolume, layerNumber, direction, i_stave, sensor_count,
823- x_mid - Constants::sensor2x1_width / 2 ,
819+ x_mid - Constants::sensor2x1_gap / 2 - Constants::active_width / 2 ,
824820 y_mid, z_mid, true );
825821 // right single sensor of the 2x1: place left edge half of sensor gap from center
826822 addSingleSensorVolume (
827823 motherVolume, layerNumber, direction, i_stave, sensor_count + 1 ,
828- x_mid + Constants::sensor2x1_width / 2 ,
824+ x_mid + Constants::sensor2x1_gap / 2 + Constants::active_width / 2 ,
829825 y_mid, z_mid, false );
830826 // ------------ (2) Epoxy glue layer between silicon and copper (FPC) ------------
831827 z_mid = z_offset_to_glue_Si * z_offset_multiplier + z_stave_shift;
0 commit comments