Skip to content

Commit

Permalink
Fix pixel translation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
claralasa committed Oct 15, 2020
1 parent 8ca7de6 commit b361733
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ std::vector<DigitizerUtility::SignalPoint> Pixel3DDigitizerAlgorithm::drift(
const float pixel_x = current_pixel_int.first + (mc.x() + center_proxy_cell.x()) / pitch.first;
const float pixel_y = current_pixel_int.second + (mc.y() + center_proxy_cell.y()) / pitch.second;
const auto lp = pixdet->specificTopology().localPosition(MeasurementPoint(pixel_x, pixel_y));
mc.migrate_position(LocalPoint(lp.x(), lp.y(), mc.z()));
//Remember: the drift function will move the reference system to the bottom. We need to add what we previously subtract
//in order to avoid a double translation when calling the drift function once again below
mc.migrate_position(LocalPoint(lp.x(), lp.y(), mc.z() + center_proxy_cell.z()));
}
if (!migrated_charges.empty()) {
LogDebug("Pixel3DDigitizerAlgorithm::drift") << "****************"
Expand Down

0 comments on commit b361733

Please sign in to comment.