CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
unsigned int col(double y) const
void setPitchSimY(double psy)
void setThickness(double tss)
bool isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2) const
unsigned short pixelIndex(PixelInfo pI) const
double distanceFromRightActiveEdge(double x, double y) const
unsigned short getNoPixelsSimY() const
unsigned short getNoPixelsSimX() const
double getActiveEdgeY() const
void setActiveEdgeY(double aey)
double distanceFromBottomActiveEdge(double x, double y) const
double getPhysActiveEdgeDist() const
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)
double getSimXWidth() const
std::string getRunType() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
PixelInfo getPixelsInvolved(double x, double y, double sigma, double &hit_pos_x, double &hit_pos_y) const
list rt
Definition: hcal_runs.py:76
unsigned short no_of_pixels_simX_
void setActiveEdgeX(double aex)
void setDeadEdgeWidth(double dew)
void setPitchSimX(double psx)
int np
Definition: AMPTWrapper.h:43
double higherSimXBorder() const
double distanceFromTopActiveEdge(double x, double y) const
void setSimYWidth(double syw)
void setRunType(std::string rt)
double getPitchSimY() const
double activeEdgeFactor(double x, double y) const
double distanceFromLeftActiveEdge(double x, double y) const
void setNoPixelsSimY(unsigned short npy)
unsigned int row(double x) const
void setSimXWidth(double sxw)
void printInfo(std::stringstream &s)
double getPitchSimX() const
#define COND_SERIALIZABLE
Definition: Serializable.h:39
std::string runType_
void setPhysActiveEdgeDist(double pae)
void setNoPixelsSimX(unsigned short npx)
void index2RowCol(unsigned int &arow, unsigned int &acol, unsigned int index) const
double getThickness() const
void rowCol2Index(unsigned int arow, unsigned int acol, unsigned int &index) const
double higherSimYBorder() const
double getDeadEdgeWidth() const
unsigned short pixelColNo() const
double getActiveEdgeX() const
unsigned short getNoPixels() const
void setNoPixels(unsigned short np)
void pixelRange(unsigned int arow, unsigned int acol, double &lower_x, double &higher_x, double &lower_y, double &higher_y) const
unsigned short no_of_pixels_simY_
double getSimYWidth() const
unsigned short no_of_pixels_
unsigned short pixelRowNo() const
void setActiveEdgeSigma(double aes)
double getActiveEdgeSigma() const