#!/bin/bash

np=1000000
p0=100
nb=1024
while [ $p0 -lt 1001 ] ; do
    rootname=fodo-$p0-$nb-$np
    if [ ! -e $rootname.sub ] ; then
        csubPelegant -input fodoTemplate.ele -hive 1 -cores 12 -force 1 -rootname $rootname -name $rootname -arguments -macro=rootname=$rootname,nParticles=$np,p0=$p0,nBins=$nb
        echo > $rootname.sub
    fi
    p0=$((p0+5))
done  
