CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PixelCPEFast.cc
Go to the documentation of this file.
1 #include <cuda_runtime.h>
2 
12 
13 // Services
14 // this is needed to get errors from templates
15 
16 namespace {
17  constexpr float micronsToCm = 1.0e-4;
18 }
19 
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24  const MagneticField* mag,
25  const TrackerGeometry& geom,
26  const TrackerTopology& ttopo,
27  const SiPixelLorentzAngle* lorentzAngle,
28  const SiPixelGenErrorDBObject* genErrorDBObject,
29  const SiPixelLorentzAngle* lorentzAngleWidth)
30  : PixelCPEGenericBase(conf, mag, geom, ttopo, lorentzAngle, genErrorDBObject, lorentzAngleWidth) {
31  // Use errors from templates or from GenError
34  throw cms::Exception("InvalidCalibrationLoaded")
35  << "ERROR: GenErrors not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version "
36  << (*genErrorDBObject_).version();
37  }
38 
40 
41  cpuData_ = {
43  detParamsGPU_.data(),
46  };
47 }
48 
49 const pixelCPEforGPU::ParamsOnGPU* PixelCPEFast::getGPUProductAsync(cudaStream_t cudaStream) const {
50  const auto& data = gpuData_.dataForCurrentDeviceAsync(cudaStream, [this](GPUData& data, cudaStream_t stream) {
51  // and now copy to device...
52  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_commonParams, sizeof(pixelCPEforGPU::CommonParams)));
53  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_detParams,
54  this->detParamsGPU_.size() * sizeof(pixelCPEforGPU::DetParams)));
56  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_layerGeometry, sizeof(pixelCPEforGPU::LayerGeometry)));
57  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_d, sizeof(pixelCPEforGPU::ParamsOnGPU)));
58 
59  cudaCheck(cudaMemcpyAsync(
60  data.paramsOnGPU_d, &data.paramsOnGPU_h, sizeof(pixelCPEforGPU::ParamsOnGPU), cudaMemcpyDefault, stream));
61  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_commonParams,
62  &this->commonParamsGPU_,
64  cudaMemcpyDefault,
65  stream));
66  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_averageGeometry,
67  &this->averageGeometry_,
69  cudaMemcpyDefault,
70  stream));
71  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_layerGeometry,
72  &this->layerGeometry_,
74  cudaMemcpyDefault,
75  stream));
76  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_detParams,
77  this->detParamsGPU_.data(),
78  this->detParamsGPU_.size() * sizeof(pixelCPEforGPU::DetParams),
79  cudaMemcpyDefault,
80  stream));
81  });
82  return data.paramsOnGPU_d;
83 }
84 
86  //
87  // this code executes only once per job, computation inefficiency is not an issue
88  // many code blocks are repeated: better keep the computation local and self oconsistent as blocks may in future move around, be deleted ...
89  // It is valid only for Phase1 and the version of GenError in DB used in late 2018 and in 2021
90 
91  commonParamsGPU_.theThicknessB = m_DetParams.front().theThickness;
92  commonParamsGPU_.theThicknessE = m_DetParams.back().theThickness;
93  commonParamsGPU_.thePitchX = m_DetParams[0].thePitchX;
94  commonParamsGPU_.thePitchY = m_DetParams[0].thePitchY;
95 
96  LogDebug("PixelCPEFast") << "pitch & thickness " << commonParamsGPU_.thePitchX << ' ' << commonParamsGPU_.thePitchY
98 
99  // zero average geometry
101 
102  uint32_t oldLayer = 0;
103  uint32_t oldLadder = 0;
104  float rl = 0;
105  float zl = 0;
106  float miz = 90, mxz = 0;
107  float pl = 0;
108  int nl = 0;
109  detParamsGPU_.resize(m_DetParams.size());
110  for (auto i = 0U; i < m_DetParams.size(); ++i) {
111  auto& p = m_DetParams[i];
112  auto& g = detParamsGPU_[i];
113 
114  assert(p.theDet->index() == int(i));
115  assert(commonParamsGPU_.thePitchY == p.thePitchY);
116  assert(commonParamsGPU_.thePitchX == p.thePitchX);
117 
118  g.isBarrel = GeomDetEnumerators::isBarrel(p.thePart);
119  g.isPosZ = p.theDet->surface().position().z() > 0;
120  g.layer = ttopo_.layer(p.theDet->geographicalId());
121  g.index = i; // better be!
122  g.rawId = p.theDet->geographicalId();
124  assert(thickness == p.theThickness);
125 
126  auto ladder = ttopo_.pxbLadder(p.theDet->geographicalId());
127  if (oldLayer != g.layer) {
128  oldLayer = g.layer;
129  LogDebug("PixelCPEFast") << "new layer at " << i << (g.isBarrel ? " B " : (g.isPosZ ? " E+ " : " E- "))
130  << g.layer << " starting at " << g.rawId << '\n'
131  << "old layer had " << nl << " ladders";
132  nl = 0;
133  }
134  if (oldLadder != ladder) {
135  oldLadder = ladder;
136  LogDebug("PixelCPEFast") << "new ladder at " << i << (g.isBarrel ? " B " : (g.isPosZ ? " E+ " : " E- "))
137  << ladder << " starting at " << g.rawId << '\n'
138  << "old ladder ave z,r,p mz " << zl / 8.f << " " << rl / 8.f << " " << pl / 8.f << ' '
139  << miz << ' ' << mxz;
140  rl = 0;
141  zl = 0;
142  pl = 0;
143  miz = 90;
144  mxz = 0;
145  nl++;
146  }
147 
148  g.shiftX = 0.5f * p.lorentzShiftInCmX;
149  g.shiftY = 0.5f * p.lorentzShiftInCmY;
150  g.chargeWidthX = p.lorentzShiftInCmX * p.widthLAFractionX;
151  g.chargeWidthY = p.lorentzShiftInCmY * p.widthLAFractionY;
152 
153  g.x0 = p.theOrigin.x();
154  g.y0 = p.theOrigin.y();
155  g.z0 = p.theOrigin.z();
156 
157  auto vv = p.theDet->surface().position();
158  auto rr = pixelCPEforGPU::Rotation(p.theDet->surface().rotation());
159  g.frame = pixelCPEforGPU::Frame(vv.x(), vv.y(), vv.z(), rr);
160 
161  zl += vv.z();
162  miz = std::min(miz, std::abs(vv.z()));
163  mxz = std::max(mxz, std::abs(vv.z()));
164  rl += vv.perp();
165  pl += vv.phi(); // (not obvious)
166 
167  // errors .....
169 
170  cp.with_track_angle = false;
171 
172  auto lape = p.theDet->localAlignmentError();
173  if (lape.invalid())
174  lape = LocalError(); // zero....
175 
176  g.apeXX = lape.xx();
177  g.apeYY = lape.yy();
178 
179  auto toMicron = [&](float x) { return std::min(511, int(x * 1.e4f + 0.5f)); };
180 
181  // average angle
182  auto gvx = p.theOrigin.x() + 40.f * commonParamsGPU_.thePitchX;
183  auto gvy = p.theOrigin.y();
184  auto gvz = 1.f / p.theOrigin.z();
185  //--- Note that the normalization is not required as only the ratio used
186 
187  {
188  // calculate angles (fed into errorFromTemplates)
189  cp.cotalpha = gvx * gvz;
190  cp.cotbeta = gvy * gvz;
191  errorFromTemplates(p, cp, 20000.);
192  }
193 
194 #ifdef EDM_ML_DEBUG
195  auto m = 10000.f;
196  for (float qclus = 15000; qclus < 35000; qclus += 15000) {
197  errorFromTemplates(p, cp, qclus);
198  LogDebug("PixelCPEFast") << i << ' ' << qclus << ' ' << cp.pixmx << ' ' << m * cp.sigmax << ' ' << m * cp.sx1
199  << ' ' << m * cp.sx2 << ' ' << m * cp.sigmay << ' ' << m * cp.sy1 << ' ' << m * cp.sy2;
200  }
201  LogDebug("PixelCPEFast") << i << ' ' << m * std::sqrt(lape.xx()) << ' ' << m * std::sqrt(lape.yy());
202 #endif // EDM_ML_DEBUG
203 
204  g.pixmx = std::max(0, cp.pixmx);
205  g.sx2 = toMicron(cp.sx2);
206  g.sy1 = std::max(21, toMicron(cp.sy1)); // for some angles sy1 is very small
207  g.sy2 = std::max(55, toMicron(cp.sy2)); // sometimes sy2 is smaller than others (due to angle?)
208 
209  // sample xerr as function of position
210  auto const xoff = float(phase1PixelTopology::xOffset) * commonParamsGPU_.thePitchX;
211 
212  for (int ix = 0; ix < CPEFastParametrisation::kNumErrorBins; ++ix) {
213  auto x = xoff * (1.f - (0.5f + float(ix)) / 8.f);
214  auto gvx = p.theOrigin.x() - x;
215  auto gvy = p.theOrigin.y();
216  auto gvz = 1.f / p.theOrigin.z();
217  cp.cotbeta = gvy * gvz;
218  cp.cotalpha = gvx * gvz;
219  errorFromTemplates(p, cp, 20000.f);
220  g.sigmax[ix] = toMicron(cp.sigmax);
221  g.sigmax1[ix] = toMicron(cp.sx1);
222  LogDebug("PixelCPEFast") << "sigmax vs x " << i << ' ' << x << ' ' << cp.cotalpha << ' ' << int(g.sigmax[ix])
223  << ' ' << int(g.sigmax1[ix]) << ' ' << 10000.f * cp.sigmay << std::endl;
224  }
225 #ifdef EDM_ML_DEBUG
226  // sample yerr as function of position
227  auto const yoff = float(phase1PixelTopology::yOffset) * commonParamsGPU_.thePitchY;
228  for (int ix = 0; ix < CPEFastParametrisation::kNumErrorBins; ++ix) {
229  auto y = yoff * (1.f - (0.5f + float(ix)) / 8.f);
230  auto gvx = p.theOrigin.x() + 40.f * commonParamsGPU_.thePitchY;
231  auto gvy = p.theOrigin.y() - y;
232  auto gvz = 1.f / p.theOrigin.z();
233  cp.cotbeta = gvy * gvz;
234  cp.cotalpha = gvx * gvz;
235  errorFromTemplates(p, cp, 20000.f);
236  LogDebug("PixelCPEFast") << "sigmay vs y " << i << ' ' << y << ' ' << cp.cotbeta << ' ' << 10000.f * cp.sigmay
237  << std::endl;
238  }
239 #endif // EDM_ML_DEBUG
240 
241  // calculate angles (repeated)
242  cp.cotalpha = gvx * gvz;
243  cp.cotbeta = gvy * gvz;
244  auto aveCB = cp.cotbeta;
245 
246  // sample x by charge
247  int qbin = CPEFastParametrisation::kGenErrorQBins; // low charge
248  int k = 0;
249  for (int qclus = 1000; qclus < 200000; qclus += 1000) {
250  errorFromTemplates(p, cp, qclus);
251  if (cp.qBin_ == qbin)
252  continue;
253  qbin = cp.qBin_;
254  g.xfact[k] = cp.sigmax;
255  g.yfact[k] = cp.sigmay;
256  g.minCh[k++] = qclus;
257 #ifdef EDM_ML_DEBUG
258  LogDebug("PixelCPEFast") << i << ' ' << g.rawId << ' ' << cp.cotalpha << ' ' << qclus << ' ' << cp.qBin_ << ' '
259  << cp.pixmx << ' ' << m * cp.sigmax << ' ' << m * cp.sx1 << ' ' << m * cp.sx2 << ' '
260  << m * cp.sigmay << ' ' << m * cp.sy1 << ' ' << m * cp.sy2 << std::endl;
261 #endif // EDM_ML_DEBUG
262  }
264  // fill the rest (sometimes bin 4 is missing)
265  for (int kk = k; kk < CPEFastParametrisation::kGenErrorQBins; ++kk) {
266  g.xfact[kk] = g.xfact[k - 1];
267  g.yfact[kk] = g.yfact[k - 1];
268  g.minCh[kk] = g.minCh[k - 1];
269  }
270  auto detx = 1.f / g.xfact[0];
271  auto dety = 1.f / g.yfact[0];
272  for (int kk = 0; kk < CPEFastParametrisation::kGenErrorQBins; ++kk) {
273  g.xfact[kk] *= detx;
274  g.yfact[kk] *= dety;
275  }
276  // sample y in "angle" (estimated from cluster size)
277  float ys = 8.f - 4.f; // apperent bias of half pixel (see plot)
278  // plot: https://indico.cern.ch/event/934821/contributions/3974619/attachments/2091853/3515041/DigilessReco.pdf page 25
279  // sample yerr as function of "size"
280  for (int iy = 0; iy < CPEFastParametrisation::kNumErrorBins; ++iy) {
281  ys += 1.f; // first bin 0 is for size 9 (and size is in fixed point 2^3)
282  if (CPEFastParametrisation::kNumErrorBins - 1 == iy)
283  ys += 8.f; // last bin for "overflow"
284  // cp.cotalpha = ys*(commonParamsGPU_.thePitchX/(8.f*thickness)); // use this to print sampling in "x" (and comment the line below)
285  cp.cotbeta = std::copysign(ys * (commonParamsGPU_.thePitchY / (8.f * thickness)), aveCB);
286  errorFromTemplates(p, cp, 20000.f);
287  g.sigmay[iy] = toMicron(cp.sigmay);
288  LogDebug("PixelCPEFast") << "sigmax/sigmay " << i << ' ' << (ys + 4.f) / 8.f << ' ' << cp.cotalpha << '/'
289  << cp.cotbeta << ' ' << 10000.f * cp.sigmax << '/' << int(g.sigmay[iy]) << std::endl;
290  }
291  } // loop over det
292 
293  //
294  // compute ladder baricenter (only in global z) for the barrel
295  //
296  auto& aveGeom = averageGeometry_;
297  int il = 0;
298  for (int im = 0, nm = phase1PixelTopology::numberOfModulesInBarrel; im < nm; ++im) {
299  auto const& g = detParamsGPU_[im];
300  il = im / 8;
302  auto z = g.frame.z();
303  aveGeom.ladderZ[il] += 0.125f * z;
304  aveGeom.ladderMinZ[il] = std::min(aveGeom.ladderMinZ[il], z);
305  aveGeom.ladderMaxZ[il] = std::max(aveGeom.ladderMaxZ[il], z);
306  aveGeom.ladderX[il] += 0.125f * g.frame.x();
307  aveGeom.ladderY[il] += 0.125f * g.frame.y();
308  aveGeom.ladderR[il] += 0.125f * sqrt(g.frame.x() * g.frame.x() + g.frame.y() * g.frame.y());
309  }
311  // add half_module and tollerance
312  constexpr float module_length = 6.7f;
313  constexpr float module_tolerance = 0.2f;
314  for (int il = 0, nl = phase1PixelTopology::numberOfLaddersInBarrel; il < nl; ++il) {
315  aveGeom.ladderMinZ[il] -= (0.5f * module_length - module_tolerance);
316  aveGeom.ladderMaxZ[il] += (0.5f * module_length - module_tolerance);
317  }
318 
319  // compute "max z" for first layer in endcap (should we restrict to the outermost ring?)
320  for (auto im = phase1PixelTopology::layerStart[4]; im < phase1PixelTopology::layerStart[5]; ++im) {
321  auto const& g = detParamsGPU_[im];
322  aveGeom.endCapZ[0] = std::max(aveGeom.endCapZ[0], g.frame.z());
323  }
324  for (auto im = phase1PixelTopology::layerStart[7]; im < phase1PixelTopology::layerStart[8]; ++im) {
325  auto const& g = detParamsGPU_[im];
326  aveGeom.endCapZ[1] = std::min(aveGeom.endCapZ[1], g.frame.z());
327  }
328  // correct for outer ring being closer
329  aveGeom.endCapZ[0] -= 1.5f;
330  aveGeom.endCapZ[1] += 1.5f;
331 
332  for (int jl = 0, nl = phase1PixelTopology::numberOfLaddersInBarrel; jl < nl; ++jl) {
333  LogDebug("PixelCPEFast") << jl << ':' << aveGeom.ladderR[jl] << '/'
334  << std::sqrt(aveGeom.ladderX[jl] * aveGeom.ladderX[jl] +
335  aveGeom.ladderY[jl] * aveGeom.ladderY[jl])
336  << ',' << aveGeom.ladderZ[jl] << ',' << aveGeom.ladderMinZ[jl] << ','
337  << aveGeom.ladderMaxZ[jl] << '\n';
338  }
339  LogDebug("PixelCPEFast") << aveGeom.endCapZ[0] << ' ' << aveGeom.endCapZ[1];
340 
341  // fill Layer and ladders geometry
342  memcpy(layerGeometry_.layerStart, phase1PixelTopology::layerStart, sizeof(phase1PixelTopology::layerStart));
344 }
345 
347  if (paramsOnGPU_d != nullptr) {
348  cudaFree((void*)paramsOnGPU_h.m_commonParams);
349  cudaFree((void*)paramsOnGPU_h.m_detParams);
350  cudaFree((void*)paramsOnGPU_h.m_averageGeometry);
351  cudaFree((void*)paramsOnGPU_h.m_layerGeometry);
352  cudaFree(paramsOnGPU_d);
353  }
354 }
355 
357  ClusterParamGeneric& theClusterParam,
358  float qclus) const {
359  float locBz = theDetParam.bz;
360  float locBx = theDetParam.bx;
361  LogDebug("PixelCPEFast") << "PixelCPEFast::localPosition(...) : locBz = " << locBz;
362 
363  theClusterParam.pixmx = std::numeric_limits<int>::max(); // max pixel charge for truncation of 2-D cluster
364 
365  theClusterParam.sigmay = -999.9; // CPE Generic y-error for multi-pixel cluster
366  theClusterParam.sigmax = -999.9; // CPE Generic x-error for multi-pixel cluster
367  theClusterParam.sy1 = -999.9; // CPE Generic y-error for single single-pixel
368  theClusterParam.sy2 = -999.9; // CPE Generic y-error for single double-pixel cluster
369  theClusterParam.sx1 = -999.9; // CPE Generic x-error for single single-pixel cluster
370  theClusterParam.sx2 = -999.9; // CPE Generic x-error for single double-pixel cluster
371 
372  float dummy;
373 
375  int gtemplID = theDetParam.detTemplateId;
376 
377  theClusterParam.qBin_ = gtempl.qbin(gtemplID,
378  theClusterParam.cotalpha,
379  theClusterParam.cotbeta,
380  locBz,
381  locBx,
382  qclus,
383  false,
384  theClusterParam.pixmx,
385  theClusterParam.sigmay,
386  dummy,
387  theClusterParam.sigmax,
388  dummy,
389  theClusterParam.sy1,
390  dummy,
391  theClusterParam.sy2,
392  dummy,
393  theClusterParam.sx1,
394  dummy,
395  theClusterParam.sx2,
396  dummy);
397 
398  theClusterParam.sigmax = theClusterParam.sigmax * micronsToCm;
399  theClusterParam.sx1 = theClusterParam.sx1 * micronsToCm;
400  theClusterParam.sx2 = theClusterParam.sx2 * micronsToCm;
401 
402  theClusterParam.sigmay = theClusterParam.sigmay * micronsToCm;
403  theClusterParam.sy1 = theClusterParam.sy1 * micronsToCm;
404  theClusterParam.sy2 = theClusterParam.sy2 * micronsToCm;
405 }
406 
407 //-----------------------------------------------------------------------------
411 //-----------------------------------------------------------------------------
412 LocalPoint PixelCPEFast::localPosition(DetParam const& theDetParam, ClusterParam& theClusterParamBase) const {
413  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
414 
415  assert(!theClusterParam.with_track_angle);
416 
418  errorFromTemplates(theDetParam, theClusterParam, theClusterParam.theCluster->charge());
419  } else {
420  theClusterParam.qBin_ = 0;
421  }
422 
423  int q_f_X;
424  int q_l_X;
425  int q_f_Y;
426  int q_l_Y;
427  collect_edge_charges(theClusterParam, q_f_X, q_l_X, q_f_Y, q_l_Y, useErrorsFromTemplates_ && truncatePixelCharge_);
428 
429  // do GPU like ...
431 
432  cp.minRow[0] = theClusterParam.theCluster->minPixelRow();
433  cp.maxRow[0] = theClusterParam.theCluster->maxPixelRow();
434  cp.minCol[0] = theClusterParam.theCluster->minPixelCol();
435  cp.maxCol[0] = theClusterParam.theCluster->maxPixelCol();
436 
437  cp.q_f_X[0] = q_f_X;
438  cp.q_l_X[0] = q_l_X;
439  cp.q_f_Y[0] = q_f_Y;
440  cp.q_l_Y[0] = q_l_Y;
441 
442  cp.charge[0] = theClusterParam.theCluster->charge();
443 
444  auto ind = theDetParam.theDet->index();
446  auto xPos = cp.xpos[0];
447  auto yPos = cp.ypos[0];
448 
449  // set the error (mind ape....)
451  theClusterParam.sigmax = cp.xerr[0];
452  theClusterParam.sigmay = cp.yerr[0];
453 
454  LogDebug("PixelCPEFast") << " in PixelCPEFast:localPosition - pos = " << xPos << " " << yPos << " size "
455  << cp.maxRow[0] - cp.minRow[0] << ' ' << cp.maxCol[0] - cp.minCol[0];
456 
457  //--- Now put the two together
458  LocalPoint pos_in_local(xPos, yPos);
459  return pos_in_local;
460 }
461 
462 //============== INFLATED ERROR AND ERRORS FROM DB BELOW ================
463 
464 //-------------------------------------------------------------------------
465 // Hit error in the local frame
466 //-------------------------------------------------------------------------
467 LocalError PixelCPEFast::localError(DetParam const& theDetParam, ClusterParam& theClusterParamBase) const {
468  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
469 
470  auto xerr = theClusterParam.sigmax;
471  auto yerr = theClusterParam.sigmay;
472 
473  LogDebug("PixelCPEFast") << " errors " << xerr << " " << yerr;
474 
475  auto xerr_sq = xerr * xerr;
476  auto yerr_sq = yerr * yerr;
477 
478  return LocalError(xerr_sq, 0, yerr_sq);
479 }
480 
482  // call PixelCPEGenericBase fillPSetDescription to add common rechit errors
484 }
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
int minPixelCol() const
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEFast.h:41
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
pixelCPEforGPU::AverageGeometry averageGeometry_
Definition: PixelCPEFast.h:47
void fillParamsForGpu()
Definition: PixelCPEFast.cc:85
static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > &pixelTemp, std::string dir="")
constexpr uint32_t numberOfModulesInBarrel
SOAFrame< float > Frame
std::vector< pixelCPEforGPU::DetParams > detParamsGPU_
Definition: PixelCPEFast.h:44
static void fillPSetDescription(edm::ParameterSetDescription &desc)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const SiPixelCluster * theCluster
Definition: PixelCPEBase.h:75
pixelCPEforGPU::CommonParams commonParamsGPU_
Definition: PixelCPEFast.h:45
bool isBarrel(GeomDetEnumerators::SubDetector m)
DetParams const * m_detParams
unsigned int pxbLadder(const DetId &id) const
static void collect_edge_charges(ClusterParam &theClusterParam, int &q_f_X, int &q_l_X, int &q_f_Y, int &q_l_Y, bool truncate)
DetParams m_DetParams
Definition: PixelCPEBase.h:281
uint32_t layerStart[phase1PixelTopology::numberOfLayers+1]
constexpr void position(CommonParams const &__restrict__ comParams, DetParams const &__restrict__ detParams, ClusParams &cp, uint32_t ic)
int charge() const
constexpr int kGenErrorQBins
pixelCPEforGPU::ParamsOnGPU paramsOnGPU_h
Definition: PixelCPEFast.h:53
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
cms::cuda::ESProduct< GPUData > gpuData_
Definition: PixelCPEFast.h:56
assert(be >=bs)
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:47
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
LayerGeometry const * m_layerGeometry
constexpr std::array< uint8_t, layerIndexSize > layer
int maxPixelRow() const
PixelCPEFast(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *)
The constructor.
Definition: PixelCPEFast.cc:23
AverageGeometry const * m_averageGeometry
int qbin(int id, float cotalpha, float cotbeta, float locBz, float locBx, float qclus, bool irradiationCorrections, int &pixmx, float &sigmay, float &deltay, float &sigmax, float &deltax, float &sy1, float &dy1, float &sy2, float &dy2, float &sx1, float &dx1, float &sx2, float &dx2)
const pixelCPEforGPU::ParamsOnGPU * getGPUProductAsync(cudaStream_t cudaStream) const
Definition: PixelCPEFast.cc:49
int minPixelRow() const
T sqrt(T t)
Definition: SSEVec.h:19
constexpr uint32_t numberOfLaddersInBarrel
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
int index() const
Definition: GeomDet.h:83
static void fillPSetDescription(edm::ParameterSetDescription &desc)
pixelCPEforGPU::ParamsOnGPU cpuData_
Definition: PixelCPEFast.h:48
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
SOARotation< float > Rotation
constexpr int16_t xOffset
CommonParams const * m_commonParams
const TrackerTopology & ttopo_
Definition: PixelCPEBase.h:230
constexpr T z() const
Definition: SOARotation.h:133
const SiPixelGenErrorDBObject * genErrorDBObject_
Definition: PixelCPEBase.h:235
int maxPixelCol() const
unsigned int layer(const DetId &id) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
constexpr uint32_t layerStart[numberOfLayers+1]
constexpr void errorFromDB(CommonParams const &__restrict__ comParams, DetParams const &__restrict__ detParams, ClusParams &cp, uint32_t ic)
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:69
constexpr int16_t yOffset
uint8_t layer[phase1PixelTopology::layerIndexSize]
constexpr int kNumErrorBins
pixelCPEforGPU::ParamsOnGPU * paramsOnGPU_d
Definition: PixelCPEFast.h:54
pixelCPEforGPU::LayerGeometry layerGeometry_
Definition: PixelCPEFast.h:46
#define LogDebug(id)