diff --git a/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducerKernel.dev.cc b/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducerKernel.dev.cc index ea7816ce0cb87..80ab1329d0730 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducerKernel.dev.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/alpaka/PFClusterSoAProducerKernel.dev.cc @@ -1380,17 +1380,17 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { clusterView[seedIdx].y() = pfRecHits[rhIdx].y(); clusterView[seedIdx].z() = pfRecHits[rhIdx].z(); } - } else if constexpr (!std::is_same_v) { // singleSeed and multiSeedParallel functions work only for GPU backend - if (nSeeds == 1) { - // Single seed cluster - hcalFastCluster_singleSeed( - acc, pfClusParams, topology, topoId, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView); - } else if (nSeeds <= 100 && nRHTopo - nSeeds < threadsPerBlockForClustering) { - hcalFastCluster_multiSeedParallel( - acc, pfClusParams, topology, topoId, nSeeds, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView); - } + } else if ((not std::is_same_v)&&nSeeds == 1) { + // Single seed cluster + hcalFastCluster_singleSeed( + acc, pfClusParams, topology, topoId, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView); + } else if ((not std::is_same_v)&&nSeeds <= 100 && + nRHTopo - nSeeds < threadsPerBlockForClustering) { + hcalFastCluster_multiSeedParallel( + acc, pfClusParams, topology, topoId, nSeeds, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView); } else if (nSeeds <= 400 && nRHTopo - nSeeds <= 1500) { + // nSeeds value must match exotic in FastClusterExotic hcalFastCluster_multiSeedIterative( acc, pfClusParams, topology, topoId, nSeeds, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView); } else { @@ -1429,7 +1429,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { int nRHTopo = pfClusteringVars[topoId].topoRHCount(); int nSeeds = pfClusteringVars[topoId].topoSeedCount(); - if (nRHTopo > 0 && nSeeds > 400 && nRHTopo - nSeeds > 1500) { + // nSeeds value must match multiSeedIterative in FastCluster + if (nRHTopo > 0 && (nSeeds > 400 || nRHTopo - nSeeds > 1500)) { hcalFastCluster_exotic(acc, pfClusParams, topology,