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