Commit fbc77d80 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

DetectorModel: Pixel center is defined at central sensor plane, not surface

parent 1a9ae602
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -239,9 +239,7 @@ ROOT::Math::XYZPoint DetectorModel::getPixelCenter(unsigned int x, unsigned int
    auto size = getPixelSize();
    auto local_x = size.x() * x;
    auto local_y = size.y() * y;
    auto local_z = getSensorCenter().z() - getSensorSize().z() / 2.0;

    return {local_x, local_y, local_z};
    return {local_x, local_y, 0};
}

std::pair<int, int> DetectorModel::getPixelIndex(const ROOT::Math::XYZPoint& position) const {