]> hackdaworld.org Git - physik/nlsop.git/commitdiff
print all 3 colummns
authorhackbard <hackbard>
Fri, 11 Mar 2005 16:56:49 +0000 (16:56 +0000)
committerhackbard <hackbard>
Fri, 11 Mar 2005 16:56:49 +0000 (16:56 +0000)
parse_trim_collision.c

index 023c8f6ae56090dcc2520df3cc44cdfc3e37a964..743a7119e811d608a9e268bd1e3170424f9043eb 100644 (file)
@@ -17,7 +17,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#define MAXION 5000
+#define MAXION 8300
 #define MAXZ 233
 
 typedef struct s_z {
@@ -80,11 +80,13 @@ int main(int argc,char **argv) {
                                        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;
@@ -131,7 +133,7 @@ int main(int argc,char **argv) {
                        else {
                                //Z[z].energy+=en;
                                //Z[z].total_hits+=1;
-                               hit[z]=1;
+                               // hit[z]=1;
                        }
                        if(ion!=atoi(value)) {
                                /* new ion */
@@ -139,9 +141,6 @@ int main(int argc,char **argv) {
                                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];
@@ -169,9 +168,12 @@ int main(int argc,char **argv) {
                        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;
+                               }
                        }
                }
        }