Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
// Make the change for "big" pixels. 3/06 d.k.
#include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyBuilder.h"
#include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
#include "DataFormats/GeometrySurface/interface/Bounds.h"

PixelTopologyBuilder::PixelTopologyBuilder(void) {}

PixelTopology* PixelTopologyBuilder::build(
    const Bounds* bs,
    int pixelROCRows,       // Num of Rows per ROC
    int pixelROCCols,       // Num of Cols per ROC
    int BIG_PIX_PER_ROC_X,  // in x direction, rows. BIG_PIX_PER_ROC_X = 0 for SLHC
    int BIG_PIX_PER_ROC_Y,  // in y direction, cols. BIG_PIX_PER_ROC_Y = 0 for SLHC
    int pixelROCsInX,
    int pixelROCsInY) {
  float width = bs->width();    // module width = Xsize
  float length = bs->length();  // module length = Ysize

  // Number of pixel rows (x) and columns (y) per module
  int nrows = pixelROCRows * pixelROCsInX;
  int ncols = pixelROCCols * pixelROCsInY;

  // Take into account the large edge pixles
  // 1 big pixel per ROC
  float pitchX = width / (nrows + pixelROCsInX * BIG_PIX_PER_ROC_X);
  // 2 big pixels per ROC
  float pitchY = length / (ncols + pixelROCsInY * BIG_PIX_PER_ROC_Y);

  return (new RectangularPixelTopology(nrows,
                                       ncols,
                                       pitchX,
                                       pitchY,
                                       pixelROCRows,  // (int)rocRow
                                       pixelROCCols,  // (int)rocCol
                                       BIG_PIX_PER_ROC_X,
                                       BIG_PIX_PER_ROC_Y,
                                       pixelROCsInX,
                                       pixelROCsInY));  // (int)rocInX, (int)rocInY
}