Skip to content

Commit

Permalink
Apply code checks and code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Jan 15, 2021
1 parent aed17ca commit a3adf6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RecoPixelVertexing/PixelTriplets/plugins/CAConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace CAConstants {
constexpr uint32_t maxCellsPerHit() { return 128 / 2; }
#endif
#else
constexpr uint32_t maxNumberOfDoublets() { return 2*1024 * 1024; }
constexpr uint32_t maxNumberOfDoublets() { return 2 * 1024 * 1024; }
constexpr uint32_t maxCellsPerHit() { return 8 * 128; }
#endif
constexpr uint32_t maxNumOfActiveDoublets() { return maxNumberOfDoublets() / 4; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ __global__ void kernel_find_ntuplets(GPUCACell::Hits const *__restrict__ hhp,
GPUCACell::TmpTuple stack;
stack.reset();
thisCell.find_ntuplets(hh, cells, *cellTracks, *foundNtuplets, *apc, quality, stack, minHitsPerNtuplet, pid < 3);
assert(stack.size() == 0);
assert(stack.empty());
// printf("in %d found quadruplets: %d\n", cellIndex, apc->get());
}
}
Expand Down
16 changes: 10 additions & 6 deletions RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,20 @@ namespace gpuPixelDoubletsAlgos {
auto mo = hh.detectorIndex(oi);
if (mo > 2000)
continue; // invalid

if (doZ0Cut && z0cutoff(oi)) continue;

if (doZ0Cut && z0cutoff(oi))
continue;

auto mop = hh.iphi(oi);
uint16_t idphi = std::min(std::abs(int16_t(mop - mep)), std::abs(int16_t(mep - mop)));
if (idphi > iphicut) continue;
if (idphi > iphicut)
continue;

if (doClusterCut && zsizeCut(oi))
continue;
if (doPtCut && ptcut(oi, idphi))
continue;

if (doClusterCut && zsizeCut(oi)) continue;
if (doPtCut && ptcut(oi, idphi)) continue;

auto ind = atomicAdd(nCells, 1);
if (ind >= maxNumOfDoublets) {
atomicSub(nCells, 1);
Expand Down

0 comments on commit a3adf6b

Please sign in to comment.