CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RectangularMTDTopology Class Referencefinal

#include <RectangularMTDTopology.h>

Inheritance diagram for RectangularMTDTopology:
PixelTopology Topology

Public Member Functions

int channel (const LocalPoint &lp) const override
 
int colsperroc () const override
 
bool containsBigPixelInX (int ixmin, int ixmax) const override
 
bool containsBigPixelInY (int iymin, int iymax) const override
 
float gapxBorder () const
 
float gapxBorderFrac () const
 
float gapxInterpad () const
 
float gapxInterpadFrac () const
 
float gapyBorder () const
 
float gapyBorderFrac () const
 
float gapyInterpad () const
 
float gapyInterpadFrac () const
 
bool isInPixel (const LocalPoint &p) const
 
bool isItBigPixelInX (const int ixbin) const override
 
bool isItBigPixelInY (const int iybin) const override
 
bool isItEdgePixel (int ixbin, int iybin) const override
 
bool isItEdgePixelInX (int ixbin) const override
 
bool isItEdgePixelInY (int iybin) const override
 
LocalError localError (const MeasurementPoint &, const MeasurementError &) const override
 
LocalPoint localPosition (const MeasurementPoint &mp) const override
 
float localX (const float mpX) const override
 
float localY (const float mpY) const override
 
MeasurementError measurementError (const LocalPoint &, const LocalError &) const override
 
MeasurementPoint measurementPosition (const LocalPoint &lp) const override
 
LocalPoint moduleToPixelLocalPoint (const LocalPoint &mlp) const
 
int ncolumns () const override
 
int nrows () const override
 
std::pair< float, float > pitch () const override
 
std::pair< float, float > pixel (const LocalPoint &p) const override
 
LocalPoint pixelToModuleLocalPoint (const LocalPoint &plp, int row, int col) const
 
LocalPoint pixelToModuleLocalPoint (const LocalPoint &plp, int channel) const
 
 RectangularMTDTopology (int nrows, int ncols, float pitchx, float pitchy, int ROWS_PER_ROC, int COLS_PER_ROC, int ROCS_X, int ROCS_Y, float GAPxInterpad, float GAPxBorder, float GAPyInterpad, float GAPyBorder)
 
int rocsX () const override
 
int rocsY () const override
 
int rowsperroc () const override
 
float xoffset () const
 
float yoffset () const
 
- Public Member Functions inherited from PixelTopology
virtual float localX (const float mpX, const Topology::LocalTrackPred &) const
 
virtual float localY (const float mpY, const Topology::LocalTrackPred &) const
 
virtual std::pair< float, float > pixel (const LocalPoint &p, const Topology::LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
 ~PixelTopology () override
 
- Public Member Functions inherited from Topology
virtual int channel (const LocalPoint &lp, const LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
virtual LocalError localError (const MeasurementPoint &mp, const MeasurementError &me, const LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
virtual LocalPoint localPosition (const MeasurementPoint &mp, const LocalTrackPred &) const
 conversion taking also the angle from the predicted track state More...
 
virtual MeasurementError measurementError (const LocalPoint &lp, const LocalError &le, const LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
virtual MeasurementPoint measurementPosition (const LocalPoint &lp, const LocalTrackAngles &) const
 conversion taking also the angle from the track state More...
 
virtual ~Topology ()
 

Private Attributes

int m_COLS_PER_ROC
 
float m_GAPxBorder
 
float m_GAPxBorderFrac
 
float m_GAPxInterpad
 
float m_GAPxInterpadFrac
 
float m_GAPyBorder
 
float m_GAPyBorderFrac
 
float m_GAPyInterpad
 
float m_GAPyInterpadFrac
 
int m_ncols
 
int m_nrows
 
float m_pitchx
 
float m_pitchy
 
int m_ROCS_X
 
int m_ROCS_Y
 
int m_ROWS_PER_ROC
 
float m_xoffset
 
float m_yoffset
 

Additional Inherited Members

- Public Types inherited from Topology
typedef Point2DBase< double, LocalTagLocal2DPoint
 
typedef Vector2D::MathVector MathVector2D
 
typedef Basic2DVector< double > Vector2D
 

Detailed Description

Topology for rectangular pixel detector with BIG pixels.

Definition at line 39 of file RectangularMTDTopology.h.

Constructor & Destructor Documentation

◆ RectangularMTDTopology()

RectangularMTDTopology::RectangularMTDTopology ( int  nrows,
int  ncols,
float  pitchx,
float  pitchy,
int  ROWS_PER_ROC,
int  COLS_PER_ROC,
int  ROCS_X,
int  ROCS_Y,
float  GAPxInterpad,
float  GAPxBorder,
float  GAPyInterpad,
float  GAPyBorder 
)
inline

Definition at line 42 of file RectangularMTDTopology.h.

References m_GAPxBorder, m_GAPxBorderFrac, m_GAPxInterpad, m_GAPxInterpadFrac, m_GAPyBorder, m_GAPyBorderFrac, m_GAPyInterpad, m_GAPyInterpadFrac, m_ncols, m_nrows, m_pitchx, m_pitchy, m_xoffset, and m_yoffset.

54  : m_pitchx(pitchx),
55  m_pitchy(pitchy),
56  m_nrows(nrows),
57  m_ncols(ncols),
58  m_ROWS_PER_ROC(ROWS_PER_ROC), // Num of Rows per ROC
59  m_COLS_PER_ROC(COLS_PER_ROC), // Num of Cols per ROC
60  m_ROCS_X(ROCS_X), // 2 for SLHC
61  m_ROCS_Y(ROCS_Y), // 8 for SLHC
62  m_GAPxInterpad(GAPxInterpad),
63  m_GAPxBorder(GAPxBorder),
64  m_GAPyInterpad(GAPyInterpad),
65  m_GAPyBorder(GAPyBorder) {
66  m_xoffset = -(m_nrows / 2.) * m_pitchx;
67  m_yoffset = -(m_ncols / 2.) * m_pitchy;
72  }
int nrows() const override

Member Function Documentation

◆ channel()

int RectangularMTDTopology::channel ( const LocalPoint lp) const
inlineoverridevirtual

Implements Topology.

Definition at line 98 of file RectangularMTDTopology.h.

References AlCaHLTBitMon_ParallelJobs::p, pixel(), and MTDChannelIdentifier::pixelToChannel().

Referenced by pixelToModuleLocalPoint().

98  {
99  std::pair<float, float> p = pixel(lp);
100  return MTDChannelIdentifier::pixelToChannel(int(p.first), int(p.second));
101  }
static int pixelToChannel(int row, int col)
std::pair< float, float > pixel(const LocalPoint &p) const override

◆ colsperroc()

int RectangularMTDTopology::colsperroc ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 162 of file RectangularMTDTopology.h.

References m_COLS_PER_ROC.

◆ containsBigPixelInX()

bool RectangularMTDTopology::containsBigPixelInX ( int  ixmin,
int  ixmax 
) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 129 of file RectangularMTDTopology.h.

129 { return false; }

◆ containsBigPixelInY()

bool RectangularMTDTopology::containsBigPixelInY ( int  iymin,
int  iymax 
) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 131 of file RectangularMTDTopology.h.

131 { return false; }

◆ gapxBorder()

float RectangularMTDTopology::gapxBorder ( ) const
inline

Definition at line 167 of file RectangularMTDTopology.h.

References m_GAPxBorder.

167 { return m_GAPxBorder; } // Value returned in cm

◆ gapxBorderFrac()

float RectangularMTDTopology::gapxBorderFrac ( ) const
inline

Definition at line 171 of file RectangularMTDTopology.h.

References m_GAPxBorderFrac.

◆ gapxInterpad()

float RectangularMTDTopology::gapxInterpad ( ) const
inline

Definition at line 165 of file RectangularMTDTopology.h.

References m_GAPxInterpad.

165 { return m_GAPxInterpad; } // Value returned in cm

◆ gapxInterpadFrac()

float RectangularMTDTopology::gapxInterpadFrac ( ) const
inline

Definition at line 169 of file RectangularMTDTopology.h.

References m_GAPxInterpadFrac.

◆ gapyBorder()

float RectangularMTDTopology::gapyBorder ( ) const
inline

Definition at line 168 of file RectangularMTDTopology.h.

References m_GAPyBorder.

168 { return m_GAPyBorder; } // Value returned in cm

◆ gapyBorderFrac()

float RectangularMTDTopology::gapyBorderFrac ( ) const
inline

Definition at line 172 of file RectangularMTDTopology.h.

References m_GAPyBorderFrac.

◆ gapyInterpad()

float RectangularMTDTopology::gapyInterpad ( ) const
inline

Definition at line 166 of file RectangularMTDTopology.h.

References m_GAPyInterpad.

166 { return m_GAPyInterpad; } // Value returned in cm

◆ gapyInterpadFrac()

float RectangularMTDTopology::gapyInterpadFrac ( ) const
inline

Definition at line 170 of file RectangularMTDTopology.h.

References m_GAPyInterpadFrac.

◆ isInPixel()

bool RectangularMTDTopology::isInPixel ( const LocalPoint p) const

Definition at line 20 of file RectangularMTDTopology.cc.

References m_GAPxBorderFrac, m_GAPxInterpadFrac, m_GAPyBorderFrac, m_GAPyInterpadFrac, m_ncols, m_nrows, AlCaHLTBitMon_ParallelJobs::p, and pixel().

Referenced by ETLDeviceSim::getHitsResponse().

20  {
21  bool isInside = true;
22  const auto& thepixel = pixel(p);
23  const int ixbin = static_cast<int>(thepixel.first);
24  const int iybin = static_cast<int>(thepixel.second);
25  const float fractionX = thepixel.first - ixbin;
26  const float fractionY = thepixel.second - iybin;
27  if ((fractionX > 1.0 - m_GAPxInterpadFrac || fractionX < m_GAPxInterpadFrac) ||
28  (ixbin == 0 && fractionX < m_GAPxBorderFrac) || (ixbin == m_nrows - 1 && fractionX > 1.0 - m_GAPxBorderFrac)) {
29  isInside = false;
30  }
31  if ((fractionY > 1.0 - m_GAPyInterpadFrac || fractionY < m_GAPyInterpadFrac) ||
32  (iybin == 0 && fractionY < m_GAPyBorderFrac) || (iybin == m_ncols - 1 && fractionY > 1.0 - m_GAPyBorderFrac)) {
33  isInside = false;
34  }
35  return isInside;
36 }
std::pair< float, float > pixel(const LocalPoint &p) const override

◆ isItBigPixelInX()

bool RectangularMTDTopology::isItBigPixelInX ( const int  ixbin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 123 of file RectangularMTDTopology.h.

123 { return false; }

◆ isItBigPixelInY()

bool RectangularMTDTopology::isItBigPixelInY ( const int  iybin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 125 of file RectangularMTDTopology.h.

125 { return false; }

◆ isItEdgePixel()

bool RectangularMTDTopology::isItEdgePixel ( int  ixbin,
int  iybin 
) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 138 of file RectangularMTDTopology.h.

References isItEdgePixelInX(), and isItEdgePixelInY().

138  {
139  return (isItEdgePixelInX(ixbin) || isItEdgePixelInY(iybin));
140  }
bool isItEdgePixelInX(int ixbin) const override
bool isItEdgePixelInY(int iybin) const override

◆ isItEdgePixelInX()

bool RectangularMTDTopology::isItEdgePixelInX ( int  ixbin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 134 of file RectangularMTDTopology.h.

References m_nrows.

Referenced by isItEdgePixel().

134 { return ((ixbin == 0) | (ixbin == (m_nrows - 1))); }

◆ isItEdgePixelInY()

bool RectangularMTDTopology::isItEdgePixelInY ( int  iybin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 136 of file RectangularMTDTopology.h.

References m_ncols.

Referenced by isItEdgePixel().

136 { return ((iybin == 0) | (iybin == (m_ncols - 1))); }

◆ localError()

LocalError RectangularMTDTopology::localError ( const MeasurementPoint mp,
const MeasurementError me 
) const
overridevirtual

◆ localPosition()

LocalPoint RectangularMTDTopology::localPosition ( const MeasurementPoint mp) const
overridevirtual

Implements Topology.

Definition at line 41 of file RectangularMTDTopology.cc.

References localX(), localY(), PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

41  {
42  float mpy = mp.y(); // measurements
43  float mpx = mp.x();
44 
45  float lpY = localY(mpy);
46  float lpX = localX(mpx);
47 
48  // Return it as a LocalPoint
49  return LocalPoint(lpX, lpY);
50 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
T x() const
Definition: PV2DBase.h:43
T y() const
Definition: PV2DBase.h:44
float localX(const float mpX) const override
float localY(const float mpY) const override

◆ localX()

float RectangularMTDTopology::localX ( const float  mpX) const
overridevirtual

Implements PixelTopology.

Definition at line 55 of file RectangularMTDTopology.cc.

References m_pitchx, and m_xoffset.

Referenced by EtlLocalRecoValidation::analyze(), and localPosition().

55  {
56  // The final position in local coordinates
57  float lpX = (mpx + 0.5f) * m_pitchx + m_xoffset;
58 
59  return lpX;
60 }

◆ localY()

float RectangularMTDTopology::localY ( const float  mpY) const
overridevirtual

Implements PixelTopology.

Definition at line 62 of file RectangularMTDTopology.cc.

References m_pitchy, and m_yoffset.

Referenced by EtlLocalRecoValidation::analyze(), and localPosition().

62  {
63  // The final position in local coordinates
64  float lpY = (mpy + 0.5f) * m_pitchy + m_yoffset;
65 
66  return lpY;
67 }

◆ measurementError()

MeasurementError RectangularMTDTopology::measurementError ( const LocalPoint lp,
const LocalError le 
) const
overridevirtual

◆ measurementPosition()

MeasurementPoint RectangularMTDTopology::measurementPosition ( const LocalPoint lp) const
inlineoverridevirtual

Implements Topology.

Definition at line 79 of file RectangularMTDTopology.h.

References AlCaHLTBitMon_ParallelJobs::p, and pixel().

Referenced by BTLRecHitsErrorEstimatorIM::localError().

79  {
80  std::pair<float, float> p = pixel(lp);
81  return MeasurementPoint(p.first, p.second);
82  }
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
std::pair< float, float > pixel(const LocalPoint &p) const override

◆ moduleToPixelLocalPoint()

LocalPoint RectangularMTDTopology::moduleToPixelLocalPoint ( const LocalPoint mlp) const
inline

Definition at line 106 of file RectangularMTDTopology.h.

References createfilelist::int, m_pitchx, m_pitchy, m_xoffset, m_yoffset, AlCaHLTBitMon_ParallelJobs::p, pixel(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

106  {
107  std::pair<float, float> p = pixel(mlp);
108  return LocalPoint(mlp.x() - (m_xoffset + (int(p.first) + 0.5f) * m_pitchx),
109  mlp.y() - (m_yoffset + (int(p.second) + 0.5f) * m_pitchy),
110  mlp.z());
111  }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
std::pair< float, float > pixel(const LocalPoint &p) const override

◆ ncolumns()

int RectangularMTDTopology::ncolumns ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 154 of file RectangularMTDTopology.h.

References m_ncols.

Referenced by MTDThresholdClusterizer::setup().

154 { return (m_ncols); }

◆ nrows()

int RectangularMTDTopology::nrows ( ) const
inlineoverridevirtual

◆ pitch()

std::pair<float, float> RectangularMTDTopology::pitch ( ) const
inlineoverridevirtual

◆ pixel()

std::pair< float, float > RectangularMTDTopology::pixel ( const LocalPoint p) const
overridevirtual

◆ pixelToModuleLocalPoint() [1/2]

LocalPoint RectangularMTDTopology::pixelToModuleLocalPoint ( const LocalPoint plp,
int  row,
int  col 
) const
inline

◆ pixelToModuleLocalPoint() [2/2]

LocalPoint RectangularMTDTopology::pixelToModuleLocalPoint ( const LocalPoint plp,
int  channel 
) const
inline

Definition at line 116 of file RectangularMTDTopology.h.

References channel(), MTDChannelIdentifier::channelToPixel(), AlCaHLTBitMon_ParallelJobs::p, and pixelToModuleLocalPoint().

116  {
117  std::pair<int, int> p = MTDChannelIdentifier::channelToPixel(channel);
118  return pixelToModuleLocalPoint(plp, p.first, p.second);
119  }
int channel(const LocalPoint &lp) const override
static std::pair< int, int > channelToPixel(int ch)
LocalPoint pixelToModuleLocalPoint(const LocalPoint &plp, int row, int col) const

◆ rocsX()

int RectangularMTDTopology::rocsX ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 158 of file RectangularMTDTopology.h.

References m_ROCS_X.

◆ rocsY()

int RectangularMTDTopology::rocsY ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 156 of file RectangularMTDTopology.h.

References m_ROCS_Y.

◆ rowsperroc()

int RectangularMTDTopology::rowsperroc ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 160 of file RectangularMTDTopology.h.

References m_ROWS_PER_ROC.

◆ xoffset()

float RectangularMTDTopology::xoffset ( ) const
inline

Definition at line 163 of file RectangularMTDTopology.h.

References m_xoffset.

Referenced by FWRecoGeometryESProducer::ADD_MTD_TOPOLOGY().

◆ yoffset()

float RectangularMTDTopology::yoffset ( ) const
inline

Definition at line 164 of file RectangularMTDTopology.h.

References m_yoffset.

Referenced by FWRecoGeometryESProducer::ADD_MTD_TOPOLOGY().

Member Data Documentation

◆ m_COLS_PER_ROC

int RectangularMTDTopology::m_COLS_PER_ROC
private

Definition at line 182 of file RectangularMTDTopology.h.

Referenced by colsperroc().

◆ m_GAPxBorder

float RectangularMTDTopology::m_GAPxBorder
private

Definition at line 186 of file RectangularMTDTopology.h.

Referenced by gapxBorder(), and RectangularMTDTopology().

◆ m_GAPxBorderFrac

float RectangularMTDTopology::m_GAPxBorderFrac
private

Definition at line 190 of file RectangularMTDTopology.h.

Referenced by gapxBorderFrac(), isInPixel(), and RectangularMTDTopology().

◆ m_GAPxInterpad

float RectangularMTDTopology::m_GAPxInterpad
private

Definition at line 185 of file RectangularMTDTopology.h.

Referenced by gapxInterpad(), and RectangularMTDTopology().

◆ m_GAPxInterpadFrac

float RectangularMTDTopology::m_GAPxInterpadFrac
private

Definition at line 189 of file RectangularMTDTopology.h.

Referenced by gapxInterpadFrac(), isInPixel(), and RectangularMTDTopology().

◆ m_GAPyBorder

float RectangularMTDTopology::m_GAPyBorder
private

Definition at line 188 of file RectangularMTDTopology.h.

Referenced by gapyBorder(), and RectangularMTDTopology().

◆ m_GAPyBorderFrac

float RectangularMTDTopology::m_GAPyBorderFrac
private

Definition at line 192 of file RectangularMTDTopology.h.

Referenced by gapyBorderFrac(), isInPixel(), and RectangularMTDTopology().

◆ m_GAPyInterpad

float RectangularMTDTopology::m_GAPyInterpad
private

Definition at line 187 of file RectangularMTDTopology.h.

Referenced by gapyInterpad(), and RectangularMTDTopology().

◆ m_GAPyInterpadFrac

float RectangularMTDTopology::m_GAPyInterpadFrac
private

Definition at line 191 of file RectangularMTDTopology.h.

Referenced by gapyInterpadFrac(), isInPixel(), and RectangularMTDTopology().

◆ m_ncols

int RectangularMTDTopology::m_ncols
private

◆ m_nrows

int RectangularMTDTopology::m_nrows
private

◆ m_pitchx

float RectangularMTDTopology::m_pitchx
private

◆ m_pitchy

float RectangularMTDTopology::m_pitchy
private

◆ m_ROCS_X

int RectangularMTDTopology::m_ROCS_X
private

Definition at line 183 of file RectangularMTDTopology.h.

Referenced by rocsX().

◆ m_ROCS_Y

int RectangularMTDTopology::m_ROCS_Y
private

Definition at line 184 of file RectangularMTDTopology.h.

Referenced by rocsY().

◆ m_ROWS_PER_ROC

int RectangularMTDTopology::m_ROWS_PER_ROC
private

Definition at line 181 of file RectangularMTDTopology.h.

Referenced by rowsperroc().

◆ m_xoffset

float RectangularMTDTopology::m_xoffset
private

◆ m_yoffset

float RectangularMTDTopology::m_yoffset
private