@@ -138,24 +138,22 @@ inline const int4 TrackerTraits::getBinsRect(const Cluster& currentCluster, int
138138 return getBinsRect (layerIndex, currentCluster.phi , maxdeltaphi, z1, z2, maxdeltaz);
139139}
140140
141- inline const int4 TrackerTraits::getBinsRect (const int layerIndex, float phi, float maxdeltaphi,
142- float z1, float z2, float maxdeltaz) const noexcept
141+ inline const int4 TrackerTraits::getBinsRect (const int layerIndex, float phi, float maxdeltaphi, float z1, float z2, float maxdeltaz) const noexcept
143142{
144143 const float zRangeMin = o2::gpu::GPUCommonMath::Min (z1, z2) - maxdeltaz;
145144 const float phiRangeMin = (maxdeltaphi > constants::math::Pi) ? 0 .f : phi - maxdeltaphi;
146145 const float zRangeMax = o2::gpu::GPUCommonMath::Max (z1, z2) + maxdeltaz;
147146 const float phiRangeMax = (maxdeltaphi > constants::math::Pi) ? constants::math::TwoPi : phi + maxdeltaphi;
148147
149- if (zRangeMax < -mTrkParams [0 ].LayerZ [layerIndex + 1 ] ||
150- zRangeMin > mTrkParams [0 ].LayerZ [layerIndex + 1 ] || zRangeMin > zRangeMax) {
151-
148+ if (zRangeMax < -mTrkParams [0 ].LayerZ [layerIndex] ||
149+ zRangeMin > mTrkParams [0 ].LayerZ [layerIndex] || zRangeMin > zRangeMax) {
152150 return getEmptyBinsRect ();
153151 }
154152
155153 const IndexTableUtils& utils{mTimeFrame ->mIndexTableUtils };
156- return int4{o2::gpu::GPUCommonMath::Max (0 , utils.getZBinIndex (layerIndex + 1 , zRangeMin)),
154+ return int4{o2::gpu::GPUCommonMath::Max (0 , utils.getZBinIndex (layerIndex, zRangeMin)),
157155 utils.getPhiBinIndex (math_utils::getNormalizedPhi (phiRangeMin)),
158- o2::gpu::GPUCommonMath::Min (mTrkParams [0 ].ZBins - 1 , utils.getZBinIndex (layerIndex + 1 , zRangeMax)), // /!\ trkParams can potentially change across iterations
156+ o2::gpu::GPUCommonMath::Min (mTrkParams [0 ].ZBins - 1 , utils.getZBinIndex (layerIndex, zRangeMax)), // /!\ trkParams can potentially change across iterations
159157 utils.getPhiBinIndex (math_utils::getNormalizedPhi (phiRangeMax))};
160158}
161159} // namespace its
0 commit comments