CMS 3D CMS Logo

PixelROC.h
Go to the documentation of this file.
1 #ifndef SiPixelObjects_PixelROC_H
2 #define SiPixelObjects_PixelROC_H
3 
5 
9 #include <string>
10 #include <cstdint>
11 
19 //class TrackerTopology;
20 
21 namespace sipixelobjects {
22 
23  class PixelROC {
24  public:
26  PixelROC() : theDetUnit(0), theIdDU(0), theIdLk(0) {}
27 
31  PixelROC(uint32_t du, int idInDU, int idLk);
32 
34  uint32_t rawId() const { return theDetUnit; }
35 
37  unsigned int idInDetUnit() const { return theIdDU; }
38 
40  unsigned int idInLink() const { return theIdLk; }
41 
45  LocalPixel toLocal(const GlobalPixel& glo) const {
46  int rocRow = theFrameConverter.row().inverse(glo.row);
47  int rocCol = theFrameConverter.collumn().inverse(glo.col);
48 
49  LocalPixel::RocRowCol rocRowCol = {rocRow, rocCol};
50  return LocalPixel(rocRowCol);
51  }
52 
55  GlobalPixel toGlobal(const LocalPixel& loc) const {
58  result.row = theFrameConverter.row().convert(loc.rocRow());
59  return result;
60  }
61 
62  // recognise the detector side and layer number
63  // this methods use hardwired constants
64  // if the numberg changes the methods have to be modified
65  int bpixSidePhase0(uint32_t rawId) const;
66  int fpixSidePhase0(uint32_t rawId) const;
67  int bpixSidePhase1(uint32_t rawId) const;
68  int fpixSidePhase1(uint32_t rawId) const;
69  static int bpixLayerPhase1(uint32_t rawId);
70 
72  std::string print(int depth = 0) const;
73 
74  void initFrameConversion();
76  //void initFrameConversion(const TrackerTopology *tt, bool phase1=false);
77  // Frame conversion compatible with CMSSW_9_0_X Monte Carlo samples
79 
80  private:
81  uint32_t theDetUnit;
82  unsigned int theIdDU, theIdLk;
84 
86  };
87 
88 } // namespace sipixelobjects
89 
90 #endif
sipixelobjects::PixelROC::toLocal
LocalPixel toLocal(const GlobalPixel &glo) const
Definition: PixelROC.h:45
sipixelobjects::LinearConversion::inverse
int inverse(int item) const
Definition: LinearConversion.h:10
sipixelobjects::PixelROC::theIdDU
unsigned int theIdDU
Definition: PixelROC.h:82
sipixelobjects::PixelROC::theFrameConverter
FrameConversion theFrameConverter
Definition: PixelROC.h:83
GlobalPixel.h
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
COND_TRANSIENT
#define COND_TRANSIENT
Definition: Serializable.h:63
sipixelobjects::GlobalPixel::row
int row
Definition: GlobalPixel.h:7
sipixelobjects::GlobalPixel::col
int col
Definition: GlobalPixel.h:8
sipixelobjects::FrameConversion::row
const sipixelobjects::LinearConversion & row() const
Definition: FrameConversion.h:25
sipixelobjects::LocalPixel::rocCol
int rocCol() const
Definition: LocalPixel.h:35
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
sipixelobjects::PixelROC::fpixSidePhase1
int fpixSidePhase1(uint32_t rawId) const
Definition: PixelROC.cc:195
sipixelobjects::GlobalPixel
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
sipixelobjects
Definition: CablingPathToDetUnit.h:4
sipixelobjects::PixelROC::rawId
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
Definition: PixelROC.h:34
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
sipixelobjects::LinearConversion::convert
int convert(int item) const
Definition: LinearConversion.h:9
sipixelobjects::PixelROC::initFrameConversionPhase1_CMSSW_9_0_X
void initFrameConversionPhase1_CMSSW_9_0_X()
Definition: PixelROC.cc:56
sipixelobjects::LocalPixel::rocRow
int rocRow() const
Definition: LocalPixel.h:34
sipixelobjects::FrameConversion
Definition: FrameConversion.h:12
sipixelobjects::PixelROC::bpixLayerPhase1
static int bpixLayerPhase1(uint32_t rawId)
Definition: PixelROC.cc:142
sipixelobjects::PixelROC::bpixSidePhase1
int bpixSidePhase1(uint32_t rawId) const
Definition: PixelROC.cc:119
Serializable.h
LocalPixel.h
sipixelobjects::FrameConversion::collumn
const sipixelobjects::LinearConversion & collumn() const
Definition: FrameConversion.h:26
sipixelobjects::PixelROC::initFrameConversionPhase1
void initFrameConversionPhase1()
Definition: PixelROC.cc:69
sipixelobjects::PixelROC::toGlobal
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:55
sipixelobjects::PixelROC::idInLink
unsigned int idInLink() const
id of this ROC in parent Link.
Definition: PixelROC.h:40
sipixelobjects::PixelROC::theIdLk
unsigned int theIdLk
Definition: PixelROC.h:82
sipixelobjects::PixelROC
Definition: PixelROC.h:23
sipixelobjects::LocalPixel::RocRowCol
row and collumn in ROC representation
Definition: LocalPixel.h:13
sipixelobjects::PixelROC::print
std::string print(int depth=0) const
printout for debug
Definition: PixelROC.cc:231
sipixelobjects::PixelROC::fpixSidePhase0
int fpixSidePhase0(uint32_t rawId) const
Definition: PixelROC.cc:163
sipixelobjects::PixelROC::theDetUnit
uint32_t theDetUnit
Definition: PixelROC.h:81
sipixelobjects::PixelROC::initFrameConversion
void initFrameConversion()
Definition: PixelROC.cc:84
sipixelobjects::PixelROC::PixelROC
PixelROC()
dummy
Definition: PixelROC.h:26
mps_fire.result
result
Definition: mps_fire.py:303
FrameConversion.h
sipixelobjects::PixelROC::bpixSidePhase0
int bpixSidePhase0(uint32_t rawId) const
Definition: PixelROC.cc:97
sipixelobjects::PixelROC::idInDetUnit
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37