Commit 3cbb0b08 authored by Håkan Wennlöf's avatar Håkan Wennlöf
Browse files

Merge branch 'fix_pixelcenter' into 'master'

PixelDetectorModel: fix pixel center position

See merge request allpix-squared/allpix-squared!621
parents 1b28e423 5685febf
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -73,9 +73,7 @@ ROOT::Math::XYZPoint PixelDetectorModel::getPixelCenter(unsigned int x, unsigned
    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> PixelDetectorModel::getPixelIndex(const ROOT::Math::XYZPoint& position) const {