#!/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 mkdir -p ${workroot}/farm_output/control.in cat ${workroot}/farm/control.in.temp | sed -e s/XXX/${JOB_ID}/g > ${workroot}/farm_output/control.in/control.in.${JOB_ID} ln -s ${workroot}/farm_output/control.in/control.in.${JOB_ID} control.in # 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_${JOB_ID}.root hdgeant_${JOB_ID}_smeared.hddm # run hd_root again but without cathode strip info ${bindir}/hd_root -PTRKFIT:SIGMA_FDC_CATHODE=0 -PPLUGINS=mcthrown_hists,track_hists,trackeff_hists -o reconstructed_NoCathodeInfo_${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/