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