CMS 3D CMS Logo

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