CMS 3D CMS Logo

SiPixelChargeReweightingAlgorithm.cc
Go to the documentation of this file.
1 //class SiPixelChargeReweightingAlgorithm SimTracker/SiPixelDigitizer/src/SiPixelChargeReweightingAlgorithm.cc
2 
3 // Original Author Caroline Collard
4 // September 2020 : Extraction of the code for cluster charge reweighting from SiPixelDigitizerAlgorithm to a new class
5 //
6 #include <iostream>
7 #include <iomanip>
8 
10 
16 
17 #include <gsl/gsl_sf_erf.h>
19 #include "CLHEP/Random/RandGaussQ.h"
20 #include "CLHEP/Random/RandFlat.h"
21 #include "CLHEP/Random/RandGeneral.h"
22 
23 //#include "PixelIndices.h"
27 
33 
34 // Accessing dead pixel modules from the DB:
36 
38 
46 
60 
67 
68 // Geometry
72 
74 
75 using namespace edm;
76 using namespace sipixelobjects;
77 
79  // Read template files for charge reweighting
80  if (UseReweighting) {
82  es.get<SiPixel2DTemplateDBObjectRcd>().get("denominator", SiPixel2DTemp_den);
83  dbobject_den = SiPixel2DTemp_den.product();
84 
86  es.get<SiPixel2DTemplateDBObjectRcd>().get("numerator", SiPixel2DTemp_num);
87  dbobject_num = SiPixel2DTemp_num.product();
88 
89  int numOfTemplates = dbobject_den->numOfTempl() + dbobject_num->numOfTempl();
90  templateStores_.reserve(numOfTemplates);
91  SiPixelTemplate2D::pushfile(*dbobject_den, templateStores_);
92  SiPixelTemplate2D::pushfile(*dbobject_num, templateStores_);
93 
94  track.resize(6);
95  }
96 }
97 
98 //=========================================================================
99 
101  :
102 
103  templ2D(templateStores_),
104  xdouble(TXSIZE),
105  ydouble(TYSIZE),
106  IDnum(conf.exists("TemplateIDnumerator") ? conf.getParameter<int>("TemplateIDnumerator") : 0),
107  IDden(conf.exists("TemplateIDdenominator") ? conf.getParameter<int>("TemplateIDdenominator") : 0),
108 
109  UseReweighting(conf.getParameter<bool>("UseReweighting")),
110  PrintClusters(conf.getParameter<bool>("PrintClusters")),
111  PrintTemplates(conf.getParameter<bool>("PrintTemplates")) {
112  edm::LogVerbatim("PixelDigitizer ") << "SiPixelChargeReweightingAlgorithm constructed"
113  << " with UseReweighting = " << UseReweighting;
114 }
115 
116 //=========================================================================
118  LogDebug("PixelDigitizer") << "SiPixelChargeReweightingAlgorithm deleted";
119 }
120 
121 //============================================================================
122 
124  std::map<int, float, std::less<int> >& hit_signal,
125  const size_t hitIndex,
126  const unsigned int tofBin,
127  const PixelTopology* topol,
128  uint32_t detID,
129  signal_map_type& theSignal,
130  unsigned short int processType,
131  const bool& boolmakeDigiSimLinks) {
132  int irow_min = topol->nrows();
133  int irow_max = 0;
134  int icol_min = topol->ncolumns();
135  int icol_max = 0;
136 
137  float chargeBefore = 0;
138  float chargeAfter = 0;
139  signal_map_type hitSignal;
140  LocalVector direction = hit.exitPoint() - hit.entryPoint();
141 
142  for (std::map<int, float, std::less<int> >::const_iterator im = hit_signal.begin(); im != hit_signal.end(); ++im) {
143  int chan = (*im).first;
144  std::pair<int, int> pixelWithCharge = PixelDigi::channelToPixel(chan);
145 
146  hitSignal[chan] +=
147  (boolmakeDigiSimLinks ? SiPixelDigitizerAlgorithm::Amplitude((*im).second, &hit, hitIndex, tofBin, (*im).second)
148  : SiPixelDigitizerAlgorithm::Amplitude((*im).second, (*im).second));
149  chargeBefore += (*im).second;
150 
151  if (pixelWithCharge.first < irow_min)
152  irow_min = pixelWithCharge.first;
153  if (pixelWithCharge.first > irow_max)
154  irow_max = pixelWithCharge.first;
155  if (pixelWithCharge.second < icol_min)
156  icol_min = pixelWithCharge.second;
157  if (pixelWithCharge.second > icol_max)
158  icol_max = pixelWithCharge.second;
159  }
160 
161  LocalPoint hitEntryPoint = hit.entryPoint();
162 
163  float trajectoryScaleToPosition = hitEntryPoint.z() / direction.z();
164 
165  if ((hitEntryPoint.z() > 0 && direction.z() < 0) || (hitEntryPoint.z() < 0 && direction.z() > 0)) {
166  trajectoryScaleToPosition *= -1;
167  }
168 
169  LocalPoint hitPosition = hitEntryPoint + trajectoryScaleToPosition * direction;
170 
171  MeasurementPoint hitPositionPixel = topol->measurementPosition(hit.localPosition());
172  std::pair<int, int> hitPixel =
173  std::pair<int, int>(int(floor(hitPositionPixel.x())), int(floor(hitPositionPixel.y())));
174 
175  MeasurementPoint originPixel = MeasurementPoint(hitPixel.first - THX + 0.5, hitPixel.second - THY + 0.5);
176  LocalPoint origin = topol->localPosition(originPixel);
177 
178  MeasurementPoint hitEntryPointPixel = topol->measurementPosition(hit.entryPoint());
179  MeasurementPoint hitExitPointPixel = topol->measurementPosition(hit.exitPoint());
180  std::pair<int, int> entryPixel =
181  std::pair<int, int>(int(floor(hitEntryPointPixel.x())), int(floor(hitEntryPointPixel.y())));
182  std::pair<int, int> exitPixel =
183  std::pair<int, int>(int(floor(hitExitPointPixel.x())), int(floor(hitExitPointPixel.y())));
184 
185  int hitcol_min, hitcol_max, hitrow_min, hitrow_max;
186  if (entryPixel.first > exitPixel.first) {
187  hitrow_min = exitPixel.first;
188  hitrow_max = entryPixel.first;
189  } else {
190  hitrow_min = entryPixel.first;
191  hitrow_max = exitPixel.first;
192  }
193 
194  if (entryPixel.second > exitPixel.second) {
195  hitcol_min = exitPixel.second;
196  hitcol_max = entryPixel.second;
197  } else {
198  hitcol_min = entryPixel.second;
199  hitcol_max = exitPixel.second;
200  }
201 
202 #ifdef TP_DEBUG
203  LocalPoint CMSSWhitPosition = hit.localPosition();
204 
205  LogDebug("Pixel Digitizer") << "\n"
206  << "Particle ID is: " << hit.particleType() << "\n"
207  << "Process type: " << hit.processType() << "\n"
208  << "HitPosition:"
209  << "\n"
210  << "Hit entry x/y/z: " << hit.entryPoint().x() << " " << hit.entryPoint().y() << " "
211  << hit.entryPoint().z() << " "
212  << "Hit exit x/y/z: " << hit.exitPoint().x() << " " << hit.exitPoint().y() << " "
213  << hit.exitPoint().z() << " "
214 
215  << "Pixel Pos - X: " << hitPositionPixel.x() << " Y: " << hitPositionPixel.y() << "\n"
216  << "Cart.Cor. - X: " << CMSSWhitPosition.x() << " Y: " << CMSSWhitPosition.y() << "\n"
217  << "Z=0 Pos - X: " << hitPosition.x() << " Y: " << hitPosition.y() << "\n"
218 
219  << "Origin of the template:"
220  << "\n"
221  << "Pixel Pos - X: " << originPixel.x() << " Y: " << originPixel.y() << "\n"
222  << "Cart.Cor. - X: " << origin.x() << " Y: " << origin.y() << "\n"
223  << "\n"
224  << "Entry/Exit:"
225  << "\n"
226  << "Entry - X: " << hit.entryPoint().x() << " Y: " << hit.entryPoint().y()
227  << " Z: " << hit.entryPoint().z() << "\n"
228  << "Exit - X: " << hit.exitPoint().x() << " Y: " << hit.exitPoint().y()
229  << " Z: " << hit.exitPoint().z() << "\n"
230 
231  << "Entry - X Pixel: " << hitEntryPointPixel.x() << " Y Pixel: " << hitEntryPointPixel.y()
232  << "\n"
233  << "Exit - X Pixel: " << hitExitPointPixel.x() << " Y Pixel: " << hitExitPointPixel.y()
234  << "\n"
235 
236  << "row min: " << irow_min << " col min: " << icol_min << "\n";
237 #endif
238 
239  if (!(irow_min <= hitrow_max && irow_max >= hitrow_min && icol_min <= hitcol_max && icol_max >= hitcol_min)) {
240  // The clusters do not have an overlap, hence the hit is NOT reweighted
241  return false;
242  }
243 
244  float cmToMicrons = 10000.f;
245 
246  track[0] = (hitPosition.x() - origin.x()) * cmToMicrons;
247  track[1] = (hitPosition.y() - origin.y()) * cmToMicrons;
248  track[2] = 0.0f; //Middle of sensor is origin for Z-axis
249  track[3] = direction.x();
250  track[4] = direction.y();
251  track[5] = direction.z();
252 
253  array_2d pixrewgt(boost::extents[TXSIZE][TYSIZE]);
254 
255  for (int row = 0; row < TXSIZE; ++row) {
256  for (int col = 0; col < TYSIZE; ++col) {
257  pixrewgt[row][col] = 0;
258  }
259  }
260 
261  for (int row = 0; row < TXSIZE; ++row) {
262  xdouble[row] = topol->isItBigPixelInX(hitPixel.first + row - THX);
263  }
264 
265  for (int col = 0; col < TYSIZE; ++col) {
266  ydouble[col] = topol->isItBigPixelInY(hitPixel.second + col - THY);
267  }
268 
269  for (int row = 0; row < TXSIZE; ++row) {
270  for (int col = 0; col < TYSIZE; ++col) {
271  //Fill charges into 21x13 Pixel Array with hitPixel in centre
272  pixrewgt[row][col] =
273  hitSignal[PixelDigi::pixelToChannel(hitPixel.first + row - THX, hitPixel.second + col - THY)];
274  }
275  }
276 
277  if (PrintClusters) {
278  std::cout << "Cluster before reweighting: " << std::endl;
279  printCluster(pixrewgt);
280  }
281 
282  int ierr;
283  // for unirradiated: 2nd argument is IDden
284  // for irradiated: 2nd argument is IDnum
285  if (UseReweighting == true) {
286  int ID1 = dbobject_num->getTemplateID(detID);
287  int ID0 = dbobject_den->getTemplateID(detID);
288 
289  if (ID0 == ID1) {
290  return false;
291  }
292  ierr = PixelTempRewgt2D(ID0, ID1, pixrewgt);
293  } else {
294  ierr = PixelTempRewgt2D(IDden, IDden, pixrewgt);
295  }
296  if (ierr != 0) {
297 #ifdef TP_DEBUG
298  LogDebug("PixelDigitizer ") << "Cluster Charge Reweighting did not work properly.";
299 #endif
300  return false;
301  }
302 
303  if (PrintClusters) {
304  std::cout << "Cluster after reweighting: " << std::endl;
305  printCluster(pixrewgt);
306  }
307 
308  for (int row = 0; row < TXSIZE; ++row) {
309  for (int col = 0; col < TYSIZE; ++col) {
310  float charge = 0;
311  charge = pixrewgt[row][col];
312  if ((hitPixel.first + row - THX) >= 0 && (hitPixel.first + row - THX) < topol->nrows() &&
313  (hitPixel.second + col - THY) >= 0 && (hitPixel.second + col - THY) < topol->ncolumns() && charge > 0) {
314  chargeAfter += charge;
315  theSignal[PixelDigi::pixelToChannel(hitPixel.first + row - THX, hitPixel.second + col - THY)] +=
316  (boolmakeDigiSimLinks ? SiPixelDigitizerAlgorithm::Amplitude(charge, &hit, hitIndex, tofBin, charge)
318  }
319  }
320  }
321 
322  if (chargeBefore != 0. && chargeAfter == 0.) {
323  return false;
324  }
325 
326  if (PrintClusters) {
327  std::cout << std::endl;
328  std::cout << "Charges (before->after): " << chargeBefore << " -> " << chargeAfter << std::endl;
329  std::cout << "Charge loss: " << (1 - chargeAfter / chargeBefore) * 100 << " %" << std::endl << std::endl;
330  }
331 
332  return true;
333 }
334 
335 // *******************************************************************************************************
343 // *******************************************************************************************************
344 int SiPixelChargeReweightingAlgorithm::PixelTempRewgt2D(int id_in, int id_rewgt, array_2d& cluster) {
345  // Local variables
346  int i, j, k, l, kclose;
347  int nclusx, nclusy, success;
348  float xsize, ysize, q50i, q100i, q50r, q10r, q100r, xhit2D, yhit2D, qclust, dist2, dmin2;
349  float xy_in[BXM2][BYM2], xy_rewgt[BXM2][BYM2], xy_clust[TXSIZE][TYSIZE];
350  int denx_clust[TXSIZE][TYSIZE], deny_clust[TXSIZE][TYSIZE];
351  int goodWeightsUsed, nearbyWeightsUsed, noWeightsUsed;
352  float cotalpha, cotbeta;
353  // success = 0 is returned if everthing is OK
354  success = 0;
355 
356  // Copy the array to remember original charges
357  array_2d clust(cluster);
358 
359  // Take the pixel dimensions from the 2D template
360  templ2D.getid(id_in);
361  xsize = templ2D.xsize();
362  ysize = templ2D.ysize();
363 
364  // Calculate the track angles
365 
366  if (std::abs(track[5]) > 0.f) {
367  cotalpha = track[3] / track[5]; //if track[5] (direction in z) is 0 the hit is not processed by re-weighting
368  cotbeta = track[4] / track[5];
369  } else {
370  LogDebug("Pixel Digitizer") << "Reweighting angle is not good!" << std::endl;
371  return 9; //returned value here indicates that no reweighting was done in this case
372  }
373 
374  // The 2-D templates are defined on a shifted coordinate system wrt the 1D templates
375  if (ydouble[0]) {
376  yhit2D = track[1] - cotbeta * track[2] + ysize;
377  } else {
378  yhit2D = track[1] - cotbeta * track[2] + 0.5f * ysize;
379  }
380  if (xdouble[0]) {
381  xhit2D = track[0] - cotalpha * track[2] + xsize;
382  } else {
383  xhit2D = track[0] - cotalpha * track[2] + 0.5f * xsize;
384  }
385 
386  // Zero the input and output templates
387  for (i = 0; i < BYM2; ++i) {
388  for (j = 0; j < BXM2; ++j) {
389  xy_in[j][i] = 0.f;
390  xy_rewgt[j][i] = 0.f;
391  }
392  }
393 
394  // Next, interpolate the CMSSW template needed to analyze this cluster
395 
396  if (!templ2D.xytemp(id_in, cotalpha, cotbeta, xhit2D, yhit2D, ydouble, xdouble, xy_in)) {
397  success = 1;
398  }
399  if (success != 0) {
400 #ifdef TP_DEBUG
401  LogDebug("Pixel Digitizer") << "No matching template found" << std::endl;
402 #endif
403  return 2;
404  }
405 
406  if (PrintTemplates) {
407  std::cout << "Template unirrad: " << std::endl;
408  printCluster(xy_in);
409  }
410 
411  q50i = templ2D.s50();
412  //q50i = 0;
413  q100i = 2.f * q50i;
414 
415  // Check that the cluster container is a 13x21 matrix
416 
417  if (cluster.num_dimensions() != 2) {
418  LogWarning("Pixel Digitizer") << "Cluster is not 2-dimensional. Return." << std::endl;
419  return 3;
420  }
421  nclusx = (int)cluster.shape()[0];
422  nclusy = (int)cluster.shape()[1];
423  if (nclusx != TXSIZE || xdouble.size() != TXSIZE) {
424  LogWarning("Pixel Digitizer") << "Sizes in x do not match: nclusx=" << nclusx << " xdoubleSize=" << xdouble.size()
425  << " TXSIZE=" << TXSIZE << ". Return." << std::endl;
426  return 4;
427  }
428  if (nclusy != TYSIZE || ydouble.size() != TYSIZE) {
429  LogWarning("Pixel Digitizer") << "Sizes in y do not match. Return." << std::endl;
430  return 5;
431  }
432 
433  // Sum initial charge in the cluster
434 
435  qclust = 0.f;
436  for (i = 0; i < TYSIZE; ++i) {
437  for (j = 0; j < TXSIZE; ++j) {
438  xy_clust[j][i] = 0.f;
439  denx_clust[j][i] = 0;
440  deny_clust[j][i] = 0;
441  if (cluster[j][i] > q100i) {
442  qclust += cluster[j][i];
443  }
444  }
445  }
446 
447  // Next, interpolate the physical output template needed to reweight
448 
449  if (!templ2D.xytemp(id_rewgt, cotalpha, cotbeta, xhit2D, yhit2D, ydouble, xdouble, xy_rewgt)) {
450  success = 1;
451  }
452 
453  if (PrintTemplates) {
454  std::cout << "Template irrad: " << std::endl;
455  printCluster(xy_rewgt);
456  }
457 
458  q50r = templ2D.s50();
459  q100r = 2.f * q50r;
460  q10r = 0.2f * q50r;
461 
462  // Find all non-zero denominator pixels in the input template and generate "inside" weights
463 
464  int ntpix = 0;
465  int ncpix = 0;
466  std::vector<int> ytclust;
467  std::vector<int> xtclust;
468  std::vector<int> ycclust;
469  std::vector<int> xcclust;
470  qclust = 0.f;
471  for (i = 0; i < TYSIZE; ++i) {
472  for (j = 0; j < TXSIZE; ++j) {
473  if (xy_in[j + 1][i + 1] > q100i) {
474  ++ntpix;
475  ytclust.push_back(i);
476  xtclust.push_back(j);
477  xy_clust[j][i] = xy_rewgt[j + 1][i + 1] / xy_in[j + 1][i + 1];
478  denx_clust[j][i] = j;
479  deny_clust[j][i] = i;
480  }
481  }
482  }
483 
484  // Find all non-zero numerator pixels not matched to denominator in the output template and generate "inside" weights
485 
486  for (i = 0; i < TYSIZE; ++i) {
487  for (j = 0; j < TXSIZE; ++j) {
488  if (xy_rewgt[j + 1][i + 1] > q10r && xy_clust[j][i] == 0.f && ntpix > 0) {
489  // Search for nearest denominator pixel
490  dmin2 = 10000.f;
491  kclose = 0;
492  for (k = 0; k < ntpix; ++k) {
493  dist2 = (i - ytclust[k]) * (i - ytclust[k]) + 0.44444f * (j - xtclust[k]) * (j - xtclust[k]);
494  if (dist2 < dmin2) {
495  dmin2 = dist2;
496  kclose = k;
497  }
498  }
499  xy_clust[j][i] = xy_rewgt[j + 1][i + 1] / xy_in[xtclust[kclose] + 1][ytclust[kclose] + 1];
500  denx_clust[j][i] = xtclust[kclose];
501  deny_clust[j][i] = ytclust[kclose];
502  }
503  }
504  }
505 
506  if (PrintTemplates) {
507  std::cout << "Weights:" << std::endl;
508  printCluster(xy_clust);
509  }
510 
511  // Do the reweighting
512  goodWeightsUsed = 0;
513  nearbyWeightsUsed = 0;
514  noWeightsUsed = 0;
515 
516  for (i = 0; i < TYSIZE; ++i) {
517  for (j = 0; j < TXSIZE; ++j) {
518  if (xy_clust[j][i] > 0.f) {
519  cluster[j][i] = xy_clust[j][i] * clust[denx_clust[j][i]][deny_clust[j][i]];
520  if (cluster[j][i] > q100r) {
521  qclust += cluster[j][i];
522  }
523  if (cluster[j][i] > 0) {
524  goodWeightsUsed++;
525  }
526  } else {
527  if (clust[j][i] > 0.f) {
528  ++ncpix;
529  ycclust.push_back(i);
530  xcclust.push_back(j);
531  }
532  }
533  }
534  }
535 
536  // Now reweight pixels outside of template footprint using closest weights
537 
538  if (ncpix > 0) {
539  for (l = 0; l < ncpix; ++l) {
540  i = ycclust[l];
541  j = xcclust[l];
542  dmin2 = 10000.f;
543  kclose = 0;
544  for (k = 0; k < ntpix; ++k) {
545  dist2 = (i - ytclust[k]) * (i - ytclust[k]) + 0.44444f * (j - xtclust[k]) * (j - xtclust[k]);
546  if (dist2 < dmin2) {
547  dmin2 = dist2;
548  kclose = k;
549  }
550  }
551  if (dmin2 < 5.f) {
552  nearbyWeightsUsed++;
553  cluster[j][i] *= xy_clust[xtclust[kclose]][ytclust[kclose]];
554  if (cluster[j][i] > q100r) {
555  qclust += cluster[j][i];
556  }
557  } else {
558  noWeightsUsed++;
559  cluster[j][i] = 0.f;
560  }
561  }
562  }
563 
564  return success;
565 } // PixelTempRewgt2D
566 
568  for (int col = 0; col < TYSIZE; ++col) {
569  for (int row = 0; row < TXSIZE; ++row) {
570  std::cout << std::setw(10) << std::setprecision(0) << std::fixed;
571  std::cout << cluster[row][col];
572  }
573  std::cout << std::endl;
574  }
575  std::cout.copyfmt(std::ios(nullptr));
576 }
577 
579  for (int col = 0; col < BYM2; ++col) {
580  for (int row = 0; row < BXM2; ++row) {
581  std::cout << std::setw(10) << std::setprecision(0) << std::fixed;
582  std::cout << arr[row][col];
583  }
584  std::cout << std::endl;
585  }
586  std::cout.copyfmt(std::ios(nullptr));
587 }
588 
590  for (int col = 0; col < TYSIZE; ++col) {
591  for (int row = 0; row < TXSIZE; ++row) {
592  std::cout << std::setw(10) << std::fixed;
593  std::cout << arr[row][col];
594  }
595  std::cout << std::endl;
596  }
597  std::cout.copyfmt(std::ios(nullptr));
598 }
Vector3DBase< float, LocalTag >
SiPixelTemplate2D::xsize
float xsize()
pixel x-size (microns)
Definition: SiPixelTemplate2D.h:266
FEDNumbering.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
Point2DBase
Definition: Point2DBase.h:9
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
electrons_cff.bool
bool
Definition: electrons_cff.py:393
SiPixelTemplate2D::xytemp
bool xytemp(float xhit, float yhit, bool ydouble[21+2], bool xdouble[13+2], float template2d[13+2][21+2], bool dervatives, float dpdx2d[2][13+2][21+2], float &QTemplate)
Definition: SiPixelTemplate2D.cc:1016
mps_fire.i
i
Definition: mps_fire.py:428
PixelSubdetector.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
SiPixel2DTemplateDBObject.h
MessageLogger.h
TrackerGeometry.h
SiPixelChargeReweightingAlgorithm::dbobject_num
const SiPixel2DTemplateDBObject * dbobject_num
Definition: SiPixelChargeReweightingAlgorithm.h:77
SiPixel2DTemplateDBObjectRcd
Definition: SiPixel2DTemplateDBObjectRcd.h:24
hit::y
double y
Definition: SiStripHitEffFromCalibTree.cc:90
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
SiPixelSimParameters_cfi.PrintTemplates
PrintTemplates
Definition: SiPixelSimParameters_cfi.py:53
SiPixelChargeReweightingAlgorithm::signal_map_type
std::map< int, SiPixelDigitizerAlgorithm::Amplitude, std::less< int > > signal_map_type
Definition: SiPixelChargeReweightingAlgorithm.h:42
edm
HLT enums.
Definition: AlignableModifier.h:19
RandomNumberGenerator.h
SiPixelChargeReweightingAlgorithm::templ2D
SiPixelTemplate2D templ2D
Definition: SiPixelChargeReweightingAlgorithm.h:64
cuy.col
col
Definition: cuy.py:1010
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PSimHitContainer.h
THX
#define THX
Definition: SiPixelTemplateDefs.h:31
SiPixelFEDChannelContainer.h
SiPixelTemplate2D::getid
bool getid(int id)
Definition: SiPixelTemplate2D.cc:569
SiPixelChargeReweightingAlgorithm::PixelTempRewgt2D
int PixelTempRewgt2D(int id_gen, int id_rewgt, array_2d &cluster)
Definition: SiPixelChargeReweightingAlgorithm.cc:344
GlobalPixel.h
SiPixelSimParameters_cfi.PrintClusters
PrintClusters
Definition: SiPixelSimParameters_cfi.py:52
SiPixelChargeReweightingAlgorithm::init
void init(const edm::EventSetup &es)
Definition: SiPixelChargeReweightingAlgorithm.cc:78
ysize
const Int_t ysize
Definition: trackSplitPlot.h:43
SiPixelFedCablingMap.h
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
SiPixelLorentzAngleSimRcd.h
SiPixelChargeReweightingAlgorithm::UseReweighting
const bool UseReweighting
Definition: SiPixelChargeReweightingAlgorithm.h:70
PixelDigi.h
SiPixelFedCablingTree.h
SiPixelGainCalibrationOfflineSimService.h
xsize
const Int_t xsize
Definition: trackSplitPlot.h:42
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
GaussianTailNoiseGenerator.h
TXSIZE
#define TXSIZE
Definition: SiPixelTemplateDefs.h:30
SiPixelChargeReweightingAlgorithm::SiPixelChargeReweightingAlgorithm
SiPixelChargeReweightingAlgorithm(const edm::ParameterSet &conf)
Definition: SiPixelChargeReweightingAlgorithm.cc:100
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
SiG4UniversalFluctuation.h
PixelTopology::isItBigPixelInX
virtual bool isItBigPixelInX(int ixbin) const =0
TrackerTopology.h
SiPixelChargeReweightingAlgorithm::hitSignalReweight
bool hitSignalReweight(const PSimHit &hit, std::map< int, float, std::less< int > > &hit_signal, const size_t hitIndex, const unsigned int tofBin, const PixelTopology *topol, uint32_t detID, signal_map_type &theSignal, unsigned short int processType, const bool &boolmakeDigiSimLinks)
Definition: SiPixelChargeReweightingAlgorithm.cc:123
SiPixelTemplate2D::s50
float s50()
1/2 of the pixel threshold signal in adc units
Definition: SiPixelTemplate2D.h:210
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
BYM2
#define BYM2
Definition: SiPixelTemplateDefs.h:28
SiPixelChargeReweightingAlgorithm::xdouble
std::vector< bool > xdouble
Definition: SiPixelChargeReweightingAlgorithm.h:65
SiPixelQualityRcd.h
SiPixelChargeReweightingAlgorithm::PrintTemplates
const bool PrintTemplates
Definition: SiPixelChargeReweightingAlgorithm.h:72
Service.h
sipixelobjects
Definition: CablingPathToDetUnit.h:4
BXM2
#define BXM2
Definition: SiPixelTemplateDefs.h:36
edm::ESHandle
Definition: DTSurvey.h:22
SiPixelChargeReweightingAlgorithm::ydouble
std::vector< bool > ydouble
Definition: SiPixelChargeReweightingAlgorithm.h:66
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
PixelTopology::ncolumns
virtual int ncolumns() const =0
dqmdumpme.k
k
Definition: dqmdumpme.py:60
SiPixelDynamicInefficiencyRcd.h
PixelDigi::pixelToChannel
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:71
Point3DBase< float, LocalTag >
PixelTopology
Definition: PixelTopology.h:10
SiPixelFedCabling.h
SiPixelChargeReweightingAlgorithm::track
std::vector< float > track
Definition: SiPixelChargeReweightingAlgorithm.h:67
hit::z
double z
Definition: SiStripHitEffFromCalibTree.cc:91
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
MeasurementPoint
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Definition: MeasurementPoint.h:12
TrackerDigiGeometryRecord.h
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
HIPAlignmentAlgorithm_cfi.UseReweighting
UseReweighting
Definition: HIPAlignmentAlgorithm_cfi.py:61
PixelROC.h
CablingPathToDetUnit.h
SiPixel2DTemplateDBObject::getTemplateID
short getTemplateID(const uint32_t &detid) const
Definition: SiPixel2DTemplateDBObject.h:90
SiPixelFedCablingMapRcd.h
PV2DBase::y
T y() const
Definition: PV2DBase.h:44
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:671
PixelTopology::isItBigPixelInY
virtual bool isItBigPixelInY(int iybin) const =0
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
TYSIZE
#define TYSIZE
Definition: SiPixelTemplateDefs.h:21
LocalPixel.h
SiPixelChargeReweightingAlgorithm::printCluster
void printCluster(array_2d &cluster)
Definition: SiPixelChargeReweightingAlgorithm.cc:567
SiPixelQualityProbabilities.h
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:57
SiPixelChargeReweightingAlgorithm::array_2d
boost::multi_array< float, 2 > array_2d
Definition: SiPixelChargeReweightingAlgorithm.h:61
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
SiPixelChargeReweightingAlgorithm::IDden
int IDden
Definition: SiPixelChargeReweightingAlgorithm.h:68
PixelIndices.h
SiPixelChargeReweightingAlgorithm::~SiPixelChargeReweightingAlgorithm
~SiPixelChargeReweightingAlgorithm()
Definition: SiPixelChargeReweightingAlgorithm.cc:117
SiPixelTemplate2D::ysize
float ysize()
pixel y-size (microns)
Definition: SiPixelTemplate2D.h:267
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
THY
#define THY
Definition: SiPixelTemplateDefs.h:22
SiPixelChargeReweightingAlgorithm.h
LaserClient_cfi.Amplitude
Amplitude
Definition: LaserClient_cfi.py:39
SiPixelDynamicInefficiency.h
SiPixel2DTemplateDBObjectRcd.h
DetId.h
SiPixelStatusScenariosRcd.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
officialStyle.chan
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
Definition: officialStyle.py:106
PixelGeomDetUnit.h
SiPixelLorentzAngle.h
Exception.h
SiPixelQuality.h
PileupMixingContent.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SimTrack.h
ParameterSet.h
PSimHit
Definition: PSimHit.h:15
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
SiPixelChargeReweightingAlgorithm::PrintClusters
const bool PrintClusters
Definition: SiPixelChargeReweightingAlgorithm.h:71
SiPixel2DTemplateDBObject::numOfTempl
int numOfTempl() const
Definition: SiPixel2DTemplateDBObject.h:62
PixelTopology::nrows
virtual int nrows() const =0
SiPixelStatusScenarioProbabilityRcd.h
SiPixelTemplate2D::pushfile
static bool pushfile(int filenum, std::vector< SiPixelTemplateStore2D > &pixelTemp, std::string dir="CalibTracker/SiPixelESProducers/data/")
Definition: SiPixelTemplate2D.cc:61
PixelFEDCabling.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88
SiPixelChargeReweightingAlgorithm::dbobject_den
const SiPixel2DTemplateDBObject * dbobject_den
Definition: SiPixelChargeReweightingAlgorithm.h:76
PixelDigi::channelToPixel
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:65
SiPixelFrameReverter.h