1 #ifndef Geometry_TrackerGeometryBuilder_RectangularPixelTopology_H
2 #define Geometry_TrackerGeometryBuilder_RectangularPixelTopology_H
41 const float EPS = 0.001;
42 const float EPSCM = 0.00001;
56 int ROCS_X,
int ROCS_Y )
61 m_ROWS_PER_ROC( ROWS_PER_ROC ),
62 m_COLS_PER_ROC( COLS_PER_ROC ),
65 m_upgradeGeometry( upgradeGeometry )
70 m_xoffset = -(m_nrows + BIG_PIX_PER_ROC_X*m_nrows/
ROWS_PER_ROC)/2. *
72 m_yoffset = -(m_ncols + BIG_PIX_PER_ROC_Y*m_ncols/
COLS_PER_ROC)/2. *
75 LogDebug(
"RectangularPixelTopology") <<
"nrows " << m_nrows <<
", ncols " << m_ncols <<
", pitchx "
76 << m_pitchx <<
", pitchy " << m_pitchy <<
", xoffset "
77 << m_xoffset <<
", yoffset " << m_yoffset <<
", BIG_PIX_PER_ROC_X "
78 << BIG_PIX_PER_ROC_X <<
", BIG_PIX_PER_ROC_Y " << BIG_PIX_PER_ROC_Y <<
", ROWS_PER_ROC "
79 << ROWS_PER_ROC <<
", COLS_PER_ROC " << COLS_PER_ROC <<
", ROCS_X " << ROCS_X <<
", ROCS_Y " << ROCS_Y
80 <<
"\nNROWS " << m_ROWS_PER_ROC * m_ROCS_X <<
", NCOL " << m_COLS_PER_ROC * m_ROCS_Y;
90 std::pair<float,float>
p =
pixel( lp );
110 std::pair<float,float>
p =
pixel( lp );
118 virtual float localX(
const float mpX )
const;
119 virtual float localY(
const float mpY )
const;
125 return (( m_upgradeGeometry )?(
false):(( ixbin == 79 ) | ( ixbin == 80 )));
129 if unlikely( m_upgradeGeometry )
return false;
131 int iybin0 = iybin%52;
132 return(( iybin0 == 0 ) | ( iybin0 == 51 ));
142 return m_upgradeGeometry ?
false :( (ixmin<=80) & (ixmax>=79) );
145 return m_upgradeGeometry ?
false :
155 return ( (ixbin == 0) | (ixbin == (m_nrows-1)) );
158 return ( (iybin == 0) | (iybin == (m_ncols-1)) );
166 virtual std::pair<float,float>
pitch()
const {
167 return std::pair<float,float>( float(m_pitchx), float(m_pitchy));
187 return m_ROWS_PER_ROC;
191 return m_COLS_PER_ROC;
virtual int channel(const LocalPoint &lp) const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
bool isItEdgePixelInY(int iybin) const
static const int COLS_PER_ROC
virtual int colsperroc() const
static const int BIG_PIX_PER_ROC_Y
bool isItEdgePixel(int ixbin, int iybin) const
RectangularPixelTopology(int nrows, int ncols, float pitchx, float pitchy, bool upgradeGeometry, int ROWS_PER_ROC, int COLS_PER_ROC, int BIG_PIX_PER_ROC_X, int BIG_PIX_PER_ROC_Y, int ROCS_X, int ROCS_Y)
virtual int rocsX() const
virtual std::pair< float, float > pitch() const
static const int ROWS_PER_ROC
virtual MeasurementPoint measurementPosition(const LocalPoint &lp) const
virtual int nrows() const
static const int BIG_PIX_PER_ROC_X
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
virtual bool isItEdgePixelInX(int ixbin) const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
virtual bool isItBigPixelInX(const int ixbin) const
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
virtual int rowsperroc() const
virtual int ncolumns() const
bool isItEdgePixelInX(int ixbin) const
virtual float localX(const float mpX) const =0
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const =0
bool containsBigPixelInY(int iymin, int iymax) const
virtual bool isItEdgePixelInY(int iybin) const =0
virtual bool isItBigPixelInY(const int iybin) const
static int pixelToChannel(int row, int col)
virtual float localY(const float mpY) const =0
bool containsBigPixelInX(int ixmin, int ixmax) const
virtual bool isItBigPixelInY(const int iybin) const =0
Unlimited (trivial) bounds.
virtual int rocsY() const