CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Geometry/TrackerGeometryBuilder/src/PixelTopologyBuilder.cc

Go to the documentation of this file.
00001 // Make the change for "big" pixels. 3/06 d.k.
00002 #include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyBuilder.h"
00003 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
00004 #include "DataFormats/GeometrySurface/interface/Bounds.h"
00005 
00006 PixelTopologyBuilder::PixelTopologyBuilder( void )
00007 {}
00008 
00009 PixelTopology*
00010 PixelTopologyBuilder::build( const Bounds* bs, 
00011                              bool upgradeGeometry,
00012                              int pixelROCRows, // Num of Rows per ROC
00013                              int pixelROCCols, // Num of Cols per ROC
00014                              int BIG_PIX_PER_ROC_X, // in x direction, rows. BIG_PIX_PER_ROC_X = 0 for SLHC
00015                              int BIG_PIX_PER_ROC_Y, // in y direction, cols. BIG_PIX_PER_ROC_Y = 0 for SLHC
00016                              int pixelROCsInX, int pixelROCsInY )
00017 {
00018   float width = bs->width();   // module width = Xsize
00019   float length = bs->length(); // module length = Ysize
00020 
00021   // Number of pixel rows (x) and columns (y) per module
00022   int nrows = pixelROCRows * pixelROCsInX;
00023   int ncols = pixelROCCols * pixelROCsInY;
00024 
00025   // Take into account the large edge pixles
00026   // 1 big pixel per ROC
00027   float pitchX = width /(nrows+pixelROCsInX*BIG_PIX_PER_ROC_X); 
00028   // 2 big pixels per ROC
00029   float pitchY = length/(ncols+pixelROCsInY*BIG_PIX_PER_ROC_Y);
00030 
00031   return ( new RectangularPixelTopology( nrows, ncols, pitchX, pitchY,
00032                                          upgradeGeometry,
00033                                          pixelROCRows, // (int)rocRow
00034                                          pixelROCCols, // (int)rocCol
00035                                          BIG_PIX_PER_ROC_X,
00036                                          BIG_PIX_PER_ROC_Y,
00037                                          pixelROCsInX, pixelROCsInY )); // (int)rocInX, (int)rocInY
00038 }