Go to the documentation of this file.00001
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,
00013 int pixelROCCols,
00014 int BIG_PIX_PER_ROC_X,
00015 int BIG_PIX_PER_ROC_Y,
00016 int pixelROCsInX, int pixelROCsInY )
00017 {
00018 float width = bs->width();
00019 float length = bs->length();
00020
00021
00022 int nrows = pixelROCRows * pixelROCsInX;
00023 int ncols = pixelROCCols * pixelROCsInY;
00024
00025
00026
00027 float pitchX = width /(nrows+pixelROCsInX*BIG_PIX_PER_ROC_X);
00028
00029 float pitchY = length/(ncols+pixelROCsInY*BIG_PIX_PER_ROC_Y);
00030
00031 return ( new RectangularPixelTopology( nrows, ncols, pitchX, pitchY,
00032 upgradeGeometry,
00033 pixelROCRows,
00034 pixelROCCols,
00035 BIG_PIX_PER_ROC_X,
00036 BIG_PIX_PER_ROC_Y,
00037 pixelROCsInX, pixelROCsInY ));
00038 }