#!/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 binning plots"
nohup time python dps/analysis/xsection/make_binning_plots.py -c 7 &> logs/make_binning_plots_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/make_binning_plots.py -c 8 &> logs/make_binning_plots_8TeV.log &
let i+=1
	if (( $i % N_JOBS == 0 ))
then
	echo "Waiting on the above to finish."
   	wait;
fi

wait;
echo "make_binning_plots all done!"