11 #define PATTERN_SIZE 9
12 const PhiMemoryImage pattern1 (0x8000,0,0,0x8000,0,0,0x8000,0,0,0x8000,0,0);
13 const PhiMemoryImage pattern2 (0x10000,0,0,0x8000,0,0,0xc000,0,0,0xc000,0,0);
14 const PhiMemoryImage pattern3 (0x4000,0,0,0x8000,0,0,0x18000,0,0,0x18000,0,0);
15 const PhiMemoryImage pattern4 (0x60000,0,0,0x8000,0,0,0xe000,0,0,0xe000,0,0);
16 const PhiMemoryImage pattern5 (0x3000,0,0,0x8000,0,0,0x78000,0,0,0x78000,0,0);
17 const PhiMemoryImage pattern6 (0x780000,0,0,0x8000,0,0,0xff00,0,0,0xff00,0,0);
18 const PhiMemoryImage pattern7 (0xf00,0,0,0x8000,0,0,0x7f8000,0,0,0x7f8000,0,0);
19 const PhiMemoryImage pattern8 (0x7f800000,0,0,0x8000,0,0,0xff00,0,0,0xff00,0,0);
20 const PhiMemoryImage pattern9 (0xff,0,0,0x8000,0,0,0x7f8000,0,0,0x7f8000,0,0);
28 std::vector<int>
tmp (192, 0);
29 std::vector<std::vector<int>> lya (4, tmp), stra (4, tmp), ranka_t (4, tmp), ranka (4, tmp);
30 std::vector<PhiMemoryImage> Merged = Eout.
zone;
34 for(
int zone=0;zone<4;zone++){
38 for(
int b=0;
b<192;
b++){
45 bool zona[12] = {
false};
50 else if((
b-15) < 127){
58 for(
int yy=0;yy != 12;yy++){
60 zona[yy] = patt[
y][yy] & Merged[zone][yy];
65 if(zona[0] || zona[1] || zona[2]){ly[
y] += 4;}
66 if(zona[3] || zona[4] || zona[5]){ly[
y] += 2;}
67 if(zona[6] || zona[7] || zona[8] || zona[9] || zona[10] || zona[11]){ly[
y] += 1;}
70 if( (ly[
y] != 0) && (ly[
y] != 1) && (ly[
y] != 2) && (ly[
y] != 4) ){
74 if((srt[
y] & 1) != 0){qu[
y] += 2;}
75 if((srt[y] & 2) != 0){qu[
y] += 8;}
76 if((srt[y] & 4) != 0){qu[
y] += 32;}
77 if((ly[y] & 1) != 0){qu[
y] += 1;}
78 if((ly[y] & 2) != 0){qu[
y] += 4;}
79 if((ly[y] & 4) != 0){qu[
y] += 16;}
88 if(qu[
a] > ranka_t[zone][
b]){
90 ranka_t[zone][
b] = qu[
a];
92 stra[zone][
b] = srt[
a];
109 for(
int zone=0;zone<4;zone++){
111 for(
int k=0;
k<192;
k++){
113 int qr = 0, ql = 0, qc = ranka_t[zone][
k];
118 if(
k>0){qr=ranka_t[zone][
k-1];}
119 if(
k<191){ql=ranka_t[zone][
k+1];}
121 if((qc <= ql) || (qc < qr)){qc = 0;}
146 std::vector<PatternOutput>
output (3,tmp);
163 for(
int zz=0;zz<4;zz++){
164 for(
int z = 0;
z<192;
z++){
void PrintQuality(QualityOutput out)
const PhiMemoryImage pattern8(0x7f800000, 0, 0, 0x8000, 0, 0, 0xff00, 0, 0, 0xff00, 0, 0)
const PhiMemoryImage pattern5(0x3000, 0, 0, 0x8000, 0, 0, 0x78000, 0, 0, 0x78000, 0, 0)
PatternOutput DetectPatterns(ZonesOutput Eout)
const PhiMemoryImage pattern2(0x10000, 0, 0, 0x8000, 0, 0, 0xc000, 0, 0, 0xc000, 0, 0)
const PhiMemoryImage pattern9(0xff, 0, 0, 0x8000, 0, 0, 0x7f8000, 0, 0, 0x7f8000, 0, 0)
std::vector< PatternOutput > Patterns(std::vector< ZonesOutput > Zones)
const PhiMemoryImage patterns[9]
const PhiMemoryImage pattern3(0x4000, 0, 0, 0x8000, 0, 0, 0x18000, 0, 0, 0x18000, 0, 0)
std::vector< PhiMemoryImage > zone
std::vector< ConvertedHit > convertedhits
const PhiMemoryImage pattern1(0x8000, 0, 0, 0x8000, 0, 0, 0x8000, 0, 0, 0x8000, 0, 0)
const PhiMemoryImage pattern6(0x780000, 0, 0, 0x8000, 0, 0, 0xff00, 0, 0, 0xff00, 0, 0)
std::vector< std::vector< double > > tmp
const PhiMemoryImage pattern7(0xf00, 0, 0, 0x8000, 0, 0, 0x7f8000, 0, 0, 0x7f8000, 0, 0)
std::vector< ZonesOutput > Zones(std::vector< std::vector< ConvertedHit >> Hits)
std::vector< ConvertedHit > hits
const PhiMemoryImage pattern4(0x60000, 0, 0, 0x8000, 0, 0, 0xe000, 0, 0, 0xe000, 0, 0)