Go to the documentation of this file.00001
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 )
00017 {
00018 thePixelROCRows = rocRow;
00019 thePixelROCsInX = rocInX;
00020 thePixelROCCols = rocCol;
00021 thePixelROCsInY = rocInY;
00022
00023 float width = bs->width();
00024 float length = bs->length();
00025
00026
00027 int nrows = int(thePixelROCRows * thePixelROCsInX);
00028 int ncols = int(thePixelROCCols * thePixelROCsInY);
00029
00030
00031
00032
00033
00034
00035 const int BIG_PIX_PER_ROC_X = 1;
00036 const int BIG_PIX_PER_ROC_Y = 2;
00037
00038
00039
00040 float pitchX = width /(float(nrows)+thePixelROCsInX*BIG_PIX_PER_ROC_X);
00041
00042 float pitchY = length/(float(ncols)+thePixelROCsInY*BIG_PIX_PER_ROC_Y);
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 return new RectangularPixelTopology( nrows, ncols, pitchX, pitchY );
00053 }
00054
00055