Skip to content

Commit

Permalink
instrument fitVertices to output more information when failing assert…
Browse files Browse the repository at this point in the history
… (issue cms-sw#44923)
  • Loading branch information
mmusich committed Aug 5, 2024
1 parent 555f4a3 commit 966ae9d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion RecoTracker/PixelVertexFinding/plugins/alpaka/fitVertices.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,19 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder {
alpaka::syncBlockThreads(acc);
// reuse nn
for (auto i : cms::alpakatools::uniform_elements(acc, foundClusters)) {
ALPAKA_ASSERT_ACC(wv[i] > 0.f);
bool const wv_cond = (wv[i] > 0.f);
if (not wv_cond) {
printf("ERROR: wv[%d] (%f) > 0.f failed\n", i, wv[i]);
// printing info on tracks associated to this vertex
for (auto trk_i = 0u; trk_i < nt; ++trk_i) {
if (iv[trk_i] != int(i)) {
continue;
}
printf(" iv[%d]=%d zt[%d]=%f ezt2[%d]=%f\n", trk_i, iv[trk_i], trk_i, zt[trk_i], trk_i, ezt2[trk_i]);
}
ALPAKA_ASSERT_ACC(false);
}

zv[i] /= wv[i];
nn[i] = -1; // ndof
}
Expand Down

0 comments on commit 966ae9d

Please sign in to comment.