From 50ca47cee82e4287c92515d557360eaacc99e6f9 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Thu, 7 Mar 2024 10:15:20 +0100 Subject: [PATCH] GPU: Fix rotation in getXYZGlo --- .../include/ReconstructionDataFormats/TrackParametrization.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h b/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h index 766000ab191b0..dc2799e4592d8 100644 --- a/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h +++ b/DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h @@ -641,7 +641,7 @@ GPUdi() auto TrackParametrization::getXYZGlo() const -> math_utils::Poi #else // mockup on GPU without ROOT float sina, cosa; gpu::CAMath::SinCos(getAlpha(), sina, cosa); - return math_utils::Point3D(cosa * getX() + sina * getY(), cosa * getY() - sina * getX(), getZ()); + return math_utils::Point3D(cosa * getX() - sina * getY(), cosa * getY() + sina * getX(), getZ()); #endif } @@ -671,7 +671,7 @@ GPUdi() auto TrackParametrization::getXYZGloAt(value_t xk, value_t b, b #else // mockup on GPU without ROOT float sina, cosa; gpu::CAMath::SinCos(getAlpha(), sina, cosa); - return math_utils::Point3D(cosa * xk + sina * y, cosa * y - sina * xk, z); + return math_utils::Point3D(cosa * xk - sina * y, cosa * y + sina * xk, z); #endif } else { return math_utils::Point3D();