Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-17 03:00:22

0001 //#define EDM_ML_DEBUG
0002 
0003 // Make the change for "big" pixels. 3/06 d.k.
0004 #include "Geometry/MTDGeometryBuilder/interface/MTDPixelTopologyBuilder.h"
0005 #include "Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h"
0006 #include "DataFormats/GeometrySurface/interface/Bounds.h"
0007 
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 
0010 MTDPixelTopologyBuilder::MTDPixelTopologyBuilder(void) {}
0011 
0012 PixelTopology* MTDPixelTopologyBuilder::build(const Bounds* bs,
0013                                               int pixelROCRows,  // Num of Rows per ROC
0014                                               int pixelROCCols,  // Num of Cols per ROC
0015                                               int pixelROCsInX,
0016                                               int pixelROCsInY,
0017                                               int GAPxInterpad,
0018                                               int GAPxBorder,
0019                                               int GAPyInterpad,
0020                                               int GAPyBorder) {
0021   float width = bs->width();    // module width = Xsize
0022   float length = bs->length();  // module length = Ysize
0023 
0024   // Number of pixel rows (x) and columns (y) per module
0025   int nrows = pixelROCRows * pixelROCsInX;
0026   int ncols = pixelROCCols * pixelROCsInY;
0027 
0028   float pitchX = width / nrows;
0029   float pitchY = length / ncols;
0030 
0031   float micronsTocm = 1e-4;
0032   float gapxinterpad = float(GAPxInterpad) * micronsTocm;  //Convert to cm
0033   float gapyinterpad = float(GAPyInterpad) * micronsTocm;  //Convert to cm
0034   float gapxborder = float(GAPxBorder) * micronsTocm;      //Convert to cm
0035   float gapyborder = float(GAPyBorder) * micronsTocm;      //Convert to cm
0036 
0037 #ifdef EDM_ML_DEBUG
0038   edm::LogInfo("MTDPixelTopologyBuilder")
0039       << std::fixed << "Building topology for module of width(X) = " << std::setw(10) << width
0040       << " length(Y) = " << std::setw(10) << length << "\n Rows per ROC   = " << std::setw(10) << pixelROCRows
0041       << " Cols per ROC   = " << std::setw(10) << pixelROCCols << "\n ROCs in X      = " << std::setw(10)
0042       << pixelROCsInX << " ROCs in Y      = " << std::setw(10) << pixelROCsInY
0043       << "\n # pixel rows X = " << std::setw(10) << nrows << " # pixel cols Y = " << std::setw(10) << ncols
0044       << "\n pitch in X     = " << std::setw(10) << pitchX << " # pitch in Y   = " << std::setw(10) << pitchY
0045       << "\n Interpad gap in X   = " << std::setw(10) << gapxinterpad << " # Interpad gap in Y   = " << std::setw(10)
0046       << gapyinterpad << "\n Border gap in X   = " << std::setw(10) << gapxborder
0047       << " # Border gap in Y   = " << std::setw(10) << gapyborder;
0048 #endif
0049 
0050   return (new RectangularMTDTopology(nrows,
0051                                      ncols,
0052                                      pitchX,
0053                                      pitchY,
0054                                      pixelROCRows,  // (int)rocRow
0055                                      pixelROCCols,  // (int)rocCol
0056                                      pixelROCsInX,
0057                                      pixelROCsInY,
0058                                      gapxinterpad,
0059                                      gapxborder,
0060                                      gapyinterpad,
0061                                      gapyborder));
0062 }