#include <sys/stat.h>
#include <fcntl.h>
-#define MAXION 5000
+#define MAXION 8300
#define MAXZ 233
typedef struct s_z {
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("%d %f\n",i*3,1.0*Z[i].total_hits/max_th); // hits
- //printf("%d %f\n",i*3,1.0*Z[i].energy/max_e); // energy
+ 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("%d %f\n",i*3,1.0*Z[i].total_hits/max_th); // hits
+ // printf("%d %f\n",i*3,1.0*Z[i].energy/max_e); // energy
+ // printf("%d %f\n",i*3,1.0*Z[i].cell_hits_from_ions/max_chfi); // hits/ion
printf("skipped = %d\n",skipped);
printf("average hits per ion %d / %d\n",avg1/ion,avg2/ion);
return 1;
else {
//Z[z].energy+=en;
//Z[z].total_hits+=1;
- hit[z]=1;
+ // hit[z]=1;
}
if(ion!=atoi(value)) {
/* new ion */
memset(hit,0,MAXZ);
ion=atoi(value);
}
- // printf("%d %d %f %d\n",z*3,Z[z].total_hits,
- // Z[z].energy,Z[z].cell_hits_from_ions);
- // return 0;
}
if((buf[0]=='Û')&&(buf[1]==' ')) {
value2[0]=buf[25];
en=atof(value2);
if(z>232) skipped+=1;
else {
- Z[z].energy+=en;
- Z[z].total_hits+=1;
- hit[z]=1;
+ // energy > displacement energy
+ if(en>=10) {
+ Z[z].energy+=en;
+ Z[z].total_hits+=1;
+ hit[z]=1;
+ }
}
}
}