36 auto& agc =
hits.averageGeometry();
37 auto const& ag = cpeParams->averageGeometry();
38 auto nLadders = TrackerTraits::numberOfLaddersInBarrel;
41 agc.ladderZ[il] = ag.ladderZ[il] -
bs->z;
42 agc.ladderX[il] = ag.ladderX[il] -
bs->x;
43 agc.ladderY[il] = ag.ladderY[il] -
bs->y;
44 agc.ladderR[il] =
sqrt(agc.ladderX[il] * agc.ladderX[il] + agc.ladderY[il] * agc.ladderY[il]);
45 agc.ladderMinZ[il] = ag.ladderMinZ[il] -
bs->z;
46 agc.ladderMaxZ[il] = ag.ladderMaxZ[il] -
bs->z;
50 agc.endCapZ[0] = ag.endCapZ[0] -
bs->z;
51 agc.endCapZ[1] = ag.endCapZ[1] -
bs->z;
79 printf(
"hitbuilder: %d clusters in module %d. will write at %d\n", nclus,
me,
clusters[
me].clusModuleStart());
82 for (
int startClus = 0, endClus = nclus; startClus < endClus; startClus +=
MaxHitsInIter) {
84 int lastClus = startClus + nClusInIter;
85 assert(nClusInIter <= nclus);
89 assert(nclus >
MaxHitsInIter || (0 == startClus && nClusInIter == nclus && lastClus == nclus));
94 clusParams.maxRow[ic] = 0;
96 clusParams.maxCol[ic] = 0;
97 clusParams.charge[ic] = 0;
98 clusParams.q_f_X[ic] = 0;
99 clusParams.q_l_X[ic] = 0;
100 clusParams.q_f_Y[ic] = 0;
101 clusParams.q_l_Y[ic] = 0;
109 auto id = digis[
i].moduleId();
114 auto cl = digis[
i].clus();
115 if (cl < startClus || cl >= lastClus)
120 auto x = digis[
i].xx();
121 auto y = digis[
i].yy();
130 auto pixmx = cpeParams->detParams(
me).pixmx;
132 auto id = digis[
i].moduleId();
137 auto cl = digis[
i].clus();
138 if (cl < startClus || cl >= lastClus)
143 auto x = digis[
i].xx();
144 auto y = digis[
i].yy();
145 auto ch = digis[
i].adc();
148 if (clusParams.minRow[
cl] ==
x)
150 if (clusParams.maxRow[
cl] ==
x)
152 if (clusParams.minCol[
cl] ==
y)
154 if (clusParams.maxCol[
cl] ==
y)
169 pixelCPEforGPU::position<TrackerTraits>(cpeParams->commonParams(), cpeParams->detParams(
me), clusParams, ic);
171 pixelCPEforGPU::errorFromDB<TrackerTraits>(cpeParams->commonParams(), cpeParams->detParams(
me), clusParams, ic);
174 hits[
h].chargeAndStatus().charge = clusParams.charge[ic];
175 hits[
h].chargeAndStatus().status = clusParams.status[ic];
179 hits[
h].xLocal() = xl = clusParams.xpos[ic];
180 hits[
h].yLocal() = yl = clusParams.ypos[ic];
182 hits[
h].clusterSizeX() = clusParams.xsize[ic];
183 hits[
h].clusterSizeY() = clusParams.ysize[ic];
185 hits[
h].xerrLocal() = clusParams.xerr[ic] * clusParams.xerr[ic] + cpeParams->detParams(
me).apeXX;
186 hits[
h].yerrLocal() = clusParams.yerr[ic] * clusParams.yerr[ic] + cpeParams->detParams(
me).apeYY;
191 cpeParams->detParams(
me).frame.toGlobal(xl, yl, xg, yg, zg);
197 hits[
h].xGlobal() = xg;
198 hits[
h].yGlobal() = yg;
199 hits[
h].zGlobal() = zg;
202 hits[
h].iphi() = unsafe_atan2s<7>(yg, xg);
T1 atomicMax(T1 *a, T2 b)
ClusParamsT< MaxHitsInIter > ClusParams
constexpr int32_t MaxHitsInIter
ClusParamsT< MaxHitsInIter > ClusParams
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
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
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.
T1 atomicAdd(T1 *a, T2 b)
constexpr int32_t MaxHitsInIter