Skip to content

Commit

Permalink
GPU: Fix rotation in getXYZGlo
Browse files Browse the repository at this point in the history
  • Loading branch information
mconcas authored and davidrohr committed Mar 7, 2024
1 parent afe8b51 commit 50ca47c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ GPUdi() auto TrackParametrization<value_T>::getXYZGlo() const -> math_utils::Poi
#else // mockup on GPU without ROOT
float sina, cosa;
gpu::CAMath::SinCos(getAlpha(), sina, cosa);
return math_utils::Point3D<value_t>(cosa * getX() + sina * getY(), cosa * getY() - sina * getX(), getZ());
return math_utils::Point3D<value_t>(cosa * getX() - sina * getY(), cosa * getY() + sina * getX(), getZ());
#endif
}

Expand Down Expand Up @@ -671,7 +671,7 @@ GPUdi() auto TrackParametrization<value_T>::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<value_t>(cosa * xk + sina * y, cosa * y - sina * xk, z);
return math_utils::Point3D<value_t>(cosa * xk - sina * y, cosa * y + sina * xk, z);
#endif
} else {
return math_utils::Point3D<value_t>();
Expand Down

0 comments on commit 50ca47c

Please sign in to comment.