Skip to content

Commit

Permalink
Work around: avoid assert in Phase 2 workflows (#438)
Browse files Browse the repository at this point in the history
SiPixelRecHitConverter needs to produce the very same products as SiPixelRecHitSoAFromLegacy, even if they are not used.

These changes limit the size of the product to gpuClustering::MaxNumModules, avoid an assert or an overflow for Phase 2 workflows.
  • Loading branch information
VinInn authored and fwyzard committed Dec 29, 2020
1 parent 7f04fd5 commit f7ee908
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ namespace cms {
DetId detIdObject(detid);
const GeomDetUnit* genericDet = geom->idToDetUnit(detIdObject);
auto gind = genericDet->index();
assert(gind < 2000);
// FIXME to be changed to support Phase2
if (gind >= int(gpuClustering::MaxNumModules))
continue;
auto const nclus = DSViter->size();
assert(nclus > 0);
clusInModule[gind] = nclus;
Expand Down

0 comments on commit f7ee908

Please sign in to comment.