CMS 3D CMS Logo

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

#include <RectangularPixelTopology.h>

Inheritance diagram for RectangularPixelTopology:
PixelTopology Topology

Public Member Functions

bool bigpixelsX () const override
 
bool bigpixelsY () const override
 
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
 
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
 
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
 
float pixelFractionInX (const int ixbin) const override
 
float pixelFractionInY (const int iybin) const override
 
 RectangularPixelTopology (int nrows, int ncols, float pitchx, float pitchy, 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)
 
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
 
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 RectangularPixelTopology.h.

Constructor & Destructor Documentation

◆ RectangularPixelTopology()

RectangularPixelTopology::RectangularPixelTopology ( int  nrows,
int  ncols,
float  pitchx,
float  pitchy,
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 
)
inline

Definition at line 42 of file RectangularPixelTopology.h.

References LogDebug, m_COLS_PER_ROC, m_ncols, m_nrows, m_pitchx, m_pitchy, m_ROCS_X, m_ROCS_Y, m_ROWS_PER_ROC, m_xoffset, and m_yoffset.

52  : m_pitchx(pitchx),
53  m_pitchy(pitchy),
54  m_nrows(nrows),
55  m_ncols(ncols),
56  m_ROWS_PER_ROC(ROWS_PER_ROC), // Num of Rows per ROC
57  m_COLS_PER_ROC(COLS_PER_ROC), // Num of Cols per ROC
58  m_ROCS_X(ROCS_X), // 2 for SLHC
59  m_ROCS_Y(ROCS_Y) // 8 for SLHC
60  {
61  // Calculate the edge of the active sensor with respect to the center,
62  // that is simply the half-size.
63  // Take into account large pixels
64  m_xoffset = -(m_nrows + BIG_PIX_PER_ROC_X * m_nrows / ROWS_PER_ROC) / 2. * m_pitchx;
65  m_yoffset = -(m_ncols + BIG_PIX_PER_ROC_Y * m_ncols / COLS_PER_ROC) / 2. * m_pitchy;
66 
67  LogDebug("RectangularPixelTopology") << "nrows " << m_nrows << ", ncols " << m_ncols << ", pitchx " << m_pitchx
68  << ", pitchy " << m_pitchy << ", xoffset " << m_xoffset << ", yoffset "
69  << m_yoffset << ", BIG_PIX_PER_ROC_X " << BIG_PIX_PER_ROC_X
70  << ", BIG_PIX_PER_ROC_Y " << BIG_PIX_PER_ROC_Y << ", ROWS_PER_ROC "
71  << ROWS_PER_ROC << ", COLS_PER_ROC " << COLS_PER_ROC << ", ROCS_X " << ROCS_X
72  << ", ROCS_Y " << ROCS_Y << "\nNROWS " << m_ROWS_PER_ROC * m_ROCS_X
73  << ", NCOL " << m_COLS_PER_ROC * m_ROCS_Y;
74  }
#define LogDebug(id)

Member Function Documentation

◆ bigpixelsX()

bool RectangularPixelTopology::bigpixelsX ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 147 of file RectangularPixelTopology.h.

147 { return false; }

◆ bigpixelsY()

bool RectangularPixelTopology::bigpixelsY ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 148 of file RectangularPixelTopology.h.

148 { return false; }

◆ channel()

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

Implements Topology.

Definition at line 99 of file RectangularPixelTopology.h.

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

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

◆ colsperroc()

int RectangularPixelTopology::colsperroc ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 173 of file RectangularPixelTopology.h.

References m_COLS_PER_ROC.

◆ containsBigPixelInX()

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

Implements PixelTopology.

Definition at line 142 of file RectangularPixelTopology.h.

Referenced by PixelTemplateSmearerBase::smearHit().

142 { return ((ixmin <= 80) & (ixmax >= 79)); }

◆ containsBigPixelInY()

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

Implements PixelTopology.

Definition at line 143 of file RectangularPixelTopology.h.

References isItBigPixelInY().

Referenced by PixelTemplateSmearerBase::smearHit().

143  {
144  return (isItBigPixelInY(iymin) || isItBigPixelInY(iymax) || (iymin / 52) != (iymax / 52));
145  }
bool isItBigPixelInY(const int iybin) const override

◆ isItBigPixelInX()

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

Implements PixelTopology.

Definition at line 113 of file RectangularPixelTopology.h.

Referenced by localError(), and PixelTemplateSmearerBase::smearHit().

113 { return ((ixbin == 79) | (ixbin == 80)); }

◆ isItBigPixelInY()

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

Implements PixelTopology.

Definition at line 115 of file RectangularPixelTopology.h.

Referenced by containsBigPixelInY(), localError(), and PixelTemplateSmearerBase::smearHit().

115  {
116  int iybin0 = iybin % 52;
117  return ((iybin0 == 0) | (iybin0 == 51));
118  }

◆ isItEdgePixel()

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

Implements PixelTopology.

Definition at line 155 of file RectangularPixelTopology.h.

References isItEdgePixelInX(), and isItEdgePixelInY().

155  {
156  return (isItEdgePixelInX(ixbin) || isItEdgePixelInY(iybin));
157  }
bool isItEdgePixelInY(int iybin) const override
bool isItEdgePixelInX(int ixbin) const override

◆ isItEdgePixelInX()

bool RectangularPixelTopology::isItEdgePixelInX ( int  ixbin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 153 of file RectangularPixelTopology.h.

References m_nrows.

Referenced by isItEdgePixel(), and PixelTemplateSmearerBase::smearHit().

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

◆ isItEdgePixelInY()

bool RectangularPixelTopology::isItEdgePixelInY ( int  iybin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 154 of file RectangularPixelTopology.h.

References m_ncols.

Referenced by isItEdgePixel(), and PixelTemplateSmearerBase::smearHit().

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

◆ localError()

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

Implements Topology.

Definition at line 248 of file RectangularPixelTopology.cc.

References nano_mu_digi_cff::float, createfilelist::int, isItBigPixelInX(), isItBigPixelInY(), m_pitchx, m_pitchy, hlt_dqm_clientPB-live_cfg::me, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

248  {
249  float pitchy = m_pitchy;
250  int binoffy = int(mp.y());
251  if (isItBigPixelInY(binoffy))
252  pitchy = 2. * m_pitchy;
253 
254  float pitchx = m_pitchx;
255  int binoffx = int(mp.x());
256  if (isItBigPixelInX(binoffx))
257  pitchx = 2. * m_pitchx;
258 
259  return LocalError(me.uu() * float(pitchx * pitchx), 0, me.vv() * float(pitchy * pitchy));
260 }
T x() const
Definition: PV2DBase.h:43
T y() const
Definition: PV2DBase.h:44
bool isItBigPixelInX(const int ixbin) const override
bool isItBigPixelInY(const int iybin) const override

◆ localPosition()

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

Implements Topology.

Definition at line 138 of file RectangularPixelTopology.cc.

References hcal_dqm_sourceclient-live_cfg::debugstr, EPS, nano_mu_digi_cff::float, localX(), localY(), LogDebug, m_ncols, m_nrows, PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().

Referenced by PixelTemplateSmearerBase::smearHit().

138  {
139  float mpy = mp.y(); // measurements
140  float mpx = mp.x();
141 
142 #ifdef EDM_ML_DEBUG
143 #define EPS 0
144  // check limits
145  std::ostringstream debugstr;
146 
147  if (mpy < 0.) {
148  debugstr << " wrong mp y, fix " << mpy << " " << 0 << "\n";
149  mpy = 0.;
150  }
151  if (mpy >= m_ncols) {
152  debugstr << " wrong mp y, fix " << mpy << " " << m_ncols << "\n";
153  mpy = float(m_ncols) - EPS; // EPS is a small number
154  }
155  if (mpx < 0.) {
156  debugstr << " wrong mp x, fix " << mpx << " " << 0 << "\n";
157  mpx = 0.;
158  }
159  if (mpx >= m_nrows) {
160  debugstr << " wrong mp x, fix " << mpx << " " << m_nrows << "\n";
161  mpx = float(m_nrows) - EPS; // EPS is a small number
162  }
163  if (!debugstr.str().empty())
164  LogDebug("RectangularPixelTopology") << debugstr.str();
165 #endif // EDM_ML_DEBUG
166 
167  float lpY = localY(mpy);
168  float lpX = localX(mpx);
169 
170  // Return it as a LocalPoint
171  return LocalPoint(lpX, lpY);
172 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
#define EPS
T x() const
Definition: PV2DBase.h:43
T y() const
Definition: PV2DBase.h:44
float localY(const float mpY) const override
float localX(const float mpX) const override
#define LogDebug(id)

◆ localX()

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

Implements PixelTopology.

Definition at line 178 of file RectangularPixelTopology.cc.

References nano_mu_digi_cff::float, createfilelist::int, LogDebug, m_pitchx, and m_xoffset.

Referenced by localPosition().

178  {
179  int binoffx = int(mpx); // truncate to int
180  float fractionX = mpx - float(binoffx); // find the fraction
181  float local_pitchx = m_pitchx; // defaultpitch
182 
183  if (binoffx > 80) { // ROC 1 - handles x on edge cluster
184  binoffx = binoffx + 2;
185  } else if (binoffx == 80) { // ROC 1
186  binoffx = binoffx + 1;
187  local_pitchx *= 2;
188  } else if (binoffx == 79) { // ROC 0
189  binoffx = binoffx + 0;
190  local_pitchx *= 2;
191  }
192  // else if (binoffx>=0) { // ROC 0
193  // binoffx=binoffx+0;
194  // }
195 
196 #ifdef EDM_ML_DEBUG
197  if (binoffx < 0) // too small
198  LogDebug("RectangularPixelTopology") << " very bad, binx " << binoffx << "\n"
199  << mpx << " " << binoffx << " " << fractionX << " " << local_pitchx << " "
200  << m_xoffset;
201 #endif
202 
203  // The final position in local coordinates
204  float lpX = float(binoffx * m_pitchx) + fractionX * local_pitchx + m_xoffset;
205 
206 #ifdef EDM_ML_DEBUG
207 
208  if (lpX < m_xoffset || lpX > (-m_xoffset)) {
209  LogDebug("RectangularPixelTopology") << " bad lp x " << lpX << "\n"
210  << mpx << " " << binoffx << " " << fractionX << " " << local_pitchx << " "
211  << m_xoffset;
212  }
213 #endif // EDM_ML_DEBUG
214 
215  return lpX;
216 }
#define LogDebug(id)

◆ localY()

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

Implements PixelTopology.

Definition at line 220 of file RectangularPixelTopology.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), nano_mu_digi_cff::float, createfilelist::int, dqmiolumiharvest::j, LogDebug, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, m_pitchy, and m_yoffset.

Referenced by localPosition().

220  {
221  int binoffy = int(mpy); // truncate to int
222  float fractionY = mpy - float(binoffy); // find the fraction
223  float local_pitchy = m_pitchy; // defaultpitch
224 
225  constexpr int bigYIndeces[]{0, 51, 52, 103, 104, 155, 156, 207, 208, 259, 260, 311, 312, 363, 364, 415, 416, 511};
226  auto const j = std::lower_bound(std::begin(bigYIndeces), std::end(bigYIndeces), binoffy);
227  if (*j == binoffy)
228  local_pitchy *= 2;
229  binoffy += (j - bigYIndeces);
230 
231  // The final position in local coordinates
232  float lpY = float(binoffy * m_pitchy) + fractionY * local_pitchy + m_yoffset;
233 
234 #ifdef EDM_ML_DEBUG
235 
236  if (lpY < m_yoffset || lpY > (-m_yoffset)) {
237  LogDebug("RectangularPixelTopology") << " bad lp y " << lpY << "\n"
238  << mpy << " " << binoffy << " " << fractionY << " " << local_pitchy << " "
239  << m_yoffset;
240  }
241 #endif // EDM_ML_DEBUG
242 
243  return lpY;
244 }
#define LogDebug(id)

◆ measurementError()

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

Implements Topology.

Definition at line 264 of file RectangularPixelTopology.cc.

References nano_mu_digi_cff::float, createfilelist::int, m_pitchx, m_pitchy, m_xoffset, m_yoffset, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

264  {
265  float pitchy = m_pitchy;
266  float pitchx = m_pitchx;
267 
268  int iybin = int((lp.y() - m_yoffset) / m_pitchy); //get bin for equal picth
269  int iybin0 = iybin % 54; //This is just to avoid many ifs by using the periodicy
270  //quasi bins 0,1,52,53 fall into larger pixels
271  if ((iybin0 <= 1) | (iybin0 >= 52))
272  pitchy = 2.f * m_pitchy;
273 
274  int ixbin = int((lp.x() - m_xoffset) / m_pitchx); //get bin for equal pitch
275  //quasi bins 79,80,81,82 fall into the 2 larger pixels
276  if ((ixbin >= 79) & (ixbin <= 82))
277  pitchx = 2.f * m_pitchx;
278 
279  return MeasurementError(le.xx() / float(pitchx * pitchx), 0, le.yy() / float(pitchy * pitchy));
280 }
float yy() const
Definition: LocalError.h:24
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
float xx() const
Definition: LocalError.h:22

◆ measurementPosition()

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

Implements Topology.

Definition at line 81 of file RectangularPixelTopology.h.

References AlCaHLTBitMon_ParallelJobs::p, and pixel().

Referenced by PixelTemplateSmearerBase::smearHit().

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

◆ ncolumns()

int RectangularPixelTopology::ncolumns ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 165 of file RectangularPixelTopology.h.

References m_ncols.

◆ nrows()

int RectangularPixelTopology::nrows ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 163 of file RectangularPixelTopology.h.

References m_nrows.

◆ pitch()

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

◆ pixel()

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

Topology for rectangular pixel detector with BIG pixels.

Implements PixelTopology.

Definition at line 13 of file RectangularPixelTopology.cc.

References hcal_dqm_sourceclient-live_cfg::debugstr, nano_mu_digi_cff::float, createfilelist::int, LogDebug, m_pitchx, m_pitchy, m_xoffset, m_yoffset, AlCaHLTBitMon_ParallelJobs::p, multPhiCorr_741_25nsDY_cfi::px, and multPhiCorr_741_25nsDY_cfi::py.

Referenced by channel(), and measurementPosition().

13  {
14  // check limits
15  float py = p.y();
16  float px = p.x();
17 
18 #ifdef EDM_ML_DEBUG
19 #define EPSCM 0
20 #define EPS 0
21  // This will catch points which are outside the active sensor area.
22  // In the digitizer during the early induce_signal phase non valid
23  // location are passed here. They are cleaned later.
24 
25  std::ostringstream debugstr;
26  debugstr << "py = " << py << ", m_yoffset = " << m_yoffset << "px = " << px << ", m_xoffset = " << m_xoffset << "\n";
27 
28  if (py < m_yoffset) // m_yoffset is negative
29  {
30  debugstr << " wrong lp y " << py << " " << m_yoffset << "\n";
31  py = m_yoffset + EPSCM; // make sure it is in, add an EPS in cm
32  }
33  if (py > -m_yoffset) {
34  debugstr << " wrong lp y " << py << " " << -m_yoffset << "\n";
35  py = -m_yoffset - EPSCM;
36  }
37  if (px < m_xoffset) // m_xoffset is negative
38  {
39  debugstr << " wrong lp x " << px << " " << m_xoffset << "\n";
40  px = m_xoffset + EPSCM;
41  }
42  if (px > -m_xoffset) {
43  debugstr << " wrong lp x " << px << " " << -m_xoffset << "\n";
44  px = -m_xoffset - EPSCM;
45  }
46 
47  if (!debugstr.str().empty())
48  LogDebug("RectangularPixelTopology") << debugstr.str();
49 #endif // EDM_ML_DEBUG
50 
51  float newybin = (py - m_yoffset) / m_pitchy;
52  int iybin = int(newybin);
53  float fractionY = newybin - iybin;
54 
55  // Normalize it all to 1 ROC
56  int iybin0 = 0;
57  int numROC = 0;
58  float mpY = 0.;
59 
60  iybin0 = (iybin % 54); // 0-53
61  numROC = iybin / 54; // 0-7
62 
63  if (iybin0 == 53) { // inside big pixel
64  iybin0 = 51;
65  fractionY = (fractionY + 1.) / 2.;
66  } else if (iybin0 == 52) { // inside big pixel
67  iybin0 = 51;
68  fractionY = fractionY / 2.;
69  } else if (iybin0 > 1) { // inside normal pixel
70  iybin0 = iybin0 - 1;
71  } else if (iybin0 == 1) { // inside big pixel
72  iybin0 = 0;
73  fractionY = (fractionY + 1.) / 2.;
74  } else if (iybin0 == 0) { // inside big pixel
75  iybin0 = 0;
76  fractionY = fractionY / 2.;
77  }
78 
79  mpY = float(numROC * 52. + iybin0) + fractionY;
80 
81 #ifdef EDM_ML_DEBUG
82 
83  if (mpY < 0. || mpY >= 416.) {
84  LogDebug("RectangularPixelTopology") << " bad pix y " << mpY << "\n"
85  << py << " " << m_yoffset << " " << m_pitchy << " " << newybin << " " << iybin
86  << " " << fractionY << " " << iybin0 << " " << numROC;
87  }
88 #endif // EDM_ML_DEBUG
89 
90  // In X
91  float newxbin = (px - m_xoffset) / m_pitchx;
92  int ixbin = int(newxbin);
93  float fractionX = newxbin - ixbin;
94 
95 #ifdef EDM_ML_DEBUG
96 
97  if (ixbin > 161 || ixbin < 0) // ixbin < 0 outside range
98  {
99  LogDebug("RectangularPixelTopology") << " very bad, newbinx " << ixbin << "\n"
100  << px << " " << m_xoffset << " " << m_pitchx << " " << newxbin << " " << ixbin
101  << " " << fractionX;
102  }
103 #endif // EDM_ML_DEBUG
104 
105  if (ixbin > 82) { // inside normal pixel, ROC 1
106  ixbin = ixbin - 2;
107  } else if (ixbin == 82) { // inside bin pixel
108  ixbin = 80;
109  fractionX = (fractionX + 1.) / 2.;
110  } else if (ixbin == 81) { // inside big pixel
111  ixbin = 80;
112  fractionX = fractionX / 2.;
113  } else if (ixbin == 80) { // inside bin pixel, ROC 0
114  ixbin = 79;
115  fractionX = (fractionX + 1.) / 2.;
116  } else if (ixbin == 79) { // inside big pixel
117  ixbin = 79;
118  fractionX = fractionX / 2.;
119  }
120 
121  float mpX = float(ixbin) + fractionX;
122 
123 #ifdef EDM_ML_DEBUG
124 
125  if (mpX < 0. || mpX >= 160.) {
126  LogDebug("RectangularPixelTopology") << " bad pix x " << mpX << "\n"
127  << px << " " << m_xoffset << " " << m_pitchx << " " << newxbin << " " << ixbin
128  << " " << fractionX;
129  }
130 #endif // EDM_ML_DEBUG
131 
132  return std::pair<float, float>(mpX, mpY);
133 }
#define LogDebug(id)

◆ pixelFractionInX()

float RectangularPixelTopology::pixelFractionInX ( const int  ixbin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 119 of file RectangularPixelTopology.h.

119  {
120  if ((ixbin == 79) | (ixbin == 80)) {
121  return 2.0f;
122  } else {
123  return 1.0f;
124  }
125  }

◆ pixelFractionInY()

float RectangularPixelTopology::pixelFractionInY ( const int  iybin) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 127 of file RectangularPixelTopology.h.

127  {
128  int iybin0 = iybin % 52;
129 
130  if ((iybin0 == 0) | (iybin0 == 51)) {
131  return 2.0f;
132  } else {
133  return 1.0f;
134  }
135  }

◆ rocsX()

int RectangularPixelTopology::rocsX ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 169 of file RectangularPixelTopology.h.

References m_ROCS_X.

◆ rocsY()

int RectangularPixelTopology::rocsY ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 167 of file RectangularPixelTopology.h.

References m_ROCS_Y.

◆ rowsperroc()

int RectangularPixelTopology::rowsperroc ( ) const
inlineoverridevirtual

Implements PixelTopology.

Definition at line 171 of file RectangularPixelTopology.h.

References m_ROWS_PER_ROC.

◆ xoffset()

float RectangularPixelTopology::xoffset ( ) const
inline

Definition at line 174 of file RectangularPixelTopology.h.

References m_xoffset.

◆ yoffset()

float RectangularPixelTopology::yoffset ( ) const
inline

Definition at line 175 of file RectangularPixelTopology.h.

References m_yoffset.

Member Data Documentation

◆ m_COLS_PER_ROC

int RectangularPixelTopology::m_COLS_PER_ROC
private

Definition at line 185 of file RectangularPixelTopology.h.

Referenced by colsperroc(), and RectangularPixelTopology().

◆ m_ncols

int RectangularPixelTopology::m_ncols
private

◆ m_nrows

int RectangularPixelTopology::m_nrows
private

◆ m_pitchx

float RectangularPixelTopology::m_pitchx
private

◆ m_pitchy

float RectangularPixelTopology::m_pitchy
private

◆ m_ROCS_X

int RectangularPixelTopology::m_ROCS_X
private

Definition at line 186 of file RectangularPixelTopology.h.

Referenced by RectangularPixelTopology(), and rocsX().

◆ m_ROCS_Y

int RectangularPixelTopology::m_ROCS_Y
private

Definition at line 187 of file RectangularPixelTopology.h.

Referenced by RectangularPixelTopology(), and rocsY().

◆ m_ROWS_PER_ROC

int RectangularPixelTopology::m_ROWS_PER_ROC
private

Definition at line 184 of file RectangularPixelTopology.h.

Referenced by RectangularPixelTopology(), and rowsperroc().

◆ m_xoffset

float RectangularPixelTopology::m_xoffset
private

◆ m_yoffset

float RectangularPixelTopology::m_yoffset
private