@@ -524,17 +524,18 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction
524524
525525 double y_midpoint = 0 .;
526526 bool mirrorStaveAroundX = false ;
527- // default positive and negative starting points has a gap around x-axis
528- PositionRangeType y_ranges = {{0 , Constants::y_lengths[i_stave]},
529- {-Constants::stackGap, -Constants::y_lengths[i_stave]}};
527+ // default positive and negative starting points has a gap around x-axis for symmetry
528+ double stave_half_length = Constants::y_lengths[i_stave] / 2 ;
529+ PositionRangeType y_ranges =
530+ {{Constants::stackGap / 2 , stave_half_length},
531+ {-Constants::stackGap / 2 , -stave_half_length}};
530532 auto y_midpoint_it = Constants::staveID_to_y_midpoint.find (staveID);
531533 if ( y_midpoint_it != Constants::staveID_to_y_midpoint.end () ) {
532534 // there is a defined midpoint for this stave, use this for starting points
533535 y_midpoint = y_midpoint_it->second .first ; // avoid double map lookup
534536 mirrorStaveAroundX = y_midpoint_it->second .second ;
535- double y_diff_abs = Constants::y_lengths[i_stave] / 2 ;
536- y_ranges.first = {y_midpoint - y_diff_abs, y_midpoint + y_diff_abs};
537- y_ranges.second = {-y_midpoint + y_diff_abs, -y_midpoint - y_diff_abs};
537+ y_ranges.first = {y_midpoint - stave_half_length, y_midpoint + stave_half_length};
538+ y_ranges.second = {-y_midpoint + stave_half_length, -y_midpoint - stave_half_length};
538539 }
539540
540541 // Define tolerances for cutting staves and placing sensors
0 commit comments