CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 isBricked () const override
 
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,
LocalTag
Local2DPoint
 
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 ( 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

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().

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
int RectangularMTDTopology::colsperroc ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 162 of file RectangularMTDTopology.h.

References m_COLS_PER_ROC.

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

Implements PixelTopology.

Definition at line 129 of file RectangularMTDTopology.h.

129 { return false; }
bool RectangularMTDTopology::containsBigPixelInY ( int  iymin,
int  iymax 
) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 131 of file RectangularMTDTopology.h.

131 { return false; }
float RectangularMTDTopology::gapxBorder ( ) const
inline

Definition at line 167 of file RectangularMTDTopology.h.

References m_GAPxBorder.

167 { return m_GAPxBorder; } // Value returned in cm
float RectangularMTDTopology::gapxBorderFrac ( ) const
inline

Definition at line 171 of file RectangularMTDTopology.h.

References m_GAPxBorderFrac.

float RectangularMTDTopology::gapxInterpad ( ) const
inline

Definition at line 165 of file RectangularMTDTopology.h.

References m_GAPxInterpad.

165 { return m_GAPxInterpad; } // Value returned in cm
float RectangularMTDTopology::gapxInterpadFrac ( ) const
inline

Definition at line 169 of file RectangularMTDTopology.h.

References m_GAPxInterpadFrac.

float RectangularMTDTopology::gapyBorder ( ) const
inline

Definition at line 168 of file RectangularMTDTopology.h.

References m_GAPyBorder.

168 { return m_GAPyBorder; } // Value returned in cm
float RectangularMTDTopology::gapyBorderFrac ( ) const
inline

Definition at line 172 of file RectangularMTDTopology.h.

References m_GAPyBorderFrac.

float RectangularMTDTopology::gapyInterpad ( ) const
inline

Definition at line 166 of file RectangularMTDTopology.h.

References m_GAPyInterpad.

166 { return m_GAPyInterpad; } // Value returned in cm
float RectangularMTDTopology::gapyInterpadFrac ( ) const
inline

Definition at line 170 of file RectangularMTDTopology.h.

References m_GAPyInterpadFrac.

bool RectangularMTDTopology::isBricked ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 173 of file RectangularMTDTopology.h.

173 { return false; }
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, 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
bool RectangularMTDTopology::isItBigPixelInX ( const int  ixbin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 123 of file RectangularMTDTopology.h.

123 { return false; }
bool RectangularMTDTopology::isItBigPixelInY ( const int  iybin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 125 of file RectangularMTDTopology.h.

125 { return false; }
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
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))); }
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 RectangularMTDTopology::localError ( const MeasurementPoint mp,
const MeasurementError me 
) const
overridevirtual

Implements Topology.

Definition at line 71 of file RectangularMTDTopology.cc.

References m_pitchx, m_pitchy, MeasurementError::uu(), and MeasurementError::vv().

Referenced by BTLRecHitsErrorEstimatorIM::localError().

71  {
72  return LocalError(me.uu() * float(m_pitchx * m_pitchx), 0, me.vv() * float(m_pitchy * m_pitchy));
73 }
float vv() const
float uu() const
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().

Referenced by MTDThresholdClusterizer::copy_to_buffer().

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 y() const
Definition: PV2DBase.h:44
float localX(const float mpX) const override
float localY(const float mpY) const override
T x() const
Definition: PV2DBase.h:43
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(), BtlLocalRecoValidation::analyze(), and localPosition().

55  {
56  // The final position in local coordinates
57  float lpX = mpx * m_pitchx + m_xoffset;
58 
59  return lpX;
60 }
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(), BtlLocalRecoValidation::analyze(), and localPosition().

62  {
63  // The final position in local coordinates
64  float lpY = mpy * m_pitchy + m_yoffset;
65 
66  return lpY;
67 }
MeasurementError RectangularMTDTopology::measurementError ( const LocalPoint lp,
const LocalError le 
) const
overridevirtual

Implements Topology.

Definition at line 77 of file RectangularMTDTopology.cc.

References m_pitchx, m_pitchy, LocalError::xx(), and LocalError::yy().

77  {
78  return MeasurementError(le.xx() / float(m_pitchx * m_pitchx), 0, le.yy() / float(m_pitchy * m_pitchy));
79 }
float xx() const
Definition: LocalError.h:22
float yy() const
Definition: LocalError.h:24
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
LocalPoint RectangularMTDTopology::moduleToPixelLocalPoint ( const LocalPoint mlp) const
inline

Definition at line 106 of file RectangularMTDTopology.h.

References 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 y() const
Definition: PV3DBase.h:60
std::pair< float, float > pixel(const LocalPoint &p) const override
T z() const
Definition: PV3DBase.h:61
T x() const
Definition: PV3DBase.h:59
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); }
int RectangularMTDTopology::nrows ( ) const
inlineoverridevirtual
std::pair<float, float> RectangularMTDTopology::pitch ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 150 of file RectangularMTDTopology.h.

References m_pitchx, and m_pitchy.

Referenced by MTDThresholdClusterizer::copy_to_buffer(), BTLDeviceSim::getHitsResponse(), and MTDTimeCalib::getTimeCalib().

150 { return std::pair<float, float>(float(m_pitchx), float(m_pitchy)); }
std::pair< float, float > RectangularMTDTopology::pixel ( const LocalPoint p) const
overridevirtual

Implements PixelTopology.

Definition at line 6 of file RectangularMTDTopology.cc.

References m_pitchx, m_pitchy, m_xoffset, m_yoffset, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by channel(), ETLDeviceSim::getHitsResponse(), BTLDeviceSim::getHitsResponse(), isInPixel(), measurementPosition(), and moduleToPixelLocalPoint().

6  {
7  // check limits
8  float py = p.y();
9  float px = p.x();
10 
11  // In Y
12  float newybin = (py - m_yoffset) / m_pitchy;
13  // In X
14  float newxbin = (px - m_xoffset) / m_pitchx;
15 
16  return std::pair<float, float>(newxbin, newybin);
17 }
T y() const
Definition: PV3DBase.h:60
T x() const
Definition: PV3DBase.h:59
LocalPoint RectangularMTDTopology::pixelToModuleLocalPoint ( const LocalPoint plp,
int  row,
int  col 
) const
inline
LocalPoint RectangularMTDTopology::pixelToModuleLocalPoint ( const LocalPoint plp,
int  channel 
) const
inline

Definition at line 116 of file RectangularMTDTopology.h.

References 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
int RectangularMTDTopology::rocsX ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 158 of file RectangularMTDTopology.h.

References m_ROCS_X.

int RectangularMTDTopology::rocsY ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 156 of file RectangularMTDTopology.h.

References m_ROCS_Y.

int RectangularMTDTopology::rowsperroc ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 160 of file RectangularMTDTopology.h.

References m_ROWS_PER_ROC.

float RectangularMTDTopology::xoffset ( ) const
inline

Definition at line 163 of file RectangularMTDTopology.h.

References m_xoffset.

163 { return m_xoffset; }
float RectangularMTDTopology::yoffset ( ) const
inline

Definition at line 164 of file RectangularMTDTopology.h.

References m_yoffset.

164 { return m_yoffset; }

Member Data Documentation

int RectangularMTDTopology::m_COLS_PER_ROC
private

Definition at line 183 of file RectangularMTDTopology.h.

Referenced by colsperroc().

float RectangularMTDTopology::m_GAPxBorder
private

Definition at line 187 of file RectangularMTDTopology.h.

Referenced by gapxBorder(), and RectangularMTDTopology().

float RectangularMTDTopology::m_GAPxBorderFrac
private

Definition at line 191 of file RectangularMTDTopology.h.

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

float RectangularMTDTopology::m_GAPxInterpad
private

Definition at line 186 of file RectangularMTDTopology.h.

Referenced by gapxInterpad(), and RectangularMTDTopology().

float RectangularMTDTopology::m_GAPxInterpadFrac
private

Definition at line 190 of file RectangularMTDTopology.h.

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

float RectangularMTDTopology::m_GAPyBorder
private

Definition at line 189 of file RectangularMTDTopology.h.

Referenced by gapyBorder(), and RectangularMTDTopology().

float RectangularMTDTopology::m_GAPyBorderFrac
private

Definition at line 193 of file RectangularMTDTopology.h.

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

float RectangularMTDTopology::m_GAPyInterpad
private

Definition at line 188 of file RectangularMTDTopology.h.

Referenced by gapyInterpad(), and RectangularMTDTopology().

float RectangularMTDTopology::m_GAPyInterpadFrac
private

Definition at line 192 of file RectangularMTDTopology.h.

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

int RectangularMTDTopology::m_ncols
private
int RectangularMTDTopology::m_nrows
private
float RectangularMTDTopology::m_pitchx
private
float RectangularMTDTopology::m_pitchy
private
int RectangularMTDTopology::m_ROCS_X
private

Definition at line 184 of file RectangularMTDTopology.h.

Referenced by rocsX().

int RectangularMTDTopology::m_ROCS_Y
private

Definition at line 185 of file RectangularMTDTopology.h.

Referenced by rocsY().

int RectangularMTDTopology::m_ROWS_PER_ROC
private

Definition at line 182 of file RectangularMTDTopology.h.

Referenced by rowsperroc().

float RectangularMTDTopology::m_xoffset
private
float RectangularMTDTopology::m_yoffset
private