190 for (
int iHypo{0}; iHypo <
nActive; ++iHypo) {
192 const float r =
ctx.layerRadii[iLayer];
198 if (!
fit.propagator->propagateToX(hypo.param,
x,
fit.bz, o2::base::PropagatorF::MAX_SIN_PHI,
199 o2::base::PropagatorF::MAX_STEP,
fit.matCorrType)) {
202 if (
fit.matCorrType == o2::base::PropagatorF::MatCorrType::USEMatCorrNONE &&
207 const float ePhi{o2::gpu::CAMath::Sqrt(hypo.param.getSigmaSnp2() / hypo.param.getCsp2())};
208 const float eZ{o2::gpu::CAMath::Sqrt(hypo.param.getSigmaZ2())};
209 const int4 selectedBins =
getBinsRect(iLayer, hypo.param.getPhi(), hypo.param.getZ(),
ctx.nSigmaCutZ * eZ,
ctx.nSigmaCutPhi * ePhi,
utils);
210 if (selectedBins.
x < 0) {
214 int phiBinsNum = selectedBins.
w - selectedBins.
y + 1;
215 if (phiBinsNum < 0) {
216 phiBinsNum +=
ctx.phiBins;
219 const auto rofRange =
ctx.rofOverlaps.getLayer(iLayer).getROFRange(hypo.time);
220 for (
int rof = rofRange.getFirstEntry(); rof < rofRange.getEntriesBound(); ++rof) {
221 if (!
ctx.rofMask.isROFEnabled(iLayer, rof)) {
224 const int rofStart =
ctx.ROFClusters[iLayer][rof];
225 const int nLayerClusters =
ctx.ROFClusters[iLayer][rof + 1] - rofStart;
226 if (nLayerClusters <= 0) {
229 const Cluster* layerClusters =
ctx.clusters[iLayer] + rofStart;
230 const int* indexTable =
ctx.clustersIndexTables[iLayer] + rof *
tableSize;
231 const int zBinRange = selectedBins.
z - selectedBins.
x + 1;
232 for (
int iPhiCount = 0; iPhiCount < phiBinsNum; ++iPhiCount) {
233 const int iPhiBin = (selectedBins.
y + iPhiCount) %
ctx.phiBins;
234 const int firstBinIndex =
utils.getBinIndex(selectedBins.
x, iPhiBin);
235 const int maxBinIndex = firstBinIndex + zBinRange;
236 const int firstRowClusterIndex = indexTable[firstBinIndex];
237 const int maxRowClusterIndex = indexTable[maxBinIndex];
238 for (
int iNextCluster{firstRowClusterIndex}; iNextCluster < maxRowClusterIndex; ++iNextCluster) {
239 if (iNextCluster >= nLayerClusters) {
242 const Cluster& nextCluster = layerClusters[iNextCluster];
251 o2::base::PropagatorF::MAX_SIN_PHI,
252 o2::base::PropagatorF::MAX_STEP,
258 if (predChi2 < 0.f || predChi2 >
fit.maxChi2ClusterAttachment) {
264 updated.chi2 += predChi2;
265 updated.clusters[iLayer] = nextCluster.
clusterId;
267 updated.edgeLayer = iLayer;
268 updated.time +=
ctx.rofOverlaps.getLayer(iLayer).getROFTimeBounds(rof,
true);
278 for (
int iHypo{0}; iHypo <
nNext; ++iHypo) {
const unsigned char *const * usedClusters
const Cluster *const * clusters
const int *const * ROFClusters
const int *const * clustersIndexTables
ROFMaskTable< NLayers >::View rofMask
ROFOverlapTable< NLayers >::View rofOverlaps