GENERAL ------- IMPROVEMENT: made code work under g77: -replaced "type *," with "print *," which does the same thing -removed "readonly" open specifier (status='old' implies this anyway) -replaced I output specifiers with I12 in format statements -replaced I input specifiers with * - type determined by dest variable -removed 'include structures.inc', which wasn't needed by any file -removed all unused record declarations -replaced needed record structures with scalar variables: -hSTOP.xxx became hSTOP_xxx in mc_hms_single.f -k_i.x, k_f.x, p_i.x became k_i_x, k_f_x, p_i_x in brem.f -shortened or reformatted lines so they fit in 72 char width -replaced sind, cosd, tand intrinsics with sin, cos, tan intrinsics MC_HMS_SINGLE.F --------------- BUGFIX: calculation of the radiation length after the interaction point was flawed. The variable ta, which accumulates lengths from each material, was divided by cos(hms angle) at every iteration. The first material would therefore be divided nmat times. The statement 'ta=ta/cos_ev' was moved outside the do loop to fix this. IMPROVEMENT: generation of the x,y coords of the interaction point is now done using a more simple, circular raster generator, in which the raster radius and its x,y center may be specified. The z coord is now picked using the grnd() function, the random number function used for all other variables, which is better than the rand() intrinsic function that was being used. CHANGE: The input file entries that used to specify beam width, height, and target thickness now specify raster radius, x offset and y offset, respectively, in cm. The target thickness parameter was never used, but printed to the output file. CHANGE: removed the gen_lim(), gen_lim_low() and gen_lim_up() arrays in favor of more clearly named single variables: dpp_lo, th_lo and ph_lo, and dpp_hi, th_hi and ph_hi. The th_ and ph_ variables are now stored in radians, eliminating lots of conversions elsewhere. SIMULATE.INC ------------ CLEANUP: commented out the following unused items: -include 'target.inc' -include 'structures.inc' -stuff about slop_param_... -stuff about theory, including /theory/ common block -kaon cross section lookup stuff, including /sigkaon/ common block -momentum distribution vars and /pfermi/ common block MC_HMS_RECON.F -------------- BUGFIX: variables xt and yt are now real*8, to match expected argument to simc_hms_recon() subroutine. TRANS_MAP.INC ( 1/20/2004) -------------------------- Changed from real to real*8 GEN_TRACK.F (1/20/2004) ---------------------- 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. 3) In subroutine genRecon a) Comment out calls to hmsReconOutOfPlane . b) In call simc_hms_recon switched ut(4) and ut(3) in argument list since they were in the wrong place. c) set ut(1) = xx after call simc_hms_recon d) Add variables dx_save, vt_save(6), used_save. When going through loop I found that sometimes the x position returned by tracktoplane gets farther away from the known raster position instead of closer. So I modified the code so that if the difference (dx) between the x positions gets larger, then the values for the previous iteration are used. GEN_CONSTANTS.PAR (1/20/2004) ----------------------------- 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. MC_HMS_SINGLE.F (1/20/2004) -------------------------- 1) changed zrand from real to real*8. 2) Changed so format 1006 for output is 'Trials cut in the hut' instead of 'Trials made it to the hut' so be compatible with changes in hms/mc_hms.f APERTURES.INC (1/20/2004) ------------------------- Updated setting of parameters to have d00 after the constant. CONSTANTS.INC (1/20/2004) ------------------------- Updated setting of parameters to have d00 after the constant. HMS_TRACK.F (1/20/2004) ---------------------- 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. TRG_TRACK.F (1/20/2004) ---------------------- 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. ELECTRON_TRANS.F (1/20/2004) ---------------------- 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. HMS/MC_HMS.F (1/20/2004) ------------------------ 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. 3) Moved hSTOP_hut = hSTOP_hut + 1 inside an statement if (.not.ok) then after call mc_hms_hut so hSTOP_hut is the total number of stops in the hut instead of the total which reach the hut. HMS/MC_HMS_HUT.F (1/20/2004) ---------------------------- Replaced hSTOP_hut = hSTOP_hut + 1 with hSTOP_dc1 = hSTOP_dc1 + 1, hSTOP_dc2 = hSTOP_dc2 + 1 or hSTOP_scin = hSTOP_scin + 1 at appropriate place. HMS/MC_HMS_RECON.F (1/20/2004) ----------------------------- 1) Changed from real to real*8 2) Updated all use of constants to have d00 after the constant. 3) comment out call hmsReconOutOfPlane .