CMS 3D CMS Logo

CTPPSPixelROC.h
Go to the documentation of this file.
1 #ifndef PPSObjects_PixelROC_H
2 #define PPSObjects_PixelROC_H
3 
5 
7 
8 #include <cstdint>
9 #include <string>
10 
19 public:
21 
23 
27  CTPPSPixelROC(uint32_t du, int idInDU, int idLk);
28 
30  uint32_t rawId() const { return theDetUnit; }
31 
33  unsigned int idInDetUnit() const { return theIdDU; }
34 
36  unsigned int idInLink() const { return theIdLk; }
37 
38  std::pair<int, int> toLocal(const std::pair<int, int> &modulePixel) const {
39  int rocPixelRow, rocPixelColumn, idDU;
40  int modulePixelRow = modulePixel.first;
41  int modulePixelColumn = modulePixel.second;
42 
43  theIndices.transformToROC(modulePixelColumn, modulePixelRow, idDU, rocPixelColumn, rocPixelRow);
44 
45  std::pair<int, int> rocPixel;
46  rocPixel = std::make_pair(rocPixelRow, rocPixelColumn);
47 
48  return rocPixel;
49  }
50 
51  std::pair<int, int> toGlobal(const std::pair<int, int> &rocPixel) const {
52  int modulePixelRow = -1;
53  int modulePixelColumn = -1;
54  int rocPixelRow = rocPixel.first;
55  int rocPixelColumn = rocPixel.second;
56 
57  theIndices.transformToModule(rocPixelColumn, rocPixelRow, theIdDU, modulePixelColumn, modulePixelRow);
58 
59  std::pair<int, int> modulePixel;
60  modulePixel = std::make_pair(modulePixelRow, modulePixelColumn);
61 
62  return modulePixel;
63  }
64 
65  std::pair<int, int> toGlobalfromDcol(const std::pair<int, int> &rocPixel) const {
66  int modulePixelRow = -1;
67  int modulePixelColumn = -1;
68  int rocDcol = rocPixel.first;
69  int rocPxl = rocPixel.second;
70 
71  int rocPixelRow;
72  int rocPixelColumn;
73 
74  theIndices.convertDcolToCol(rocDcol, rocPxl, rocPixelColumn, rocPixelRow);
75 
76  theIndices.transformToModule(rocPixelColumn, rocPixelRow, theIdDU, modulePixelColumn, modulePixelRow);
77 
78  std::pair<int, int> modulePixel;
79  modulePixel = std::make_pair(modulePixelRow, modulePixelColumn);
80 
81  return modulePixel;
82  }
83 
85  std::string print(int depth = 0) const;
86 
87 private:
88  uint32_t theDetUnit;
89  unsigned int theIdDU, theIdLk;
90 
92 
94 };
95 
96 #endif
CTPPSPixelROC::theIdDU
unsigned int theIdDU
Definition: CTPPSPixelROC.h:89
CTPPSPixelROC::toGlobalfromDcol
std::pair< int, int > toGlobalfromDcol(const std::pair< int, int > &rocPixel) const
Definition: CTPPSPixelROC.h:65
CTPPSPixelROC::idInLink
unsigned int idInLink() const
id of this ROC in parent Link.
Definition: CTPPSPixelROC.h:36
CTPPSPixelIndices::convertDcolToCol
static int convertDcolToCol(const int dcol, const int pix, int &colROC, int &rowROC)
Definition: CTPPSPixelIndices.h:126
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
CTPPSPixelROC::toLocal
std::pair< int, int > toLocal(const std::pair< int, int > &modulePixel) const
Definition: CTPPSPixelROC.h:38
CTPPSPixelROC::idInDetUnit
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: CTPPSPixelROC.h:33
CTPPSPixelROC::~CTPPSPixelROC
~CTPPSPixelROC()
Definition: CTPPSPixelROC.h:22
CTPPSPixelROC::theIndices
CTPPSPixelIndices theIndices
Definition: CTPPSPixelROC.h:91
CTPPSPixelIndices
Definition: CTPPSPixelIndices.h:74
CTPPSPixelIndices::transformToROC
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
Definition: CTPPSPixelIndices.h:195
CTPPSPixelIndices.h
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSPixelROC::toGlobal
std::pair< int, int > toGlobal(const std::pair< int, int > &rocPixel) const
Definition: CTPPSPixelROC.h:51
CTPPSPixelROC::rawId
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
Definition: CTPPSPixelROC.h:30
Serializable.h
CTPPSPixelROC
Definition: CTPPSPixelROC.h:18
CTPPSPixelROC::theIdLk
unsigned int theIdLk
Definition: CTPPSPixelROC.h:89
CTPPSPixelROC::theDetUnit
uint32_t theDetUnit
Definition: CTPPSPixelROC.h:88
CTPPSPixelROC::CTPPSPixelROC
CTPPSPixelROC()
Definition: CTPPSPixelROC.h:20
CTPPSPixelROC::print
std::string print(int depth=0) const
printout for debug
CTPPSPixelIndices::transformToModule
int transformToModule(const int colROC, const int rowROC, const int rocId, int &col, int &row) const
Definition: CTPPSPixelIndices.h:160