#if 0 // // This file is included in both the Fortan and C codes. The preprocessor // #if decides which section to compile. // // This defines the common blocks in fortran and global structs in C that // hold information to be passed from C to Fortran. They must be kept // in alignment (thus, putting them into this hybrid file). // #endif #if __FORTRAN__ COMMON/tgtvars/z_target,a_target,target_len,radiation_len real*8 z_target,a_target,target_len,radiation_len COMMON/rhob/rho_norm,rho_0,c_density,a_density,sigma_rho_0,A_t,rho_width_model real*8 rho_norm,rho_0,c_density,a_density,sigma_rho_0,A_t integer rho_width_model COMMON/initialstate/Ebeam,polarization,gamma_beam_rate,pion_or_muon,rho_background real*8 Ebeam,polarization,gamma_beam_rate logical pion_or_muon,rho_background COMMON/misc/num_events,num_test_events,rand_iseed integer num_events,num_test_events,rand_iseed #else // __C__ typedef struct{ double z_target; double a_target; double target_len; double radiation_len; }tgtvars_t; typedef struct{ double rho_norm; double rho_0; double c_density; double a_density; double sigma_rho_0; double A_t; int rho_width_model; // 1=Zeus, 2=Bulos, 3=Alvensleben }rhob_t; typedef struct{ double Ebeam; double polarization; double gamma_beam_rate; int pion_or_muon; int rho_background; }initialstate_t; typedef struct{ int num_events; int num_test_events; int rand_iseed; }misc_t; extern tgtvars_t tgtvars_; extern rhob_t rhob_; extern initialstate_t initialstate_; extern misc_t misc_; #endif