CMS 3D CMS Logo

LocalPixel.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiPixelObjects_LocalPixel_H
2 #define CondFormats_SiPixelObjects_LocalPixel_H
3 
4 namespace sipixelobjects {
5 
7  class LocalPixel {
8  public:
9  static const int numRowsInRoc = 80;
10  static const int numColsInRoc = 52;
11 
13  struct RocRowCol {
14  int rocRow, rocCol;
15  bool valid() const { return (0 <= rocRow) & (rocRow < numRowsInRoc) & (0 <= rocCol) & (rocCol < numColsInRoc); }
16  };
17 
19  struct DcolPxid {
20  int dcol, pxid;
21  bool valid() const { return ((0 <= dcol) & (dcol < 26) & (2 <= pxid) & (pxid < 162)); }
22  };
23 
25  thePixel.rocRow = numRowsInRoc - pixel.pxid / 2;
26  thePixel.rocCol = pixel.dcol * 2 + pixel.pxid % 2;
27  }
28 
30 
31  int dcol() const { return thePixel.rocCol / 2; }
32  int pxid() const { return 2 * (numRowsInRoc - thePixel.rocRow) + (thePixel.rocCol % 2); }
33 
34  int rocRow() const { return thePixel.rocRow; }
35  int rocCol() const { return thePixel.rocCol; }
36 
37  bool valid() const { return thePixel.valid(); }
38 
39  private:
41  };
42 } // namespace sipixelobjects
43 
44 #endif
sipixelobjects::LocalPixel::numRowsInRoc
static const int numRowsInRoc
Definition: LocalPixel.h:9
sipixelobjects::LocalPixel::LocalPixel
LocalPixel(const DcolPxid &pixel)
Definition: LocalPixel.h:24
sipixelobjects::LocalPixel::DcolPxid::valid
bool valid() const
Definition: LocalPixel.h:21
muonClassificationByHits_cfi.pixel
pixel
Definition: muonClassificationByHits_cfi.py:9
sipixelobjects::LocalPixel::RocRowCol::rocRow
int rocRow
Definition: LocalPixel.h:14
sipixelobjects::LocalPixel::rocCol
int rocCol() const
Definition: LocalPixel.h:35
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
sipixelobjects::LocalPixel::RocRowCol::rocCol
int rocCol
Definition: LocalPixel.h:14
sipixelobjects::LocalPixel::pxid
int pxid() const
Definition: LocalPixel.h:32
sipixelobjects::LocalPixel::LocalPixel
LocalPixel(const RocRowCol &pixel)
Definition: LocalPixel.h:29
sipixelobjects
Definition: CablingPathToDetUnit.h:4
sipixelobjects::LocalPixel::DcolPxid::pxid
int pxid
Definition: LocalPixel.h:20
sipixelobjects::LocalPixel::DcolPxid
double collumn and pixel ID in double collumn representation
Definition: LocalPixel.h:19
sipixelobjects::LocalPixel::rocRow
int rocRow() const
Definition: LocalPixel.h:34
sipixelobjects::LocalPixel::dcol
int dcol() const
Definition: LocalPixel.h:31
sipixelobjects::LocalPixel::valid
bool valid() const
Definition: LocalPixel.h:37
sipixelobjects::LocalPixel::thePixel
RocRowCol thePixel
Definition: LocalPixel.h:40
sipixelobjects::LocalPixel::RocRowCol
row and collumn in ROC representation
Definition: LocalPixel.h:13
sipixelobjects::LocalPixel::RocRowCol::valid
bool valid() const
Definition: LocalPixel.h:15
sipixelobjects::LocalPixel::numColsInRoc
static const int numColsInRoc
Definition: LocalPixel.h:10
sipixelobjects::LocalPixel::DcolPxid::dcol
int dcol
Definition: LocalPixel.h:20