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/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     int pixelROCRows,       // Num of Rows per ROC
0011     int pixelROCCols,       // Num of Cols per ROC
0012     int BIG_PIX_PER_ROC_X,  // in x direction, rows. BIG_PIX_PER_ROC_X = 0 for SLHC
0013     int BIG_PIX_PER_ROC_Y,  // in y direction, cols. BIG_PIX_PER_ROC_Y = 0 for SLHC
0014     int pixelROCsInX,
0015     int pixelROCsInY) {
0016   float width = bs->width();    // module width = Xsize
0017   float length = bs->length();  // module length = Ysize
0018 
0019   // Number of pixel rows (x) and columns (y) per module
0020   int nrows = pixelROCRows * pixelROCsInX;
0021   int ncols = pixelROCCols * pixelROCsInY;
0022 
0023   // Take into account the large edge pixles
0024   // 1 big pixel per ROC
0025   float pitchX = width / (nrows + pixelROCsInX * BIG_PIX_PER_ROC_X);
0026   // 2 big pixels per ROC
0027   float pitchY = length / (ncols + pixelROCsInY * BIG_PIX_PER_ROC_Y);
0028 
0029   return (new RectangularPixelTopology(nrows,
0030                                        ncols,
0031                                        pitchX,
0032                                        pitchY,
0033                                        pixelROCRows,  // (int)rocRow
0034                                        pixelROCCols,  // (int)rocCol
0035                                        BIG_PIX_PER_ROC_X,
0036                                        BIG_PIX_PER_ROC_Y,
0037                                        pixelROCsInX,
0038                                        pixelROCsInY));  // (int)rocInX, (int)rocInY
0039 }