CMS 3D CMS Logo

PPSPixelTopology.h
Go to the documentation of this file.
1 #ifndef CondFormats_PPSObjects_PPSPixelTopology_h
2 #define CondFormats_PPSObjects_PPSPixelTopology_h
3 // -*- C++ -*-
4 //
5 // Package: PPSObjects
6 // Class: PPSPixelTopology
7 //
15 //
16 
20 #include <cmath>
21 
23 public:
24  // Constructor
26  // Destructor
28 
29  class PixelInfo {
30  public:
31  PixelInfo(double lower_simX_border,
32  double higher_simX_border,
33  double lower_simY_border,
34  double higher_simY_border,
35  double eff_factor,
36  unsigned short pixel_row_no,
37  unsigned short pixel_col_no)
38  : lower_simX_border_(lower_simX_border),
39  higher_simX_border_(higher_simX_border),
40  lower_simY_border_(lower_simY_border),
41  higher_simY_border_(higher_simY_border),
42  eff_factor_(eff_factor),
43  pixel_row_no_(pixel_row_no),
44  pixel_col_no_(pixel_col_no)
45  //,
46  // pixel_index_(pixel_col_no * PPSPixelTopology::no_of_pixels_simX_ + pixel_row_no)
47  {}
48 
49  inline double higherSimXBorder() const { return higher_simX_border_; }
50  inline double lowerSimXBorder() const { return lower_simX_border_; }
51  inline double higherSimYBorder() const { return higher_simY_border_; }
52  inline double lowerSimYBorder() const { return lower_simY_border_; }
53  inline double effFactor() const { return eff_factor_; }
54  inline unsigned short pixelRowNo() const { return pixel_row_no_; }
55  inline unsigned short pixelColNo() const { return pixel_col_no_; }
56  // inline unsigned short pixelIndex() const { return pixel_index_; }
57 
58  private:
63  double eff_factor_;
64  unsigned short pixel_row_no_;
65  unsigned short pixel_col_no_;
66  // unsigned short pixel_index_;
68  };
69 
70  unsigned short pixelIndex(PixelInfo pI) const;
71  bool isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2) const;
72  PixelInfo getPixelsInvolved(double x, double y, double sigma, double& hit_pos_x, double& hit_pos_y) const;
73 
74  void pixelRange(
75  unsigned int arow, unsigned int acol, double& lower_x, double& higher_x, double& lower_y, double& higher_y) const;
76 
77  // Getters
78 
79  std::string getRunType() const;
80  double getPitchSimY() const;
81  double getPitchSimX() const;
82  double getThickness() const;
83  unsigned short getNoPixelsSimX() const;
84  unsigned short getNoPixelsSimY() const;
85  unsigned short getNoPixels() const;
86  double getSimXWidth() const;
87  double getSimYWidth() const;
88  double getDeadEdgeWidth() const;
89  double getActiveEdgeSigma() const;
90  double getPhysActiveEdgeDist() const;
91  double getActiveEdgeX() const;
92  double getActiveEdgeY() const;
93 
94  // Setters
95 
97  void setPitchSimY(double psy);
98  void setPitchSimX(double psx);
99  void setThickness(double tss);
100  void setNoPixelsSimX(unsigned short npx);
101  void setNoPixelsSimY(unsigned short npy);
102  void setNoPixels(unsigned short np);
103  void setSimXWidth(double sxw);
104  void setSimYWidth(double syw);
105  void setDeadEdgeWidth(double dew);
106  void setActiveEdgeSigma(double aes);
107  void setPhysActiveEdgeDist(double pae);
108  void setActiveEdgeX(double aex);
109  void setActiveEdgeY(double aey);
110 
111  void printInfo(std::stringstream& s);
112 
113 private:
114  /*
115 Geometrical and topological information on RPix silicon detector.
116 Uses coordinate a frame with origin in the center of the wafer.
117 */
118 
119  double activeEdgeFactor(double x, double y) const;
120  double distanceFromTopActiveEdge(double x, double y) const;
121  double distanceFromBottomActiveEdge(double x, double y) const;
122  double distanceFromRightActiveEdge(double x, double y) const;
123  double distanceFromLeftActiveEdge(double x, double y) const;
124  unsigned int row(double x) const;
125  unsigned int col(double y) const;
126  void rowCol2Index(unsigned int arow, unsigned int acol, unsigned int& index) const;
127  void index2RowCol(unsigned int& arow, unsigned int& acol, unsigned int index) const;
128 
130  double pitch_simY_;
131  double pitch_simX_;
132  double thickness_;
133  unsigned short no_of_pixels_simX_;
134  unsigned short no_of_pixels_simY_;
135  unsigned short no_of_pixels_;
136  double simX_width_;
137  double simY_width_;
141 
144 
146 };
147 
148 std::ostream& operator<<(std::ostream&, PPSPixelTopology);
149 
150 #endif
PPSPixelTopology::pixelIndex
unsigned short pixelIndex(PixelInfo pI) const
Definition: PPSPixelTopology.cc:25
PPSPixelTopology::getNoPixels
unsigned short getNoPixels() const
Definition: PPSPixelTopology.cc:233
DDAxes::y
PPSPixelTopology::getSimXWidth
double getSimXWidth() const
Definition: PPSPixelTopology.cc:234
PPSPixelTopology::PixelInfo::lowerSimXBorder
double lowerSimXBorder() const
Definition: PPSPixelTopology.h:50
PPSPixelTopology::PixelInfo
Definition: PPSPixelTopology.h:29
PPSPixelTopology::distanceFromLeftActiveEdge
double distanceFromLeftActiveEdge(double x, double y) const
Definition: PPSPixelTopology.cc:152
PPSPixelTopology::PixelInfo::higherSimYBorder
double higherSimYBorder() const
Definition: PPSPixelTopology.h:51
PPSPixelTopology::getNoPixelsSimY
unsigned short getNoPixelsSimY() const
Definition: PPSPixelTopology.cc:232
MessageLogger.h
PPSPixelTopology::PixelInfo::pixelColNo
unsigned short pixelColNo() const
Definition: PPSPixelTopology.h:55
PPSPixelTopology::active_edge_sigma_
double active_edge_sigma_
Definition: PPSPixelTopology.h:139
PPSPixelTopology::getActiveEdgeY
double getActiveEdgeY() const
Definition: PPSPixelTopology.cc:240
PPSPixelTopology::pitch_simX_
double pitch_simX_
Definition: PPSPixelTopology.h:131
PPSPixelTopology::setNoPixelsSimX
void setNoPixelsSimX(unsigned short npx)
Definition: PPSPixelTopology.cc:248
operator<<
std::ostream & operator<<(std::ostream &, PPSPixelTopology)
Definition: PPSPixelTopology.cc:272
hcal_runs.rt
rt
Definition: hcal_runs.py:76
np
int np
Definition: AMPTWrapper.h:43
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
PPSPixelTopology::getSimYWidth
double getSimYWidth() const
Definition: PPSPixelTopology.cc:235
PPSPixelTopology::setPhysActiveEdgeDist
void setPhysActiveEdgeDist(double pae)
Definition: PPSPixelTopology.cc:255
PPSPixelTopology::PixelInfo::PixelInfo
PixelInfo(double lower_simX_border, double higher_simX_border, double lower_simY_border, double higher_simY_border, double eff_factor, unsigned short pixel_row_no, unsigned short pixel_col_no)
Definition: PPSPixelTopology.h:31
DDAxes::x
PPSPixelTopology::setNoPixels
void setNoPixels(unsigned short np)
Definition: PPSPixelTopology.cc:250
PPSPixelTopology::getNoPixelsSimX
unsigned short getNoPixelsSimX() const
Definition: PPSPixelTopology.cc:231
PPSPixelTopology::phys_active_edge_dist_
double phys_active_edge_dist_
Definition: PPSPixelTopology.h:140
PPSPixelTopology::setNoPixelsSimY
void setNoPixelsSimY(unsigned short npy)
Definition: PPSPixelTopology.cc:249
PPSPixelTopology::pixelRange
void pixelRange(unsigned int arow, unsigned int acol, double &lower_x, double &higher_x, double &lower_y, double &higher_y) const
Definition: PPSPixelTopology.cc:71
PPSPixelTopology::no_of_pixels_simY_
unsigned short no_of_pixels_simY_
Definition: PPSPixelTopology.h:134
PPSPixelTopology::printInfo
void printInfo(std::stringstream &s)
Definition: PPSPixelTopology.cc:259
PPSPixelTopology::index2RowCol
void index2RowCol(unsigned int &arow, unsigned int &acol, unsigned int index) const
Definition: PPSPixelTopology.cc:220
PPSPixelTopology::runType_
std::string runType_
Definition: PPSPixelTopology.h:129
PPSPixelTopology::getRunType
std::string getRunType() const
Definition: PPSPixelTopology.cc:227
PPSPixelTopology::simX_width_
double simX_width_
Definition: PPSPixelTopology.h:136
PPSPixelTopology::setActiveEdgeSigma
void setActiveEdgeSigma(double aes)
Definition: PPSPixelTopology.cc:254
PPSPixelTopology::rowCol2Index
void rowCol2Index(unsigned int arow, unsigned int acol, unsigned int &index) const
Definition: PPSPixelTopology.cc:216
PPSPixelTopology::PPSPixelTopology
PPSPixelTopology()
Definition: PPSPixelTopology.cc:6
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PPSPixelTopology::setSimXWidth
void setSimXWidth(double sxw)
Definition: PPSPixelTopology.cc:251
PPSPixelTopology::getPixelsInvolved
PixelInfo getPixelsInvolved(double x, double y, double sigma, double &hit_pos_x, double &hit_pos_y) const
Definition: PPSPixelTopology.cc:46
PPSPixelTopology::PixelInfo::pixel_col_no_
unsigned short pixel_col_no_
Definition: PPSPixelTopology.h:65
PPSPixelTopology::active_edge_y_
double active_edge_y_
Definition: PPSPixelTopology.h:143
CTPPSPixelIndices.h
PPSPixelTopology::distanceFromTopActiveEdge
double distanceFromTopActiveEdge(double x, double y) const
Definition: PPSPixelTopology.cc:149
PPSPixelTopology::getThickness
double getThickness() const
Definition: PPSPixelTopology.cc:230
PPSPixelTopology::setPitchSimY
void setPitchSimY(double psy)
Definition: PPSPixelTopology.cc:245
PPSPixelTopology::dead_edge_width_
double dead_edge_width_
Definition: PPSPixelTopology.h:138
PPSPixelTopology::PixelInfo::higher_simX_border_
double higher_simX_border_
Definition: PPSPixelTopology.h:60
PPSPixelTopology::no_of_pixels_
unsigned short no_of_pixels_
Definition: PPSPixelTopology.h:135
PPSPixelTopology::PixelInfo::eff_factor_
double eff_factor_
Definition: PPSPixelTopology.h:63
PPSPixelTopology::PixelInfo::lower_simY_border_
double lower_simY_border_
Definition: PPSPixelTopology.h:61
PPSPixelTopology::thickness_
double thickness_
Definition: PPSPixelTopology.h:132
PPSPixelTopology::setThickness
void setThickness(double tss)
Definition: PPSPixelTopology.cc:247
PPSPixelTopology::getPitchSimY
double getPitchSimY() const
Definition: PPSPixelTopology.cc:228
PPSPixelTopology::PixelInfo::higherSimXBorder
double higherSimXBorder() const
Definition: PPSPixelTopology.h:49
PPSPixelTopology::getPhysActiveEdgeDist
double getPhysActiveEdgeDist() const
Definition: PPSPixelTopology.cc:238
Serializable.h
PPSPixelTopology::PixelInfo::pixel_row_no_
unsigned short pixel_row_no_
Definition: PPSPixelTopology.h:64
PPSPixelTopology::distanceFromBottomActiveEdge
double distanceFromBottomActiveEdge(double x, double y) const
Definition: PPSPixelTopology.cc:150
PPSPixelTopology::getDeadEdgeWidth
double getDeadEdgeWidth() const
Definition: PPSPixelTopology.cc:236
PPSPixelTopology
Definition: PPSPixelTopology.h:22
PPSPixelTopology::PixelInfo::pixelRowNo
unsigned short pixelRowNo() const
Definition: PPSPixelTopology.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PPSPixelTopology::col
unsigned int col(double y) const
Definition: PPSPixelTopology.cc:184
PPSPixelTopology::getPitchSimX
double getPitchSimX() const
Definition: PPSPixelTopology.cc:229
PPSPixelTopology::PixelInfo::effFactor
double effFactor() const
Definition: PPSPixelTopology.h:53
PPSPixelTopology::setActiveEdgeY
void setActiveEdgeY(double aey)
Definition: PPSPixelTopology.cc:257
PPSPixelTopology::setDeadEdgeWidth
void setDeadEdgeWidth(double dew)
Definition: PPSPixelTopology.cc:253
PPSPixelTopology::distanceFromRightActiveEdge
double distanceFromRightActiveEdge(double x, double y) const
Definition: PPSPixelTopology.cc:151
PPSPixelTopology::row
unsigned int row(double x) const
Definition: PPSPixelTopology.cc:154
PPSPixelTopology::simY_width_
double simY_width_
Definition: PPSPixelTopology.h:137
PPSPixelTopology::~PPSPixelTopology
~PPSPixelTopology()
Definition: PPSPixelTopology.cc:23
PPSPixelTopology::setActiveEdgeX
void setActiveEdgeX(double aex)
Definition: PPSPixelTopology.cc:256
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
PPSPixelTopology::no_of_pixels_simX_
unsigned short no_of_pixels_simX_
Definition: PPSPixelTopology.h:133
PPSPixelTopology::getActiveEdgeX
double getActiveEdgeX() const
Definition: PPSPixelTopology.cc:239
PPSPixelTopology::PixelInfo::higher_simY_border_
double higher_simY_border_
Definition: PPSPixelTopology.h:62
PPSPixelTopology::PixelInfo::lower_simX_border_
double lower_simX_border_
Definition: PPSPixelTopology.h:59
PPSPixelTopology::getActiveEdgeSigma
double getActiveEdgeSigma() const
Definition: PPSPixelTopology.cc:237
PPSPixelTopology::isPixelHit
bool isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2) const
Definition: PPSPixelTopology.cc:29
PPSPixelTopology::setSimYWidth
void setSimYWidth(double syw)
Definition: PPSPixelTopology.cc:252
PPSPixelTopology::setPitchSimX
void setPitchSimX(double psx)
Definition: PPSPixelTopology.cc:246
PPSPixelTopology::activeEdgeFactor
double activeEdgeFactor(double x, double y) const
Definition: PPSPixelTopology.cc:134
PPSPixelTopology::active_edge_x_
double active_edge_x_
Definition: PPSPixelTopology.h:142
PPSPixelTopology::setRunType
void setRunType(std::string rt)
Definition: PPSPixelTopology.cc:244
PPSPixelTopology::pitch_simY_
double pitch_simY_
Definition: PPSPixelTopology.h:130
PPSPixelTopology::PixelInfo::lowerSimYBorder
double lowerSimYBorder() const
Definition: PPSPixelTopology.h:52