Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:31

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