int fd,ion,i,j;
int z,skipped;
+ int avg1,avg2;
double en;
double max_e;
int max_chfi,max_th;
ion=1;
skipped=0;
+ avg1=0;
+ avg2=0;
for(i=0;i<MAXZ;i++) {
Z[i].cell_hits_from_ions=0;
Z[i].total_hits=0;
if(Z[i].energy>max_e) max_e=Z[i].energy;
if(Z[i].total_hits>max_th) max_th=Z[i].total_hits;
if(Z[i].cell_hits_from_ions>max_chfi) max_chfi=Z[i].cell_hits_from_ions;
+ avg1+=Z[i].total_hits;
+ avg2+=Z[i].cell_hits_from_ions;
}
for(i=0;i<MAXZ;i++)
printf("%d %f %f %f\n",i*3,1.0*Z[i].total_hits/max_th,
Z[i].energy/max_e,
1.0*Z[i].cell_hits_from_ions/max_chfi);
printf("skipped = %d\n",skipped);
+ printf("average hits per ion %d / %d\n",avg1/ion,avg2/ion);
return 1;
}
if(buf[i]=='\n') break;