CMS 3D CMS Logo

SiPixelFrameConverter.h
Go to the documentation of this file.
1 #ifndef SiPixelObjects_SiPixelFrameConverter_H
2 #define SiPixelObjects_SiPixelFrameConverter_H
3 
10 
12 #include <cstdint>
13 
15 public:
17 
18  // using PixelFEDCabling = sipixelobjects::PixelFEDCabling;
19 
21 
22  bool hasDetUnit(uint32_t radId) const;
23 
24  sipixelobjects::PixelROC const* toRoc(int link, int roc) const;
25 
27  using namespace sipixelobjects;
28  auto roc = toRoc(cabling.link, cabling.roc);
29  if (!roc)
30  return 2;
31  LocalPixel::DcolPxid local = {cabling.dcol, cabling.pxid};
32  if (!local.valid())
33  return 3;
34 
35  GlobalPixel global = roc->toGlobal(LocalPixel(local));
36  detector.rawId = roc->rawId();
37  detector.row = global.row;
38  detector.col = global.col;
39 
40  return 0;
41  }
42 
44 
45 private:
46  int theFedId;
49  const PixelFEDCabling* theFed;
50 };
51 #endif
SiPixelFrameConverter(const SiPixelFedCabling *map, int fedId)
identify pixel inside single ROC
Definition: LocalPixel.h:7
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
SiPixelFedCablingTree const * theTree
double collumn and pixel ID in double collumn representation
Definition: LocalPixel.h:19
int toCabling(sipixelobjects::ElectronicIndex &cabling, const sipixelobjects::DetectorIndex &detector) const
const SiPixelFedCabling * theMap
sipixelobjects::PixelFEDCabling PixelFEDCabling
sipixelobjects::PixelROC const * toRoc(int link, int roc) const
bool hasDetUnit(uint32_t radId) const
int toDetector(const sipixelobjects::ElectronicIndex &cabling, sipixelobjects::DetectorIndex &detector) const
const PixelFEDCabling * theFed