Skip to content

Commit

Permalink
Merge pull request #124 from SegmentLinking/dbeta_fix
Browse files Browse the repository at this point in the history
DBeta Bug Fix
  • Loading branch information
slava77 authored Nov 15, 2024
2 parents b9ca4b3 + a9610f8 commit a34e2be
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions RecoTracker/LSTCore/src/alpaka/Quintuplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1243,16 +1243,15 @@ namespace lst {
float sdIn_alpha_max = __H2F(segmentsInGPU.dPhiChangeMaxs[innerSegmentIndex]);
float sdOut_alpha = sdIn_alpha;

float sdOut_alphaOut = lst::phi_mpi_pi(acc,
lst::phi(acc,
mdsInGPU.anchorX[fourthMDIndex] - mdsInGPU.anchorX[thirdMDIndex],
mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[thirdMDIndex]) -
mdsInGPU.anchorPhi[fourthMDIndex]);
float sdOut_dPhiPos = lst::phi_mpi_pi(acc, mdsInGPU.anchorPhi[fourthMDIndex] - mdsInGPU.anchorPhi[thirdMDIndex]);

float sdOut_dPhiChange = __H2F(segmentsInGPU.dPhiChanges[outerSegmentIndex]);
float sdOut_dPhiChange_min = __H2F(segmentsInGPU.dPhiChangeMins[outerSegmentIndex]);
float sdOut_dPhiChange_max = __H2F(segmentsInGPU.dPhiChangeMaxs[outerSegmentIndex]);

float sdOut_alphaOut_min = lst::phi_mpi_pi(
acc, __H2F(segmentsInGPU.dPhiChangeMins[outerSegmentIndex]) - __H2F(segmentsInGPU.dPhiMins[outerSegmentIndex]));
float sdOut_alphaOut_max = lst::phi_mpi_pi(
acc, __H2F(segmentsInGPU.dPhiChangeMaxs[outerSegmentIndex]) - __H2F(segmentsInGPU.dPhiMaxs[outerSegmentIndex]));
float sdOut_alphaOutRHmin = lst::phi_mpi_pi(acc, sdOut_dPhiChange_min - sdOut_dPhiPos);
float sdOut_alphaOutRHmax = lst::phi_mpi_pi(acc, sdOut_dPhiChange_max - sdOut_dPhiPos);
float sdOut_alphaOut = lst::phi_mpi_pi(acc, sdOut_dPhiChange - sdOut_dPhiPos);

float tl_axis_x = mdsInGPU.anchorX[fourthMDIndex] - mdsInGPU.anchorX[firstMDIndex];
float tl_axis_y = mdsInGPU.anchorY[fourthMDIndex] - mdsInGPU.anchorY[firstMDIndex];
Expand All @@ -1276,8 +1275,8 @@ namespace lst {
betaInRHmax = betaIn - sdIn_alpha_max + sdIn_alpha;
}

betaOutRHmin = betaOut - sdOut_alphaOut_min + sdOut_alphaOut;
betaOutRHmax = betaOut - sdOut_alphaOut_max + sdOut_alphaOut;
betaOutRHmin = betaOut - sdOut_alphaOutRHmin + sdOut_alphaOut;
betaOutRHmax = betaOut - sdOut_alphaOutRHmax + sdOut_alphaOut;

float swapTemp;
if (alpaka::math::abs(acc, betaOutRHmin) > alpaka::math::abs(acc, betaOutRHmax)) {
Expand Down

0 comments on commit a34e2be

Please sign in to comment.