#!/bin/bash
echo "This will take a while ... grab a coffee/tea/water/cocktail"
mkdir -p logs
mkdir -p plots
fit_var="absolute_eta,M3,angle_bl"
nice_fit_var=`echo $fit_var | sed 's/,/_/g'`
N_JOBS=6

i=0
echo "Making 99_QCD_cross_checks plots"
nohup time python dps/analysis/xsection/99_QCD_cross_checks.py -e 7 &> logs/99_QCD_cross_checks_7TeV.log &
let i+=1
if (( $i % N_JOBS == 0 ))
then
	echo "Waiting on the above to finish."
   	wait;
fi

nohup time python dps/analysis/xsection/99_QCD_cross_checks.py -e 8 &> logs/99_QCD_cross_checks_8TeV.log &
let i+=1
if (( $i % N_JOBS == 0 ))
then
	echo "Waiting on the above to finish."
   	wait;
fi

wait;
echo "99_QCD_cross_checks all done!"