Skip to content

Commit

Permalink
Merge pull request #33244 from czangela/pixel_local_reco_refactorings…
Browse files Browse the repository at this point in the history
…_22_03_2021

Use phase1PixelTopology::numberOfLayers where appropriate
  • Loading branch information
cmsbuild authored Mar 23, 2021
2 parents 8ffadd1 + 4d1f89a commit 8c93a85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ int main() {
}

for (auto i = 0U; i < phase1PixelTopology::numberOfModules; ++i) {
int layer = phase1PixelTopology::layer[i / phase1PixelTopology::maxModuleStride];
auto layer = static_cast<const uint32_t>(phase1PixelTopology::layer[i / phase1PixelTopology::maxModuleStride]);
//std::cout << "module " << i << ": " << "layer " << layer << ", \"" << phase1PixelTopology::layerName[layer] << "\", [" << phase1PixelTopology::layerStart[layer] << ", " << phase1PixelTopology::layerStart[layer+1] << ")" << std::endl;
assert(layer < 10);
assert(layer < phase1PixelTopology::numberOfLayers);
assert(i >= phase1PixelTopology::layerStart[layer]);
assert(i < phase1PixelTopology::layerStart[layer + 1]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,16 @@ void SiPixelRecHitSoAFromLegacy::produce(edm::StreamID streamID, edm::Event& iEv
assert(numberOfHits == numberOfClusters);

// fill data structure to support CA
for (auto i = 0; i < 11; ++i) {
for (auto i = 0U; i < phase1PixelTopology::numberOfLayers + 1; ++i) {
output->hitsLayerStart()[i] = hitsModuleStart[cpeView.layerGeometry().layerStart[i]];
}
cms::cuda::fillManyFromVector(
output->phiBinner(), 10, output->iphi(), output->hitsLayerStart(), numberOfHits, 256, nullptr);
cms::cuda::fillManyFromVector(output->phiBinner(),
phase1PixelTopology::numberOfLayers,
output->iphi(),
output->hitsLayerStart(),
numberOfHits,
256,
nullptr);

LogDebug("SiPixelRecHitSoAFromLegacy") << "created HitSoa for " << numberOfClusters << " clusters in "
<< numberOfDetUnits << " Dets";
Expand Down

0 comments on commit 8c93a85

Please sign in to comment.