27 if(hig == ohig && low == olow)
return 0;
28 if(hig >= ohig && low >= olow)
return 1;
29 if(hig <= ohig && low <= olow)
return -1;
39 if(low <
y[0] ||
x[1] ==
x[0])
y[0] = low;
40 if(hig >
y[1] ||
x[1] ==
x[0])
y[1] = hig;
44 int dir = getDirection(low,hig, olow,ohig);
47 if(dir == -2)
return false;
52 {
odir = -2;
return false; }
55 if(
x[1] <=
x[0]+1 ||
odir == 0)
60 olow = low; ohig = hig;
79 struct lessPixel :
public binary_function<SiPixelCluster::Pixel,
80 SiPixelCluster::Pixel,bool>
86 return (a.
x < b.
x) | ((a.
x == b.
x) & (a.
y < b.
y));
95 determineShape(pixelDet, *(recHit.
cluster()), data);
109 x[0] = -1;
x[1] = -1;
110 y[0] = -1; y[1] = -1;
111 olow = -2; ohig = -2;
odir = 0;
117 size_t npixels = cluster.
pixelADC().size();
118 pixels_.reserve(npixels);
119 for(
size_t i=0;
i<npixels; ++
i) {
120 pixels_.push_back(cluster.
pixel(
i));
125 for(
const auto& pixel: pixels_)
128 pos.first = (int)pixel.x;
129 pos.second = (
int)pixel.y;
139 if(processColumn(pos,
true) ==
false)
144 if(pos.second > hig+1)
153 if(processColumn(pos,
false) ==
false)
159 for(
int ix = minPixelRow + 1;
160 ix < maxPixelRow; ix++)
165 for(
int iy = minPixelCol + 1;
166 iy < maxPixelCol; iy++)
189 const int pre_dx =
x[1] -
x[0];
190 const int pre_dy = y[1] - y[0];
191 for(
unsigned int ax = 0;
ax <= px;
ax++)
192 for(
unsigned int ay = 0; ay <= py; ay++)
194 int dx = pre_dx +
ax;
195 int dy = pre_dy + ay;
198 pair<int,int>
s(dx,dy);
void determineShape(const PixelGeomDetUnit &pixelDet, const SiPixelRecHit &recHit, ClusterData &data)
T x() const
Cartesian x coordinate.
virtual bool isItEdgePixelInX(int ixbin) const =0
bool processColumn(std::pair< int, int > pos, bool inTheLoop)
bool operator()(const SiPixelCluster::Pixel &a, const SiPixelCluster::Pixel &b) const
const std::vector< uint16_t > & pixelADC() const
virtual bool isItBigPixelInX(const int ixbin) const =0
ClusterRef cluster() const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
bool hasBigPixelsOnlyInside
Pixel cluster – collection of neighboring pixels above threshold.
virtual bool isItEdgePixelInY(int iybin) const =0
char data[epos_bytes_allocation]
int getDirection(int low, int hig, int olow, int ohig)
void push_back_unchecked(const T &value)
static constexpr size_type capacity() noexcept
virtual bool isItBigPixelInY(const int iybin) const =0