CMS 3D CMS Logo

PixelPhase2TopologyBuilder.cc
Go to the documentation of this file.
1 // Make the change for "big" pixels. 3/06 d.k.
5 
7 
9  int pixelROCRows, // Num of Rows per ROC
10  int pixelROCCols, // Num of Cols per ROC
11  int BIG_PIX_PER_ROC_X, // in x direction, rows.
12  int BIG_PIX_PER_ROC_Y, // in y direction, cols.
13  float BIG_PIX_PITCH_X,
14  float BIG_PIX_PITCH_Y,
15  int pixelROCsInX,
16  int pixelROCsInY) {
17  float width = bs->width(); // module width = Xsize
18  float length = bs->length(); // module length = Ysize
19 
20  // Number of pixel rows (x) and columns (y) per module
21  int nrows = pixelROCRows * pixelROCsInX;
22  int ncols = pixelROCCols * pixelROCsInY;
23 
24  // Take into account the large edge pixels
25  float pitchX =
26  (width - pixelROCsInX * BIG_PIX_PER_ROC_X * BIG_PIX_PITCH_X) / (nrows - pixelROCsInX * BIG_PIX_PER_ROC_X);
27  float pitchY =
28  (length - pixelROCsInY * BIG_PIX_PER_ROC_Y * BIG_PIX_PITCH_Y) / (ncols - pixelROCsInY * BIG_PIX_PER_ROC_Y);
29  if (BIG_PIX_PER_ROC_X == 0)
30  BIG_PIX_PITCH_X =
31  pitchX; // should then be either the exact one for Big Pixels or the expected one in the old geometry
32  if (BIG_PIX_PER_ROC_Y == 0)
33  BIG_PIX_PITCH_Y = pitchY;
34 
35  return (new RectangularPixelPhase2Topology(nrows,
36  ncols,
37  pitchX,
38  pitchY,
39  pixelROCRows, // (int)rocRow
40  pixelROCCols, // (int)rocCol
41  BIG_PIX_PER_ROC_X,
42  BIG_PIX_PER_ROC_Y,
43  BIG_PIX_PITCH_X,
44  BIG_PIX_PITCH_Y,
45  pixelROCsInX,
46  pixelROCsInY)); // (int)rocInX, (int)rocInY
47 }
PixelTopology * build(const Bounds *bounds, int ROWS_PER_ROC, int COLS_PER_ROC, int BIG_PIX_PER_ROC_X, int BIG_PIX_PER_ROC_Y, float BIG_PIX_PITCH_X, float BIG_PIX_PITCH_Y, int ROCS_X, int ROCS_Y)
Definition: Bounds.h:18