CMS 3D CMS Logo

SiPixelCoordinates.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Class: SiPixelCoordinates
4 //
5 // Implementations of the class
6 //
7 // Original Author: Janos Karancsi
8 
10 
19 
20 #include <boost/range/irange.hpp>
21 
22 // _________________________________________________________
23 // Constructors, destructor
25 
27 
29 
30 
31 // _________________________________________________________
32 // init, called in the beginning of each event
34  // Get CablingMap (used for ROC number)
35  edm::ESHandle<SiPixelFedCablingMap> cablingMapHandle;
36  iSetup.get<SiPixelFedCablingMapRcd>().get(cablingMapHandle);
37  cablingMap_ = cablingMapHandle.product();
39 
40  // Get TrackerTopology
41  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
42  iSetup.get<TrackerTopologyRcd>().get(trackerTopologyHandle);
43  tTopo_ = trackerTopologyHandle.product();
44 
45  // Get TrackerGeometry
46  edm::ESHandle<TrackerGeometry> trackerGeometryHandle;
47  iSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometryHandle);
48  tGeom_ = trackerGeometryHandle.product();
49 
50  // If not specified, determine from the geometry
51  if (phase_==-1) {
52  if (tGeom_ -> isThere(GeomDetEnumerators::PixelBarrel) &&
54  phase_ = 0;
55  else if (tGeom_ -> isThere(GeomDetEnumerators::P1PXB) &&
57  phase_ = 1;
58  else if (tGeom_ -> isThere(GeomDetEnumerators::P1PXB) &&
60  phase_ = 2;
61  }
62 }
63 
64 // _________________________________________________________
65 // Offline/Online variables from TrackerTopology
66 // and pixel naming classes
67 
68 // Taken from pixel naming classes
69 // BmO (-z-x) = 1, BmI (-z+x) = 2 , BpO (+z-x) = 3 , BpI (+z+x) = 4
71  if (quadrant_.count(detid.rawId())) return quadrant_[detid.rawId()];
72  if (!isPixel_(detid)) return quadrant_[detid.rawId()] = -9999;
74  return quadrant_[detid.rawId()] = PixelBarrelName(detid, tTopo_, phase_).shell();
75  else
76  return quadrant_[detid.rawId()] = PixelEndcapName(detid, tTopo_, phase_).halfCylinder();
77 }
78 
79 // Taken from Pixel naming class for barrel
80 // and TrackerTopology for endcap
81 // BmO/BmI = 1, BpO/BpI = 2
82 int SiPixelCoordinates::side(const DetId& detid) {
83  if (side_.count(detid.rawId())) return side_[detid.rawId()];
84  if (!isPixel_(detid)) return side_[detid.rawId()] = -9999;
86  return side_[detid.rawId()] = 1 + (quadrant(detid)>2);
87  else
88  return side_[detid.rawId()] = tTopo_->pxfSide(detid);
89 }
90 
91 // Offline module convention taken from TrackerTopology
92 int SiPixelCoordinates::module(const DetId& detid) {
93  if (module_.count(detid.rawId())) return module_[detid.rawId()];
94  if (!isPixel_(detid)) return module_[detid.rawId()] = -9999;
96  return module_[detid.rawId()] = tTopo_->pxbModule(detid.rawId());
97  else
98  return module_[detid.rawId()] = tTopo_->pxfModule(detid.rawId());
99 }
100 
101 // Taken from TrackerTopology
102 int SiPixelCoordinates::layer(const DetId& detid) {
103  if (layer_.count(detid.rawId())) return layer_[detid.rawId()];
104  if (!isBPix_(detid)) return layer_[detid.rawId()] = -9999;
105  return layer_[detid.rawId()] = tTopo_->pxbLayer(detid);
106 }
107 
108 // Taken from pixel naming class for barrel
110  if (sector_.count(detid.rawId())) return sector_[detid.rawId()];
111  if (!isBPix_(detid)) return sector_[detid.rawId()] = -9999;
112  return sector_[detid.rawId()] = PixelBarrelName(detid, tTopo_, phase_).sectorName();
113 }
114 
115 // Offline ladder convention taken from TrackerTopology
117  if (ladder_.count(detid.rawId())) return ladder_[detid.rawId()];
118  if (!isBPix_(detid)) return ladder_[detid.rawId()] = -9999;
119  return ladder_[detid.rawId()] = tTopo_->pxbLadder(detid);
120 }
121 
122 // Online ladder convention taken from pixel naming class for barrel
123 // Apply sign convention (- sign for BmO and BpO)
125  if (signed_ladder_.count(detid.rawId())) return signed_ladder_[detid.rawId()];
126  if (!isBPix_(detid)) return signed_ladder_[detid.rawId()] = -9999;
128  if (quadrant(detid)%2) signed_ladder *= -1;
129  return signed_ladder_[detid.rawId()] = signed_ladder;
130 }
131 
132 // Online mdoule convention taken from pixel naming class for barrel
133 // Apply sign convention (- sign for BmO and BmI)
135  if (signed_module_.count(detid.rawId())) return signed_module_[detid.rawId()];
136  if (!isBPix_(detid)) return signed_module_[detid.rawId()] = -9999;
138  if (quadrant(detid)<3) signed_module *= -1;
139  return signed_module_[detid.rawId()] = signed_module;
140 }
141 
142 // Half ladders taken from pixel naming class
143 int SiPixelCoordinates::half(const DetId& detid) {
144  if (half_.count(detid.rawId())) return half_[detid.rawId()];
145  if (!isBPix_(detid)) return half_[detid.rawId()] = -9999;
146  return half_[detid.rawId()] = PixelBarrelName(detid, tTopo_, phase_).isHalfModule();
147 }
148 
149 // Using TrackerTopology
150 // Ladders have a staggered structure
151 // Non-flipped ladders are on the outer radius
152 // Phase 0: Outer ladders are odd for layer 1,3 and even for layer 2
153 // Phase 1: Outer ladders are odd for layer 4 and even for layer 1,2,3
154 int SiPixelCoordinates::outer(const DetId& detid) {
155  if (outer_.count(detid.rawId())) return outer_[detid.rawId()];
156  if (!isBPix_(detid)) return outer_[detid.rawId()] = -9999;
157  int outer = -9999;
158  int layer = tTopo_->pxbLayer(detid.rawId());
159  bool odd_ladder = tTopo_->pxbLadder(detid.rawId())%2;
160  if (phase_ == 0) {
161  if (layer==2) outer = !odd_ladder;
162  else outer = odd_ladder;
163  } else if (phase_ == 1) {
164  if (layer==4) outer = odd_ladder;
165  else outer = !odd_ladder;
166  }
167  return outer_[detid.rawId()] = outer;
168 }
169 
170 // Using outer() method
171 // We call ladders in the inner radius flipped (see above)
173  if (flipped_.count(detid.rawId())) return flipped_[detid.rawId()];
174  if (!isBPix_(detid)) return flipped_[detid.rawId()] = -9999;
175  int flipped = -9999;
176  if (phase_ < 2) flipped = outer(detid)==0;
177  return flipped_[detid.rawId()] = flipped;
178 }
179 
180 // Offline disk convention taken from TrackerTopology
181 int SiPixelCoordinates::disk(const DetId& detid) {
182  if (disk_.count(detid.rawId())) return disk_[detid.rawId()];
183  if (!isFPix_(detid)) return disk_[detid.rawId()] = -9999;
184  return disk_[detid.rawId()] = tTopo_->pxfDisk(detid);
185 }
186 
187 // Online disk convention
188 // Apply sign convention (- sign for BmO and BmI)
190  if (signed_disk_.count(detid.rawId())) return signed_disk_[detid.rawId()];
191  if (!isFPix_(detid)) return signed_disk_[detid.rawId()] = -9999;
192  int signed_disk = disk(detid);
193  if (quadrant(detid)<3) signed_disk *= -1;
194  return signed_disk_[detid.rawId()] = signed_disk;
195 }
196 
197 // Taken from TrackerTopology
198 int SiPixelCoordinates::panel(const DetId& detid) {
199  if (panel_.count(detid.rawId())) return panel_[detid.rawId()];
200  if (!isFPix_(detid)) return panel_[detid.rawId()] = -9999;
201  return panel_[detid.rawId()] = tTopo_->pxfPanel(detid);
202 }
203 
204 // Phase 0: Ring was not an existing convention
205 // but the 7 plaquettes were split by HV group
206 // --> Derive Ring 1/2 for them
207 // Panel 1 plq 1-2, Panel 2, plq 1 = Ring 1
208 // Panel 1 plq 3-4, Panel 2, plq 2-3 = Ring 2
209 // Phase 1: Using pixel naming class for endcap
210 int SiPixelCoordinates::ring(const DetId& detid) {
211  if (ring_.count(detid.rawId())) return ring_[detid.rawId()];
212  if (!isFPix_(detid)) return ring_[detid.rawId()] = -9999;
213  int ring = -9999;
214  if (phase_==0) {
215  ring = 1 + (panel(detid)+module(detid)>3);
216  } else if (phase_==1) {
217  ring = PixelEndcapName(detid, tTopo_, phase_).ringName();
218  }
219  return ring_[detid.rawId()] = ring;
220 }
221 
222 // Offline blade convention taken from TrackerTopology
223 int SiPixelCoordinates::blade(const DetId& detid) {
224  if (blade_.count(detid.rawId())) return blade_[detid.rawId()];
225  if (!isFPix_(detid)) return blade_[detid.rawId()] = -9999;
226  return blade_[detid.rawId()] = tTopo_->pxfBlade(detid);
227 }
228 
229 // Online blade convention taken from pixel naming class for endcap
230 // Apply sign convention (- sign for BmO and BpO)
232  if (signed_blade_.count(detid.rawId())) return signed_blade_[detid.rawId()];
233  if (!isFPix_(detid)) return signed_blade_[detid.rawId()] = -9999;
235  if (quadrant(detid)%2) signed_blade *= -1;
236  return signed_blade_[detid.rawId()] = signed_blade;
237 }
238 
239 // Get the FED number using the cabling map
240 unsigned int SiPixelCoordinates::fedid(const DetId& detid) {
241  if (fedid_.count(detid.rawId())) return fedid_[detid.rawId()];
242  if (!isPixel_(detid)) return fedid_[detid.rawId()] = 9999;
243  unsigned int fedid = 9999;
244  for(auto& fedId : cablingMap_->fedIds()) {
246  fedid=fedId;
247  break;
248  }
249  }
250  return fedid_[detid.rawId()] = fedid;
251 }
252 
253 
254 // _________________________________________________________
255 // Private methods
257  if (detid.det() != DetId::Tracker) return false;
258  if (detid.subdetId() == PixelSubdetector::PixelBarrel) return true;
259  if (detid.subdetId() == PixelSubdetector::PixelEndcap) return true;
260  return false;
261 }
262 bool SiPixelCoordinates::isBPix_(const DetId& detid) {
263  if (detid.det() != DetId::Tracker) return false;
264  if (detid.subdetId() == PixelSubdetector::PixelBarrel) return true;
265  return false;
266 }
267 bool SiPixelCoordinates::isFPix_(const DetId& detid) {
268  if (detid.det() != DetId::Tracker) return false;
269  if (detid.subdetId() == PixelSubdetector::PixelEndcap) return true;
270  return false;
271 }
272 
273 std::pair<int, int> SiPixelCoordinates::pixel_(const PixelDigi* digi) {
274  return std::make_pair(digi->row(), digi->column());
275 }
276 std::pair<int, int> SiPixelCoordinates::pixel_(const SiPixelCluster* cluster) {
277  // Cluster positions are already shifted by 0.5
278  // We remove this and add back later (for all pixels)
279  // The aim is to get the offline row/col number of the pixel
280  int row = cluster->x()-0.5, col = cluster->y()-0.5;
281  return std::make_pair(row, col);
282 }
283 std::pair<int, int> SiPixelCoordinates::pixel_(const SiPixelRecHit* rechit) {
284  // Convert RecHit local position to local pixel using Topology
285  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(rechit->detUnit());
286  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
287  std::pair<float, float> pixel = topo->pixel(rechit->localPosition());
288  // We could leave it like this, but it's better to constrain pixel to be on the module
289  // Also truncate floating point to int (similar to digis)
290  int row = std::max(0, std::min(topo->nrows()-1, (int)pixel.first));
291  int col = std::max(0, std::min(topo->ncolumns()-1, (int)pixel.second));
292  return std::make_pair(row, col);
293 }
294 
295 float SiPixelCoordinates::xcoord_on_module_(const DetId& detid, const std::pair<int, int>& pixel) {
296  int nrows = 160;
297  // Leave it hard-coded for phase 0/1, read from geometry for phase 2
298  // no special treatment needed here for phase 0 1x8, 1x5 and 1x2 modules either
299  // because we do not want to scale coordinates (only shift if needed)
300  if (phase_==2) {
301  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
302  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
303  nrows = topo->nrows();
304  }
305  // Shift to the middle of the pixel, for precision binning
306  return (pixel.first+0.5)/nrows;
307 }
308 
309 float SiPixelCoordinates::ycoord_on_module_(const DetId& detid, const std::pair<int, int>& pixel) {
310  int ncols = 416;
311  // Leave it hard-coded for phase 0/1, read from geometry for phase 2
312  if (phase_==2) {
313  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
314  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
315  ncols = topo->ncolumns();
316  }
317  else if (phase_==0 && isFPix_(detid)) {
318  // Always use largest length for Phase 0 FPix modules (1x5 and 2x5)
319  // because we do not want to scale coordinates so ROC size remains fixed
320  // and only shifts are needed
321  ncols = 260;
322  }
323  // Shift to the middle of the pixel, for precision binning
324  return (pixel.second+0.5)/ncols;
325 }
326 
327 // _________________________________________________________
328 // Online Link and ROC number
329 
330 // Get the FED channel (link) number
331 // Link may depend on the TBM side of the module
332 // so pixel location is needed
333 // Using the cabling map works for all detectors
334 // Taken from DQM/SiPixelMonitorClient/src/SiPixelInformationExtractor.cc
335 int SiPixelCoordinates::channel(const DetId& detid, const std::pair<int, int>& pixel) {
336  if (!isPixel_(detid)) return -9999;
337  // The method below may be slow when looping on a lot of pixels, so let's try to speed it up
338  // by quickly chategorizing pixels to ROC coordinates inside det units
339  int rowsperroc = 80, colsperroc = 52;
340  if (phase_==2) {
341  // Can get roc info from Geometry for Phase 2, this will need to be specified when it's final
342  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
343  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
344  rowsperroc = topo->rowsperroc();
345  colsperroc = topo->colsperroc();
346  }
347  // It is unlikely a ROC would have more than 256 chips, so let's use this formula
348  // If a ROC number was ever found, then binary search in a map will be much quicker
349  uint64_t pseudo_roc_num = uint64_t(1<<16) * detid.rawId() + (1<<8) * (pixel.first/rowsperroc) + pixel.second/colsperroc;
350  if (channel_.count(pseudo_roc_num)) return channel_[pseudo_roc_num];
351  // If not found previously, get the channel number
352  unsigned int fedId = fedid(detid);
354  sipixelobjects::DetectorIndex detector = { detid.rawId(), pixel.first, pixel.second };
356  converter.toCabling(cabling, detector);
357  // Time consuming part is over, so let's save the roc number too
358  const sipixelobjects::PixelROC *theRoc = converter.toRoc(cabling.link, cabling.roc);
359  int roc = theRoc->idInDetUnit();
360  if (detid.subdetId() == PixelSubdetector::PixelBarrel && side(detid)==1 && half(detid)) roc += 8;
361  roc_[pseudo_roc_num] = roc;
362  //printf ("Online FED, LNK, LNKID, ROC: %2d %2d %2d %2d - Offline RAWID, ROW, COL: %9d [%3d,%3d] [%3d,%3d]\n",
363  // fedId, cabling.link, cabling.roc, roc, detid.rawId(),
364  // (pixel.first /rowsperroc)*rowsperroc, (pixel.first /rowsperroc+1)*rowsperroc-1,
365  // (pixel.second/colsperroc)*colsperroc, (pixel.second/colsperroc+1)*colsperroc-1);
366  return channel_[pseudo_roc_num] = cabling.link;
367 }
368 int SiPixelCoordinates::channel(const DetId& detid, const PixelDigi* digi) {
369  if (!isPixel_(detid)) return -9999;
370  return channel(detid, pixel_(digi));
371 }
372 int SiPixelCoordinates::channel(const DetId& detid, const SiPixelCluster* cluster) {
373  if (!isPixel_(detid)) return -9999;
374  return channel(detid, pixel_(cluster));
375 }
377  if (!isPixel_(rechit->geographicalId())) return -9999;
378  return channel(rechit->geographicalId(), pixel_(rechit));
379 }
381  if (!isPixel_(rechit->geographicalId())) return -9999;
382  return channel(static_cast<const SiPixelRecHit*>(rechit->hit()));
383 }
384 
385 
386 // Using the cabling map works for all detectors
387 // Taken from DQM/SiPixelMonitorClient/src/SiPixelInformationExtractor.cc
388 // Although using coordinates (only available for Phase 0/1) is much faster
389 // The advantage is very visible when running on smaller statistics
390 // because the map will speed it up greatly after high enough ROCs were sampled
391 // The coordinate method is validated to give the same result as the cabling map
392 // Example for the barrel:
393 // ROC number is read out in a U shape from ROC 0 to 15 (or maxroc)
394 // row [80-159] col [0-51] is always ROC 0 on the +Z side of the barrel
395 // Both coordinates are mirrored on the -Z side (180 deg rotation effectively)
396 // -Z 8 9 10 11 12 13 14 15 +Z 0 1 2 3 4 5 6 7
397 // (0,0) 7 6 5 4 3 2 1 0 (0,0) 15 14 13 12 11 10 9 8
398 // Half modules on the -Z side should consider the second row of ROCs instead, etc. see below
399 int SiPixelCoordinates::roc(const DetId& detid, const std::pair<int, int>& pixel) {
400  if (!isPixel_(detid)) return -9999;
401  // The method below may be slow when looping on a lot of pixels, so let's try to speed it up
402  // by quickly chategorizing pixels to ROC coordinates inside det units
403  int rowsperroc = 80, colsperroc = 52;
404  if (phase_==2) {
405  // Can get roc info from Geometry for Phase 2, this will need to be specified when it's final
406  const PixelGeomDetUnit* detUnit = static_cast<const PixelGeomDetUnit*>(tGeom_->idToDetUnit(detid));
407  const PixelTopology* topo = static_cast<const PixelTopology*>(&detUnit->specificTopology());
408  rowsperroc = topo->rowsperroc();
409  colsperroc = topo->colsperroc();
410  }
411  // It is unlikely a ROC would have more than 256 chips, so let's use this formula
412  // If a ROC number was ever found, then binary search in a map will be much quicker
413  uint64_t pseudo_roc_num = uint64_t(1<<16) * detid.rawId() + (1<<8) * (pixel.first/rowsperroc) + pixel.second/colsperroc;
414  if (roc_.count(pseudo_roc_num)) return roc_[pseudo_roc_num];
415  // If not found previously, get the ROC number
416  int roc = -9999;
417  // Use the Fed Cabling Map if specified by the bool
418  // or if using channel number too, or if it's the Phase 2 detector
419  if (phase_==2||!channel_.empty()) {
420  unsigned int fedId = fedid(detid);
422  sipixelobjects::DetectorIndex detector = { detid.rawId(), pixel.first, pixel.second };
424  converter.toCabling(cabling, detector);
425  // Time consuming part is over, so let's save the channel number too
426  channel_[pseudo_roc_num] = cabling.link;
427  const sipixelobjects::PixelROC *theRoc = converter.toRoc(cabling.link, cabling.roc);
428  roc = theRoc->idInDetUnit();
429  if (detid.subdetId() == PixelSubdetector::PixelBarrel && side(detid)==1 && half(detid)) roc += 8;
430  //printf ("Online FED, LNK, LNKID, ROC: %2d %2d %2d %2d - Offline RAWID, ROW, COL: %9d [%3d,%3d] [%3d,%3d]\n",
431  // fedId, cabling.link, cabling.roc, roc, detid.rawId(),
432  // (pixel.first /rowsperroc)*rowsperroc, (pixel.first /rowsperroc+1)*rowsperroc-1,
433  // (pixel.second/colsperroc)*colsperroc, (pixel.second/colsperroc+1)*colsperroc-1);
434  } else if (phase_<2) {
435  // This method is faster if only ROC number is needed
436  int pan = panel(detid), mod = module(detid), rocsY = 8;
437  if (phase_==0&&detid.subdetId() == PixelSubdetector::PixelEndcap) rocsY = pan+mod;
438  int rocX = pixel.first/rowsperroc, rocY = pixel.second/colsperroc;
439  // Consider second row for all 1xN Phase 0 modules
440  if (phase_==0) {
441  int v1x8 = half(detid)==1, v1x2 = (pan==1&&mod==1), v1x5 = (pan==1&&mod==4);
442  if (v1x8||v1x2||v1x5) ++rocX;
443  }
444  // Mirror both coordinates for barrel -Z side
445  // and for endcap (but only Panel 2 for Phase 0)
446  if ( (detid.subdetId() == PixelSubdetector::PixelBarrel && side(detid)==1) ||
447  (detid.subdetId() == PixelSubdetector::PixelEndcap && ((phase_==0 && pan==2)||phase_==1) ) ) {
448  rocX = 1-rocX;
449  rocY = rocsY-1 - rocY;
450  }
451  // U-shape readout order
452  roc = rocX ? rocY : 2*rocsY-1 - rocY;
453  }
454  return roc_[pseudo_roc_num] = roc;
455 }
456 int SiPixelCoordinates::roc(const DetId& detid, const PixelDigi* digi) {
457  if (!isPixel_(detid)) return -9999;
458  return roc(detid, pixel_(digi));
459 }
460 int SiPixelCoordinates::roc(const DetId& detid, const SiPixelCluster* cluster) {
461  if (!isPixel_(detid)) return -9999;
462  return roc(detid, pixel_(cluster));
463 }
465  if (!isPixel_(rechit->geographicalId())) return -9999;
466  return roc(rechit->geographicalId(), pixel_(rechit));
467 }
469  if (!isPixel_(rechit->geographicalId())) return -9999;
470  return roc(static_cast<const SiPixelRecHit*>(rechit->hit()));
471 }
472 
473 
474 // _________________________________________________________
475 // Floating point Pixel Coordinates similar to those
476 // given by TrackerTopology and naming classes
477 // but we add a shift within ]-0.5,+0.5[
478 // eg. std::round(coord) gives back the original int
479 float SiPixelCoordinates::module_coord(const DetId& detid, const std::pair<int, int>& pixel) {
480  if (!isBPix_(detid)) return -9999;
481  // offline module number is monotonously increasing with global z
482  // sign is negative because local y is antiparallel to global z
483  return module(detid) - (ycoord_on_module_(detid, pixel) - 0.5);
484 }
485 float SiPixelCoordinates::module_coord(const DetId& detid, const PixelDigi* digi) {
486  if (!isBPix_(detid)) return -9999;
487  return module_coord(detid, pixel_(digi));
488 }
489 float SiPixelCoordinates::module_coord(const DetId& detid, const SiPixelCluster* cluster) {
490  if (!isBPix_(detid)) return -9999;
491  return module_coord(detid, pixel_(cluster));
492 }
494  if (!isBPix_(rechit->geographicalId())) return -9999;
495  return module_coord(rechit->geographicalId(), pixel_(rechit));
496 }
498  if (!isBPix_(rechit->geographicalId())) return -9999;
499  return module_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
500 }
501 
502 
503 float SiPixelCoordinates::signed_module_coord(const DetId& detid, const std::pair<int, int>& pixel) {
504  if (!isBPix_(detid)) return -9999;
505  // offline module number is monotonously increasing with global z
506  // sign is negative because local y is antiparallel to global z
507  return signed_module(detid) - (ycoord_on_module_(detid, pixel) - 0.5);
508 }
509 float SiPixelCoordinates::signed_module_coord(const DetId& detid, const PixelDigi* digi) {
510  if (!isBPix_(detid)) return -9999;
511  return signed_module_coord(detid, pixel_(digi));
512 }
513 float SiPixelCoordinates::signed_module_coord(const DetId& detid, const SiPixelCluster* cluster) {
514  if (!isBPix_(detid)) return -9999;
515  return signed_module_coord(detid, pixel_(cluster));
516 }
518  if (!isBPix_(rechit->geographicalId())) return -9999;
519  return signed_module_coord(rechit->geographicalId(), pixel_(rechit));
520 }
522  if (!isBPix_(rechit->geographicalId())) return -9999;
523  return signed_module_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
524 }
525 
526 
527 float SiPixelCoordinates::ladder_coord(const DetId& detid, const std::pair<int, int>& pixel) {
528  if (!isBPix_(detid)) return -9999;
529  // offline ladder number is monotonously increasing with global phi
530  // flipped/inner ladders: lx parallel to global r-phi - positive sign
531  // non-flipped/outer ladders: lx anti-parallel to global r-phi - negative sign
532  int sign = flipped(detid) ? 1 : -1;
533  return ladder(detid) + sign * (xcoord_on_module_(detid, pixel) + half(detid)*0.5 - 0.5);
534 }
535 float SiPixelCoordinates::ladder_coord(const DetId& detid, const PixelDigi* digi) {
536  if (!isBPix_(detid)) return -9999;
537  return ladder_coord(detid, pixel_(digi));
538 }
539 float SiPixelCoordinates::ladder_coord(const DetId& detid, const SiPixelCluster* cluster) {
540  if (!isBPix_(detid)) return -9999;
541  return ladder_coord(detid, pixel_(cluster));
542 }
544  if (!isBPix_(rechit->geographicalId())) return -9999;
545  return ladder_coord(rechit->geographicalId(), pixel_(rechit));
546 }
548  if (!isBPix_(rechit->geographicalId())) return -9999;
549  return ladder_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
550 }
551 
552 
553 float SiPixelCoordinates::signed_ladder_coord(const DetId& detid, const std::pair<int, int>& pixel) {
554  if (!isBPix_(detid)) return -9999;
555  // online ladder number is monotonously decreasing with global phi
556  // flipped/inner ladders: lx parallel to global r-phi - negative sign
557  // non-flipped/outer ladders: lx anti-parallel to global r-phi - positive sign
558  int sign = flipped(detid) ? -1 : 1;
559  return signed_ladder(detid) + sign * (xcoord_on_module_(detid, pixel) + half(detid)*0.5 - 0.5);
560 }
561 float SiPixelCoordinates::signed_ladder_coord(const DetId& detid, const PixelDigi* digi) {
562  if (!isBPix_(detid)) return -9999;
563  return signed_ladder_coord(detid, pixel_(digi));
564 }
565 float SiPixelCoordinates::signed_ladder_coord(const DetId& detid, const SiPixelCluster* cluster) {
566  if (!isBPix_(detid)) return -9999;
567  return signed_ladder_coord(detid, pixel_(cluster));
568 }
570  if (!isBPix_(rechit->geographicalId())) return -9999;
571  return signed_ladder_coord(rechit->geographicalId(), pixel_(rechit));
572 }
574  if (!isBPix_(rechit->geographicalId())) return -9999;
575  return signed_ladder_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
576 }
577 
578 
579 // Rings are defined in the radial direction
580 // which is local x for phase 0 and local y for phase 1
581 // Rings were not defined for phase 0, but we had a similar
582 // convention, HV group, the 7 plaquettes were split like this
583 // Panel 1 plq 1-2, Panel 2, plq 1 = Ring 1 (HV grp 1)
584 // Panel 1 plq 3-4, Panel 2, plq 2-3 = Ring 2 (HV grp 2)
585 // A subdivision of 8 is suggested for both phase 0 and 1
586 float SiPixelCoordinates::ring_coord(const DetId& detid, const std::pair<int, int>& pixel) {
587  if (!isFPix_(detid)) return -9999;
588  float ring_coord = ring(detid), coord_shift = 0;
589  if (phase_==0) {
590  // local x on panel 1 is anti-parallel to global radius - sign is negative
591  // and parallel for panel 2 - sign is positive
592  int pan = panel(detid), mod = module(detid);
593  if (pan==1) {
594  if (mod==1) coord_shift = (-xcoord_on_module_(detid, pixel) )/4;
595  else if (mod==2) coord_shift = (-xcoord_on_module_(detid, pixel) + 2.0)/4;
596  else if (mod==3) coord_shift = (-xcoord_on_module_(detid, pixel) )/4;
597  else if (mod==4) coord_shift = (-xcoord_on_module_(detid, pixel) + 1.5)/4;
598  } else {
599  if (mod==1) coord_shift = ( xcoord_on_module_(detid, pixel) )/4;
600  else if (mod==2) coord_shift = ( xcoord_on_module_(detid, pixel) - 2.0)/4;
601  else if (mod==3) coord_shift = ( xcoord_on_module_(detid, pixel) )/4;
602  }
603  } else if (phase_==1) {
604  // local y is parallel to global radius, so sign is positive
605  coord_shift = ycoord_on_module_(detid, pixel) - 0.5;
606  }
607  ring_coord += coord_shift;
608  return ring_coord;
609 }
610 float SiPixelCoordinates::ring_coord(const DetId& detid, const PixelDigi* digi) {
611  if (!isFPix_(detid)) return -9999;
612  return ring_coord(detid, pixel_(digi));
613 }
614 float SiPixelCoordinates::ring_coord(const DetId& detid, const SiPixelCluster* cluster) {
615  if (!isFPix_(detid)) return -9999;
616  return ring_coord(detid, pixel_(cluster));
617 }
619  if (!isFPix_(rechit->geographicalId())) return -9999;
620  return ring_coord(rechit->geographicalId(), pixel_(rechit));
621 }
623  if (!isFPix_(rechit->geographicalId())) return -9999;
624  return ring_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
625 }
626 
627 
628 // Treat disk number as it is (parallel to global z)
629 // Subdivisions on the forward can be the radial direction
630 // Which is local x for phase 0 and local y for phase 1
631 // Closest radius is chosen to be closest to disk = 0
632 // Rings are not separated, 8 subdivisions are suggested
633 // Plot suitable for separate ring plots
634 float SiPixelCoordinates::disk_coord(const DetId& detid, const std::pair<int, int>& pixel) {
635  if (!isFPix_(detid)) return -9999;
636  float disk_coord = disk(detid), coord_shift = ring_coord(detid,pixel)-ring(detid);
637  disk_coord += coord_shift;
638  return disk_coord;
639 }
640 float SiPixelCoordinates::disk_coord(const DetId& detid, const PixelDigi* digi) {
641  if (!isFPix_(detid)) return -9999;
642  return disk_coord(detid, pixel_(digi));
643 }
644 float SiPixelCoordinates::disk_coord(const DetId& detid, const SiPixelCluster* cluster) {
645  if (!isFPix_(detid)) return -9999;
646  return disk_coord(detid, pixel_(cluster));
647 }
649  if (!isFPix_(rechit->geographicalId())) return -9999;
650  return disk_coord(rechit->geographicalId(), pixel_(rechit));
651 }
653  if (!isFPix_(rechit->geographicalId())) return -9999;
654  return disk_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
655 }
656 
657 
658 // Same as above, but using online convention
659 // !!! Recommended for Phase 1 !!!
660 // Can be used for Phase 0 too for comparison purposes
661 float SiPixelCoordinates::signed_disk_coord(const DetId& detid, const std::pair<int, int>& pixel) {
662  if (!isFPix_(detid)) return -9999;
663  float signed_disk_coord = signed_disk(detid), coord_shift = ring_coord(detid,pixel)-ring(detid);
664  // Mirror -z side, so plots are symmetric
665  if (signed_disk_coord<0) coord_shift = -coord_shift;
666  signed_disk_coord += coord_shift;
667  return signed_disk_coord;
668 }
669 float SiPixelCoordinates::signed_disk_coord(const DetId& detid, const PixelDigi* digi) {
670  if (!isFPix_(detid)) return -9999;
671  return signed_disk_coord(detid, pixel_(digi));
672 }
673 float SiPixelCoordinates::signed_disk_coord(const DetId& detid, const SiPixelCluster* cluster) {
674  if (!isFPix_(detid)) return -9999;
675  return signed_disk_coord(detid, pixel_(cluster));
676 }
678  if (!isFPix_(rechit->geographicalId())) return -9999;
679  return signed_disk_coord(rechit->geographicalId(), pixel_(rechit));
680 }
682  if (!isFPix_(rechit->geographicalId())) return -9999;
683  return signed_disk_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
684 }
685 
686 // Same as the above two, but subdivisions incorporate rings as well
687 // 16 subdivisions are suggested
688 float SiPixelCoordinates::disk_ring_coord(const DetId& detid, const std::pair<int, int>& pixel) {
689  if (!isFPix_(detid)) return -9999;
690  float disk_ring_coord = disk(detid), coord_shift = 0;
691  //if (phase_==0) coord_shift = (ring_coord(detid,pixel) - 1.625) / 1.5;
692  //else if (phase_==1) coord_shift = (ring_coord(detid,pixel) - 1.5 ) / 2.0;
693  coord_shift = (ring_coord(detid,pixel) - 1.5 ) / 2.0;
694  disk_ring_coord += coord_shift;
695  return disk_ring_coord;
696 }
697 float SiPixelCoordinates::disk_ring_coord(const DetId& detid, const PixelDigi* digi) {
698  if (!isFPix_(detid)) return -9999;
699  return disk_ring_coord(detid, pixel_(digi));
700 }
701 float SiPixelCoordinates::disk_ring_coord(const DetId& detid, const SiPixelCluster* cluster) {
702  if (!isFPix_(detid)) return -9999;
703  return disk_ring_coord(detid, pixel_(cluster));
704 }
706  if (!isFPix_(rechit->geographicalId())) return -9999;
707  return disk_ring_coord(rechit->geographicalId(), pixel_(rechit));
708 }
710  if (!isFPix_(rechit->geographicalId())) return -9999;
711  return disk_ring_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
712 }
713 
714 
715 // Same as above, but using online convention
716 // !!! Recommended for Phase 0 !!!
717 float SiPixelCoordinates::signed_disk_ring_coord(const DetId& detid, const std::pair<int, int>& pixel) {
718  if (!isFPix_(detid)) return -9999;
719  float signed_disk_ring_coord = signed_disk(detid), coord_shift = 0;
720  //if (phase_==0) coord_shift = (ring_coord(detid,pixel) - 1.625) / 1.5;
721  //else if (phase_==1) coord_shift = (ring_coord(detid,pixel) - 1.5 ) / 2.0;
722  coord_shift = (ring_coord(detid,pixel) - 1.5 ) / 2.0;
723  // Mirror -z side, so plots are symmetric
724  if (signed_disk_ring_coord<0) coord_shift = -coord_shift;
725  signed_disk_ring_coord += coord_shift;
726  return signed_disk_ring_coord;
727 }
729  if (!isFPix_(detid)) return -9999;
730  return signed_disk_ring_coord(detid, pixel_(digi));
731 }
733  if (!isFPix_(detid)) return -9999;
734  return signed_disk_ring_coord(detid, pixel_(cluster));
735 }
737  if (!isFPix_(rechit->geographicalId())) return -9999;
738  return signed_disk_ring_coord(rechit->geographicalId(), pixel_(rechit));
739 }
741  if (!isFPix_(rechit->geographicalId())) return -9999;
742  return signed_disk_ring_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
743 }
744 
745 
746 // Offline blade convention
747 // Blade number is parallel to global phi
748 // For Phase 0: local y is parallel with phi
749 // On +Z side ly is parallel with phi
750 // On -Z side ly is anti-parallel
751 // Phase 1: local x is parallel with phi
752 // +Z Panel 1, -Z Panel 2 is parallel
753 // +Z Panel 2, -Z Panel 1 is anti-parallel
754 // Plot suitable for separate panel 1/2 plots
755 // 10 subdivisions are recommended for Phase 0 (Half-ROC granularity)
756 // 2 for Phase 1
757 float SiPixelCoordinates::blade_coord(const DetId& detid, const std::pair<int, int>& pixel) {
758  if (!isFPix_(detid)) return -9999;
759  float blade_coord = blade(detid), coord_shift = 0;
760  if (phase_==0) {
761  int rocsY = panel(detid)+module(detid);
762  coord_shift = ycoord_on_module_(detid, pixel) - rocsY/10.;
763  if (side(detid)==1) coord_shift = -coord_shift;
764  } else if (phase_==1) {
765  coord_shift = xcoord_on_module_(detid, pixel) - 0.5;
766  if ((side(detid)+panel(detid))%2==0) coord_shift = -coord_shift;
767  }
768  blade_coord += coord_shift;
769  return blade_coord;
770 }
771 float SiPixelCoordinates::blade_coord(const DetId& detid, const PixelDigi* digi) {
772  if (!isFPix_(detid)) return -9999;
773  return blade_coord(detid, pixel_(digi));
774 }
775 float SiPixelCoordinates::blade_coord(const DetId& detid, const SiPixelCluster* cluster) {
776  if (!isFPix_(detid)) return -9999;
777  return blade_coord(detid, pixel_(cluster));
778 }
780  if (!isFPix_(rechit->geographicalId())) return -9999;
781  return blade_coord(rechit->geographicalId(), pixel_(rechit));
782 }
784  if (!isFPix_(rechit->geographicalId())) return -9999;
785  return blade_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
786 }
787 
788 
789 // Online blade convention
790 // Blade number is anti-parallel to global phi
791 // so signs are the opposite as above
792 // Plot suitable for separate panel 1/2 plots
793 // 10 subdivisions are recommended for Phase 0 (Half-ROC granularity)
794 // 2 for Phase 1
795 // !!! Recommended for Phase 0 |||
796 float SiPixelCoordinates::signed_blade_coord(const DetId& detid, const std::pair<int, int>& pixel) {
797  if (!isFPix_(detid)) return -9999;
798  float signed_blade_coord = signed_blade(detid), coord_shift = 0;
799  if (phase_==0) {
800  int rocsY = panel(detid)+module(detid);
801  coord_shift = ycoord_on_module_(detid, pixel) - rocsY/10.;
802  if (side(detid)==2) coord_shift = -coord_shift;
803  } else if (phase_==1) {
804  coord_shift = xcoord_on_module_(detid, pixel) - 0.5;
805  if ((side(detid)+panel(detid))%2==1) coord_shift = -coord_shift;
806  }
807  signed_blade_coord += coord_shift;
808  return signed_blade_coord;
809 }
810 float SiPixelCoordinates::signed_blade_coord(const DetId& detid, const PixelDigi* digi) {
811  if (!isFPix_(detid)) return -9999;
812  return signed_blade_coord(detid, pixel_(digi));
813 }
814 float SiPixelCoordinates::signed_blade_coord(const DetId& detid, const SiPixelCluster* cluster) {
815  if (!isFPix_(detid)) return -9999;
816  return signed_blade_coord(detid, pixel_(cluster));
817 }
819  if (!isFPix_(rechit->geographicalId())) return -9999;
820  return signed_blade_coord(rechit->geographicalId(), pixel_(rechit));
821 }
823  if (!isFPix_(rechit->geographicalId())) return -9999;
824  return signed_blade_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
825 }
826 
827 
828 // Offline blade convention + alternating panels
829 // Same as above two, but subdivisions incorporate panels
830 // Panel 2 is towards higher phi values for Phase 1 (overlap for phase 0)
831 // 20 subdivisions are recommended for Phase 0 (Half-ROC granularity)
832 // 4 for Phase 1
833 float SiPixelCoordinates::blade_panel_coord(const DetId& detid, const std::pair<int, int>& pixel) {
834  if (!isFPix_(detid)) return -9999;
835  float blade_panel_coord = blade(detid);
836  float coord_shift = (blade_coord(detid, pixel) - blade_panel_coord + panel(detid) - 1.5)/2;
837  blade_panel_coord += coord_shift;
838  return blade_panel_coord;
839 }
840 float SiPixelCoordinates::blade_panel_coord(const DetId& detid, const PixelDigi* digi) {
841  if (!isFPix_(detid)) return -9999;
842  return blade_panel_coord(detid, pixel_(digi));
843 }
844 float SiPixelCoordinates::blade_panel_coord(const DetId& detid, const SiPixelCluster* cluster) {
845  if (!isFPix_(detid)) return -9999;
846  return blade_panel_coord(detid, pixel_(cluster));
847 }
849  if (!isFPix_(rechit->geographicalId())) return -9999;
850  return blade_panel_coord(rechit->geographicalId(), pixel_(rechit));
851 }
853  if (!isFPix_(rechit->geographicalId())) return -9999;
854  return blade_panel_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
855 }
856 
857 
858 // Online blade convention + alternating panels
859 // Blade number is anti-parallel to global phi
860 // so signs are the opposite as above
861 // 20 subdivisions are recommended for Phase 0 (Half-ROC granularity)
862 // 4 for Phase 1
863 // !!! Recommended for Phase 1 !!!
864 float SiPixelCoordinates::signed_blade_panel_coord(const DetId& detid, const std::pair<int, int>& pixel) {
865  if (!isFPix_(detid)) return -9999;
866  float signed_blade_panel_coord = signed_blade(detid);
867  float coord_shift = (signed_blade_coord(detid, pixel) - signed_blade_panel_coord - panel(detid) + 1.5)/2;
868  signed_blade_panel_coord += coord_shift;
870 }
872  if (!isFPix_(detid)) return -9999;
873  return signed_blade_panel_coord(detid, pixel_(digi));
874 }
876  if (!isFPix_(detid)) return -9999;
877  return signed_blade_panel_coord(detid, pixel_(cluster));
878 }
880  if (!isFPix_(rechit->geographicalId())) return -9999;
881  return signed_blade_panel_coord(rechit->geographicalId(), pixel_(rechit));
882 }
884  if (!isFPix_(rechit->geographicalId())) return -9999;
885  return signed_blade_panel_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
886 }
887 
888 
889 // Same as above, but blade numbers are shifted for Phase 1 Ring 1
890 // so one can plot Ring1+Ring2 while conserving geometrical
891 // overlaps in phi
892 // Ring 2: 17 blades x 4 ROC --> 68 bin
893 // Ring 1: 2 gap, 4 ROC, alternating for 11 blades --> 68 bin
894 float SiPixelCoordinates::signed_shifted_blade_panel_coord(const DetId& detid, const std::pair<int, int>& pixel) {
895  if (!isFPix_(detid)) return -9999;
897  float coord_shift = (signed_blade_coord(detid, pixel) - signed_shifted_blade_panel_coord - panel(detid) + 1.5)/2;
898  if (phase_==1&&ring(detid)==1) signed_shifted_blade_panel_coord *= 1.5;
899  signed_shifted_blade_panel_coord += coord_shift;
901 }
903  if (!isFPix_(detid)) return -9999;
904  return signed_shifted_blade_panel_coord(detid, pixel_(digi));
905 }
907  if (!isFPix_(detid)) return -9999;
908  return signed_shifted_blade_panel_coord(detid, pixel_(cluster));
909 }
911  if (!isFPix_(rechit->geographicalId())) return -9999;
912  return signed_shifted_blade_panel_coord(rechit->geographicalId(), pixel_(rechit));
913 }
915  if (!isFPix_(rechit->geographicalId())) return -9999;
916  return signed_shifted_blade_panel_coord(static_cast<const SiPixelRecHit*>(rechit->hit()));
917 }
float ycoord_on_module_(const DetId &, const std::pair< int, int > &)
int sector(const DetId &)
float signed_module_coord(const DetId &, const std::pair< int, int > &)
int row() const
Definition: PixelDigi.h:56
std::unordered_map< uint32_t, int > panel_
std::unordered_map< uint64_t, unsigned int > channel_
float signed_blade_panel_coord(const DetId &, const std::pair< int, int > &)
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
virtual int nrows() const =0
int signed_blade(const DetId &)
float disk_ring_coord(const DetId &, const std::pair< int, int > &)
float ring_coord(const DetId &, const std::pair< int, int > &)
std::unordered_map< uint32_t, int > half_
virtual int rowsperroc() const =0
bool isPixel_(const DetId &)
std::unordered_map< uint32_t, int > sector_
int moduleName() const
module id (index in z)
std::unordered_map< uint32_t, int > ladder_
std::unordered_map< uint32_t, int > signed_disk_
void init(edm::EventSetup const &)
int side(const DetId &)
int blade(const DetId &)
unsigned int pxfDisk(const DetId &id) const
float ladder_coord(const DetId &, const std::pair< int, int > &)
int signed_disk(const DetId &)
float disk_coord(const DetId &, const std::pair< int, int > &)
const TrackerTopology * tTopo_
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
float blade_coord(const DetId &, const std::pair< int, int > &)
int ring(const DetId &)
unsigned int pxbModule(const DetId &id) const
unsigned int fedid(const DetId &)
int flipped(const DetId &)
int module(const DetId &)
bool isBPix_(const DetId &)
int layer(const DetId &)
std::pair< int, int > pixel_(const PixelDigi *)
int bladeName() const
blade id
std::unordered_map< uint32_t, int > signed_module_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::unordered_map< uint32_t, int > flipped_
std::unordered_map< uint32_t, int > ring_
std::unordered_map< uint32_t, int > outer_
int half(const DetId &)
bool isHalfModule() const
full or half module
virtual int colsperroc() const =0
std::unordered_map< uint32_t, int > layer_
std::unordered_map< uint32_t, int > module_
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:40
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
int sectorName() const
sector id
int channel(const DetId &, const std::pair< int, int > &)
const SiPixelFedCablingMap * cablingMap_
int disk(const DetId &)
std::unordered_map< uint32_t, int > signed_blade_
int roc(const DetId &, const std::pair< int, int > &)
T min(T a, T b)
Definition: MathUtil.h:58
std::unordered_map< uint32_t, int > disk_
std::unordered_map< uint32_t, unsigned int > det2fedMap() const final
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:18
int outer(const DetId &)
virtual TrackingRecHit const * hit() const
int ladderName() const
ladder id (index in phi)
unsigned long long uint64_t
Definition: Time.h:15
std::unordered_map< uint32_t, int > signed_ladder_
const TrackerGeometry * tGeom_
int signed_module(const DetId &)
int toCabling(sipixelobjects::ElectronicIndex &cabling, const sipixelobjects::DetectorIndex &detector) const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::unordered_map< uint32_t, int > quadrant_
const GeomDetUnit * detUnit() const override
std::unordered_map< uint32_t, int > side_
Shell shell() const
int quadrant(const DetId &)
int panel(const DetId &)
std::unordered_map< uint64_t, unsigned int > roc_
float xcoord_on_module_(const DetId &, const std::pair< int, int > &)
Pixel cluster – collection of neighboring pixels above threshold.
virtual int ncolumns() const =0
float signed_disk_coord(const DetId &, const std::pair< int, int > &)
sipixelobjects::PixelROC const * toRoc(int link, int roc) const
T get() const
Definition: EventSetup.h:71
bool hasDetUnit(uint32_t radId) const
col
Definition: cuy.py:1010
float y() const
unsigned int pxfSide(const DetId &id) const
std::vector< unsigned int > fedIds() const
LocalPoint localPosition() const final
std::unordered_map< uint32_t, int > blade_
int ladder(const DetId &)
DetId geographicalId() const
float module_coord(const DetId &, const std::pair< int, int > &)
float signed_shifted_blade_panel_coord(const DetId &, const std::pair< int, int > &)
int ringName() const
ring Id
HalfCylinder halfCylinder() const
int column() const
Definition: PixelDigi.h:57
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
float signed_blade_coord(const DetId &, const std::pair< int, int > &)
T const * product() const
Definition: ESHandle.h:86
float signed_disk_ring_coord(const DetId &, const std::pair< int, int > &)
float blade_panel_coord(const DetId &, const std::pair< int, int > &)
float x() const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
float signed_ladder_coord(const DetId &, const std::pair< int, int > &)
int signed_ladder(const DetId &)
std::unordered_map< uint32_t, unsigned int > fedid_
bool isFPix_(const DetId &)
Our base class.
Definition: SiPixelRecHit.h:23
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39