49 #endif // EDM_ML_DEBUG 52 int iybin =
int(newybin);
53 float fractionY = newybin - iybin;
68 LogDebug(
"RectangularPixelTopology") <<
" very bad, newbiny " << iybin0 <<
"\n" 70 << iybin <<
" " << fractionY <<
" " << iybin0 <<
" " << numROC;
72 #endif // EDM_ML_DEBUG 75 iybin0 = (iybin % 54);
80 fractionY = (fractionY + 1.) / 2.;
81 }
else if (iybin0 == 52) {
83 fractionY = fractionY / 2.;
84 }
else if (iybin0 > 1) {
86 }
else if (iybin0 == 1) {
88 fractionY = (fractionY + 1.) / 2.;
89 }
else if (iybin0 == 0) {
91 fractionY = fractionY / 2.;
94 mpY =
float(numROC * 52. + iybin0) + fractionY;
99 if (mpY < 0. || mpY >= 416.) {
100 LogDebug(
"RectangularPixelTopology") <<
" bad pix y " << mpY <<
"\n" 102 <<
" " << fractionY <<
" " << iybin0 <<
" " << numROC;
104 #endif // EDM_ML_DEBUG 108 int ixbin =
int(newxbin);
109 float fractionX = newxbin - ixbin;
113 if (ixbin > 161 || ixbin < 0)
115 LogDebug(
"RectangularPixelTopology") <<
" very bad, newbinx " << ixbin <<
"\n" 119 #endif // EDM_ML_DEBUG 124 }
else if (ixbin == 82) {
126 fractionX = (fractionX + 1.) / 2.;
127 }
else if (ixbin == 81) {
129 fractionX = fractionX / 2.;
130 }
else if (ixbin == 80) {
132 fractionX = (fractionX + 1.) / 2.;
133 }
else if (ixbin == 79) {
135 fractionX = fractionX / 2.;
139 float mpX =
float(ixbin) + fractionX;
143 if (mpX < 0. || mpX >= 160.) {
144 LogDebug(
"RectangularPixelTopology") <<
" bad pix x " << mpX <<
"\n" 148 #endif // EDM_ML_DEBUG 150 return std::pair<float, float>(mpX, mpY);
166 debugstr <<
" wrong mp y, fix " << mpy <<
" " << 0 <<
"\n";
174 debugstr <<
" wrong mp x, fix " << mpx <<
" " << 0 <<
"\n";
183 #endif // EDM_ML_DEBUG 197 int binoffx =
int(mpx);
198 float fractionX = mpx -
float(binoffx);
205 LogDebug(
"RectangularPixelTopology")
206 <<
" very bad, binx " << binoffx <<
"\n" 207 << mpx <<
" " << binoffx <<
" " << fractionX <<
" " << local_pitchx <<
" " <<
m_xoffset <<
"\n";
212 binoffx = binoffx + 2;
213 }
else if (binoffx == 80) {
214 binoffx = binoffx + 1;
216 }
else if (binoffx == 79) {
217 binoffx = binoffx + 0;
226 LogDebug(
"RectangularPixelTopology")
227 <<
" very bad, binx " << binoffx <<
"\n" 228 << mpx <<
" " << binoffx <<
" " << fractionX <<
" " << local_pitchx <<
" " <<
m_xoffset;
237 if (lpX < m_xoffset || lpX > (-
m_xoffset)) {
238 LogDebug(
"RectangularPixelTopology") <<
" bad lp x " << lpX <<
"\n" 239 << mpx <<
" " << binoffx <<
" " << fractionX <<
" " << local_pitchx <<
" " 242 #endif // EDM_ML_DEBUG 250 int binoffy =
int(mpy);
251 float fractionY = mpy -
float(binoffy);
258 LogDebug(
"RectangularPixelTopology")
259 <<
" very bad, biny " << binoffy <<
"\n" 260 << mpy <<
" " << binoffy <<
" " << fractionY <<
" " << local_pitchy <<
" " <<
m_yoffset;
264 constexpr int bigYIndeces[]{0, 51, 52, 103, 104, 155, 156, 207, 208, 259, 260, 311, 312, 363, 364, 415, 416, 511};
265 auto const j =
std::lower_bound(std::begin(bigYIndeces), std::end(bigYIndeces), binoffy);
268 binoffy += (
j - bigYIndeces);
276 if (lpY < m_yoffset || lpY > (-
m_yoffset)) {
277 LogDebug(
"RectangularPixelTopology") <<
" bad lp y " << lpY <<
"\n" 278 << mpy <<
" " << binoffy <<
" " << fractionY <<
" " << local_pitchy <<
" " 281 #endif // EDM_ML_DEBUG 290 int binoffy =
int(mp.
y());
295 int binoffx =
int(mp.
x());
310 int iybin0 = iybin % 54;
312 if ((iybin0 <= 1) | (iybin0 >= 52))
317 if ((ixbin >= 79) & (ixbin <= 82))
LocalPoint localPosition(const MeasurementPoint &mp) const override
Point3DBase< Scalar, LocalTag > LocalPoint
std::pair< float, float > pixel(const LocalPoint &p) const override
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
bool isItBigPixelInX(const int ixbin) const override
float localY(const float mpY) const override
bool isItBigPixelInY(const int iybin) const override
float localX(const float mpX) const override
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override