1 #ifndef RecoLocalTracker_SiPixelClusterizer_plugins_gpuClusterChargeCut_h
2 #define RecoLocalTracker_SiPixelClusterizer_plugins_gpuClusterChargeCut_h
15 namespace gpuClustering {
20 uint16_t* __restrict__
id,
21 uint16_t
const* __restrict__
adc,
24 uint32_t
const* __restrict__
moduleId,
34 auto firstPixel = moduleStart[1 +
module];
35 auto thisModuleId =
id[firstPixel];
39 auto nclus = nClustersInModule[thisModuleId];
44 printf(
"Warning too many clusters in module %d in block %d: %d > %d\n",
57 if (
id[
i] != thisModuleId)
68 if (thisModuleId % 100 == 1)
70 printf(
"start cluster charge cut for module %d in block %d\n", thisModuleId,
blockIdx.x);
82 if (
id[
i] != thisModuleId)
93 newclusId[
i] = ok[
i] = charge[
i] >= chargeCut ? 1 : 0;
103 __shared__ uint16_t
ws[32];
104 cms::cuda::blockPrefixScan(newclusId, nclus, ws);
106 assert(nclus > newclusId[nclus - 1]);
108 nClustersInModule[thisModuleId] = newclusId[nclus - 1];
114 if (
id[
i] != thisModuleId)
116 if (0 == ok[clusterId[
i]])
119 clusterId[
i] = newclusId[clusterId[
i]] - 1;
129 #endif // RecoLocalTracker_SiPixelClusterizer_plugins_gpuClusterChargeCut_h
__shared__ uint8_t ok[maxNumClustersPerModules]
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ clusterId
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
constexpr int32_t getThresholdForLayerOnCondition(bool isLayer1) const noexcept
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ nClustersInModule
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ moduleStart
constexpr int32_t maxNumClustersPerModules
constexpr uint16_t maxNumModules
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ int32_t *__restrict__ uint32_t numElements
constexpr uint16_t invalidModuleId
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
auto const good
min quality of good
__shared__ uint16_t newclusId[maxNumClustersPerModules]
constexpr uint32_t layerStart[numberOfLayers+1]
bool __syncthreads_and(bool x)
T1 atomicAdd(T1 *a, T2 b)
uint16_t *__restrict__ uint16_t const *__restrict__ adc