Skip to content

Commit

Permalink
Use phase1PixelTopology::numberOfLayers where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
czangela committed Mar 22, 2021
1 parent 23fad57 commit ad97afe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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,11 @@ 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);
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 ad97afe

Please sign in to comment.