+ /* compute graphs for random number rejection method */
+ if((c_profile=(u32 *)malloc(d3_l.max_z*sizeof(unsigned int)))==NULL)
+ {
+ puts("failed allocating memory for carbon profile graph");
+ return -1;
+ }
+ if((n_e_loss=(u32 *)malloc(d3_l.max_z*sizeof(unsigned int)))==NULL)
+ {
+ puts("failed allocating memory for nuclear energy loss graph");
+ return -1;
+ }
+ ip_max=get_reject_graph(&my_info,&d3_l,p_file,c_profile);
+ ne_max=get_reject_graph(&my_info,&d3_l,n_e_file,n_e_loss);
+
+#ifdef DEBUG_RAND
+ while(1)
+ {
+#ifdef DEBUG_CP
+ printf("%d\n",get_rand_reject(d3_l.max_z,ip_max,c_profile));
+#endif
+#ifdef DEBUG_NEL
+ printf("%d\n",get_rand_reject(d3_l.max_z,ne_max,n_e_loss));
+#endif
+ }
+#endif
+