#$ -wd /tmp #$ -j y #$ -o /hera/panda/goerres/CascadeSim/logs/fulljob.log cd $TMPDIR # definitions of paths HERADIR="/hera/panda/goerres" _macro=$HERADIR"/CascadeSim/macros" _data=$HERADIR"/CascadeSim/data" _logs=$HERADIR"/CascadeSim/logs" # source PandaRoot . $HERADIR/PandaRoot.trunk/buildPanda/config.sh # input paramters subdir="" prefix=9999 nEvts=1000 dec=$_macro"/Xi_LambdaK.dec" mom=4.1 if test "$1" != ""; then subdir=$1 fi if test "$2" != ""; then prefix=$2 fi if test "$3" != ""; then nEvts=$3 fi if test "$4" != ""; then dec=$4 fi if test "$5" != ""; then mom=$5 fi # build a unique directory outprefix=$TMPDIR"/"$prefix"_"$SGE_TASK_ID"_" # Execute the scripts! echo $TMPDIR root -l -q -b -w $_macro"/"cascade_sim.C\($nEvts,\"$outprefix\",$mom,\"$dec\"\) &> $outprefix"sim.log" root -l -b -q -w $_macro"/"cascade_dig.C\(\"$outprefix\"\) &> $outprefix"dig.log" root -l -b -q -w $_macro"/"cascade_rec.C\(\"$outprefix\"\) &> $outprefix"rec.log" root -l -b -q -w $_macro"/"cascade_pid.C\(\"$outprefix\"\) &> $outprefix"pid.log" #root -l -b -q -w $_macro"/"hitcount.C\(\"$outprefix\"\) &> $outprefix"hc.log" root -l -b -q -w $_macro"/"cascade_ana.C\(\"$outprefix\"\) &> $outprefix"ana.log" # Move the data to the persistent storage if test "$subdir" != ""; then mkdir $_data/$subdir mkdir $_logs/$subdir _data=$_data/$subdir _logs=$_logs/$subdir fi #cp -v $TMPDIR/*_sim_complete.root $_data #cp -v $TMPDIR/*_digi_complete.root $_data cp -v $TMPDIR/*_reco_complete.root $_data cp -v $TMPDIR/*_pid_complete.root $_data cp -v $TMPDIR/*_cascade_ana-0.root $_data cp -v $TMPDIR/*_simparams.root $_data cp -v $TMPDIR/*log $_logs # Evacuate the log-file cp -v $SGE_STDOUT_PATH $_logs/$JOB_ID.log # Clean up rm $TMPDIR/$prefix_*root rm $TMPDIR/*log rm $TMPDIR/Fair*root