CMS 3D CMS Logo

PixelCPEFastParamsHost.cc
Go to the documentation of this file.
1 #include <alpaka/alpaka.hpp>
2 
12 
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
16 template <typename TrackerTraits>
18  const MagneticField* mag,
19  const TrackerGeometry& geom,
20  const TrackerTopology& ttopo,
21  const SiPixelLorentzAngle* lorentzAngle,
22  const SiPixelGenErrorDBObject* genErrorDBObject,
23  const SiPixelLorentzAngle* lorentzAngleWidth)
24  : PixelCPEGenericBase(conf, mag, geom, ttopo, lorentzAngle, genErrorDBObject, lorentzAngleWidth),
25  buffer_(cms::alpakatools::make_host_buffer<pixelCPEforDevice::ParamsOnDeviceT<TrackerTraits>>()) {
26  // Use errors from templates or from GenError
29  throw cms::Exception("InvalidCalibrationLoaded")
30  << "ERROR: GenErrors not filled correctly. Check the sqlite file. Using SiPixelTemplateDBObject version "
31  << (*genErrorDBObject_).version();
32  }
33 
35 }
36 
37 template <typename TrackerTraits>
39  // this code executes only once per job, computation inefficiency is not an issue
40  // many code blocks are repeated: better keep the computation local and self consistent as blocks may in future move around, be deleted ...
41  // It is valid only for Phase1 and the version of GenError in DB used in late 2018 and in 2021
42 
43  buffer_->commonParams().theThicknessB = m_DetParams.front().theThickness;
44  buffer_->commonParams().theThicknessE = m_DetParams.back().theThickness;
45  buffer_->commonParams().thePitchX = m_DetParams[0].thePitchX;
46  buffer_->commonParams().thePitchY = m_DetParams[0].thePitchY;
47 
48  buffer_->commonParams().numberOfLaddersInBarrel = TrackerTraits::numberOfLaddersInBarrel;
49 
50  LogDebug("PixelCPEFastParamsHost") << "pitch & thickness " << buffer_->commonParams().thePitchX << ' '
51  << buffer_->commonParams().thePitchY << " "
52  << buffer_->commonParams().theThicknessB << ' '
53  << buffer_->commonParams().theThicknessE;
54 
55  // zero average geometry
56  memset(&buffer_->averageGeometry(), 0, sizeof(pixelTopology::AverageGeometryT<TrackerTraits>));
57 
58  uint32_t oldLayer = 0;
59  uint32_t oldLadder = 0;
60  float rl = 0;
61  float zl = 0;
62  float miz = 500, mxz = 0;
63  float pl = 0;
64  int nl = 0;
65 
66  assert(m_DetParams.size() <= TrackerTraits::numberOfModules);
67  for (auto i = 0U; i < m_DetParams.size(); ++i) {
68  auto& p = m_DetParams[i];
69  auto& g = buffer_->detParams(i);
70 
71  g.nRowsRoc = p.theDet->specificTopology().rowsperroc();
72  g.nColsRoc = p.theDet->specificTopology().colsperroc();
73  g.nRows = p.theDet->specificTopology().rocsX() * g.nRowsRoc;
74  g.nCols = p.theDet->specificTopology().rocsY() * g.nColsRoc;
75 
76  g.numPixsInModule = g.nRows * g.nCols;
77 
78  assert(p.theDet->index() == int(i));
79  assert(buffer_->commonParams().thePitchY == p.thePitchY);
80  assert(buffer_->commonParams().thePitchX == p.thePitchX);
81 
82  g.isBarrel = GeomDetEnumerators::isBarrel(p.thePart);
83  g.isPosZ = p.theDet->surface().position().z() > 0;
84  g.layer = ttopo_.layer(p.theDet->geographicalId());
85  g.index = i; // better be!
86  g.rawId = p.theDet->geographicalId();
87  auto thickness = g.isBarrel ? buffer_->commonParams().theThicknessB : buffer_->commonParams().theThicknessE;
88  assert(thickness == p.theThickness);
89 
90  auto ladder = ttopo_.pxbLadder(p.theDet->geographicalId());
91  if (oldLayer != g.layer) {
92  oldLayer = g.layer;
93  LogDebug("PixelCPEFastParamsHost") << "new layer at " << i << (g.isBarrel ? " B " : (g.isPosZ ? " E+ " : " E- "))
94  << g.layer << " starting at " << g.rawId << '\n'
95  << "old layer had " << nl << " ladders";
96  nl = 0;
97  }
98  if (oldLadder != ladder) {
99  oldLadder = ladder;
100  LogDebug("PixelCPEFastParamsHost") << "new ladder at " << i
101  << (g.isBarrel ? " B " : (g.isPosZ ? " E+ " : " E- ")) << ladder
102  << " starting at " << g.rawId << '\n'
103  << "old ladder ave z,r,p mz " << zl / 8.f << " " << rl / 8.f << " " << pl / 8.f
104  << ' ' << miz << ' ' << mxz;
105  rl = 0;
106  zl = 0;
107  pl = 0;
108  miz = 500;
109  mxz = 0;
110  nl++;
111  }
112 
113  g.shiftX = 0.5f * p.lorentzShiftInCmX;
114  g.shiftY = 0.5f * p.lorentzShiftInCmY;
115  g.chargeWidthX = p.lorentzShiftInCmX * p.widthLAFractionX;
116  g.chargeWidthY = p.lorentzShiftInCmY * p.widthLAFractionY;
117 
118  g.x0 = p.theOrigin.x();
119  g.y0 = p.theOrigin.y();
120  g.z0 = p.theOrigin.z();
121 
122  auto vv = p.theDet->surface().position();
123  auto rr = pixelCPEforDevice::Rotation(p.theDet->surface().rotation());
124  g.frame = pixelCPEforDevice::Frame(vv.x(), vv.y(), vv.z(), rr);
125 
126  zl += vv.z();
127  miz = std::min(miz, std::abs(vv.z()));
128  mxz = std::max(mxz, std::abs(vv.z()));
129  rl += vv.perp();
130  pl += vv.phi(); // (not obvious)
131 
132  // errors .....
134 
135  cp.with_track_angle = false;
136 
137  auto lape = p.theDet->localAlignmentError();
138  if (lape.invalid())
139  lape = LocalError(); // zero....
140 
141  g.apeXX = lape.xx();
142  g.apeYY = lape.yy();
143 
144  auto toMicron = [&](float x) { return std::min(511, int(x * 1.e4f + 0.5f)); };
145 
146  // average angle
147  auto gvx = p.theOrigin.x() + 40.f * buffer_->commonParams().thePitchX;
148  auto gvy = p.theOrigin.y();
149  auto gvz = 1.f / p.theOrigin.z();
150  //--- Note that the normalization is not required as only the ratio used
151 
152  {
153  // calculate angles (fed into errorFromTemplates)
154  cp.cotalpha = gvx * gvz;
155  cp.cotbeta = gvy * gvz;
156 
157  errorFromTemplates(p, cp, 20000.);
158  }
159 
160 #ifdef EDM_ML_DEBUG
161  auto m = 10000.f;
162  for (float qclus = 15000; qclus < 35000; qclus += 15000) {
163  errorFromTemplates(p, cp, qclus);
164  LogDebug("PixelCPEFastParamsHost") << i << ' ' << qclus << ' ' << cp.pixmx << ' ' << m * cp.sigmax << ' '
165  << m * cp.sx1 << ' ' << m * cp.sx2 << ' ' << m * cp.sigmay << ' ' << m * cp.sy1
166  << ' ' << m * cp.sy2;
167  }
168  LogDebug("PixelCPEFastParamsHost") << i << ' ' << m * std::sqrt(lape.xx()) << ' ' << m * std::sqrt(lape.yy());
169 #endif // EDM_ML_DEBUG
170 
171  g.pixmx = std::max(0, cp.pixmx);
172  g.sx2 = toMicron(cp.sx2);
173  g.sy1 = std::max(21, toMicron(cp.sy1)); // for some angles sy1 is very small
174  g.sy2 = std::max(55, toMicron(cp.sy2)); // sometimes sy2 is smaller than others (due to angle?)
175 
176  //sample xerr as function of position
177  // moduleOffsetX is the definition of TrackerTraits::xOffset,
178  // needs to be calculated because for Phase2 the modules are not uniform
179  float moduleOffsetX = -(0.5f * float(g.nRows) + TrackerTraits::bigPixXCorrection);
180  auto const xoff = moduleOffsetX * buffer_->commonParams().thePitchX;
181 
182  for (int ix = 0; ix < pixelCPEforDevice::kNumErrorBins; ++ix) {
183  auto x = xoff * (1.f - (0.5f + float(ix)) / 8.f);
184  auto gvx = p.theOrigin.x() - x;
185  auto gvy = p.theOrigin.y();
186  auto gvz = 1.f / p.theOrigin.z();
187  cp.cotbeta = gvy * gvz;
188  cp.cotalpha = gvx * gvz;
189  errorFromTemplates(p, cp, 20000.f);
190  g.sigmax[ix] = toMicron(cp.sigmax);
191  g.sigmax1[ix] = toMicron(cp.sx1);
192  LogDebug("PixelCPEFastParamsHost") << "sigmax vs x " << i << ' ' << x << ' ' << cp.cotalpha << ' '
193  << int(g.sigmax[ix]) << ' ' << int(g.sigmax1[ix]) << ' ' << 10000.f * cp.sigmay
194  << std::endl;
195  }
196 #ifdef EDM_ML_DEBUG
197  // sample yerr as function of position
198  // moduleOffsetY is the definition of TrackerTraits::yOffset (removed)
199  float moduleOffsetY = 0.5f * float(g.nCols) + TrackerTraits::bigPixYCorrection;
200  auto const yoff = -moduleOffsetY * buffer_->commonParams().thePitchY;
201 
202  for (int ix = 0; ix < pixelCPEforDevice::kNumErrorBins; ++ix) {
203  auto y = yoff * (1.f - (0.5f + float(ix)) / 8.f);
204  auto gvx = p.theOrigin.x() + 40.f * buffer_->commonParams().thePitchY;
205  auto gvy = p.theOrigin.y() - y;
206  auto gvz = 1.f / p.theOrigin.z();
207  cp.cotbeta = gvy * gvz;
208  cp.cotalpha = gvx * gvz;
209  errorFromTemplates(p, cp, 20000.f);
210  LogDebug("PixelCPEFastParamsHost") << "sigmay vs y " << i << ' ' << y << ' ' << cp.cotbeta << ' '
211  << 10000.f * cp.sigmay << std::endl;
212  }
213 #endif // EDM_ML_DEBUG
214 
215  // calculate angles (repeated)
216  cp.cotalpha = gvx * gvz;
217  cp.cotbeta = gvy * gvz;
218  auto aveCB = cp.cotbeta;
219 
220  // sample x by charge
221  int qbin = pixelCPEforDevice::kGenErrorQBins; // low charge
222  int k = 0;
223  int qClusIncrement = 100;
224  for (int qclus = 1000; k < pixelCPEforDevice::kGenErrorQBins;
225  qclus += qClusIncrement) { //increase charge until we cover all qBin categories
226  errorFromTemplates(p, cp, qclus);
227  if (cp.qBin_ == qbin)
228  continue;
229  qbin = cp.qBin_;
230  //There are two qBin categories with low charge. Their qBins are 5 and 4 (pixelCPEforDevice::kGenErrorQBins, pixelCPEforDevice::kGenErrorQBins-1)
231  //We increment charge until qBin gets switched from 5 and then we start writing detParams as we are not interested in cases with qBin=5
232  //The problem is that with a too large qClusIncrement, we may go directly from 5 to 3, breaking the logic of the for loop
233  //Therefore, we start with lower increment (100) until we get to qBin=4
235  qClusIncrement = 1000;
236  }
237  g.xfact[k] = cp.sigmax;
238  g.yfact[k] = cp.sigmay;
239  g.minCh[k++] = qclus;
240 #ifdef EDM_ML_DEBUG
241  LogDebug("PixelCPEFastParamsHost") << i << ' ' << g.rawId << ' ' << cp.cotalpha << ' ' << qclus << ' ' << cp.qBin_
242  << ' ' << cp.pixmx << ' ' << m * cp.sigmax << ' ' << m * cp.sx1 << ' '
243  << m * cp.sx2 << ' ' << m * cp.sigmay << ' ' << m * cp.sy1 << ' ' << m * cp.sy2
244  << std::endl;
245 #endif // EDM_ML_DEBUG
246  }
247 
249 
250  // fill the rest (sometimes bin 4 is missing)
251  for (int kk = k; kk < pixelCPEforDevice::kGenErrorQBins; ++kk) {
252  g.xfact[kk] = g.xfact[k - 1];
253  g.yfact[kk] = g.yfact[k - 1];
254  g.minCh[kk] = g.minCh[k - 1];
255  }
256  auto detx = 1.f / g.xfact[0];
257  auto dety = 1.f / g.yfact[0];
258  for (int kk = 0; kk < pixelCPEforDevice::kGenErrorQBins; ++kk) {
259  g.xfact[kk] *= detx;
260  g.yfact[kk] *= dety;
261  }
262  // sample y in "angle" (estimated from cluster size)
263  float ys = 8.f - 4.f; // apperent bias of half pixel (see plot)
264  // plot: https://indico.cern.ch/event/934821/contributions/3974619/attachments/2091853/3515041/DigilessReco.pdf page 25
265  // sample yerr as function of "size"
266  for (int iy = 0; iy < pixelCPEforDevice::kNumErrorBins; ++iy) {
267  ys += 1.f; // first bin 0 is for size 9 (and size is in fixed point 2^3)
269  ys += 8.f; // last bin for "overflow"
270  // cp.cotalpha = ys*(buffer_->commonParams().thePitchX/(8.f*thickness)); // use this to print sampling in "x" (and comment the line below)
271  cp.cotbeta = std::copysign(ys * (buffer_->commonParams().thePitchY / (8.f * thickness)), aveCB);
272  errorFromTemplates(p, cp, 20000.f);
273  g.sigmay[iy] = toMicron(cp.sigmay);
274  LogDebug("PixelCPEFastParamsHost") << "sigmax/sigmay " << i << ' ' << (ys + 4.f) / 8.f << ' ' << cp.cotalpha
275  << '/' << cp.cotbeta << ' ' << 10000.f * cp.sigmax << '/' << int(g.sigmay[iy])
276  << std::endl;
277  }
278  } // loop over det
279 
280  constexpr int numberOfModulesInLadder = TrackerTraits::numberOfModulesInLadder;
281  constexpr int numberOfLaddersInBarrel = TrackerTraits::numberOfLaddersInBarrel;
282  constexpr int numberOfModulesInBarrel = TrackerTraits::numberOfModulesInBarrel;
283 
284  constexpr float ladderFactor = 1.f / float(numberOfModulesInLadder);
285 
286  constexpr int firstEndcapPos = TrackerTraits::firstEndcapPos;
287  constexpr int firstEndcapNeg = TrackerTraits::firstEndcapNeg;
288 
289  // compute ladder baricenter (only in global z) for the barrel
290  //
291  auto& aveGeom = buffer_->averageGeometry();
292  int il = 0;
293  for (int im = 0, nm = numberOfModulesInBarrel; im < nm; ++im) {
294  auto const& g = buffer_->detParams(im);
295  il = im / numberOfModulesInLadder;
296  assert(il < int(numberOfLaddersInBarrel));
297  auto z = g.frame.z();
298  aveGeom.ladderZ[il] += ladderFactor * z;
299  aveGeom.ladderMinZ[il] = std::min(aveGeom.ladderMinZ[il], z);
300  aveGeom.ladderMaxZ[il] = std::max(aveGeom.ladderMaxZ[il], z);
301  aveGeom.ladderX[il] += ladderFactor * g.frame.x();
302  aveGeom.ladderY[il] += ladderFactor * g.frame.y();
303  aveGeom.ladderR[il] += ladderFactor * sqrt(g.frame.x() * g.frame.x() + g.frame.y() * g.frame.y());
304  }
305  assert(il + 1 == int(numberOfLaddersInBarrel));
306  // add half_module and tollerance
307  constexpr float moduleLength = TrackerTraits::moduleLength;
308  constexpr float module_tolerance = 0.2f;
309  for (int il = 0, nl = numberOfLaddersInBarrel; il < nl; ++il) {
310  aveGeom.ladderMinZ[il] -= (0.5f * moduleLength - module_tolerance);
311  aveGeom.ladderMaxZ[il] += (0.5f * moduleLength - module_tolerance);
312  }
313 
314  // compute "max z" for first layer in endcap (should we restrict to the outermost ring?)
315  for (auto im = TrackerTraits::layerStart[firstEndcapPos]; im < TrackerTraits::layerStart[firstEndcapPos + 1]; ++im) {
316  auto const& g = buffer_->detParams(im);
317  aveGeom.endCapZ[0] = std::max(aveGeom.endCapZ[0], g.frame.z());
318  }
319  for (auto im = TrackerTraits::layerStart[firstEndcapNeg]; im < TrackerTraits::layerStart[firstEndcapNeg + 1]; ++im) {
320  auto const& g = buffer_->detParams(im);
321  aveGeom.endCapZ[1] = std::min(aveGeom.endCapZ[1], g.frame.z());
322  }
323  // correct for outer ring being closer
324  aveGeom.endCapZ[0] -= TrackerTraits::endcapCorrection;
325  aveGeom.endCapZ[1] += TrackerTraits::endcapCorrection;
326 #ifdef EDM_ML_DEBUG
327  for (int jl = 0, nl = numberOfLaddersInBarrel; jl < nl; ++jl) {
328  LogDebug("PixelCPEFastParamsHost") << jl << ':' << aveGeom.ladderR[jl] << '/'
329  << std::sqrt(aveGeom.ladderX[jl] * aveGeom.ladderX[jl] +
330  aveGeom.ladderY[jl] * aveGeom.ladderY[jl])
331  << ',' << aveGeom.ladderZ[jl] << ',' << aveGeom.ladderMinZ[jl] << ','
332  << aveGeom.ladderMaxZ[jl] << '\n';
333  }
334  LogDebug("PixelCPEFastParamsHost") << aveGeom.endCapZ[0] << ' ' << aveGeom.endCapZ[1];
335 #endif // EDM_ML_DEBUG
336 
337  // fill Layer and ladders geometry
338  memset(&buffer_->layerGeometry(), 0, sizeof(pixelCPEforDevice::LayerGeometryT<TrackerTraits>));
339  memcpy(buffer_->layerGeometry().layerStart,
342  memcpy(buffer_->layerGeometry().layer,
343  pixelTopology::layer<TrackerTraits>.data(),
344  pixelTopology::layer<TrackerTraits>.size());
345  buffer_->layerGeometry().maxModuleStride = pixelTopology::maxModuleStride<TrackerTraits>;
346 }
347 
348 template <typename TrackerTraits>
350  ClusterParamGeneric& theClusterParam,
351  float qclus) const {
352  float locBz = theDetParam.bz;
353  float locBx = theDetParam.bx;
354  LogDebug("PixelCPEFastParamsHost") << "PixelCPEFastParamsHost::localPosition(...) : locBz = " << locBz;
355 
356  theClusterParam.pixmx = std::numeric_limits<int>::max(); // max pixel charge for truncation of 2-D cluster
357 
358  theClusterParam.sigmay = -999.9; // CPE Generic y-error for multi-pixel cluster
359  theClusterParam.sigmax = -999.9; // CPE Generic x-error for multi-pixel cluster
360  theClusterParam.sy1 = -999.9; // CPE Generic y-error for single single-pixel
361  theClusterParam.sy2 = -999.9; // CPE Generic y-error for single double-pixel cluster
362  theClusterParam.sx1 = -999.9; // CPE Generic x-error for single single-pixel cluster
363  theClusterParam.sx2 = -999.9; // CPE Generic x-error for single double-pixel cluster
364 
365  float dummy;
366 
367  SiPixelGenError gtempl(this->thePixelGenError_);
368  int gtemplID = theDetParam.detTemplateId;
369 
370  theClusterParam.qBin_ = gtempl.qbin(gtemplID,
371  theClusterParam.cotalpha,
372  theClusterParam.cotbeta,
373  locBz,
374  locBx,
375  qclus,
376  false,
377  theClusterParam.pixmx,
378  theClusterParam.sigmay,
379  dummy,
380  theClusterParam.sigmax,
381  dummy,
382  theClusterParam.sy1,
383  dummy,
384  theClusterParam.sy2,
385  dummy,
386  theClusterParam.sx1,
387  dummy,
388  theClusterParam.sx2,
389  dummy);
390 
391  theClusterParam.sigmax = theClusterParam.sigmax * pixelCPEforDevice::micronsToCm;
392  theClusterParam.sx1 = theClusterParam.sx1 * pixelCPEforDevice::micronsToCm;
393  theClusterParam.sx2 = theClusterParam.sx2 * pixelCPEforDevice::micronsToCm;
394 
395  theClusterParam.sigmay = theClusterParam.sigmay * pixelCPEforDevice::micronsToCm;
396  theClusterParam.sy1 = theClusterParam.sy1 * pixelCPEforDevice::micronsToCm;
397  theClusterParam.sy2 = theClusterParam.sy2 * pixelCPEforDevice::micronsToCm;
398 }
399 
400 //-----------------------------------------------------------------------------
404 //-----------------------------------------------------------------------------
405 template <typename TrackerTraits>
407  ClusterParam& theClusterParamBase) const {
408  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
409 
410  if (useErrorsFromTemplates_) {
411  errorFromTemplates(theDetParam, theClusterParam, theClusterParam.theCluster->charge());
412  } else {
413  theClusterParam.qBin_ = 0;
414  }
415 
416  int q_f_X;
417  int q_l_X;
418  int q_f_Y;
419  int q_l_Y;
420  collect_edge_charges(theClusterParam, q_f_X, q_l_X, q_f_Y, q_l_Y, useErrorsFromTemplates_ && truncatePixelCharge_);
421 
422  // do GPU like ...
424 
425  cp.minRow[0] = theClusterParam.theCluster->minPixelRow();
426  cp.maxRow[0] = theClusterParam.theCluster->maxPixelRow();
427  cp.minCol[0] = theClusterParam.theCluster->minPixelCol();
428  cp.maxCol[0] = theClusterParam.theCluster->maxPixelCol();
429 
430  cp.q_f_X[0] = q_f_X;
431  cp.q_l_X[0] = q_l_X;
432  cp.q_f_Y[0] = q_f_Y;
433  cp.q_l_Y[0] = q_l_Y;
434 
435  cp.charge[0] = theClusterParam.theCluster->charge();
436 
437  auto ind = theDetParam.theDet->index();
438  pixelCPEforDevice::position<TrackerTraits>(buffer_->commonParams(), buffer_->detParams(ind), cp, 0);
439  auto xPos = cp.xpos[0];
440  auto yPos = cp.ypos[0];
441 
442  // set the error (mind ape....)
443  pixelCPEforDevice::errorFromDB<TrackerTraits>(buffer_->commonParams(), buffer_->detParams(ind), cp, 0);
444  theClusterParam.sigmax = cp.xerr[0];
445  theClusterParam.sigmay = cp.yerr[0];
446 
447  LogDebug("PixelCPEFastParamsHost") << " in PixelCPEFastParamsHost:localPosition - pos = " << xPos << " " << yPos
448  << " size " << cp.maxRow[0] - cp.minRow[0] << ' ' << cp.maxCol[0] - cp.minCol[0];
449 
450  //--- Now put the two together
451  LocalPoint pos_in_local(xPos, yPos);
452  return pos_in_local;
453 }
454 
455 //============== INFLATED ERROR AND ERRORS FROM DB BELOW ================
456 
457 //-------------------------------------------------------------------------
458 // Hit error in the local frame
459 //-------------------------------------------------------------------------
460 template <typename TrackerTraits>
462  ClusterParam& theClusterParamBase) const {
463  ClusterParamGeneric& theClusterParam = static_cast<ClusterParamGeneric&>(theClusterParamBase);
464 
465  auto xerr = theClusterParam.sigmax;
466  auto yerr = theClusterParam.sigmay;
467 
468  LogDebug("PixelCPEFastParamsHost") << " errors " << xerr << " " << yerr;
469 
470  auto xerr_sq = xerr * xerr;
471  auto yerr_sq = yerr * yerr;
472 
473  return LocalError(xerr_sq, 0, yerr_sq);
474 }
475 
476 template <typename TrackerTraits>
478  // call PixelCPEGenericBase fillPSetDescription to add common rechit errors
480 }
481 
static bool pushfile(int filenum, std::vector< SiPixelGenErrorStore > &pixelTemp, std::string dir="")
int index() const
Definition: GeomDet.h:83
const SiPixelCluster * theCluster
Definition: PixelCPEBase.h:76
int maxPixelRow() const
bool isBarrel(GeomDetEnumerators::SubDetector m)
PixelCPEFastParamsHost(edm::ParameterSet const &conf, const MagneticField *mag, const TrackerGeometry &geom, const TrackerTopology &ttopo, const SiPixelLorentzAngle *lorentzAngle, const SiPixelGenErrorDBObject *genErrorDBObject, const SiPixelLorentzAngle *lorentzAngleWidth)
The constructor.
std::vector< SiPixelGenErrorStore > thePixelGenError_
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
float float float z
constexpr uint16_t numberOfModules
constexpr int kNumErrorBins
int minPixelRow() const
int charge() const
std::enable_if_t< not std::is_array_v< T >, host_buffer< T > > make_host_buffer()
Definition: memory.h:65
constexpr float micronsToCm
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)
int minPixelCol() const
T sqrt(T t)
Definition: SSEVec.h:19
int maxPixelCol() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr T z() const
Definition: SOARotation.h:133
double f[11][100]
static void fillPSetDescription(edm::ParameterSetDescription &desc)
void errorFromTemplates(DetParam const &theDetParam, ClusterParamGeneric &theClusterParam, float qclus) const
Namespace of DDCMS conversion namespace.
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
constexpr int kGenErrorQBins
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
SOAFrame< float > Frame
const SiPixelGenErrorDBObject * genErrorDBObject_
Definition: PixelCPEBase.h:236
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
static constexpr uint32_t layerStart[numberOfLayers+1]
float x
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
SOARotation< float > Rotation
#define LogDebug(id)