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;
83 determineShape(pixelDet, *(recHit.
cluster()), data);
99 olow = -2; ohig = -2;
odir = 0;
105 size_t npixels = cluster.
pixelADC().size();
106 pixels_.reserve(npixels);
107 for(
size_t i=0;
i<npixels; ++
i) {
108 pixels_.push_back(cluster.
pixel(
i));
110 sort(pixels_.begin(),pixels_.end(),[](
auto const&
a,
auto const&
b){
112 return (
a.x <
b.x) | ((
a.x ==
b.x) & (
a.y <
b.y));
116 for(
const auto&
pixel: pixels_)
120 pos.second = (
int)
pixel.y;
130 if(processColumn(pos,
true) ==
false)
135 if(pos.second > hig+1)
144 if(processColumn(pos,
false) ==
false)
150 for(
int ix = minPixelRow + 1;
151 ix < maxPixelRow; ix++)
156 for(
int iy = minPixelCol + 1;
157 iy < maxPixelCol; iy++)
180 const int pre_dx =
x[1] -
x[0];
181 const int pre_dy =
y[1] -
y[0];
182 for(
unsigned int ax = 0;
ax <= px;
ax++)
183 for(
unsigned int ay = 0; ay <= py; ay++)
185 int dx = pre_dx +
ax;
186 int dy = pre_dy + ay;
189 pair<int,int>
s(dx,dy);
virtual bool isItEdgePixelInX(int ixbin) const =0
void determineShape(const PixelGeomDetUnit &pixelDet, const SiPixelRecHit &recHit, ClusterData &data)
virtual bool isItEdgePixelInY(int iybin) const =0
virtual bool isItBigPixelInX(int ixbin) const =0
bool processColumn(std::pair< int, int > pos, bool inTheLoop)
virtual bool isItBigPixelInY(int iybin) const =0
const std::vector< uint16_t > & pixelADC() const
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.
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