#!/bin/tcsh # environment variables set workroot=/work/halld/home/${USER}/2009.10.09.fdc_cathode_res source ${workroot}/setenv.csh set bindir=${HALLD_HOME}/bin/${BMS_OSNAME} # make a happy JOB_ID (initially given to us by the farm, as is WORKDIR) if ( ! $?JOB_ID ) setenv JOB_ID 1234 setenv JOB_ID `basename $JOB_ID .farmpbs.jlab.org` # need control.in file rm -f control.in cat ${workroot}/farm/control.in.temp | sed -e s/XXX/${JOB_ID}/g | grep -v END > control.in # Set systematic r shift maximum in control.in echo "FDCCATHSHIFT 1.0" >> control.in echo "END" >> control.in # Keep copy of control.in mkdir -p ${workroot}/farm_output/control.in cp control.in ${workroot}/farm_output/control.in/control.in.${JOB_ID} # run hdgeant and save to hdgeant_${JOB_ID}.hddm ${bindir}/hdgeant mv hdgeant.hddm hdgeant_${JOB_ID}.hddm # run mcsmear and save to hdgeant_${JOB_ID}_smeared.hddm ${bindir}/mcsmear -n hdgeant_${JOB_ID}.hddm # run hd_root and save to mcthrown_hists_${JOB_ID}.root ${bindir}/hd_root -PPLUGINS=mcthrown_hists,track_hists,trackeff_hists -o reconstructed_fdccathshift1.0_${JOB_ID}.root hdgeant_${JOB_ID}_smeared.hddm # copy all output files to ${workroot}/farm_output/ mkdir -p ${workroot}/farm_output/ cp *.root ${workroot}/farm_output/