64 M5x5[0]=M5x5Input[60];
65 M5x5[1]=M5x5Input[71];
66 M5x5[2]=M5x5Input[49];
67 M5x5[3]=M5x5Input[61];
68 M5x5[4]=M5x5Input[72];
69 M5x5[5]=M5x5Input[50];
70 M5x5[6]=M5x5Input[59];
71 M5x5[7]=M5x5Input[70];
72 M5x5[8]=M5x5Input[48];
73 M5x5[9]=M5x5Input[82];
74 M5x5[10]=M5x5Input[83];
75 M5x5[11]=M5x5Input[81];
76 M5x5[12]=M5x5Input[38];
77 M5x5[13]=M5x5Input[39];
78 M5x5[14]=M5x5Input[37];
79 M5x5[15]=M5x5Input[58];
80 M5x5[16]=M5x5Input[69];
81 M5x5[17]=M5x5Input[80];
82 M5x5[18]=M5x5Input[47];
83 M5x5[19]=M5x5Input[36];
84 M5x5[20]=M5x5Input[62];
85 M5x5[21]=M5x5Input[73];
86 M5x5[22]=M5x5Input[84];
87 M5x5[23]=M5x5Input[51];
88 M5x5[24]=M5x5Input[40];
111 for(
int i =0 ;
i< 9;
i++){
112 if(fabs(M5x5[
i])<epsilon && IndDeadCha >0){
return 0.0;}
113 if(fabs(M5x5[i])<epsilon && IndDeadCha==-1)IndDeadCha=
i;
139 int voisin1,voisin2,voisin3,voisin4;
143 lineX1[0]=3;lineX1[1]=4;lineX1[2]=5;
144 lineX2[0]=6;lineX2[1]=7;lineX2[2]=8;
145 lineY1[0]=1;lineY1[1]=4;lineY1[2]=7;
146 lineY2[0]=2;lineY2[1]=8;lineY2[2]=5;
147 voisin1=1;voisin2=2;voisin3=3;voisin4=6;
150 lineY1[0]=3;lineY1[1]=4;lineY1[2]=5;
151 lineY2[0]=6;lineY2[1]=7;lineY2[2]=8;
152 lineX2[0]=3;lineX2[1]=0;lineX2[2]=6;
153 lineX1[0]=2;lineX1[1]=8;lineX1[2]=5;
154 voisin1=0;voisin2=4;voisin3=7;voisin4=9;
157 lineY2[0]=3;lineY2[1]=4;lineY2[2]=5;
158 lineY1[0]=6;lineY1[1]=7;lineY1[2]=8;
159 lineX1[0]=1;lineX1[1]=4;lineX1[2]=7;
160 lineX2[0]=3;lineX2[1]=0;lineX2[2]=6;
161 voisin1=0;voisin2=5;voisin3=8;voisin4=12;
164 lineX2[0]=0;lineX2[1]=1;lineX2[2]=2;
165 lineX1[0]=6;lineX1[1]=7;lineX1[2]=8;
166 lineY1[0]=1;lineY1[1]=4;lineY1[2]=7;
167 lineY2[0]=2;lineY2[1]=8;lineY2[2]=5;
168 voisin1=0;voisin2=20;voisin3=4;voisin4=5;
171 lineX1[0]=0;lineX1[1]=1;lineX1[2]=2;
172 lineX2[0]=6;lineX2[1]=7;lineX2[2]=8;
173 lineY1[0]=0;lineY1[1]=3;lineY1[2]=6;
174 lineY2[0]=2;lineY2[1]=8;lineY2[2]=5;
175 voisin1=1;voisin2=10;voisin3=3;voisin4=21;
178 lineY1[0]=0;lineY1[1]=1;lineY1[2]=2;
179 lineY2[0]=6;lineY2[1]=7;lineY2[2]=8;
180 lineX2[0]=4;lineX2[1]=1;lineX2[2]=7;
181 lineX1[0]=0;lineX1[1]=3;lineX1[2]=6;
182 voisin1=13;voisin2=2;voisin3=3;voisin4=23;
185 lineX1[0]=3;lineX1[1]=4;lineX1[2]=5;
186 lineX2[0]=0;lineX2[1]=1;lineX2[2]=2;
187 lineY1[0]=1;lineY1[1]=4;lineY1[2]=7;
188 lineY2[0]=5;lineY2[1]=2;lineY2[2]=8;
189 voisin1=15;voisin2=0;voisin3=7;voisin4=8;
192 lineY2[0]=3;lineY2[1]=4;lineY2[2]=5;
193 lineY1[0]=0;lineY1[1]=1;lineY1[2]=2;
194 lineX1[0]=0;lineX1[1]=3;lineX1[2]=6;
195 lineX2[0]=2;lineX2[1]=8;lineX2[2]=5;
196 voisin1=11;voisin2=1;voisin3=6;voisin4=16;
199 lineX2[0]=3;lineX2[1]=4;lineX2[2]=5;
200 lineX1[0]=0;lineX1[1]=1;lineX1[2]=2;
201 lineY2[0]=1;lineY2[1]=4;lineY2[2]=7;
202 lineY1[0]=0;lineY1[1]=3;lineY1[2]=6;
203 voisin1=6;voisin2=2;voisin3=18;voisin4=14;
218 for(
int j=0;
j<3;
j++){XL8+=M5x5[lineX1[
j]];}
219 for(
int j=0;
j<3;
j++){XR8+=M5x5[lineX2[
j]];}
222 for(
int j=0;
j<3;
j++)YL8+=M5x5[lineY1[
j]];
223 for(
int j=0;
j<3;
j++)YR8+=M5x5[lineY2[
j]];
226 for(
int j=0;
j<9;
j++)
if(
j!=IndDeadCha)SUM8+=M5x5[
j];
228 float XR24=XR8+M5x5[11]+M5x5[14]+M5x5[15]+M5x5[16]+M5x5[17]+M5x5[18]+M5x5[19];
229 float YR24=YR8+M5x5[18]+M5x5[23]+M5x5[24]+M5x5[13]+M5x5[12]+M5x5[14]+M5x5[19];
232 for(
int j=0;
j<25;
j++)
if(
j!=IndDeadCha)sum24+=M5x5[
j];
234 if(XR8 > 0 && XL8>0 && YL8 >0 && YR8>0 && SUM8>0 && XR24>0 &&YR24>0){
235 logX8=TMath::Log(XL8/XR8);
236 logY8=TMath::Log(YL8/YR8);
255 for(
int j=IndMax;
j<9;
j++){
257 if(M5x5[
j] > maxi){IndMax=
j;maxi=M5x5[
j];}
262 for(
int j=IndSecMax;
j<9;
j++){
263 if(
j!=IndDeadCha &&
j!=IndMax){
264 if(M5x5[
j] > Secmaxi){IndSecMax=
j;Secmaxi=M5x5[
j];}
274 float indpos = position->
value(0,in[0],in[1],in[2],(SUM8-maxi)/sum24,(maxi-Secmaxi)/maxi,M5x5[voisin1]/SUM8,M5x5[voisin2]/SUM8,M5x5[voisin3]/SUM8,M5x5[voisin4]/SUM8);
293 if(logX8!=-50 && logY8!=-50 && SUM8>0 && XR24>0 &&YR24>0){
294 if(Adjacent)NN1 =NNAdj->
value(0,in[0],in[1],in[2]);
295 if(Central)NN1 =NNCentral->
value(0,in[0],in[1],in[2]);
296 if(Corner)NN1 =NNCorner->
value(0,in[0],in[1],in[2]);
double value(int index, double in0, double in1, double in2)
static int position[TOTALCHAMBERS][3]
double value(int index, double in0, double in1, double in2)
double value(int index, double in0, double in1, double in2)
double value(int index, double in0, double in1, double in2, double in3, double in4, double in5, double in6, double in7, double in8)