#!/bin/tcsh if ( ! $?JOB_ID ) setenv JOB_ID 1234 setenv JOB_ID `basename $JOB_ID .farmpbs.jlab.org` set workroot=/work/halld/home/davidl/2009.11.23.track_resolutions source ${workroot}/setenv.csh set workdisk=${workroot}/set5_piplus set bindir=${workroot}/bin/${BMS_OSNAME} set libdir=${workroot}/lib/${BMS_OSNAME} mkdir -p $workdisk env > $workdisk/env.${JOB_ID} mkdir tmp${JOB_ID} cd tmp${JOB_ID} ####################### Run hdgeant ########################## # Run hdgeant rm -f control.in cat ${workroot}/farm/control.in.piplus | sed -e s/XXX/${JOB_ID}/g > ${workdisk}/control.in.${JOB_ID} ln -s ${workdisk}/control.in.${JOB_ID} control.in echo "hdgeant output redirected to log file: ${workdisk}/hdgeant_${JOB_ID}.log" ${bindir}/hdgeant >& ${workdisk}/hdgeant_${JOB_ID}.log # Smear drift chamber hits ${bindir}/mcsmear -n hdgeant*.hddm # copy output file to work disk #cp hdgeant*smeared.hddm $workdisk ############################################### # Run hd_root echo "hd_root output redirected to log file: ${workdisk}/ALT1_piplus${JOB_ID}.log" ${bindir}/hd_root --nthreads=1 --dumpconfig --config=${workroot}/farm/ALT1_piplus.conf hdgeant*smeared.hddm -o ALT1_piplus${JOB_ID}.root >& ${workdisk}/ALT1_piplus${JOB_ID}.log cp ALT1_piplus${JOB_ID}.root $workdisk cp jana.config $workdisk/jana_${JOB_ID}.config