CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SiPixelTopoFinder.h
Go to the documentation of this file.
1 #ifndef SiPixelTopoFinder_H
2 #define SiPixelTopoFinder_H
3 // -*- C++ -*-
4 //
5 // Class: SiPixelTopoFinder
6 //
15 
17 public:
20 
21  void init(const TrackerGeometry* trackerGeometry,
22  const TrackerTopology* trackerTopology,
23  const SiPixelFedCablingMap* siPixelFedCablingMap);
24 
25  std::vector<int> getDetIds() const { return fDetIds_; }
26 
27  std::map<int, std::pair<int, int>> getSensors() const { return fSensors_; }
28 
29  std::map<int, std::pair<int, int>> getSensorLayout() const { return fSensorLayout_; }
30 
31  std::unordered_map<uint32_t, unsigned int> getFedIds() const { return fFedIds_; }
32 
33  std::map<int, std::map<int, int>> getRocIds() const { return fRocIds_; }
34 
35 private:
36  // initialize with nullptr
37  int phase_ = -1;
38 
39  const TrackerTopology* tkTopo_ = nullptr;
40  const TrackerGeometry* tkGeom_ = nullptr;
42 
43  // List of <int> DetIds
44  std::vector<int> fDetIds_;
45  // ROC size (number of row, number of columns for each det id)
46  std::map<int, std::pair<int, int>> fSensors_;
47  // the roc layout on a module
48  std::map<int, std::pair<int, int>> fSensorLayout_;
49  // fedId as a function of detId
50  std::unordered_map<uint32_t, unsigned int> fFedIds_;
51  // map the index ROC to rocId
52  std::map<int, std::map<int, int>> fRocIds_;
53 
54  // conversion between online(local, per-ROC) row/column and offline(global, per-Module) row/column
55  void onlineRocColRow(const DetId& detId,
56  const SiPixelFedCablingMap* cablingMap,
57  int fedId,
58  int offlineRow,
59  int offlineCol,
60  int& roc,
61  int& row,
62  int& col);
63 
64  int indexROC(int irow, int icol, int nROCcolumns);
65 
66  // some helper function for pixel naming
67  int quadrant(const DetId& detid);
68  int side(const DetId& detid);
69  int half(const DetId& detid);
70 };
71 
72 #endif
const TrackerGeometry * tkGeom_
int quadrant(const DetId &detid)
std::map< int, std::map< int, int > > getRocIds() const
int side(const DetId &detid)
std::map< int, std::pair< int, int > > fSensors_
int half(const DetId &detid)
const SiPixelFedCablingMap * cablingMap_
void onlineRocColRow(const DetId &detId, const SiPixelFedCablingMap *cablingMap, int fedId, int offlineRow, int offlineCol, int &roc, int &row, int &col)
std::map< int, std::pair< int, int > > fSensorLayout_
std::vector< int > getDetIds() const
std::map< int, std::map< int, int > > fRocIds_
std::unordered_map< uint32_t, unsigned int > getFedIds() const
std::map< int, std::pair< int, int > > getSensors() const
const TrackerTopology * tkTopo_
std::vector< int > fDetIds_
int indexROC(int irow, int icol, int nROCcolumns)
Definition: DetId.h:17
void init(const TrackerGeometry *trackerGeometry, const TrackerTopology *trackerTopology, const SiPixelFedCablingMap *siPixelFedCablingMap)
col
Definition: cuy.py:1009
std::unordered_map< uint32_t, unsigned int > fFedIds_
std::map< int, std::pair< int, int > > getSensorLayout() const