CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelROC.h
Go to the documentation of this file.
1 #ifndef SiPixelObjects_PixelROC_H
2 #define SiPixelObjects_PixelROC_H
3 
4 
6 
10 #include <boost/cstdint.hpp>
11 #include <string>
12 
21 namespace sipixelobjects {
22 
23 class PixelROC {
24 public:
25 
27  PixelROC() : theDetUnit(0), theIdDU(0), theIdLk(0) {}
28 
29 
33  PixelROC( uint32_t du, int idInDU, int idLk);
34 
36  uint32_t rawId() const { return theDetUnit; }
37 
39  unsigned int idInDetUnit() const { return theIdDU; }
40 
42  unsigned int idInLink() const { return theIdLk; }
43 
47  LocalPixel toLocal(const GlobalPixel & glo) const {
48  int rocRow = theFrameConverter.row().inverse(glo.row);
49  int rocCol = theFrameConverter.collumn().inverse(glo.col);
50 
51  LocalPixel::RocRowCol rocRowCol = {rocRow, rocCol};
52  return LocalPixel(rocRowCol);
53 
54  }
55 
58  GlobalPixel toGlobal(const LocalPixel & loc) const {
60  result.col = theFrameConverter.collumn().convert(loc.rocCol());
61  result.row = theFrameConverter.row().convert(loc.rocRow());
62  return result;
63  }
64 
66  std::string print(int depth = 0) const;
67 
68  void initFrameConversion();
69 
70 private:
71  uint32_t theDetUnit;
72  unsigned int theIdDU, theIdLk;
74 
75 
77 };
78 
79 }
80 
81 #endif
unsigned int idInLink() const
id of this ROC in parent Link.
Definition: PixelROC.h:42
const sipixelobjects::LinearConversion & row() const
identify pixel inside single ROC
Definition: LocalPixel.h:7
std::string print(int depth=0) const
printout for debug
Definition: PixelROC.cc:27
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
const sipixelobjects::LinearConversion & collumn() const
LocalPixel toLocal(const GlobalPixel &glo) const
Definition: PixelROC.h:47
tuple result
Definition: query.py:137
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:39
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
Definition: PixelROC.h:36
FrameConversion theFrameConverter
Definition: PixelROC.h:73
unsigned int theIdLk
Definition: PixelROC.h:72
unsigned int theIdDU
Definition: PixelROC.h:72
#define COND_TRANSIENT
Definition: Serializable.h:60
row and collumn in ROC representation
Definition: LocalPixel.h:15
#define COND_SERIALIZABLE
Definition: Serializable.h:37
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:58