1 #ifndef RecoLocalTracker_SiPixelRecHits_plugins_gpuPixelRecHits_h 2 #define RecoLocalTracker_SiPixelRecHits_plugins_gpuPixelRecHits_h 19 template <
typename TrackerTraits>
35 auto& agc =
hits.averageGeometry();
37 auto nLadders = TrackerTraits::numberOfLaddersInBarrel;
41 agc.ladderX[il] = ag.ladderX[il] -
bs->x;
42 agc.ladderY[il] = ag.ladderY[il] -
bs->y;
43 agc.ladderR[il] =
sqrt(agc.ladderX[il] * agc.ladderX[il] + agc.ladderY[il] * agc.ladderY[il]);
44 agc.ladderMinZ[il] = ag.ladderMinZ[il] -
bs->z;
45 agc.ladderMaxZ[il] = ag.ladderMaxZ[il] -
bs->z;
49 agc.endCapZ[0] = ag.endCapZ[0] -
bs->z;
50 agc.endCapZ[1] = ag.endCapZ[1] -
bs->z;
78 printf(
"hitbuilder: %d clusters in module %d. will write at %d\n", nclus,
me,
clusters[
me].clusModuleStart());
81 for (
int startClus = 0, endClus = nclus; startClus < endClus; startClus +=
MaxHitsInIter) {
83 int lastClus = startClus + nClusInIter;
84 assert(nClusInIter <= nclus);
88 assert(nclus >
MaxHitsInIter || (0 == startClus && nClusInIter == nclus && lastClus == nclus));
93 clusParams.maxRow[ic] = 0;
95 clusParams.maxCol[ic] = 0;
96 clusParams.charge[ic] = 0;
97 clusParams.q_f_X[ic] = 0;
98 clusParams.q_l_X[ic] = 0;
99 clusParams.q_f_Y[ic] = 0;
100 clusParams.q_l_Y[ic] = 0;
108 auto id = digis[
i].moduleId();
113 auto cl = digis[
i].clus();
114 if (cl < startClus || cl >= lastClus)
119 auto x = digis[
i].xx();
120 auto y = digis[
i].yy();
131 auto id = digis[
i].moduleId();
136 auto cl = digis[
i].clus();
137 if (cl < startClus || cl >= lastClus)
142 auto x = digis[
i].xx();
143 auto y = digis[
i].yy();
144 auto ch = digis[
i].adc();
147 if (clusParams.minRow[
cl] ==
x)
149 if (clusParams.maxRow[
cl] ==
x)
151 if (clusParams.minCol[
cl] == y)
153 if (clusParams.maxCol[
cl] == y)
170 pixelCPEforGPU::errorFromDB<TrackerTraits>(cpeParams->
commonParams(), cpeParams->
detParams(
me), clusParams, ic);
173 hits[
h].chargeAndStatus().charge = clusParams.charge[ic];
174 hits[
h].chargeAndStatus().status = clusParams.status[ic];
178 hits[
h].xLocal() = xl = clusParams.xpos[ic];
179 hits[
h].yLocal() = yl = clusParams.ypos[ic];
181 hits[
h].clusterSizeX() = clusParams.xsize[ic];
182 hits[
h].clusterSizeY() = clusParams.ysize[ic];
184 hits[
h].xerrLocal() = clusParams.xerr[ic] * clusParams.xerr[ic] + cpeParams->
detParams(
me).apeXX;
185 hits[
h].yerrLocal() = clusParams.yerr[ic] * clusParams.yerr[ic] + cpeParams->
detParams(
me).apeYY;
190 cpeParams->
detParams(
me).frame.toGlobal(xl, yl, xg, yg, zg);
196 hits[
h].xGlobal() = xg;
197 hits[
h].yGlobal() = yg;
198 hits[
h].zGlobal() = zg;
201 hits[
h].iphi() = unsafe_atan2s<7>(yg, xg);
209 #endif // RecoLocalTracker_SiPixelRecHits_plugins_gpuPixelRecHits_h
T1 atomicMax(T1 *a, T2 b)
ClusParamsT< MaxHitsInIter > ClusParams
constexpr AverageGeometry const &__restrict__ averageGeometry() const
constexpr DetParams const &__restrict__ detParams(int i) const
float ladderZ[TrackerTraits::numberOfLaddersInBarrel]
constexpr uint16_t invalidModuleId
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 CommonParams const &__restrict__ commonParams() const
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<>::View TrackingRecHitSoAView
SiPixelClustersCUDALayout<>::ConstView SiPixelClustersCUDASOAConstView
T1 atomicMin(T1 *a, T2 b)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
SiPixelDigisCUDASOA::ConstView SiPixelDigisCUDASOAConstView
T1 atomicAdd(T1 *a, T2 b)
constexpr int32_t MaxHitsInIter