File indexing completed on 2024-05-22 04:03:05
0001
0002 #include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyBuilder.h"
0003 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
0004 #include "DataFormats/GeometrySurface/interface/Bounds.h"
0005
0006 PixelTopologyBuilder::PixelTopologyBuilder(void) {}
0007
0008 PixelTopology* PixelTopologyBuilder::build(
0009 const Bounds* bs,
0010 int pixelROCRows,
0011 int pixelROCCols,
0012 int BIG_PIX_PER_ROC_X,
0013 int BIG_PIX_PER_ROC_Y,
0014 int pixelROCsInX,
0015 int pixelROCsInY) {
0016 float width = bs->width();
0017 float length = bs->length();
0018
0019
0020 int nrows = pixelROCRows * pixelROCsInX;
0021 int ncols = pixelROCCols * pixelROCsInY;
0022
0023
0024
0025 float pitchX = width / (nrows + pixelROCsInX * BIG_PIX_PER_ROC_X);
0026
0027 float pitchY = length / (ncols + pixelROCsInY * BIG_PIX_PER_ROC_Y);
0028
0029 return (new RectangularPixelTopology(nrows,
0030 ncols,
0031 pitchX,
0032 pitchY,
0033 pixelROCRows,
0034 pixelROCCols,
0035 BIG_PIX_PER_ROC_X,
0036 BIG_PIX_PER_ROC_Y,
0037 pixelROCsInX,
0038 pixelROCsInY));
0039 }