File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Detectors/ITSMFT/ITS/tracking/src Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -459,13 +459,18 @@ void TrackerTraits<nLayers>::computeLayerCells(const int iteration)
459459
460460 // / Create cells labels
461461 if (mTimeFrame ->hasMCinformation ()) {
462- for (int iLayer{0 }; iLayer < mTrkParams [iteration].CellsPerRoad (); ++iLayer) {
463- for (const auto & cell : mTimeFrame ->getCells ()[iLayer]) {
464- MCCompLabel currentLab{mTimeFrame ->getTrackletsLabel (iLayer)[cell.getFirstTrackletIndex ()]};
465- MCCompLabel nextLab{mTimeFrame ->getTrackletsLabel (iLayer + 1 )[cell.getSecondTrackletIndex ()]};
466- mTimeFrame ->getCellsLabel (iLayer).emplace_back (currentLab == nextLab ? currentLab : MCCompLabel ());
467- }
468- }
462+ tbb::parallel_for (
463+ tbb::blocked_range<int >(0 , mTrkParams [iteration].CellsPerRoad ()),
464+ [&](const tbb::blocked_range<int >& Layers) {
465+ for (int iLayer = Layers.begin (); iLayer < Layers.end (); ++iLayer) {
466+ mTimeFrame ->getCellsLabel (iLayer).reserve (mTimeFrame ->getCells ()[iLayer].size ());
467+ for (const auto & cell : mTimeFrame ->getCells ()[iLayer]) {
468+ MCCompLabel currentLab{mTimeFrame ->getTrackletsLabel (iLayer)[cell.getFirstTrackletIndex ()]};
469+ MCCompLabel nextLab{mTimeFrame ->getTrackletsLabel (iLayer + 1 )[cell.getSecondTrackletIndex ()]};
470+ mTimeFrame ->getCellsLabel (iLayer).emplace_back (currentLab == nextLab ? currentLab : MCCompLabel ());
471+ }
472+ }
473+ });
469474 }
470475}
471476
You can’t perform that action at this time.
0 commit comments