diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe17c49 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +data/LundFiles/ +data/RootFiles/ +*.root +*.lund +build/ \ No newline at end of file diff --git a/Config.json b/Config.json index b7b319f..813d87f 100644 --- a/Config.json +++ b/Config.json @@ -6,8 +6,8 @@ // and degrees for angles. // n_events indicates number of attempts // "experiment" : "eic" or "solid" - "experiment" : "solid", - //"experiment" : "eic", + //"experiment" : "solid", + "experiment" : "eic", // "file_name" : "example_output", "n_events" : 10000, diff --git a/Config_EIC.json b/Config_EIC.json new file mode 100644 index 0000000..a798c0e --- /dev/null +++ b/Config_EIC.json @@ -0,0 +1,46 @@ +{ + // This is an exmaple Json configuration file that will accept + // parameters for both EIC and Solid simulation. + //Config + // All values should use units of MeV for energies and momenta, + // and degrees for angles. + // n_events indicates number of attempts + // "experiment" : "eic" or "solid" + // "experiment" : "solid", + "experiment" : "eic", + + "file_name" : "DEMPGen_1000000_1", + "n_events" : 1000000, + "output_file" : "RootFiles/Test.root", + + //************************************** + /// This section if for EIC simulation only + "Targ_dir" : 1, // Target Direction (1->Up, 2->Down) + "Kinematics_type" : 1, // Kinematics type (1->FF, 2->TSSA) + + //************************************** + /// This section is Solid only + + "beam_energy": 11000, + "targ_pol_x": 0, + "targ_pol_y": 0, + "targ_pol_z": 0, + "scat_elec_Emin": 1100.0, + "scat_elec_Emax": 9900.0, + "scat_elec_thetamin": 5.0, + "scat_elec_thetamax": 27.0, + "prod_pion_thetamin": 5.0, + "prod_pion_thetamax": 20.0, + "multiple_scattering": false, + "ionization": false, + "bremsstrahlung": false, + "final_state_interaction": false, + "fermi_momentum": false, + "weight_cut": true, + "w_cut": true, + "w_min": 2, + "Qsq_cut": true, + "Qsq_min": 4, + "t_cut": true, + "t_min": -1.2 +} diff --git a/batch_runEIC.sh b/batch_runEIC.sh new file mode 100755 index 0000000..f49420b --- /dev/null +++ b/batch_runEIC.sh @@ -0,0 +1,35 @@ +#! /bin/bash +# Batch submission job script, executes run_EIC_batch.csh script + +echo "Running as ${USER}" # Checks who you're running this as' +NumFiles=$1 +NumEvents=$2 + +NumFiles = `expr $NumFiles + 1` +##Output history file## +historyfile=hist.$( date "+%Y-%m-%d_%H-%M-%S" ).log # Creates a log file +##Output batch script## +batch="${USER}_Job.txt" # The name of the job submission script it'll create each time +auger="augerID.tmp" + +i=1 +while [[ $i -le $NumFiles ]]; do + echo "Running ${batch} for file ${i}" + cp /dev/null ${batch} + echo "#!/bin/csh" >> ${batch} # Tells your job which shell to run in + echo "#PBS -N DEMPGen_${NumEvents}_${i}" >> ${batch} # Name your job + echo "#PBS -m abe" >> ${batch} # Email you on job start, end or error + echo "#PBS -M ${USER}@jlab.org" >>${batch} # Your email address, change it to be what you like + echo "#PBS -r n" >> ${batch} # Don't re-run if it crashes + echo "#PBS -o /home/${USER}/trq_output/DEMPGen_${NumEvents}_${i}.out" >> ${batch} # Output directory and file name, set to what you like + echo "#PBS -e /home/${USER}/trq_output/DEMPGen_${NumEvents}_${i}.err" >> ${batch} # Error output directory and file name + echo "date" >> ${batch} + echo "cd /home/apps/eic_evgen/" >> ${batch} # Tell your job to go to the directory with the script you want to run + echo "./run_EIC_Batch.csh ${i} ${NumEvents}" >> ${batch} # Run your script, change this to what you like + echo "date">>${batch} + echo "exit">>${batch} # End of your job script + echo "Submitting batch" + eval "qsub ${batch} 2>/dev/null" # Use qsub to actually submit your job + echo " " + i=$(( $i + 1 )) +done diff --git a/run_EIC_batch.csh b/run_EIC_batch.csh new file mode 100755 index 0000000..3ebb851 --- /dev/null +++ b/run_EIC_batch.csh @@ -0,0 +1,11 @@ +#!/bin/csh + +set FileNum=$1 +set NumEvents=$2 +echo "Running target polarisation up, FF setting for file $FileNum with $NumEvents events per file" +sed -i 's/"file_name" \:.*/"file_name" \: "DEMPGen_'$NumEvents'_'$FileNum'",/' Config_EIC.json +sed -i 's/"n_events" \:.*/"n_events" \: '$NumEvents',/' Config_EIC.json +cd data/ +./../build/DEMPgen ../Config_EIC.json +sleep 5 +mv "LundFiles/eic_input_DEMPGen_"$NumEvents"_"$FileNum".dat" "LundFiles/eic_DEMPGen_"$NumEvents"_"$FileNum".lund" diff --git a/sjdkay_Job.txt b/sjdkay_Job.txt new file mode 100644 index 0000000..502d829 --- /dev/null +++ b/sjdkay_Job.txt @@ -0,0 +1,12 @@ +#!/bin/csh +#PBS -N DEMPGen_1000000_5 +#PBS -m abe +#PBS -M sjdkay@jlab.org +#PBS -r n +#PBS -o /home/sjdkay/trq_output/DEMPGen_1000000_5.out +#PBS -e /home/sjdkay/trq_output/DEMPGen_1000000_5.err +date +cd /home/apps/eic_evgen/ +./run_EIC_Batch.csh 5 1000000 +date +exit