// // This file is basically a wrapper for the Fortran program // contained in 2pi_event_gen_v7.f. // // Fortran generator code - Rory Miskimen // C wrapper - David Lawrence // #include #include #include #include "cppvars.h" double genevents_(void); void SelectTarget(double ztgt, double Atgt, double tgtlen, double radlen); void SelectTarget2(double ztgt, double Atgt, double tgtlen, double radlen, double c_den, double a_den); void SelectRhoPhotoProdCrossSection(double sigma_0, double At); //---------------------------- // main //---------------------------- int main(int narg, char* argv[]) { // Defaults int target_Z = 50; misc_.num_events = 100000; misc_.num_test_events = 1000000; misc_.rand_iseed = 3457; initialstate_.Ebeam = 5.5; initialstate_.polarization = 1.0; initialstate_.gamma_beam_rate = 1.0E7; initialstate_.pion_or_muon = 1; initialstate_.rho_background = 0; rhob_.rho_width_model = 1; // Parse the command line arguments for(int iarg = 1; iarg