#$ -wd /tmp #$ -j y #$ -o /hera/panda/jpuetz/data/fulljob.log cd $TMPDIR . "/hera/panda/jpuetz/pandaroot/trunk/build/config.sh" hera="/hera/panda/jpuetz/myscripts" _target="/hera/panda/jpuetz/data" prefix=9999 nEvts=1000 dec="pp_DpDm_Dp_Kpipi_incl.dec" mom=12.3485 res="pbarpSystem" save="" sig=1 if test "$1" != ""; then prefix=$1 fi if test "$2" != ""; then nEvts=$2 fi if test "$3" != ""; then dec=$3 fi if test "$4" != ""; then mom=$4 fi if test "$5" != ""; then res=$5 fi if test "$6" != ""; then save=$6 fi if test "$dec" == "DPM"; then sig=0 else dec=$hera"/"$dec fi outprefix=$TMPDIR"/M"$prefix"_"$SGE_TASK_ID echo $TMPDIR root -l -q -b -w $hera"/"prod_sim.C\(\"$outprefix\",$nEvts,\"$dec\",$mom,\"$res\"\) &> $outprefix"_sim.log" root -l -b -q -w $hera"/"prod_dig.C\(\"$outprefix\"\) &> $outprefix"_dig.log" root -l -b -q -w $hera"/"prod_rec_GenFit2.C\(\"$outprefix\"\) &> $outprefix"_rec.log" root -l -b -q -w $hera"/"prod_pid.C\(\"$outprefix\"\) &> $outprefix"_pid.log" root -l -b -q -w $hera"/"prod_ana_Xi1820.C\(\"$outprefix\",$nEvts,$mom\) &> $outprefix"_ana.log" # Move the data to the persistent storage if test "$save" == "saveall"; then cp -v $TMPDIR/M*root $_target cp -v $TMPDIR/M*log $_target else cp -v $TMPDIR/M*_pid.root $_target cp -v $TMPDIR/M*_pid.log $_target cp -v $TMPDIR/M*_par.root $_target cp -v $TMPDIR/M*_ana.root $_target cp -v $TMPDIR/M*_ana.log $_target cp -v $TMPDIR/M*_sim.log $_target cp -v $TMPDIR/M*_rec.log $_target fi # Evacuate the log-file cp -v $SGE_STDOUT_PATH $_target/$JOB_ID.log # Clean up rm $TMPDIR/M*root rm $TMPDIR/M*log rm $TMPDIR/Fair*root