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>
85 if(a.
x < b.
x)
return true;
86 if(a.
x > b.
x)
return false;
88 if(a.
y < b.
y)
return true;
89 if(a.
y > b.
y)
return false;
107 x[0] = -1;
x[1] = -1;
108 y[0] = -1;
y[1] = -1;
109 olow = -2; ohig = -2; odir = 0;
115 vector<SiPixelCluster::Pixel> pixels = recHit.
cluster()->pixels();
119 for(vector<SiPixelCluster::Pixel>::const_iterator pixel = pixels.begin();
120 pixel!= pixels.end();
124 pos.first = (int)pixel->x;
125 pos.second = (
int)pixel->y;
135 if(processColumn(pos,
true) ==
false)
140 if(pos.second > hig+1)
148 if(processColumn(pos,
false) ==
false)
152 for(
int ix = recHit.
cluster()->minPixelRow() + 1;
153 ix < recHit.
cluster()->maxPixelRow(); ix++)
156 for(
int iy = recHit.
cluster()->minPixelCol() + 1;
157 iy < recHit.
cluster()->maxPixelCol(); iy++)
174 if( (px > 0 || py > 0) && odir == 0)
181 data.
size.reserve(px*py);
182 for(
int ax = 0;
ax <= px;
ax++)
183 for(
int ay = 0; ay <= py; ay++)
185 int dx =
x[1] -
x[0] +
ax;
186 int dy =
y[1] -
y[0] + ay;
187 if(odir != 0) dy *= odir;
189 pair<int,int>
s(dx,dy);
190 data.
size.push_back(s);
std::vector< std::pair< int, int > > size
void determineShape(const PixelGeomDetUnit &pixelDet, const SiPixelRecHit &recHit, ClusterData &data)
virtual bool isItEdgePixelInX(int ixbin) const =0
bool processColumn(std::pair< int, int > pos, bool inTheLoop)
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
virtual bool isItEdgePixelInY(int iybin) const =0
char data[epos_bytes_allocation]
int getDirection(int low, int hig, int olow, int ohig)
bool operator()(SiPixelCluster::Pixel a, SiPixelCluster::Pixel b)
virtual bool isItBigPixelInY(const int iybin) const =0