# Script to submit all fits to evaluate CCEscans

echo "========================================"
echo "Submit for:"
echo "       Detector $1"
echo "       Layer    $2"
echo "       Sector   $3"
echo "       Fill     $4"
echo "       Radius   $5"
FILENAME=run$1_$2_$3_$4_r$5.sh
VAL=3
echo "source $HOME/.zshrc" > $FILENAME
echo "export LHCBSTYLE=1" >> $FILENAME

if [ "$1" = "IT" ]
then
VAL=7
fi

echo "$HOME/cmtuser/Vetra_v13r2/ST/STAging/macros/CCEScan/voltageFit_spline -b -d $1 -l $2 -s $3 -f $4 -v $VAL -r $5" >> $FILENAME
chmod 700 $FILENAME
./$FILENAME
rm $FILENAME
echo "========================================"
echo ""
