Skip to content

Commit 4952f34

Browse files
committed
GPU Display: fix drawing of propagated tracks
1 parent b8cec0e commit 4952f34

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

GPU/GPUTracking/display/GPUDisplay.cxx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,8 +1019,6 @@ void GPUDisplay::DrawFinal(int iSlice, int /*iCol*/, GPUTPCGMPropagator* prop, s
10191019
trkParam.Set(mclocal[0], mclocal[1], mc.z - ZOffset, mclocal[2], mclocal[3], mc.pZ, charge);
10201020
#endif
10211021
}
1022-
trkParam.X() += mCfgH.xAdd;
1023-
x += mCfgH.xAdd;
10241022
float z0 = trkParam.Z();
10251023
if (iMC && inFlyDirection == 0) {
10261024
buffer.clear();
@@ -1070,7 +1068,8 @@ void GPUDisplay::DrawFinal(int iSlice, int /*iCol*/, GPUTPCGMPropagator* prop, s
10701068
break;
10711069
}
10721070
float sa = sinf(alpha), ca = cosf(alpha);
1073-
useBuffer.emplace_back((ca * trkParam.X() - sa * trkParam.Y()) / GL_SCALE_FACTOR, (ca * trkParam.Y() + sa * trkParam.X()) / GL_SCALE_FACTOR, mCfgH.projectXY ? 0 : (trkParam.Z() + ZOffset) / GL_SCALE_FACTOR);
1071+
float drawX = trkParam.X() + mCfgH.xAdd;
1072+
useBuffer.emplace_back((ca * drawX - sa * trkParam.Y()) / GL_SCALE_FACTOR, (ca * trkParam.Y() + sa * drawX) * mYFactor / GL_SCALE_FACTOR, mCfgH.projectXY ? 0 : (trkParam.Z() + ZOffset) / GL_SCALE_FACTOR);
10741073
x += inFlyDirection ? 1 : -1;
10751074
}
10761075

@@ -1196,8 +1195,8 @@ GPUDisplay::vboList GPUDisplay::DrawGridTRD(int sector)
11961195
float x2Tmp = xyzGlb2[0];
11971196
xyzGlb2[0] = xyzGlb2[0] * cosf(alpha) + xyzGlb2[1] * sinf(alpha);
11981197
xyzGlb2[1] = -x2Tmp * sinf(alpha) + xyzGlb2[1] * cosf(alpha);
1199-
mVertexBuffer[sector].emplace_back(xyzGlb1[0] / GL_SCALE_FACTOR, xyzGlb1[1] / GL_SCALE_FACTOR, xyzGlb1[2] / GL_SCALE_FACTOR);
1200-
mVertexBuffer[sector].emplace_back(xyzGlb2[0] / GL_SCALE_FACTOR, xyzGlb2[1] / GL_SCALE_FACTOR, xyzGlb2[2] / GL_SCALE_FACTOR);
1198+
mVertexBuffer[sector].emplace_back(xyzGlb1[0] / GL_SCALE_FACTOR, xyzGlb1[1] / GL_SCALE_FACTOR * mYFactor, xyzGlb1[2] / GL_SCALE_FACTOR);
1199+
mVertexBuffer[sector].emplace_back(xyzGlb2[0] / GL_SCALE_FACTOR, xyzGlb2[1] / GL_SCALE_FACTOR * mYFactor, xyzGlb2[2] / GL_SCALE_FACTOR);
12011200
}
12021201
}
12031202
}

GPU/GPUTracking/utils/qconfig.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,12 @@ static inline void qConfigHelp(const char* subConfig = nullptr, int followSub =
477477
if (followSub < 2) {
478478
printf("Usage Info:");
479479
}
480-
481480
#define QCONFIG_HELP
482481
#include "qconfig.h"
483482
#undef QCONFIG_HELP
483+
if (followSub < 2) {
484+
printf("\n");
485+
}
484486
}
485487

486488
// Create parser for configuration

0 commit comments

Comments
 (0)