CMS 3D CMS Logo

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
SiPixelTopoFinder::getSensorLayout
std::map< int, std::pair< int, int > > getSensorLayout() const
Definition: SiPixelTopoFinder.h:29
TrackerGeometry.h
SiPixelTopoFinder::quadrant
int quadrant(const DetId &detid)
Definition: SiPixelTopoFinder.cc:126
SiPixelTopoFinder::getRocIds
std::map< int, std::map< int, int > > getRocIds() const
Definition: SiPixelTopoFinder.h:33
TrackerTopology
Definition: TrackerTopology.h:16
cuy.col
col
Definition: cuy.py:1009
SiPixelCluster.h
SiPixelTopoFinder::tkGeom_
const TrackerGeometry * tkGeom_
Definition: SiPixelTopoFinder.h:40
SiPixelTopoFinder::half
int half(const DetId &detid)
Definition: SiPixelTopoFinder.cc:144
SiPixelFedCablingMap.h
PixelDigi.h
SiPixelTopoFinder::cablingMap_
const SiPixelFedCablingMap * cablingMap_
Definition: SiPixelTopoFinder.h:41
SiPixelTopoFinder::side
int side(const DetId &detid)
Definition: SiPixelTopoFinder.cc:135
SiPixelTopoFinder::fSensors_
std::map< int, std::pair< int, int > > fSensors_
Definition: SiPixelTopoFinder.h:46
SiPixelTopoFinder::phase_
int phase_
Definition: SiPixelTopoFinder.h:37
SiPixelTopoFinder::SiPixelTopoFinder
SiPixelTopoFinder()
Definition: SiPixelTopoFinder.cc:11
DetId
Definition: DetId.h:17
TrackerTopology.h
SiPixelTopoFinder::getDetIds
std::vector< int > getDetIds() const
Definition: SiPixelTopoFinder.h:25
TrackingRecHit.h
SiPixelTopoFinder::onlineRocColRow
void onlineRocColRow(const DetId &detId, const SiPixelFedCablingMap *cablingMap, int fedId, int offlineRow, int offlineCol, int &roc, int &row, int &col)
Definition: SiPixelTopoFinder.cc:78
SiPixelTopoFinder::fSensorLayout_
std::map< int, std::pair< int, int > > fSensorLayout_
Definition: SiPixelTopoFinder.h:48
SiPixelTopoFinder
Definition: SiPixelTopoFinder.h:16
SiPixelRecHit.h
SiPixelTopoFinder::getSensors
std::map< int, std::pair< int, int > > getSensors() const
Definition: SiPixelTopoFinder.h:27
SiPixelTopoFinder::fRocIds_
std::map< int, std::map< int, int > > fRocIds_
Definition: SiPixelTopoFinder.h:52
SiPixelTopoFinder::tkTopo_
const TrackerTopology * tkTopo_
Definition: SiPixelTopoFinder.h:39
SiPixelTopoFinder::getFedIds
std::unordered_map< uint32_t, unsigned int > getFedIds() const
Definition: SiPixelTopoFinder.h:31
SiPixelTopoFinder::indexROC
int indexROC(int irow, int icol, int nROCcolumns)
Definition: SiPixelTopoFinder.cc:117
SiPixelTopoFinder::fDetIds_
std::vector< int > fDetIds_
Definition: SiPixelTopoFinder.h:44
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:89
SiPixelFedCablingMap
Definition: SiPixelFedCablingMap.h:19
DetId.h
PixelMapPlotter.roc
roc
Definition: PixelMapPlotter.py:498
SiPixelTopoFinder::init
void init(const TrackerGeometry *trackerGeometry, const TrackerTopology *trackerTopology, const SiPixelFedCablingMap *siPixelFedCablingMap)
Definition: SiPixelTopoFinder.cc:15
SiPixelTopoFinder::fFedIds_
std::unordered_map< uint32_t, unsigned int > fFedIds_
Definition: SiPixelTopoFinder.h:50
SiPixelTopoFinder::~SiPixelTopoFinder
~SiPixelTopoFinder()
Definition: SiPixelTopoFinder.cc:13
TrackerGeometry
Definition: TrackerGeometry.h:14