#!/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.04.tracking_efficiency source ${workroot}/setenv.csh set workdisk=${workroot}/set2 set bindir=${workroot}/bin/Linux_Fedora8-i686-gcc4.1.2 set libdir=${workroot}/lib/Linux_Fedora8-i686-gcc4.1.2 mkdir -p $workdisk env > $workdisk/env.${JOB_ID} mkdir tmp${JOB_ID} cd tmp${JOB_ID} ####################### MULS ON ######################## # Run hdgeant rm -f control.in cat ${workroot}/farm/control.in.tmpl | 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 # Run hd_root echo "hd_root output redirected to log file: ${workdisk}/hd_root_${JOB_ID}.log" ${bindir}/hd_root --config=${workroot}/farm/jana.conf hdgeant*smeared.hddm -o hd_root_${JOB_ID}.root >& ${workdisk}/hd_root_${JOB_ID}.log cp hdgeant*.hddm hd_root*.root $workdisk rm -f hdgeant*.hddm hd_root*.root