Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-22 04:03:05

0001 // Make the change for "big" pixels. 3/06 d.k.
0002 #include "Geometry/TrackerGeometryBuilder/interface/PixelPhase2TopologyBuilder.h"
0003 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelPhase2Topology.h"
0004 #include "DataFormats/GeometrySurface/interface/Bounds.h"
0005 
0006 PixelPhase2TopologyBuilder::PixelPhase2TopologyBuilder(void) {}
0007 
0008 PixelTopology* PixelPhase2TopologyBuilder::build(const Bounds* bs,
0009                                                  int pixelROCRows,       // Num of Rows per ROC
0010                                                  int pixelROCCols,       // Num of Cols per ROC
0011                                                  int BIG_PIX_PER_ROC_X,  // in x direction, rows.
0012                                                  int BIG_PIX_PER_ROC_Y,  // in y direction, cols.
0013                                                  float BIG_PIX_PITCH_X,
0014                                                  float BIG_PIX_PITCH_Y,
0015                                                  int pixelROCsInX,
0016                                                  int pixelROCsInY) {
0017   float width = bs->width();    // module width = Xsize
0018   float length = bs->length();  // module length = Ysize
0019 
0020   // Number of pixel rows (x) and columns (y) per module
0021   int nrows = pixelROCRows * pixelROCsInX;
0022   int ncols = pixelROCCols * pixelROCsInY;
0023 
0024   // Take into account the large edge pixels
0025   float pitchX =
0026       (width - pixelROCsInX * BIG_PIX_PER_ROC_X * BIG_PIX_PITCH_X) / (nrows - pixelROCsInX * BIG_PIX_PER_ROC_X);
0027   float pitchY =
0028       (length - pixelROCsInY * BIG_PIX_PER_ROC_Y * BIG_PIX_PITCH_Y) / (ncols - pixelROCsInY * BIG_PIX_PER_ROC_Y);
0029   if (BIG_PIX_PER_ROC_X == 0)
0030     BIG_PIX_PITCH_X =
0031         pitchX;  // should then be either the exact one for Big Pixels or the expected one in the old geometry
0032   if (BIG_PIX_PER_ROC_Y == 0)
0033     BIG_PIX_PITCH_Y = pitchY;
0034 
0035   return (new RectangularPixelPhase2Topology(nrows,
0036                                              ncols,
0037                                              pitchX,
0038                                              pitchY,
0039                                              pixelROCRows,  // (int)rocRow
0040                                              pixelROCCols,  // (int)rocCol
0041                                              BIG_PIX_PER_ROC_X,
0042                                              BIG_PIX_PER_ROC_Y,
0043                                              BIG_PIX_PITCH_X,
0044                                              BIG_PIX_PITCH_Y,
0045                                              pixelROCsInX,
0046                                              pixelROCsInY));  // (int)rocInX, (int)rocInY
0047 }