CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/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 <iostream>
00003 
00004 #include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyBuilder.h"
00005 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
00006 #include "DataFormats/GeometrySurface/interface/Bounds.h"
00007 
00008 PixelTopologyBuilder::PixelTopologyBuilder( void )
00009   : thePixelROCRows( 0 ),
00010     thePixelROCCols( 0 ),
00011     thePixelROCsInX( 0 ),
00012     thePixelROCsInY( 0 )
00013 {}
00014 
00015 PixelTopology*
00016 PixelTopologyBuilder::build( const Bounds* bs, double rocRow, double rocCol, double rocInX, double rocInY, std::string /* part */ )
00017 {
00018   thePixelROCRows = rocRow; // number of pixel rows per ROC
00019   thePixelROCsInX = rocInX; // number of ROCs per module in x
00020   thePixelROCCols = rocCol; // number of pixel cols in ROC
00021   thePixelROCsInY = rocInY; // number of ROCs per module in y
00022 
00023   float width = bs->width(); // module width = Xsize
00024   float length = bs->length(); // module length = Ysize
00025 
00026   // Number of pixel rows (x) and columns (y) per module
00027   int nrows = int(thePixelROCRows * thePixelROCsInX);
00028   int ncols = int(thePixelROCCols * thePixelROCsInY);
00029 
00030   // For all pixels having same size (old topology)
00031   //float pitchX = width/float(nrows); 
00032   //float pitchY = length/float(ncols);
00033 
00034   // temporary before we find a better way to do this 
00035   const int BIG_PIX_PER_ROC_X = 1; // 1 big pixel  in x direction, rows
00036   const int BIG_PIX_PER_ROC_Y = 2; // 2 big pixels in y direction, cols
00037 
00038   // Take into account the large edge pixles
00039   // 1 big pixel per ROC
00040   float pitchX = width /(float(nrows)+thePixelROCsInX*BIG_PIX_PER_ROC_X); 
00041   // 2 big pixels per ROC
00042   float pitchY = length/(float(ncols)+thePixelROCsInY*BIG_PIX_PER_ROC_Y);
00043 
00044   //std::cout<<"Build Pixel Topology: row/cols = "<<nrows<<"/"<<ncols
00045   //   <<" sizeX/Y = "<<width<<"/"<<length
00046   //   <<" pitchX/Y = "<<pitchX<<"/"<<pitchY
00047   //   <<" ROCsX/Y = "<<thePixelROCsInX<<"/"<<thePixelROCsInY
00048   //   <<" per ROC row/cols = "<<thePixelROCRows<<"/"<<thePixelROCCols
00049   //   <<" big pixels "<<BIG_PIX_PER_ROC_X<<"/"<<BIG_PIX_PER_ROC_Y
00050   //   <<std::endl;   
00051 
00052   return new RectangularPixelTopology( nrows, ncols, pitchX, pitchY );
00053 }
00054 
00055