ppfx_job.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 echo
4 echo "======== cd to CONDOR_DIR_INPUT ========"
5 cd $CONDOR_DIR_INPUT
6 pwd
7 
8 echo
9 echo "======== ls ========"
10 ls
11 
12 echo
13 echo "======== UNTARRING... ========"
14 tar xvfz local_install.tar.gz -C ./ > /dev/null
15 
16 echo
17 echo "======== Done untarring. ls ========"
18 ls
19 
20 echo
21 echo "======== SETUP ROOT, BOOST and DK2NU ========"
22 echo "source setup_for_grid.sh"
23 source setup_for_grid.sh
24 
25 echo
26 echo "======== UPDATE g4numi run number to select input ========"
27 NAME_FILE="g4numiv6_minervame_${BEAMCONFIG}_\${PROCESS}_0006.root"
28 INPUT_FILE="${IN_DIR}/${BEAMCONFIG}/${NAME_FILE}"
29 ifdh cp "${INPUT_FILE}" "$CONDOR_DIR_INPUT/"
30 ls
31 
32 OUTPUT_FILE="ppfx_${BEAMCONFIG}_run\${PROCESS}.root"
33 
34 echo "BEAMCONFIG=${BEAMCONFIG}"
35 echo "PROCESS=$PROCESS"
36 echo "OUTFILE=$OUTPUT_FILE"
37 
38 echo
39 echo "======== EXECUTING ppfx ========"
40 echo "bin/doReweight_dk2nu_original ${NAME_FILE} ${OUTPUT_FILE} ${INPUT_OPTIONS} ${IDET}"
41 bin/doReweight_dk2nu_original "${NAME_FILE}" "${OUTPUT_FILE}" "${INPUT_OPTIONS}" "${IDET}"
42 
43 echo
44 echo "Moving output to CONDOR_DIR_PPFX: "
45 echo "=> CONDOR_DIR_PPFX: $CONDOR_DIR_PPFX"
46 rm g4numi*root
47 mv ppfx*.root $CONDOR_DIR_PPFX