CMS 3D CMS Logo

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  : PixelCPEBase(conf, mag, geom, ttopo, lorentzAngle, genErrorDBObject, nullptr, lorentzAngleWidth, 0),
31  edgeClusterErrorX_(conf.getParameter<double>("EdgeClusterErrorX")),
32  edgeClusterErrorY_(conf.getParameter<double>("EdgeClusterErrorY")),
33  useErrorsFromTemplates_(conf.getParameter<bool>("UseErrorsFromTemplates")),
34  truncatePixelCharge_(conf.getParameter<bool>("TruncatePixelCharge")) {
35  // Use errors from templates or from GenError
38  throw cms::Exception("InvalidCalibrationLoaded")
39  << "ERROR: GenErrors not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version "
40  << (*genErrorDBObject_).version();
41  }
42 
43  // Rechit errors in case other, more correct, errors are not vailable
44  // These are constants. Maybe there is a more efficienct way to store them.
45  xerr_barrel_l1_ = {0.00115, 0.00120, 0.00088};
46  xerr_barrel_l1_def_ = 0.01030;
47  yerr_barrel_l1_ = {0.00375, 0.00230, 0.00250, 0.00250, 0.00230, 0.00230, 0.00210, 0.00210, 0.00240};
48  yerr_barrel_l1_def_ = 0.00210;
49  xerr_barrel_ln_ = {0.00115, 0.00120, 0.00088};
50  xerr_barrel_ln_def_ = 0.01030;
51  yerr_barrel_ln_ = {0.00375, 0.00230, 0.00250, 0.00250, 0.00230, 0.00230, 0.00210, 0.00210, 0.00240};
52  yerr_barrel_ln_def_ = 0.00210;
53  xerr_endcap_ = {0.0020, 0.0020};
54  xerr_endcap_def_ = 0.0020;
55  yerr_endcap_ = {0.00210};
56  yerr_endcap_def_ = 0.00075;
57 
59 
60  cpuData_ = {
62  detParamsGPU_.data(),
65  };
66 }
67 
68 const pixelCPEforGPU::ParamsOnGPU* PixelCPEFast::getGPUProductAsync(cudaStream_t cudaStream) const {
69  const auto& data = gpuData_.dataForCurrentDeviceAsync(cudaStream, [this](GPUData& data, cudaStream_t stream) {
70  // and now copy to device...
71  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_commonParams, sizeof(pixelCPEforGPU::CommonParams)));
72  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_detParams,
73  this->detParamsGPU_.size() * sizeof(pixelCPEforGPU::DetParams)));
74  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_averageGeometry, sizeof(pixelCPEforGPU::AverageGeometry)));
75  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_h.m_layerGeometry, sizeof(pixelCPEforGPU::LayerGeometry)));
76  cudaCheck(cudaMalloc((void**)&data.paramsOnGPU_d, sizeof(pixelCPEforGPU::ParamsOnGPU)));
77 
78  cudaCheck(cudaMemcpyAsync(
79  data.paramsOnGPU_d, &data.paramsOnGPU_h, sizeof(pixelCPEforGPU::ParamsOnGPU), cudaMemcpyDefault, stream));
80  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_commonParams,
81  &this->commonParamsGPU_,
83  cudaMemcpyDefault,
84  stream));
85  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_averageGeometry,
86  &this->averageGeometry_,
88  cudaMemcpyDefault,
89  stream));
90  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_layerGeometry,
91  &this->layerGeometry_,
93  cudaMemcpyDefault,
94  stream));
95  cudaCheck(cudaMemcpyAsync((void*)data.paramsOnGPU_h.m_detParams,
96  this->detParamsGPU_.data(),
97  this->detParamsGPU_.size() * sizeof(pixelCPEforGPU::DetParams),
98  cudaMemcpyDefault,
99  stream));
100  });
101  return data.paramsOnGPU_d;
102 }
103 
105  commonParamsGPU_.theThicknessB = m_DetParams.front().theThickness;
106  commonParamsGPU_.theThicknessE = m_DetParams.back().theThickness;
107  commonParamsGPU_.thePitchX = m_DetParams[0].thePitchX;
108  commonParamsGPU_.thePitchY = m_DetParams[0].thePitchY;
109 
110  LogDebug("PixelCPEFast") << "pitch & thickness " << commonParamsGPU_.thePitchX << ' ' << commonParamsGPU_.thePitchY
112 
113  // zero average geometry
115 
116  uint32_t oldLayer = 0;
117  uint32_t oldLadder = 0;
118  float rl = 0;
119  float zl = 0;
120  float miz = 90, mxz = 0;
121  float pl = 0;
122  int nl = 0;
123  detParamsGPU_.resize(m_DetParams.size());
124  for (auto i = 0U; i < m_DetParams.size(); ++i) {
125  auto& p = m_DetParams[i];
126  auto& g = detParamsGPU_[i];
127 
128  assert(p.theDet->index() == int(i));
129  assert(commonParamsGPU_.thePitchY == p.thePitchY);
130  assert(commonParamsGPU_.thePitchX == p.thePitchX);
131 
132  g.isBarrel = GeomDetEnumerators::isBarrel(p.thePart);
133  g.isPosZ = p.theDet->surface().position().z() > 0;
134  g.layer = ttopo_.layer(p.theDet->geographicalId());
135  g.index = i; // better be!
136  g.rawId = p.theDet->geographicalId();
137  assert((g.isBarrel ? commonParamsGPU_.theThicknessB : commonParamsGPU_.theThicknessE) == p.theThickness);
138 
139  auto ladder = ttopo_.pxbLadder(p.theDet->geographicalId());
140  if (oldLayer != g.layer) {
141  oldLayer = g.layer;
142  LogDebug("PixelCPEFast") << "new layer at " << i << (g.isBarrel ? " B " : (g.isPosZ ? " E+ " : " E- "))
143  << g.layer << " starting at " << g.rawId << '\n'
144  << "old layer had " << nl << " ladders";
145  nl = 0;
146  }
147  if (oldLadder != ladder) {
148  oldLadder = ladder;
149  LogDebug("PixelCPEFast") << "new ladder at " << i << (g.isBarrel ? " B " : (g.isPosZ ? " E+ " : " E- "))
150  << ladder << " starting at " << g.rawId << '\n'
151  << "old ladder ave z,r,p mz " << zl / 8.f << " " << rl / 8.f << " " << pl / 8.f << ' '
152  << miz << ' ' << mxz;
153  rl = 0;
154  zl = 0;
155  pl = 0;
156  miz = 90;
157  mxz = 0;
158  nl++;
159  }
160 
161  g.shiftX = 0.5f * p.lorentzShiftInCmX;
162  g.shiftY = 0.5f * p.lorentzShiftInCmY;
163  g.chargeWidthX = p.lorentzShiftInCmX * p.widthLAFractionX;
164  g.chargeWidthY = p.lorentzShiftInCmY * p.widthLAFractionY;
165 
166  g.x0 = p.theOrigin.x();
167  g.y0 = p.theOrigin.y();
168  g.z0 = p.theOrigin.z();
169 
170  auto vv = p.theDet->surface().position();
171  auto rr = pixelCPEforGPU::Rotation(p.theDet->surface().rotation());
172  g.frame = pixelCPEforGPU::Frame(vv.x(), vv.y(), vv.z(), rr);
173 
174  zl += vv.z();
175  miz = std::min(miz, std::abs(vv.z()));
176  mxz = std::max(mxz, std::abs(vv.z()));
177  rl += vv.perp();
178  pl += vv.phi(); // (not obvious)
179 
180  // errors .....
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  // calculate angles
188  cp.cotalpha = gvx * gvz;
189  cp.cotbeta = gvy * gvz;
190 
191  cp.with_track_angle = false;
192 
193  auto lape = p.theDet->localAlignmentError();
194  if (lape.invalid())
195  lape = LocalError(); // zero....
196 
197 #ifdef EDM_ML_DEBUG
198  auto m = 10000.f;
199  for (float qclus = 15000; qclus < 35000; qclus += 15000) {
200  errorFromTemplates(p, cp, qclus);
201  LogDebug("PixelCPEFast") << i << ' ' << qclus << ' ' << cp.pixmx << ' ' << m * cp.sigmax << ' ' << m * cp.sx1
202  << ' ' << m * cp.sx2 << ' ' << m * cp.sigmay << ' ' << m * cp.sy1 << ' ' << m * cp.sy2;
203  }
204  LogDebug("PixelCPEFast") << i << ' ' << m * std::sqrt(lape.xx()) << ' ' << m * std::sqrt(lape.yy());
205 #endif // EDM_ML_DEBUG
206 
207  errorFromTemplates(p, cp, 20000.f);
208  g.pixmx = std::max(0, cp.pixmx);
209  g.sx[0] = cp.sigmax;
210  g.sx[1] = cp.sx1;
211  g.sx[2] = cp.sx2;
212 
213  g.sy[0] = cp.sigmay;
214  g.sy[1] = cp.sy1;
215  g.sy[2] = cp.sy2;
216 
217  for (int i = 0; i < 3; ++i) {
218  g.sx[i] = std::sqrt(g.sx[i] * g.sx[i] + lape.xx());
219  g.sy[i] = std::sqrt(g.sy[i] * g.sy[i] + lape.yy());
220  }
221  }
222 
223  // compute ladder baricenter (only in global z) for the barrel
224  auto& aveGeom = averageGeometry_;
225  int il = 0;
226  for (int im = 0, nm = phase1PixelTopology::numberOfModulesInBarrel; im < nm; ++im) {
227  auto const& g = detParamsGPU_[im];
228  il = im / 8;
230  auto z = g.frame.z();
231  aveGeom.ladderZ[il] += 0.125f * z;
232  aveGeom.ladderMinZ[il] = std::min(aveGeom.ladderMinZ[il], z);
233  aveGeom.ladderMaxZ[il] = std::max(aveGeom.ladderMaxZ[il], z);
234  aveGeom.ladderX[il] += 0.125f * g.frame.x();
235  aveGeom.ladderY[il] += 0.125f * g.frame.y();
236  aveGeom.ladderR[il] += 0.125f * sqrt(g.frame.x() * g.frame.x() + g.frame.y() * g.frame.y());
237  }
239  // add half_module and tollerance
240  constexpr float module_length = 6.7f;
241  constexpr float module_tolerance = 0.2f;
242  for (int il = 0, nl = phase1PixelTopology::numberOfLaddersInBarrel; il < nl; ++il) {
243  aveGeom.ladderMinZ[il] -= (0.5f * module_length - module_tolerance);
244  aveGeom.ladderMaxZ[il] += (0.5f * module_length - module_tolerance);
245  }
246 
247  // compute "max z" for first layer in endcap (should we restrict to the outermost ring?)
248  for (auto im = phase1PixelTopology::layerStart[4]; im < phase1PixelTopology::layerStart[5]; ++im) {
249  auto const& g = detParamsGPU_[im];
250  aveGeom.endCapZ[0] = std::max(aveGeom.endCapZ[0], g.frame.z());
251  }
252  for (auto im = phase1PixelTopology::layerStart[7]; im < phase1PixelTopology::layerStart[8]; ++im) {
253  auto const& g = detParamsGPU_[im];
254  aveGeom.endCapZ[1] = std::min(aveGeom.endCapZ[1], g.frame.z());
255  }
256  // correct for outer ring being closer
257  aveGeom.endCapZ[0] -= 1.5f;
258  aveGeom.endCapZ[1] += 1.5f;
259 
260 #ifdef EDM_ML_DEBUG
261  for (int jl = 0, nl = phase1PixelTopology::numberOfLaddersInBarrel; jl < nl; ++jl) {
262  LogDebug("PixelCPEFast") << jl << ':' << aveGeom.ladderR[jl] << '/'
263  << std::sqrt(aveGeom.ladderX[jl] * aveGeom.ladderX[jl] +
264  aveGeom.ladderY[jl] * aveGeom.ladderY[jl])
265  << ',' << aveGeom.ladderZ[jl] << ',' << aveGeom.ladderMinZ[jl] << ','
266  << aveGeom.ladderMaxZ[jl] << '\n';
267  }
268  LogDebug("PixelCPEFast") << aveGeom.endCapZ[0] << ' ' << aveGeom.endCapZ[1];
269 #endif // EDM_ML_DEBUG
270 
271  // fill Layer and ladders geometry
274 }
275 
277  if (paramsOnGPU_d != nullptr) {
278  cudaFree((void*)paramsOnGPU_h.m_commonParams);
279  cudaFree((void*)paramsOnGPU_h.m_detParams);
280  cudaFree((void*)paramsOnGPU_h.m_averageGeometry);
281  cudaFree((void*)paramsOnGPU_h.m_layerGeometry);
282  cudaFree(paramsOnGPU_d);
283  }
284 }
285 
286 std::unique_ptr<PixelCPEBase::ClusterParam> PixelCPEFast::createClusterParam(const SiPixelCluster& cl) const {
287  return std::make_unique<ClusterParamGeneric>(cl);
288 }
289 
291  ClusterParamGeneric& theClusterParam,
292  float qclus) const {
293  float locBz = theDetParam.bz;
294  float locBx = theDetParam.bx;
295  LogDebug("PixelCPEFast") << "PixelCPEFast::localPosition(...) : locBz = " << locBz;
296 
297  theClusterParam.pixmx = std::numeric_limits<int>::max(); // max pixel charge for truncation of 2-D cluster
298 
299  theClusterParam.sigmay = -999.9; // CPE Generic y-error for multi-pixel cluster
300  theClusterParam.sigmax = -999.9; // CPE Generic x-error for multi-pixel cluster
301  theClusterParam.sy1 = -999.9; // CPE Generic y-error for single single-pixel
302  theClusterParam.sy2 = -999.9; // CPE Generic y-error for single double-pixel cluster
303  theClusterParam.sx1 = -999.9; // CPE Generic x-error for single single-pixel cluster
304  theClusterParam.sx2 = -999.9; // CPE Generic x-error for single double-pixel cluster
305 
306  float dummy;
307 
309  int gtemplID = theDetParam.detTemplateId;
310 
311  theClusterParam.qBin_ = gtempl.qbin(gtemplID,
312  theClusterParam.cotalpha,
313  theClusterParam.cotbeta,
314  locBz,
315  locBx,
316  qclus,
317  false,
318  theClusterParam.pixmx,
319  theClusterParam.sigmay,
320  dummy,
321  theClusterParam.sigmax,
322  dummy,
323  theClusterParam.sy1,
324  dummy,
325  theClusterParam.sy2,
326  dummy,
327  theClusterParam.sx1,
328  dummy,
329  theClusterParam.sx2,
330  dummy);
331 
332  theClusterParam.sigmax = theClusterParam.sigmax * micronsToCm;
333  theClusterParam.sx1 = theClusterParam.sx1 * micronsToCm;
334  theClusterParam.sx2 = theClusterParam.sx2 * micronsToCm;
335 
336  theClusterParam.sigmay = theClusterParam.sigmay * micronsToCm;
337  theClusterParam.sy1 = theClusterParam.sy1 * micronsToCm;
338  theClusterParam.sy2 = theClusterParam.sy2 * micronsToCm;
339 }
340 
341 //-----------------------------------------------------------------------------
345 //-----------------------------------------------------------------------------
346 LocalPoint PixelCPEFast::localPosition(DetParam const& theDetParam, ClusterParam& theClusterParamBase) const {
347  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
348 
349  assert(!theClusterParam.with_track_angle);
350 
352  errorFromTemplates(theDetParam, theClusterParam, theClusterParam.theCluster->charge());
353  } else {
354  theClusterParam.qBin_ = 0;
355  }
356 
357  int q_f_X;
358  int q_l_X;
359  int q_f_Y;
360  int q_l_Y;
361  collect_edge_charges(theClusterParam, q_f_X, q_l_X, q_f_Y, q_l_Y, useErrorsFromTemplates_ && truncatePixelCharge_);
362 
363  // do GPU like ...
365 
366  cp.minRow[0] = theClusterParam.theCluster->minPixelRow();
367  cp.maxRow[0] = theClusterParam.theCluster->maxPixelRow();
368  cp.minCol[0] = theClusterParam.theCluster->minPixelCol();
369  cp.maxCol[0] = theClusterParam.theCluster->maxPixelCol();
370 
371  cp.q_f_X[0] = q_f_X;
372  cp.q_l_X[0] = q_l_X;
373  cp.q_f_Y[0] = q_f_Y;
374  cp.q_l_Y[0] = q_l_Y;
375 
376  auto ind = theDetParam.theDet->index();
378  auto xPos = cp.xpos[0];
379  auto yPos = cp.ypos[0];
380 
381  LogDebug("PixelCPEFast") << " in PixelCPEFast:localPosition - pos = " << xPos << " " << yPos << " size "
382  << cp.maxRow[0] - cp.minRow[0] << ' ' << cp.maxCol[0] - cp.minCol[0];
383 
384  //--- Now put the two together
385  LocalPoint pos_in_local(xPos, yPos);
386  return pos_in_local;
387 }
388 
389 //-----------------------------------------------------------------------------
393 //-----------------------------------------------------------------------------
395  int& q_f_X,
396  int& q_l_X,
397  int& q_f_Y,
398  int& q_l_Y,
399  bool truncate) {
400  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
401 
402  // Initialize return variables.
403  q_f_X = q_l_X = 0;
404  q_f_Y = q_l_Y = 0;
405 
406  // Obtain boundaries in index units
407  int xmin = theClusterParam.theCluster->minPixelRow();
408  int xmax = theClusterParam.theCluster->maxPixelRow();
409  int ymin = theClusterParam.theCluster->minPixelCol();
410  int ymax = theClusterParam.theCluster->maxPixelCol();
411 
412  // Iterate over the pixels.
413  int isize = theClusterParam.theCluster->size();
414  for (int i = 0; i != isize; ++i) {
415  auto const& pixel = theClusterParam.theCluster->pixel(i);
416  // ggiurgiu@fnal.gov: add pixel charge truncation
417  int pix_adc = pixel.adc;
418  if (truncate)
419  pix_adc = std::min(pix_adc, theClusterParam.pixmx);
420 
421  //
422  // X projection
423  if (pixel.x == xmin)
424  q_f_X += pix_adc;
425  if (pixel.x == xmax)
426  q_l_X += pix_adc;
427  //
428  // Y projection
429  if (pixel.y == ymin)
430  q_f_Y += pix_adc;
431  if (pixel.y == ymax)
432  q_l_Y += pix_adc;
433  }
434 }
435 
436 //============== INFLATED ERROR AND ERRORS FROM DB BELOW ================
437 
438 //-------------------------------------------------------------------------
439 // Hit error in the local frame
440 //-------------------------------------------------------------------------
441 LocalError PixelCPEFast::localError(DetParam const& theDetParam, ClusterParam& theClusterParamBase) const {
442  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
443 
444  // Default errors are the maximum error used for edge clusters.
445  // These are determined by looking at residuals for edge clusters
446  float xerr = edgeClusterErrorX_ * micronsToCm;
447  float yerr = edgeClusterErrorY_ * micronsToCm;
448 
449  // Find if cluster is at the module edge.
450  int maxPixelCol = theClusterParam.theCluster->maxPixelCol();
451  int maxPixelRow = theClusterParam.theCluster->maxPixelRow();
452  int minPixelCol = theClusterParam.theCluster->minPixelCol();
453  int minPixelRow = theClusterParam.theCluster->minPixelRow();
454 
455  bool edgex = phase1PixelTopology::isEdgeX(minPixelRow) | phase1PixelTopology::isEdgeX(maxPixelRow);
456  bool edgey = phase1PixelTopology::isEdgeY(minPixelCol) | phase1PixelTopology::isEdgeY(maxPixelCol);
457 
458  unsigned int sizex = theClusterParam.theCluster->sizeX();
459  unsigned int sizey = theClusterParam.theCluster->sizeY();
460 
461  // Find if cluster contains double (big) pixels.
462  bool bigInX = theDetParam.theRecTopol->containsBigPixelInX(minPixelRow, maxPixelRow);
463  bool bigInY = theDetParam.theRecTopol->containsBigPixelInY(minPixelCol, maxPixelCol);
464 
466  //
467  // Use template errors
468 
469  if (!edgex) { // Only use this for non-edge clusters
470  if (sizex == 1) {
471  if (!bigInX) {
472  xerr = theClusterParam.sx1;
473  } else {
474  xerr = theClusterParam.sx2;
475  }
476  } else {
477  xerr = theClusterParam.sigmax;
478  }
479  }
480 
481  if (!edgey) { // Only use for non-edge clusters
482  if (sizey == 1) {
483  if (!bigInY) {
484  yerr = theClusterParam.sy1;
485  } else {
486  yerr = theClusterParam.sy2;
487  }
488  } else {
489  yerr = theClusterParam.sigmay;
490  }
491  }
492 
493  } else { // simple errors
494 
495  // This are the simple errors, hardcoded in the code
496  LogDebug("PixelCPEFast") << "Track angles are not known.\n"
497  << "Default angle estimation which assumes track from PV (0,0,0) does not work.";
498 
499  if (GeomDetEnumerators::isTrackerPixel(theDetParam.thePart)) {
500  if (GeomDetEnumerators::isBarrel(theDetParam.thePart)) {
501  DetId id = (theDetParam.theDet->geographicalId());
502  int layer = ttopo_.layer(id);
503  if (layer == 1) {
504  if (!edgex) {
505  if (sizex <= xerr_barrel_l1_.size())
506  xerr = xerr_barrel_l1_[sizex - 1];
507  else
508  xerr = xerr_barrel_l1_def_;
509  }
510 
511  if (!edgey) {
512  if (sizey <= yerr_barrel_l1_.size())
513  yerr = yerr_barrel_l1_[sizey - 1];
514  else
515  yerr = yerr_barrel_l1_def_;
516  }
517  } else { // layer 2,3
518  if (!edgex) {
519  if (sizex <= xerr_barrel_ln_.size())
520  xerr = xerr_barrel_ln_[sizex - 1];
521  else
522  xerr = xerr_barrel_ln_def_;
523  }
524 
525  if (!edgey) {
526  if (sizey <= yerr_barrel_ln_.size())
527  yerr = yerr_barrel_ln_[sizey - 1];
528  else
529  yerr = yerr_barrel_ln_def_;
530  }
531  }
532 
533  } else { // EndCap
534 
535  if (!edgex) {
536  if (sizex <= xerr_endcap_.size())
537  xerr = xerr_endcap_[sizex - 1];
538  else
539  xerr = xerr_endcap_def_;
540  }
541 
542  if (!edgey) {
543  if (sizey <= yerr_endcap_.size())
544  yerr = yerr_endcap_[sizey - 1];
545  else
546  yerr = yerr_endcap_def_;
547  }
548  } // end endcap
549  }
550 
551  } // end
552 
553  LogDebug("PixelCPEFast") << " errors " << xerr << " " << yerr;
554 
555  auto xerr_sq = xerr * xerr;
556  auto yerr_sq = yerr * yerr;
557 
558  return LocalError(xerr_sq, 0, yerr_sq);
559 }
560 
PixelCPEFast::GPUData::~GPUData
~GPUData()
Definition: PixelCPEFast.cc:276
PixelCPEFast::ClusterParamGeneric::sx2
float sx2
Definition: PixelCPEFast.h:33
PixelCPEBase::ClusterParam
Definition: PixelCPEBase.h:69
PixelCPEBase::DetParam::bz
float bz
Definition: PixelCPEBase.h:58
PixelCPEBase::DetParam::bx
float bx
Definition: PixelCPEBase.h:59
pixelCPEforGPU::Rotation
SOARotation< float > Rotation
Definition: pixelCPEforGPU.h:17
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
PixelCPEFast::useErrorsFromTemplates_
const bool useErrorsFromTemplates_
Definition: PixelCPEFast.h:71
MessageLogger.h
PixelCPEFast::ClusterParamGeneric::sigmay
float sigmay
Definition: PixelCPEFast.h:28
pixelCPEforGPU::LayerGeometry::layer
uint8_t layer[phase1PixelTopology::layerIndexSize]
Definition: pixelCPEforGPU.h:51
PixelCPEFast::cpuData_
pixelCPEforGPU::ParamsOnGPU cpuData_
Definition: PixelCPEFast.h:87
PixelCPEFast::ClusterParamGeneric::sy1
float sy1
Definition: PixelCPEFast.h:30
RectangularPixelTopology.h
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PixelCPEFast::localError
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEFast.cc:441
pixelCPEforGPU::CommonParams::thePitchX
float thePitchX
Definition: pixelCPEforGPU.h:23
PixelCPEBase::DetParam::theRecTopol
const RectangularPixelTopology * theRecTopol
Definition: PixelCPEBase.h:50
min
T min(T a, T b)
Definition: MathUtil.h:58
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
TrackerTopology
Definition: TrackerTopology.h:16
PixelCPEBase::genErrorDBObject_
const SiPixelGenErrorDBObject * genErrorDBObject_
Definition: PixelCPEBase.h:235
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
PixelCPEBase::ttopo_
const TrackerTopology & ttopo_
Definition: PixelCPEBase.h:230
PixelCPEFast::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEFast.cc:561
phase1PixelTopology::numberOfModulesInBarrel
constexpr uint32_t numberOfModulesInBarrel
Definition: phase1PixelTopology.h:50
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
muonClassificationByHits_cfi.pixel
pixel
Definition: muonClassificationByHits_cfi.py:9
cms::cuda::assert
assert(be >=bs)
SiPixelGenError::qbin
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)
Definition: SiPixelGenError.cc:538
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
GeomDet::index
int index() const
Definition: GeomDet.h:83
hgcal_conditions::parameters
Definition: HGCConditions.h:86
PixelCPEFast::collect_edge_charges
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)
Definition: PixelCPEFast.cc:394
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:28
PixelCPEFast.h
RectangularPixelTopology::containsBigPixelInY
bool containsBigPixelInY(int iymin, int iymax) const override
Definition: RectangularPixelTopology.h:135
pixelCPEforGPU::ParamsOnGPU::m_commonParams
CommonParams const * m_commonParams
Definition: pixelCPEforGPU.h:55
PixelCPEFast::yerr_barrel_ln_
std::vector< float > yerr_barrel_ln_
Definition: PixelCPEFast.h:75
PixelCPEFast::yerr_endcap_def_
float yerr_endcap_def_
Definition: PixelCPEFast.h:77
PixelCPEBase::DetParam::theDet
const PixelGeomDetUnit * theDet
Definition: PixelCPEBase.h:47
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
DetId
Definition: DetId.h:17
RectangularPixelTopology::containsBigPixelInX
bool containsBigPixelInX(int ixmin, int ixmax) const override
Definition: RectangularPixelTopology.h:132
PixelCPEFast::GPUData::paramsOnGPU_d
pixelCPEforGPU::ParamsOnGPU * paramsOnGPU_d
Definition: PixelCPEFast.h:93
SiPixelTemplate.h
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
PixelCPEFast::yerr_barrel_l1_def_
float yerr_barrel_l1_def_
Definition: PixelCPEFast.h:76
PixelCPEFast::thePixelGenError_
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEFast.h:80
PixelCPEFast::truncatePixelCharge_
const bool truncatePixelCharge_
Definition: PixelCPEFast.h:72
PixelCPEBase::m_DetParams
DetParams m_DetParams
Definition: PixelCPEBase.h:283
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
SiPixelLorentzAngle
Definition: SiPixelLorentzAngle.h:11
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
Point3DBase< float, LocalTag >
pixelCPEforGPU::LayerGeometry::layerStart
uint32_t layerStart[phase1PixelTopology::numberOfLayers+1]
Definition: pixelCPEforGPU.h:50
PixelCPEFast::xerr_barrel_l1_def_
float xerr_barrel_l1_def_
Definition: PixelCPEFast.h:76
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
phase1PixelTopology::isEdgeY
constexpr bool isEdgeY(uint16_t py)
Definition: phase1PixelTopology.h:126
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
PixelCPEFast::edgeClusterErrorY_
const float edgeClusterErrorY_
Definition: PixelCPEFast.h:70
pixelCPEforGPU::Frame
SOAFrame< float > Frame
Definition: pixelCPEforGPU.h:16
PixelCPEFast::errorFromTemplates
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
Definition: PixelCPEFast.cc:290
PixelCPEFast::GPUData
Definition: PixelCPEFast.h:89
PixelCPEFast::edgeClusterErrorX_
const float edgeClusterErrorX_
Definition: PixelCPEFast.h:69
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
phase1PixelTopology::numberOfLaddersInBarrel
constexpr uint32_t numberOfLaddersInBarrel
Definition: phase1PixelTopology.h:51
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
SiPixelGenError
Definition: SiPixelGenError.h:113
edm::ParameterSet
Definition: ParameterSet.h:47
PixelCPEFast::xerr_barrel_ln_def_
float xerr_barrel_ln_def_
Definition: PixelCPEFast.h:76
pixelCPEforGPU::LayerGeometry
Definition: pixelCPEforGPU.h:49
PixelCPEFast::ClusterParamGeneric::sx1
float sx1
Definition: PixelCPEFast.h:32
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
LocalError
Definition: LocalError.h:12
createfilelist.int
int
Definition: createfilelist.py:10
GeomDetEnumerators::isTrackerPixel
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:68
GeomDetEnumerators::isBarrel
bool isBarrel(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:57
PixelCPEFast::createClusterParam
std::unique_ptr< PixelCPEBase::ClusterParam > createClusterParam(const SiPixelCluster &cl) const override
Definition: PixelCPEFast.cc:286
cudaCheck.h
pixelCPEforGPU::ParamsOnGPU::m_averageGeometry
AverageGeometry const * m_averageGeometry
Definition: pixelCPEforGPU.h:58
MagneticField.h
pixelCPEforGPU::position
constexpr void position(CommonParams const &__restrict__ comParams, DetParams const &__restrict__ detParams, ClusParams &cp, uint32_t ic)
Definition: pixelCPEforGPU.h:175
PixelCPEFast::fillParamsForGpu
void fillParamsForGpu()
Definition: PixelCPEFast.cc:104
pixelCPEforGPU::CommonParams::theThicknessE
float theThicknessE
Definition: pixelCPEforGPU.h:22
pixelCPEforGPU::CommonParams
Definition: pixelCPEforGPU.h:20
PixelCPEFast::xerr_endcap_
std::vector< float > xerr_endcap_
Definition: PixelCPEFast.h:75
phase1PixelTopology::AverageGeometry
Definition: phase1PixelTopology.h:161
SiPixelGenError::pushfile
static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > &pixelTemp, std::string dir="")
Definition: SiPixelGenError.cc:55
PixelCPEFast::GPUData::paramsOnGPU_h
pixelCPEforGPU::ParamsOnGPU paramsOnGPU_h
Definition: PixelCPEFast.h:92
PixelCPEFast::layerGeometry_
pixelCPEforGPU::LayerGeometry layerGeometry_
Definition: PixelCPEFast.h:85
PixelCPEFast::ClusterParamGeneric::sigmax
float sigmax
Definition: PixelCPEFast.h:29
PixelCPEBase::DetParam::detTemplateId
int detTemplateId
Definition: PixelCPEBase.h:65
PixelCPEBase::DetParam::thePart
GeomDetType::SubDetector thePart
Definition: PixelCPEBase.h:52
PixelCPEFast::detParamsGPU_
std::vector< pixelCPEforGPU::DetParams > detParamsGPU_
Definition: PixelCPEFast.h:83
PixelCPEFast::yerr_endcap_
std::vector< float > yerr_endcap_
Definition: PixelCPEFast.h:75
pixelCPEforGPU::ParamsOnGPU
Definition: pixelCPEforGPU.h:54
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
PixelCPEBase::DetParam
Definition: PixelCPEBase.h:45
PixelCPEFast::yerr_barrel_ln_def_
float yerr_barrel_ln_def_
Definition: PixelCPEFast.h:77
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PixelCPEFast::averageGeometry_
pixelCPEforGPU::AverageGeometry averageGeometry_
Definition: PixelCPEFast.h:86
cudaCheck
#define cudaCheck(ARG,...)
Definition: cudaCheck.h:62
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
pixelCPEforGPU::ParamsOnGPU::m_layerGeometry
LayerGeometry const * m_layerGeometry
Definition: pixelCPEforGPU.h:57
PixelCPEFast::xerr_barrel_l1_
std::vector< float > xerr_barrel_l1_
Definition: PixelCPEFast.h:74
PixelCPEFast::xerr_barrel_ln_
std::vector< float > xerr_barrel_ln_
Definition: PixelCPEFast.h:74
DetId.h
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
phase1PixelTopology::isEdgeX
constexpr bool isEdgeX(uint16_t px)
Definition: phase1PixelTopology.h:124
Exception
Definition: hltDiff.cc:245
PixelCPEFast::gpuData_
cms::cuda::ESProduct< GPUData > gpuData_
Definition: PixelCPEFast.h:95
PixelCPEBase
Definition: PixelCPEBase.h:43
PixelGeomDetUnit.h
pixelCPEforGPU::ParamsOnGPU::m_detParams
DetParams const * m_detParams
Definition: pixelCPEforGPU.h:56
PVValHelper::ladder
Definition: PVValidationHelpers.h:73
PixelCPEFast::ClusterParamGeneric
Definition: PixelCPEFast.h:17
PixelCPEFast::xerr_endcap_def_
float xerr_endcap_def_
Definition: PixelCPEFast.h:77
phase1PixelTopology::layerStart
constexpr uint32_t layerStart[numberOfLayers+1]
Definition: phase1PixelTopology.h:26
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
PixelCPEFast::ClusterParamGeneric::sy2
float sy2
Definition: PixelCPEFast.h:31
SiPixelGenErrorDBObject
Definition: SiPixelGenErrorDBObject.h:16
PixelCPEFast::getGPUProductAsync
const pixelCPEforGPU::ParamsOnGPU * getGPUProductAsync(cudaStream_t cudaStream) const
Definition: PixelCPEFast.cc:68
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
dummy
Definition: DummySelector.h:38
pixelCPEforGPU::ClusParamsT
Definition: pixelCPEforGPU.h:78
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
pixelCPEforGPU::DetParams
Definition: pixelCPEforGPU.h:27
PixelCPEFast::yerr_barrel_l1_
std::vector< float > yerr_barrel_l1_
Definition: PixelCPEFast.h:74
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
SOAFrame::z
constexpr T z() const
Definition: SOARotation.h:133
MagneticField
Definition: MagneticField.h:19
PixelCPEFast::localPosition
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEFast.cc:346
phase1PixelTopology.h
pixelCPEforGPU::CommonParams::theThicknessB
float theThicknessB
Definition: pixelCPEforGPU.h:21
pixelCPEforGPU::CommonParams::thePitchY
float thePitchY
Definition: pixelCPEforGPU.h:24
g
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
PixelCPEFast::ClusterParamGeneric::pixmx
int pixmx
Definition: PixelCPEFast.h:25
PixelCPEFast::PixelCPEFast
PixelCPEFast(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *)
The constructor.
Definition: PixelCPEFast.cc:23
TrackerGeometry
Definition: TrackerGeometry.h:14
PixelCPEFast::commonParamsGPU_
pixelCPEforGPU::CommonParams commonParamsGPU_
Definition: PixelCPEFast.h:84