CMS 3D CMS Logo

SiPixelFrameConverter.h
Go to the documentation of this file.
1 #ifndef SiPixelObjects_SiPixelFrameConverter_H
2 #define SiPixelObjects_SiPixelFrameConverter_H
3 
4 
5 
12 
14 
15 #include <boost/cstdint.hpp>
16 
18 public:
19 
21 
22  // using PixelFEDCabling = sipixelobjects::PixelFEDCabling;
23 
24  SiPixelFrameConverter(const SiPixelFedCabling* map, int fedId);
25 
26  bool hasDetUnit(uint32_t radId) const;
27 
28  sipixelobjects::PixelROC const * toRoc(int link, int roc) const;
29 
30 
33  using namespace sipixelobjects;
34  auto roc = toRoc(cabling.link, cabling.roc);
35  if (!roc) return 2;
36  LocalPixel::DcolPxid local = { cabling.dcol, cabling.pxid };
37  if (!local.valid()) return 3;
38 
39  GlobalPixel global = roc->toGlobal( LocalPixel(local) );
40  detector.rawId = roc->rawId();
41  detector.row = global.row;
42  detector.col = global.col;
43 
44  return 0;
45 
46  }
47 
48 
51 
52 private:
53  int theFedId;
56  const PixelFEDCabling * theFed;
57 
58 };
59 #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:22
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